@pebble-software/bonsai 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1161 -1646
- package/package.json +1 -4
package/dist/index.js
CHANGED
|
@@ -1,38 +1,37 @@
|
|
|
1
|
-
import { jsx as d, jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { useState as De, useRef as
|
|
4
|
-
import { useSnapshot as
|
|
1
|
+
import { jsx as d, jsxs as k, Fragment as M } from "react/jsx-runtime";
|
|
2
|
+
import * as ee from "react";
|
|
3
|
+
import { useState as De, useRef as W, useCallback as ye, useEffect as ce, useContext as oe, createContext as we, memo as Ae, createElement as F, useMemo as Zt, Fragment as Qt } from "react";
|
|
4
|
+
import { useSnapshot as Aa, proxy as za } from "valtio";
|
|
5
5
|
import Ta, { z as t } from "zod";
|
|
6
|
-
import { createErrorMap as
|
|
7
|
-
import { cva as
|
|
8
|
-
import { clsx as
|
|
9
|
-
import { twMerge as
|
|
10
|
-
import { Accordion as
|
|
11
|
-
import { IconChevronDown as ze, IconCircleFilled as
|
|
12
|
-
import { useWebHaptics as
|
|
13
|
-
import { Avatar as
|
|
14
|
-
import { mergeProps as
|
|
15
|
-
import { useRender as
|
|
16
|
-
import { Button as
|
|
17
|
-
import { getDefaultClassNames as
|
|
18
|
-
import { Select as
|
|
19
|
-
import { Checkbox as
|
|
20
|
-
import { Collapsible as
|
|
21
|
-
import { Input as
|
|
22
|
-
import { OTPInput as
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import {
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const T = t.string().length(24).meta({
|
|
6
|
+
import { createErrorMap as Ia } from "zod-validation-error";
|
|
7
|
+
import { cva as S } from "class-variance-authority";
|
|
8
|
+
import { clsx as Ca } from "clsx";
|
|
9
|
+
import { twMerge as ka } from "tailwind-merge";
|
|
10
|
+
import { Accordion as te } from "@base-ui/react/accordion";
|
|
11
|
+
import { IconChevronDown as ze, IconCircleFilled as Sa, IconLoader as Ra, IconSelector as _a, IconCheck as ea, IconChevronUp as Na, IconChevronLeft as Ea, IconChevronRight as Pa, IconWriting as Oa, IconTextSize as Da, IconEraser as La } from "@tabler/icons-react";
|
|
12
|
+
import { useWebHaptics as se } from "web-haptics/react";
|
|
13
|
+
import { Avatar as fe } from "@base-ui/react/avatar";
|
|
14
|
+
import { mergeProps as Ua } from "@base-ui/react/merge-props";
|
|
15
|
+
import { useRender as Ba } from "@base-ui/react/use-render";
|
|
16
|
+
import { Button as ja } from "@base-ui/react/button";
|
|
17
|
+
import { getDefaultClassNames as $a, DayPicker as Ha } from "react-day-picker";
|
|
18
|
+
import { Select as P } from "@base-ui/react/select";
|
|
19
|
+
import { Checkbox as Le } from "@base-ui/react/checkbox";
|
|
20
|
+
import { Collapsible as Te } from "@base-ui/react/collapsible";
|
|
21
|
+
import { Input as Fa } from "@base-ui/react/input";
|
|
22
|
+
import { OTPInput as Ga } from "input-otp";
|
|
23
|
+
import { Progress as q } from "@base-ui/react/progress";
|
|
24
|
+
import { Tabs as Ie } from "@base-ui/react/tabs";
|
|
25
|
+
import Wa from "react-signature-canvas";
|
|
26
|
+
import { Separator as Va } from "@base-ui/react/separator";
|
|
27
|
+
import { Switch as Ue } from "@base-ui/react/switch";
|
|
28
|
+
import ta from "jsep";
|
|
29
|
+
import qa from "@jsep-plugin/arrow";
|
|
30
|
+
var aa = /* @__PURE__ */ ((e) => (e.FORM_CAPTURED = "FORM_CAPTURED", e.FILE_GENERATED = "FILE_GENERATED", e.FILE_UPLOADED = "FILE_UPLOADED", e))(aa || {});
|
|
31
|
+
new Set(Object.values(aa));
|
|
32
|
+
var s = /* @__PURE__ */ ((e) => (e.A = "a", e.P = "p", e.H = "h", e.OL = "ol", e.UL = "ul", e.LI = "li", e.DIV = "div", e.SPAN = "span", e.ACCORDION = "accordion", e.ACCORDION_ITEM = "accordion-item", e.ACCORDION_TRIGGER = "accordion-trigger", e.ACCORDION_CONTENT = "accordion-content", e.ALERT = "alert", e.AVATAR = "avatar", e.BADGE = "badge", e.BUTTON = "button", e.CARD = "card", e.CARD_HEADER = "card-header", e.CARD_TITLE = "card-title", e.CARD_DESCRIPTION = "card-description", e.CARD_CONTENT = "card-content", e.CARD_FOOTER = "card-footer", e.CARD_ACTION = "card-action", e.CARD_ICON = "card-icon", e.CALENDAR = "calendar", e.CHECKBOX = "checkbox", e.COLLAPSIBLE = "collapsible", e.COLLAPSIBLE_TRIGGER = "collapsible-trigger", e.COLLAPSIBLE_CONTENT = "collapsible-content", e.IMAGE = "image", e.OTP = "otp", e.INPUT = "input", e.INPUT_GROUP = "input-group", e.INPUT_GROUP_TEXT = "input-group-text", e.INPUT_GROUP_ADDON = "input-group-addon", e.INPUT_GROUP_BUTTON = "input-group-button", e.INPUT_GROUP_INPUT = "input-group-input", e.INPUT_GROUP_TEXTAREA = "input-group-textarea", e.LABEL = "label", e.LOADER = "loader", e.PROGRESS = "progress", e.SEPARATOR = "separator", e.SKELETON = "skeleton", e.SWITCH = "switch", e.TABLE = "table", e.TABLE_HEADER = "table-header", e.TABLE_BODY = "table-body", e.TABLE_FOOTER = "table-footer", e.TABLE_HEAD = "table-head", e.TABLE_ROW = "table-row", e.TABLE_CELL = "table-cell", e.TABLE_CAPTION = "table-caption", e.TEXTAREA = "textarea", e.SIGNATURE = "signature", e.EACH = "each", e.IF = "if", e))(s || {});
|
|
33
|
+
new Set(Object.values(s));
|
|
34
|
+
const A = t.string().length(24).meta({
|
|
36
35
|
description: "MongoDB ObjectId (24-character hex string)",
|
|
37
36
|
example: "67e091ab2c4d3f22001a2b3c"
|
|
38
37
|
});
|
|
@@ -40,7 +39,7 @@ t.string().email().meta({
|
|
|
40
39
|
description: "Valid email address",
|
|
41
40
|
example: "jack@datahaven.net"
|
|
42
41
|
});
|
|
43
|
-
const
|
|
42
|
+
const I = t.string().datetime({ offset: !0 }).meta({
|
|
44
43
|
description: "ISO 8601 datetime with optional timezone offset",
|
|
45
44
|
example: "2077-12-25T23:59:59Z"
|
|
46
45
|
});
|
|
@@ -55,35 +54,35 @@ t.object({
|
|
|
55
54
|
const b = t.object({
|
|
56
55
|
id: t.string().optional().meta({ description: "Unique identifier for the element" }),
|
|
57
56
|
className: t.string().optional().meta({ description: "CSS classes to apply to the element" })
|
|
58
|
-
}),
|
|
57
|
+
}), Ma = b.extend({
|
|
59
58
|
href: t.string({ error: "Link destination (href) is required" }).min(1, { message: "Link destination (href) cannot be empty" })
|
|
60
|
-
}),
|
|
59
|
+
}), Ja = b.extend({
|
|
61
60
|
variant: t.enum(["h1", "h2", "h3", "h4", "h5", "h6"], {
|
|
62
61
|
error: "Invalid heading variant. Must be one of: h1, h2, h3, h4, h5, or h6"
|
|
63
62
|
}).optional().meta({ description: "Heading level variant (h1-h6)" }),
|
|
64
63
|
as: t.enum(["h1", "h2", "h3", "h4", "h5", "h6"], {
|
|
65
64
|
error: "Invalid heading element type. Must be one of: h1, h2, h3, h4, h5, or h6"
|
|
66
65
|
}).optional().meta({ description: "Render as a different heading element" })
|
|
67
|
-
}).optional(),
|
|
66
|
+
}).optional(), Xa = b.extend({
|
|
68
67
|
size: t.enum(["xs", "sm", "md", "lg", "xl"], {
|
|
69
68
|
error: "Invalid paragraph size. Must be one of: xs, sm, md, lg, or xl"
|
|
70
69
|
}).optional().meta({ description: "Paragraph text size" }),
|
|
71
70
|
variant: t.enum(["default", "muted"]).optional().meta({ description: "Paragraph style variant" }),
|
|
72
71
|
as: t.enum(["p", "div", "span"]).optional().meta({ description: "Render as a different element" })
|
|
73
|
-
}).optional(),
|
|
72
|
+
}).optional(), Ka = b.optional(), Ya = b.optional(), Za = b.optional(), Qa = b.optional(), er = b.optional(), tr = b.optional(), ar = b.extend({
|
|
74
73
|
variant: t.enum(["default", "success", "warning", "destructive"], {
|
|
75
74
|
error: "Invalid alert variant. Must be one of: default, success, warning, or destructive"
|
|
76
75
|
}).optional().meta({ description: "Alert style variant" }),
|
|
77
76
|
size: t.enum(["default", "sm", "lg"]).optional().meta({ description: "Alert size" }),
|
|
78
77
|
raised: t.enum(["xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Alert shadow elevation" })
|
|
79
|
-
}).optional(),
|
|
78
|
+
}).optional(), rr = b.extend({
|
|
80
79
|
variant: t.enum(["default", "secondary", "destructive", "outline", "ghost"], {
|
|
81
80
|
error: "Invalid badge variant. Must be one of: default, secondary, destructive, outline, or ghost"
|
|
82
81
|
}).optional().meta({ description: "Badge style variant" }),
|
|
83
82
|
size: t.enum(["sm", "md", "lg"]).optional().meta({ description: "Badge size" }),
|
|
84
83
|
raised: t.enum(["xs", "sm", "md", "lg"]).optional().meta({ description: "Badge shadow elevation" }),
|
|
85
84
|
extrude: t.enum(["xs", "sm", "md", "lg"]).optional().meta({ description: "Badge extrude elevation" })
|
|
86
|
-
}).optional(),
|
|
85
|
+
}).optional(), nr = b.extend({
|
|
87
86
|
variant: t.enum(["default", "secondary", "outline", "destructive", "warning", "ghost"], {
|
|
88
87
|
error: "Invalid button variant. Must be one of: default, secondary, outline, destructive, warning, or ghost"
|
|
89
88
|
}).optional().meta({ description: "Button style variant" }),
|
|
@@ -98,15 +97,15 @@ const b = t.object({
|
|
|
98
97
|
type: t.enum(["button", "submit"], {
|
|
99
98
|
error: "Invalid button type. Must be either 'button' or 'submit'"
|
|
100
99
|
}).optional().meta({ description: "Button type attribute" })
|
|
101
|
-
}).optional(),
|
|
100
|
+
}).optional(), or = b.extend({
|
|
102
101
|
size: t.enum(["sm", "md"]).optional().meta({ description: "Card size" }),
|
|
103
102
|
raised: t.enum(["none", "xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Card shadow elevation" })
|
|
104
|
-
}).optional(),
|
|
103
|
+
}).optional(), sr = b.optional(), ir = b.optional(), dr = b.optional(), lr = b.optional(), cr = b.optional(), ur = b.optional(), pr = b.optional(), gr = b.extend({
|
|
105
104
|
checked: t.union([t.string(), t.boolean()]).optional().meta({ description: "Checkbox checked state" }),
|
|
106
105
|
disabled: t.union([t.string(), t.boolean()]).optional().meta({ description: "Whether the checkbox is disabled" }),
|
|
107
106
|
required: t.union([t.string(), t.boolean()]).optional().meta({ description: "Whether the checkbox must be checked" }),
|
|
108
107
|
size: t.enum(["xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Checkbox size" })
|
|
109
|
-
}).strict(),
|
|
108
|
+
}).strict(), mr = b.extend({
|
|
110
109
|
src: t.union(
|
|
111
110
|
[
|
|
112
111
|
t.url({ error: "Image source (src) must be a valid URL" }),
|
|
@@ -117,26 +116,26 @@ const b = t.object({
|
|
|
117
116
|
}
|
|
118
117
|
),
|
|
119
118
|
alt: t.string().optional().default("unknown image url").meta({ description: "Alternative text for the image" })
|
|
120
|
-
}).strict(),
|
|
119
|
+
}).strict(), hr = b.extend({
|
|
121
120
|
value: t.union([t.string(), t.number()], {
|
|
122
121
|
error: "OTP value is required"
|
|
123
122
|
}).meta({ description: "Current OTP value" }),
|
|
124
123
|
placeholder: t.string().optional().meta({ description: "Placeholder text for the OTP input" }),
|
|
125
124
|
disabled: t.union([t.string(), t.boolean()]).optional().meta({ description: "Whether the OTP input is disabled" }),
|
|
126
125
|
containerClassName: t.string().optional().meta({ description: "Custom CSS class for the OTP input container" })
|
|
127
|
-
}).strict(),
|
|
126
|
+
}).strict(), fr = b.extend({
|
|
128
127
|
value: t.union([t.string(), t.number()], {
|
|
129
128
|
error: "Input value is required"
|
|
130
129
|
}).meta({ description: "Current input value" }),
|
|
131
130
|
placeholder: t.string().optional().meta({ description: "Placeholder text shown when empty" }),
|
|
132
131
|
disabled: t.union([t.string(), t.boolean()]).optional().meta({ description: "Whether the input is disabled" })
|
|
133
|
-
}).strict(),
|
|
132
|
+
}).strict(), br = b.extend({
|
|
134
133
|
htmlFor: t.string().min(1, {
|
|
135
134
|
message: "Label 'for' attribute is required and must reference an input ID"
|
|
136
135
|
}).meta({ description: "ID of the associated input element" }),
|
|
137
136
|
size: t.enum(["xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Label text size" }),
|
|
138
137
|
variant: t.enum(["default", "underline", "destructive"]).optional().meta({ description: "Label style variant" })
|
|
139
|
-
}).strict(),
|
|
138
|
+
}).strict(), xr = b.extend({
|
|
140
139
|
checked: t.union([t.string(), t.boolean()], {
|
|
141
140
|
error: "Switch checked state is required"
|
|
142
141
|
}).meta({ description: "Current switch state" }),
|
|
@@ -144,7 +143,7 @@ const b = t.object({
|
|
|
144
143
|
required: t.union([t.string(), t.boolean()]).optional().meta({ description: "Whether the switch must be turned on" }),
|
|
145
144
|
size: t.enum(["sm", "md", "lg"]).optional().meta({ description: "Switch size" }),
|
|
146
145
|
rounded: t.enum(["none", "sm", "md", "lg", "full"]).optional().meta({ description: "Switch border radius" })
|
|
147
|
-
}).strict(),
|
|
146
|
+
}).strict(), vr = b.extend({
|
|
148
147
|
value: t.string({ error: "Textarea value is required" }).meta({ description: "Current textarea content" }),
|
|
149
148
|
placeholder: t.string().optional().meta({ description: "Placeholder text shown when empty" }),
|
|
150
149
|
disabled: t.union([t.string(), t.boolean()]).optional().meta({ description: "Whether the textarea is disabled" }),
|
|
@@ -152,57 +151,39 @@ const b = t.object({
|
|
|
152
151
|
rows: t.number().min(1, { message: "Minimum number of rows is 1" }).max(100, { message: "Maximum number of rows is 100" }).optional().meta({ description: "Number of visible text lines" }),
|
|
153
152
|
minLength: t.number().min(0, { message: "Minimum character length cannot be negative" }).optional().meta({ description: "Minimum number of characters allowed" }),
|
|
154
153
|
maxLength: t.number().max(1e4, { message: "Maximum character length cannot exceed 10,000" }).optional().meta({ description: "Maximum number of characters allowed" })
|
|
155
|
-
}).strict(),
|
|
154
|
+
}).strict(), yr = b.optional(), wr = b.optional(), Ar = b.extend({
|
|
156
155
|
align: t.enum(["inline-start", "inline-end", "block-start", "block-end"]).optional().meta({ description: "Alignment of the addon within the input group" })
|
|
157
|
-
}).optional(),
|
|
156
|
+
}).optional(), zr = b.extend({
|
|
158
157
|
value: t.union([t.string(), t.number()], {
|
|
159
158
|
error: "Input value is required"
|
|
160
159
|
}).meta({ description: "Current input value" }),
|
|
161
160
|
placeholder: t.string().optional().meta({ description: "Placeholder text shown when empty" }),
|
|
162
161
|
disabled: t.union([t.string(), t.boolean()]).optional().meta({ description: "Whether the input is disabled" })
|
|
163
|
-
}).strict(),
|
|
162
|
+
}).strict(), Tr = b.extend({
|
|
164
163
|
variant: t.enum(["default", "secondary", "outline", "destructive", "warning", "ghost"]).optional(),
|
|
165
164
|
size: t.enum(["xs", "sm", "md", "lg"]).optional()
|
|
166
|
-
}).optional(),
|
|
165
|
+
}).optional(), Ir = b.extend({
|
|
167
166
|
value: t.string({ error: "Textarea value is required" }).meta({ description: "Current textarea content" }),
|
|
168
167
|
placeholder: t.string().optional(),
|
|
169
168
|
disabled: t.union([t.string(), t.boolean()]).optional()
|
|
170
|
-
}).strict(),
|
|
169
|
+
}).strict(), Cr = b.extend({
|
|
171
170
|
value: t.string().nullable().meta({ description: "Current signature value (base64 or null if empty)" }),
|
|
172
171
|
canvasClassname: t.string().optional().meta({ description: "Custom CSS class for the signature canvas" }),
|
|
173
172
|
imageType: t.enum(["image/png", "image/jpeg", "image/webp"]).optional().meta({ description: "Image format for the exported signature" })
|
|
174
|
-
}).strict(),
|
|
173
|
+
}).strict(), kr = b.extend({
|
|
175
174
|
selected: t.union([t.string(), t.date(), t.array(t.date())], {
|
|
176
175
|
error: "Invalid calendar selection. Must be a date string, Date object, or array of dates"
|
|
177
176
|
}).optional().meta({ description: "Currently selected date(s)" }),
|
|
178
177
|
buttonVariant: t.enum(["default", "secondary", "outline", "destructive", "warning", "ghost"]).optional().meta({ description: "Variant for calendar navigation buttons" }),
|
|
179
178
|
hideWeekends: t.boolean().optional().meta({ description: "Whether to hide Saturday and Sunday columns" })
|
|
180
|
-
}).optional(),
|
|
181
|
-
pins: t.array(
|
|
182
|
-
t.object({
|
|
183
|
-
id: t.union([t.string(), t.number()]).meta({ description: "Unique pin identifier" }),
|
|
184
|
-
latitude: t.number({ error: "Pin latitude is required and must be a number" }).min(-90, { message: "Latitude must be between -90 and 90 degrees" }).max(90, { message: "Latitude must be between -90 and 90 degrees" }),
|
|
185
|
-
longitude: t.number({ error: "Pin longitude is required and must be a number" }).min(-180, {
|
|
186
|
-
message: "Longitude must be between -180 and 180 degrees"
|
|
187
|
-
}).max(180, {
|
|
188
|
-
message: "Longitude must be between -180 and 180 degrees"
|
|
189
|
-
}),
|
|
190
|
-
label: t.string().optional().meta({ description: "Optional pin label" })
|
|
191
|
-
})
|
|
192
|
-
).optional().meta({ description: "Array of map pins to display" }),
|
|
193
|
-
readonly: t.boolean().optional().meta({ description: "Whether the map is read-only" }),
|
|
194
|
-
fixed: t.boolean().optional().meta({ description: "Whether the map viewport is fixed (no pan/zoom)" }),
|
|
195
|
-
allowMultiple: t.boolean().optional().meta({ description: "Whether to allow multiple pins" }),
|
|
196
|
-
zoom: t.number().min(0).max(18).optional().meta({ description: "Initial zoom level" }),
|
|
197
|
-
pitch: t.number().optional().meta({ description: "Map pitch angle" })
|
|
198
|
-
}).optional(), Br = b.optional(), jr = b.optional(), Fr = b.optional(), $r = b.optional(), Hr = b.optional(), Gr = b.optional(), Wr = b.optional(), Mr = b.optional(), qr = b.extend({
|
|
179
|
+
}).optional(), Sr = b.optional(), Rr = b.optional(), _r = b.optional(), Nr = b.optional(), Er = b.optional(), Pr = b.optional(), Or = b.optional(), Dr = b.optional(), Lr = b.extend({
|
|
199
180
|
variant: t.enum(["default", "contained", "separated"]).optional().meta({ description: "Accordion style variant" }),
|
|
200
181
|
raised: t.enum(["xs", "sm", "md", "lg"]).optional().meta({ description: "Accordion shadow elevation" }),
|
|
201
182
|
extrude: t.enum(["xs", "sm", "md", "lg"]).optional().meta({ description: "Accordion extrude elevation" })
|
|
202
|
-
}).optional(),
|
|
183
|
+
}).optional(), Ur = b.optional(), Br = b.extend({
|
|
203
184
|
disabled: t.union([t.string(), t.boolean()]).optional().meta({ description: "Whether the accordion trigger is disabled" }),
|
|
204
185
|
icon: t.any().optional().meta({ description: "Custom icon component for the trigger" })
|
|
205
|
-
}).optional(),
|
|
186
|
+
}).optional(), jr = b.optional(), $r = b.extend({
|
|
206
187
|
src: t.string().optional().meta({ description: "Image source URL" }),
|
|
207
188
|
alt: t.string().optional().meta({ description: "Alternative text for the avatar image" }),
|
|
208
189
|
size: t.enum(["full", "sm", "md", "lg", "xl"]).optional().meta({ description: "Avatar size" }),
|
|
@@ -210,14 +191,14 @@ const b = t.object({
|
|
|
210
191
|
raised: t.enum(["xs", "sm", "md", "lg"]).optional().meta({ description: "Avatar shadow elevation" }),
|
|
211
192
|
fallback: t.string().optional().meta({ description: "Fallback text or element when image fails to load" }),
|
|
212
193
|
badge: t.any().optional().meta({ description: "Badge element to overlay on the avatar" })
|
|
213
|
-
}).optional(),
|
|
194
|
+
}).optional(), Hr = b.optional(), Fr = b.optional(), Gr = b.optional(), Wr = b.extend({
|
|
214
195
|
variant: t.enum(["spinner", "ping"]).optional().meta({ description: "Loader animation variant" }),
|
|
215
196
|
fill: t.enum(["default", "destructive", "warning", "pending"]).optional().meta({ description: "Loader fill color" }),
|
|
216
197
|
size: t.enum(["sm", "md", "lg"]).optional().meta({ description: "Loader size" }),
|
|
217
198
|
icon: t.any().optional().meta({ description: "Custom spinner icon component" }),
|
|
218
199
|
pingIcon: t.any().optional().meta({ description: "Custom ping icon component" }),
|
|
219
200
|
iconProps: t.any().optional().meta({ description: "Props to pass to the icon components" })
|
|
220
|
-
}).optional(),
|
|
201
|
+
}).optional(), Vr = b.extend({
|
|
221
202
|
mode: t.enum(["single", "multiple"]).optional().meta({ description: "Progress display mode" }),
|
|
222
203
|
value: t.union([
|
|
223
204
|
t.number().nullable(),
|
|
@@ -231,177 +212,174 @@ const b = t.object({
|
|
|
231
212
|
size: t.enum(["xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Progress size" }),
|
|
232
213
|
raised: t.enum(["default", "xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Progress shadow elevation" }),
|
|
233
214
|
stacked: t.enum(["default", "xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Progress stacked spacing" })
|
|
234
|
-
}).optional(),
|
|
215
|
+
}).optional(), qr = b.extend({
|
|
235
216
|
variant: t.enum(["circle", "square", "default", "text"]).optional().meta({ description: "Skeleton shape variant" }),
|
|
236
217
|
animate: t.boolean().optional().meta({ description: "Whether to animate the skeleton" })
|
|
237
|
-
}).optional(),
|
|
238
|
-
children: t.array(
|
|
239
|
-
}),
|
|
240
|
-
type: t.literal(
|
|
241
|
-
args:
|
|
242
|
-
}).meta({ description: "Container div element for grouping content" }),
|
|
243
|
-
type: t.literal(
|
|
218
|
+
}).optional(), Mr = t.lazy(() => t.union([t.string(), Yr])), f = t.object({
|
|
219
|
+
children: t.array(Mr).optional().meta({ description: "Child nodes to render inside this element" })
|
|
220
|
+
}), Be = f.extend({
|
|
221
|
+
type: t.literal(s.DIV),
|
|
222
|
+
args: Qa
|
|
223
|
+
}).meta({ description: "Container div element for grouping content" }), je = f.extend({
|
|
224
|
+
type: t.literal(s.A),
|
|
225
|
+
args: Ma
|
|
226
|
+
}).meta({ description: "Anchor/link element" }), $e = f.extend({
|
|
227
|
+
type: t.literal(s.H),
|
|
228
|
+
args: Ja
|
|
229
|
+
}).meta({ description: "Heading element (h1-h6)" }), He = f.extend({
|
|
230
|
+
type: t.literal(s.P),
|
|
231
|
+
args: Xa
|
|
232
|
+
}).meta({ description: "Paragraph text element" }), Fe = f.extend({
|
|
233
|
+
type: t.literal(s.OL),
|
|
234
|
+
args: Ka
|
|
235
|
+
}).meta({ description: "Ordered list element" }), Ge = f.extend({
|
|
236
|
+
type: t.literal(s.UL),
|
|
237
|
+
args: Ya
|
|
238
|
+
}).meta({ description: "Unordered list element" }), We = f.extend({
|
|
239
|
+
type: t.literal(s.LI),
|
|
240
|
+
args: Za
|
|
241
|
+
}).meta({ description: "List item element" }), Ve = f.extend({
|
|
242
|
+
type: t.literal(s.SPAN),
|
|
243
|
+
args: er
|
|
244
|
+
}).meta({ description: "Inline span element" }), qe = f.extend({
|
|
245
|
+
type: t.literal(s.SEPARATOR),
|
|
246
|
+
args: tr
|
|
247
|
+
}).meta({ description: "Horizontal separator / divider element" }), Me = f.extend({
|
|
248
|
+
type: t.literal(s.ALERT),
|
|
244
249
|
args: ar
|
|
245
|
-
}).meta({ description: "
|
|
246
|
-
type: t.literal(
|
|
250
|
+
}).meta({ description: "Alert message box" }), Je = f.extend({
|
|
251
|
+
type: t.literal(s.BADGE),
|
|
247
252
|
args: rr
|
|
248
|
-
}).meta({ description: "
|
|
249
|
-
type: t.literal(
|
|
253
|
+
}).meta({ description: "Badge/status indicator" }), Xe = f.extend({
|
|
254
|
+
type: t.literal(s.BUTTON),
|
|
250
255
|
args: nr
|
|
251
|
-
}).meta({ description: "
|
|
252
|
-
type: t.literal(
|
|
256
|
+
}).meta({ description: "Clickable button element" }), Ke = f.extend({
|
|
257
|
+
type: t.literal(s.CARD),
|
|
253
258
|
args: or
|
|
254
|
-
}).meta({ description: "Ordered list element" }), He = f.extend({
|
|
255
|
-
type: t.literal(i.UL),
|
|
256
|
-
args: ir
|
|
257
|
-
}).meta({ description: "Unordered list element" }), Ge = f.extend({
|
|
258
|
-
type: t.literal(i.LI),
|
|
259
|
-
args: sr
|
|
260
|
-
}).meta({ description: "List item element" }), We = f.extend({
|
|
261
|
-
type: t.literal(i.SPAN),
|
|
262
|
-
args: lr
|
|
263
|
-
}).meta({ description: "Inline span element" }), Me = f.extend({
|
|
264
|
-
type: t.literal(i.SEPARATOR),
|
|
265
|
-
args: cr
|
|
266
|
-
}).meta({ description: "Horizontal separator / divider element" }), qe = f.extend({
|
|
267
|
-
type: t.literal(i.ALERT),
|
|
268
|
-
args: ur
|
|
269
|
-
}).meta({ description: "Alert message box" }), Ve = f.extend({
|
|
270
|
-
type: t.literal(i.BADGE),
|
|
271
|
-
args: pr
|
|
272
|
-
}).meta({ description: "Badge/status indicator" }), Xe = f.extend({
|
|
273
|
-
type: t.literal(i.BUTTON),
|
|
274
|
-
args: mr
|
|
275
|
-
}).meta({ description: "Clickable button element" }), Je = f.extend({
|
|
276
|
-
type: t.literal(i.CARD),
|
|
277
|
-
args: gr
|
|
278
259
|
}).meta({ description: "Card container element" }), Ye = f.extend({
|
|
279
|
-
type: t.literal(
|
|
280
|
-
args:
|
|
281
|
-
}).meta({ description: "Checkbox input element" }),
|
|
282
|
-
type: t.literal(
|
|
283
|
-
args:
|
|
284
|
-
}).meta({ description: "Image element" }),
|
|
285
|
-
type: t.literal(
|
|
286
|
-
args: Ir
|
|
287
|
-
}).meta({ description: "One-time password (OTP) input" }), Qe = f.extend({
|
|
288
|
-
type: t.literal(i.INPUT),
|
|
289
|
-
args: Tr
|
|
290
|
-
}).meta({ description: "Text input element" }), et = f.extend({
|
|
291
|
-
type: t.literal(i.LABEL),
|
|
292
|
-
args: Cr
|
|
293
|
-
}).meta({ description: "Form label element" }), tt = f.extend({
|
|
294
|
-
type: t.literal(i.SWITCH),
|
|
295
|
-
args: kr
|
|
296
|
-
}).meta({ description: "Toggle switch element" }), at = f.extend({
|
|
297
|
-
type: t.literal(i.TEXTAREA),
|
|
298
|
-
args: Sr
|
|
299
|
-
}).meta({ description: "Multi-line text input" }), rt = f.extend({
|
|
300
|
-
type: t.literal(i.SIGNATURE),
|
|
301
|
-
args: Or
|
|
302
|
-
}).meta({ description: "Signature pad input" }), nt = f.extend({
|
|
303
|
-
type: t.literal(i.CALENDAR),
|
|
304
|
-
args: Lr
|
|
305
|
-
}).meta({ description: "Date picker calendar" }), ot = f.extend({
|
|
306
|
-
type: t.literal(i.MAP),
|
|
307
|
-
args: Ur
|
|
308
|
-
}).meta({ description: "Interactive map element" }), it = f.extend({
|
|
309
|
-
type: t.literal(i.CARD_HEADER),
|
|
260
|
+
type: t.literal(s.CHECKBOX),
|
|
261
|
+
args: gr
|
|
262
|
+
}).meta({ description: "Checkbox input element" }), Ze = f.extend({
|
|
263
|
+
type: t.literal(s.IMAGE),
|
|
264
|
+
args: mr
|
|
265
|
+
}).meta({ description: "Image element" }), Qe = f.extend({
|
|
266
|
+
type: t.literal(s.OTP),
|
|
310
267
|
args: hr
|
|
311
|
-
}).meta({ description: "
|
|
312
|
-
type: t.literal(
|
|
268
|
+
}).meta({ description: "One-time password (OTP) input" }), et = f.extend({
|
|
269
|
+
type: t.literal(s.INPUT),
|
|
313
270
|
args: fr
|
|
314
|
-
}).meta({ description: "
|
|
315
|
-
type: t.literal(
|
|
271
|
+
}).meta({ description: "Text input element" }), tt = f.extend({
|
|
272
|
+
type: t.literal(s.LABEL),
|
|
316
273
|
args: br
|
|
317
|
-
}).meta({ description: "
|
|
318
|
-
type: t.literal(
|
|
274
|
+
}).meta({ description: "Form label element" }), at = f.extend({
|
|
275
|
+
type: t.literal(s.SWITCH),
|
|
319
276
|
args: xr
|
|
320
|
-
}).meta({ description: "
|
|
321
|
-
type: t.literal(
|
|
277
|
+
}).meta({ description: "Toggle switch element" }), rt = f.extend({
|
|
278
|
+
type: t.literal(s.TEXTAREA),
|
|
322
279
|
args: vr
|
|
280
|
+
}).meta({ description: "Multi-line text input" }), nt = f.extend({
|
|
281
|
+
type: t.literal(s.SIGNATURE),
|
|
282
|
+
args: Cr
|
|
283
|
+
}).meta({ description: "Signature pad input" }), ot = f.extend({
|
|
284
|
+
type: t.literal(s.CALENDAR),
|
|
285
|
+
args: kr
|
|
286
|
+
}).meta({ description: "Date picker calendar" }), st = f.extend({
|
|
287
|
+
type: t.literal(s.CARD_HEADER),
|
|
288
|
+
args: sr
|
|
289
|
+
}).meta({ description: "Card header container" }), it = f.extend({
|
|
290
|
+
type: t.literal(s.CARD_TITLE),
|
|
291
|
+
args: ir
|
|
292
|
+
}).meta({ description: "Card title element" }), dt = f.extend({
|
|
293
|
+
type: t.literal(s.CARD_DESCRIPTION),
|
|
294
|
+
args: dr
|
|
295
|
+
}).meta({ description: "Card description element" }), lt = f.extend({
|
|
296
|
+
type: t.literal(s.CARD_CONTENT),
|
|
297
|
+
args: lr
|
|
298
|
+
}).meta({ description: "Card content body" }), ct = f.extend({
|
|
299
|
+
type: t.literal(s.CARD_FOOTER),
|
|
300
|
+
args: cr
|
|
323
301
|
}).meta({ description: "Card footer container" }), ut = f.extend({
|
|
324
|
-
type: t.literal(
|
|
325
|
-
args:
|
|
302
|
+
type: t.literal(s.CARD_ACTION),
|
|
303
|
+
args: ur
|
|
326
304
|
}).meta({ description: "Card action slot" }), pt = f.extend({
|
|
327
|
-
type: t.literal(
|
|
328
|
-
args:
|
|
329
|
-
}).meta({ description: "Card icon slot" }),
|
|
330
|
-
type: t.literal(
|
|
331
|
-
args:
|
|
332
|
-
}).meta({ description: "Table container" }),
|
|
333
|
-
type: t.literal(
|
|
334
|
-
args:
|
|
305
|
+
type: t.literal(s.CARD_ICON),
|
|
306
|
+
args: pr
|
|
307
|
+
}).meta({ description: "Card icon slot" }), gt = f.extend({
|
|
308
|
+
type: t.literal(s.TABLE),
|
|
309
|
+
args: Sr
|
|
310
|
+
}).meta({ description: "Table container" }), mt = f.extend({
|
|
311
|
+
type: t.literal(s.TABLE_HEADER),
|
|
312
|
+
args: Rr
|
|
335
313
|
}).meta({ description: "Table header section" }), ht = f.extend({
|
|
336
|
-
type: t.literal(
|
|
337
|
-
args:
|
|
314
|
+
type: t.literal(s.TABLE_BODY),
|
|
315
|
+
args: _r
|
|
338
316
|
}).meta({ description: "Table body section" }), ft = f.extend({
|
|
339
|
-
type: t.literal(
|
|
340
|
-
args:
|
|
317
|
+
type: t.literal(s.TABLE_FOOTER),
|
|
318
|
+
args: Nr
|
|
341
319
|
}).meta({ description: "Table footer section" }), bt = f.extend({
|
|
342
|
-
type: t.literal(
|
|
343
|
-
args:
|
|
320
|
+
type: t.literal(s.TABLE_HEAD),
|
|
321
|
+
args: Er
|
|
344
322
|
}).meta({ description: "Table header cell" }), xt = f.extend({
|
|
345
|
-
type: t.literal(
|
|
346
|
-
args:
|
|
323
|
+
type: t.literal(s.TABLE_ROW),
|
|
324
|
+
args: Pr
|
|
347
325
|
}).meta({ description: "Table row" }), vt = f.extend({
|
|
348
|
-
type: t.literal(
|
|
349
|
-
args:
|
|
326
|
+
type: t.literal(s.TABLE_CELL),
|
|
327
|
+
args: Or
|
|
350
328
|
}).meta({ description: "Table data cell" }), yt = f.extend({
|
|
351
|
-
type: t.literal(
|
|
352
|
-
args:
|
|
329
|
+
type: t.literal(s.TABLE_CAPTION),
|
|
330
|
+
args: Dr
|
|
353
331
|
}).meta({ description: "Table caption" }), wt = f.extend({
|
|
354
|
-
type: t.literal(
|
|
355
|
-
args:
|
|
332
|
+
type: t.literal(s.ACCORDION),
|
|
333
|
+
args: Lr
|
|
356
334
|
}).meta({ description: "Accordion container" }), At = f.extend({
|
|
357
|
-
type: t.literal(
|
|
358
|
-
args:
|
|
335
|
+
type: t.literal(s.ACCORDION_ITEM),
|
|
336
|
+
args: Ur
|
|
359
337
|
}).meta({ description: "Accordion item" }), zt = f.extend({
|
|
360
|
-
type: t.literal(
|
|
361
|
-
args:
|
|
362
|
-
}).meta({ description: "Accordion trigger" }),
|
|
363
|
-
type: t.literal(
|
|
364
|
-
args:
|
|
365
|
-
}).meta({ description: "Accordion content panel" }),
|
|
366
|
-
type: t.literal(
|
|
367
|
-
args:
|
|
338
|
+
type: t.literal(s.ACCORDION_TRIGGER),
|
|
339
|
+
args: Br
|
|
340
|
+
}).meta({ description: "Accordion trigger" }), Tt = f.extend({
|
|
341
|
+
type: t.literal(s.ACCORDION_CONTENT),
|
|
342
|
+
args: jr
|
|
343
|
+
}).meta({ description: "Accordion content panel" }), It = f.extend({
|
|
344
|
+
type: t.literal(s.AVATAR),
|
|
345
|
+
args: $r
|
|
368
346
|
}).meta({ description: "Avatar image or fallback" }), Ct = f.extend({
|
|
369
|
-
type: t.literal(
|
|
370
|
-
args:
|
|
347
|
+
type: t.literal(s.COLLAPSIBLE),
|
|
348
|
+
args: Hr
|
|
371
349
|
}).meta({ description: "Collapsible container" }), kt = f.extend({
|
|
372
|
-
type: t.literal(
|
|
373
|
-
args:
|
|
350
|
+
type: t.literal(s.COLLAPSIBLE_TRIGGER),
|
|
351
|
+
args: Fr
|
|
374
352
|
}).meta({ description: "Collapsible trigger" }), St = f.extend({
|
|
375
|
-
type: t.literal(
|
|
376
|
-
args:
|
|
353
|
+
type: t.literal(s.COLLAPSIBLE_CONTENT),
|
|
354
|
+
args: Gr
|
|
377
355
|
}).meta({ description: "Collapsible content panel" }), Rt = f.extend({
|
|
378
|
-
type: t.literal(
|
|
379
|
-
args:
|
|
356
|
+
type: t.literal(s.LOADER),
|
|
357
|
+
args: Wr
|
|
380
358
|
}).meta({ description: "Loading spinner indicator" }), _t = f.extend({
|
|
381
|
-
type: t.literal(
|
|
382
|
-
args:
|
|
359
|
+
type: t.literal(s.PROGRESS),
|
|
360
|
+
args: Vr
|
|
383
361
|
}).meta({ description: "Progress bar indicator" }), Nt = f.extend({
|
|
384
|
-
type: t.literal(
|
|
385
|
-
args:
|
|
386
|
-
}).meta({ description: "Skeleton loading placeholder" }),
|
|
387
|
-
type: t.literal(
|
|
388
|
-
args:
|
|
389
|
-
}).meta({ description: "Input group container" }),
|
|
390
|
-
type: t.literal(
|
|
391
|
-
args:
|
|
392
|
-
}).meta({ description: "Text element within input group" }),
|
|
393
|
-
type: t.literal(
|
|
394
|
-
args:
|
|
395
|
-
}).meta({ description: "Addon container within input group" }),
|
|
396
|
-
type: t.literal(
|
|
397
|
-
args:
|
|
362
|
+
type: t.literal(s.SKELETON),
|
|
363
|
+
args: qr
|
|
364
|
+
}).meta({ description: "Skeleton loading placeholder" }), Et = f.extend({
|
|
365
|
+
type: t.literal(s.INPUT_GROUP),
|
|
366
|
+
args: yr
|
|
367
|
+
}).meta({ description: "Input group container" }), Pt = f.extend({
|
|
368
|
+
type: t.literal(s.INPUT_GROUP_TEXT),
|
|
369
|
+
args: wr
|
|
370
|
+
}).meta({ description: "Text element within input group" }), Ot = f.extend({
|
|
371
|
+
type: t.literal(s.INPUT_GROUP_ADDON),
|
|
372
|
+
args: Ar
|
|
373
|
+
}).meta({ description: "Addon container within input group" }), Dt = f.extend({
|
|
374
|
+
type: t.literal(s.INPUT_GROUP_INPUT),
|
|
375
|
+
args: zr
|
|
398
376
|
}).meta({ description: "Input element within input group" }), Lt = f.extend({
|
|
399
|
-
type: t.literal(
|
|
400
|
-
args:
|
|
377
|
+
type: t.literal(s.INPUT_GROUP_BUTTON),
|
|
378
|
+
args: Tr
|
|
401
379
|
}).meta({ description: "Button element within input group" }), Ut = f.extend({
|
|
402
|
-
type: t.literal(
|
|
403
|
-
args:
|
|
404
|
-
}).meta({ description: "Textarea element within input group" }),
|
|
380
|
+
type: t.literal(s.INPUT_GROUP_TEXTAREA),
|
|
381
|
+
args: Ir
|
|
382
|
+
}).meta({ description: "Textarea element within input group" }), Jr = t.object({
|
|
405
383
|
items: t.string({ error: "each.items is required" }).min(1, { message: "each.items cannot be empty" }).meta({
|
|
406
384
|
description: 'Binding path to the array to iterate, e.g. "{{applicants}}". Must be a plain path (not a computed/filtered expression) so each row maps back to a real store index for two-way binding.'
|
|
407
385
|
}),
|
|
@@ -411,29 +389,29 @@ const b = t.object({
|
|
|
411
389
|
description: 'Binding expression used as the React key per row, e.g. "{{applicant.id}}". Falls back to the row index when omitted.'
|
|
412
390
|
})
|
|
413
391
|
}).strict(), Bt = f.extend({
|
|
414
|
-
type: t.literal(
|
|
415
|
-
args:
|
|
416
|
-
}).meta({ description: "Repeats its children once per item in a bound array" }),
|
|
392
|
+
type: t.literal(s.EACH),
|
|
393
|
+
args: Jr
|
|
394
|
+
}).meta({ description: "Repeats its children once per item in a bound array" }), Xr = t.object({
|
|
417
395
|
condition: t.string({ error: "if.condition is required" }).min(1, { message: "if.condition cannot be empty" }).meta({ description: "Binding expression; children render only when it evaluates truthy" })
|
|
418
396
|
}).strict(), jt = f.extend({
|
|
419
|
-
type: t.literal(
|
|
420
|
-
args:
|
|
397
|
+
type: t.literal(s.IF),
|
|
398
|
+
args: Xr
|
|
421
399
|
}).meta({ description: "Conditionally renders its children based on a bound expression" });
|
|
422
|
-
function
|
|
400
|
+
function m(e) {
|
|
423
401
|
return e.shape.args;
|
|
424
402
|
}
|
|
425
403
|
function h(e) {
|
|
426
404
|
return e.meta()?.description;
|
|
427
405
|
}
|
|
428
|
-
function
|
|
406
|
+
function Kr(e) {
|
|
429
407
|
if (Object.keys(e).length === 0)
|
|
430
408
|
throw new Error("createTemplateSchema: registry must declare at least one component");
|
|
431
409
|
let a;
|
|
432
410
|
const r = t.lazy(() => t.union([t.string(), a])), n = t.object({
|
|
433
411
|
children: t.array(r).optional().meta({ description: "Child nodes to render inside this element" })
|
|
434
|
-
}), o = Object.entries(e).map(([
|
|
412
|
+
}), o = Object.entries(e).map(([i, { argsSchema: l, description: u }]) => {
|
|
435
413
|
const p = n.extend({
|
|
436
|
-
type: t.literal(
|
|
414
|
+
type: t.literal(i),
|
|
437
415
|
args: l
|
|
438
416
|
});
|
|
439
417
|
return u ? p.meta({ description: u }) : p;
|
|
@@ -443,169 +421,168 @@ function sn(e) {
|
|
|
443
421
|
o
|
|
444
422
|
), { Node: r, ComponentNode: a };
|
|
445
423
|
}
|
|
446
|
-
const
|
|
447
|
-
[
|
|
448
|
-
[
|
|
449
|
-
[
|
|
450
|
-
[
|
|
451
|
-
[
|
|
452
|
-
[
|
|
453
|
-
[
|
|
454
|
-
[
|
|
455
|
-
[
|
|
456
|
-
argsSchema:
|
|
457
|
-
description: h(
|
|
458
|
-
},
|
|
459
|
-
[i.ALERT]: { argsSchema: g(qe), description: h(qe) },
|
|
460
|
-
[i.BADGE]: { argsSchema: g(Ve), description: h(Ve) },
|
|
461
|
-
[i.BUTTON]: { argsSchema: g(Xe), description: h(Xe) },
|
|
462
|
-
[i.CARD]: { argsSchema: g(Je), description: h(Je) },
|
|
463
|
-
[i.CARD_HEADER]: {
|
|
464
|
-
argsSchema: g(it),
|
|
465
|
-
description: h(it)
|
|
424
|
+
const ra = {
|
|
425
|
+
[s.DIV]: { argsSchema: m(Be), description: h(Be) },
|
|
426
|
+
[s.A]: { argsSchema: m(je), description: h(je) },
|
|
427
|
+
[s.H]: { argsSchema: m($e), description: h($e) },
|
|
428
|
+
[s.P]: { argsSchema: m(He), description: h(He) },
|
|
429
|
+
[s.OL]: { argsSchema: m(Fe), description: h(Fe) },
|
|
430
|
+
[s.UL]: { argsSchema: m(Ge), description: h(Ge) },
|
|
431
|
+
[s.LI]: { argsSchema: m(We), description: h(We) },
|
|
432
|
+
[s.SPAN]: { argsSchema: m(Ve), description: h(Ve) },
|
|
433
|
+
[s.SEPARATOR]: {
|
|
434
|
+
argsSchema: m(qe),
|
|
435
|
+
description: h(qe)
|
|
466
436
|
},
|
|
467
|
-
[
|
|
468
|
-
|
|
437
|
+
[s.ALERT]: { argsSchema: m(Me), description: h(Me) },
|
|
438
|
+
[s.BADGE]: { argsSchema: m(Je), description: h(Je) },
|
|
439
|
+
[s.BUTTON]: { argsSchema: m(Xe), description: h(Xe) },
|
|
440
|
+
[s.CARD]: { argsSchema: m(Ke), description: h(Ke) },
|
|
441
|
+
[s.CARD_HEADER]: {
|
|
442
|
+
argsSchema: m(st),
|
|
469
443
|
description: h(st)
|
|
470
444
|
},
|
|
471
|
-
[
|
|
472
|
-
argsSchema:
|
|
445
|
+
[s.CARD_TITLE]: {
|
|
446
|
+
argsSchema: m(it),
|
|
447
|
+
description: h(it)
|
|
448
|
+
},
|
|
449
|
+
[s.CARD_DESCRIPTION]: {
|
|
450
|
+
argsSchema: m(dt),
|
|
473
451
|
description: h(dt)
|
|
474
452
|
},
|
|
475
|
-
[
|
|
476
|
-
argsSchema:
|
|
453
|
+
[s.CARD_CONTENT]: {
|
|
454
|
+
argsSchema: m(lt),
|
|
477
455
|
description: h(lt)
|
|
478
456
|
},
|
|
479
|
-
[
|
|
480
|
-
argsSchema:
|
|
457
|
+
[s.CARD_FOOTER]: {
|
|
458
|
+
argsSchema: m(ct),
|
|
481
459
|
description: h(ct)
|
|
482
460
|
},
|
|
483
|
-
[
|
|
484
|
-
argsSchema:
|
|
461
|
+
[s.CARD_ACTION]: {
|
|
462
|
+
argsSchema: m(ut),
|
|
485
463
|
description: h(ut)
|
|
486
464
|
},
|
|
487
|
-
[
|
|
488
|
-
argsSchema:
|
|
465
|
+
[s.CARD_ICON]: {
|
|
466
|
+
argsSchema: m(pt),
|
|
489
467
|
description: h(pt)
|
|
490
468
|
},
|
|
491
|
-
[
|
|
492
|
-
argsSchema:
|
|
469
|
+
[s.CHECKBOX]: {
|
|
470
|
+
argsSchema: m(Ye),
|
|
493
471
|
description: h(Ye)
|
|
494
472
|
},
|
|
495
|
-
[
|
|
496
|
-
[
|
|
497
|
-
[
|
|
498
|
-
[
|
|
499
|
-
[
|
|
500
|
-
[
|
|
501
|
-
argsSchema:
|
|
502
|
-
description: h(at)
|
|
503
|
-
},
|
|
504
|
-
[i.SIGNATURE]: {
|
|
505
|
-
argsSchema: g(rt),
|
|
473
|
+
[s.IMAGE]: { argsSchema: m(Ze), description: h(Ze) },
|
|
474
|
+
[s.OTP]: { argsSchema: m(Qe), description: h(Qe) },
|
|
475
|
+
[s.INPUT]: { argsSchema: m(et), description: h(et) },
|
|
476
|
+
[s.LABEL]: { argsSchema: m(tt), description: h(tt) },
|
|
477
|
+
[s.SWITCH]: { argsSchema: m(at), description: h(at) },
|
|
478
|
+
[s.TEXTAREA]: {
|
|
479
|
+
argsSchema: m(rt),
|
|
506
480
|
description: h(rt)
|
|
507
481
|
},
|
|
508
|
-
[
|
|
509
|
-
argsSchema:
|
|
482
|
+
[s.SIGNATURE]: {
|
|
483
|
+
argsSchema: m(nt),
|
|
510
484
|
description: h(nt)
|
|
511
485
|
},
|
|
512
|
-
[
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
486
|
+
[s.CALENDAR]: {
|
|
487
|
+
argsSchema: m(ot),
|
|
488
|
+
description: h(ot)
|
|
489
|
+
},
|
|
490
|
+
[s.TABLE]: { argsSchema: m(gt), description: h(gt) },
|
|
491
|
+
[s.TABLE_HEADER]: {
|
|
492
|
+
argsSchema: m(mt),
|
|
493
|
+
description: h(mt)
|
|
517
494
|
},
|
|
518
|
-
[
|
|
519
|
-
argsSchema:
|
|
495
|
+
[s.TABLE_BODY]: {
|
|
496
|
+
argsSchema: m(ht),
|
|
520
497
|
description: h(ht)
|
|
521
498
|
},
|
|
522
|
-
[
|
|
523
|
-
argsSchema:
|
|
499
|
+
[s.TABLE_FOOTER]: {
|
|
500
|
+
argsSchema: m(ft),
|
|
524
501
|
description: h(ft)
|
|
525
502
|
},
|
|
526
|
-
[
|
|
527
|
-
argsSchema:
|
|
503
|
+
[s.TABLE_HEAD]: {
|
|
504
|
+
argsSchema: m(bt),
|
|
528
505
|
description: h(bt)
|
|
529
506
|
},
|
|
530
|
-
[
|
|
531
|
-
argsSchema:
|
|
507
|
+
[s.TABLE_ROW]: {
|
|
508
|
+
argsSchema: m(xt),
|
|
532
509
|
description: h(xt)
|
|
533
510
|
},
|
|
534
|
-
[
|
|
535
|
-
argsSchema:
|
|
511
|
+
[s.TABLE_CELL]: {
|
|
512
|
+
argsSchema: m(vt),
|
|
536
513
|
description: h(vt)
|
|
537
514
|
},
|
|
538
|
-
[
|
|
539
|
-
argsSchema:
|
|
515
|
+
[s.TABLE_CAPTION]: {
|
|
516
|
+
argsSchema: m(yt),
|
|
540
517
|
description: h(yt)
|
|
541
518
|
},
|
|
542
|
-
[
|
|
543
|
-
argsSchema:
|
|
519
|
+
[s.ACCORDION]: {
|
|
520
|
+
argsSchema: m(wt),
|
|
544
521
|
description: h(wt)
|
|
545
522
|
},
|
|
546
|
-
[
|
|
547
|
-
argsSchema:
|
|
523
|
+
[s.ACCORDION_ITEM]: {
|
|
524
|
+
argsSchema: m(At),
|
|
548
525
|
description: h(At)
|
|
549
526
|
},
|
|
550
|
-
[
|
|
551
|
-
argsSchema:
|
|
527
|
+
[s.ACCORDION_TRIGGER]: {
|
|
528
|
+
argsSchema: m(zt),
|
|
552
529
|
description: h(zt)
|
|
553
530
|
},
|
|
554
|
-
[
|
|
555
|
-
argsSchema:
|
|
556
|
-
description: h(
|
|
531
|
+
[s.ACCORDION_CONTENT]: {
|
|
532
|
+
argsSchema: m(Tt),
|
|
533
|
+
description: h(Tt)
|
|
557
534
|
},
|
|
558
|
-
[
|
|
559
|
-
[
|
|
560
|
-
argsSchema:
|
|
535
|
+
[s.AVATAR]: { argsSchema: m(It), description: h(It) },
|
|
536
|
+
[s.COLLAPSIBLE]: {
|
|
537
|
+
argsSchema: m(Ct),
|
|
561
538
|
description: h(Ct)
|
|
562
539
|
},
|
|
563
|
-
[
|
|
564
|
-
argsSchema:
|
|
540
|
+
[s.COLLAPSIBLE_TRIGGER]: {
|
|
541
|
+
argsSchema: m(kt),
|
|
565
542
|
description: h(kt)
|
|
566
543
|
},
|
|
567
|
-
[
|
|
568
|
-
argsSchema:
|
|
544
|
+
[s.COLLAPSIBLE_CONTENT]: {
|
|
545
|
+
argsSchema: m(St),
|
|
569
546
|
description: h(St)
|
|
570
547
|
},
|
|
571
|
-
[
|
|
572
|
-
[
|
|
573
|
-
argsSchema:
|
|
548
|
+
[s.LOADER]: { argsSchema: m(Rt), description: h(Rt) },
|
|
549
|
+
[s.PROGRESS]: {
|
|
550
|
+
argsSchema: m(_t),
|
|
574
551
|
description: h(_t)
|
|
575
552
|
},
|
|
576
|
-
[
|
|
577
|
-
argsSchema:
|
|
553
|
+
[s.SKELETON]: {
|
|
554
|
+
argsSchema: m(Nt),
|
|
578
555
|
description: h(Nt)
|
|
579
556
|
},
|
|
580
|
-
[
|
|
581
|
-
argsSchema:
|
|
582
|
-
description: h(Pt)
|
|
583
|
-
},
|
|
584
|
-
[i.INPUT_GROUP_TEXT]: {
|
|
585
|
-
argsSchema: g(Et),
|
|
557
|
+
[s.INPUT_GROUP]: {
|
|
558
|
+
argsSchema: m(Et),
|
|
586
559
|
description: h(Et)
|
|
587
560
|
},
|
|
588
|
-
[
|
|
589
|
-
argsSchema:
|
|
590
|
-
description: h(
|
|
561
|
+
[s.INPUT_GROUP_TEXT]: {
|
|
562
|
+
argsSchema: m(Pt),
|
|
563
|
+
description: h(Pt)
|
|
591
564
|
},
|
|
592
|
-
[
|
|
593
|
-
argsSchema:
|
|
565
|
+
[s.INPUT_GROUP_ADDON]: {
|
|
566
|
+
argsSchema: m(Ot),
|
|
594
567
|
description: h(Ot)
|
|
595
568
|
},
|
|
596
|
-
[
|
|
597
|
-
argsSchema:
|
|
569
|
+
[s.INPUT_GROUP_INPUT]: {
|
|
570
|
+
argsSchema: m(Dt),
|
|
571
|
+
description: h(Dt)
|
|
572
|
+
},
|
|
573
|
+
[s.INPUT_GROUP_BUTTON]: {
|
|
574
|
+
argsSchema: m(Lt),
|
|
598
575
|
description: h(Lt)
|
|
599
576
|
},
|
|
600
|
-
[
|
|
601
|
-
argsSchema:
|
|
577
|
+
[s.INPUT_GROUP_TEXTAREA]: {
|
|
578
|
+
argsSchema: m(Ut),
|
|
602
579
|
description: h(Ut)
|
|
603
580
|
},
|
|
604
|
-
[
|
|
605
|
-
[
|
|
606
|
-
},
|
|
581
|
+
[s.EACH]: { argsSchema: m(Bt), description: h(Bt) },
|
|
582
|
+
[s.IF]: { argsSchema: m(jt), description: h(jt) }
|
|
583
|
+
}, na = Kr(ra), Yr = na.ComponentNode, B = na.Node;
|
|
607
584
|
t.object({
|
|
608
|
-
_id:
|
|
585
|
+
_id: A.meta({ readOnly: !0 }),
|
|
609
586
|
email: t.string().email().meta({
|
|
610
587
|
description: "User's email address (used as the primary identifier)",
|
|
611
588
|
example: "jack@datahaven.net",
|
|
@@ -614,8 +591,8 @@ t.object({
|
|
|
614
591
|
name: t.string().min(1).max(100).meta({ description: "Full display name", example: "Razor Jack" }),
|
|
615
592
|
emailVerified: t.boolean().nullable().optional().meta({ description: "Whether the user's email has been verified" }),
|
|
616
593
|
image: t.string().optional().meta({ description: "Avatar image URL", example: "https://cdn.datahaven.net/avatars/rj7741.png" }),
|
|
617
|
-
createdAt:
|
|
618
|
-
updatedAt:
|
|
594
|
+
createdAt: I.optional().meta({ description: "When the user account was created", readOnly: !0 }),
|
|
595
|
+
updatedAt: I.optional().meta({ description: "When the user account was last updated", readOnly: !0 })
|
|
619
596
|
}).strict().meta({
|
|
620
597
|
description: "An authenticated user account. Users are distinct from organization memberships — a user may belong to multiple organizations."
|
|
621
598
|
});
|
|
@@ -624,7 +601,7 @@ t.object({
|
|
|
624
601
|
image: t.string().optional().meta({ description: "Updated avatar URL", example: "https://cdn.datahaven.net/avatars/cj7741.png" })
|
|
625
602
|
}).strict().meta({ description: "Update the authenticated user's profile" });
|
|
626
603
|
t.object({
|
|
627
|
-
_id:
|
|
604
|
+
_id: A.meta({ readOnly: !0 }),
|
|
628
605
|
clientId: t.string().min(1).meta({ description: "Unique client identifier for the organization", example: "pb-org-7f3a2b9c", readOnly: !0 }),
|
|
629
606
|
name: t.string().min(3).max(50).meta({ description: "Unique organization slug/identifier", example: "neon-shadow" }),
|
|
630
607
|
displayName: t.string().min(3).max(50).meta({ description: "Human-readable organization name shown in UI and emails", example: "Neon Shadow Corp" }),
|
|
@@ -633,11 +610,11 @@ t.object({
|
|
|
633
610
|
contactEmail: t.string().email().meta({ description: "Primary contact email for the organization", example: "legal@neon-shadow.io" }),
|
|
634
611
|
icon: t.string().meta({ description: "Organization icon/logo URL", example: "https://cdn.neon-shadow.io/icon.png" }),
|
|
635
612
|
banner: t.string().nullable().optional().meta({ description: "Organization banner image URL", example: "https://cdn.neon-shadow.io/banner.png" }),
|
|
636
|
-
createdBy:
|
|
613
|
+
createdBy: A.meta({ description: "User ObjectId who created the organization", readOnly: !0 }),
|
|
637
614
|
customerId: t.string().optional().nullable().meta({ description: "Stripe customer ID for billing", example: "cus_9x8y7z6w5v4u3t2s", readOnly: !0 }),
|
|
638
615
|
subscriptionId: t.string().optional().nullable().meta({ description: "Stripe subscription ID", example: "sub_1A2B3C4D5E6F7G8H", readOnly: !0 }),
|
|
639
|
-
createdAt:
|
|
640
|
-
updatedAt:
|
|
616
|
+
createdAt: I.meta({ description: "When the organization was created", readOnly: !0 }),
|
|
617
|
+
updatedAt: I.meta({ description: "When the organization was last updated", readOnly: !0 })
|
|
641
618
|
}).strict().meta({
|
|
642
619
|
description: "A tenant organization. Each organization has its own isolated workspace, templates, signature requests, and API keys."
|
|
643
620
|
});
|
|
@@ -650,15 +627,15 @@ t.object({
|
|
|
650
627
|
icon: t.string().meta({ description: "Organization icon/logo URL", example: "https://cdn.neon-shadow.io/icon.png" })
|
|
651
628
|
}).strict().meta({ description: "Create a new organization" });
|
|
652
629
|
t.object({
|
|
653
|
-
_id:
|
|
654
|
-
organization:
|
|
655
|
-
user:
|
|
630
|
+
_id: A.meta({ readOnly: !0 }),
|
|
631
|
+
organization: A.meta({ description: "The organization this membership belongs to", readOnly: !0 }),
|
|
632
|
+
user: A.meta({ description: "The user who is a member of the organization", readOnly: !0 }),
|
|
656
633
|
role: t.string().min(1).meta({ description: "Role identifier (e.g. 'admin', 'member', 'viewer')", example: "admin" }),
|
|
657
634
|
permissions: t.string().min(1).meta({ description: "Permission set identifier or JSON string", example: '{"templates":"rw","forms":"r"}' }),
|
|
658
635
|
status: t.enum(["active", "inactive", "blocked"]).meta({ description: "Membership status", example: "active" }),
|
|
659
|
-
lastLogin:
|
|
660
|
-
createdAt:
|
|
661
|
-
updatedAt:
|
|
636
|
+
lastLogin: I.nullable().meta({ description: "When the user last logged into this organization", readOnly: !0 }),
|
|
637
|
+
createdAt: I.meta({ description: "When the membership was created", readOnly: !0 }),
|
|
638
|
+
updatedAt: I.optional().meta({ description: "When the membership was last updated", readOnly: !0 })
|
|
662
639
|
}).strict().meta({
|
|
663
640
|
description: "A user's membership within an organization. This links a User to an Organization and defines their role and permissions."
|
|
664
641
|
});
|
|
@@ -670,14 +647,14 @@ t.object({
|
|
|
670
647
|
permissions: t.string().min(1).meta({ description: "Permission set to assign", example: '{"templates":"r","forms":"rw"}' })
|
|
671
648
|
}).strict().meta({ description: "Invite a user to join an organization" });
|
|
672
649
|
t.object({
|
|
673
|
-
_id:
|
|
650
|
+
_id: A.meta({ description: "OrganizationUser membership MongoDB ObjectId", readOnly: !0 }),
|
|
674
651
|
role: t.string().min(2).meta({ description: "Updated role", example: "viewer" }),
|
|
675
652
|
permissions: t.string().min(1).meta({ description: "Updated permission set", example: '{"templates":"r"}' })
|
|
676
653
|
}).strict().meta({ description: "Update an organization user's role or permissions" });
|
|
677
654
|
t.object({
|
|
678
|
-
_id:
|
|
679
|
-
organization:
|
|
680
|
-
createdBy:
|
|
655
|
+
_id: A.meta({ readOnly: !0 }),
|
|
656
|
+
organization: A.meta({ description: "Organization that owns this template", readOnly: !0 }),
|
|
657
|
+
createdBy: A.meta({ description: "OrganizationUser ID who created this template", readOnly: !0 }),
|
|
681
658
|
name: t.string().min(1).meta({ description: "Template name (unique within the organization)", example: "Neural_NDA_v3" }),
|
|
682
659
|
description: t.string().default("").meta({ description: "Human-readable description of the template's purpose", example: "Standard non-disclosure agreement with neural implant data clause" }),
|
|
683
660
|
config: t.any().meta({ description: "The Bonsai component tree defining the template layout and fields" }),
|
|
@@ -687,22 +664,22 @@ t.object({
|
|
|
687
664
|
css: t.string().optional().meta({ description: "Generated Tailwind CSS for the template layout" }),
|
|
688
665
|
tags: t.array(t.string()).default([]).meta({ description: "Tags for organizing and discovering templates", example: ["nda", "legal", "neural-interface"] }),
|
|
689
666
|
active: t.boolean().default(!0).meta({ description: "Whether the template is active and available for use" }),
|
|
690
|
-
lastUsed:
|
|
667
|
+
lastUsed: I.nullable().optional().meta({ description: "When the template was last referenced in a signature request", readOnly: !0 }),
|
|
691
668
|
usageCount: t.number().default(0).meta({ description: "Total number of signature requests created from this template" }),
|
|
692
669
|
version: t.number().default(1).meta({ description: "Template schema version (increments on significant config changes)" }),
|
|
693
|
-
createdAt:
|
|
694
|
-
updatedAt:
|
|
670
|
+
createdAt: I.meta({ description: "When the template was created", readOnly: !0 }),
|
|
671
|
+
updatedAt: I.meta({ description: "When the template was last updated", readOnly: !0 })
|
|
695
672
|
}).strict().meta({
|
|
696
673
|
description: "A reusable Bonsai signature template. Templates define the form layout via a component tree and can be referenced by ID when creating signature requests."
|
|
697
674
|
});
|
|
698
675
|
t.object({
|
|
699
|
-
ou:
|
|
676
|
+
ou: A.meta({ description: "OrganizationUser ID of the user creating the template" }),
|
|
700
677
|
name: t.string().min(1).meta({ description: "Template name (must be unique within the organization)", example: "Neural_NDA_v3" }),
|
|
701
678
|
description: t.string().optional().meta({ description: "Optional description of the template's purpose", example: "Standard NDA with neural implant clause" }),
|
|
702
|
-
config:
|
|
679
|
+
config: B.meta({ description: "The Bonsai component tree that defines the template layout" }),
|
|
703
680
|
pdf: t.object({
|
|
704
|
-
header:
|
|
705
|
-
footer:
|
|
681
|
+
header: B.optional().meta({ description: "PDF header Bonsai component tree" }),
|
|
682
|
+
footer: B.optional().meta({ description: "PDF footer Bonsai component tree" })
|
|
706
683
|
}).optional(),
|
|
707
684
|
tags: t.array(t.string()).optional().meta({ description: "Tags for organizing and filtering templates", example: ["nda", "legal"] })
|
|
708
685
|
}).strict().meta({ description: "Create a new reusable signature template" });
|
|
@@ -711,7 +688,7 @@ t.object({
|
|
|
711
688
|
name: t.string().meta({ description: "Template name", example: "Neural_NDA_v3" }),
|
|
712
689
|
contentHash: t.string().optional().meta({ description: "SHA-256 hash of the config, useful for deduplication" })
|
|
713
690
|
}).strict().meta({ description: "Created template summary" });
|
|
714
|
-
const
|
|
691
|
+
const Zr = t.enum([
|
|
715
692
|
"pending",
|
|
716
693
|
"captured",
|
|
717
694
|
"completed",
|
|
@@ -719,33 +696,33 @@ const ln = t.enum([
|
|
|
719
696
|
"revoked"
|
|
720
697
|
]);
|
|
721
698
|
t.object({
|
|
722
|
-
_id:
|
|
699
|
+
_id: A.meta({ readOnly: !0 }),
|
|
723
700
|
id: t.string().meta({ description: "Public-facing unique request ID (random hex string)", example: "fr_a7b8c9d0e1f2", readOnly: !0 }),
|
|
724
701
|
token: t.string().meta({ description: "Verification token used for cookie-based auth in the signer's browser", readOnly: !0 }),
|
|
725
702
|
email: t.string().email().meta({ description: "Recipient email address where the signature link was sent", example: "jack@datahaven.net" }),
|
|
726
703
|
name: t.string().min(1).meta({ description: "Recipient's display name", example: "Razor Jack" }),
|
|
727
704
|
attachments: t.array(t.string()).optional().meta({ description: "Array of attachment URLs included with the form", example: ["https://files.datahaven.net/nda_v3.pdf"] }),
|
|
728
705
|
data: t.any().optional().meta({ description: "Form field data submitted by the signer" }),
|
|
729
|
-
webhooks: t.array(
|
|
706
|
+
webhooks: t.array(A).optional().meta({ description: "Webhook ObjectIds notified on lifecycle events", example: ["67e091ab2c4d3f22001a2b3c"] }),
|
|
730
707
|
metadata: t.any().optional().meta({ description: "Capture-time metadata such as IP address, user agent, and timestamps" }),
|
|
731
|
-
expiry:
|
|
732
|
-
due:
|
|
708
|
+
expiry: I.meta({ description: "When the signature request link expires" }),
|
|
709
|
+
due: I.optional().nullable().meta({ description: "Soft deadline for completing the signature" }),
|
|
733
710
|
digest: t.string().meta({ description: "SHA-256 hash of the serialized payload, used for deduplication", readOnly: !0 }),
|
|
734
711
|
template: t.any().meta({ description: "Snapshot of the Bonsai component tree config at the time of form creation", readOnly: !0 }),
|
|
735
712
|
header: t.any().meta({ description: "Snapshot of the (small) Bonsai component tree config used for the output PDF page header rendering", readOnly: !0 }),
|
|
736
713
|
footer: t.any().meta({ description: "Snapshot of the (small) Bonsai component tree config used for the output PDF page footer rendering", readOnly: !0 }),
|
|
737
714
|
css: t.string().meta({ description: "Tailwind CSS generated from the template at the time of form creation", readOnly: !0 }),
|
|
738
|
-
status:
|
|
739
|
-
organization:
|
|
740
|
-
createdAt:
|
|
741
|
-
updatedAt:
|
|
715
|
+
status: Zr.meta({ description: "Current lifecycle status of the form request", example: "pending" }),
|
|
716
|
+
organization: A.meta({ description: "Organization that owns this form request", readOnly: !0 }),
|
|
717
|
+
createdAt: I.meta({ description: "When the form request was created", readOnly: !0 }),
|
|
718
|
+
updatedAt: I.meta({ description: "When the form request was last updated", readOnly: !0 })
|
|
742
719
|
}).strict().meta({
|
|
743
720
|
description: "A signature request sent to a recipient. Tracks the full lifecycle from creation through signing, completion, or revocation."
|
|
744
721
|
});
|
|
745
722
|
t.object({
|
|
746
723
|
name: t.string().min(1).meta({ description: "Recipient's display name (used in the email greeting and form header)", example: "Razor Jack" }),
|
|
747
724
|
email: t.string().email().meta({ description: "Recipient email address where the signature link will be sent", example: "jack@datahaven.net" }),
|
|
748
|
-
template: t.union([
|
|
725
|
+
template: t.union([B, t.string()]).meta({
|
|
749
726
|
description: "Either an inline Bonsai component tree config, or a saved template MongoDB ObjectId to use as the form layout"
|
|
750
727
|
}),
|
|
751
728
|
expiry: t.coerce.date().optional().meta({ description: "When the signature request link expires (ISO 8601 date)", example: "2077-12-25T23:59:59Z" }),
|
|
@@ -755,8 +732,8 @@ t.object({
|
|
|
755
732
|
metadata: t.any().optional().meta({ description: "Arbitrary metadata to associate with the form request", example: { department: "Legal", priority: "high" } }),
|
|
756
733
|
data: t.any().optional().meta({ description: "Pre-filled form field data to populate the form on load", example: { full_name: "Razor Jack", badge_id: "RJ-7741" } }),
|
|
757
734
|
pdf: t.union([t.boolean(), t.object({
|
|
758
|
-
header: t.union([
|
|
759
|
-
footer: t.union([
|
|
735
|
+
header: t.union([B, t.string()]).optional().meta({ description: "A (small) Bonsai component tree config used for the output PDF page header rendering" }),
|
|
736
|
+
footer: t.union([B, t.string()]).optional().meta({ description: "A (small) Bonsai component tree config used for the output PDF page footer rendering" })
|
|
760
737
|
})]).optional().meta({ description: "PDF file config object (header||footer) or `true/false` boolean to trigger PDF file generation after form capture" })
|
|
761
738
|
}).strict().meta({ description: "Create a new signature request targeting a recipient" });
|
|
762
739
|
t.object({
|
|
@@ -775,24 +752,24 @@ t.object({
|
|
|
775
752
|
})
|
|
776
753
|
}).strict().meta({ description: "Submit captured form data from the signer's browser session" });
|
|
777
754
|
t.object({
|
|
778
|
-
_id:
|
|
755
|
+
_id: A.meta({ readOnly: !0 }),
|
|
779
756
|
id: t.string().meta({ description: "Public key identifier (e.g. pb-xxxx). Used as the 'client' field when authenticating.", example: "pb-a7f3b2c9d1e8f4a5b6c7d8e9", readOnly: !0 }),
|
|
780
757
|
secret: t.string().meta({ description: "Encrypted API key secret — only viewable at creation time", readOnly: !0 }),
|
|
781
758
|
allowedOrigins: t.array(t.string()).default([]).meta({ description: "CORS origin allowlist. Requests from origins not in this list are rejected.", example: ["https://console.neon-shadow.io"] }),
|
|
782
759
|
allowedIps: t.array(t.string()).default([]).meta({ description: "IP CIDR allowlist. Requests from IPs not in this list are rejected.", example: ["203.0.113.0/24"] }),
|
|
783
760
|
active: t.boolean().default(!0).meta({ description: "Whether the key is active and can be used for authentication" }),
|
|
784
|
-
expiry:
|
|
785
|
-
lastUsed:
|
|
761
|
+
expiry: I.meta({ description: "When the API key expires and can no longer be used" }),
|
|
762
|
+
lastUsed: I.meta({ description: "Timestamp of the most recent request using this key", readOnly: !0 }),
|
|
786
763
|
audience: t.enum(["internal", "external"]).meta({ description: "Key audience — 'internal' for server-to-server, 'external' for client-side", example: "internal" }),
|
|
787
|
-
organization:
|
|
788
|
-
generatedBy:
|
|
789
|
-
createdAt:
|
|
790
|
-
updatedAt:
|
|
764
|
+
organization: A.meta({ description: "Organization this key belongs to", readOnly: !0 }),
|
|
765
|
+
generatedBy: A.meta({ description: "OrganizationUser ID who created this key", readOnly: !0 }),
|
|
766
|
+
createdAt: I.meta({ description: "When the API key was created", readOnly: !0 }),
|
|
767
|
+
updatedAt: I.meta({ description: "When the API key was last updated", readOnly: !0 })
|
|
791
768
|
}).strict().meta({
|
|
792
769
|
description: "An API key scoped to an organization. Each key has configurable IP and origin restrictions for fine-grained access control."
|
|
793
770
|
});
|
|
794
771
|
t.object({
|
|
795
|
-
ou:
|
|
772
|
+
ou: A.meta({ description: "OrganizationUser ID of the user creating the API key" }),
|
|
796
773
|
expiry: t.coerce.date().optional().meta({ description: "Key expiration date (defaults to +1 year from creation)", example: "2078-12-19T00:00:00Z" }),
|
|
797
774
|
audience: t.enum(["internal", "external"]).meta({ description: "Key audience — 'internal' for server-to-server, 'external' for client-side usage", example: "internal" }),
|
|
798
775
|
allowedOrigins: t.array(t.string()).optional().meta({ description: "CORS origin allowlist (e.g. ['https://app.example.com']). Empty array disables origin restriction.", example: ["https://console.neon-shadow.io", "https://api.datahaven.net"] }),
|
|
@@ -803,21 +780,21 @@ t.object({
|
|
|
803
780
|
secret: t.string().meta({ description: "API key secret — **this is the only time the secret is returned**. Store it securely.", readOnly: !0 })
|
|
804
781
|
}).strict().meta({ description: "API key credentials — the secret is only shown once" });
|
|
805
782
|
t.object({
|
|
806
|
-
_id:
|
|
783
|
+
_id: A.meta({ readOnly: !0 }),
|
|
807
784
|
id: t.string().meta({ description: "Public webhook identifier (e.g. pb-wbhk-xxxx)", example: "pb-wbhk-a7b8c9d0", readOnly: !0 }),
|
|
808
785
|
url: t.string().url().meta({ description: "HTTPS endpoint receiving POST event notifications", example: "https://hooks.datahaven.net/events" }),
|
|
809
786
|
secret: t.string().meta({ description: "HMAC-SHA256 signing secret — used to verify that webhook payloads genuinely came from Bonsai", readOnly: !0 }),
|
|
810
787
|
active: t.boolean().default(!0).meta({ description: "Whether the webhook is active and receiving events" }),
|
|
811
|
-
lastUsed:
|
|
812
|
-
organization:
|
|
813
|
-
generatedBy:
|
|
814
|
-
createdAt:
|
|
815
|
-
updatedAt:
|
|
788
|
+
lastUsed: I.meta({ description: "When the webhook last received an event", readOnly: !0 }),
|
|
789
|
+
organization: A.meta({ description: "Organization that owns this webhook", readOnly: !0 }),
|
|
790
|
+
generatedBy: A.meta({ description: "OrganizationUser ID who created this webhook", readOnly: !0 }),
|
|
791
|
+
createdAt: I.meta({ description: "When the webhook was created", readOnly: !0 }),
|
|
792
|
+
updatedAt: I.meta({ description: "When the webhook was last updated", readOnly: !0 })
|
|
816
793
|
}).strict().meta({
|
|
817
794
|
description: "A webhook destination for form request lifecycle events. When a form is created, signed, or revoked, Bonsai sends a POST request to this URL with a JSON payload signed via HMAC-SHA256."
|
|
818
795
|
});
|
|
819
796
|
t.object({
|
|
820
|
-
ou:
|
|
797
|
+
ou: A.meta({ description: "OrganizationUser ID of the user creating the webhook" }),
|
|
821
798
|
url: t.string().url().meta({ description: "HTTPS endpoint that will receive POST event notifications", example: "https://hooks.datahaven.net/events" })
|
|
822
799
|
}).strict().meta({ description: "Payload for creating a new webhook destination" });
|
|
823
800
|
t.object({
|
|
@@ -839,7 +816,7 @@ t.object({
|
|
|
839
816
|
t.object({
|
|
840
817
|
token: t.string().meta({ description: "New JWT access token (1 hour expiry)", example: "eyJhbGciOiJIUzI1NiIs...c012" })
|
|
841
818
|
}).strict().meta({ description: "New JWT access token" });
|
|
842
|
-
const
|
|
819
|
+
const Qr = t.enum([
|
|
843
820
|
"application/pdf",
|
|
844
821
|
"image/png",
|
|
845
822
|
"image/jpeg",
|
|
@@ -853,10 +830,10 @@ t.object({
|
|
|
853
830
|
t.object({
|
|
854
831
|
downloadUrl: t.string().url().meta({ description: "Pre-signed GCS download URL", example: "https://storage.googleapis.com/bonsai-secure/f1e2d3...X-Goog-Signature=def456" }),
|
|
855
832
|
filename: t.string().meta({ description: "Original filename (for Content-Disposition)", example: "signed_nda_razorjack.pdf" }),
|
|
856
|
-
mimeType:
|
|
833
|
+
mimeType: Qr.meta({ description: "MIME type (for Content-Type)", example: "application/pdf" }),
|
|
857
834
|
size: t.number().int().meta({ description: "File size in bytes", example: 245760 })
|
|
858
835
|
}).strict().meta({ description: "Signed download URL for secure file access" });
|
|
859
|
-
const
|
|
836
|
+
const en = t.enum([
|
|
860
837
|
"pending",
|
|
861
838
|
"generating",
|
|
862
839
|
"completed",
|
|
@@ -864,46 +841,46 @@ const un = t.enum([
|
|
|
864
841
|
"revoked"
|
|
865
842
|
]);
|
|
866
843
|
t.object({
|
|
867
|
-
_id:
|
|
844
|
+
_id: A.meta({ readOnly: !0 }),
|
|
868
845
|
id: t.string().meta({ description: "Public-facing unique request ID (random hex string)", example: "fr_a7b8c9d0e1f2", readOnly: !0 }),
|
|
869
846
|
token: t.string().meta({ description: "Verification token used for cookie-based auth in the signer's browser", readOnly: !0 }),
|
|
870
847
|
data: t.any().optional().meta({ description: "Form field data submitted by the signer/requester" }),
|
|
871
|
-
webhooks: t.array(
|
|
848
|
+
webhooks: t.array(A).optional().meta({ description: "Webhook ObjectIds notified on lifecycle events", example: ["67e091ab2c4d3f22001a2b3c"] }),
|
|
872
849
|
metadata: t.any().optional().meta({ description: "File metadata such as size, contentType, etc." }),
|
|
873
850
|
digest: t.string().meta({ description: "SHA-256 hash of the serialized payload, used for deduplication", readOnly: !0 }),
|
|
874
851
|
template: t.any().meta({ description: "Snapshot of the Bonsai component tree config at the time of PDF creation" }),
|
|
875
852
|
header: t.any().meta({ description: "Snapshot of the (small) Bonsai component tree config used for the output PDF page header rendering" }),
|
|
876
853
|
footer: t.any().meta({ description: "Snapshot of the (small) Bonsai component tree config used for the output PDF page footer rendering" }),
|
|
877
854
|
css: t.string().meta({ description: "Tailwind CSS generated from the template at the time of PDF generation request", readOnly: !0 }),
|
|
878
|
-
status:
|
|
879
|
-
organization:
|
|
880
|
-
createdAt:
|
|
881
|
-
updatedAt:
|
|
855
|
+
status: en.meta({ description: "Current lifecycle status of the PDF request", example: "pending" }),
|
|
856
|
+
organization: A.meta({ description: "Organization that owns this PDF request", readOnly: !0 }),
|
|
857
|
+
createdAt: I.meta({ description: "When the PDF request was created", readOnly: !0 }),
|
|
858
|
+
updatedAt: I.meta({ description: "When the PDF request was last updated", readOnly: !0 })
|
|
882
859
|
}).strict().meta({
|
|
883
860
|
description: "A PDF request used to trigger the generation of a custom PDF file. Tracks the full lifecycle and alerts sends results via webhook."
|
|
884
861
|
});
|
|
885
862
|
t.object({
|
|
886
|
-
template: t.union([
|
|
863
|
+
template: t.union([B, t.string()]).meta({
|
|
887
864
|
description: "Either an inline Bonsai component tree config, or a saved template MongoDB ObjectId to use as the PDF content layout"
|
|
888
865
|
}),
|
|
889
866
|
webhooks: t.array(t.string()).min(1).meta({ description: "Array of webhook ObjectIds to notify on form lifecycle events", example: ["67e091ab2c4d3f22001a2b3c"] }),
|
|
890
867
|
metadata: t.any().optional().meta({ description: "Arbitrary metadata to associate with the PDF request", example: { department: "Legal", priority: "high" } }),
|
|
891
868
|
data: t.any().optional().meta({ description: "Pre-filled template field data to populate the PDF with", example: { full_name: "Razor Jack", badge_id: "RJ-7741" } }),
|
|
892
|
-
header: t.union([
|
|
893
|
-
footer: t.union([
|
|
869
|
+
header: t.union([B, t.string()]).optional().meta({ description: "A (small) Bonsai component tree config used for the output PDF page header rendering" }),
|
|
870
|
+
footer: t.union([B, t.string()]).optional().meta({ description: "A (small) Bonsai component tree config used for the output PDF page footer rendering" })
|
|
894
871
|
}).strict().meta({ description: "Create a new PDF request to generate a PDF file from a Bonsai template" });
|
|
895
872
|
t.object({
|
|
896
873
|
pdfId: t.string().meta({ description: "MongoDB ObjectId of the newly created PDF request (this is NOT the rendered pdf file - a file ID is returned after async pdf generation via webhook)", example: "67e091ab2c4d3f22001a2b3c", readOnly: !0 })
|
|
897
874
|
}).strict().meta({ description: "Created form request identifier" });
|
|
898
875
|
Ta.config({
|
|
899
|
-
customError:
|
|
876
|
+
customError: Ia()
|
|
900
877
|
});
|
|
901
|
-
const
|
|
902
|
-
|
|
878
|
+
const oa = ee.forwardRef(({ ...e }, a) => /* @__PURE__ */ d("a", { ref: a, ...e }));
|
|
879
|
+
oa.displayName = "A";
|
|
903
880
|
function c(...e) {
|
|
904
|
-
return
|
|
881
|
+
return ka(Ca(e));
|
|
905
882
|
}
|
|
906
|
-
const
|
|
883
|
+
const tn = S("font-heading font-semibold scroll-m-20", {
|
|
907
884
|
variants: {
|
|
908
885
|
variant: {
|
|
909
886
|
h1: "text-6xl font-semibold tracking-tight",
|
|
@@ -917,18 +894,18 @@ const pn = R("font-heading font-semibold scroll-m-20", {
|
|
|
917
894
|
defaultVariants: {
|
|
918
895
|
variant: "h3"
|
|
919
896
|
}
|
|
920
|
-
}), sa =
|
|
897
|
+
}), sa = ee.forwardRef(
|
|
921
898
|
({ className: e, variant: a, as: r, ...n }, o) => /* @__PURE__ */ d(
|
|
922
899
|
r || a || "h3",
|
|
923
900
|
{
|
|
924
901
|
ref: o,
|
|
925
|
-
className: c(
|
|
902
|
+
className: c(tn({ variant: a }), e),
|
|
926
903
|
...n
|
|
927
904
|
}
|
|
928
905
|
)
|
|
929
906
|
);
|
|
930
907
|
sa.displayName = "H";
|
|
931
|
-
const
|
|
908
|
+
const an = S("text-base", {
|
|
932
909
|
variants: {
|
|
933
910
|
variant: {
|
|
934
911
|
default: "",
|
|
@@ -946,24 +923,24 @@ const mn = R("text-base", {
|
|
|
946
923
|
variant: "default",
|
|
947
924
|
size: "md"
|
|
948
925
|
}
|
|
949
|
-
}),
|
|
950
|
-
({ className: e, variant: a, size: r, as: n = "p", ...o },
|
|
926
|
+
}), ia = ee.forwardRef(
|
|
927
|
+
({ className: e, variant: a, size: r, as: n = "p", ...o }, i) => /* @__PURE__ */ d(
|
|
951
928
|
n,
|
|
952
929
|
{
|
|
953
|
-
ref:
|
|
954
|
-
className: c(
|
|
930
|
+
ref: i,
|
|
931
|
+
className: c(an({ variant: a, size: r }), e),
|
|
955
932
|
...o
|
|
956
933
|
}
|
|
957
934
|
)
|
|
958
935
|
);
|
|
959
|
-
|
|
960
|
-
const
|
|
936
|
+
ia.displayName = "P";
|
|
937
|
+
const rn = [
|
|
961
938
|
{ duration: 10, intensity: 0.2 },
|
|
962
939
|
{ duration: 5, delay: 120, intensity: 0.4 }
|
|
963
|
-
],
|
|
940
|
+
], nn = [{ duration: 10, intensity: 0.2 }], on = [
|
|
964
941
|
{ duration: 10, intensity: 0.2 },
|
|
965
942
|
{ duration: 5, delay: 190, intensity: 0.4 }
|
|
966
|
-
],
|
|
943
|
+
], sn = [{ duration: 20, intensity: 0.2 }], dn = [{ duration: 10, intensity: 0.2 }], ln = S("flex w-full flex-col", {
|
|
967
944
|
variants: {
|
|
968
945
|
variant: {
|
|
969
946
|
default: "",
|
|
@@ -987,7 +964,7 @@ const gn = [
|
|
|
987
964
|
variant: "default"
|
|
988
965
|
}
|
|
989
966
|
});
|
|
990
|
-
function
|
|
967
|
+
function cn({
|
|
991
968
|
className: e,
|
|
992
969
|
variant: a = "default",
|
|
993
970
|
raised: r,
|
|
@@ -995,14 +972,14 @@ function yn({
|
|
|
995
972
|
...o
|
|
996
973
|
}) {
|
|
997
974
|
return /* @__PURE__ */ d(
|
|
998
|
-
|
|
975
|
+
te.Root,
|
|
999
976
|
{
|
|
1000
977
|
"data-slot": "accordion",
|
|
1001
978
|
"data-variant": a,
|
|
1002
979
|
"data-raised": r ?? void 0,
|
|
1003
980
|
"data-extrude": n ?? void 0,
|
|
1004
981
|
className: c(
|
|
1005
|
-
|
|
982
|
+
ln({ variant: a, raised: r, extrude: n }),
|
|
1006
983
|
"group/accordion",
|
|
1007
984
|
e
|
|
1008
985
|
),
|
|
@@ -1010,9 +987,9 @@ function yn({
|
|
|
1010
987
|
}
|
|
1011
988
|
);
|
|
1012
989
|
}
|
|
1013
|
-
function
|
|
990
|
+
function un({ className: e, ...a }) {
|
|
1014
991
|
return /* @__PURE__ */ d(
|
|
1015
|
-
|
|
992
|
+
te.Item,
|
|
1016
993
|
{
|
|
1017
994
|
"data-slot": "accordion-item",
|
|
1018
995
|
className: c(
|
|
@@ -1059,17 +1036,17 @@ function wn({ className: e, ...a }) {
|
|
|
1059
1036
|
}
|
|
1060
1037
|
);
|
|
1061
1038
|
}
|
|
1062
|
-
function
|
|
1039
|
+
function pn({
|
|
1063
1040
|
className: e,
|
|
1064
1041
|
children: a,
|
|
1065
1042
|
disabled: r,
|
|
1066
1043
|
icon: n = ze,
|
|
1067
1044
|
onClick: o,
|
|
1068
|
-
...
|
|
1045
|
+
...i
|
|
1069
1046
|
}) {
|
|
1070
|
-
const { trigger: l } =
|
|
1071
|
-
return /* @__PURE__ */ d(
|
|
1072
|
-
|
|
1047
|
+
const { trigger: l } = se();
|
|
1048
|
+
return /* @__PURE__ */ d(te.Header, { className: "flex", children: /* @__PURE__ */ k(
|
|
1049
|
+
te.Trigger,
|
|
1073
1050
|
{
|
|
1074
1051
|
"data-slot": "accordion-trigger",
|
|
1075
1052
|
className: c(
|
|
@@ -1084,9 +1061,9 @@ function An({
|
|
|
1084
1061
|
e
|
|
1085
1062
|
),
|
|
1086
1063
|
onClick: (u) => {
|
|
1087
|
-
l(
|
|
1064
|
+
l(dn), o?.(u);
|
|
1088
1065
|
},
|
|
1089
|
-
...
|
|
1066
|
+
...i,
|
|
1090
1067
|
children: [
|
|
1091
1068
|
a,
|
|
1092
1069
|
/* @__PURE__ */ d(
|
|
@@ -1103,13 +1080,13 @@ function An({
|
|
|
1103
1080
|
}
|
|
1104
1081
|
) });
|
|
1105
1082
|
}
|
|
1106
|
-
function
|
|
1083
|
+
function gn({
|
|
1107
1084
|
className: e,
|
|
1108
1085
|
children: a,
|
|
1109
1086
|
...r
|
|
1110
1087
|
}) {
|
|
1111
1088
|
return /* @__PURE__ */ d(
|
|
1112
|
-
|
|
1089
|
+
te.Panel,
|
|
1113
1090
|
{
|
|
1114
1091
|
"data-slot": "accordion-content",
|
|
1115
1092
|
keepMounted: !0,
|
|
@@ -1128,7 +1105,7 @@ function zn({
|
|
|
1128
1105
|
}
|
|
1129
1106
|
);
|
|
1130
1107
|
}
|
|
1131
|
-
const
|
|
1108
|
+
const mn = S(
|
|
1132
1109
|
"relative grid px-4 py-3 gap-0.5 rounded-base border text-left text-sm *:[svg]:row-span-2 *:[svg]:translate-y-1 *:[svg]:text-current has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-24 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5",
|
|
1133
1110
|
{
|
|
1134
1111
|
variants: {
|
|
@@ -1156,7 +1133,7 @@ const In = R(
|
|
|
1156
1133
|
}
|
|
1157
1134
|
}
|
|
1158
1135
|
);
|
|
1159
|
-
function
|
|
1136
|
+
function hn({
|
|
1160
1137
|
className: e,
|
|
1161
1138
|
variant: a = "default",
|
|
1162
1139
|
size: r = "default",
|
|
@@ -1169,7 +1146,7 @@ function Tn({
|
|
|
1169
1146
|
"data-slot": "alert",
|
|
1170
1147
|
role: "alert",
|
|
1171
1148
|
className: c(
|
|
1172
|
-
|
|
1149
|
+
mn({ variant: a, raised: n, size: r }),
|
|
1173
1150
|
"group/alert",
|
|
1174
1151
|
e
|
|
1175
1152
|
),
|
|
@@ -1177,7 +1154,7 @@ function Tn({
|
|
|
1177
1154
|
}
|
|
1178
1155
|
);
|
|
1179
1156
|
}
|
|
1180
|
-
const
|
|
1157
|
+
const fn = S("relative flex shrink-0 select-none", {
|
|
1181
1158
|
variants: {
|
|
1182
1159
|
size: {
|
|
1183
1160
|
full: "size-full",
|
|
@@ -1205,34 +1182,34 @@ const Cn = R("relative flex shrink-0 select-none", {
|
|
|
1205
1182
|
rounded: "full"
|
|
1206
1183
|
}
|
|
1207
1184
|
});
|
|
1208
|
-
function
|
|
1185
|
+
function bn({
|
|
1209
1186
|
className: e,
|
|
1210
1187
|
size: a = "md",
|
|
1211
1188
|
rounded: r = "full",
|
|
1212
1189
|
raised: n,
|
|
1213
1190
|
src: o,
|
|
1214
|
-
alt:
|
|
1191
|
+
alt: i,
|
|
1215
1192
|
fallback: l,
|
|
1216
1193
|
badge: u,
|
|
1217
1194
|
children: p,
|
|
1218
|
-
...
|
|
1195
|
+
...g
|
|
1219
1196
|
}) {
|
|
1220
1197
|
return /* @__PURE__ */ d(
|
|
1221
|
-
|
|
1198
|
+
fe.Root,
|
|
1222
1199
|
{
|
|
1223
1200
|
"data-slot": "avatar",
|
|
1224
1201
|
"data-size": a,
|
|
1225
1202
|
"data-raised": n,
|
|
1226
1203
|
"data-rounded": r,
|
|
1227
1204
|
className: c(
|
|
1228
|
-
|
|
1205
|
+
fn({ size: a, rounded: r, raised: n }),
|
|
1229
1206
|
"group/avatar",
|
|
1230
1207
|
e
|
|
1231
1208
|
),
|
|
1232
|
-
...
|
|
1233
|
-
children: p ?? /* @__PURE__ */
|
|
1209
|
+
...g,
|
|
1210
|
+
children: p ?? /* @__PURE__ */ k(M, { children: [
|
|
1234
1211
|
o && /* @__PURE__ */ d(
|
|
1235
|
-
|
|
1212
|
+
fe.Image,
|
|
1236
1213
|
{
|
|
1237
1214
|
"data-slot": "avatar-image",
|
|
1238
1215
|
className: c(
|
|
@@ -1243,11 +1220,11 @@ function kn({
|
|
|
1243
1220
|
"group-data-[rounded=full]/avatar:rounded-full"
|
|
1244
1221
|
),
|
|
1245
1222
|
src: o,
|
|
1246
|
-
alt:
|
|
1223
|
+
alt: i
|
|
1247
1224
|
}
|
|
1248
1225
|
),
|
|
1249
1226
|
l != null && /* @__PURE__ */ d(
|
|
1250
|
-
|
|
1227
|
+
fe.Fallback,
|
|
1251
1228
|
{
|
|
1252
1229
|
"data-slot": "avatar-fallback",
|
|
1253
1230
|
className: c(
|
|
@@ -1300,7 +1277,7 @@ function kn({
|
|
|
1300
1277
|
}
|
|
1301
1278
|
);
|
|
1302
1279
|
}
|
|
1303
|
-
const
|
|
1280
|
+
const xn = S(
|
|
1304
1281
|
"gap-1 px-2 py-0.5 [button]:cursor-pointer rounded-full border text-xs font-medium transition-[color,box-shadow,translate] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 inline-flex items-center justify-center w-fit whitespace-nowrap shrink-0 [&>svg]:pointer-events-none aria-invalid:border-accent-red duration-200 overflow-hidden",
|
|
1305
1282
|
{
|
|
1306
1283
|
variants: {
|
|
@@ -1335,21 +1312,21 @@ const Sn = R(
|
|
|
1335
1312
|
}
|
|
1336
1313
|
}
|
|
1337
1314
|
);
|
|
1338
|
-
function
|
|
1315
|
+
function vn({
|
|
1339
1316
|
className: e,
|
|
1340
1317
|
variant: a = "default",
|
|
1341
1318
|
size: r = "md",
|
|
1342
1319
|
raised: n,
|
|
1343
1320
|
extrude: o,
|
|
1344
|
-
render:
|
|
1321
|
+
render: i,
|
|
1345
1322
|
...l
|
|
1346
1323
|
}) {
|
|
1347
|
-
return
|
|
1324
|
+
return Ba({
|
|
1348
1325
|
defaultTagName: "span",
|
|
1349
|
-
props:
|
|
1326
|
+
props: Ua(
|
|
1350
1327
|
{
|
|
1351
1328
|
className: c(
|
|
1352
|
-
|
|
1329
|
+
xn({ size: r, variant: a, raised: n, extrude: o }),
|
|
1353
1330
|
"group/badge",
|
|
1354
1331
|
e
|
|
1355
1332
|
),
|
|
@@ -1357,14 +1334,14 @@ function Rn({
|
|
|
1357
1334
|
},
|
|
1358
1335
|
l
|
|
1359
1336
|
),
|
|
1360
|
-
render:
|
|
1337
|
+
render: i,
|
|
1361
1338
|
state: {
|
|
1362
1339
|
slot: "badge",
|
|
1363
1340
|
variant: a
|
|
1364
1341
|
}
|
|
1365
1342
|
});
|
|
1366
1343
|
}
|
|
1367
|
-
const
|
|
1344
|
+
const yn = S(
|
|
1368
1345
|
"h-fit inline-grid [&_svg]:col-start-1 [&_svg]:col-end-1 [&_svg]:row-start-1 [&_svg]:row-end-1 duration-1000",
|
|
1369
1346
|
{
|
|
1370
1347
|
variants: {
|
|
@@ -1391,34 +1368,34 @@ const _n = R(
|
|
|
1391
1368
|
}
|
|
1392
1369
|
}
|
|
1393
1370
|
);
|
|
1394
|
-
function
|
|
1371
|
+
function da({
|
|
1395
1372
|
icon: e,
|
|
1396
1373
|
pingIcon: a,
|
|
1397
1374
|
variant: r = "spinner",
|
|
1398
1375
|
fill: n = "default",
|
|
1399
1376
|
size: o = "md",
|
|
1400
|
-
iconProps:
|
|
1377
|
+
iconProps: i,
|
|
1401
1378
|
className: l,
|
|
1402
1379
|
...u
|
|
1403
1380
|
}) {
|
|
1404
|
-
const p = e ||
|
|
1405
|
-
return /* @__PURE__ */
|
|
1381
|
+
const p = e || Sa, g = a || p;
|
|
1382
|
+
return /* @__PURE__ */ k(
|
|
1406
1383
|
"span",
|
|
1407
1384
|
{
|
|
1408
1385
|
role: "status",
|
|
1409
1386
|
"data-slot": "loader-container",
|
|
1410
|
-
className: c(
|
|
1387
|
+
className: c(yn({ variant: r, fill: n, size: o }), l),
|
|
1411
1388
|
"aria-label": r ?? "loading",
|
|
1412
1389
|
...u,
|
|
1413
1390
|
children: [
|
|
1414
|
-
/* @__PURE__ */ d(p, { "data-slot": "loader-icon", ...
|
|
1415
|
-
/* @__PURE__ */ d(
|
|
1416
|
-
/* @__PURE__ */ d(
|
|
1391
|
+
/* @__PURE__ */ d(p, { "data-slot": "loader-icon", ...i }),
|
|
1392
|
+
/* @__PURE__ */ d(g, { "data-slot": "loader-ping", ...i }),
|
|
1393
|
+
/* @__PURE__ */ d(Ra, { "data-slot": "loader-spinner", ...i })
|
|
1417
1394
|
]
|
|
1418
1395
|
}
|
|
1419
1396
|
);
|
|
1420
1397
|
}
|
|
1421
|
-
const
|
|
1398
|
+
const ae = S(
|
|
1422
1399
|
"neo-base neo-button-focus relative group cursor-pointer rounded-base border-2 border-border text-sm font-medium [&_svg:not([class*='size-'])]:size-4.5 inline-flex items-center justify-center whitespace-nowrap transition-[translate,box-shadow,border,color] duration-200 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 select-none",
|
|
1423
1400
|
{
|
|
1424
1401
|
variants: {
|
|
@@ -1469,40 +1446,40 @@ function ge({
|
|
|
1469
1446
|
size: r,
|
|
1470
1447
|
icon: n,
|
|
1471
1448
|
raised: o,
|
|
1472
|
-
extrude:
|
|
1449
|
+
extrude: i,
|
|
1473
1450
|
loading: l,
|
|
1474
1451
|
onClick: u,
|
|
1475
1452
|
children: p,
|
|
1476
|
-
...
|
|
1453
|
+
...g
|
|
1477
1454
|
}) {
|
|
1478
|
-
const { trigger: x } =
|
|
1479
|
-
return /* @__PURE__ */
|
|
1480
|
-
|
|
1455
|
+
const { trigger: x } = se();
|
|
1456
|
+
return /* @__PURE__ */ k(
|
|
1457
|
+
ja,
|
|
1481
1458
|
{
|
|
1482
1459
|
"data-slot": "button",
|
|
1483
1460
|
"data-loading": l,
|
|
1484
|
-
"aria-label":
|
|
1461
|
+
"aria-label": g["aria-label"] ?? "button",
|
|
1485
1462
|
className: c(
|
|
1486
|
-
|
|
1463
|
+
ae({ variant: a, size: r, raised: o, extrude: i, icon: n }),
|
|
1487
1464
|
"group/button",
|
|
1488
1465
|
e
|
|
1489
1466
|
),
|
|
1490
1467
|
onClick: (v) => {
|
|
1491
|
-
x(
|
|
1468
|
+
x(rn), u?.(v);
|
|
1492
1469
|
},
|
|
1493
|
-
...
|
|
1470
|
+
...g,
|
|
1494
1471
|
children: [
|
|
1495
|
-
/* @__PURE__ */ d("div", { className: "hidden group-data-[loading=true]:flex w-full absolute inset-0 items-center justify-center", children: /* @__PURE__ */ d(
|
|
1472
|
+
/* @__PURE__ */ d("div", { className: "hidden group-data-[loading=true]:flex w-full absolute inset-0 items-center justify-center", children: /* @__PURE__ */ d(da, {}) }),
|
|
1496
1473
|
/* @__PURE__ */ d("div", { className: "visible group-data-[loading=true]:invisible w-full flex gap-1.5 justify-center items-center", children: p })
|
|
1497
1474
|
]
|
|
1498
1475
|
}
|
|
1499
1476
|
);
|
|
1500
1477
|
}
|
|
1501
|
-
const
|
|
1502
|
-
|
|
1503
|
-
function
|
|
1478
|
+
const la = P.Root;
|
|
1479
|
+
la.displayName = "Select";
|
|
1480
|
+
function wn({ className: e, ...a }) {
|
|
1504
1481
|
return /* @__PURE__ */ d(
|
|
1505
|
-
|
|
1482
|
+
P.Value,
|
|
1506
1483
|
{
|
|
1507
1484
|
"data-slot": "select-value",
|
|
1508
1485
|
className: c(
|
|
@@ -1514,35 +1491,35 @@ function Nn({ className: e, ...a }) {
|
|
|
1514
1491
|
}
|
|
1515
1492
|
);
|
|
1516
1493
|
}
|
|
1517
|
-
function
|
|
1494
|
+
function An({
|
|
1518
1495
|
className: e,
|
|
1519
1496
|
size: a = "lg",
|
|
1520
1497
|
variant: r = "outline",
|
|
1521
1498
|
raised: n,
|
|
1522
1499
|
extrude: o,
|
|
1523
|
-
children:
|
|
1500
|
+
children: i,
|
|
1524
1501
|
...l
|
|
1525
1502
|
}) {
|
|
1526
|
-
return /* @__PURE__ */
|
|
1527
|
-
|
|
1503
|
+
return /* @__PURE__ */ k(
|
|
1504
|
+
P.Trigger,
|
|
1528
1505
|
{
|
|
1529
1506
|
"data-slot": "select-trigger",
|
|
1530
1507
|
"data-size": a,
|
|
1531
1508
|
"aria-label": l["aria-label"] ?? "select-trigger",
|
|
1532
1509
|
className: c(
|
|
1533
|
-
|
|
1510
|
+
ae({ size: a, variant: r, raised: n, extrude: o }),
|
|
1534
1511
|
"group/select-trigger neo-base neo-input-focus disabled:opacity-50 [&_svg]:shrink-0 w-full",
|
|
1535
1512
|
e
|
|
1536
1513
|
),
|
|
1537
1514
|
...l,
|
|
1538
1515
|
children: [
|
|
1539
|
-
|
|
1516
|
+
i,
|
|
1540
1517
|
/* @__PURE__ */ d(
|
|
1541
|
-
|
|
1518
|
+
P.Icon,
|
|
1542
1519
|
{
|
|
1543
1520
|
className: "flex items-center justify-center",
|
|
1544
1521
|
render: /* @__PURE__ */ d(
|
|
1545
|
-
|
|
1522
|
+
_a,
|
|
1546
1523
|
{
|
|
1547
1524
|
"data-slot": "select-selector",
|
|
1548
1525
|
className: "text-muted size-4 pointer-events-none"
|
|
@@ -1554,27 +1531,27 @@ function Pn({
|
|
|
1554
1531
|
}
|
|
1555
1532
|
);
|
|
1556
1533
|
}
|
|
1557
|
-
function
|
|
1534
|
+
function zn({
|
|
1558
1535
|
className: e,
|
|
1559
1536
|
children: a,
|
|
1560
1537
|
side: r = "bottom",
|
|
1561
1538
|
sideOffset: n = 4,
|
|
1562
1539
|
align: o = "center",
|
|
1563
|
-
alignOffset:
|
|
1540
|
+
alignOffset: i = 0,
|
|
1564
1541
|
alignItemWithTrigger: l = !0,
|
|
1565
1542
|
...u
|
|
1566
1543
|
}) {
|
|
1567
|
-
return /* @__PURE__ */ d(
|
|
1568
|
-
|
|
1544
|
+
return /* @__PURE__ */ d(P.Portal, { children: /* @__PURE__ */ d(
|
|
1545
|
+
P.Positioner,
|
|
1569
1546
|
{
|
|
1570
1547
|
side: r,
|
|
1571
1548
|
sideOffset: n,
|
|
1572
1549
|
align: o,
|
|
1573
|
-
alignOffset:
|
|
1550
|
+
alignOffset: i,
|
|
1574
1551
|
alignItemWithTrigger: l,
|
|
1575
1552
|
className: "isolate z-50",
|
|
1576
|
-
children: /* @__PURE__ */
|
|
1577
|
-
|
|
1553
|
+
children: /* @__PURE__ */ k(
|
|
1554
|
+
P.Popup,
|
|
1578
1555
|
{
|
|
1579
1556
|
"data-slot": "select-content",
|
|
1580
1557
|
className: c(
|
|
@@ -1591,22 +1568,22 @@ function En({
|
|
|
1591
1568
|
),
|
|
1592
1569
|
...u,
|
|
1593
1570
|
children: [
|
|
1594
|
-
/* @__PURE__ */ d(
|
|
1595
|
-
/* @__PURE__ */ d(
|
|
1596
|
-
/* @__PURE__ */ d(
|
|
1571
|
+
/* @__PURE__ */ d(In, {}),
|
|
1572
|
+
/* @__PURE__ */ d(P.List, { className: "flex flex-col gap-0.5 p-0.5", children: a }),
|
|
1573
|
+
/* @__PURE__ */ d(Cn, {})
|
|
1597
1574
|
]
|
|
1598
1575
|
}
|
|
1599
1576
|
)
|
|
1600
1577
|
}
|
|
1601
1578
|
) });
|
|
1602
1579
|
}
|
|
1603
|
-
function
|
|
1580
|
+
function Tn({
|
|
1604
1581
|
className: e,
|
|
1605
1582
|
children: a,
|
|
1606
1583
|
...r
|
|
1607
1584
|
}) {
|
|
1608
|
-
return /* @__PURE__ */
|
|
1609
|
-
|
|
1585
|
+
return /* @__PURE__ */ k(
|
|
1586
|
+
P.Item,
|
|
1610
1587
|
{
|
|
1611
1588
|
"data-slot": "select-item",
|
|
1612
1589
|
className: c(
|
|
@@ -1619,24 +1596,24 @@ function Dn({
|
|
|
1619
1596
|
),
|
|
1620
1597
|
...r,
|
|
1621
1598
|
children: [
|
|
1622
|
-
/* @__PURE__ */ d(
|
|
1599
|
+
/* @__PURE__ */ d(P.ItemText, { className: "flex flex-1 gap-2 shrink-0 whitespace-nowrap", children: a }),
|
|
1623
1600
|
/* @__PURE__ */ d(
|
|
1624
|
-
|
|
1601
|
+
P.ItemIndicator,
|
|
1625
1602
|
{
|
|
1626
1603
|
render: /* @__PURE__ */ d("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
|
|
1627
|
-
children: /* @__PURE__ */ d(
|
|
1604
|
+
children: /* @__PURE__ */ d(ea, { className: "pointer-events-none" })
|
|
1628
1605
|
}
|
|
1629
1606
|
)
|
|
1630
1607
|
]
|
|
1631
1608
|
}
|
|
1632
1609
|
);
|
|
1633
1610
|
}
|
|
1634
|
-
function
|
|
1611
|
+
function In({
|
|
1635
1612
|
className: e,
|
|
1636
1613
|
...a
|
|
1637
1614
|
}) {
|
|
1638
1615
|
return /* @__PURE__ */ d(
|
|
1639
|
-
|
|
1616
|
+
P.ScrollUpArrow,
|
|
1640
1617
|
{
|
|
1641
1618
|
"data-slot": "select-scroll-up-button",
|
|
1642
1619
|
className: c(
|
|
@@ -1644,16 +1621,16 @@ function On({
|
|
|
1644
1621
|
e
|
|
1645
1622
|
),
|
|
1646
1623
|
...a,
|
|
1647
|
-
children: /* @__PURE__ */ d(
|
|
1624
|
+
children: /* @__PURE__ */ d(Na, {})
|
|
1648
1625
|
}
|
|
1649
1626
|
);
|
|
1650
1627
|
}
|
|
1651
|
-
function
|
|
1628
|
+
function Cn({
|
|
1652
1629
|
className: e,
|
|
1653
1630
|
...a
|
|
1654
1631
|
}) {
|
|
1655
1632
|
return /* @__PURE__ */ d(
|
|
1656
|
-
|
|
1633
|
+
P.ScrollDownArrow,
|
|
1657
1634
|
{
|
|
1658
1635
|
"data-slot": "select-scroll-down-button",
|
|
1659
1636
|
className: c(
|
|
@@ -1665,21 +1642,21 @@ function Ln({
|
|
|
1665
1642
|
}
|
|
1666
1643
|
);
|
|
1667
1644
|
}
|
|
1668
|
-
function
|
|
1645
|
+
function kn({
|
|
1669
1646
|
className: e,
|
|
1670
1647
|
classNames: a,
|
|
1671
1648
|
showOutsideDays: r = !0,
|
|
1672
1649
|
captionLayout: n = "label",
|
|
1673
1650
|
hideWeekdays: o = !1,
|
|
1674
|
-
buttonVariant:
|
|
1651
|
+
buttonVariant: i = "outline",
|
|
1675
1652
|
hideWeekends: l,
|
|
1676
1653
|
formatters: u,
|
|
1677
1654
|
components: p,
|
|
1678
|
-
...
|
|
1655
|
+
...g
|
|
1679
1656
|
}) {
|
|
1680
|
-
const x =
|
|
1657
|
+
const x = $a();
|
|
1681
1658
|
return /* @__PURE__ */ d(
|
|
1682
|
-
|
|
1659
|
+
Ha,
|
|
1683
1660
|
{
|
|
1684
1661
|
showOutsideDays: r,
|
|
1685
1662
|
className: c(
|
|
@@ -1701,12 +1678,12 @@ function Un({
|
|
|
1701
1678
|
x.nav
|
|
1702
1679
|
),
|
|
1703
1680
|
button_previous: c(
|
|
1704
|
-
|
|
1681
|
+
ae({ variant: i, icon: "sm" }),
|
|
1705
1682
|
"aria-disabled:opacity-50 aria-disabled:translate-[0px] aria-disabled:shadow-none aria-disabled:pointer-events-none",
|
|
1706
1683
|
x.button_previous
|
|
1707
1684
|
),
|
|
1708
1685
|
button_next: c(
|
|
1709
|
-
|
|
1686
|
+
ae({ variant: i, icon: "sm" }),
|
|
1710
1687
|
"aria-disabled:opacity-50 aria-disabled:translate-[0px] aria-disabled:shadow-none aria-disabled:pointer-events-none",
|
|
1711
1688
|
x.button_next
|
|
1712
1689
|
),
|
|
@@ -1750,45 +1727,45 @@ function Un({
|
|
|
1750
1727
|
...a
|
|
1751
1728
|
},
|
|
1752
1729
|
components: {
|
|
1753
|
-
Root: ({ className: v, rootRef:
|
|
1730
|
+
Root: ({ className: v, rootRef: w, ...z }) => /* @__PURE__ */ d(
|
|
1754
1731
|
"div",
|
|
1755
1732
|
{
|
|
1756
1733
|
"data-slot": "calendar",
|
|
1757
|
-
ref:
|
|
1734
|
+
ref: w,
|
|
1758
1735
|
className: c(v),
|
|
1759
|
-
...
|
|
1736
|
+
...z
|
|
1760
1737
|
}
|
|
1761
1738
|
),
|
|
1762
|
-
Chevron: ({ className: v, orientation:
|
|
1763
|
-
|
|
1739
|
+
Chevron: ({ className: v, orientation: w, ...z }) => w === "left" ? /* @__PURE__ */ d(Ea, { className: c("size-4", v), ...z }) : w === "right" ? /* @__PURE__ */ d(
|
|
1740
|
+
Pa,
|
|
1764
1741
|
{
|
|
1765
1742
|
className: c("size-4", v),
|
|
1766
|
-
...
|
|
1743
|
+
...z
|
|
1767
1744
|
}
|
|
1768
|
-
) : /* @__PURE__ */ d(ze, { className: c("size-4", v), ...
|
|
1769
|
-
Weekday: ({ children: v, ...
|
|
1770
|
-
const
|
|
1771
|
-
return l &&
|
|
1745
|
+
) : /* @__PURE__ */ d(ze, { className: c("size-4", v), ...z }),
|
|
1746
|
+
Weekday: ({ children: v, ...w }) => {
|
|
1747
|
+
const z = w["aria-label"] === "Saturday" || w["aria-label"] === "Sunday";
|
|
1748
|
+
return l && z ? /* @__PURE__ */ d("td", { hidden: !0 }) : /* @__PURE__ */ d("td", { ...w, children: v });
|
|
1772
1749
|
},
|
|
1773
|
-
Day: ({ children: v, ...
|
|
1774
|
-
const
|
|
1775
|
-
return l && (
|
|
1750
|
+
Day: ({ children: v, ...w }) => {
|
|
1751
|
+
const z = new Date(w.day.date).getDay();
|
|
1752
|
+
return l && (z === 0 || z === 6) ? /* @__PURE__ */ d("td", { hidden: !0 }) : w.modifiers.hidden ? /* @__PURE__ */ d("td", { className: "all-unset size-(--cell-size) m-1 bg-foreground opacity-20 rounded-base" }) : /* @__PURE__ */ d("td", { ...w, children: v });
|
|
1776
1753
|
},
|
|
1777
|
-
Dropdown:
|
|
1778
|
-
DayButton:
|
|
1754
|
+
Dropdown: Rn,
|
|
1755
|
+
DayButton: Sn,
|
|
1779
1756
|
...p
|
|
1780
1757
|
},
|
|
1781
|
-
...
|
|
1758
|
+
...g
|
|
1782
1759
|
}
|
|
1783
1760
|
);
|
|
1784
1761
|
}
|
|
1785
|
-
function
|
|
1762
|
+
function Sn({
|
|
1786
1763
|
day: e,
|
|
1787
1764
|
modifiers: a,
|
|
1788
1765
|
...r
|
|
1789
1766
|
}) {
|
|
1790
|
-
const n =
|
|
1791
|
-
return
|
|
1767
|
+
const n = ee.useRef(null);
|
|
1768
|
+
return ee.useEffect(() => {
|
|
1792
1769
|
a.focused && n.current?.focus();
|
|
1793
1770
|
}, [a.focused]), /* @__PURE__ */ d(
|
|
1794
1771
|
ge,
|
|
@@ -1809,34 +1786,34 @@ function Bn({
|
|
|
1809
1786
|
}
|
|
1810
1787
|
);
|
|
1811
1788
|
}
|
|
1812
|
-
function
|
|
1813
|
-
const { options: a, onChange: r, value: n } = e, o = a?.find((l) => l.value === n),
|
|
1789
|
+
function Rn(e) {
|
|
1790
|
+
const { options: a, onChange: r, value: n } = e, o = a?.find((l) => l.value === n), i = (l) => {
|
|
1814
1791
|
r?.({
|
|
1815
1792
|
target: { value: l }
|
|
1816
1793
|
});
|
|
1817
1794
|
};
|
|
1818
|
-
return /* @__PURE__ */
|
|
1819
|
-
|
|
1795
|
+
return /* @__PURE__ */ k(
|
|
1796
|
+
la,
|
|
1820
1797
|
{
|
|
1821
1798
|
value: n?.toString(),
|
|
1822
|
-
onValueChange: (l) =>
|
|
1799
|
+
onValueChange: (l) => i(l),
|
|
1823
1800
|
children: [
|
|
1824
1801
|
/* @__PURE__ */ d(
|
|
1825
|
-
|
|
1802
|
+
An,
|
|
1826
1803
|
{
|
|
1827
1804
|
variant: "ghost",
|
|
1828
1805
|
raised: null,
|
|
1829
1806
|
extrude: null,
|
|
1830
1807
|
className: "w-fit mx-1",
|
|
1831
1808
|
size: "sm",
|
|
1832
|
-
children: /* @__PURE__ */ d(
|
|
1809
|
+
children: /* @__PURE__ */ d(wn, { children: o?.label })
|
|
1833
1810
|
}
|
|
1834
1811
|
),
|
|
1835
|
-
/* @__PURE__ */ d(
|
|
1836
|
-
|
|
1812
|
+
/* @__PURE__ */ d(zn, { className: "bg-transparent border-0 w-30 shadow-none", children: /* @__PURE__ */ d("div", { className: "p-2", children: /* @__PURE__ */ d("div", { className: "flex flex-col items-center bg-foreground shadow-xs rounded-base", children: a?.map((l) => /* @__PURE__ */ d(
|
|
1813
|
+
Tn,
|
|
1837
1814
|
{
|
|
1838
1815
|
className: c(
|
|
1839
|
-
|
|
1816
|
+
ae({ extrude: "md" }),
|
|
1840
1817
|
"not-last:rounded-b-none not-first:rounded-t-none border-2 not-last:border-b-0 hover:border-2 hover:z-2 z-1 duration-200"
|
|
1841
1818
|
),
|
|
1842
1819
|
value: l.value.toString(),
|
|
@@ -1848,7 +1825,7 @@ function jn(e) {
|
|
|
1848
1825
|
}
|
|
1849
1826
|
);
|
|
1850
1827
|
}
|
|
1851
|
-
const
|
|
1828
|
+
const _n = S(
|
|
1852
1829
|
"bg-surface border text-foreground overflow-hidden rounded-base text-sm flex flex-col",
|
|
1853
1830
|
{
|
|
1854
1831
|
variants: {
|
|
@@ -1871,7 +1848,7 @@ const Fn = R(
|
|
|
1871
1848
|
}
|
|
1872
1849
|
}
|
|
1873
1850
|
);
|
|
1874
|
-
function
|
|
1851
|
+
function Nn({
|
|
1875
1852
|
className: e,
|
|
1876
1853
|
size: a = "md",
|
|
1877
1854
|
raised: r = "md",
|
|
@@ -1882,12 +1859,12 @@ function $n({
|
|
|
1882
1859
|
{
|
|
1883
1860
|
"data-slot": "card",
|
|
1884
1861
|
"data-size": a,
|
|
1885
|
-
className: c(
|
|
1862
|
+
className: c(_n({ raised: r, size: a }), "group/card", e),
|
|
1886
1863
|
...n
|
|
1887
1864
|
}
|
|
1888
1865
|
);
|
|
1889
1866
|
}
|
|
1890
|
-
function
|
|
1867
|
+
function En({ className: e, ...a }) {
|
|
1891
1868
|
return /* @__PURE__ */ d(
|
|
1892
1869
|
"div",
|
|
1893
1870
|
{
|
|
@@ -1905,7 +1882,7 @@ function Hn({ className: e, ...a }) {
|
|
|
1905
1882
|
}
|
|
1906
1883
|
);
|
|
1907
1884
|
}
|
|
1908
|
-
function
|
|
1885
|
+
function Pn({ className: e, ...a }) {
|
|
1909
1886
|
return /* @__PURE__ */ d(
|
|
1910
1887
|
"div",
|
|
1911
1888
|
{
|
|
@@ -1926,7 +1903,7 @@ function Gn({ className: e, ...a }) {
|
|
|
1926
1903
|
}
|
|
1927
1904
|
);
|
|
1928
1905
|
}
|
|
1929
|
-
function
|
|
1906
|
+
function On({ className: e, ...a }) {
|
|
1930
1907
|
return /* @__PURE__ */ d(
|
|
1931
1908
|
"div",
|
|
1932
1909
|
{
|
|
@@ -1943,7 +1920,7 @@ function Wn({ className: e, ...a }) {
|
|
|
1943
1920
|
}
|
|
1944
1921
|
);
|
|
1945
1922
|
}
|
|
1946
|
-
function
|
|
1923
|
+
function Dn({ className: e, ...a }) {
|
|
1947
1924
|
return /* @__PURE__ */ d(
|
|
1948
1925
|
"div",
|
|
1949
1926
|
{
|
|
@@ -1956,7 +1933,7 @@ function Mn({ className: e, ...a }) {
|
|
|
1956
1933
|
}
|
|
1957
1934
|
);
|
|
1958
1935
|
}
|
|
1959
|
-
function
|
|
1936
|
+
function Ln({ className: e, ...a }) {
|
|
1960
1937
|
return /* @__PURE__ */ d(
|
|
1961
1938
|
"div",
|
|
1962
1939
|
{
|
|
@@ -1975,7 +1952,7 @@ function qn({ className: e, ...a }) {
|
|
|
1975
1952
|
}
|
|
1976
1953
|
);
|
|
1977
1954
|
}
|
|
1978
|
-
function
|
|
1955
|
+
function Un({ className: e, ...a }) {
|
|
1979
1956
|
return /* @__PURE__ */ d(
|
|
1980
1957
|
"div",
|
|
1981
1958
|
{
|
|
@@ -1991,7 +1968,7 @@ function Vn({ className: e, ...a }) {
|
|
|
1991
1968
|
}
|
|
1992
1969
|
);
|
|
1993
1970
|
}
|
|
1994
|
-
function
|
|
1971
|
+
function Bn({ className: e, ...a }) {
|
|
1995
1972
|
return /* @__PURE__ */ d(
|
|
1996
1973
|
"div",
|
|
1997
1974
|
{
|
|
@@ -2008,7 +1985,7 @@ function Xn({ className: e, ...a }) {
|
|
|
2008
1985
|
}
|
|
2009
1986
|
);
|
|
2010
1987
|
}
|
|
2011
|
-
const
|
|
1988
|
+
const jn = S(
|
|
2012
1989
|
"neo-base neo-checkbox-focus flex size-5 cursor-pointer items-center justify-center rounded-md border relative shrink-0 transition-[color,opacity,box-shadow,translate] data-checked:bg-main aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-invalid:bg-accent-red-secondary",
|
|
2013
1990
|
{
|
|
2014
1991
|
variants: {
|
|
@@ -2025,35 +2002,35 @@ const Jn = R(
|
|
|
2025
2002
|
}
|
|
2026
2003
|
}
|
|
2027
2004
|
);
|
|
2028
|
-
function
|
|
2005
|
+
function $n({
|
|
2029
2006
|
className: e,
|
|
2030
2007
|
size: a,
|
|
2031
2008
|
onCheckedChange: r,
|
|
2032
2009
|
...n
|
|
2033
2010
|
}) {
|
|
2034
|
-
const { trigger: o } =
|
|
2011
|
+
const { trigger: o } = se();
|
|
2035
2012
|
return /* @__PURE__ */ d(
|
|
2036
|
-
|
|
2013
|
+
Le.Root,
|
|
2037
2014
|
{
|
|
2038
2015
|
"data-slot": "checkbox",
|
|
2039
2016
|
"data-size": a,
|
|
2040
2017
|
className: c(
|
|
2041
|
-
|
|
2018
|
+
jn({ size: a }),
|
|
2042
2019
|
"peer group/checkbox",
|
|
2043
2020
|
e
|
|
2044
2021
|
),
|
|
2045
2022
|
"aria-label": n["aria-label"] ?? "checkbox",
|
|
2046
|
-
onCheckedChange: (
|
|
2047
|
-
o(
|
|
2023
|
+
onCheckedChange: (i, l) => {
|
|
2024
|
+
o(sn), r?.(i, l);
|
|
2048
2025
|
},
|
|
2049
2026
|
...n,
|
|
2050
2027
|
children: /* @__PURE__ */ d(
|
|
2051
|
-
|
|
2028
|
+
Le.Indicator,
|
|
2052
2029
|
{
|
|
2053
2030
|
"data-slot": "checkbox-indicator",
|
|
2054
2031
|
className: "grid place-content-center text-current",
|
|
2055
2032
|
children: /* @__PURE__ */ d(
|
|
2056
|
-
|
|
2033
|
+
ea,
|
|
2057
2034
|
{
|
|
2058
2035
|
stroke: 3.5,
|
|
2059
2036
|
className: c(
|
|
@@ -2071,9 +2048,9 @@ function Yn({
|
|
|
2071
2048
|
}
|
|
2072
2049
|
);
|
|
2073
2050
|
}
|
|
2074
|
-
function
|
|
2051
|
+
function Hn({ className: e, ...a }) {
|
|
2075
2052
|
return /* @__PURE__ */ d(
|
|
2076
|
-
|
|
2053
|
+
Te.Root,
|
|
2077
2054
|
{
|
|
2078
2055
|
className: c("group/collapsible", e),
|
|
2079
2056
|
"data-slot": "collapsible",
|
|
@@ -2081,12 +2058,12 @@ function Kn({ className: e, ...a }) {
|
|
|
2081
2058
|
}
|
|
2082
2059
|
);
|
|
2083
2060
|
}
|
|
2084
|
-
function
|
|
2061
|
+
function Fn({
|
|
2085
2062
|
className: e,
|
|
2086
2063
|
...a
|
|
2087
2064
|
}) {
|
|
2088
2065
|
return /* @__PURE__ */ d(
|
|
2089
|
-
|
|
2066
|
+
Te.Trigger,
|
|
2090
2067
|
{
|
|
2091
2068
|
className: c(
|
|
2092
2069
|
"group-data-open/collapsible:[&_svg]:-scale-y-100",
|
|
@@ -2097,13 +2074,13 @@ function Zn({
|
|
|
2097
2074
|
}
|
|
2098
2075
|
);
|
|
2099
2076
|
}
|
|
2100
|
-
function
|
|
2077
|
+
function Gn({
|
|
2101
2078
|
className: e,
|
|
2102
2079
|
children: a,
|
|
2103
2080
|
...r
|
|
2104
2081
|
}) {
|
|
2105
2082
|
return /* @__PURE__ */ d(
|
|
2106
|
-
|
|
2083
|
+
Te.Panel,
|
|
2107
2084
|
{
|
|
2108
2085
|
className: c("group overflow-hidden", e),
|
|
2109
2086
|
"data-slot": "collapsible-content",
|
|
@@ -2124,9 +2101,9 @@ function Qn({
|
|
|
2124
2101
|
}
|
|
2125
2102
|
);
|
|
2126
2103
|
}
|
|
2127
|
-
function
|
|
2104
|
+
function ca({ className: e, type: a, ...r }) {
|
|
2128
2105
|
return /* @__PURE__ */ d(
|
|
2129
|
-
|
|
2106
|
+
Fa,
|
|
2130
2107
|
{
|
|
2131
2108
|
type: a,
|
|
2132
2109
|
"data-slot": "input",
|
|
@@ -2138,13 +2115,13 @@ function ua({ className: e, type: a, ...r }) {
|
|
|
2138
2115
|
}
|
|
2139
2116
|
);
|
|
2140
2117
|
}
|
|
2141
|
-
function
|
|
2118
|
+
function Wn({
|
|
2142
2119
|
className: e,
|
|
2143
2120
|
containerClassName: a,
|
|
2144
2121
|
...r
|
|
2145
2122
|
}) {
|
|
2146
2123
|
return /* @__PURE__ */ d(
|
|
2147
|
-
|
|
2124
|
+
Ga,
|
|
2148
2125
|
{
|
|
2149
2126
|
"data-slot": "input-otp",
|
|
2150
2127
|
containerClassName: c(
|
|
@@ -2157,7 +2134,7 @@ function eo({
|
|
|
2157
2134
|
}
|
|
2158
2135
|
);
|
|
2159
2136
|
}
|
|
2160
|
-
function
|
|
2137
|
+
function ua({
|
|
2161
2138
|
className: e,
|
|
2162
2139
|
onInput: a,
|
|
2163
2140
|
autosize: r = !1,
|
|
@@ -2167,9 +2144,9 @@ function pa({
|
|
|
2167
2144
|
"textarea",
|
|
2168
2145
|
{
|
|
2169
2146
|
"data-slot": "textarea",
|
|
2170
|
-
onInput: a || ((
|
|
2147
|
+
onInput: a || ((i) => {
|
|
2171
2148
|
if (r) {
|
|
2172
|
-
const l =
|
|
2149
|
+
const l = i.currentTarget;
|
|
2173
2150
|
l.style.height = "auto", l.style.height = l.scrollHeight + "px";
|
|
2174
2151
|
}
|
|
2175
2152
|
}),
|
|
@@ -2186,7 +2163,7 @@ function pa({
|
|
|
2186
2163
|
}
|
|
2187
2164
|
);
|
|
2188
2165
|
}
|
|
2189
|
-
function
|
|
2166
|
+
function pa({ className: e, ...a }) {
|
|
2190
2167
|
return /* @__PURE__ */ d(
|
|
2191
2168
|
"div",
|
|
2192
2169
|
{
|
|
@@ -2203,7 +2180,7 @@ function ma({ className: e, ...a }) {
|
|
|
2203
2180
|
}
|
|
2204
2181
|
);
|
|
2205
2182
|
}
|
|
2206
|
-
const
|
|
2183
|
+
const Vn = S(
|
|
2207
2184
|
"text-muted h-full gap-2 p-2 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 flex cursor-text items-center justify-center select-none",
|
|
2208
2185
|
{
|
|
2209
2186
|
variants: {
|
|
@@ -2230,7 +2207,7 @@ function ga({
|
|
|
2230
2207
|
role: "group",
|
|
2231
2208
|
"data-slot": "input-group-addon",
|
|
2232
2209
|
"data-align": a,
|
|
2233
|
-
className: c(
|
|
2210
|
+
className: c(Vn({ align: a }), e),
|
|
2234
2211
|
onClick: (n) => {
|
|
2235
2212
|
n.target.closest("button") || n.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
2236
2213
|
},
|
|
@@ -2238,7 +2215,7 @@ function ga({
|
|
|
2238
2215
|
}
|
|
2239
2216
|
);
|
|
2240
2217
|
}
|
|
2241
|
-
const
|
|
2218
|
+
const qn = S("gap-2 text-sm flex items-center", {
|
|
2242
2219
|
variants: {
|
|
2243
2220
|
size: {
|
|
2244
2221
|
xs: "h-7 gap-1 rounded-sm px-1.5 py-0.5",
|
|
@@ -2251,13 +2228,13 @@ const ao = R("gap-2 text-sm flex items-center", {
|
|
|
2251
2228
|
size: "xs"
|
|
2252
2229
|
}
|
|
2253
2230
|
});
|
|
2254
|
-
function
|
|
2231
|
+
function Mn({
|
|
2255
2232
|
className: e,
|
|
2256
2233
|
type: a = "button",
|
|
2257
2234
|
variant: r = "outline",
|
|
2258
2235
|
extrude: n = "xs",
|
|
2259
2236
|
size: o,
|
|
2260
|
-
...
|
|
2237
|
+
...i
|
|
2261
2238
|
}) {
|
|
2262
2239
|
return /* @__PURE__ */ d(
|
|
2263
2240
|
ge,
|
|
@@ -2266,13 +2243,13 @@ function ro({
|
|
|
2266
2243
|
"data-size": o,
|
|
2267
2244
|
variant: r,
|
|
2268
2245
|
extrude: n ?? null,
|
|
2269
|
-
"aria-label":
|
|
2270
|
-
className: c(
|
|
2271
|
-
...
|
|
2246
|
+
"aria-label": i["aria-label"] ?? "input-button",
|
|
2247
|
+
className: c(qn({ size: o }), e),
|
|
2248
|
+
...i
|
|
2272
2249
|
}
|
|
2273
2250
|
);
|
|
2274
2251
|
}
|
|
2275
|
-
function
|
|
2252
|
+
function Jn({ className: e, ...a }) {
|
|
2276
2253
|
return /* @__PURE__ */ d(
|
|
2277
2254
|
"span",
|
|
2278
2255
|
{
|
|
@@ -2284,12 +2261,12 @@ function no({ className: e, ...a }) {
|
|
|
2284
2261
|
}
|
|
2285
2262
|
);
|
|
2286
2263
|
}
|
|
2287
|
-
function
|
|
2264
|
+
function ma({
|
|
2288
2265
|
className: e,
|
|
2289
2266
|
...a
|
|
2290
2267
|
}) {
|
|
2291
2268
|
return /* @__PURE__ */ d(
|
|
2292
|
-
|
|
2269
|
+
ca,
|
|
2293
2270
|
{
|
|
2294
2271
|
"data-slot": "input-group-control",
|
|
2295
2272
|
className: c(
|
|
@@ -2312,12 +2289,12 @@ function ha({
|
|
|
2312
2289
|
}
|
|
2313
2290
|
);
|
|
2314
2291
|
}
|
|
2315
|
-
function
|
|
2292
|
+
function Xn({
|
|
2316
2293
|
className: e,
|
|
2317
2294
|
...a
|
|
2318
2295
|
}) {
|
|
2319
2296
|
return /* @__PURE__ */ d(
|
|
2320
|
-
|
|
2297
|
+
ua,
|
|
2321
2298
|
{
|
|
2322
2299
|
"data-slot": "input-group-control",
|
|
2323
2300
|
className: c(
|
|
@@ -2338,7 +2315,7 @@ function oo({
|
|
|
2338
2315
|
}
|
|
2339
2316
|
);
|
|
2340
2317
|
}
|
|
2341
|
-
const
|
|
2318
|
+
const Kn = S(
|
|
2342
2319
|
"gap-2 leading-none group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",
|
|
2343
2320
|
{
|
|
2344
2321
|
variants: {
|
|
@@ -2357,7 +2334,7 @@ const io = R(
|
|
|
2357
2334
|
}
|
|
2358
2335
|
}
|
|
2359
2336
|
);
|
|
2360
|
-
function
|
|
2337
|
+
function Yn({
|
|
2361
2338
|
size: e = "sm",
|
|
2362
2339
|
variant: a,
|
|
2363
2340
|
className: r,
|
|
@@ -2369,497 +2346,12 @@ function so({
|
|
|
2369
2346
|
{
|
|
2370
2347
|
"data-slot": "label",
|
|
2371
2348
|
htmlFor: n,
|
|
2372
|
-
className: c(
|
|
2349
|
+
className: c(Kn({ size: e, variant: a }), r),
|
|
2373
2350
|
...o
|
|
2374
2351
|
}
|
|
2375
2352
|
);
|
|
2376
2353
|
}
|
|
2377
|
-
const
|
|
2378
|
-
id: "default_center",
|
|
2379
|
-
latitude: 51.049999,
|
|
2380
|
-
longitude: -114.066666
|
|
2381
|
-
};
|
|
2382
|
-
function co({
|
|
2383
|
-
pins: e,
|
|
2384
|
-
onChange: a,
|
|
2385
|
-
allowMultiple: r = !0,
|
|
2386
|
-
readonly: n = !1,
|
|
2387
|
-
fixed: o = !1,
|
|
2388
|
-
zoom: s = 12,
|
|
2389
|
-
pitch: l,
|
|
2390
|
-
className: u,
|
|
2391
|
-
children: p,
|
|
2392
|
-
...m
|
|
2393
|
-
}) {
|
|
2394
|
-
const x = L.useRef(null), [v, A] = L.useState(null), I = r ? v : e ? e[0]?.id : null, E = L.useMemo(() => ({ ...!e || e.length === 0 ? lo : e[0], zoom: s, pitch: l }), [e, s, l]), O = L.useCallback(
|
|
2395
|
-
(w) => {
|
|
2396
|
-
if (n || o) return;
|
|
2397
|
-
const z = e ? e.filter((N) => N.id !== w) : [];
|
|
2398
|
-
a?.(z), I === w && A(null);
|
|
2399
|
-
},
|
|
2400
|
-
[e, a, I]
|
|
2401
|
-
), G = (w, z) => {
|
|
2402
|
-
w.stopPropagation(), A((N) => N && N === z ? null : z);
|
|
2403
|
-
}, S = L.useCallback(
|
|
2404
|
-
(w, z) => {
|
|
2405
|
-
if (!a || !e || o || n) return;
|
|
2406
|
-
const N = e.map(
|
|
2407
|
-
(P) => P.id === z ? { ...P, longitude: w.lngLat.lng, latitude: w.lngLat.lat } : P
|
|
2408
|
-
);
|
|
2409
|
-
a(N);
|
|
2410
|
-
},
|
|
2411
|
-
[e, a]
|
|
2412
|
-
), _ = L.useCallback(
|
|
2413
|
-
(w) => {
|
|
2414
|
-
if (I && r)
|
|
2415
|
-
return A(null);
|
|
2416
|
-
if (n || !a || o) return;
|
|
2417
|
-
if (!r && e) {
|
|
2418
|
-
const N = e[0];
|
|
2419
|
-
return a([
|
|
2420
|
-
{
|
|
2421
|
-
...N,
|
|
2422
|
-
longitude: w.lngLat.lng,
|
|
2423
|
-
latitude: w.lngLat.lat
|
|
2424
|
-
}
|
|
2425
|
-
]);
|
|
2426
|
-
}
|
|
2427
|
-
const z = {
|
|
2428
|
-
id: crypto.randomUUID(),
|
|
2429
|
-
longitude: w.lngLat.lng,
|
|
2430
|
-
latitude: w.lngLat.lat
|
|
2431
|
-
};
|
|
2432
|
-
a(e ? [...e, z] : [z]), A(z.id);
|
|
2433
|
-
},
|
|
2434
|
-
[e, a, n, I]
|
|
2435
|
-
);
|
|
2436
|
-
L.useEffect(() => () => {
|
|
2437
|
-
x.current?.getMap()?.remove();
|
|
2438
|
-
}, []);
|
|
2439
|
-
const y = L.useMemo(() => o ? {
|
|
2440
|
-
dragPan: !1,
|
|
2441
|
-
scrollZoom: !1,
|
|
2442
|
-
doubleClickZoom: !1,
|
|
2443
|
-
touchZoom: !1,
|
|
2444
|
-
keyboard: !1,
|
|
2445
|
-
dragRotate: !1,
|
|
2446
|
-
...m
|
|
2447
|
-
} : m, [n, o, e]);
|
|
2448
|
-
return /* @__PURE__ */ d(
|
|
2449
|
-
"div",
|
|
2450
|
-
{
|
|
2451
|
-
"data-slot": "map-container",
|
|
2452
|
-
className: c(
|
|
2453
|
-
"h-96 w-96 bg-foreground rounded-base overflow-hidden relative",
|
|
2454
|
-
u
|
|
2455
|
-
),
|
|
2456
|
-
children: /* @__PURE__ */ C(
|
|
2457
|
-
Va,
|
|
2458
|
-
{
|
|
2459
|
-
"data-slot": "map",
|
|
2460
|
-
ref: x,
|
|
2461
|
-
initialViewState: E,
|
|
2462
|
-
mapStyle: "https://tiles.openfreemap.org/styles/liberty",
|
|
2463
|
-
style: {
|
|
2464
|
-
width: "100%",
|
|
2465
|
-
height: "100%"
|
|
2466
|
-
},
|
|
2467
|
-
onClick: _,
|
|
2468
|
-
minZoom: 0,
|
|
2469
|
-
maxZoom: 18,
|
|
2470
|
-
maxPitch: 80,
|
|
2471
|
-
reuseMaps: !0,
|
|
2472
|
-
doubleClickZoom: !1,
|
|
2473
|
-
sky: {
|
|
2474
|
-
"sky-color": "#5294FFFF",
|
|
2475
|
-
"horizon-color": "#DDEFFDFF"
|
|
2476
|
-
},
|
|
2477
|
-
attributionControl: !1,
|
|
2478
|
-
"aria-readonly": n,
|
|
2479
|
-
...y,
|
|
2480
|
-
children: [
|
|
2481
|
-
(e ?? []).map(({ children: w, id: z, ...N }) => /* @__PURE__ */ d(
|
|
2482
|
-
Xa,
|
|
2483
|
-
{
|
|
2484
|
-
"data-slot": "map-marker",
|
|
2485
|
-
anchor: "bottom",
|
|
2486
|
-
draggable: !o && !n,
|
|
2487
|
-
onDragEnd: (P) => S(P, z),
|
|
2488
|
-
className: c(
|
|
2489
|
-
"animate-in",
|
|
2490
|
-
I === z ? "z-2" : "z-1 hover:z-10 hover:*:opacity-90"
|
|
2491
|
-
),
|
|
2492
|
-
...N,
|
|
2493
|
-
children: /* @__PURE__ */ d(
|
|
2494
|
-
"div",
|
|
2495
|
-
{
|
|
2496
|
-
"data-slot": "map-marker-inner",
|
|
2497
|
-
"data-selected": I === z,
|
|
2498
|
-
onClick: (P) => G(P, z),
|
|
2499
|
-
className: "data-[selected=true]:cursor-grab cursor-pointer group *:[svg]:drop-shadow-[1px_1px_0_rgba(0,0,0,1)]",
|
|
2500
|
-
children: w ? w(() => O(z)) : /* @__PURE__ */ C(F, { children: [
|
|
2501
|
-
/* @__PURE__ */ d(
|
|
2502
|
-
Oa,
|
|
2503
|
-
{
|
|
2504
|
-
"data-slot": "map-marker-svg",
|
|
2505
|
-
className: "fill-main-secondary hover:scale-110 group-data-[selected=true]:hover:scale-145 group-data-[selected=true]:scale-140 group-data-[selected=true]:fill-main size-10 stroke-foreground transition-all duration-300 ease origin-bottom"
|
|
2506
|
-
}
|
|
2507
|
-
),
|
|
2508
|
-
!n && !o && r && /* @__PURE__ */ d(
|
|
2509
|
-
"div",
|
|
2510
|
-
{
|
|
2511
|
-
"data-slot": "map-marker-popup",
|
|
2512
|
-
className: "absolute -right-2 -top-6 duration-300 ease origin-bottom-left scale-0 opacity-0 pointer-events-none group-data-[selected=true]:pointer-events-auto group-data-[selected=true]:scale-100 group-data-[selected=true]:opacity-100",
|
|
2513
|
-
children: /* @__PURE__ */ d(
|
|
2514
|
-
"a",
|
|
2515
|
-
{
|
|
2516
|
-
type: "button",
|
|
2517
|
-
"data-slot": "map-marker-delete",
|
|
2518
|
-
onClick: (P) => {
|
|
2519
|
-
P.stopPropagation(), O(z);
|
|
2520
|
-
},
|
|
2521
|
-
className: c(
|
|
2522
|
-
Y({
|
|
2523
|
-
icon: "xs",
|
|
2524
|
-
raised: null,
|
|
2525
|
-
variant: "destructive",
|
|
2526
|
-
extrude: "xs"
|
|
2527
|
-
}),
|
|
2528
|
-
"rounded-full"
|
|
2529
|
-
),
|
|
2530
|
-
"aria-label": "Delete Pin",
|
|
2531
|
-
children: /* @__PURE__ */ d(La, {})
|
|
2532
|
-
}
|
|
2533
|
-
)
|
|
2534
|
-
}
|
|
2535
|
-
)
|
|
2536
|
-
] })
|
|
2537
|
-
}
|
|
2538
|
-
)
|
|
2539
|
-
},
|
|
2540
|
-
z
|
|
2541
|
-
)),
|
|
2542
|
-
p || /* @__PURE__ */ C(F, { children: [
|
|
2543
|
-
/* @__PURE__ */ d(uo, {}),
|
|
2544
|
-
!o && /* @__PURE__ */ C(F, { children: [
|
|
2545
|
-
/* @__PURE__ */ d(
|
|
2546
|
-
Ja,
|
|
2547
|
-
{
|
|
2548
|
-
"data-slot": "map-nav-control",
|
|
2549
|
-
position: "bottom-right",
|
|
2550
|
-
showCompass: !1
|
|
2551
|
-
}
|
|
2552
|
-
),
|
|
2553
|
-
/* @__PURE__ */ d(
|
|
2554
|
-
Ya,
|
|
2555
|
-
{
|
|
2556
|
-
"data-slot": "map-geolocate-control",
|
|
2557
|
-
position: "top-left"
|
|
2558
|
-
}
|
|
2559
|
-
),
|
|
2560
|
-
/* @__PURE__ */ d(
|
|
2561
|
-
Ka,
|
|
2562
|
-
{
|
|
2563
|
-
"data-slot": "map-fullscreen-control",
|
|
2564
|
-
position: "top-right"
|
|
2565
|
-
}
|
|
2566
|
-
)
|
|
2567
|
-
] })
|
|
2568
|
-
] })
|
|
2569
|
-
]
|
|
2570
|
-
}
|
|
2571
|
-
)
|
|
2572
|
-
}
|
|
2573
|
-
);
|
|
2574
|
-
}
|
|
2575
|
-
const ce = {
|
|
2576
|
-
"water-fill": {
|
|
2577
|
-
type: "fill",
|
|
2578
|
-
source: "openmaptiles",
|
|
2579
|
-
"source-layer": "water",
|
|
2580
|
-
paint: { "fill-color": "#00C8F0FF" },
|
|
2581
|
-
beforeId: "landcover_sand"
|
|
2582
|
-
},
|
|
2583
|
-
"park-fill": {
|
|
2584
|
-
type: "fill",
|
|
2585
|
-
source: "openmaptiles",
|
|
2586
|
-
"source-layer": "park",
|
|
2587
|
-
paint: { "fill-color": "#05E17AFF", "fill-opacity": 0.3 },
|
|
2588
|
-
beforeId: "park_outline"
|
|
2589
|
-
},
|
|
2590
|
-
"landcover-grass-fill": {
|
|
2591
|
-
type: "fill",
|
|
2592
|
-
source: "openmaptiles",
|
|
2593
|
-
"source-layer": "landcover",
|
|
2594
|
-
filter: ["==", ["get", "class"], "grass"],
|
|
2595
|
-
paint: { "fill-color": "#00D696FF", "fill-opacity": 0.3 },
|
|
2596
|
-
beforeId: "landcover_ice"
|
|
2597
|
-
},
|
|
2598
|
-
"landcover-sand-fill": {
|
|
2599
|
-
type: "fill",
|
|
2600
|
-
source: "openmaptiles",
|
|
2601
|
-
"source-layer": "landcover",
|
|
2602
|
-
filter: ["==", ["get", "class"], "sand"],
|
|
2603
|
-
paint: {
|
|
2604
|
-
"fill-color": "#FACC00FF"
|
|
2605
|
-
},
|
|
2606
|
-
beforeId: "aeroway_fill"
|
|
2607
|
-
},
|
|
2608
|
-
"landuse-other-fill": {
|
|
2609
|
-
type: "fill",
|
|
2610
|
-
source: "openmaptiles",
|
|
2611
|
-
"source-layer": "landuse",
|
|
2612
|
-
paint: {
|
|
2613
|
-
"fill-color": "#FDF7C4FF",
|
|
2614
|
-
"fill-opacity": 0.4
|
|
2615
|
-
},
|
|
2616
|
-
beforeId: "landcover_wood"
|
|
2617
|
-
},
|
|
2618
|
-
"landuse-residential-fill": {
|
|
2619
|
-
type: "fill",
|
|
2620
|
-
source: "openmaptiles",
|
|
2621
|
-
"source-layer": "landuse",
|
|
2622
|
-
filter: ["==", ["get", "class"], "residential"],
|
|
2623
|
-
paint: {
|
|
2624
|
-
"fill-color": "#FFEDD6FF",
|
|
2625
|
-
"fill-opacity": 1
|
|
2626
|
-
},
|
|
2627
|
-
beforeId: "landcover_wood"
|
|
2628
|
-
},
|
|
2629
|
-
"road-ramp-casing": {
|
|
2630
|
-
type: "line",
|
|
2631
|
-
source: "openmaptiles",
|
|
2632
|
-
"source-layer": "transportation",
|
|
2633
|
-
filter: ["all", ["==", ["get", "ramp"], 1]],
|
|
2634
|
-
layout: { "line-cap": "butt", "line-join": "round" },
|
|
2635
|
-
paint: {
|
|
2636
|
-
"line-color": "#FFEDD6FF",
|
|
2637
|
-
"line-width": [
|
|
2638
|
-
"interpolate",
|
|
2639
|
-
["exponential", 1.2],
|
|
2640
|
-
["zoom"],
|
|
2641
|
-
8,
|
|
2642
|
-
1.5,
|
|
2643
|
-
20,
|
|
2644
|
-
17
|
|
2645
|
-
]
|
|
2646
|
-
},
|
|
2647
|
-
beforeId: "road-highlight-casing"
|
|
2648
|
-
},
|
|
2649
|
-
"road-highlight-casing": {
|
|
2650
|
-
type: "line",
|
|
2651
|
-
source: "openmaptiles",
|
|
2652
|
-
"source-layer": "transportation",
|
|
2653
|
-
filter: [
|
|
2654
|
-
"all",
|
|
2655
|
-
["match", ["get", "brunnel"], ["bridge", "tunnel", "ramp"], !1, !0],
|
|
2656
|
-
["match", ["get", "class"], ["secondary", "tertiary"], !0, !1],
|
|
2657
|
-
["match", ["get", "class"], ["primary", "trunk"], !0, !1],
|
|
2658
|
-
["match", ["get", "class"], ["motorway"], !0, !1],
|
|
2659
|
-
["!=", ["get", "ramp"], 1]
|
|
2660
|
-
],
|
|
2661
|
-
layout: { "line-cap": "butt", "line-join": "round" },
|
|
2662
|
-
paint: {
|
|
2663
|
-
"line-color": "#FFEDD6FF",
|
|
2664
|
-
"line-width": [
|
|
2665
|
-
"interpolate",
|
|
2666
|
-
["exponential", 1.2],
|
|
2667
|
-
["zoom"],
|
|
2668
|
-
8,
|
|
2669
|
-
1.5,
|
|
2670
|
-
20,
|
|
2671
|
-
17
|
|
2672
|
-
]
|
|
2673
|
-
},
|
|
2674
|
-
beforeId: "road-ramp-line"
|
|
2675
|
-
},
|
|
2676
|
-
"road-ramp-line": {
|
|
2677
|
-
type: "line",
|
|
2678
|
-
source: "openmaptiles",
|
|
2679
|
-
"source-layer": "transportation",
|
|
2680
|
-
filter: ["all", ["==", ["get", "ramp"], 1]],
|
|
2681
|
-
layout: { "line-cap": "round", "line-join": "round" },
|
|
2682
|
-
paint: {
|
|
2683
|
-
"line-color": "#FFEDD6FF",
|
|
2684
|
-
"line-width": [
|
|
2685
|
-
"interpolate",
|
|
2686
|
-
["exponential", 1.3],
|
|
2687
|
-
["zoom"],
|
|
2688
|
-
5,
|
|
2689
|
-
0,
|
|
2690
|
-
7,
|
|
2691
|
-
1,
|
|
2692
|
-
20,
|
|
2693
|
-
18
|
|
2694
|
-
]
|
|
2695
|
-
},
|
|
2696
|
-
beforeId: "road-motorway-line"
|
|
2697
|
-
},
|
|
2698
|
-
"road-motorway-line": {
|
|
2699
|
-
type: "line",
|
|
2700
|
-
source: "openmaptiles",
|
|
2701
|
-
"source-layer": "transportation",
|
|
2702
|
-
filter: [
|
|
2703
|
-
"all",
|
|
2704
|
-
["match", ["get", "brunnel"], ["bridge", "tunnel"], !1, !0],
|
|
2705
|
-
["match", ["get", "class"], ["motorway"], !0, !1]
|
|
2706
|
-
],
|
|
2707
|
-
layout: { "line-cap": "round", "line-join": "round" },
|
|
2708
|
-
paint: {
|
|
2709
|
-
"line-color": "#FF7A05FF",
|
|
2710
|
-
"line-width": [
|
|
2711
|
-
"interpolate",
|
|
2712
|
-
["exponential", 1.3],
|
|
2713
|
-
["zoom"],
|
|
2714
|
-
5,
|
|
2715
|
-
0,
|
|
2716
|
-
7,
|
|
2717
|
-
1,
|
|
2718
|
-
20,
|
|
2719
|
-
18
|
|
2720
|
-
]
|
|
2721
|
-
},
|
|
2722
|
-
beforeId: "road-secondary-tertiary-line"
|
|
2723
|
-
},
|
|
2724
|
-
"road-secondary-tertiary-line": {
|
|
2725
|
-
type: "line",
|
|
2726
|
-
source: "openmaptiles",
|
|
2727
|
-
"source-layer": "transportation",
|
|
2728
|
-
filter: [
|
|
2729
|
-
"all",
|
|
2730
|
-
["match", ["get", "brunnel"], ["bridge", "tunnel"], !1, !0],
|
|
2731
|
-
["match", ["get", "class"], ["secondary", "tertiary"], !0, !1],
|
|
2732
|
-
["!=", ["get", "ramp"], 1]
|
|
2733
|
-
],
|
|
2734
|
-
layout: { "line-cap": "butt", "line-join": "round" },
|
|
2735
|
-
paint: {
|
|
2736
|
-
"line-color": "#FACC00FF",
|
|
2737
|
-
"line-width": [
|
|
2738
|
-
"interpolate",
|
|
2739
|
-
["exponential", 1.2],
|
|
2740
|
-
["zoom"],
|
|
2741
|
-
6.5,
|
|
2742
|
-
0,
|
|
2743
|
-
8,
|
|
2744
|
-
0.5,
|
|
2745
|
-
20,
|
|
2746
|
-
13
|
|
2747
|
-
]
|
|
2748
|
-
},
|
|
2749
|
-
beforeId: "road-trunk-primary-line"
|
|
2750
|
-
},
|
|
2751
|
-
"road-trunk-primary-line": {
|
|
2752
|
-
type: "line",
|
|
2753
|
-
source: "openmaptiles",
|
|
2754
|
-
"source-layer": "transportation",
|
|
2755
|
-
filter: [
|
|
2756
|
-
"all",
|
|
2757
|
-
["match", ["get", "brunnel"], ["bridge", "tunnel"], !1, !0],
|
|
2758
|
-
["match", ["get", "class"], ["primary", "trunk"], !0, !1],
|
|
2759
|
-
["!=", ["get", "ramp"], 1]
|
|
2760
|
-
],
|
|
2761
|
-
layout: { "line-cap": "round", "line-join": "round" },
|
|
2762
|
-
paint: {
|
|
2763
|
-
"line-color": "#FDF7C4FF",
|
|
2764
|
-
"line-width": [
|
|
2765
|
-
"interpolate",
|
|
2766
|
-
["exponential", 1.2],
|
|
2767
|
-
["zoom"],
|
|
2768
|
-
6.5,
|
|
2769
|
-
0,
|
|
2770
|
-
8,
|
|
2771
|
-
0.5,
|
|
2772
|
-
20,
|
|
2773
|
-
13
|
|
2774
|
-
]
|
|
2775
|
-
},
|
|
2776
|
-
beforeId: "road-transit-rail-line-casing"
|
|
2777
|
-
},
|
|
2778
|
-
"road-transit-rail-line-casing": {
|
|
2779
|
-
type: "line",
|
|
2780
|
-
source: "openmaptiles",
|
|
2781
|
-
"source-layer": "transportation",
|
|
2782
|
-
filter: [
|
|
2783
|
-
"all",
|
|
2784
|
-
["match", ["get", "brunnel"], ["bridge", "tunnel"], !0, !0],
|
|
2785
|
-
["==", ["get", "class"], "transit"]
|
|
2786
|
-
],
|
|
2787
|
-
paint: {
|
|
2788
|
-
"line-color": "#FF4D4F",
|
|
2789
|
-
"line-dasharray": [0.2, 8],
|
|
2790
|
-
"line-width": [
|
|
2791
|
-
"interpolate",
|
|
2792
|
-
["exponential", 1.4],
|
|
2793
|
-
["zoom"],
|
|
2794
|
-
14.5,
|
|
2795
|
-
0,
|
|
2796
|
-
15,
|
|
2797
|
-
3,
|
|
2798
|
-
20,
|
|
2799
|
-
8
|
|
2800
|
-
]
|
|
2801
|
-
},
|
|
2802
|
-
beforeId: "road-transit-rail-line"
|
|
2803
|
-
},
|
|
2804
|
-
"road-transit-rail-line": {
|
|
2805
|
-
type: "line",
|
|
2806
|
-
source: "openmaptiles",
|
|
2807
|
-
"source-layer": "transportation",
|
|
2808
|
-
filter: [
|
|
2809
|
-
"all",
|
|
2810
|
-
["match", ["get", "brunnel"], ["bridge", "tunnel"], !0, !0],
|
|
2811
|
-
["==", ["get", "class"], "transit"]
|
|
2812
|
-
],
|
|
2813
|
-
layout: { "line-cap": "round", "line-join": "round" },
|
|
2814
|
-
paint: {
|
|
2815
|
-
"line-color": "#FF4D4F",
|
|
2816
|
-
"line-width": [
|
|
2817
|
-
"interpolate",
|
|
2818
|
-
["exponential", 1.4],
|
|
2819
|
-
["zoom"],
|
|
2820
|
-
14,
|
|
2821
|
-
0.4,
|
|
2822
|
-
15,
|
|
2823
|
-
0.75,
|
|
2824
|
-
20,
|
|
2825
|
-
2
|
|
2826
|
-
]
|
|
2827
|
-
},
|
|
2828
|
-
beforeId: "building-extrusion"
|
|
2829
|
-
},
|
|
2830
|
-
"building-extrusion": {
|
|
2831
|
-
type: "fill-extrusion",
|
|
2832
|
-
source: "openmaptiles",
|
|
2833
|
-
"source-layer": "building",
|
|
2834
|
-
paint: {
|
|
2835
|
-
"fill-extrusion-color": "#B3B3B3FF",
|
|
2836
|
-
"fill-extrusion-height": ["get", "render_height"]
|
|
2837
|
-
},
|
|
2838
|
-
beforeId: "water_name_line_label"
|
|
2839
|
-
}
|
|
2840
|
-
};
|
|
2841
|
-
function uo({ omit: e = [] }) {
|
|
2842
|
-
const a = L.useMemo(() => {
|
|
2843
|
-
const r = new Set(e), n = [], o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), l = (u) => {
|
|
2844
|
-
if (r.has(u) || o.has(u)) return;
|
|
2845
|
-
if (s.has(u)) {
|
|
2846
|
-
console.warn(
|
|
2847
|
-
`Circular dependency detected involving map layer: ${u}`
|
|
2848
|
-
);
|
|
2849
|
-
return;
|
|
2850
|
-
}
|
|
2851
|
-
s.add(u);
|
|
2852
|
-
const p = ce[u];
|
|
2853
|
-
let m = p.beforeId;
|
|
2854
|
-
for (; m && r.has(m); )
|
|
2855
|
-
m = ce[m]?.beforeId;
|
|
2856
|
-
m && ce[m] && l(m), s.delete(u), o.add(u), n.push({ key: u, layer: { ...p, beforeId: m } });
|
|
2857
|
-
};
|
|
2858
|
-
return Object.keys(ce).forEach(l), n;
|
|
2859
|
-
}, [e]);
|
|
2860
|
-
return /* @__PURE__ */ d(F, { children: a.map(({ key: r, layer: n }) => /* @__PURE__ */ d(Za, { id: r, "data-slot": `map-layer-${r}`, ...n }, r)) });
|
|
2861
|
-
}
|
|
2862
|
-
const Ft = R("group/progress flex flex-wrap", {
|
|
2354
|
+
const $t = S("group/progress flex flex-wrap", {
|
|
2863
2355
|
variants: {
|
|
2864
2356
|
size: {
|
|
2865
2357
|
xs: "gap-1",
|
|
@@ -2886,44 +2378,44 @@ const Ft = R("group/progress flex flex-wrap", {
|
|
|
2886
2378
|
}
|
|
2887
2379
|
}
|
|
2888
2380
|
});
|
|
2889
|
-
function
|
|
2381
|
+
function Zn(e) {
|
|
2890
2382
|
const {
|
|
2891
2383
|
size: a = "md",
|
|
2892
2384
|
raised: r = "default",
|
|
2893
2385
|
stacked: n = "default",
|
|
2894
2386
|
className: o,
|
|
2895
|
-
children:
|
|
2387
|
+
children: i,
|
|
2896
2388
|
...l
|
|
2897
2389
|
} = e;
|
|
2898
2390
|
if (e.mode === "multiple") {
|
|
2899
|
-
const u = [...e.value].sort((p,
|
|
2900
|
-
return /* @__PURE__ */
|
|
2901
|
-
|
|
2391
|
+
const u = [...e.value].sort((p, g) => g.value - p.value);
|
|
2392
|
+
return /* @__PURE__ */ k(
|
|
2393
|
+
q.Root,
|
|
2902
2394
|
{
|
|
2903
2395
|
"data-slot": "progress",
|
|
2904
2396
|
"data-size": a,
|
|
2905
2397
|
"data-raised": r,
|
|
2906
2398
|
"data-stacked": n,
|
|
2907
|
-
className: c(
|
|
2399
|
+
className: c($t({ size: a, raised: r, stacked: n }), o),
|
|
2908
2400
|
...l,
|
|
2909
2401
|
children: [
|
|
2910
|
-
|
|
2402
|
+
i,
|
|
2911
2403
|
/* @__PURE__ */ d(
|
|
2912
|
-
|
|
2404
|
+
Ht,
|
|
2913
2405
|
{
|
|
2914
2406
|
style: {
|
|
2915
2407
|
marginTop: `calc(var(--stack-translate, 0px) * ${u.length - 1})`,
|
|
2916
2408
|
transform: `translateX(calc(var(--stack-translate, 0px) * ${u.length - 1}))`
|
|
2917
2409
|
},
|
|
2918
2410
|
className: "grid grid-cols-1 *:row-start-1 *:col-start-1 *:row-end-1 *:col-end-1 items-end *:self-start",
|
|
2919
|
-
children: u.map((p,
|
|
2920
|
-
|
|
2411
|
+
children: u.map((p, g) => /* @__PURE__ */ d(
|
|
2412
|
+
eo,
|
|
2921
2413
|
{
|
|
2922
|
-
index:
|
|
2414
|
+
index: g,
|
|
2923
2415
|
"data-value": p.value,
|
|
2924
2416
|
...p,
|
|
2925
2417
|
children: /* @__PURE__ */ d(
|
|
2926
|
-
|
|
2418
|
+
q.Value,
|
|
2927
2419
|
{
|
|
2928
2420
|
className: c(
|
|
2929
2421
|
p.value < 5 ? "pr-0.5" : "",
|
|
@@ -2939,7 +2431,7 @@ function po(e) {
|
|
|
2939
2431
|
"group-data-[stacked=default]/progress:translate-y-0 group-data-[stacked=default]/progress:items-center"
|
|
2940
2432
|
),
|
|
2941
2433
|
"data-slot": "progress-indicator-group-value",
|
|
2942
|
-
children: () => /* @__PURE__ */
|
|
2434
|
+
children: () => /* @__PURE__ */ k(M, { children: [
|
|
2943
2435
|
p.name && /* @__PURE__ */ d(
|
|
2944
2436
|
"span",
|
|
2945
2437
|
{
|
|
@@ -2957,7 +2449,7 @@ function po(e) {
|
|
|
2957
2449
|
}
|
|
2958
2450
|
)
|
|
2959
2451
|
},
|
|
2960
|
-
|
|
2452
|
+
g
|
|
2961
2453
|
))
|
|
2962
2454
|
}
|
|
2963
2455
|
)
|
|
@@ -2965,8 +2457,8 @@ function po(e) {
|
|
|
2965
2457
|
}
|
|
2966
2458
|
);
|
|
2967
2459
|
}
|
|
2968
|
-
return /* @__PURE__ */
|
|
2969
|
-
|
|
2460
|
+
return /* @__PURE__ */ k(
|
|
2461
|
+
q.Root,
|
|
2970
2462
|
{
|
|
2971
2463
|
...l,
|
|
2972
2464
|
value: e.value,
|
|
@@ -2974,17 +2466,17 @@ function po(e) {
|
|
|
2974
2466
|
"data-size": a,
|
|
2975
2467
|
"data-raised": r,
|
|
2976
2468
|
"data-stacked": n,
|
|
2977
|
-
className: c(
|
|
2469
|
+
className: c($t({ size: a, raised: r, stacked: n }), o),
|
|
2978
2470
|
children: [
|
|
2979
|
-
|
|
2980
|
-
/* @__PURE__ */ d(
|
|
2471
|
+
i,
|
|
2472
|
+
/* @__PURE__ */ d(Ht, { children: /* @__PURE__ */ d(Qn, { "data-value": e.value }) })
|
|
2981
2473
|
]
|
|
2982
2474
|
}
|
|
2983
2475
|
);
|
|
2984
2476
|
}
|
|
2985
|
-
function
|
|
2477
|
+
function Ht({ className: e, ...a }) {
|
|
2986
2478
|
return /* @__PURE__ */ d(
|
|
2987
|
-
|
|
2479
|
+
q.Track,
|
|
2988
2480
|
{
|
|
2989
2481
|
className: c(
|
|
2990
2482
|
"bg-surface border-2 rounded-full relative flex w-full items-center",
|
|
@@ -3007,12 +2499,12 @@ function $t({ className: e, ...a }) {
|
|
|
3007
2499
|
}
|
|
3008
2500
|
);
|
|
3009
2501
|
}
|
|
3010
|
-
function
|
|
2502
|
+
function Qn({
|
|
3011
2503
|
className: e,
|
|
3012
2504
|
...a
|
|
3013
2505
|
}) {
|
|
3014
2506
|
return /* @__PURE__ */ d(
|
|
3015
|
-
|
|
2507
|
+
q.Indicator,
|
|
3016
2508
|
{
|
|
3017
2509
|
"data-slot": "progress-indicator",
|
|
3018
2510
|
className: c(
|
|
@@ -3030,7 +2522,7 @@ function mo({
|
|
|
3030
2522
|
}
|
|
3031
2523
|
);
|
|
3032
2524
|
}
|
|
3033
|
-
function
|
|
2525
|
+
function eo({
|
|
3034
2526
|
className: e,
|
|
3035
2527
|
children: a,
|
|
3036
2528
|
value: r,
|
|
@@ -3038,7 +2530,7 @@ function go({
|
|
|
3038
2530
|
...o
|
|
3039
2531
|
}) {
|
|
3040
2532
|
return /* @__PURE__ */ d(
|
|
3041
|
-
|
|
2533
|
+
q.Indicator,
|
|
3042
2534
|
{
|
|
3043
2535
|
"data-slot": "progress-indicator-group",
|
|
3044
2536
|
"data-value": r,
|
|
@@ -3069,13 +2561,13 @@ function go({
|
|
|
3069
2561
|
}
|
|
3070
2562
|
);
|
|
3071
2563
|
}
|
|
3072
|
-
function
|
|
2564
|
+
function to({
|
|
3073
2565
|
className: e,
|
|
3074
2566
|
orientation: a = "horizontal",
|
|
3075
2567
|
...r
|
|
3076
2568
|
}) {
|
|
3077
2569
|
return /* @__PURE__ */ d(
|
|
3078
|
-
|
|
2570
|
+
Ie.Root,
|
|
3079
2571
|
{
|
|
3080
2572
|
"data-slot": "tabs",
|
|
3081
2573
|
"data-orientation": a,
|
|
@@ -3089,7 +2581,7 @@ function ho({
|
|
|
3089
2581
|
}
|
|
3090
2582
|
);
|
|
3091
2583
|
}
|
|
3092
|
-
const
|
|
2584
|
+
const ao = S(
|
|
3093
2585
|
"overflow-auto inline-flex bg-transparent w-fit items-start justify-start group-data-horizontal/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col",
|
|
3094
2586
|
{
|
|
3095
2587
|
variants: {
|
|
@@ -3121,7 +2613,7 @@ const fo = R(
|
|
|
3121
2613
|
}
|
|
3122
2614
|
}
|
|
3123
2615
|
);
|
|
3124
|
-
function
|
|
2616
|
+
function ro({
|
|
3125
2617
|
className: e,
|
|
3126
2618
|
variant: a = "default",
|
|
3127
2619
|
size: r = "md",
|
|
@@ -3129,13 +2621,13 @@ function bo({
|
|
|
3129
2621
|
...o
|
|
3130
2622
|
}) {
|
|
3131
2623
|
return /* @__PURE__ */ d(
|
|
3132
|
-
|
|
2624
|
+
Ie.List,
|
|
3133
2625
|
{
|
|
3134
2626
|
"data-slot": "tabs-list",
|
|
3135
2627
|
"data-variant": a,
|
|
3136
2628
|
"data-size": r,
|
|
3137
2629
|
className: c(
|
|
3138
|
-
|
|
2630
|
+
ao({ variant: a, size: r, extrude: n }),
|
|
3139
2631
|
"group/tabs-list",
|
|
3140
2632
|
e
|
|
3141
2633
|
),
|
|
@@ -3143,20 +2635,20 @@ function bo({
|
|
|
3143
2635
|
}
|
|
3144
2636
|
);
|
|
3145
2637
|
}
|
|
3146
|
-
function
|
|
2638
|
+
function Ft({
|
|
3147
2639
|
label: e,
|
|
3148
2640
|
description: a,
|
|
3149
2641
|
children: r,
|
|
3150
2642
|
className: n,
|
|
3151
2643
|
onClick: o,
|
|
3152
|
-
...
|
|
2644
|
+
...i
|
|
3153
2645
|
}) {
|
|
3154
|
-
const { trigger: l } =
|
|
3155
|
-
return /* @__PURE__ */
|
|
3156
|
-
|
|
2646
|
+
const { trigger: l } = se();
|
|
2647
|
+
return /* @__PURE__ */ k(
|
|
2648
|
+
Ie.Tab,
|
|
3157
2649
|
{
|
|
3158
2650
|
"data-slot": "tabs-trigger",
|
|
3159
|
-
"aria-label":
|
|
2651
|
+
"aria-label": i.value ?? "tabs-trigger",
|
|
3160
2652
|
className: c(
|
|
3161
2653
|
"group/tabs-trigger neo-base relative inline-flex flex-1 items-center justify-center overflow-hidden cursor-pointer rounded-base border-2 py-1",
|
|
3162
2654
|
"bg-surface data-active:bg-main",
|
|
@@ -3198,9 +2690,9 @@ function Ht({
|
|
|
3198
2690
|
n
|
|
3199
2691
|
),
|
|
3200
2692
|
onClick: (u) => {
|
|
3201
|
-
l(
|
|
2693
|
+
l(nn), o?.(u);
|
|
3202
2694
|
},
|
|
3203
|
-
...
|
|
2695
|
+
...i,
|
|
3204
2696
|
children: [
|
|
3205
2697
|
e && /* @__PURE__ */ d(
|
|
3206
2698
|
"span",
|
|
@@ -3245,7 +2737,7 @@ function Ht({
|
|
|
3245
2737
|
}
|
|
3246
2738
|
);
|
|
3247
2739
|
}
|
|
3248
|
-
const Gt = '"Great Vibes", cursive',
|
|
2740
|
+
const Gt = '"Great Vibes", cursive', no = 64, oo = 24, so = 20;
|
|
3249
2741
|
function Wt({
|
|
3250
2742
|
canvas: e,
|
|
3251
2743
|
text: a,
|
|
@@ -3253,132 +2745,158 @@ function Wt({
|
|
|
3253
2745
|
height: n,
|
|
3254
2746
|
ratio: o
|
|
3255
2747
|
}) {
|
|
3256
|
-
const
|
|
3257
|
-
if (!
|
|
2748
|
+
const i = e.getContext("2d");
|
|
2749
|
+
if (!i) return !1;
|
|
3258
2750
|
const l = Math.max(1, Math.floor(r)), u = Math.max(1, Math.floor(n)), p = Math.max(o || 1, 1);
|
|
3259
|
-
e.width = Math.max(1, Math.floor(l * p)), e.height = Math.max(1, Math.floor(u * p)),
|
|
3260
|
-
const
|
|
3261
|
-
if (!
|
|
3262
|
-
const x = Math.max(1, l -
|
|
3263
|
-
|
|
3264
|
-
let v =
|
|
3265
|
-
for (; v >
|
|
2751
|
+
e.width = Math.max(1, Math.floor(l * p)), e.height = Math.max(1, Math.floor(u * p)), i.setTransform(p, 0, 0, p, 0, 0), i.clearRect(0, 0, l, u);
|
|
2752
|
+
const g = a.trim();
|
|
2753
|
+
if (!g) return !1;
|
|
2754
|
+
const x = Math.max(1, l - so * 2);
|
|
2755
|
+
i.fillStyle = "#000", i.textAlign = "center", i.textBaseline = "middle";
|
|
2756
|
+
let v = no;
|
|
2757
|
+
for (; v > oo && (i.font = `${v}px ${Gt}`, !(i.measureText(g).width <= x)); )
|
|
3266
2758
|
v -= 1;
|
|
3267
|
-
return
|
|
2759
|
+
return i.font = `${v}px ${Gt}`, i.fillText(g, l / 2, u / 2, x), !0;
|
|
3268
2760
|
}
|
|
3269
|
-
function
|
|
2761
|
+
function io({
|
|
3270
2762
|
value: e,
|
|
3271
2763
|
onChange: a,
|
|
3272
2764
|
canvasClassname: r,
|
|
3273
2765
|
imageType: n = "image/png"
|
|
3274
2766
|
}) {
|
|
3275
|
-
const
|
|
3276
|
-
|
|
2767
|
+
const o = Bo(), [i, l] = De("sign"), [u, p] = De(""), g = W(null), x = W(null), v = W(a), w = W(e ?? null), z = W(!1), O = W({ width: 0, height: 0 }), E = ye((y) => {
|
|
2768
|
+
w.current !== y && (w.current = y, v.current?.(y));
|
|
3277
2769
|
}, []);
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
}, [a]),
|
|
3281
|
-
|
|
3282
|
-
}, [e]),
|
|
3283
|
-
if (
|
|
3284
|
-
const y =
|
|
2770
|
+
ce(() => {
|
|
2771
|
+
v.current = a;
|
|
2772
|
+
}, [a]), ce(() => {
|
|
2773
|
+
w.current = e ?? null;
|
|
2774
|
+
}, [e]), ce(() => {
|
|
2775
|
+
if (z.current || (z.current = !0, !e || i !== "sign")) return;
|
|
2776
|
+
const y = g.current;
|
|
3285
2777
|
if (y)
|
|
3286
2778
|
try {
|
|
3287
2779
|
y.fromDataURL(e);
|
|
3288
2780
|
} catch {
|
|
3289
2781
|
y.clear();
|
|
3290
2782
|
}
|
|
3291
|
-
}, []),
|
|
3292
|
-
if (
|
|
3293
|
-
const y =
|
|
2783
|
+
}, []), ce(() => {
|
|
2784
|
+
if (i !== "type") return;
|
|
2785
|
+
const y = x.current;
|
|
3294
2786
|
if (!y) return;
|
|
3295
|
-
if (
|
|
3296
|
-
const
|
|
3297
|
-
|
|
3298
|
-
width: Math.max(1, Math.floor(
|
|
3299
|
-
height: Math.max(1, Math.floor(
|
|
2787
|
+
if (O.current.width === 0) {
|
|
2788
|
+
const U = y.getBoundingClientRect();
|
|
2789
|
+
O.current = {
|
|
2790
|
+
width: Math.max(1, Math.floor(U.width)),
|
|
2791
|
+
height: Math.max(1, Math.floor(U.height))
|
|
3300
2792
|
};
|
|
3301
2793
|
}
|
|
3302
|
-
const
|
|
3303
|
-
if (!
|
|
3304
|
-
const
|
|
2794
|
+
const R = O.current;
|
|
2795
|
+
if (!R.width || !R.height) return;
|
|
2796
|
+
const $ = window.devicePixelRatio || 1;
|
|
3305
2797
|
if (!Wt({
|
|
3306
2798
|
canvas: y,
|
|
3307
|
-
text:
|
|
3308
|
-
width:
|
|
3309
|
-
height:
|
|
3310
|
-
ratio:
|
|
2799
|
+
text: u,
|
|
2800
|
+
width: R.width,
|
|
2801
|
+
height: R.height,
|
|
2802
|
+
ratio: $
|
|
3311
2803
|
})) {
|
|
3312
2804
|
E(null);
|
|
3313
2805
|
return;
|
|
3314
2806
|
}
|
|
3315
|
-
const
|
|
2807
|
+
const H = document.createElement("canvas");
|
|
3316
2808
|
Wt({
|
|
3317
|
-
canvas:
|
|
3318
|
-
text:
|
|
3319
|
-
width:
|
|
3320
|
-
height:
|
|
3321
|
-
ratio:
|
|
3322
|
-
}), E(
|
|
3323
|
-
}, [
|
|
3324
|
-
const
|
|
3325
|
-
|
|
3326
|
-
},
|
|
3327
|
-
if (
|
|
3328
|
-
const y =
|
|
2809
|
+
canvas: H,
|
|
2810
|
+
text: u,
|
|
2811
|
+
width: R.width,
|
|
2812
|
+
height: R.height,
|
|
2813
|
+
ratio: $
|
|
2814
|
+
}), E(H.toDataURL(n));
|
|
2815
|
+
}, [i, u, n, E]);
|
|
2816
|
+
const G = () => {
|
|
2817
|
+
g.current?.clear(), p(""), E(null);
|
|
2818
|
+
}, C = () => {
|
|
2819
|
+
if (i !== "sign") return;
|
|
2820
|
+
const y = g.current?.toDataURL(n) ?? null;
|
|
3329
2821
|
E(y);
|
|
3330
|
-
}, S = (y) => {
|
|
3331
|
-
y !== o && (O(), s(y));
|
|
3332
2822
|
}, _ = (y) => {
|
|
3333
|
-
|
|
2823
|
+
y !== i && (G(), l(y));
|
|
2824
|
+
}, T = (y) => {
|
|
2825
|
+
p(y.target.value);
|
|
3334
2826
|
};
|
|
3335
|
-
return /* @__PURE__ */ d("div", { id: "signature", children: /* @__PURE__ */
|
|
3336
|
-
|
|
2827
|
+
return o === "pdf" ? /* @__PURE__ */ d("div", { id: "signature", className: "w-full", children: e ? /* @__PURE__ */ d(
|
|
2828
|
+
"img",
|
|
3337
2829
|
{
|
|
2830
|
+
src: e,
|
|
2831
|
+
alt: "Signature",
|
|
3338
2832
|
className: c(
|
|
3339
|
-
|
|
2833
|
+
"w-full h-[256px] object-contain",
|
|
2834
|
+
"bg-size-[32px_32px] bg-surface",
|
|
2835
|
+
"bg-[linear-gradient(to_right,#80808022_1px,transparent_1px),linear-gradient(to_bottom,#80808022_1px,transparent_1px)]",
|
|
2836
|
+
"border-border border-2 rounded-base",
|
|
2837
|
+
r
|
|
2838
|
+
)
|
|
2839
|
+
}
|
|
2840
|
+
) : /* @__PURE__ */ d(
|
|
2841
|
+
"div",
|
|
2842
|
+
{
|
|
2843
|
+
"aria-label": "Unsigned",
|
|
2844
|
+
className: c(
|
|
2845
|
+
"w-full h-[256px] flex items-end",
|
|
2846
|
+
"bg-size-[32px_32px] bg-surface",
|
|
2847
|
+
"bg-[linear-gradient(to_right,#80808022_1px,transparent_1px),linear-gradient(to_bottom,#80808022_1px,transparent_1px)]",
|
|
2848
|
+
"border-border border-2 rounded-base",
|
|
2849
|
+
r
|
|
2850
|
+
),
|
|
2851
|
+
children: /* @__PURE__ */ d("div", { className: "w-full border-t-2 border-dashed border-border mx-6 mb-8 pb-1 text-center text-sm text-muted-foreground", children: "Signature" })
|
|
2852
|
+
}
|
|
2853
|
+
) }) : /* @__PURE__ */ d("div", { id: "signature", children: /* @__PURE__ */ k(
|
|
2854
|
+
pa,
|
|
2855
|
+
{
|
|
2856
|
+
className: c(
|
|
2857
|
+
i === "type" ? "max-h-84" : "max-h-69",
|
|
3340
2858
|
"overflow-hidden transition-[max-height] duration-300 has-[>[data-align=block-start]]:p-2 gap-2"
|
|
3341
2859
|
),
|
|
3342
2860
|
children: [
|
|
3343
|
-
/* @__PURE__ */ d(ga, { align: "block-start", className: "p-0!", children: /* @__PURE__ */
|
|
3344
|
-
/* @__PURE__ */
|
|
2861
|
+
/* @__PURE__ */ d(ga, { align: "block-start", className: "p-0!", children: /* @__PURE__ */ k("div", { className: "relative w-full rounded-base", children: [
|
|
2862
|
+
/* @__PURE__ */ k("div", { className: "absolute top-4 left-4 right-3 bg-transparent flex flex-row items-start justify-between gap-3", children: [
|
|
3345
2863
|
/* @__PURE__ */ d(
|
|
3346
|
-
|
|
2864
|
+
to,
|
|
3347
2865
|
{
|
|
3348
|
-
value:
|
|
3349
|
-
onValueChange: (y) =>
|
|
2866
|
+
value: i,
|
|
2867
|
+
onValueChange: (y) => _(y),
|
|
3350
2868
|
className: "-mt-1",
|
|
3351
|
-
children: /* @__PURE__ */
|
|
3352
|
-
/* @__PURE__ */
|
|
3353
|
-
/* @__PURE__ */ d(
|
|
2869
|
+
children: /* @__PURE__ */ k(ro, { variant: "contained", extrude: "sm", size: "md", children: [
|
|
2870
|
+
/* @__PURE__ */ k(Ft, { value: "sign", children: [
|
|
2871
|
+
/* @__PURE__ */ d(Oa, {}),
|
|
3354
2872
|
/* @__PURE__ */ d("span", { className: "hidden sm:flex", children: "Draw" })
|
|
3355
2873
|
] }),
|
|
3356
|
-
/* @__PURE__ */
|
|
3357
|
-
/* @__PURE__ */ d(
|
|
2874
|
+
/* @__PURE__ */ k(Ft, { value: "type", children: [
|
|
2875
|
+
/* @__PURE__ */ d(Da, {}),
|
|
3358
2876
|
/* @__PURE__ */ d("span", { className: "hidden sm:flex", children: "Type" })
|
|
3359
2877
|
] })
|
|
3360
2878
|
] })
|
|
3361
2879
|
}
|
|
3362
2880
|
),
|
|
3363
|
-
/* @__PURE__ */
|
|
2881
|
+
/* @__PURE__ */ k(
|
|
3364
2882
|
ge,
|
|
3365
2883
|
{
|
|
3366
2884
|
size: "sm",
|
|
3367
2885
|
raised: "xs",
|
|
3368
2886
|
variant: "outline",
|
|
3369
|
-
onClick:
|
|
2887
|
+
onClick: G,
|
|
3370
2888
|
children: [
|
|
3371
|
-
/* @__PURE__ */ d(
|
|
2889
|
+
/* @__PURE__ */ d(La, {}),
|
|
3372
2890
|
/* @__PURE__ */ d("span", { className: "hidden sm:flex", children: "Clear" })
|
|
3373
2891
|
]
|
|
3374
2892
|
}
|
|
3375
2893
|
)
|
|
3376
2894
|
] }),
|
|
3377
|
-
|
|
3378
|
-
|
|
2895
|
+
i === "sign" ? /* @__PURE__ */ d(
|
|
2896
|
+
Wa,
|
|
3379
2897
|
{
|
|
3380
|
-
ref:
|
|
3381
|
-
onEnd:
|
|
2898
|
+
ref: g,
|
|
2899
|
+
onEnd: C,
|
|
3382
2900
|
canvasProps: {
|
|
3383
2901
|
className: r ?? c(
|
|
3384
2902
|
"w-full h-[256px]",
|
|
@@ -3393,7 +2911,7 @@ function wo({
|
|
|
3393
2911
|
) : /* @__PURE__ */ d(
|
|
3394
2912
|
"canvas",
|
|
3395
2913
|
{
|
|
3396
|
-
ref:
|
|
2914
|
+
ref: x,
|
|
3397
2915
|
className: c(
|
|
3398
2916
|
"w-full h-64",
|
|
3399
2917
|
"bg-size-[32px_32px] bg-surface",
|
|
@@ -3405,23 +2923,23 @@ function wo({
|
|
|
3405
2923
|
)
|
|
3406
2924
|
] }) }),
|
|
3407
2925
|
/* @__PURE__ */ d(
|
|
3408
|
-
|
|
2926
|
+
ma,
|
|
3409
2927
|
{
|
|
3410
|
-
disabled:
|
|
2928
|
+
disabled: i !== "type",
|
|
3411
2929
|
className: c(
|
|
3412
|
-
|
|
2930
|
+
i === "type" ? "animate-in zoom-in-0 spin-in-20 scale-100" : "animate-out zoom-out-0 spin-out-20 scale-0",
|
|
3413
2931
|
"py-2 text-lg font-medium transition-[scale,translate,box-shadow] duration-300 origin-bottom-left"
|
|
3414
2932
|
),
|
|
3415
2933
|
placeholder: "Enter Full Name",
|
|
3416
|
-
value:
|
|
3417
|
-
onChange:
|
|
2934
|
+
value: u,
|
|
2935
|
+
onChange: T
|
|
3418
2936
|
}
|
|
3419
2937
|
)
|
|
3420
2938
|
]
|
|
3421
2939
|
}
|
|
3422
2940
|
) });
|
|
3423
2941
|
}
|
|
3424
|
-
const
|
|
2942
|
+
const lo = S("bg-border shrink-0", {
|
|
3425
2943
|
variants: {
|
|
3426
2944
|
stroke: {
|
|
3427
2945
|
thin: "border-0.5",
|
|
@@ -3438,23 +2956,23 @@ const Ao = R("bg-border shrink-0", {
|
|
|
3438
2956
|
orientation: "horizontal"
|
|
3439
2957
|
}
|
|
3440
2958
|
});
|
|
3441
|
-
function
|
|
2959
|
+
function co({
|
|
3442
2960
|
className: e,
|
|
3443
2961
|
orientation: a,
|
|
3444
2962
|
stroke: r,
|
|
3445
2963
|
...n
|
|
3446
2964
|
}) {
|
|
3447
2965
|
return /* @__PURE__ */ d(
|
|
3448
|
-
|
|
2966
|
+
Va,
|
|
3449
2967
|
{
|
|
3450
2968
|
"data-slot": "separator",
|
|
3451
2969
|
orientation: a,
|
|
3452
|
-
className: c(
|
|
2970
|
+
className: c(lo({ orientation: a, stroke: r }), e),
|
|
3453
2971
|
...n
|
|
3454
2972
|
}
|
|
3455
2973
|
);
|
|
3456
2974
|
}
|
|
3457
|
-
const
|
|
2975
|
+
const uo = S("bg-foreground/30 rounded-base", {
|
|
3458
2976
|
variants: {
|
|
3459
2977
|
variant: {
|
|
3460
2978
|
circle: "aspect-square w-auto rounded-full",
|
|
@@ -3468,7 +2986,7 @@ const Io = R("bg-foreground/30 rounded-base", {
|
|
|
3468
2986
|
}
|
|
3469
2987
|
}
|
|
3470
2988
|
});
|
|
3471
|
-
function
|
|
2989
|
+
function po({
|
|
3472
2990
|
variant: e = "default",
|
|
3473
2991
|
animate: a = !0,
|
|
3474
2992
|
className: r,
|
|
@@ -3478,12 +2996,12 @@ function To({
|
|
|
3478
2996
|
"div",
|
|
3479
2997
|
{
|
|
3480
2998
|
"data-slot": "skeleton",
|
|
3481
|
-
className: c(
|
|
2999
|
+
className: c(uo({ variant: e, animate: a }), r),
|
|
3482
3000
|
...n
|
|
3483
3001
|
}
|
|
3484
3002
|
);
|
|
3485
3003
|
}
|
|
3486
|
-
const
|
|
3004
|
+
const go = S(
|
|
3487
3005
|
"neo-base neo-switch-focus relative cursor-pointer inline-flex items-center data-checked:bg-main data-unchecked:bg-surface shrink-0 border-2 border-border transition-[translate,box-shadow,color] aria-disabled:cursor-not-allowed aria-disabled:opacity-50",
|
|
3488
3006
|
{
|
|
3489
3007
|
variants: {
|
|
@@ -3506,32 +3024,32 @@ const Co = R(
|
|
|
3506
3024
|
}
|
|
3507
3025
|
}
|
|
3508
3026
|
);
|
|
3509
|
-
function
|
|
3027
|
+
function mo({
|
|
3510
3028
|
className: e,
|
|
3511
3029
|
size: a = "md",
|
|
3512
3030
|
rounded: r = "full",
|
|
3513
3031
|
onCheckedChange: n,
|
|
3514
3032
|
...o
|
|
3515
3033
|
}) {
|
|
3516
|
-
const { trigger:
|
|
3034
|
+
const { trigger: i } = se();
|
|
3517
3035
|
return /* @__PURE__ */ d(
|
|
3518
|
-
|
|
3036
|
+
Ue.Root,
|
|
3519
3037
|
{
|
|
3520
3038
|
"data-slot": "switch",
|
|
3521
3039
|
"data-size": a,
|
|
3522
3040
|
"data-rounded": r,
|
|
3523
3041
|
className: c(
|
|
3524
|
-
|
|
3042
|
+
go({ size: a, rounded: r }),
|
|
3525
3043
|
"peer group/switch",
|
|
3526
3044
|
e
|
|
3527
3045
|
),
|
|
3528
3046
|
"aria-label": o["aria-label"] ?? "switch",
|
|
3529
3047
|
onCheckedChange: (l, u) => {
|
|
3530
|
-
|
|
3048
|
+
i(on), n?.(l, u);
|
|
3531
3049
|
},
|
|
3532
3050
|
...o,
|
|
3533
3051
|
children: /* @__PURE__ */ d(
|
|
3534
|
-
|
|
3052
|
+
Ue.Thumb,
|
|
3535
3053
|
{
|
|
3536
3054
|
"data-slot": "switch-thumb",
|
|
3537
3055
|
className: c(
|
|
@@ -3556,7 +3074,7 @@ function ko({
|
|
|
3556
3074
|
}
|
|
3557
3075
|
);
|
|
3558
3076
|
}
|
|
3559
|
-
const
|
|
3077
|
+
const ho = S("w-full caption-bottom text-sm", {
|
|
3560
3078
|
variants: {
|
|
3561
3079
|
variant: {
|
|
3562
3080
|
default: "",
|
|
@@ -3565,7 +3083,7 @@ const So = R("w-full caption-bottom text-sm", {
|
|
|
3565
3083
|
}
|
|
3566
3084
|
}
|
|
3567
3085
|
});
|
|
3568
|
-
function
|
|
3086
|
+
function fo({
|
|
3569
3087
|
className: e,
|
|
3570
3088
|
variant: a = "default",
|
|
3571
3089
|
...r
|
|
@@ -3580,14 +3098,14 @@ function Ro({
|
|
|
3580
3098
|
{
|
|
3581
3099
|
"data-slot": "table",
|
|
3582
3100
|
"data-variant": a,
|
|
3583
|
-
className: c(
|
|
3101
|
+
className: c(ho({ variant: a }), "group/table", e),
|
|
3584
3102
|
...r
|
|
3585
3103
|
}
|
|
3586
3104
|
)
|
|
3587
3105
|
}
|
|
3588
3106
|
);
|
|
3589
3107
|
}
|
|
3590
|
-
function
|
|
3108
|
+
function bo({ className: e, ...a }) {
|
|
3591
3109
|
return /* @__PURE__ */ d(
|
|
3592
3110
|
"thead",
|
|
3593
3111
|
{
|
|
@@ -3597,7 +3115,7 @@ function _o({ className: e, ...a }) {
|
|
|
3597
3115
|
}
|
|
3598
3116
|
);
|
|
3599
3117
|
}
|
|
3600
|
-
function
|
|
3118
|
+
function xo({ className: e, ...a }) {
|
|
3601
3119
|
return /* @__PURE__ */ d(
|
|
3602
3120
|
"tbody",
|
|
3603
3121
|
{
|
|
@@ -3607,7 +3125,7 @@ function No({ className: e, ...a }) {
|
|
|
3607
3125
|
}
|
|
3608
3126
|
);
|
|
3609
3127
|
}
|
|
3610
|
-
function
|
|
3128
|
+
function vo({ className: e, ...a }) {
|
|
3611
3129
|
return /* @__PURE__ */ d(
|
|
3612
3130
|
"tfoot",
|
|
3613
3131
|
{
|
|
@@ -3623,7 +3141,7 @@ function Po({ className: e, ...a }) {
|
|
|
3623
3141
|
}
|
|
3624
3142
|
);
|
|
3625
3143
|
}
|
|
3626
|
-
function
|
|
3144
|
+
function yo({ className: e, ...a }) {
|
|
3627
3145
|
return /* @__PURE__ */ d(
|
|
3628
3146
|
"tr",
|
|
3629
3147
|
{
|
|
@@ -3649,7 +3167,7 @@ function Eo({ className: e, ...a }) {
|
|
|
3649
3167
|
}
|
|
3650
3168
|
);
|
|
3651
3169
|
}
|
|
3652
|
-
function
|
|
3170
|
+
function wo({ className: e, ...a }) {
|
|
3653
3171
|
return /* @__PURE__ */ d(
|
|
3654
3172
|
"th",
|
|
3655
3173
|
{
|
|
@@ -3664,7 +3182,7 @@ function Do({ className: e, ...a }) {
|
|
|
3664
3182
|
}
|
|
3665
3183
|
);
|
|
3666
3184
|
}
|
|
3667
|
-
function
|
|
3185
|
+
function Ao({ className: e, ...a }) {
|
|
3668
3186
|
return /* @__PURE__ */ d(
|
|
3669
3187
|
"td",
|
|
3670
3188
|
{
|
|
@@ -3679,7 +3197,7 @@ function Oo({ className: e, ...a }) {
|
|
|
3679
3197
|
}
|
|
3680
3198
|
);
|
|
3681
3199
|
}
|
|
3682
|
-
function
|
|
3200
|
+
function zo({
|
|
3683
3201
|
className: e,
|
|
3684
3202
|
...a
|
|
3685
3203
|
}) {
|
|
@@ -3695,64 +3213,63 @@ function Lo({
|
|
|
3695
3213
|
}
|
|
3696
3214
|
);
|
|
3697
3215
|
}
|
|
3698
|
-
const
|
|
3699
|
-
[
|
|
3700
|
-
[
|
|
3701
|
-
[
|
|
3702
|
-
[
|
|
3703
|
-
[
|
|
3704
|
-
[
|
|
3705
|
-
[
|
|
3706
|
-
[
|
|
3707
|
-
[
|
|
3708
|
-
[
|
|
3709
|
-
[
|
|
3710
|
-
[
|
|
3711
|
-
[
|
|
3712
|
-
[
|
|
3713
|
-
[
|
|
3714
|
-
[
|
|
3715
|
-
[
|
|
3716
|
-
[
|
|
3717
|
-
[
|
|
3718
|
-
[
|
|
3719
|
-
[
|
|
3720
|
-
[
|
|
3721
|
-
[
|
|
3722
|
-
[
|
|
3723
|
-
[
|
|
3724
|
-
[
|
|
3725
|
-
[
|
|
3726
|
-
[
|
|
3727
|
-
[
|
|
3728
|
-
[
|
|
3729
|
-
[
|
|
3730
|
-
[
|
|
3731
|
-
[
|
|
3732
|
-
[
|
|
3733
|
-
[
|
|
3734
|
-
[
|
|
3735
|
-
[
|
|
3736
|
-
[
|
|
3737
|
-
[
|
|
3738
|
-
[
|
|
3739
|
-
[
|
|
3740
|
-
[
|
|
3741
|
-
[
|
|
3742
|
-
[
|
|
3743
|
-
[
|
|
3744
|
-
[
|
|
3745
|
-
[
|
|
3746
|
-
[
|
|
3747
|
-
[
|
|
3748
|
-
[
|
|
3749
|
-
[
|
|
3750
|
-
[
|
|
3751
|
-
[
|
|
3752
|
-
[
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
[i.INPUT]: {
|
|
3216
|
+
const Vt = {
|
|
3217
|
+
[s.A]: oa,
|
|
3218
|
+
[s.H]: sa,
|
|
3219
|
+
[s.P]: ia,
|
|
3220
|
+
[s.OL]: "ol",
|
|
3221
|
+
[s.UL]: "ul",
|
|
3222
|
+
[s.LI]: "li",
|
|
3223
|
+
[s.DIV]: "div",
|
|
3224
|
+
[s.SPAN]: "span",
|
|
3225
|
+
[s.IMAGE]: "img",
|
|
3226
|
+
[s.ACCORDION]: cn,
|
|
3227
|
+
[s.ACCORDION_ITEM]: un,
|
|
3228
|
+
[s.ACCORDION_TRIGGER]: pn,
|
|
3229
|
+
[s.ACCORDION_CONTENT]: gn,
|
|
3230
|
+
[s.ALERT]: hn,
|
|
3231
|
+
[s.AVATAR]: bn,
|
|
3232
|
+
[s.BADGE]: vn,
|
|
3233
|
+
[s.BUTTON]: ge,
|
|
3234
|
+
[s.CARD]: Nn,
|
|
3235
|
+
[s.CARD_HEADER]: En,
|
|
3236
|
+
[s.CARD_TITLE]: Pn,
|
|
3237
|
+
[s.CARD_DESCRIPTION]: On,
|
|
3238
|
+
[s.CARD_CONTENT]: Un,
|
|
3239
|
+
[s.CARD_FOOTER]: Bn,
|
|
3240
|
+
[s.CARD_ACTION]: Dn,
|
|
3241
|
+
[s.CARD_ICON]: Ln,
|
|
3242
|
+
[s.CALENDAR]: kn,
|
|
3243
|
+
[s.CHECKBOX]: $n,
|
|
3244
|
+
[s.COLLAPSIBLE]: Hn,
|
|
3245
|
+
[s.COLLAPSIBLE_TRIGGER]: Fn,
|
|
3246
|
+
[s.COLLAPSIBLE_CONTENT]: Gn,
|
|
3247
|
+
[s.OTP]: Wn,
|
|
3248
|
+
[s.INPUT]: ca,
|
|
3249
|
+
[s.INPUT_GROUP]: pa,
|
|
3250
|
+
[s.INPUT_GROUP_TEXT]: Jn,
|
|
3251
|
+
[s.INPUT_GROUP_ADDON]: ga,
|
|
3252
|
+
[s.INPUT_GROUP_INPUT]: ma,
|
|
3253
|
+
[s.INPUT_GROUP_BUTTON]: Mn,
|
|
3254
|
+
[s.INPUT_GROUP_TEXTAREA]: Xn,
|
|
3255
|
+
[s.LABEL]: Yn,
|
|
3256
|
+
[s.LOADER]: da,
|
|
3257
|
+
[s.PROGRESS]: Zn,
|
|
3258
|
+
[s.SWITCH]: mo,
|
|
3259
|
+
[s.SEPARATOR]: co,
|
|
3260
|
+
[s.SKELETON]: po,
|
|
3261
|
+
[s.TABLE]: fo,
|
|
3262
|
+
[s.TABLE_HEADER]: bo,
|
|
3263
|
+
[s.TABLE_BODY]: xo,
|
|
3264
|
+
[s.TABLE_FOOTER]: vo,
|
|
3265
|
+
[s.TABLE_HEAD]: wo,
|
|
3266
|
+
[s.TABLE_ROW]: yo,
|
|
3267
|
+
[s.TABLE_CELL]: Ao,
|
|
3268
|
+
[s.TABLE_CAPTION]: zo,
|
|
3269
|
+
[s.TEXTAREA]: ua,
|
|
3270
|
+
[s.SIGNATURE]: io
|
|
3271
|
+
}, To = {
|
|
3272
|
+
[s.INPUT]: {
|
|
3756
3273
|
text: {
|
|
3757
3274
|
valueProp: "value",
|
|
3758
3275
|
changeProp: "onChange",
|
|
@@ -3779,59 +3296,54 @@ const Mt = {
|
|
|
3779
3296
|
extractor: (e) => e.target.value
|
|
3780
3297
|
}
|
|
3781
3298
|
},
|
|
3782
|
-
[
|
|
3299
|
+
[s.OTP]: {
|
|
3783
3300
|
valueProp: "value",
|
|
3784
3301
|
changeProp: "onChange",
|
|
3785
3302
|
extractor: (e) => e.target.value
|
|
3786
3303
|
},
|
|
3787
|
-
[
|
|
3304
|
+
[s.CHECKBOX]: {
|
|
3788
3305
|
valueProp: "checked",
|
|
3789
3306
|
changeProp: "onCheckedChange",
|
|
3790
3307
|
extractor: (e) => e
|
|
3791
3308
|
},
|
|
3792
|
-
[
|
|
3309
|
+
[s.TEXTAREA]: {
|
|
3793
3310
|
valueProp: "value",
|
|
3794
3311
|
changeProp: "onChange",
|
|
3795
3312
|
extractor: (e) => e.target.value
|
|
3796
3313
|
},
|
|
3797
|
-
[
|
|
3314
|
+
[s.INPUT_GROUP_INPUT]: {
|
|
3798
3315
|
valueProp: "value",
|
|
3799
3316
|
changeProp: "onChange",
|
|
3800
3317
|
extractor: (e) => e.target.value
|
|
3801
3318
|
},
|
|
3802
|
-
[
|
|
3319
|
+
[s.INPUT_GROUP_TEXTAREA]: {
|
|
3803
3320
|
valueProp: "value",
|
|
3804
3321
|
changeProp: "onChange",
|
|
3805
3322
|
extractor: (e) => e.target.value
|
|
3806
3323
|
},
|
|
3807
|
-
[
|
|
3324
|
+
[s.SWITCH]: {
|
|
3808
3325
|
valueProp: "checked",
|
|
3809
3326
|
changeProp: "onCheckedChange",
|
|
3810
3327
|
extractor: (e) => e
|
|
3811
3328
|
},
|
|
3812
|
-
[
|
|
3329
|
+
[s.SIGNATURE]: {
|
|
3813
3330
|
valueProp: "value",
|
|
3814
3331
|
changeProp: "onChange",
|
|
3815
3332
|
extractor: (e) => e
|
|
3816
3333
|
},
|
|
3817
|
-
[
|
|
3334
|
+
[s.CALENDAR]: {
|
|
3818
3335
|
valueProp: "selected",
|
|
3819
3336
|
changeProp: "onSelect",
|
|
3820
3337
|
extractor: (e) => e
|
|
3821
|
-
},
|
|
3822
|
-
[i.MAP]: {
|
|
3823
|
-
valueProp: "value",
|
|
3824
|
-
changeProp: "onChange",
|
|
3825
|
-
extractor: (e) => e
|
|
3826
3338
|
}
|
|
3827
3339
|
};
|
|
3828
|
-
function
|
|
3340
|
+
function Bs(e) {
|
|
3829
3341
|
return e;
|
|
3830
3342
|
}
|
|
3831
|
-
function
|
|
3343
|
+
function js(e) {
|
|
3832
3344
|
return e;
|
|
3833
3345
|
}
|
|
3834
|
-
const
|
|
3346
|
+
const Io = ["bindings", "formField", "ssr", "pdf"], Co = ["children", "bindings", "ssr", "pdf"];
|
|
3835
3347
|
function qt(e) {
|
|
3836
3348
|
return {
|
|
3837
3349
|
valueProp: e.valueProp,
|
|
@@ -3839,7 +3351,7 @@ function qt(e) {
|
|
|
3839
3351
|
extract: e.extractor
|
|
3840
3352
|
};
|
|
3841
3353
|
}
|
|
3842
|
-
function
|
|
3354
|
+
function ko(e) {
|
|
3843
3355
|
if (e)
|
|
3844
3356
|
return typeof e == "object" && "default" in e ? Object.fromEntries(
|
|
3845
3357
|
Object.entries(e).map(([a, r]) => [
|
|
@@ -3854,22 +3366,22 @@ const Ce = {
|
|
|
3854
3366
|
namespace: "pebble",
|
|
3855
3367
|
fallback: "div",
|
|
3856
3368
|
components: Object.fromEntries(
|
|
3857
|
-
Object.keys(
|
|
3858
|
-
const a =
|
|
3369
|
+
Object.keys(Vt).map((e) => {
|
|
3370
|
+
const a = ko(To[e]);
|
|
3859
3371
|
return [
|
|
3860
3372
|
e,
|
|
3861
3373
|
{
|
|
3862
|
-
component:
|
|
3863
|
-
propsSchema:
|
|
3864
|
-
capabilities: a ?
|
|
3374
|
+
component: Vt[e],
|
|
3375
|
+
propsSchema: ra[e]?.argsSchema,
|
|
3376
|
+
capabilities: a ? Io : Co,
|
|
3865
3377
|
controlled: a
|
|
3866
3378
|
}
|
|
3867
3379
|
];
|
|
3868
3380
|
})
|
|
3869
3381
|
)
|
|
3870
3382
|
};
|
|
3871
|
-
|
|
3872
|
-
class
|
|
3383
|
+
ta.plugins.register(qa);
|
|
3384
|
+
class So {
|
|
3873
3385
|
cache = /* @__PURE__ */ new Map();
|
|
3874
3386
|
maxSize;
|
|
3875
3387
|
constructor(a) {
|
|
@@ -3889,39 +3401,39 @@ class $o {
|
|
|
3889
3401
|
this.cache.clear();
|
|
3890
3402
|
}
|
|
3891
3403
|
}
|
|
3892
|
-
const
|
|
3893
|
-
function
|
|
3894
|
-
if (e != null && !(typeof a == "string" &&
|
|
3404
|
+
const Ro = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
3405
|
+
function Mt(e, a) {
|
|
3406
|
+
if (e != null && !(typeof a == "string" && Ro.has(a)) && Object.prototype.hasOwnProperty.call(e, a))
|
|
3895
3407
|
return e[a];
|
|
3896
3408
|
}
|
|
3897
|
-
function
|
|
3409
|
+
function ha(e) {
|
|
3898
3410
|
if (e.type === "Identifier") return e.name;
|
|
3899
3411
|
if (e.type === "MemberExpression") {
|
|
3900
|
-
const a =
|
|
3412
|
+
const a = ha(e.object);
|
|
3901
3413
|
if (a == null) return null;
|
|
3902
3414
|
const r = e.property;
|
|
3903
3415
|
return e.computed ? r.type !== "Literal" ? null : `${a}[${JSON.stringify(r.value)}]` : r.type !== "Identifier" ? null : `${a}.${r.name}`;
|
|
3904
3416
|
}
|
|
3905
3417
|
return null;
|
|
3906
3418
|
}
|
|
3907
|
-
function
|
|
3419
|
+
function _o(e) {
|
|
3908
3420
|
const a = e.match(/^[^.[]+/);
|
|
3909
3421
|
return a ? a[0] : e;
|
|
3910
3422
|
}
|
|
3911
|
-
function
|
|
3423
|
+
function No(e) {
|
|
3912
3424
|
const a = /* @__PURE__ */ new Set();
|
|
3913
3425
|
function r(n, o) {
|
|
3914
3426
|
if (n)
|
|
3915
3427
|
switch (n.type) {
|
|
3916
3428
|
case "Identifier": {
|
|
3917
|
-
const
|
|
3918
|
-
o.has(
|
|
3429
|
+
const i = n.name;
|
|
3430
|
+
o.has(i) || a.add(i);
|
|
3919
3431
|
return;
|
|
3920
3432
|
}
|
|
3921
3433
|
case "MemberExpression": {
|
|
3922
|
-
const
|
|
3923
|
-
if (
|
|
3924
|
-
o.has(
|
|
3434
|
+
const i = ha(n);
|
|
3435
|
+
if (i != null) {
|
|
3436
|
+
o.has(_o(i)) || a.add(i);
|
|
3925
3437
|
return;
|
|
3926
3438
|
}
|
|
3927
3439
|
r(n.object, o), r(n.property, o);
|
|
@@ -3937,11 +3449,11 @@ function Wo(e) {
|
|
|
3937
3449
|
r(n.test, o), r(n.consequent, o), r(n.alternate, o);
|
|
3938
3450
|
return;
|
|
3939
3451
|
case "ArrayExpression":
|
|
3940
|
-
n.elements.forEach((
|
|
3452
|
+
n.elements.forEach((i) => r(i, o));
|
|
3941
3453
|
return;
|
|
3942
3454
|
case "CallExpression": {
|
|
3943
|
-
const
|
|
3944
|
-
|
|
3455
|
+
const i = n.callee;
|
|
3456
|
+
i.type === "MemberExpression" && r(i.object, o), n.arguments.forEach((l) => {
|
|
3945
3457
|
if (l.type === "ArrowFunctionExpression") {
|
|
3946
3458
|
const u = new Set(o);
|
|
3947
3459
|
l.params?.forEach((p) => {
|
|
@@ -3953,7 +3465,7 @@ function Wo(e) {
|
|
|
3953
3465
|
return;
|
|
3954
3466
|
}
|
|
3955
3467
|
case "Compound":
|
|
3956
|
-
n.body.forEach((
|
|
3468
|
+
n.body.forEach((i) => r(i, o));
|
|
3957
3469
|
return;
|
|
3958
3470
|
default:
|
|
3959
3471
|
return;
|
|
@@ -3961,8 +3473,8 @@ function Wo(e) {
|
|
|
3961
3473
|
}
|
|
3962
3474
|
return r(e, /* @__PURE__ */ new Set()), Array.from(a);
|
|
3963
3475
|
}
|
|
3964
|
-
const
|
|
3965
|
-
function
|
|
3476
|
+
const Z = (e, a = 2) => String(e).padStart(a, "0");
|
|
3477
|
+
function Eo(e) {
|
|
3966
3478
|
const a = e instanceof Date ? e : new Date(e);
|
|
3967
3479
|
return Number.isNaN(a.getTime()) ? null : a;
|
|
3968
3480
|
}
|
|
@@ -3970,23 +3482,23 @@ function ue(e) {
|
|
|
3970
3482
|
const a = typeof e == "number" ? e : parseFloat(e);
|
|
3971
3483
|
return Number.isNaN(a) ? 0 : a;
|
|
3972
3484
|
}
|
|
3973
|
-
function
|
|
3485
|
+
function Jt(e) {
|
|
3974
3486
|
return e.flat(1 / 0).map(ue);
|
|
3975
3487
|
}
|
|
3976
|
-
const
|
|
3488
|
+
const Po = {
|
|
3977
3489
|
// Uses UTC getters so SSR and client render the same calendar date regardless of local timezone.
|
|
3978
3490
|
formatDate(e, a = "YYYY-MM-DD") {
|
|
3979
|
-
const r =
|
|
3491
|
+
const r = Eo(e);
|
|
3980
3492
|
if (!r) return "";
|
|
3981
3493
|
if (a === "short" || a === "medium" || a === "long" || a === "full")
|
|
3982
3494
|
return new Intl.DateTimeFormat("en-US", { dateStyle: a, timeZone: "UTC" }).format(r);
|
|
3983
3495
|
const n = {
|
|
3984
3496
|
YYYY: String(r.getUTCFullYear()),
|
|
3985
|
-
MM:
|
|
3986
|
-
DD:
|
|
3987
|
-
HH:
|
|
3988
|
-
mm:
|
|
3989
|
-
ss:
|
|
3497
|
+
MM: Z(r.getUTCMonth() + 1),
|
|
3498
|
+
DD: Z(r.getUTCDate()),
|
|
3499
|
+
HH: Z(r.getUTCHours()),
|
|
3500
|
+
mm: Z(r.getUTCMinutes()),
|
|
3501
|
+
ss: Z(r.getUTCSeconds())
|
|
3990
3502
|
};
|
|
3991
3503
|
return a.replace(/YYYY|MM|DD|HH|mm|ss/g, (o) => n[o]);
|
|
3992
3504
|
},
|
|
@@ -4022,36 +3534,36 @@ const qo = {
|
|
|
4022
3534
|
return Array.isArray(e) ? e.reduce((a, r) => a + ue(r), 0) : 0;
|
|
4023
3535
|
},
|
|
4024
3536
|
min(...e) {
|
|
4025
|
-
const a =
|
|
3537
|
+
const a = Jt(e);
|
|
4026
3538
|
return a.length ? Math.min(...a) : void 0;
|
|
4027
3539
|
},
|
|
4028
3540
|
max(...e) {
|
|
4029
|
-
const a =
|
|
3541
|
+
const a = Jt(e);
|
|
4030
3542
|
return a.length ? Math.max(...a) : void 0;
|
|
4031
3543
|
},
|
|
4032
3544
|
round(e, a = 0) {
|
|
4033
3545
|
const r = 10 ** a;
|
|
4034
3546
|
return Math.round(ue(e) * r) / r;
|
|
4035
3547
|
}
|
|
4036
|
-
},
|
|
4037
|
-
function
|
|
3548
|
+
}, Oo = /* @__PURE__ */ new Set(["map", "filter", "some", "every", "find"]);
|
|
3549
|
+
function Do(e, a, r) {
|
|
4038
3550
|
const n = { ...r };
|
|
4039
|
-
return (e.params ?? []).forEach((o,
|
|
4040
|
-
o.type === "Identifier" && (n[o.name] = a[
|
|
4041
|
-
}),
|
|
3551
|
+
return (e.params ?? []).forEach((o, i) => {
|
|
3552
|
+
o.type === "Identifier" && (n[o.name] = a[i]);
|
|
3553
|
+
}), N(e.body, n);
|
|
4042
3554
|
}
|
|
4043
|
-
function
|
|
3555
|
+
function N(e, a) {
|
|
4044
3556
|
switch (e.type) {
|
|
4045
3557
|
case "Literal":
|
|
4046
3558
|
return e.value;
|
|
4047
3559
|
case "Identifier":
|
|
4048
|
-
return
|
|
3560
|
+
return Mt(a, e.name);
|
|
4049
3561
|
case "MemberExpression": {
|
|
4050
|
-
const r =
|
|
4051
|
-
return
|
|
3562
|
+
const r = N(e.object, a), n = e.property, o = e.computed ? N(n, a) : n.name;
|
|
3563
|
+
return Mt(r, o);
|
|
4052
3564
|
}
|
|
4053
3565
|
case "UnaryExpression": {
|
|
4054
|
-
const r =
|
|
3566
|
+
const r = N(e.argument, a);
|
|
4055
3567
|
switch (e.operator) {
|
|
4056
3568
|
case "!":
|
|
4057
3569
|
return !r;
|
|
@@ -4068,10 +3580,10 @@ function D(e, a) {
|
|
|
4068
3580
|
case "BinaryExpression": {
|
|
4069
3581
|
const r = e.operator;
|
|
4070
3582
|
if (r === "&&" || r === "||" || r === "??") {
|
|
4071
|
-
const
|
|
4072
|
-
return (r === "&&" ? !
|
|
3583
|
+
const i = N(e.left, a);
|
|
3584
|
+
return (r === "&&" ? !i : r === "||" ? !!i : i != null) ? i : N(e.right, a);
|
|
4073
3585
|
}
|
|
4074
|
-
const n =
|
|
3586
|
+
const n = N(e.left, a), o = N(e.right, a);
|
|
4075
3587
|
switch (r) {
|
|
4076
3588
|
case "===":
|
|
4077
3589
|
return n === o;
|
|
@@ -4118,12 +3630,12 @@ function D(e, a) {
|
|
|
4118
3630
|
}
|
|
4119
3631
|
}
|
|
4120
3632
|
case "ConditionalExpression": {
|
|
4121
|
-
const r =
|
|
4122
|
-
return
|
|
3633
|
+
const r = N(e.test, a);
|
|
3634
|
+
return N(r ? e.consequent : e.alternate, a);
|
|
4123
3635
|
}
|
|
4124
3636
|
case "ArrayExpression":
|
|
4125
3637
|
return e.elements.map(
|
|
4126
|
-
(r) => r ?
|
|
3638
|
+
(r) => r ? N(r, a) : void 0
|
|
4127
3639
|
);
|
|
4128
3640
|
case "CallExpression": {
|
|
4129
3641
|
const r = e.callee, n = e.arguments;
|
|
@@ -4132,40 +3644,40 @@ function D(e, a) {
|
|
|
4132
3644
|
throw new Error(
|
|
4133
3645
|
"Method calls must use a fixed dot-notation method name"
|
|
4134
3646
|
);
|
|
4135
|
-
const
|
|
4136
|
-
if (!
|
|
4137
|
-
throw new Error(`Unknown array method: ${
|
|
4138
|
-
const l =
|
|
3647
|
+
const i = r.property.name;
|
|
3648
|
+
if (!Oo.has(i))
|
|
3649
|
+
throw new Error(`Unknown array method: ${i}`);
|
|
3650
|
+
const l = N(r.object, a);
|
|
4139
3651
|
if (!Array.isArray(l))
|
|
4140
|
-
throw new Error(`.${
|
|
3652
|
+
throw new Error(`.${i}() can only be called on an array`);
|
|
4141
3653
|
const [u] = n;
|
|
4142
3654
|
if (n.length !== 1 || u.type !== "ArrowFunctionExpression")
|
|
4143
3655
|
throw new Error(
|
|
4144
|
-
`.${
|
|
3656
|
+
`.${i}() requires a single arrow-function argument`
|
|
4145
3657
|
);
|
|
4146
|
-
return l[
|
|
4147
|
-
(p,
|
|
3658
|
+
return l[i](
|
|
3659
|
+
(p, g) => Do(u, [p, g], a)
|
|
4148
3660
|
);
|
|
4149
3661
|
}
|
|
4150
3662
|
if (r.type !== "Identifier")
|
|
4151
3663
|
throw new Error(
|
|
4152
3664
|
"Function calls are only allowed via a bare helper name"
|
|
4153
3665
|
);
|
|
4154
|
-
const o =
|
|
3666
|
+
const o = Po[r.name];
|
|
4155
3667
|
if (typeof o != "function")
|
|
4156
3668
|
throw new Error(`Unknown helper: ${r.name}`);
|
|
4157
|
-
return o(...n.map((
|
|
3669
|
+
return o(...n.map((i) => N(i, a)));
|
|
4158
3670
|
}
|
|
4159
3671
|
default:
|
|
4160
3672
|
throw new Error(`Unsupported expression type: ${e.type}`);
|
|
4161
3673
|
}
|
|
4162
3674
|
}
|
|
4163
|
-
const
|
|
4164
|
-
function
|
|
4165
|
-
let a =
|
|
4166
|
-
return a || (a =
|
|
3675
|
+
const Xt = new So(250);
|
|
3676
|
+
function fa(e) {
|
|
3677
|
+
let a = Xt.get(e);
|
|
3678
|
+
return a || (a = ta(e), Xt.set(e, a), a);
|
|
4167
3679
|
}
|
|
4168
|
-
function
|
|
3680
|
+
function Lo(e) {
|
|
4169
3681
|
if (!e || typeof e != "string")
|
|
4170
3682
|
return [];
|
|
4171
3683
|
if (!e.startsWith("{{") || !e.endsWith("}}"))
|
|
@@ -4174,38 +3686,41 @@ function Jo(e) {
|
|
|
4174
3686
|
if (!a)
|
|
4175
3687
|
return [];
|
|
4176
3688
|
try {
|
|
4177
|
-
return
|
|
3689
|
+
return No(fa(a));
|
|
4178
3690
|
} catch (r) {
|
|
4179
3691
|
return console.error(`Error extracting variables from "${e}":`, r), [];
|
|
4180
3692
|
}
|
|
4181
3693
|
}
|
|
4182
|
-
function
|
|
3694
|
+
function Uo(e, a) {
|
|
4183
3695
|
if (!e || typeof e != "string" || !e.startsWith("{{") || !e.endsWith("}}"))
|
|
4184
3696
|
return e;
|
|
4185
3697
|
const r = e.slice(2, -2).trim();
|
|
4186
3698
|
if (r)
|
|
4187
3699
|
try {
|
|
4188
|
-
return
|
|
3700
|
+
return N(fa(r), a);
|
|
4189
3701
|
} catch (n) {
|
|
4190
3702
|
console.error(`Error parsing expression "${e}":`, n);
|
|
4191
3703
|
return;
|
|
4192
3704
|
}
|
|
4193
3705
|
}
|
|
4194
|
-
const
|
|
4195
|
-
function
|
|
4196
|
-
|
|
3706
|
+
const ba = we(null), ie = we(Ce), ke = we("web");
|
|
3707
|
+
function Bo() {
|
|
3708
|
+
return oe(ke);
|
|
3709
|
+
}
|
|
3710
|
+
function Se() {
|
|
3711
|
+
const e = oe(ba);
|
|
4197
3712
|
if (!e)
|
|
4198
3713
|
throw new Error("useBonsaiStore must be used within a <Bonsai> component");
|
|
4199
3714
|
return e;
|
|
4200
3715
|
}
|
|
4201
|
-
function
|
|
4202
|
-
const e =
|
|
4203
|
-
return
|
|
4204
|
-
(a, r) =>
|
|
3716
|
+
function jo() {
|
|
3717
|
+
const e = Se();
|
|
3718
|
+
return ye(
|
|
3719
|
+
(a, r) => Ho(e.data, a, r),
|
|
4205
3720
|
[e]
|
|
4206
3721
|
);
|
|
4207
3722
|
}
|
|
4208
|
-
const
|
|
3723
|
+
const Re = /* @__PURE__ */ new Set([
|
|
4209
3724
|
"area",
|
|
4210
3725
|
"base",
|
|
4211
3726
|
"br",
|
|
@@ -4220,28 +3735,28 @@ const Se = /* @__PURE__ */ new Set([
|
|
|
4220
3735
|
"source",
|
|
4221
3736
|
"track",
|
|
4222
3737
|
"wbr"
|
|
4223
|
-
]),
|
|
4224
|
-
function
|
|
4225
|
-
return e.match(
|
|
3738
|
+
]), L = (e, a, r) => `${e.type || "div"}-${r}-${a}`, $o = /[^.[\]]+|\[(?:[^\[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/g;
|
|
3739
|
+
function _e(e) {
|
|
3740
|
+
return e.match($o) || [];
|
|
4226
3741
|
}
|
|
4227
3742
|
function V(e) {
|
|
4228
3743
|
return e.startsWith("[") && e.endsWith("]") ? e.slice(1, -1).replace(/^["']|["']$/g, "") : e;
|
|
4229
3744
|
}
|
|
4230
3745
|
function re(e, a, r = void 0) {
|
|
4231
|
-
return a ?
|
|
3746
|
+
return a ? _e(a).reduce((o, i) => {
|
|
4232
3747
|
if (o != null)
|
|
4233
|
-
return o[V(
|
|
3748
|
+
return o[V(i)];
|
|
4234
3749
|
}, e) ?? r : e;
|
|
4235
3750
|
}
|
|
4236
|
-
function
|
|
3751
|
+
function Ho(e, a, r) {
|
|
4237
3752
|
if (!a) {
|
|
4238
3753
|
Object.assign(e, r);
|
|
4239
3754
|
return;
|
|
4240
3755
|
}
|
|
4241
|
-
const n =
|
|
3756
|
+
const n = _e(a);
|
|
4242
3757
|
let o = e;
|
|
4243
|
-
for (let
|
|
4244
|
-
const l = V(n[
|
|
3758
|
+
for (let i = 0; i < n.length - 1; i++) {
|
|
3759
|
+
const l = V(n[i]), u = V(n[i + 1]);
|
|
4245
3760
|
o[l] ??= /^\d+$/.test(u) ? [] : {}, o = o[l];
|
|
4246
3761
|
}
|
|
4247
3762
|
o[V(n[n.length - 1])] = r;
|
|
@@ -4251,32 +3766,32 @@ function ne(e, a) {
|
|
|
4251
3766
|
const r = e.match(/^[^.[]+/), n = r ? r[0] : e, o = a[n];
|
|
4252
3767
|
return o == null ? e : o + e.slice(n.length);
|
|
4253
3768
|
}
|
|
4254
|
-
function
|
|
4255
|
-
const o = e.match(/^[^.[]+/),
|
|
4256
|
-
return n &&
|
|
3769
|
+
function Fo(e, a, r, n) {
|
|
3770
|
+
const o = e.match(/^[^.[]+/), i = o ? o[0] : e;
|
|
3771
|
+
return n && i in n ? e === i ? n[i] : void 0 : r && i in r ? re(a.data ?? a, ne(e, r)) : e in a && e !== "data" ? a[e] : re(a.data ?? a, e);
|
|
4257
3772
|
}
|
|
4258
|
-
function
|
|
3773
|
+
function Ne(e) {
|
|
4259
3774
|
const a = /* @__PURE__ */ new Set();
|
|
4260
3775
|
function r(n) {
|
|
4261
|
-
typeof n == "string" && n.startsWith("{{") && n.endsWith("}}") &&
|
|
3776
|
+
typeof n == "string" && n.startsWith("{{") && n.endsWith("}}") && Lo(n).forEach((i) => a.add(i));
|
|
4262
3777
|
}
|
|
4263
3778
|
return typeof e == "string" ? r(e) : Object.values(e?.args ?? {}).forEach(r), Array.from(a);
|
|
4264
3779
|
}
|
|
4265
|
-
const
|
|
4266
|
-
function
|
|
3780
|
+
const D = (e, a) => Uo(e, a);
|
|
3781
|
+
function xa(e, a) {
|
|
4267
3782
|
return e.reduce((r, n) => {
|
|
4268
|
-
const o = a(n),
|
|
4269
|
-
if (
|
|
3783
|
+
const o = a(n), i = _e(n);
|
|
3784
|
+
if (i.length === 1)
|
|
4270
3785
|
return r[n] = o, r;
|
|
4271
3786
|
let l = r;
|
|
4272
|
-
for (let u = 0; u <
|
|
4273
|
-
const p = V(
|
|
4274
|
-
(!(p in l) || typeof l[p] != "object" || l[p] === null) && (l[p] = /^\d+$/.test(
|
|
3787
|
+
for (let u = 0; u < i.length - 1; u++) {
|
|
3788
|
+
const p = V(i[u]), g = V(i[u + 1]);
|
|
3789
|
+
(!(p in l) || typeof l[p] != "object" || l[p] === null) && (l[p] = /^\d+$/.test(g) ? [] : {}), l = l[p];
|
|
4275
3790
|
}
|
|
4276
|
-
return l[V(
|
|
3791
|
+
return l[V(i[i.length - 1])] = o, r;
|
|
4277
3792
|
}, {});
|
|
4278
3793
|
}
|
|
4279
|
-
const
|
|
3794
|
+
const Ee = (e, a) => {
|
|
4280
3795
|
const r = e ? a.components[e] : void 0;
|
|
4281
3796
|
if (r) return r.component;
|
|
4282
3797
|
if (a.fallback === "error")
|
|
@@ -4284,84 +3799,84 @@ const Ne = (e, a) => {
|
|
|
4284
3799
|
`Bonsai: unknown component type "${e}" in registry "${a.id}"@"${a.version}"`
|
|
4285
3800
|
);
|
|
4286
3801
|
return a.fallback && a.fallback !== "div" ? a.fallback : "div";
|
|
4287
|
-
},
|
|
3802
|
+
}, me = (e, a, r, n = {}) => {
|
|
4288
3803
|
const o = { key: r, ...e?.args, ...n };
|
|
4289
|
-
return Object.keys(o).forEach((
|
|
4290
|
-
o[
|
|
3804
|
+
return Object.keys(o).forEach((i) => {
|
|
3805
|
+
o[i] = D(o[i], a);
|
|
4291
3806
|
}), o;
|
|
4292
3807
|
};
|
|
4293
|
-
function
|
|
3808
|
+
function Go(e, a, r, n, o) {
|
|
4294
3809
|
return n[e.changeProp] ? {} : {
|
|
4295
|
-
[e.changeProp]: (
|
|
3810
|
+
[e.changeProp]: (i) => o(a, e.extract(i)),
|
|
4296
3811
|
[e.valueProp]: r
|
|
4297
3812
|
};
|
|
4298
3813
|
}
|
|
4299
|
-
function
|
|
3814
|
+
function va({
|
|
4300
3815
|
tree: e,
|
|
4301
3816
|
dataSlice: a,
|
|
4302
3817
|
elementKey: r,
|
|
4303
3818
|
ElementType: n,
|
|
4304
3819
|
ctrlInput: o,
|
|
4305
|
-
keyPath:
|
|
3820
|
+
keyPath: i,
|
|
4306
3821
|
storeValue: l,
|
|
4307
3822
|
updateData: u,
|
|
4308
3823
|
children: p
|
|
4309
3824
|
}) {
|
|
4310
|
-
const
|
|
3825
|
+
const g = Go(
|
|
4311
3826
|
o,
|
|
4312
|
-
|
|
3827
|
+
i,
|
|
4313
3828
|
l,
|
|
4314
3829
|
e.args ?? {},
|
|
4315
3830
|
u
|
|
4316
|
-
), x =
|
|
4317
|
-
return p !== void 0 ?
|
|
3831
|
+
), x = me(e, a, r, g);
|
|
3832
|
+
return p !== void 0 ? F(n, x, p) : F(n, x);
|
|
4318
3833
|
}
|
|
4319
|
-
function
|
|
3834
|
+
function ya(e, a, r) {
|
|
4320
3835
|
const n = r.components[e]?.controlled;
|
|
4321
3836
|
if (n) {
|
|
4322
3837
|
if (typeof n == "object" && "default" in n) {
|
|
4323
|
-
const o = a?.args?.type || "default",
|
|
4324
|
-
return
|
|
3838
|
+
const o = a?.args?.type || "default", i = n;
|
|
3839
|
+
return i[o] || i.default;
|
|
4325
3840
|
}
|
|
4326
3841
|
return n;
|
|
4327
3842
|
}
|
|
4328
3843
|
}
|
|
4329
|
-
function
|
|
3844
|
+
function Wo(e) {
|
|
4330
3845
|
if (typeof e != "string") {
|
|
4331
3846
|
const a = e?.type;
|
|
4332
|
-
if (a ===
|
|
3847
|
+
if (a === s.EACH || a === s.IF) return !1;
|
|
4333
3848
|
}
|
|
4334
|
-
return
|
|
3849
|
+
return Ne(e).length === 0;
|
|
4335
3850
|
}
|
|
4336
|
-
const
|
|
3851
|
+
const Vo = Ae(
|
|
4337
3852
|
({ tree: e, index: a = 0, path: r = "root", scope: n, indexScope: o }) => {
|
|
4338
|
-
const
|
|
3853
|
+
const i = oe(ie);
|
|
4339
3854
|
if (!e) return null;
|
|
4340
3855
|
if (typeof e == "string")
|
|
4341
3856
|
return e;
|
|
4342
3857
|
try {
|
|
4343
|
-
const l = e.type || "div", u =
|
|
4344
|
-
if (l ===
|
|
3858
|
+
const l = e.type || "div", u = Ee(l, i), p = L(e, a, r), g = me(e, {}, p);
|
|
3859
|
+
if (l === s.IMAGE && (g.src === "" || g.src == null))
|
|
4345
3860
|
return null;
|
|
4346
3861
|
const x = e.children && e.children.length > 0 ? e.children.map(
|
|
4347
|
-
(
|
|
4348
|
-
|
|
4349
|
-
|
|
3862
|
+
(w, z) => Q(
|
|
3863
|
+
w,
|
|
3864
|
+
z,
|
|
4350
3865
|
`${r}-${a}`,
|
|
4351
3866
|
n,
|
|
4352
3867
|
o,
|
|
4353
|
-
|
|
3868
|
+
L(e, z, `${r}-${a}`)
|
|
4354
3869
|
)
|
|
4355
|
-
) : void 0, v = typeof u == "string" &&
|
|
4356
|
-
return v !== void 0 ?
|
|
3870
|
+
) : void 0, v = typeof u == "string" && Re.has(u) ? void 0 : x;
|
|
3871
|
+
return v !== void 0 ? F(u, g, v) : F(u, g);
|
|
4357
3872
|
} catch (l) {
|
|
4358
3873
|
return console.error(`Error at ${r}-${a}:`, l), null;
|
|
4359
3874
|
}
|
|
4360
3875
|
}
|
|
4361
3876
|
);
|
|
4362
|
-
function
|
|
4363
|
-
return
|
|
4364
|
-
|
|
3877
|
+
function Q(e, a, r, n, o, i) {
|
|
3878
|
+
return Wo(e) ? /* @__PURE__ */ d(
|
|
3879
|
+
Vo,
|
|
4365
3880
|
{
|
|
4366
3881
|
tree: e,
|
|
4367
3882
|
index: a,
|
|
@@ -4369,9 +3884,9 @@ function te(e, a, r, n, o, s) {
|
|
|
4369
3884
|
scope: n,
|
|
4370
3885
|
indexScope: o
|
|
4371
3886
|
},
|
|
4372
|
-
|
|
3887
|
+
i
|
|
4373
3888
|
) : /* @__PURE__ */ d(
|
|
4374
|
-
|
|
3889
|
+
qo,
|
|
4375
3890
|
{
|
|
4376
3891
|
tree: e,
|
|
4377
3892
|
index: a,
|
|
@@ -4379,197 +3894,197 @@ function te(e, a, r, n, o, s) {
|
|
|
4379
3894
|
scope: n,
|
|
4380
3895
|
indexScope: o
|
|
4381
3896
|
},
|
|
4382
|
-
|
|
3897
|
+
i
|
|
4383
3898
|
);
|
|
4384
3899
|
}
|
|
4385
3900
|
const pe = Ae(
|
|
4386
3901
|
({ tree: e, index: a = 0, path: r = "root", data: n, scope: o }) => {
|
|
4387
|
-
const
|
|
3902
|
+
const i = oe(ie), l = Zt(() => Ne(e ?? ""), [e]), u = ye(() => {
|
|
4388
3903
|
}, []);
|
|
4389
3904
|
if (!e) return null;
|
|
4390
|
-
const p =
|
|
3905
|
+
const p = xa(l, (g) => g in n && g !== "data" ? n[g] : re(n.data ?? n, g));
|
|
4391
3906
|
if (typeof e == "string")
|
|
4392
|
-
return
|
|
3907
|
+
return D(e, p);
|
|
4393
3908
|
try {
|
|
4394
|
-
const
|
|
4395
|
-
if (
|
|
4396
|
-
return
|
|
3909
|
+
const g = e.type || "div";
|
|
3910
|
+
if (g === s.IF)
|
|
3911
|
+
return D(e.args.condition, p) ? /* @__PURE__ */ d(M, { children: (e.children ?? []).map((_, T) => /* @__PURE__ */ d(
|
|
4397
3912
|
pe,
|
|
4398
3913
|
{
|
|
4399
3914
|
tree: _,
|
|
4400
|
-
index:
|
|
3915
|
+
index: T,
|
|
4401
3916
|
path: `${r}-${a}-if`,
|
|
4402
3917
|
data: n,
|
|
4403
3918
|
scope: o
|
|
4404
3919
|
},
|
|
4405
|
-
|
|
3920
|
+
L(_, T, `${r}-${a}-if`)
|
|
4406
3921
|
)) }) : null;
|
|
4407
|
-
if (
|
|
4408
|
-
const { as:
|
|
4409
|
-
return /* @__PURE__ */ d(
|
|
4410
|
-
const
|
|
3922
|
+
if (g === s.EACH) {
|
|
3923
|
+
const { as: C, index: _, key: T } = e.args, y = D(e.args.items, p), R = Array.isArray(y) ? y : [], $ = typeof e.args.items == "string" && e.args.items.startsWith("{{") && e.args.items.endsWith("}}") ? e.args.items.slice(2, -2).trim() : "", J = $ ? ne($, o) : "";
|
|
3924
|
+
return /* @__PURE__ */ d(M, { children: R.map((H, U) => {
|
|
3925
|
+
const he = {
|
|
4411
3926
|
...n,
|
|
4412
3927
|
data: {
|
|
4413
3928
|
...n.data ?? n,
|
|
4414
|
-
[
|
|
4415
|
-
..._ ? { [_]:
|
|
3929
|
+
[C]: H,
|
|
3930
|
+
..._ ? { [_]: U } : {}
|
|
4416
3931
|
}
|
|
4417
|
-
},
|
|
4418
|
-
return /* @__PURE__ */ d(
|
|
3932
|
+
}, X = J ? { ...o, [C]: `${J}.${U}` } : o, de = T ? D(T, { ...p, [C]: H }) : U, le = `${r}-${a}-each-${de}`;
|
|
3933
|
+
return /* @__PURE__ */ d(Qt, { children: (e.children ?? []).map((K, Y) => /* @__PURE__ */ d(
|
|
4419
3934
|
pe,
|
|
4420
3935
|
{
|
|
4421
|
-
tree:
|
|
4422
|
-
index:
|
|
4423
|
-
path:
|
|
4424
|
-
data:
|
|
4425
|
-
scope:
|
|
3936
|
+
tree: K,
|
|
3937
|
+
index: Y,
|
|
3938
|
+
path: le,
|
|
3939
|
+
data: he,
|
|
3940
|
+
scope: X
|
|
4426
3941
|
},
|
|
4427
|
-
|
|
4428
|
-
)) }, String(
|
|
3942
|
+
L(K, Y, le)
|
|
3943
|
+
)) }, String(de));
|
|
4429
3944
|
}) });
|
|
4430
3945
|
}
|
|
4431
|
-
const x =
|
|
4432
|
-
let
|
|
4433
|
-
if (
|
|
4434
|
-
const
|
|
4435
|
-
if (typeof
|
|
4436
|
-
const _ =
|
|
4437
|
-
|
|
4438
|
-
keyPath:
|
|
4439
|
-
storeValue: re(n.data ?? n,
|
|
3946
|
+
const x = Ee(g, i), v = L(e, a, r), w = ya(g, e, i);
|
|
3947
|
+
let z;
|
|
3948
|
+
if (w) {
|
|
3949
|
+
const C = e.args[w.valueProp];
|
|
3950
|
+
if (typeof C == "string" && C.startsWith("{{") && C.endsWith("}}")) {
|
|
3951
|
+
const _ = C.slice(2, -2).trim(), T = ne(_, o);
|
|
3952
|
+
z = {
|
|
3953
|
+
keyPath: T,
|
|
3954
|
+
storeValue: re(n.data ?? n, T)
|
|
4440
3955
|
};
|
|
4441
3956
|
}
|
|
4442
3957
|
}
|
|
4443
|
-
if (
|
|
4444
|
-
const
|
|
4445
|
-
if (
|
|
3958
|
+
if (g === s.IMAGE) {
|
|
3959
|
+
const C = D(e.args?.src, p);
|
|
3960
|
+
if (C === "" || C == null) return null;
|
|
4446
3961
|
}
|
|
4447
|
-
const
|
|
3962
|
+
const O = e.children && e.children.length > 0 ? e.children.map((C, _) => /* @__PURE__ */ d(
|
|
4448
3963
|
pe,
|
|
4449
3964
|
{
|
|
4450
|
-
tree:
|
|
3965
|
+
tree: C,
|
|
4451
3966
|
index: _,
|
|
4452
3967
|
path: `${r}-${a}`,
|
|
4453
3968
|
data: n,
|
|
4454
3969
|
scope: o
|
|
4455
3970
|
},
|
|
4456
|
-
|
|
4457
|
-
)) : void 0,
|
|
4458
|
-
if (
|
|
3971
|
+
L(e, _, `${r}-${a}`)
|
|
3972
|
+
)) : void 0, E = typeof x == "string" && Re.has(x) ? void 0 : O;
|
|
3973
|
+
if (z && w)
|
|
4459
3974
|
return /* @__PURE__ */ d(
|
|
4460
|
-
|
|
3975
|
+
va,
|
|
4461
3976
|
{
|
|
4462
3977
|
tree: e,
|
|
4463
3978
|
dataSlice: p,
|
|
4464
3979
|
elementKey: v,
|
|
4465
3980
|
ElementType: x,
|
|
4466
|
-
ctrlInput:
|
|
4467
|
-
keyPath:
|
|
4468
|
-
storeValue:
|
|
3981
|
+
ctrlInput: w,
|
|
3982
|
+
keyPath: z.keyPath,
|
|
3983
|
+
storeValue: z.storeValue,
|
|
4469
3984
|
updateData: u,
|
|
4470
|
-
children:
|
|
3985
|
+
children: E
|
|
4471
3986
|
}
|
|
4472
3987
|
);
|
|
4473
|
-
const G =
|
|
4474
|
-
return
|
|
4475
|
-
} catch (
|
|
4476
|
-
return console.error(`Error at ${r}-${a}:`,
|
|
3988
|
+
const G = me(e, p, v);
|
|
3989
|
+
return E !== void 0 ? F(x, G, E) : F(x, G);
|
|
3990
|
+
} catch (g) {
|
|
3991
|
+
return console.error(`Error at ${r}-${a}:`, g), null;
|
|
4477
3992
|
}
|
|
4478
3993
|
}
|
|
4479
|
-
),
|
|
3994
|
+
), qo = Ae(
|
|
4480
3995
|
({ tree: e, index: a = 0, path: r = "root", scope: n, indexScope: o }) => {
|
|
4481
|
-
const
|
|
3996
|
+
const i = oe(ie), l = Se(), u = Aa(l, { sync: !0 }), p = jo(), g = Zt(() => Ne(e ?? ""), [e]);
|
|
4482
3997
|
if (!e) return null;
|
|
4483
|
-
const x =
|
|
4484
|
-
|
|
4485
|
-
(v) =>
|
|
3998
|
+
const x = xa(
|
|
3999
|
+
g,
|
|
4000
|
+
(v) => Fo(v, u, n, o)
|
|
4486
4001
|
);
|
|
4487
4002
|
if (typeof e == "string")
|
|
4488
|
-
return
|
|
4003
|
+
return D(e, x);
|
|
4489
4004
|
try {
|
|
4490
4005
|
const v = e.type || "div";
|
|
4491
|
-
if (v ===
|
|
4492
|
-
return
|
|
4493
|
-
(
|
|
4494
|
-
|
|
4495
|
-
|
|
4006
|
+
if (v === s.IF)
|
|
4007
|
+
return D(e.args.condition, x) ? /* @__PURE__ */ d(M, { children: (e.children ?? []).map(
|
|
4008
|
+
(y, R) => Q(
|
|
4009
|
+
y,
|
|
4010
|
+
R,
|
|
4496
4011
|
`${r}-${a}-if`,
|
|
4497
4012
|
n,
|
|
4498
4013
|
o,
|
|
4499
|
-
|
|
4014
|
+
L(y, R, `${r}-${a}-if`)
|
|
4500
4015
|
)
|
|
4501
4016
|
) }) : null;
|
|
4502
|
-
if (v ===
|
|
4503
|
-
const { as:
|
|
4504
|
-
return /* @__PURE__ */ d(
|
|
4505
|
-
const
|
|
4506
|
-
return /* @__PURE__ */ d(
|
|
4507
|
-
(Pe,
|
|
4017
|
+
if (v === s.EACH) {
|
|
4018
|
+
const { as: T, index: y, key: R } = e.args, $ = D(e.args.items, x), J = Array.isArray($) ? $ : [], H = typeof e.args.items == "string" && e.args.items.startsWith("{{") && e.args.items.endsWith("}}") ? e.args.items.slice(2, -2).trim() : "", U = H ? ne(H, n) : "";
|
|
4019
|
+
return /* @__PURE__ */ d(M, { children: J.map((he, X) => {
|
|
4020
|
+
const de = U ? { ...n, [T]: `${U}.${X}` } : n, le = y ? { ...o, [y]: X } : o, K = R ? D(R, { ...x, [T]: he }) : X, Y = `${r}-${a}-each-${K}`;
|
|
4021
|
+
return /* @__PURE__ */ d(Qt, { children: (e.children ?? []).map(
|
|
4022
|
+
(Pe, Oe) => Q(
|
|
4508
4023
|
Pe,
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
se,
|
|
4024
|
+
Oe,
|
|
4025
|
+
Y,
|
|
4512
4026
|
de,
|
|
4513
|
-
|
|
4027
|
+
le,
|
|
4028
|
+
L(Pe, Oe, Y)
|
|
4514
4029
|
)
|
|
4515
|
-
) }, String(
|
|
4030
|
+
) }, String(K));
|
|
4516
4031
|
}) });
|
|
4517
4032
|
}
|
|
4518
|
-
const
|
|
4519
|
-
let
|
|
4520
|
-
if (
|
|
4521
|
-
const
|
|
4522
|
-
if (typeof
|
|
4523
|
-
const
|
|
4524
|
-
|
|
4525
|
-
keyPath:
|
|
4526
|
-
storeValue: re(u.data ?? u,
|
|
4033
|
+
const w = Ee(v, i), z = L(e, a, r), O = ya(v, e, i);
|
|
4034
|
+
let E;
|
|
4035
|
+
if (O) {
|
|
4036
|
+
const T = e.args[O.valueProp];
|
|
4037
|
+
if (typeof T == "string" && T.startsWith("{{") && T.endsWith("}}")) {
|
|
4038
|
+
const y = T.slice(2, -2).trim(), R = ne(y, n);
|
|
4039
|
+
E = {
|
|
4040
|
+
keyPath: R,
|
|
4041
|
+
storeValue: re(u.data ?? u, R)
|
|
4527
4042
|
};
|
|
4528
4043
|
}
|
|
4529
4044
|
}
|
|
4530
|
-
if (v ===
|
|
4531
|
-
const
|
|
4532
|
-
if (
|
|
4045
|
+
if (v === s.IMAGE) {
|
|
4046
|
+
const T = D(e.args?.src, x);
|
|
4047
|
+
if (T === "" || T == null) return null;
|
|
4533
4048
|
}
|
|
4534
4049
|
const G = e.children && e.children.length > 0 ? e.children.map(
|
|
4535
|
-
(
|
|
4050
|
+
(T, y) => Q(
|
|
4051
|
+
T,
|
|
4536
4052
|
y,
|
|
4537
|
-
w,
|
|
4538
4053
|
`${r}-${a}`,
|
|
4539
4054
|
n,
|
|
4540
4055
|
o,
|
|
4541
|
-
|
|
4056
|
+
L(e, y, `${r}-${a}`)
|
|
4542
4057
|
)
|
|
4543
|
-
) : void 0,
|
|
4544
|
-
if (
|
|
4058
|
+
) : void 0, C = typeof w == "string" && Re.has(w) ? void 0 : G;
|
|
4059
|
+
if (E && O)
|
|
4545
4060
|
return /* @__PURE__ */ d(
|
|
4546
|
-
|
|
4061
|
+
va,
|
|
4547
4062
|
{
|
|
4548
4063
|
tree: e,
|
|
4549
4064
|
dataSlice: x,
|
|
4550
|
-
elementKey:
|
|
4551
|
-
ElementType:
|
|
4552
|
-
ctrlInput:
|
|
4553
|
-
keyPath:
|
|
4554
|
-
storeValue:
|
|
4065
|
+
elementKey: z,
|
|
4066
|
+
ElementType: w,
|
|
4067
|
+
ctrlInput: O,
|
|
4068
|
+
keyPath: E.keyPath,
|
|
4069
|
+
storeValue: E.storeValue,
|
|
4555
4070
|
updateData: p,
|
|
4556
|
-
children:
|
|
4071
|
+
children: C
|
|
4557
4072
|
}
|
|
4558
4073
|
);
|
|
4559
|
-
const _ =
|
|
4560
|
-
return
|
|
4074
|
+
const _ = me(e, x, z);
|
|
4075
|
+
return C !== void 0 ? F(w, _, C) : F(w, _);
|
|
4561
4076
|
} catch (v) {
|
|
4562
4077
|
return console.error(`Error at ${r}-${a}:`, v), null;
|
|
4563
4078
|
}
|
|
4564
4079
|
}
|
|
4565
4080
|
);
|
|
4566
|
-
function
|
|
4081
|
+
function Mo({
|
|
4567
4082
|
template: e,
|
|
4568
4083
|
expiry: a,
|
|
4569
4084
|
data: r,
|
|
4570
4085
|
status: n = "pending",
|
|
4571
4086
|
render: o = "web",
|
|
4572
|
-
registry:
|
|
4087
|
+
registry: i
|
|
4573
4088
|
}) {
|
|
4574
4089
|
const u = /* @__PURE__ */ d(pe, { tree: e, index: 0, path: "root", data: {
|
|
4575
4090
|
data: r ?? {},
|
|
@@ -4577,15 +4092,15 @@ function oi({
|
|
|
4577
4092
|
status: n,
|
|
4578
4093
|
submitting: !1
|
|
4579
4094
|
} });
|
|
4580
|
-
return /* @__PURE__ */ d(ie.Provider, { value:
|
|
4095
|
+
return /* @__PURE__ */ d(ie.Provider, { value: i ?? Ce, children: /* @__PURE__ */ d(ke.Provider, { value: o, children: o === "pdf" ? /* @__PURE__ */ d("div", { "data-mode": o, className: "group bonsai-root w-full", children: u }) : /* @__PURE__ */ d("form", { "data-mode": o, className: "group bonsai-root", children: u }) }) });
|
|
4581
4096
|
}
|
|
4582
|
-
function
|
|
4097
|
+
function Jo({
|
|
4583
4098
|
captureUrl: e,
|
|
4584
4099
|
template: a,
|
|
4585
4100
|
render: r = "web",
|
|
4586
4101
|
registry: n
|
|
4587
4102
|
}) {
|
|
4588
|
-
const o =
|
|
4103
|
+
const o = Se(), i = async (u) => {
|
|
4589
4104
|
if (u.preventDefault(), o.status !== "pending") {
|
|
4590
4105
|
o.submitting = !0;
|
|
4591
4106
|
return;
|
|
@@ -4605,22 +4120,22 @@ function ii({
|
|
|
4605
4120
|
} finally {
|
|
4606
4121
|
o.submitting = !1;
|
|
4607
4122
|
}
|
|
4608
|
-
}, l =
|
|
4609
|
-
return /* @__PURE__ */ d(ie.Provider, { value: n ?? Ce, children: r === "pdf" ? /* @__PURE__ */ d("div", { "data-mode": r, className: "group bonsai-root w-full", children: l }) : /* @__PURE__ */ d("form", { "data-mode": r, className: "group bonsai-root", onSubmit:
|
|
4123
|
+
}, l = Q(a, 0, "root", void 0, void 0, "root-0");
|
|
4124
|
+
return /* @__PURE__ */ d(ie.Provider, { value: n ?? Ce, children: /* @__PURE__ */ d(ke.Provider, { value: r, children: r === "pdf" ? /* @__PURE__ */ d("div", { "data-mode": r, className: "group bonsai-root w-full", children: l }) : /* @__PURE__ */ d("form", { "data-mode": r, className: "group bonsai-root", onSubmit: i, children: l }) }) });
|
|
4610
4125
|
}
|
|
4611
|
-
function
|
|
4612
|
-
return typeof window > "u" ? /* @__PURE__ */ d(
|
|
4126
|
+
function $s(e) {
|
|
4127
|
+
return typeof window > "u" ? /* @__PURE__ */ d(Mo, { ...e }) : /* @__PURE__ */ d(Xo, { ...e });
|
|
4613
4128
|
}
|
|
4614
|
-
function
|
|
4615
|
-
const a =
|
|
4616
|
-
return a.current === null && (a.current =
|
|
4129
|
+
function Xo(e) {
|
|
4130
|
+
const a = W(null);
|
|
4131
|
+
return a.current === null && (a.current = za({
|
|
4617
4132
|
status: e.status ?? "pending",
|
|
4618
4133
|
expiry: e.expiry ?? "",
|
|
4619
4134
|
data: e.data ?? {},
|
|
4620
4135
|
submitting: !1
|
|
4621
|
-
})), /* @__PURE__ */ d(
|
|
4136
|
+
})), /* @__PURE__ */ d(ba.Provider, { value: a.current, children: /* @__PURE__ */ d(Jo, { ...e }) });
|
|
4622
4137
|
}
|
|
4623
|
-
function
|
|
4138
|
+
function Ko(e, a) {
|
|
4624
4139
|
if (!e)
|
|
4625
4140
|
return { action: "render", reason: "no-pin" };
|
|
4626
4141
|
if (e.id !== a.id)
|
|
@@ -4636,75 +4151,75 @@ function di(e, a) {
|
|
|
4636
4151
|
warning: r ? `Template is pinned to registry "${e.id}"@"${e.version}" (manifest ${e.manifestHash}), but the resolved manifest is now ${a.manifestHash}. Re-pin on next save.` : `Template is pinned to registry "${e.id}"@"${e.version}", but rendering registry is "${e.id}"@"${a.version}". Re-pin on next save.`
|
|
4637
4152
|
};
|
|
4638
4153
|
}
|
|
4639
|
-
const
|
|
4640
|
-
function
|
|
4154
|
+
const Yo = [s.EACH, s.IF];
|
|
4155
|
+
function Zo(e, a) {
|
|
4641
4156
|
return e.capabilities ? a === "pdf" ? e.capabilities.includes("pdf") : e.capabilities.includes("ssr") : !0;
|
|
4642
4157
|
}
|
|
4643
|
-
function
|
|
4158
|
+
function be(e, a, r, n, o) {
|
|
4644
4159
|
if (e == null || typeof e == "string") return;
|
|
4645
|
-
const
|
|
4646
|
-
if (!
|
|
4160
|
+
const i = e.type;
|
|
4161
|
+
if (!i) {
|
|
4647
4162
|
o.push({ path: a, message: "Node is missing a required `type` field" });
|
|
4648
4163
|
return;
|
|
4649
4164
|
}
|
|
4650
|
-
if (
|
|
4165
|
+
if (Yo.includes(i)) {
|
|
4651
4166
|
(e.children ?? []).forEach(
|
|
4652
|
-
(p,
|
|
4167
|
+
(p, g) => be(p, `${a}.children[${g}]`, r, n, o)
|
|
4653
4168
|
);
|
|
4654
4169
|
return;
|
|
4655
4170
|
}
|
|
4656
|
-
const l = r.components[
|
|
4171
|
+
const l = r.components[i];
|
|
4657
4172
|
if (!l) {
|
|
4658
4173
|
o.push({
|
|
4659
4174
|
path: a,
|
|
4660
|
-
componentType:
|
|
4661
|
-
message: `Unknown component type "${
|
|
4175
|
+
componentType: i,
|
|
4176
|
+
message: `Unknown component type "${i}" in registry "${r.id}"@"${r.version}"`
|
|
4662
4177
|
});
|
|
4663
4178
|
return;
|
|
4664
4179
|
}
|
|
4665
|
-
if (
|
|
4180
|
+
if (Zo(l, n) || o.push({
|
|
4666
4181
|
path: a,
|
|
4667
|
-
componentType:
|
|
4668
|
-
message: `Component "${
|
|
4182
|
+
componentType: i,
|
|
4183
|
+
message: `Component "${i}" in registry "${r.id}"@"${r.version}" does not support "${n}" rendering`
|
|
4669
4184
|
}), l.propsSchema) {
|
|
4670
4185
|
const p = l.propsSchema.safeParse(e.args);
|
|
4671
4186
|
if (!p.success)
|
|
4672
|
-
for (const
|
|
4673
|
-
const x =
|
|
4674
|
-
o.push({ path: x, componentType:
|
|
4187
|
+
for (const g of p.error.issues) {
|
|
4188
|
+
const x = g.path.length ? `${a}.args.${g.path.join(".")}` : `${a}.args`;
|
|
4189
|
+
o.push({ path: x, componentType: i, message: g.message });
|
|
4675
4190
|
}
|
|
4676
4191
|
}
|
|
4677
4192
|
(e.children?.length ?? 0) > 0 && (l.capabilities && !l.capabilities.includes("children") && o.push({
|
|
4678
4193
|
path: a,
|
|
4679
|
-
componentType:
|
|
4680
|
-
message: `Component "${
|
|
4194
|
+
componentType: i,
|
|
4195
|
+
message: `Component "${i}" in registry "${r.id}"@"${r.version}" does not accept children`
|
|
4681
4196
|
}), (e.children ?? []).forEach(
|
|
4682
|
-
(p,
|
|
4197
|
+
(p, g) => be(p, `${a}.children[${g}]`, r, n, o)
|
|
4683
4198
|
));
|
|
4684
4199
|
}
|
|
4685
|
-
function
|
|
4200
|
+
function Hs(e, a, r = {}) {
|
|
4686
4201
|
const n = [], o = [];
|
|
4687
4202
|
if (r.pin) {
|
|
4688
|
-
const
|
|
4689
|
-
if (
|
|
4690
|
-
return n.push({ path: "root", message:
|
|
4691
|
-
|
|
4203
|
+
const i = Ko(r.pin, a);
|
|
4204
|
+
if (i.action === "fail")
|
|
4205
|
+
return n.push({ path: "root", message: i.error }), { valid: !1, errors: n, warnings: o };
|
|
4206
|
+
i.reason === "version-skew" && o.push(i.warning);
|
|
4692
4207
|
}
|
|
4693
|
-
return
|
|
4208
|
+
return be(e, "root", a, r.mode ?? "web", n), { valid: n.length === 0, errors: n, warnings: o };
|
|
4694
4209
|
}
|
|
4695
|
-
const
|
|
4210
|
+
const Qo = t.string().refine((e) => e.startsWith("{{") && e.endsWith("}}"), {
|
|
4696
4211
|
message: 'Expected a value of the declared type, or a "{{binding}}" expression'
|
|
4697
4212
|
});
|
|
4698
|
-
function
|
|
4699
|
-
const r = (o) => a.allowBindings ? t.union([
|
|
4213
|
+
function xe(e, a = {}) {
|
|
4214
|
+
const r = (o) => a.allowBindings ? t.union([Qo, o]) : o;
|
|
4700
4215
|
if ("const" in e)
|
|
4701
4216
|
return r(t.literal(e.const));
|
|
4702
4217
|
if (Array.isArray(e.enum)) {
|
|
4703
4218
|
const o = e.enum;
|
|
4704
4219
|
if (o.length === 0)
|
|
4705
4220
|
throw new Error("jsonSchemaToZod: enum must have at least one value");
|
|
4706
|
-
const [
|
|
4707
|
-
return r(l.reduce((u, p) => t.union([u, t.literal(p)]), t.literal(
|
|
4221
|
+
const [i, ...l] = o;
|
|
4222
|
+
return r(l.reduce((u, p) => t.union([u, t.literal(p)]), t.literal(i)));
|
|
4708
4223
|
}
|
|
4709
4224
|
const n = e.type;
|
|
4710
4225
|
switch (n) {
|
|
@@ -4720,14 +4235,14 @@ function ve(e, a = {}) {
|
|
|
4720
4235
|
case "boolean":
|
|
4721
4236
|
return r(t.boolean());
|
|
4722
4237
|
case "array": {
|
|
4723
|
-
const o = e.items ?
|
|
4238
|
+
const o = e.items ? xe(e.items, a) : t.unknown();
|
|
4724
4239
|
return r(t.array(o));
|
|
4725
4240
|
}
|
|
4726
4241
|
case "object": {
|
|
4727
|
-
const o = e.properties ?? {},
|
|
4728
|
-
for (const [p,
|
|
4729
|
-
const x =
|
|
4730
|
-
l[p] =
|
|
4242
|
+
const o = e.properties ?? {}, i = new Set(e.required ?? []), l = {};
|
|
4243
|
+
for (const [p, g] of Object.entries(o)) {
|
|
4244
|
+
const x = xe(g, a);
|
|
4245
|
+
l[p] = i.has(p) ? x : x.optional();
|
|
4731
4246
|
}
|
|
4732
4247
|
let u = t.object(l);
|
|
4733
4248
|
return e.additionalProperties === !1 && (u = u.strict()), u;
|
|
@@ -4736,20 +4251,20 @@ function ve(e, a = {}) {
|
|
|
4736
4251
|
return t.unknown();
|
|
4737
4252
|
}
|
|
4738
4253
|
}
|
|
4739
|
-
const
|
|
4254
|
+
const es = t.object({
|
|
4740
4255
|
valueProp: t.string().min(1),
|
|
4741
4256
|
changeProp: t.string().min(1),
|
|
4742
4257
|
extract: t.string().min(1)
|
|
4743
|
-
}).strict(),
|
|
4258
|
+
}).strict(), ts = t.object({
|
|
4744
4259
|
name: t.string().min(1),
|
|
4745
4260
|
canonicalName: t.string().min(1).optional(),
|
|
4746
4261
|
// Case A: a key resolved against `base`'s exports, never a module path to import.
|
|
4747
4262
|
entry: t.string().min(1),
|
|
4748
4263
|
propsSchema: t.record(t.string(), t.unknown()).optional(),
|
|
4749
4264
|
capabilities: t.array(t.enum(["children", "bindings", "events", "formField", "ssr", "pdf"])).optional(),
|
|
4750
|
-
controlled:
|
|
4265
|
+
controlled: es.optional(),
|
|
4751
4266
|
css: t.array(t.string()).optional()
|
|
4752
|
-
}).strict(),
|
|
4267
|
+
}).strict(), wa = t.object({
|
|
4753
4268
|
$schema: t.string().optional(),
|
|
4754
4269
|
id: t.string().min(1),
|
|
4755
4270
|
namespace: t.string().min(1).optional(),
|
|
@@ -4758,86 +4273,86 @@ const pi = t.object({
|
|
|
4758
4273
|
name: t.literal("bonsai"),
|
|
4759
4274
|
api: t.string().min(1)
|
|
4760
4275
|
}).strict(),
|
|
4761
|
-
components: t.array(
|
|
4276
|
+
components: t.array(ts).min(1),
|
|
4762
4277
|
integrity: t.object({
|
|
4763
4278
|
algorithm: t.literal("sha256"),
|
|
4764
4279
|
manifestHash: t.string().min(1)
|
|
4765
4280
|
}).strict().optional()
|
|
4766
|
-
}).strict(),
|
|
4281
|
+
}).strict(), as = "1", Kt = {
|
|
4767
4282
|
identity: (e) => e,
|
|
4768
4283
|
targetValue: (e) => e?.target?.value,
|
|
4769
4284
|
targetChecked: (e) => e?.target?.checked,
|
|
4770
4285
|
targetValueAsNumber: (e) => e?.target?.valueAsNumber
|
|
4771
4286
|
};
|
|
4772
|
-
class
|
|
4287
|
+
class j extends Error {
|
|
4773
4288
|
constructor(a) {
|
|
4774
4289
|
super(a), this.name = "ManifestLoadError";
|
|
4775
4290
|
}
|
|
4776
4291
|
}
|
|
4777
|
-
function
|
|
4292
|
+
function rs(e, a) {
|
|
4778
4293
|
return e ? a ? t.any().superRefine((r, n) => {
|
|
4779
4294
|
const o = e.safeParse(r);
|
|
4780
4295
|
if (!o.success)
|
|
4781
4296
|
for (const l of o.error.issues)
|
|
4782
4297
|
n.addIssue({ code: "custom", message: l.message, path: l.path });
|
|
4783
|
-
const
|
|
4784
|
-
if (!
|
|
4785
|
-
for (const l of
|
|
4298
|
+
const i = a.safeParse(r);
|
|
4299
|
+
if (!i.success)
|
|
4300
|
+
for (const l of i.error.issues)
|
|
4786
4301
|
n.addIssue({ code: "custom", message: l.message, path: l.path });
|
|
4787
4302
|
}) : e : a;
|
|
4788
4303
|
}
|
|
4789
|
-
async function
|
|
4304
|
+
async function ns(e) {
|
|
4790
4305
|
const a = new TextEncoder().encode(e), r = await crypto.subtle.digest("SHA-256", a);
|
|
4791
4306
|
return `sha256:${Array.from(new Uint8Array(r)).map((o) => o.toString(16).padStart(2, "0")).join("")}`;
|
|
4792
4307
|
}
|
|
4793
|
-
function
|
|
4794
|
-
const a =
|
|
4308
|
+
function os(e) {
|
|
4309
|
+
const a = Kt[e];
|
|
4795
4310
|
if (!a)
|
|
4796
|
-
throw new
|
|
4797
|
-
`Registry manifest: unknown extractor "${e}" — must be one of: ${Object.keys(
|
|
4311
|
+
throw new j(
|
|
4312
|
+
`Registry manifest: unknown extractor "${e}" — must be one of: ${Object.keys(Kt).join(", ")}`
|
|
4798
4313
|
);
|
|
4799
4314
|
return a;
|
|
4800
4315
|
}
|
|
4801
|
-
function
|
|
4316
|
+
function ss(e, a, r) {
|
|
4802
4317
|
const n = a.components[e.entry];
|
|
4803
4318
|
if (!n)
|
|
4804
|
-
throw new
|
|
4319
|
+
throw new j(
|
|
4805
4320
|
`Registry manifest "${r}": component "${e.name}" resolves entry "${e.entry}", which is not exported by base registry "${a.id}"@"${a.version}"`
|
|
4806
4321
|
);
|
|
4807
|
-
const o = e.propsSchema ?
|
|
4322
|
+
const o = e.propsSchema ? xe(e.propsSchema) : void 0, i = e.controlled ? {
|
|
4808
4323
|
valueProp: e.controlled.valueProp,
|
|
4809
4324
|
changeProp: e.controlled.changeProp,
|
|
4810
|
-
extract:
|
|
4325
|
+
extract: os(e.controlled.extract)
|
|
4811
4326
|
} : n.controlled;
|
|
4812
4327
|
return [
|
|
4813
4328
|
e.canonicalName ?? e.name,
|
|
4814
4329
|
{
|
|
4815
4330
|
component: n.component,
|
|
4816
|
-
propsSchema:
|
|
4331
|
+
propsSchema: rs(n.propsSchema, o),
|
|
4817
4332
|
capabilities: e.capabilities ?? n.capabilities,
|
|
4818
|
-
controlled:
|
|
4333
|
+
controlled: i,
|
|
4819
4334
|
assets: e.css ? { css: e.css } : n.assets
|
|
4820
4335
|
}
|
|
4821
4336
|
];
|
|
4822
4337
|
}
|
|
4823
|
-
function
|
|
4824
|
-
const r =
|
|
4338
|
+
function is(e, a) {
|
|
4339
|
+
const r = wa.parse(e), n = a.engineApi ?? as;
|
|
4825
4340
|
if (r.engine.api !== n)
|
|
4826
|
-
throw new
|
|
4341
|
+
throw new j(
|
|
4827
4342
|
`Registry manifest "${r.id}" targets engine.api "${r.engine.api}", but this build supports "${n}"`
|
|
4828
4343
|
);
|
|
4829
4344
|
const o = a.maxComponents ?? 500;
|
|
4830
4345
|
if (r.components.length > o)
|
|
4831
|
-
throw new
|
|
4346
|
+
throw new j(
|
|
4832
4347
|
`Registry manifest "${r.id}" declares ${r.components.length} components, exceeding the limit of ${o}`
|
|
4833
4348
|
);
|
|
4834
|
-
const
|
|
4835
|
-
if (a.rawManifestSize != null && a.rawManifestSize >
|
|
4836
|
-
throw new
|
|
4837
|
-
`Registry manifest "${r.id}" is ${a.rawManifestSize} bytes, exceeding the limit of ${
|
|
4349
|
+
const i = a.maxManifestBytes ?? 5 * 1024 * 1024;
|
|
4350
|
+
if (a.rawManifestSize != null && a.rawManifestSize > i)
|
|
4351
|
+
throw new j(
|
|
4352
|
+
`Registry manifest "${r.id}" is ${a.rawManifestSize} bytes, exceeding the limit of ${i}`
|
|
4838
4353
|
);
|
|
4839
4354
|
const l = Object.fromEntries(
|
|
4840
|
-
r.components.map((u) =>
|
|
4355
|
+
r.components.map((u) => ss(u, a.base, r.id))
|
|
4841
4356
|
);
|
|
4842
4357
|
return {
|
|
4843
4358
|
id: r.id,
|
|
@@ -4848,102 +4363,102 @@ function vi(e, a) {
|
|
|
4848
4363
|
components: l
|
|
4849
4364
|
};
|
|
4850
4365
|
}
|
|
4851
|
-
const
|
|
4852
|
-
function
|
|
4853
|
-
|
|
4366
|
+
const ve = /* @__PURE__ */ new Map();
|
|
4367
|
+
function Fs() {
|
|
4368
|
+
ve.clear();
|
|
4854
4369
|
}
|
|
4855
|
-
function
|
|
4370
|
+
function ds(e, a) {
|
|
4856
4371
|
if (!e.integrity)
|
|
4857
|
-
throw new
|
|
4372
|
+
throw new j(
|
|
4858
4373
|
`Registry manifest "${e.id}" has no integrity block — a manifest hash is required before use`
|
|
4859
4374
|
);
|
|
4860
4375
|
if (e.integrity.manifestHash !== a)
|
|
4861
|
-
throw new
|
|
4376
|
+
throw new j(
|
|
4862
4377
|
`Registry manifest "${e.id}" failed its integrity check: expected "${e.integrity.manifestHash}", computed "${a}"`
|
|
4863
4378
|
);
|
|
4864
4379
|
}
|
|
4865
|
-
async function
|
|
4380
|
+
async function Gs(e, a) {
|
|
4866
4381
|
let r;
|
|
4867
4382
|
if (typeof e == "string") {
|
|
4868
|
-
const
|
|
4869
|
-
if (a.allowedOrigins && !a.allowedOrigins.includes(
|
|
4870
|
-
throw new
|
|
4871
|
-
`Registry manifest origin "${
|
|
4383
|
+
const g = new URL(e);
|
|
4384
|
+
if (a.allowedOrigins && !a.allowedOrigins.includes(g.origin))
|
|
4385
|
+
throw new j(
|
|
4386
|
+
`Registry manifest origin "${g.origin}" is not in the allowed origins list`
|
|
4872
4387
|
);
|
|
4873
4388
|
const v = await (a.fetchImpl ?? fetch)(e);
|
|
4874
4389
|
if (!v.ok)
|
|
4875
|
-
throw new
|
|
4390
|
+
throw new j(
|
|
4876
4391
|
`Registry manifest fetch failed: ${e} responded ${v.status}`
|
|
4877
4392
|
);
|
|
4878
4393
|
r = await v.text();
|
|
4879
4394
|
} else
|
|
4880
4395
|
r = JSON.stringify(e);
|
|
4881
|
-
const n =
|
|
4882
|
-
|
|
4883
|
-
const u =
|
|
4396
|
+
const n = wa.parse(JSON.parse(r)), { integrity: o, ...i } = n, l = await ns(JSON.stringify(i));
|
|
4397
|
+
ds(n, l);
|
|
4398
|
+
const u = ve.get(l);
|
|
4884
4399
|
if (u) return u;
|
|
4885
|
-
const p =
|
|
4886
|
-
return
|
|
4400
|
+
const p = is(n, { ...a, rawManifestSize: r.length, manifestHash: l });
|
|
4401
|
+
return ve.set(l, p), p;
|
|
4887
4402
|
}
|
|
4888
|
-
function
|
|
4403
|
+
function Ws(e, a) {
|
|
4889
4404
|
const r = { ...e?.properties ?? {}, ...a?.properties ?? {} }, n = [.../* @__PURE__ */ new Set([...e?.required ?? [], ...a?.required ?? []])];
|
|
4890
4405
|
return { type: "object", properties: r, required: n };
|
|
4891
4406
|
}
|
|
4892
|
-
function
|
|
4893
|
-
const r = new Map(e.map((
|
|
4894
|
-
for (const [
|
|
4895
|
-
const u = r.get(
|
|
4896
|
-
u === void 0 ? o.push(`${
|
|
4407
|
+
function ls(e, a) {
|
|
4408
|
+
const r = new Map(e.map((i) => [i.url, i.registryHash])), n = new Map(a.map((i) => [i.url, i.registryHash])), o = [];
|
|
4409
|
+
for (const [i, l] of n) {
|
|
4410
|
+
const u = r.get(i);
|
|
4411
|
+
u === void 0 ? o.push(`${i} is configured but missing from the artifact`) : u !== l && o.push(`${i}: artifact has ${u}, pebble-kit.json records ${l}`);
|
|
4897
4412
|
}
|
|
4898
|
-
for (const
|
|
4899
|
-
n.has(
|
|
4413
|
+
for (const i of r.keys())
|
|
4414
|
+
n.has(i) || o.push(`${i} is in the artifact but no longer configured`);
|
|
4900
4415
|
return o.length > 0 ? o.join("; ") : void 0;
|
|
4901
4416
|
}
|
|
4902
|
-
function
|
|
4417
|
+
function Yt(e) {
|
|
4903
4418
|
const a = /(\d+)\.\d+\.\d+/.exec(e);
|
|
4904
4419
|
return a ? Number(a[1]) : void 0;
|
|
4905
4420
|
}
|
|
4906
|
-
function
|
|
4907
|
-
const a = [], r =
|
|
4421
|
+
function Vs(e) {
|
|
4422
|
+
const a = [], r = ls(e.artifactRegistries, e.configRegistries);
|
|
4908
4423
|
if (r && a.push({
|
|
4909
4424
|
check: "stale-artifact",
|
|
4910
4425
|
level: "fail",
|
|
4911
4426
|
message: `bonsai.generated.json is out of date with pebble-kit.json (${r}) — run "pebble-kit generate"`
|
|
4912
4427
|
}), e.artifactBaseUiVersion !== e.installedBaseUiVersion) {
|
|
4913
|
-
const n =
|
|
4428
|
+
const n = Yt(e.artifactBaseUiVersion), o = Yt(e.installedBaseUiVersion), i = n !== void 0 && o !== void 0 && n !== o;
|
|
4914
4429
|
a.push({
|
|
4915
4430
|
check: "baseui-drift",
|
|
4916
|
-
level:
|
|
4431
|
+
level: i ? "fail" : "warn",
|
|
4917
4432
|
message: `generated artifact's baseline was built against @base-ui/react ${e.artifactBaseUiVersion}, but ${e.installedBaseUiVersion} is installed`
|
|
4918
4433
|
});
|
|
4919
4434
|
}
|
|
4920
4435
|
return a;
|
|
4921
4436
|
}
|
|
4922
|
-
function
|
|
4437
|
+
function qs(e) {
|
|
4923
4438
|
const a = e.filter((r) => r.level === "fail");
|
|
4924
4439
|
if (a.length > 0)
|
|
4925
4440
|
throw new Error(a.map((r) => r.message).join("; "));
|
|
4926
4441
|
}
|
|
4927
4442
|
export {
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4443
|
+
$s as Bonsai,
|
|
4444
|
+
Kt as EXTRACTOR_ALLOWLIST,
|
|
4445
|
+
j as ManifestLoadError,
|
|
4446
|
+
wa as RegistryManifestSchema,
|
|
4447
|
+
qs as assertNoFailingDrift,
|
|
4448
|
+
Vs as checkArtifactDrift,
|
|
4449
|
+
Fs as clearManifestCache,
|
|
4450
|
+
Vt as componentMap,
|
|
4451
|
+
rs as composePropsSchema,
|
|
4452
|
+
ns as computeManifestHash,
|
|
4453
|
+
To as controlledInputMap,
|
|
4454
|
+
js as defineBonsaiRegistry,
|
|
4455
|
+
Bs as defineComponent,
|
|
4456
|
+
xe as jsonSchemaToZod,
|
|
4457
|
+
Gs as loadRegistryManifest,
|
|
4458
|
+
Ws as mergeGeneratedWithOverrides,
|
|
4944
4459
|
Ce as pebbleRegistry,
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4460
|
+
is as resolveManifest,
|
|
4461
|
+
Ko as resolveRegistryPin,
|
|
4462
|
+
jo as useUpdateData,
|
|
4463
|
+
Hs as validateTemplate
|
|
4949
4464
|
};
|