@tabl.io/ui 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +298 -60
- package/README.stories.md +226 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +764 -0
- package/dist/index.js +3623 -747
- package/package.json +6 -2
package/dist/index.js
CHANGED
|
@@ -1,366 +1,2296 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as s from "react";
|
|
2
|
+
import { createElement as rt, forwardRef as Kt, useState as Tn } from "react";
|
|
3
|
+
import * as On from "react-dom";
|
|
4
|
+
import Dn from "react-dom";
|
|
5
|
+
import { Fragment as ne, jsx as c, jsxs as x } from "react/jsx-runtime";
|
|
6
|
+
function Zt(e) {
|
|
7
|
+
var t, r, n = "";
|
|
8
|
+
if (typeof e == "string" || typeof e == "number") n += e;
|
|
6
9
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
7
|
-
var
|
|
8
|
-
for (t = 0; t <
|
|
9
|
-
} else for (r in e) e[r] && (
|
|
10
|
-
return
|
|
10
|
+
var o = e.length;
|
|
11
|
+
for (t = 0; t < o; t++) e[t] && (r = Zt(e[t])) && (n && (n += " "), n += r);
|
|
12
|
+
} else for (r in e) e[r] && (n && (n += " "), n += r);
|
|
13
|
+
return n;
|
|
11
14
|
}
|
|
12
|
-
function
|
|
13
|
-
for (var e, t, r = 0,
|
|
14
|
-
return
|
|
15
|
+
function Qt() {
|
|
16
|
+
for (var e, t, r = 0, n = "", o = arguments.length; r < o; r++) (e = arguments[r]) && (t = Zt(e)) && (n && (n += " "), n += t);
|
|
17
|
+
return n;
|
|
15
18
|
}
|
|
16
|
-
var
|
|
17
|
-
const
|
|
18
|
-
var
|
|
19
|
-
if (t?.variants == null) return
|
|
20
|
-
const { variants:
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
23
|
-
const
|
|
24
|
-
return
|
|
25
|
-
}),
|
|
26
|
-
let [
|
|
27
|
-
return
|
|
19
|
+
var kt = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e;
|
|
20
|
+
const Et = Qt, Jt = (e, t) => (r) => {
|
|
21
|
+
var n;
|
|
22
|
+
if (t?.variants == null) return Et(e, r?.class, r?.className);
|
|
23
|
+
const { variants: o, defaultVariants: a } = t, l = Object.keys(o).map((d) => {
|
|
24
|
+
const u = r?.[d], f = a?.[d];
|
|
25
|
+
if (u === null) return null;
|
|
26
|
+
const m = kt(u) || kt(f);
|
|
27
|
+
return o[d][m];
|
|
28
|
+
}), i = r && Object.entries(r).reduce((d, u) => {
|
|
29
|
+
let [f, m] = u;
|
|
30
|
+
return m === void 0 || (d[f] = m), d;
|
|
28
31
|
}, {});
|
|
29
|
-
return
|
|
30
|
-
let { class:
|
|
31
|
-
return Object.entries(
|
|
32
|
-
let [
|
|
33
|
-
return Array.isArray(
|
|
34
|
-
...
|
|
35
|
-
...
|
|
36
|
-
}[
|
|
37
|
-
...
|
|
38
|
-
...
|
|
39
|
-
}[
|
|
32
|
+
return Et(e, l, t == null || (n = t.compoundVariants) === null || n === void 0 ? void 0 : n.reduce((d, u) => {
|
|
33
|
+
let { class: f, className: m, ...p } = u;
|
|
34
|
+
return Object.entries(p).every((g) => {
|
|
35
|
+
let [C, h] = g;
|
|
36
|
+
return Array.isArray(h) ? h.includes({
|
|
37
|
+
...a,
|
|
38
|
+
...i
|
|
39
|
+
}[C]) : {
|
|
40
|
+
...a,
|
|
41
|
+
...i
|
|
42
|
+
}[C] === h;
|
|
40
43
|
}) ? [
|
|
41
|
-
...
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
] :
|
|
44
|
+
...d,
|
|
45
|
+
f,
|
|
46
|
+
m
|
|
47
|
+
] : d;
|
|
45
48
|
}, []), r?.class, r?.className);
|
|
46
49
|
};
|
|
47
|
-
function
|
|
50
|
+
function Nt(e, t) {
|
|
48
51
|
if (typeof e == "function") return e(t);
|
|
49
52
|
e != null && (e.current = t);
|
|
50
53
|
}
|
|
51
|
-
function
|
|
54
|
+
function er(...e) {
|
|
52
55
|
return (t) => {
|
|
53
56
|
let r = !1;
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
return !r && typeof
|
|
57
|
+
const n = e.map((o) => {
|
|
58
|
+
const a = Nt(o, t);
|
|
59
|
+
return !r && typeof a == "function" && (r = !0), a;
|
|
57
60
|
});
|
|
58
61
|
if (r) return () => {
|
|
59
|
-
for (let
|
|
60
|
-
const
|
|
61
|
-
typeof
|
|
62
|
+
for (let o = 0; o < n.length; o++) {
|
|
63
|
+
const a = n[o];
|
|
64
|
+
typeof a == "function" ? a() : Nt(e[o], null);
|
|
62
65
|
}
|
|
63
66
|
};
|
|
64
67
|
};
|
|
65
68
|
}
|
|
69
|
+
function B(...e) {
|
|
70
|
+
return s.useCallback(er(...e), e);
|
|
71
|
+
}
|
|
66
72
|
// @__NO_SIDE_EFFECTS__
|
|
67
|
-
function
|
|
68
|
-
const t = /* @__PURE__ */
|
|
69
|
-
const { children:
|
|
70
|
-
if (
|
|
71
|
-
const
|
|
72
|
-
return /* @__PURE__ */
|
|
73
|
-
...
|
|
74
|
-
ref:
|
|
75
|
-
children:
|
|
73
|
+
function it(e) {
|
|
74
|
+
const t = /* @__PURE__ */ _n(e), r = s.forwardRef((n, o) => {
|
|
75
|
+
const { children: a, ...l } = n, i = s.Children.toArray(a), d = i.find(In);
|
|
76
|
+
if (d) {
|
|
77
|
+
const u = d.props.children, f = i.map((m) => m === d ? s.Children.count(u) > 1 ? s.Children.only(null) : s.isValidElement(u) ? u.props.children : null : m);
|
|
78
|
+
return /* @__PURE__ */ c(t, {
|
|
79
|
+
...l,
|
|
80
|
+
ref: o,
|
|
81
|
+
children: s.isValidElement(u) ? s.cloneElement(u, void 0, f) : null
|
|
76
82
|
});
|
|
77
83
|
}
|
|
78
|
-
return /* @__PURE__ */
|
|
79
|
-
...
|
|
80
|
-
ref:
|
|
81
|
-
children:
|
|
84
|
+
return /* @__PURE__ */ c(t, {
|
|
85
|
+
...l,
|
|
86
|
+
ref: o,
|
|
87
|
+
children: a
|
|
82
88
|
});
|
|
83
89
|
});
|
|
84
90
|
return r.displayName = `${e}.Slot`, r;
|
|
85
91
|
}
|
|
86
|
-
var
|
|
92
|
+
var tr = /* @__PURE__ */ it("Slot");
|
|
87
93
|
// @__NO_SIDE_EFFECTS__
|
|
88
|
-
function
|
|
89
|
-
const t =
|
|
90
|
-
const { children:
|
|
91
|
-
if (
|
|
92
|
-
const
|
|
93
|
-
return
|
|
94
|
+
function _n(e) {
|
|
95
|
+
const t = s.forwardRef((r, n) => {
|
|
96
|
+
const { children: o, ...a } = r;
|
|
97
|
+
if (s.isValidElement(o)) {
|
|
98
|
+
const l = Ln(o), i = zn(a, o.props);
|
|
99
|
+
return o.type !== s.Fragment && (i.ref = n ? er(n, l) : l), s.cloneElement(o, i);
|
|
94
100
|
}
|
|
95
|
-
return
|
|
101
|
+
return s.Children.count(o) > 1 ? s.Children.only(null) : null;
|
|
96
102
|
});
|
|
97
103
|
return t.displayName = `${e}.SlotClone`, t;
|
|
98
104
|
}
|
|
99
|
-
var
|
|
100
|
-
function
|
|
101
|
-
return
|
|
105
|
+
var Mn = /* @__PURE__ */ Symbol("radix.slottable");
|
|
106
|
+
function In(e) {
|
|
107
|
+
return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Mn;
|
|
102
108
|
}
|
|
103
|
-
function
|
|
109
|
+
function zn(e, t) {
|
|
104
110
|
const r = { ...t };
|
|
105
|
-
for (const
|
|
106
|
-
const
|
|
107
|
-
/^on[A-Z]/.test(
|
|
108
|
-
const
|
|
109
|
-
return
|
|
110
|
-
} :
|
|
111
|
-
...
|
|
112
|
-
...
|
|
113
|
-
} :
|
|
111
|
+
for (const n in t) {
|
|
112
|
+
const o = e[n], a = t[n];
|
|
113
|
+
/^on[A-Z]/.test(n) ? o && a ? r[n] = (...l) => {
|
|
114
|
+
const i = a(...l);
|
|
115
|
+
return o(...l), i;
|
|
116
|
+
} : o && (r[n] = o) : n === "style" ? r[n] = {
|
|
117
|
+
...o,
|
|
118
|
+
...a
|
|
119
|
+
} : n === "className" && (r[n] = [o, a].filter(Boolean).join(" "));
|
|
114
120
|
}
|
|
115
121
|
return {
|
|
116
122
|
...e,
|
|
117
123
|
...r
|
|
118
124
|
};
|
|
119
125
|
}
|
|
120
|
-
function
|
|
126
|
+
function Ln(e) {
|
|
127
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning;
|
|
128
|
+
return r ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
129
|
+
}
|
|
130
|
+
var I = [
|
|
131
|
+
"a",
|
|
132
|
+
"button",
|
|
133
|
+
"div",
|
|
134
|
+
"form",
|
|
135
|
+
"h2",
|
|
136
|
+
"h3",
|
|
137
|
+
"img",
|
|
138
|
+
"input",
|
|
139
|
+
"label",
|
|
140
|
+
"li",
|
|
141
|
+
"nav",
|
|
142
|
+
"ol",
|
|
143
|
+
"p",
|
|
144
|
+
"select",
|
|
145
|
+
"span",
|
|
146
|
+
"svg",
|
|
147
|
+
"ul"
|
|
148
|
+
].reduce((e, t) => {
|
|
149
|
+
const r = /* @__PURE__ */ it(`Primitive.${t}`), n = s.forwardRef((o, a) => {
|
|
150
|
+
const { asChild: l, ...i } = o, d = l ? r : t;
|
|
151
|
+
return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ c(d, {
|
|
152
|
+
...i,
|
|
153
|
+
ref: a
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
return n.displayName = `Primitive.${t}`, {
|
|
157
|
+
...e,
|
|
158
|
+
[t]: n
|
|
159
|
+
};
|
|
160
|
+
}, {});
|
|
161
|
+
function Fn(e, t) {
|
|
162
|
+
e && On.flushSync(() => e.dispatchEvent(t));
|
|
163
|
+
}
|
|
164
|
+
function Wn(e, t) {
|
|
165
|
+
const r = s.createContext(t), n = (a) => {
|
|
166
|
+
const { children: l, ...i } = a, d = s.useMemo(() => i, Object.values(i));
|
|
167
|
+
return /* @__PURE__ */ c(r.Provider, {
|
|
168
|
+
value: d,
|
|
169
|
+
children: l
|
|
170
|
+
});
|
|
171
|
+
};
|
|
172
|
+
n.displayName = e + "Provider";
|
|
173
|
+
function o(a) {
|
|
174
|
+
const l = s.useContext(r);
|
|
175
|
+
if (l) return l;
|
|
176
|
+
if (t !== void 0) return t;
|
|
177
|
+
throw new Error(`\`${a}\` must be used within \`${e}\``);
|
|
178
|
+
}
|
|
179
|
+
return [n, o];
|
|
180
|
+
}
|
|
181
|
+
function st(e, t = []) {
|
|
182
|
+
let r = [];
|
|
183
|
+
function n(a, l) {
|
|
184
|
+
const i = s.createContext(l), d = r.length;
|
|
185
|
+
r = [...r, l];
|
|
186
|
+
const u = (m) => {
|
|
187
|
+
const { scope: p, children: g, ...C } = m, h = p?.[e]?.[d] || i, v = s.useMemo(() => C, Object.values(C));
|
|
188
|
+
return /* @__PURE__ */ c(h.Provider, {
|
|
189
|
+
value: v,
|
|
190
|
+
children: g
|
|
191
|
+
});
|
|
192
|
+
};
|
|
193
|
+
u.displayName = a + "Provider";
|
|
194
|
+
function f(m, p) {
|
|
195
|
+
const g = p?.[e]?.[d] || i, C = s.useContext(g);
|
|
196
|
+
if (C) return C;
|
|
197
|
+
if (l !== void 0) return l;
|
|
198
|
+
throw new Error(`\`${m}\` must be used within \`${a}\``);
|
|
199
|
+
}
|
|
200
|
+
return [u, f];
|
|
201
|
+
}
|
|
202
|
+
const o = () => {
|
|
203
|
+
const a = r.map((l) => s.createContext(l));
|
|
204
|
+
return function(i) {
|
|
205
|
+
const d = i?.[e] || a;
|
|
206
|
+
return s.useMemo(() => ({ [`__scope${e}`]: {
|
|
207
|
+
...i,
|
|
208
|
+
[e]: d
|
|
209
|
+
} }), [i, d]);
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
return o.scopeName = e, [n, Bn(o, ...t)];
|
|
213
|
+
}
|
|
214
|
+
function Bn(...e) {
|
|
215
|
+
const t = e[0];
|
|
216
|
+
if (e.length === 1) return t;
|
|
217
|
+
const r = () => {
|
|
218
|
+
const n = e.map((o) => ({
|
|
219
|
+
useScope: o(),
|
|
220
|
+
scopeName: o.scopeName
|
|
221
|
+
}));
|
|
222
|
+
return function(a) {
|
|
223
|
+
const l = n.reduce((i, { useScope: d, scopeName: u }) => {
|
|
224
|
+
const f = d(a)[`__scope${u}`];
|
|
225
|
+
return {
|
|
226
|
+
...i,
|
|
227
|
+
...f
|
|
228
|
+
};
|
|
229
|
+
}, {});
|
|
230
|
+
return s.useMemo(() => ({ [`__scope${t.scopeName}`]: l }), [l]);
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
return r.scopeName = t.scopeName, r;
|
|
234
|
+
}
|
|
235
|
+
var vs = !!(typeof window < "u" && window.document && window.document.createElement);
|
|
236
|
+
function F(e, t, { checkForDefaultPrevented: r = !0 } = {}) {
|
|
237
|
+
return function(o) {
|
|
238
|
+
if (e?.(o), r === !1 || !o.defaultPrevented) return t?.(o);
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
var ie = globalThis?.document ? s.useLayoutEffect : () => {
|
|
242
|
+
}, $n = s[" useInsertionEffect ".trim().toString()] || ie;
|
|
243
|
+
function rr({ prop: e, defaultProp: t, onChange: r = () => {
|
|
244
|
+
}, caller: n }) {
|
|
245
|
+
const [o, a, l] = jn({
|
|
246
|
+
defaultProp: t,
|
|
247
|
+
onChange: r
|
|
248
|
+
}), i = e !== void 0, d = i ? e : o;
|
|
249
|
+
{
|
|
250
|
+
const u = s.useRef(e !== void 0);
|
|
251
|
+
s.useEffect(() => {
|
|
252
|
+
const f = u.current;
|
|
253
|
+
f !== i && console.warn(`${n} is changing from ${f ? "controlled" : "uncontrolled"} to ${i ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`), u.current = i;
|
|
254
|
+
}, [i, n]);
|
|
255
|
+
}
|
|
256
|
+
return [d, s.useCallback((u) => {
|
|
257
|
+
if (i) {
|
|
258
|
+
const f = Un(u) ? u(e) : u;
|
|
259
|
+
f !== e && l.current?.(f);
|
|
260
|
+
} else a(u);
|
|
261
|
+
}, [
|
|
262
|
+
i,
|
|
263
|
+
e,
|
|
264
|
+
a,
|
|
265
|
+
l
|
|
266
|
+
])];
|
|
267
|
+
}
|
|
268
|
+
function jn({ defaultProp: e, onChange: t }) {
|
|
269
|
+
const [r, n] = s.useState(e), o = s.useRef(r), a = s.useRef(t);
|
|
270
|
+
return $n(() => {
|
|
271
|
+
a.current = t;
|
|
272
|
+
}, [t]), s.useEffect(() => {
|
|
273
|
+
o.current !== r && (a.current?.(r), o.current = r);
|
|
274
|
+
}, [r, o]), [
|
|
275
|
+
r,
|
|
276
|
+
n,
|
|
277
|
+
a
|
|
278
|
+
];
|
|
279
|
+
}
|
|
280
|
+
function Un(e) {
|
|
281
|
+
return typeof e == "function";
|
|
282
|
+
}
|
|
283
|
+
function Vn(e, t) {
|
|
284
|
+
return s.useReducer((r, n) => t[r][n] ?? r, e);
|
|
285
|
+
}
|
|
286
|
+
var Q = (e) => {
|
|
287
|
+
const { present: t, children: r } = e, n = Hn(t), o = typeof r == "function" ? r({ present: n.isPresent }) : s.Children.only(r), a = B(n.ref, Gn(o));
|
|
288
|
+
return typeof r == "function" || n.isPresent ? s.cloneElement(o, { ref: a }) : null;
|
|
289
|
+
};
|
|
290
|
+
Q.displayName = "Presence";
|
|
291
|
+
function Hn(e) {
|
|
292
|
+
const [t, r] = s.useState(), n = s.useRef(null), o = s.useRef(e), a = s.useRef("none"), [l, i] = Vn(e ? "mounted" : "unmounted", {
|
|
293
|
+
mounted: {
|
|
294
|
+
UNMOUNT: "unmounted",
|
|
295
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
296
|
+
},
|
|
297
|
+
unmountSuspended: {
|
|
298
|
+
MOUNT: "mounted",
|
|
299
|
+
ANIMATION_END: "unmounted"
|
|
300
|
+
},
|
|
301
|
+
unmounted: { MOUNT: "mounted" }
|
|
302
|
+
});
|
|
303
|
+
return s.useEffect(() => {
|
|
304
|
+
const d = Ce(n.current);
|
|
305
|
+
a.current = l === "mounted" ? d : "none";
|
|
306
|
+
}, [l]), ie(() => {
|
|
307
|
+
const d = n.current, u = o.current;
|
|
308
|
+
if (u !== e) {
|
|
309
|
+
const f = a.current, m = Ce(d);
|
|
310
|
+
e ? i("MOUNT") : m === "none" || d?.display === "none" ? i("UNMOUNT") : i(u && f !== m ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
|
|
311
|
+
}
|
|
312
|
+
}, [e, i]), ie(() => {
|
|
313
|
+
if (t) {
|
|
314
|
+
let d;
|
|
315
|
+
const u = t.ownerDocument.defaultView ?? window, f = (p) => {
|
|
316
|
+
const g = Ce(n.current).includes(CSS.escape(p.animationName));
|
|
317
|
+
if (p.target === t && g && (i("ANIMATION_END"), !o.current)) {
|
|
318
|
+
const C = t.style.animationFillMode;
|
|
319
|
+
t.style.animationFillMode = "forwards", d = u.setTimeout(() => {
|
|
320
|
+
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = C);
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
}, m = (p) => {
|
|
324
|
+
p.target === t && (a.current = Ce(n.current));
|
|
325
|
+
};
|
|
326
|
+
return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
|
|
327
|
+
u.clearTimeout(d), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
|
|
328
|
+
};
|
|
329
|
+
} else i("ANIMATION_END");
|
|
330
|
+
}, [t, i]), {
|
|
331
|
+
isPresent: ["mounted", "unmountSuspended"].includes(l),
|
|
332
|
+
ref: s.useCallback((d) => {
|
|
333
|
+
n.current = d ? getComputedStyle(d) : null, r(d);
|
|
334
|
+
}, [])
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
function Ce(e) {
|
|
338
|
+
return e?.animationName || "none";
|
|
339
|
+
}
|
|
340
|
+
function Gn(e) {
|
|
121
341
|
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning;
|
|
122
342
|
return r ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
123
343
|
}
|
|
124
|
-
var
|
|
344
|
+
var Xn = s[" useId ".trim().toString()] || (() => {
|
|
345
|
+
}), Yn = 0;
|
|
346
|
+
function Ge(e) {
|
|
347
|
+
const [t, r] = s.useState(Xn());
|
|
348
|
+
return ie(() => {
|
|
349
|
+
e || r((n) => n ?? String(Yn++));
|
|
350
|
+
}, [e]), e || (t ? `radix-${t}` : "");
|
|
351
|
+
}
|
|
352
|
+
var qn = s.createContext(void 0);
|
|
353
|
+
function Kn(e) {
|
|
354
|
+
const t = s.useContext(qn);
|
|
355
|
+
return e || t || "ltr";
|
|
356
|
+
}
|
|
357
|
+
function U(e) {
|
|
358
|
+
const t = s.useRef(e);
|
|
359
|
+
return s.useEffect(() => {
|
|
360
|
+
t.current = e;
|
|
361
|
+
}), s.useMemo(() => (...r) => t.current?.(...r), []);
|
|
362
|
+
}
|
|
363
|
+
function Zn(e, t = globalThis?.document) {
|
|
364
|
+
const r = U(e);
|
|
365
|
+
s.useEffect(() => {
|
|
366
|
+
const n = (o) => {
|
|
367
|
+
o.key === "Escape" && r(o);
|
|
368
|
+
};
|
|
369
|
+
return t.addEventListener("keydown", n, { capture: !0 }), () => t.removeEventListener("keydown", n, { capture: !0 });
|
|
370
|
+
}, [r, t]);
|
|
371
|
+
}
|
|
372
|
+
var Qn = "DismissableLayer", nt = "dismissableLayer.update", Jn = "dismissableLayer.pointerDownOutside", eo = "dismissableLayer.focusOutside", Rt, nr = s.createContext({
|
|
373
|
+
layers: /* @__PURE__ */ new Set(),
|
|
374
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
375
|
+
branches: /* @__PURE__ */ new Set()
|
|
376
|
+
}), or = s.forwardRef((e, t) => {
|
|
377
|
+
const { disableOutsidePointerEvents: r = !1, onEscapeKeyDown: n, onPointerDownOutside: o, onFocusOutside: a, onInteractOutside: l, onDismiss: i, ...d } = e, u = s.useContext(nr), [f, m] = s.useState(null), p = f?.ownerDocument ?? globalThis?.document, [, g] = s.useState({}), C = B(t, (T) => m(T)), h = Array.from(u.layers), [v] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), E = h.indexOf(v), R = f ? h.indexOf(f) : -1, w = u.layersWithOutsidePointerEventsDisabled.size > 0, S = R >= E, D = no((T) => {
|
|
378
|
+
const k = T.target, O = [...u.branches].some((z) => z.contains(k));
|
|
379
|
+
!S || O || (o?.(T), l?.(T), T.defaultPrevented || i?.());
|
|
380
|
+
}, p), _ = oo((T) => {
|
|
381
|
+
const k = T.target;
|
|
382
|
+
[...u.branches].some((O) => O.contains(k)) || (a?.(T), l?.(T), T.defaultPrevented || i?.());
|
|
383
|
+
}, p);
|
|
384
|
+
return Zn((T) => {
|
|
385
|
+
R === u.layers.size - 1 && (n?.(T), !T.defaultPrevented && i && (T.preventDefault(), i()));
|
|
386
|
+
}, p), s.useEffect(() => {
|
|
387
|
+
if (f)
|
|
388
|
+
return r && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (Rt = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(f)), u.layers.add(f), Pt(), () => {
|
|
389
|
+
r && u.layersWithOutsidePointerEventsDisabled.size === 1 && (p.body.style.pointerEvents = Rt);
|
|
390
|
+
};
|
|
391
|
+
}, [
|
|
392
|
+
f,
|
|
393
|
+
p,
|
|
394
|
+
r,
|
|
395
|
+
u
|
|
396
|
+
]), s.useEffect(() => () => {
|
|
397
|
+
f && (u.layers.delete(f), u.layersWithOutsidePointerEventsDisabled.delete(f), Pt());
|
|
398
|
+
}, [f, u]), s.useEffect(() => {
|
|
399
|
+
const T = () => g({});
|
|
400
|
+
return document.addEventListener(nt, T), () => document.removeEventListener(nt, T);
|
|
401
|
+
}, []), /* @__PURE__ */ c(I.div, {
|
|
402
|
+
...d,
|
|
403
|
+
ref: C,
|
|
404
|
+
style: {
|
|
405
|
+
pointerEvents: w ? S ? "auto" : "none" : void 0,
|
|
406
|
+
...e.style
|
|
407
|
+
},
|
|
408
|
+
onFocusCapture: F(e.onFocusCapture, _.onFocusCapture),
|
|
409
|
+
onBlurCapture: F(e.onBlurCapture, _.onBlurCapture),
|
|
410
|
+
onPointerDownCapture: F(e.onPointerDownCapture, D.onPointerDownCapture)
|
|
411
|
+
});
|
|
412
|
+
});
|
|
413
|
+
or.displayName = Qn;
|
|
414
|
+
var to = "DismissableLayerBranch", ro = s.forwardRef((e, t) => {
|
|
415
|
+
const r = s.useContext(nr), n = s.useRef(null), o = B(t, n);
|
|
416
|
+
return s.useEffect(() => {
|
|
417
|
+
const a = n.current;
|
|
418
|
+
if (a)
|
|
419
|
+
return r.branches.add(a), () => {
|
|
420
|
+
r.branches.delete(a);
|
|
421
|
+
};
|
|
422
|
+
}, [r.branches]), /* @__PURE__ */ c(I.div, {
|
|
423
|
+
...e,
|
|
424
|
+
ref: o
|
|
425
|
+
});
|
|
426
|
+
});
|
|
427
|
+
ro.displayName = to;
|
|
428
|
+
function no(e, t = globalThis?.document) {
|
|
429
|
+
const r = U(e), n = s.useRef(!1), o = s.useRef(() => {
|
|
430
|
+
});
|
|
431
|
+
return s.useEffect(() => {
|
|
432
|
+
const a = (i) => {
|
|
433
|
+
if (i.target && !n.current) {
|
|
434
|
+
let d = function() {
|
|
435
|
+
ar(Jn, r, u, { discrete: !0 });
|
|
436
|
+
};
|
|
437
|
+
const u = { originalEvent: i };
|
|
438
|
+
i.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = d, t.addEventListener("click", o.current, { once: !0 })) : d();
|
|
439
|
+
} else t.removeEventListener("click", o.current);
|
|
440
|
+
n.current = !1;
|
|
441
|
+
}, l = window.setTimeout(() => {
|
|
442
|
+
t.addEventListener("pointerdown", a);
|
|
443
|
+
}, 0);
|
|
444
|
+
return () => {
|
|
445
|
+
window.clearTimeout(l), t.removeEventListener("pointerdown", a), t.removeEventListener("click", o.current);
|
|
446
|
+
};
|
|
447
|
+
}, [t, r]), { onPointerDownCapture: () => n.current = !0 };
|
|
448
|
+
}
|
|
449
|
+
function oo(e, t = globalThis?.document) {
|
|
450
|
+
const r = U(e), n = s.useRef(!1);
|
|
451
|
+
return s.useEffect(() => {
|
|
452
|
+
const o = (a) => {
|
|
453
|
+
a.target && !n.current && ar(eo, r, { originalEvent: a }, { discrete: !1 });
|
|
454
|
+
};
|
|
455
|
+
return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
|
|
456
|
+
}, [t, r]), {
|
|
457
|
+
onFocusCapture: () => n.current = !0,
|
|
458
|
+
onBlurCapture: () => n.current = !1
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
function Pt() {
|
|
462
|
+
const e = new CustomEvent(nt);
|
|
463
|
+
document.dispatchEvent(e);
|
|
464
|
+
}
|
|
465
|
+
function ar(e, t, r, { discrete: n }) {
|
|
466
|
+
const o = r.originalEvent.target, a = new CustomEvent(e, {
|
|
467
|
+
bubbles: !1,
|
|
468
|
+
cancelable: !0,
|
|
469
|
+
detail: r
|
|
470
|
+
});
|
|
471
|
+
t && o.addEventListener(e, t, { once: !0 }), n ? Fn(o, a) : o.dispatchEvent(a);
|
|
472
|
+
}
|
|
473
|
+
var Xe = "focusScope.autoFocusOnMount", Ye = "focusScope.autoFocusOnUnmount", At = {
|
|
474
|
+
bubbles: !1,
|
|
475
|
+
cancelable: !0
|
|
476
|
+
}, ao = "FocusScope", ir = s.forwardRef((e, t) => {
|
|
477
|
+
const { loop: r = !1, trapped: n = !1, onMountAutoFocus: o, onUnmountAutoFocus: a, ...l } = e, [i, d] = s.useState(null), u = U(o), f = U(a), m = s.useRef(null), p = B(t, (h) => d(h)), g = s.useRef({
|
|
478
|
+
paused: !1,
|
|
479
|
+
pause() {
|
|
480
|
+
this.paused = !0;
|
|
481
|
+
},
|
|
482
|
+
resume() {
|
|
483
|
+
this.paused = !1;
|
|
484
|
+
}
|
|
485
|
+
}).current;
|
|
486
|
+
s.useEffect(() => {
|
|
487
|
+
if (n) {
|
|
488
|
+
let h = function(w) {
|
|
489
|
+
if (g.paused || !i) return;
|
|
490
|
+
const S = w.target;
|
|
491
|
+
i.contains(S) ? m.current = S : te(m.current, { select: !0 });
|
|
492
|
+
}, v = function(w) {
|
|
493
|
+
if (g.paused || !i) return;
|
|
494
|
+
const S = w.relatedTarget;
|
|
495
|
+
S !== null && (i.contains(S) || te(m.current, { select: !0 }));
|
|
496
|
+
}, E = function(w) {
|
|
497
|
+
if (document.activeElement === document.body)
|
|
498
|
+
for (const S of w) S.removedNodes.length > 0 && te(i);
|
|
499
|
+
};
|
|
500
|
+
document.addEventListener("focusin", h), document.addEventListener("focusout", v);
|
|
501
|
+
const R = new MutationObserver(E);
|
|
502
|
+
return i && R.observe(i, {
|
|
503
|
+
childList: !0,
|
|
504
|
+
subtree: !0
|
|
505
|
+
}), () => {
|
|
506
|
+
document.removeEventListener("focusin", h), document.removeEventListener("focusout", v), R.disconnect();
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
}, [
|
|
510
|
+
n,
|
|
511
|
+
i,
|
|
512
|
+
g.paused
|
|
513
|
+
]), s.useEffect(() => {
|
|
514
|
+
if (i) {
|
|
515
|
+
Ot.add(g);
|
|
516
|
+
const h = document.activeElement;
|
|
517
|
+
if (!i.contains(h)) {
|
|
518
|
+
const v = new CustomEvent(Xe, At);
|
|
519
|
+
i.addEventListener(Xe, u), i.dispatchEvent(v), v.defaultPrevented || (io(fo(sr(i)), { select: !0 }), document.activeElement === h && te(i));
|
|
520
|
+
}
|
|
521
|
+
return () => {
|
|
522
|
+
i.removeEventListener(Xe, u), setTimeout(() => {
|
|
523
|
+
const v = new CustomEvent(Ye, At);
|
|
524
|
+
i.addEventListener(Ye, f), i.dispatchEvent(v), v.defaultPrevented || te(h ?? document.body, { select: !0 }), i.removeEventListener(Ye, f), Ot.remove(g);
|
|
525
|
+
}, 0);
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
}, [
|
|
529
|
+
i,
|
|
530
|
+
u,
|
|
531
|
+
f,
|
|
532
|
+
g
|
|
533
|
+
]);
|
|
534
|
+
const C = s.useCallback((h) => {
|
|
535
|
+
if (!r && !n || g.paused) return;
|
|
536
|
+
const v = h.key === "Tab" && !h.altKey && !h.ctrlKey && !h.metaKey, E = document.activeElement;
|
|
537
|
+
if (v && E) {
|
|
538
|
+
const R = h.currentTarget, [w, S] = so(R);
|
|
539
|
+
w && S ? !h.shiftKey && E === S ? (h.preventDefault(), r && te(w, { select: !0 })) : h.shiftKey && E === w && (h.preventDefault(), r && te(S, { select: !0 })) : E === R && h.preventDefault();
|
|
540
|
+
}
|
|
541
|
+
}, [
|
|
542
|
+
r,
|
|
543
|
+
n,
|
|
544
|
+
g.paused
|
|
545
|
+
]);
|
|
546
|
+
return /* @__PURE__ */ c(I.div, {
|
|
547
|
+
tabIndex: -1,
|
|
548
|
+
...l,
|
|
549
|
+
ref: p,
|
|
550
|
+
onKeyDown: C
|
|
551
|
+
});
|
|
552
|
+
});
|
|
553
|
+
ir.displayName = ao;
|
|
554
|
+
function io(e, { select: t = !1 } = {}) {
|
|
555
|
+
const r = document.activeElement;
|
|
556
|
+
for (const n of e)
|
|
557
|
+
if (te(n, { select: t }), document.activeElement !== r) return;
|
|
558
|
+
}
|
|
559
|
+
function so(e) {
|
|
560
|
+
const t = sr(e);
|
|
561
|
+
return [Tt(t, e), Tt(t.reverse(), e)];
|
|
562
|
+
}
|
|
563
|
+
function sr(e) {
|
|
564
|
+
const t = [], r = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (n) => {
|
|
565
|
+
const o = n.tagName === "INPUT" && n.type === "hidden";
|
|
566
|
+
return n.disabled || n.hidden || o ? NodeFilter.FILTER_SKIP : n.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
567
|
+
} });
|
|
568
|
+
for (; r.nextNode(); ) t.push(r.currentNode);
|
|
569
|
+
return t;
|
|
570
|
+
}
|
|
571
|
+
function Tt(e, t) {
|
|
572
|
+
for (const r of e) if (!lo(r, { upTo: t })) return r;
|
|
573
|
+
}
|
|
574
|
+
function lo(e, { upTo: t }) {
|
|
575
|
+
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
576
|
+
for (; e; ) {
|
|
577
|
+
if (t !== void 0 && e === t) return !1;
|
|
578
|
+
if (getComputedStyle(e).display === "none") return !0;
|
|
579
|
+
e = e.parentElement;
|
|
580
|
+
}
|
|
581
|
+
return !1;
|
|
582
|
+
}
|
|
583
|
+
function co(e) {
|
|
584
|
+
return e instanceof HTMLInputElement && "select" in e;
|
|
585
|
+
}
|
|
586
|
+
function te(e, { select: t = !1 } = {}) {
|
|
587
|
+
if (e && e.focus) {
|
|
588
|
+
const r = document.activeElement;
|
|
589
|
+
e.focus({ preventScroll: !0 }), e !== r && co(e) && t && e.select();
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
var Ot = uo();
|
|
593
|
+
function uo() {
|
|
594
|
+
let e = [];
|
|
595
|
+
return {
|
|
596
|
+
add(t) {
|
|
597
|
+
const r = e[0];
|
|
598
|
+
t !== r && r?.pause(), e = Dt(e, t), e.unshift(t);
|
|
599
|
+
},
|
|
600
|
+
remove(t) {
|
|
601
|
+
e = Dt(e, t), e[0]?.resume();
|
|
602
|
+
}
|
|
603
|
+
};
|
|
604
|
+
}
|
|
605
|
+
function Dt(e, t) {
|
|
606
|
+
const r = [...e], n = r.indexOf(t);
|
|
607
|
+
return n !== -1 && r.splice(n, 1), r;
|
|
608
|
+
}
|
|
609
|
+
function fo(e) {
|
|
610
|
+
return e.filter((t) => t.tagName !== "A");
|
|
611
|
+
}
|
|
612
|
+
var mo = "Portal", lr = s.forwardRef((e, t) => {
|
|
613
|
+
const { container: r, ...n } = e, [o, a] = s.useState(!1);
|
|
614
|
+
ie(() => a(!0), []);
|
|
615
|
+
const l = r || o && globalThis?.document?.body;
|
|
616
|
+
return l ? Dn.createPortal(/* @__PURE__ */ c(I.div, {
|
|
617
|
+
...n,
|
|
618
|
+
ref: t
|
|
619
|
+
}), l) : null;
|
|
620
|
+
});
|
|
621
|
+
lr.displayName = mo;
|
|
622
|
+
var qe = 0;
|
|
623
|
+
function po() {
|
|
624
|
+
s.useEffect(() => {
|
|
625
|
+
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
626
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? _t()), document.body.insertAdjacentElement("beforeend", e[1] ?? _t()), qe++, () => {
|
|
627
|
+
qe === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), qe--;
|
|
628
|
+
};
|
|
629
|
+
}, []);
|
|
630
|
+
}
|
|
631
|
+
function _t() {
|
|
632
|
+
const e = document.createElement("span");
|
|
633
|
+
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
634
|
+
}
|
|
635
|
+
var G = function() {
|
|
636
|
+
return G = Object.assign || function(t) {
|
|
637
|
+
for (var r, n = 1, o = arguments.length; n < o; n++) {
|
|
638
|
+
r = arguments[n];
|
|
639
|
+
for (var a in r) Object.prototype.hasOwnProperty.call(r, a) && (t[a] = r[a]);
|
|
640
|
+
}
|
|
641
|
+
return t;
|
|
642
|
+
}, G.apply(this, arguments);
|
|
643
|
+
};
|
|
644
|
+
function cr(e, t) {
|
|
645
|
+
var r = {};
|
|
646
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
647
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
648
|
+
for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++) t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
|
|
649
|
+
return r;
|
|
650
|
+
}
|
|
651
|
+
function ho(e, t, r) {
|
|
652
|
+
if (r || arguments.length === 2)
|
|
653
|
+
for (var n = 0, o = t.length, a; n < o; n++) (a || !(n in t)) && (a || (a = Array.prototype.slice.call(t, 0, n)), a[n] = t[n]);
|
|
654
|
+
return e.concat(a || Array.prototype.slice.call(t));
|
|
655
|
+
}
|
|
656
|
+
var Te = "right-scroll-bar-position", Oe = "width-before-scroll-bar", vo = "with-scroll-bars-hidden", go = "--removed-body-scroll-bar-size";
|
|
657
|
+
function Ke(e, t) {
|
|
658
|
+
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
659
|
+
}
|
|
660
|
+
function bo(e, t) {
|
|
661
|
+
var r = Tn(function() {
|
|
662
|
+
return {
|
|
663
|
+
value: e,
|
|
664
|
+
callback: t,
|
|
665
|
+
facade: {
|
|
666
|
+
get current() {
|
|
667
|
+
return r.value;
|
|
668
|
+
},
|
|
669
|
+
set current(n) {
|
|
670
|
+
var o = r.value;
|
|
671
|
+
o !== n && (r.value = n, r.callback(n, o));
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
};
|
|
675
|
+
})[0];
|
|
676
|
+
return r.callback = t, r.facade;
|
|
677
|
+
}
|
|
678
|
+
var yo = typeof window < "u" ? s.useLayoutEffect : s.useEffect, Mt = /* @__PURE__ */ new WeakMap();
|
|
679
|
+
function xo(e, t) {
|
|
680
|
+
var r = bo(t || null, function(n) {
|
|
681
|
+
return e.forEach(function(o) {
|
|
682
|
+
return Ke(o, n);
|
|
683
|
+
});
|
|
684
|
+
});
|
|
685
|
+
return yo(function() {
|
|
686
|
+
var n = Mt.get(r);
|
|
687
|
+
if (n) {
|
|
688
|
+
var o = new Set(n), a = new Set(e), l = r.current;
|
|
689
|
+
o.forEach(function(i) {
|
|
690
|
+
a.has(i) || Ke(i, null);
|
|
691
|
+
}), a.forEach(function(i) {
|
|
692
|
+
o.has(i) || Ke(i, l);
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
Mt.set(r, e);
|
|
696
|
+
}, [e]), r;
|
|
697
|
+
}
|
|
698
|
+
function wo(e) {
|
|
699
|
+
return e;
|
|
700
|
+
}
|
|
701
|
+
function So(e, t) {
|
|
702
|
+
t === void 0 && (t = wo);
|
|
703
|
+
var r = [], n = !1;
|
|
704
|
+
return {
|
|
705
|
+
read: function() {
|
|
706
|
+
if (n) throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
707
|
+
return r.length ? r[r.length - 1] : e;
|
|
708
|
+
},
|
|
709
|
+
useMedium: function(o) {
|
|
710
|
+
var a = t(o, n);
|
|
711
|
+
return r.push(a), function() {
|
|
712
|
+
r = r.filter(function(l) {
|
|
713
|
+
return l !== a;
|
|
714
|
+
});
|
|
715
|
+
};
|
|
716
|
+
},
|
|
717
|
+
assignSyncMedium: function(o) {
|
|
718
|
+
for (n = !0; r.length; ) {
|
|
719
|
+
var a = r;
|
|
720
|
+
r = [], a.forEach(o);
|
|
721
|
+
}
|
|
722
|
+
r = {
|
|
723
|
+
push: function(l) {
|
|
724
|
+
return o(l);
|
|
725
|
+
},
|
|
726
|
+
filter: function() {
|
|
727
|
+
return r;
|
|
728
|
+
}
|
|
729
|
+
};
|
|
730
|
+
},
|
|
731
|
+
assignMedium: function(o) {
|
|
732
|
+
n = !0;
|
|
733
|
+
var a = [];
|
|
734
|
+
if (r.length) {
|
|
735
|
+
var l = r;
|
|
736
|
+
r = [], l.forEach(o), a = r;
|
|
737
|
+
}
|
|
738
|
+
var i = function() {
|
|
739
|
+
var u = a;
|
|
740
|
+
a = [], u.forEach(o);
|
|
741
|
+
}, d = function() {
|
|
742
|
+
return Promise.resolve().then(i);
|
|
743
|
+
};
|
|
744
|
+
d(), r = {
|
|
745
|
+
push: function(u) {
|
|
746
|
+
a.push(u), d();
|
|
747
|
+
},
|
|
748
|
+
filter: function(u) {
|
|
749
|
+
return a = a.filter(u), r;
|
|
750
|
+
}
|
|
751
|
+
};
|
|
752
|
+
}
|
|
753
|
+
};
|
|
754
|
+
}
|
|
755
|
+
function Co(e) {
|
|
756
|
+
e === void 0 && (e = {});
|
|
757
|
+
var t = So(null);
|
|
758
|
+
return t.options = G({
|
|
759
|
+
async: !0,
|
|
760
|
+
ssr: !1
|
|
761
|
+
}, e), t;
|
|
762
|
+
}
|
|
763
|
+
var dr = function(e) {
|
|
764
|
+
var t = e.sideCar, r = cr(e, ["sideCar"]);
|
|
765
|
+
if (!t) throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
766
|
+
var n = t.read();
|
|
767
|
+
if (!n) throw new Error("Sidecar medium not found");
|
|
768
|
+
return s.createElement(n, G({}, r));
|
|
769
|
+
};
|
|
770
|
+
dr.isSideCarExport = !0;
|
|
771
|
+
function ko(e, t) {
|
|
772
|
+
return e.useMedium(t), dr;
|
|
773
|
+
}
|
|
774
|
+
var ur = Co(), Ze = function() {
|
|
775
|
+
}, Fe = s.forwardRef(function(e, t) {
|
|
776
|
+
var r = s.useRef(null), n = s.useState({
|
|
777
|
+
onScrollCapture: Ze,
|
|
778
|
+
onWheelCapture: Ze,
|
|
779
|
+
onTouchMoveCapture: Ze
|
|
780
|
+
}), o = n[0], a = n[1], l = e.forwardProps, i = e.children, d = e.className, u = e.removeScrollBar, f = e.enabled, m = e.shards, p = e.sideCar, g = e.noRelative, C = e.noIsolation, h = e.inert, v = e.allowPinchZoom, E = e.as, R = E === void 0 ? "div" : E, w = e.gapMode, S = cr(e, [
|
|
781
|
+
"forwardProps",
|
|
782
|
+
"children",
|
|
783
|
+
"className",
|
|
784
|
+
"removeScrollBar",
|
|
785
|
+
"enabled",
|
|
786
|
+
"shards",
|
|
787
|
+
"sideCar",
|
|
788
|
+
"noRelative",
|
|
789
|
+
"noIsolation",
|
|
790
|
+
"inert",
|
|
791
|
+
"allowPinchZoom",
|
|
792
|
+
"as",
|
|
793
|
+
"gapMode"
|
|
794
|
+
]), D = p, _ = xo([r, t]), T = G(G({}, S), o);
|
|
795
|
+
return s.createElement(s.Fragment, null, f && s.createElement(D, {
|
|
796
|
+
sideCar: ur,
|
|
797
|
+
removeScrollBar: u,
|
|
798
|
+
shards: m,
|
|
799
|
+
noRelative: g,
|
|
800
|
+
noIsolation: C,
|
|
801
|
+
inert: h,
|
|
802
|
+
setCallbacks: a,
|
|
803
|
+
allowPinchZoom: !!v,
|
|
804
|
+
lockRef: r,
|
|
805
|
+
gapMode: w
|
|
806
|
+
}), l ? s.cloneElement(s.Children.only(i), G(G({}, T), { ref: _ })) : s.createElement(R, G({}, T, {
|
|
807
|
+
className: d,
|
|
808
|
+
ref: _
|
|
809
|
+
}), i));
|
|
810
|
+
});
|
|
811
|
+
Fe.defaultProps = {
|
|
812
|
+
enabled: !0,
|
|
813
|
+
removeScrollBar: !0,
|
|
814
|
+
inert: !1
|
|
815
|
+
};
|
|
816
|
+
Fe.classNames = {
|
|
817
|
+
fullWidth: Oe,
|
|
818
|
+
zeroRight: Te
|
|
819
|
+
};
|
|
820
|
+
var It, Eo = function() {
|
|
821
|
+
if (It) return It;
|
|
822
|
+
if (typeof __webpack_nonce__ < "u") return __webpack_nonce__;
|
|
823
|
+
};
|
|
824
|
+
function No() {
|
|
825
|
+
if (!document) return null;
|
|
826
|
+
var e = document.createElement("style");
|
|
827
|
+
e.type = "text/css";
|
|
828
|
+
var t = Eo();
|
|
829
|
+
return t && e.setAttribute("nonce", t), e;
|
|
830
|
+
}
|
|
831
|
+
function Ro(e, t) {
|
|
832
|
+
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
833
|
+
}
|
|
834
|
+
function Po(e) {
|
|
835
|
+
(document.head || document.getElementsByTagName("head")[0]).appendChild(e);
|
|
836
|
+
}
|
|
837
|
+
var Ao = function() {
|
|
838
|
+
var e = 0, t = null;
|
|
839
|
+
return {
|
|
840
|
+
add: function(r) {
|
|
841
|
+
e == 0 && (t = No()) && (Ro(t, r), Po(t)), e++;
|
|
842
|
+
},
|
|
843
|
+
remove: function() {
|
|
844
|
+
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
845
|
+
}
|
|
846
|
+
};
|
|
847
|
+
}, To = function() {
|
|
848
|
+
var e = Ao();
|
|
849
|
+
return function(t, r) {
|
|
850
|
+
s.useEffect(function() {
|
|
851
|
+
return e.add(t), function() {
|
|
852
|
+
e.remove();
|
|
853
|
+
};
|
|
854
|
+
}, [t && r]);
|
|
855
|
+
};
|
|
856
|
+
}, fr = function() {
|
|
857
|
+
var e = To(), t = function(r) {
|
|
858
|
+
var n = r.styles, o = r.dynamic;
|
|
859
|
+
return e(n, o), null;
|
|
860
|
+
};
|
|
861
|
+
return t;
|
|
862
|
+
}, Oo = {
|
|
863
|
+
left: 0,
|
|
864
|
+
top: 0,
|
|
865
|
+
right: 0,
|
|
866
|
+
gap: 0
|
|
867
|
+
}, Qe = function(e) {
|
|
868
|
+
return parseInt(e || "", 10) || 0;
|
|
869
|
+
}, Do = function(e) {
|
|
870
|
+
var t = window.getComputedStyle(document.body), r = t[e === "padding" ? "paddingLeft" : "marginLeft"], n = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
871
|
+
return [
|
|
872
|
+
Qe(r),
|
|
873
|
+
Qe(n),
|
|
874
|
+
Qe(o)
|
|
875
|
+
];
|
|
876
|
+
}, _o = function(e) {
|
|
877
|
+
if (e === void 0 && (e = "margin"), typeof window > "u") return Oo;
|
|
878
|
+
var t = Do(e), r = document.documentElement.clientWidth, n = window.innerWidth;
|
|
879
|
+
return {
|
|
880
|
+
left: t[0],
|
|
881
|
+
top: t[1],
|
|
882
|
+
right: t[2],
|
|
883
|
+
gap: Math.max(0, n - r + t[2] - t[0])
|
|
884
|
+
};
|
|
885
|
+
}, Mo = fr(), ge = "data-scroll-locked", Io = function(e, t, r, n) {
|
|
886
|
+
var o = e.left, a = e.top, l = e.right, i = e.gap;
|
|
887
|
+
return r === void 0 && (r = "margin"), `
|
|
888
|
+
.`.concat(vo, ` {
|
|
889
|
+
overflow: hidden `).concat(n, `;
|
|
890
|
+
padding-right: `).concat(i, "px ").concat(n, `;
|
|
891
|
+
}
|
|
892
|
+
body[`).concat(ge, `] {
|
|
893
|
+
overflow: hidden `).concat(n, `;
|
|
894
|
+
overscroll-behavior: contain;
|
|
895
|
+
`).concat([
|
|
896
|
+
t && "position: relative ".concat(n, ";"),
|
|
897
|
+
r === "margin" && `
|
|
898
|
+
padding-left: `.concat(o, `px;
|
|
899
|
+
padding-top: `).concat(a, `px;
|
|
900
|
+
padding-right: `).concat(l, `px;
|
|
901
|
+
margin-left:0;
|
|
902
|
+
margin-top:0;
|
|
903
|
+
margin-right: `).concat(i, "px ").concat(n, `;
|
|
904
|
+
`),
|
|
905
|
+
r === "padding" && "padding-right: ".concat(i, "px ").concat(n, ";")
|
|
906
|
+
].filter(Boolean).join(""), `
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
.`).concat(Te, ` {
|
|
910
|
+
right: `).concat(i, "px ").concat(n, `;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
.`).concat(Oe, ` {
|
|
914
|
+
margin-right: `).concat(i, "px ").concat(n, `;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
.`).concat(Te, " .").concat(Te, ` {
|
|
918
|
+
right: 0 `).concat(n, `;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
.`).concat(Oe, " .").concat(Oe, ` {
|
|
922
|
+
margin-right: 0 `).concat(n, `;
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
body[`).concat(ge, `] {
|
|
926
|
+
`).concat(go, ": ").concat(i, `px;
|
|
927
|
+
}
|
|
928
|
+
`);
|
|
929
|
+
}, zt = function() {
|
|
930
|
+
var e = parseInt(document.body.getAttribute("data-scroll-locked") || "0", 10);
|
|
931
|
+
return isFinite(e) ? e : 0;
|
|
932
|
+
}, zo = function() {
|
|
933
|
+
s.useEffect(function() {
|
|
934
|
+
return document.body.setAttribute(ge, (zt() + 1).toString()), function() {
|
|
935
|
+
var e = zt() - 1;
|
|
936
|
+
e <= 0 ? document.body.removeAttribute(ge) : document.body.setAttribute(ge, e.toString());
|
|
937
|
+
};
|
|
938
|
+
}, []);
|
|
939
|
+
}, Lo = function(e) {
|
|
940
|
+
var t = e.noRelative, r = e.noImportant, n = e.gapMode, o = n === void 0 ? "margin" : n;
|
|
941
|
+
zo();
|
|
942
|
+
var a = s.useMemo(function() {
|
|
943
|
+
return _o(o);
|
|
944
|
+
}, [o]);
|
|
945
|
+
return s.createElement(Mo, { styles: Io(a, !t, o, r ? "" : "!important") });
|
|
946
|
+
}, ot = !1;
|
|
947
|
+
if (typeof window < "u") try {
|
|
948
|
+
var ke = Object.defineProperty({}, "passive", { get: function() {
|
|
949
|
+
return ot = !0, !0;
|
|
950
|
+
} });
|
|
951
|
+
window.addEventListener("test", ke, ke), window.removeEventListener("test", ke, ke);
|
|
952
|
+
} catch {
|
|
953
|
+
ot = !1;
|
|
954
|
+
}
|
|
955
|
+
var ce = ot ? { passive: !1 } : !1, Fo = function(e) {
|
|
956
|
+
return e.tagName === "TEXTAREA";
|
|
957
|
+
}, mr = function(e, t) {
|
|
958
|
+
if (!(e instanceof Element)) return !1;
|
|
959
|
+
var r = window.getComputedStyle(e);
|
|
960
|
+
return r[t] !== "hidden" && !(r.overflowY === r.overflowX && !Fo(e) && r[t] === "visible");
|
|
961
|
+
}, Wo = function(e) {
|
|
962
|
+
return mr(e, "overflowY");
|
|
963
|
+
}, Bo = function(e) {
|
|
964
|
+
return mr(e, "overflowX");
|
|
965
|
+
}, Lt = function(e, t) {
|
|
966
|
+
var r = t.ownerDocument, n = t;
|
|
967
|
+
do {
|
|
968
|
+
if (typeof ShadowRoot < "u" && n instanceof ShadowRoot && (n = n.host), pr(e, n)) {
|
|
969
|
+
var o = hr(e, n);
|
|
970
|
+
if (o[1] > o[2]) return !0;
|
|
971
|
+
}
|
|
972
|
+
n = n.parentNode;
|
|
973
|
+
} while (n && n !== r.body);
|
|
974
|
+
return !1;
|
|
975
|
+
}, $o = function(e) {
|
|
976
|
+
return [
|
|
977
|
+
e.scrollTop,
|
|
978
|
+
e.scrollHeight,
|
|
979
|
+
e.clientHeight
|
|
980
|
+
];
|
|
981
|
+
}, jo = function(e) {
|
|
982
|
+
return [
|
|
983
|
+
e.scrollLeft,
|
|
984
|
+
e.scrollWidth,
|
|
985
|
+
e.clientWidth
|
|
986
|
+
];
|
|
987
|
+
}, pr = function(e, t) {
|
|
988
|
+
return e === "v" ? Wo(t) : Bo(t);
|
|
989
|
+
}, hr = function(e, t) {
|
|
990
|
+
return e === "v" ? $o(t) : jo(t);
|
|
991
|
+
}, Uo = function(e, t) {
|
|
992
|
+
return e === "h" && t === "rtl" ? -1 : 1;
|
|
993
|
+
}, Vo = function(e, t, r, n, o) {
|
|
994
|
+
var a = Uo(e, window.getComputedStyle(t).direction), l = a * n, i = r.target, d = t.contains(i), u = !1, f = l > 0, m = 0, p = 0;
|
|
995
|
+
do {
|
|
996
|
+
if (!i) break;
|
|
997
|
+
var g = hr(e, i), C = g[0], h = g[1] - g[2] - a * C;
|
|
998
|
+
(C || h) && pr(e, i) && (m += h, p += C);
|
|
999
|
+
var v = i.parentNode;
|
|
1000
|
+
i = v && v.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? v.host : v;
|
|
1001
|
+
} while (!d && i !== document.body || d && (t.contains(i) || t === i));
|
|
1002
|
+
return (f && (o && Math.abs(m) < 1 || !o && l > m) || !f && (o && Math.abs(p) < 1 || !o && -l > p)) && (u = !0), u;
|
|
1003
|
+
}, Ee = function(e) {
|
|
1004
|
+
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
1005
|
+
}, Ft = function(e) {
|
|
1006
|
+
return [e.deltaX, e.deltaY];
|
|
1007
|
+
}, Wt = function(e) {
|
|
1008
|
+
return e && "current" in e ? e.current : e;
|
|
1009
|
+
}, Ho = function(e, t) {
|
|
1010
|
+
return e[0] === t[0] && e[1] === t[1];
|
|
1011
|
+
}, Go = function(e) {
|
|
1012
|
+
return `
|
|
1013
|
+
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
1014
|
+
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
1015
|
+
`);
|
|
1016
|
+
}, Xo = 0, de = [];
|
|
1017
|
+
function Yo(e) {
|
|
1018
|
+
var t = s.useRef([]), r = s.useRef([0, 0]), n = s.useRef(), o = s.useState(Xo++)[0], a = s.useState(fr)[0], l = s.useRef(e);
|
|
1019
|
+
s.useEffect(function() {
|
|
1020
|
+
l.current = e;
|
|
1021
|
+
}, [e]), s.useEffect(function() {
|
|
1022
|
+
if (e.inert) {
|
|
1023
|
+
document.body.classList.add("block-interactivity-".concat(o));
|
|
1024
|
+
var h = ho([e.lockRef.current], (e.shards || []).map(Wt), !0).filter(Boolean);
|
|
1025
|
+
return h.forEach(function(v) {
|
|
1026
|
+
return v.classList.add("allow-interactivity-".concat(o));
|
|
1027
|
+
}), function() {
|
|
1028
|
+
document.body.classList.remove("block-interactivity-".concat(o)), h.forEach(function(v) {
|
|
1029
|
+
return v.classList.remove("allow-interactivity-".concat(o));
|
|
1030
|
+
});
|
|
1031
|
+
};
|
|
1032
|
+
}
|
|
1033
|
+
}, [
|
|
1034
|
+
e.inert,
|
|
1035
|
+
e.lockRef.current,
|
|
1036
|
+
e.shards
|
|
1037
|
+
]);
|
|
1038
|
+
var i = s.useCallback(function(h, v) {
|
|
1039
|
+
if ("touches" in h && h.touches.length === 2 || h.type === "wheel" && h.ctrlKey) return !l.current.allowPinchZoom;
|
|
1040
|
+
var E = Ee(h), R = r.current, w = "deltaX" in h ? h.deltaX : R[0] - E[0], S = "deltaY" in h ? h.deltaY : R[1] - E[1], D, _ = h.target, T = Math.abs(w) > Math.abs(S) ? "h" : "v";
|
|
1041
|
+
if ("touches" in h && T === "h" && _.type === "range") return !1;
|
|
1042
|
+
var k = window.getSelection(), O = k && k.anchorNode;
|
|
1043
|
+
if (O && (O === _ || O.contains(_))) return !1;
|
|
1044
|
+
var z = Lt(T, _);
|
|
1045
|
+
if (!z) return !0;
|
|
1046
|
+
if (z ? D = T : (D = T === "v" ? "h" : "v", z = Lt(T, _)), !z) return !1;
|
|
1047
|
+
if (!n.current && "changedTouches" in h && (w || S) && (n.current = D), !D) return !0;
|
|
1048
|
+
var q = n.current || D;
|
|
1049
|
+
return Vo(q, v, h, q === "h" ? w : S, !0);
|
|
1050
|
+
}, []), d = s.useCallback(function(h) {
|
|
1051
|
+
var v = h;
|
|
1052
|
+
if (!(!de.length || de[de.length - 1] !== a)) {
|
|
1053
|
+
var E = "deltaY" in v ? Ft(v) : Ee(v), R = t.current.filter(function(S) {
|
|
1054
|
+
return S.name === v.type && (S.target === v.target || v.target === S.shadowParent) && Ho(S.delta, E);
|
|
1055
|
+
})[0];
|
|
1056
|
+
if (R && R.should) {
|
|
1057
|
+
v.cancelable && v.preventDefault();
|
|
1058
|
+
return;
|
|
1059
|
+
}
|
|
1060
|
+
if (!R) {
|
|
1061
|
+
var w = (l.current.shards || []).map(Wt).filter(Boolean).filter(function(S) {
|
|
1062
|
+
return S.contains(v.target);
|
|
1063
|
+
});
|
|
1064
|
+
(w.length > 0 ? i(v, w[0]) : !l.current.noIsolation) && v.cancelable && v.preventDefault();
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
}, []), u = s.useCallback(function(h, v, E, R) {
|
|
1068
|
+
var w = {
|
|
1069
|
+
name: h,
|
|
1070
|
+
delta: v,
|
|
1071
|
+
target: E,
|
|
1072
|
+
should: R,
|
|
1073
|
+
shadowParent: qo(E)
|
|
1074
|
+
};
|
|
1075
|
+
t.current.push(w), setTimeout(function() {
|
|
1076
|
+
t.current = t.current.filter(function(S) {
|
|
1077
|
+
return S !== w;
|
|
1078
|
+
});
|
|
1079
|
+
}, 1);
|
|
1080
|
+
}, []), f = s.useCallback(function(h) {
|
|
1081
|
+
r.current = Ee(h), n.current = void 0;
|
|
1082
|
+
}, []), m = s.useCallback(function(h) {
|
|
1083
|
+
u(h.type, Ft(h), h.target, i(h, e.lockRef.current));
|
|
1084
|
+
}, []), p = s.useCallback(function(h) {
|
|
1085
|
+
u(h.type, Ee(h), h.target, i(h, e.lockRef.current));
|
|
1086
|
+
}, []);
|
|
1087
|
+
s.useEffect(function() {
|
|
1088
|
+
return de.push(a), e.setCallbacks({
|
|
1089
|
+
onScrollCapture: m,
|
|
1090
|
+
onWheelCapture: m,
|
|
1091
|
+
onTouchMoveCapture: p
|
|
1092
|
+
}), document.addEventListener("wheel", d, ce), document.addEventListener("touchmove", d, ce), document.addEventListener("touchstart", f, ce), function() {
|
|
1093
|
+
de = de.filter(function(h) {
|
|
1094
|
+
return h !== a;
|
|
1095
|
+
}), document.removeEventListener("wheel", d, ce), document.removeEventListener("touchmove", d, ce), document.removeEventListener("touchstart", f, ce);
|
|
1096
|
+
};
|
|
1097
|
+
}, []);
|
|
1098
|
+
var g = e.removeScrollBar, C = e.inert;
|
|
1099
|
+
return s.createElement(s.Fragment, null, C ? s.createElement(a, { styles: Go(o) }) : null, g ? s.createElement(Lo, {
|
|
1100
|
+
noRelative: e.noRelative,
|
|
1101
|
+
gapMode: e.gapMode
|
|
1102
|
+
}) : null);
|
|
1103
|
+
}
|
|
1104
|
+
function qo(e) {
|
|
1105
|
+
for (var t = null; e !== null; )
|
|
1106
|
+
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
1107
|
+
return t;
|
|
1108
|
+
}
|
|
1109
|
+
var Ko = ko(ur, Yo), vr = s.forwardRef(function(e, t) {
|
|
1110
|
+
return s.createElement(Fe, G({}, e, {
|
|
1111
|
+
ref: t,
|
|
1112
|
+
sideCar: Ko
|
|
1113
|
+
}));
|
|
1114
|
+
});
|
|
1115
|
+
vr.classNames = Fe.classNames;
|
|
1116
|
+
var Zo = function(e) {
|
|
1117
|
+
return typeof document > "u" ? null : (Array.isArray(e) ? e[0] : e).ownerDocument.body;
|
|
1118
|
+
}, ue = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap(), Re = {}, Je = 0, gr = function(e) {
|
|
1119
|
+
return e && (e.host || gr(e.parentNode));
|
|
1120
|
+
}, Qo = function(e, t) {
|
|
1121
|
+
return t.map(function(r) {
|
|
1122
|
+
if (e.contains(r)) return r;
|
|
1123
|
+
var n = gr(r);
|
|
1124
|
+
return n && e.contains(n) ? n : (console.error("aria-hidden", r, "in not contained inside", e, ". Doing nothing"), null);
|
|
1125
|
+
}).filter(function(r) {
|
|
1126
|
+
return !!r;
|
|
1127
|
+
});
|
|
1128
|
+
}, Jo = function(e, t, r, n) {
|
|
1129
|
+
var o = Qo(t, Array.isArray(e) ? e : [e]);
|
|
1130
|
+
Re[r] || (Re[r] = /* @__PURE__ */ new WeakMap());
|
|
1131
|
+
var a = Re[r], l = [], i = /* @__PURE__ */ new Set(), d = new Set(o), u = function(m) {
|
|
1132
|
+
!m || i.has(m) || (i.add(m), u(m.parentNode));
|
|
1133
|
+
};
|
|
1134
|
+
o.forEach(u);
|
|
1135
|
+
var f = function(m) {
|
|
1136
|
+
!m || d.has(m) || Array.prototype.forEach.call(m.children, function(p) {
|
|
1137
|
+
if (i.has(p)) f(p);
|
|
1138
|
+
else try {
|
|
1139
|
+
var g = p.getAttribute(n), C = g !== null && g !== "false", h = (ue.get(p) || 0) + 1, v = (a.get(p) || 0) + 1;
|
|
1140
|
+
ue.set(p, h), a.set(p, v), l.push(p), h === 1 && C && Ne.set(p, !0), v === 1 && p.setAttribute(r, "true"), C || p.setAttribute(n, "true");
|
|
1141
|
+
} catch (E) {
|
|
1142
|
+
console.error("aria-hidden: cannot operate on ", p, E);
|
|
1143
|
+
}
|
|
1144
|
+
});
|
|
1145
|
+
};
|
|
1146
|
+
return f(t), i.clear(), Je++, function() {
|
|
1147
|
+
l.forEach(function(m) {
|
|
1148
|
+
var p = ue.get(m) - 1, g = a.get(m) - 1;
|
|
1149
|
+
ue.set(m, p), a.set(m, g), p || (Ne.has(m) || m.removeAttribute(n), Ne.delete(m)), g || m.removeAttribute(r);
|
|
1150
|
+
}), Je--, Je || (ue = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap(), Re = {});
|
|
1151
|
+
};
|
|
1152
|
+
}, ea = function(e, t, r) {
|
|
1153
|
+
r === void 0 && (r = "data-aria-hidden");
|
|
1154
|
+
var n = Array.from(Array.isArray(e) ? e : [e]), o = t || Zo(e);
|
|
1155
|
+
return o ? (n.push.apply(n, Array.from(o.querySelectorAll("[aria-live], script"))), Jo(n, o, r, "aria-hidden")) : function() {
|
|
1156
|
+
return null;
|
|
1157
|
+
};
|
|
1158
|
+
}, We = "Dialog", [br, gs] = st(We), [ta, H] = br(We), yr = (e) => {
|
|
1159
|
+
const { __scopeDialog: t, children: r, open: n, defaultOpen: o, onOpenChange: a, modal: l = !0 } = e, i = s.useRef(null), d = s.useRef(null), [u, f] = rr({
|
|
1160
|
+
prop: n,
|
|
1161
|
+
defaultProp: o ?? !1,
|
|
1162
|
+
onChange: a,
|
|
1163
|
+
caller: We
|
|
1164
|
+
});
|
|
1165
|
+
return /* @__PURE__ */ c(ta, {
|
|
1166
|
+
scope: t,
|
|
1167
|
+
triggerRef: i,
|
|
1168
|
+
contentRef: d,
|
|
1169
|
+
contentId: Ge(),
|
|
1170
|
+
titleId: Ge(),
|
|
1171
|
+
descriptionId: Ge(),
|
|
1172
|
+
open: u,
|
|
1173
|
+
onOpenChange: f,
|
|
1174
|
+
onOpenToggle: s.useCallback(() => f((m) => !m), [f]),
|
|
1175
|
+
modal: l,
|
|
1176
|
+
children: r
|
|
1177
|
+
});
|
|
1178
|
+
};
|
|
1179
|
+
yr.displayName = We;
|
|
1180
|
+
var xr = "DialogTrigger", ra = s.forwardRef((e, t) => {
|
|
1181
|
+
const { __scopeDialog: r, ...n } = e, o = H(xr, r), a = B(t, o.triggerRef);
|
|
1182
|
+
return /* @__PURE__ */ c(I.button, {
|
|
1183
|
+
type: "button",
|
|
1184
|
+
"aria-haspopup": "dialog",
|
|
1185
|
+
"aria-expanded": o.open,
|
|
1186
|
+
"aria-controls": o.contentId,
|
|
1187
|
+
"data-state": dt(o.open),
|
|
1188
|
+
...n,
|
|
1189
|
+
ref: a,
|
|
1190
|
+
onClick: F(e.onClick, o.onOpenToggle)
|
|
1191
|
+
});
|
|
1192
|
+
});
|
|
1193
|
+
ra.displayName = xr;
|
|
1194
|
+
var lt = "DialogPortal", [na, wr] = br(lt, { forceMount: void 0 }), Sr = (e) => {
|
|
1195
|
+
const { __scopeDialog: t, forceMount: r, children: n, container: o } = e, a = H(lt, t);
|
|
1196
|
+
return /* @__PURE__ */ c(na, {
|
|
1197
|
+
scope: t,
|
|
1198
|
+
forceMount: r,
|
|
1199
|
+
children: s.Children.map(n, (l) => /* @__PURE__ */ c(Q, {
|
|
1200
|
+
present: r || a.open,
|
|
1201
|
+
children: /* @__PURE__ */ c(lr, {
|
|
1202
|
+
asChild: !0,
|
|
1203
|
+
container: o,
|
|
1204
|
+
children: l
|
|
1205
|
+
})
|
|
1206
|
+
}))
|
|
1207
|
+
});
|
|
1208
|
+
};
|
|
1209
|
+
Sr.displayName = lt;
|
|
1210
|
+
var _e = "DialogOverlay", Cr = s.forwardRef((e, t) => {
|
|
1211
|
+
const r = wr(_e, e.__scopeDialog), { forceMount: n = r.forceMount, ...o } = e, a = H(_e, e.__scopeDialog);
|
|
1212
|
+
return a.modal ? /* @__PURE__ */ c(Q, {
|
|
1213
|
+
present: n || a.open,
|
|
1214
|
+
children: /* @__PURE__ */ c(aa, {
|
|
1215
|
+
...o,
|
|
1216
|
+
ref: t
|
|
1217
|
+
})
|
|
1218
|
+
}) : null;
|
|
1219
|
+
});
|
|
1220
|
+
Cr.displayName = _e;
|
|
1221
|
+
var oa = /* @__PURE__ */ it("DialogOverlay.RemoveScroll"), aa = s.forwardRef((e, t) => {
|
|
1222
|
+
const { __scopeDialog: r, ...n } = e, o = H(_e, r);
|
|
1223
|
+
return /* @__PURE__ */ c(vr, {
|
|
1224
|
+
as: oa,
|
|
1225
|
+
allowPinchZoom: !0,
|
|
1226
|
+
shards: [o.contentRef],
|
|
1227
|
+
children: /* @__PURE__ */ c(I.div, {
|
|
1228
|
+
"data-state": dt(o.open),
|
|
1229
|
+
...n,
|
|
1230
|
+
ref: t,
|
|
1231
|
+
style: {
|
|
1232
|
+
pointerEvents: "auto",
|
|
1233
|
+
...n.style
|
|
1234
|
+
}
|
|
1235
|
+
})
|
|
1236
|
+
});
|
|
1237
|
+
}), se = "DialogContent", kr = s.forwardRef((e, t) => {
|
|
1238
|
+
const r = wr(se, e.__scopeDialog), { forceMount: n = r.forceMount, ...o } = e, a = H(se, e.__scopeDialog);
|
|
1239
|
+
return /* @__PURE__ */ c(Q, {
|
|
1240
|
+
present: n || a.open,
|
|
1241
|
+
children: a.modal ? /* @__PURE__ */ c(ia, {
|
|
1242
|
+
...o,
|
|
1243
|
+
ref: t
|
|
1244
|
+
}) : /* @__PURE__ */ c(sa, {
|
|
1245
|
+
...o,
|
|
1246
|
+
ref: t
|
|
1247
|
+
})
|
|
1248
|
+
});
|
|
1249
|
+
});
|
|
1250
|
+
kr.displayName = se;
|
|
1251
|
+
var ia = s.forwardRef((e, t) => {
|
|
1252
|
+
const r = H(se, e.__scopeDialog), n = s.useRef(null), o = B(t, r.contentRef, n);
|
|
1253
|
+
return s.useEffect(() => {
|
|
1254
|
+
const a = n.current;
|
|
1255
|
+
if (a) return ea(a);
|
|
1256
|
+
}, []), /* @__PURE__ */ c(Er, {
|
|
1257
|
+
...e,
|
|
1258
|
+
ref: o,
|
|
1259
|
+
trapFocus: r.open,
|
|
1260
|
+
disableOutsidePointerEvents: !0,
|
|
1261
|
+
onCloseAutoFocus: F(e.onCloseAutoFocus, (a) => {
|
|
1262
|
+
a.preventDefault(), r.triggerRef.current?.focus();
|
|
1263
|
+
}),
|
|
1264
|
+
onPointerDownOutside: F(e.onPointerDownOutside, (a) => {
|
|
1265
|
+
const l = a.detail.originalEvent, i = l.button === 0 && l.ctrlKey === !0;
|
|
1266
|
+
(l.button === 2 || i) && a.preventDefault();
|
|
1267
|
+
}),
|
|
1268
|
+
onFocusOutside: F(e.onFocusOutside, (a) => a.preventDefault())
|
|
1269
|
+
});
|
|
1270
|
+
}), sa = s.forwardRef((e, t) => {
|
|
1271
|
+
const r = H(se, e.__scopeDialog), n = s.useRef(!1), o = s.useRef(!1);
|
|
1272
|
+
return /* @__PURE__ */ c(Er, {
|
|
1273
|
+
...e,
|
|
1274
|
+
ref: t,
|
|
1275
|
+
trapFocus: !1,
|
|
1276
|
+
disableOutsidePointerEvents: !1,
|
|
1277
|
+
onCloseAutoFocus: (a) => {
|
|
1278
|
+
e.onCloseAutoFocus?.(a), a.defaultPrevented || (n.current || r.triggerRef.current?.focus(), a.preventDefault()), n.current = !1, o.current = !1;
|
|
1279
|
+
},
|
|
1280
|
+
onInteractOutside: (a) => {
|
|
1281
|
+
e.onInteractOutside?.(a), a.defaultPrevented || (n.current = !0, a.detail.originalEvent.type === "pointerdown" && (o.current = !0));
|
|
1282
|
+
const l = a.target;
|
|
1283
|
+
r.triggerRef.current?.contains(l) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && o.current && a.preventDefault();
|
|
1284
|
+
}
|
|
1285
|
+
});
|
|
1286
|
+
}), Er = s.forwardRef((e, t) => {
|
|
1287
|
+
const { __scopeDialog: r, trapFocus: n, onOpenAutoFocus: o, onCloseAutoFocus: a, ...l } = e, i = H(se, r), d = s.useRef(null), u = B(t, d);
|
|
1288
|
+
return po(), /* @__PURE__ */ x(ne, { children: [/* @__PURE__ */ c(ir, {
|
|
1289
|
+
asChild: !0,
|
|
1290
|
+
loop: !0,
|
|
1291
|
+
trapped: n,
|
|
1292
|
+
onMountAutoFocus: o,
|
|
1293
|
+
onUnmountAutoFocus: a,
|
|
1294
|
+
children: /* @__PURE__ */ c(or, {
|
|
1295
|
+
role: "dialog",
|
|
1296
|
+
id: i.contentId,
|
|
1297
|
+
"aria-describedby": i.descriptionId,
|
|
1298
|
+
"aria-labelledby": i.titleId,
|
|
1299
|
+
"data-state": dt(i.open),
|
|
1300
|
+
...l,
|
|
1301
|
+
ref: u,
|
|
1302
|
+
onDismiss: () => i.onOpenChange(!1)
|
|
1303
|
+
})
|
|
1304
|
+
}), /* @__PURE__ */ x(ne, { children: [/* @__PURE__ */ c(ca, { titleId: i.titleId }), /* @__PURE__ */ c(ua, {
|
|
1305
|
+
contentRef: d,
|
|
1306
|
+
descriptionId: i.descriptionId
|
|
1307
|
+
})] })] });
|
|
1308
|
+
}), ct = "DialogTitle", Nr = s.forwardRef((e, t) => {
|
|
1309
|
+
const { __scopeDialog: r, ...n } = e, o = H(ct, r);
|
|
1310
|
+
return /* @__PURE__ */ c(I.h2, {
|
|
1311
|
+
id: o.titleId,
|
|
1312
|
+
...n,
|
|
1313
|
+
ref: t
|
|
1314
|
+
});
|
|
1315
|
+
});
|
|
1316
|
+
Nr.displayName = ct;
|
|
1317
|
+
var Rr = "DialogDescription", la = s.forwardRef((e, t) => {
|
|
1318
|
+
const { __scopeDialog: r, ...n } = e, o = H(Rr, r);
|
|
1319
|
+
return /* @__PURE__ */ c(I.p, {
|
|
1320
|
+
id: o.descriptionId,
|
|
1321
|
+
...n,
|
|
1322
|
+
ref: t
|
|
1323
|
+
});
|
|
1324
|
+
});
|
|
1325
|
+
la.displayName = Rr;
|
|
1326
|
+
var Pr = "DialogClose", Ar = s.forwardRef((e, t) => {
|
|
1327
|
+
const { __scopeDialog: r, ...n } = e, o = H(Pr, r);
|
|
1328
|
+
return /* @__PURE__ */ c(I.button, {
|
|
1329
|
+
type: "button",
|
|
1330
|
+
...n,
|
|
1331
|
+
ref: t,
|
|
1332
|
+
onClick: F(e.onClick, () => o.onOpenChange(!1))
|
|
1333
|
+
});
|
|
1334
|
+
});
|
|
1335
|
+
Ar.displayName = Pr;
|
|
1336
|
+
function dt(e) {
|
|
1337
|
+
return e ? "open" : "closed";
|
|
1338
|
+
}
|
|
1339
|
+
var Tr = "DialogTitleWarning", [bs, Or] = Wn(Tr, {
|
|
1340
|
+
contentName: se,
|
|
1341
|
+
titleName: ct,
|
|
1342
|
+
docsSlug: "dialog"
|
|
1343
|
+
}), ca = ({ titleId: e }) => {
|
|
1344
|
+
const t = Or(Tr), r = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
1345
|
+
|
|
1346
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
1347
|
+
|
|
1348
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
|
|
1349
|
+
return s.useEffect(() => {
|
|
1350
|
+
e && (document.getElementById(e) || console.error(r));
|
|
1351
|
+
}, [r, e]), null;
|
|
1352
|
+
}, da = "DialogDescriptionWarning", ua = ({ contentRef: e, descriptionId: t }) => {
|
|
1353
|
+
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Or(da).contentName}}.`;
|
|
1354
|
+
return s.useEffect(() => {
|
|
1355
|
+
const n = e.current?.getAttribute("aria-describedby");
|
|
1356
|
+
t && n && (document.getElementById(t) || console.warn(r));
|
|
1357
|
+
}, [
|
|
1358
|
+
r,
|
|
1359
|
+
e,
|
|
1360
|
+
t
|
|
1361
|
+
]), null;
|
|
1362
|
+
}, Dr = yr, _r = Sr, Mr = Cr, Ir = kr, zr = Nr, Lr = Ar;
|
|
1363
|
+
function fa(e) {
|
|
1364
|
+
const t = s.useRef({
|
|
1365
|
+
value: e,
|
|
1366
|
+
previous: e
|
|
1367
|
+
});
|
|
1368
|
+
return s.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
1369
|
+
}
|
|
1370
|
+
function ma(e) {
|
|
1371
|
+
const [t, r] = s.useState(void 0);
|
|
1372
|
+
return ie(() => {
|
|
1373
|
+
if (e) {
|
|
1374
|
+
r({
|
|
1375
|
+
width: e.offsetWidth,
|
|
1376
|
+
height: e.offsetHeight
|
|
1377
|
+
});
|
|
1378
|
+
const n = new ResizeObserver((o) => {
|
|
1379
|
+
if (!Array.isArray(o) || !o.length) return;
|
|
1380
|
+
const a = o[0];
|
|
1381
|
+
let l, i;
|
|
1382
|
+
if ("borderBoxSize" in a) {
|
|
1383
|
+
const d = a.borderBoxSize, u = Array.isArray(d) ? d[0] : d;
|
|
1384
|
+
l = u.inlineSize, i = u.blockSize;
|
|
1385
|
+
} else
|
|
1386
|
+
l = e.offsetWidth, i = e.offsetHeight;
|
|
1387
|
+
r({
|
|
1388
|
+
width: l,
|
|
1389
|
+
height: i
|
|
1390
|
+
});
|
|
1391
|
+
});
|
|
1392
|
+
return n.observe(e, { box: "border-box" }), () => n.unobserve(e);
|
|
1393
|
+
} else r(void 0);
|
|
1394
|
+
}, [e]), t;
|
|
1395
|
+
}
|
|
1396
|
+
var Be = "Checkbox", [pa, ys] = st(Be), [ha, ut] = pa(Be);
|
|
1397
|
+
function va(e) {
|
|
1398
|
+
const { __scopeCheckbox: t, checked: r, children: n, defaultChecked: o, disabled: a, form: l, name: i, onCheckedChange: d, required: u, value: f = "on", internal_do_not_use_render: m } = e, [p, g] = rr({
|
|
1399
|
+
prop: r,
|
|
1400
|
+
defaultProp: o ?? !1,
|
|
1401
|
+
onChange: d,
|
|
1402
|
+
caller: Be
|
|
1403
|
+
}), [C, h] = s.useState(null), [v, E] = s.useState(null), R = s.useRef(!1), w = C ? !!l || !!C.closest("form") : !0, S = {
|
|
1404
|
+
checked: p,
|
|
1405
|
+
disabled: a,
|
|
1406
|
+
setChecked: g,
|
|
1407
|
+
control: C,
|
|
1408
|
+
setControl: h,
|
|
1409
|
+
name: i,
|
|
1410
|
+
form: l,
|
|
1411
|
+
value: f,
|
|
1412
|
+
hasConsumerStoppedPropagationRef: R,
|
|
1413
|
+
required: u,
|
|
1414
|
+
defaultChecked: re(o) ? !1 : o,
|
|
1415
|
+
isFormControl: w,
|
|
1416
|
+
bubbleInput: v,
|
|
1417
|
+
setBubbleInput: E
|
|
1418
|
+
};
|
|
1419
|
+
return /* @__PURE__ */ c(ha, {
|
|
1420
|
+
scope: t,
|
|
1421
|
+
...S,
|
|
1422
|
+
children: ga(m) ? m(S) : n
|
|
1423
|
+
});
|
|
1424
|
+
}
|
|
1425
|
+
var Fr = "CheckboxTrigger", Wr = s.forwardRef(({ __scopeCheckbox: e, onKeyDown: t, onClick: r, ...n }, o) => {
|
|
1426
|
+
const { control: a, value: l, disabled: i, checked: d, required: u, setControl: f, setChecked: m, hasConsumerStoppedPropagationRef: p, isFormControl: g, bubbleInput: C } = ut(Fr, e), h = B(o, f), v = s.useRef(d);
|
|
1427
|
+
return s.useEffect(() => {
|
|
1428
|
+
const E = a?.form;
|
|
1429
|
+
if (E) {
|
|
1430
|
+
const R = () => m(v.current);
|
|
1431
|
+
return E.addEventListener("reset", R), () => E.removeEventListener("reset", R);
|
|
1432
|
+
}
|
|
1433
|
+
}, [a, m]), /* @__PURE__ */ c(I.button, {
|
|
1434
|
+
type: "button",
|
|
1435
|
+
role: "checkbox",
|
|
1436
|
+
"aria-checked": re(d) ? "mixed" : d,
|
|
1437
|
+
"aria-required": u,
|
|
1438
|
+
"data-state": Hr(d),
|
|
1439
|
+
"data-disabled": i ? "" : void 0,
|
|
1440
|
+
disabled: i,
|
|
1441
|
+
value: l,
|
|
1442
|
+
...n,
|
|
1443
|
+
ref: h,
|
|
1444
|
+
onKeyDown: F(t, (E) => {
|
|
1445
|
+
E.key === "Enter" && E.preventDefault();
|
|
1446
|
+
}),
|
|
1447
|
+
onClick: F(r, (E) => {
|
|
1448
|
+
m((R) => re(R) ? !0 : !R), C && g && (p.current = E.isPropagationStopped(), p.current || E.stopPropagation());
|
|
1449
|
+
})
|
|
1450
|
+
});
|
|
1451
|
+
});
|
|
1452
|
+
Wr.displayName = Fr;
|
|
1453
|
+
var Br = s.forwardRef((e, t) => {
|
|
1454
|
+
const { __scopeCheckbox: r, name: n, checked: o, defaultChecked: a, required: l, disabled: i, value: d, onCheckedChange: u, form: f, ...m } = e;
|
|
1455
|
+
return /* @__PURE__ */ c(va, {
|
|
1456
|
+
__scopeCheckbox: r,
|
|
1457
|
+
checked: o,
|
|
1458
|
+
defaultChecked: a,
|
|
1459
|
+
disabled: i,
|
|
1460
|
+
required: l,
|
|
1461
|
+
onCheckedChange: u,
|
|
1462
|
+
name: n,
|
|
1463
|
+
form: f,
|
|
1464
|
+
value: d,
|
|
1465
|
+
internal_do_not_use_render: ({ isFormControl: p }) => /* @__PURE__ */ x(ne, { children: [/* @__PURE__ */ c(Wr, {
|
|
1466
|
+
...m,
|
|
1467
|
+
ref: t,
|
|
1468
|
+
__scopeCheckbox: r
|
|
1469
|
+
}), p && /* @__PURE__ */ c(Vr, { __scopeCheckbox: r })] })
|
|
1470
|
+
});
|
|
1471
|
+
});
|
|
1472
|
+
Br.displayName = Be;
|
|
1473
|
+
var $r = "CheckboxIndicator", jr = s.forwardRef((e, t) => {
|
|
1474
|
+
const { __scopeCheckbox: r, forceMount: n, ...o } = e, a = ut($r, r);
|
|
1475
|
+
return /* @__PURE__ */ c(Q, {
|
|
1476
|
+
present: n || re(a.checked) || a.checked === !0,
|
|
1477
|
+
children: /* @__PURE__ */ c(I.span, {
|
|
1478
|
+
"data-state": Hr(a.checked),
|
|
1479
|
+
"data-disabled": a.disabled ? "" : void 0,
|
|
1480
|
+
...o,
|
|
1481
|
+
ref: t,
|
|
1482
|
+
style: {
|
|
1483
|
+
pointerEvents: "none",
|
|
1484
|
+
...e.style
|
|
1485
|
+
}
|
|
1486
|
+
})
|
|
1487
|
+
});
|
|
1488
|
+
});
|
|
1489
|
+
jr.displayName = $r;
|
|
1490
|
+
var Ur = "CheckboxBubbleInput", Vr = s.forwardRef(({ __scopeCheckbox: e, ...t }, r) => {
|
|
1491
|
+
const { control: n, hasConsumerStoppedPropagationRef: o, checked: a, defaultChecked: l, required: i, disabled: d, name: u, value: f, form: m, bubbleInput: p, setBubbleInput: g } = ut(Ur, e), C = B(r, g), h = fa(a), v = ma(n);
|
|
1492
|
+
s.useEffect(() => {
|
|
1493
|
+
const R = p;
|
|
1494
|
+
if (!R) return;
|
|
1495
|
+
const w = window.HTMLInputElement.prototype, S = Object.getOwnPropertyDescriptor(w, "checked").set, D = !o.current;
|
|
1496
|
+
if (h !== a && S) {
|
|
1497
|
+
const _ = new Event("click", { bubbles: D });
|
|
1498
|
+
R.indeterminate = re(a), S.call(R, re(a) ? !1 : a), R.dispatchEvent(_);
|
|
1499
|
+
}
|
|
1500
|
+
}, [
|
|
1501
|
+
p,
|
|
1502
|
+
h,
|
|
1503
|
+
a,
|
|
1504
|
+
o
|
|
1505
|
+
]);
|
|
1506
|
+
const E = s.useRef(re(a) ? !1 : a);
|
|
1507
|
+
return /* @__PURE__ */ c(I.input, {
|
|
1508
|
+
type: "checkbox",
|
|
1509
|
+
"aria-hidden": !0,
|
|
1510
|
+
defaultChecked: l ?? E.current,
|
|
1511
|
+
required: i,
|
|
1512
|
+
disabled: d,
|
|
1513
|
+
name: u,
|
|
1514
|
+
value: f,
|
|
1515
|
+
form: m,
|
|
1516
|
+
...t,
|
|
1517
|
+
tabIndex: -1,
|
|
1518
|
+
ref: C,
|
|
1519
|
+
style: {
|
|
1520
|
+
...t.style,
|
|
1521
|
+
...v,
|
|
1522
|
+
position: "absolute",
|
|
1523
|
+
pointerEvents: "none",
|
|
1524
|
+
opacity: 0,
|
|
1525
|
+
margin: 0,
|
|
1526
|
+
transform: "translateX(-100%)"
|
|
1527
|
+
}
|
|
1528
|
+
});
|
|
1529
|
+
});
|
|
1530
|
+
Vr.displayName = Ur;
|
|
1531
|
+
function ga(e) {
|
|
1532
|
+
return typeof e == "function";
|
|
1533
|
+
}
|
|
1534
|
+
function re(e) {
|
|
1535
|
+
return e === "indeterminate";
|
|
1536
|
+
}
|
|
1537
|
+
function Hr(e) {
|
|
1538
|
+
return re(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
1539
|
+
}
|
|
1540
|
+
var ba = "Label", Gr = s.forwardRef((e, t) => /* @__PURE__ */ c(I.label, {
|
|
1541
|
+
...e,
|
|
1542
|
+
ref: t,
|
|
1543
|
+
onMouseDown: (r) => {
|
|
1544
|
+
r.target.closest("button, input, select, textarea") || (e.onMouseDown?.(r), !r.defaultPrevented && r.detail > 1 && r.preventDefault());
|
|
1545
|
+
}
|
|
1546
|
+
}));
|
|
1547
|
+
Gr.displayName = ba;
|
|
1548
|
+
var ya = Gr;
|
|
1549
|
+
function xa(e, [t, r]) {
|
|
1550
|
+
return Math.min(r, Math.max(t, e));
|
|
1551
|
+
}
|
|
1552
|
+
function wa(e, t) {
|
|
1553
|
+
return s.useReducer((r, n) => t[r][n] ?? r, e);
|
|
1554
|
+
}
|
|
1555
|
+
var ft = "ScrollArea", [Xr, xs] = st(ft), [Sa, V] = Xr(ft), Yr = s.forwardRef((e, t) => {
|
|
1556
|
+
const { __scopeScrollArea: r, type: n = "hover", dir: o, scrollHideDelay: a = 600, ...l } = e, [i, d] = s.useState(null), [u, f] = s.useState(null), [m, p] = s.useState(null), [g, C] = s.useState(null), [h, v] = s.useState(null), [E, R] = s.useState(0), [w, S] = s.useState(0), [D, _] = s.useState(!1), [T, k] = s.useState(!1), O = B(t, (q) => d(q)), z = Kn(o);
|
|
1557
|
+
return /* @__PURE__ */ c(Sa, {
|
|
1558
|
+
scope: r,
|
|
1559
|
+
type: n,
|
|
1560
|
+
dir: z,
|
|
1561
|
+
scrollHideDelay: a,
|
|
1562
|
+
scrollArea: i,
|
|
1563
|
+
viewport: u,
|
|
1564
|
+
onViewportChange: f,
|
|
1565
|
+
content: m,
|
|
1566
|
+
onContentChange: p,
|
|
1567
|
+
scrollbarX: g,
|
|
1568
|
+
onScrollbarXChange: C,
|
|
1569
|
+
scrollbarXEnabled: D,
|
|
1570
|
+
onScrollbarXEnabledChange: _,
|
|
1571
|
+
scrollbarY: h,
|
|
1572
|
+
onScrollbarYChange: v,
|
|
1573
|
+
scrollbarYEnabled: T,
|
|
1574
|
+
onScrollbarYEnabledChange: k,
|
|
1575
|
+
onCornerWidthChange: R,
|
|
1576
|
+
onCornerHeightChange: S,
|
|
1577
|
+
children: /* @__PURE__ */ c(I.div, {
|
|
1578
|
+
dir: z,
|
|
1579
|
+
...l,
|
|
1580
|
+
ref: O,
|
|
1581
|
+
style: {
|
|
1582
|
+
position: "relative",
|
|
1583
|
+
"--radix-scroll-area-corner-width": E + "px",
|
|
1584
|
+
"--radix-scroll-area-corner-height": w + "px",
|
|
1585
|
+
...e.style
|
|
1586
|
+
}
|
|
1587
|
+
})
|
|
1588
|
+
});
|
|
1589
|
+
});
|
|
1590
|
+
Yr.displayName = ft;
|
|
1591
|
+
var qr = "ScrollAreaViewport", Kr = s.forwardRef((e, t) => {
|
|
1592
|
+
const { __scopeScrollArea: r, children: n, nonce: o, ...a } = e, l = V(qr, r), i = B(t, s.useRef(null), l.onViewportChange);
|
|
1593
|
+
return /* @__PURE__ */ x(ne, { children: [/* @__PURE__ */ c("style", {
|
|
1594
|
+
dangerouslySetInnerHTML: { __html: "[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}" },
|
|
1595
|
+
nonce: o
|
|
1596
|
+
}), /* @__PURE__ */ c(I.div, {
|
|
1597
|
+
"data-radix-scroll-area-viewport": "",
|
|
1598
|
+
...a,
|
|
1599
|
+
ref: i,
|
|
1600
|
+
style: {
|
|
1601
|
+
overflowX: l.scrollbarXEnabled ? "scroll" : "hidden",
|
|
1602
|
+
overflowY: l.scrollbarYEnabled ? "scroll" : "hidden",
|
|
1603
|
+
...e.style
|
|
1604
|
+
},
|
|
1605
|
+
children: /* @__PURE__ */ c("div", {
|
|
1606
|
+
ref: l.onContentChange,
|
|
1607
|
+
style: {
|
|
1608
|
+
minWidth: "100%",
|
|
1609
|
+
display: "table"
|
|
1610
|
+
},
|
|
1611
|
+
children: n
|
|
1612
|
+
})
|
|
1613
|
+
})] });
|
|
1614
|
+
});
|
|
1615
|
+
Kr.displayName = qr;
|
|
1616
|
+
var Y = "ScrollAreaScrollbar", Zr = s.forwardRef((e, t) => {
|
|
1617
|
+
const { forceMount: r, ...n } = e, o = V(Y, e.__scopeScrollArea), { onScrollbarXEnabledChange: a, onScrollbarYEnabledChange: l } = o, i = e.orientation === "horizontal";
|
|
1618
|
+
return s.useEffect(() => (i ? a(!0) : l(!0), () => {
|
|
1619
|
+
i ? a(!1) : l(!1);
|
|
1620
|
+
}), [
|
|
1621
|
+
i,
|
|
1622
|
+
a,
|
|
1623
|
+
l
|
|
1624
|
+
]), o.type === "hover" ? /* @__PURE__ */ c(Ca, {
|
|
1625
|
+
...n,
|
|
1626
|
+
ref: t,
|
|
1627
|
+
forceMount: r
|
|
1628
|
+
}) : o.type === "scroll" ? /* @__PURE__ */ c(ka, {
|
|
1629
|
+
...n,
|
|
1630
|
+
ref: t,
|
|
1631
|
+
forceMount: r
|
|
1632
|
+
}) : o.type === "auto" ? /* @__PURE__ */ c(Qr, {
|
|
1633
|
+
...n,
|
|
1634
|
+
ref: t,
|
|
1635
|
+
forceMount: r
|
|
1636
|
+
}) : o.type === "always" ? /* @__PURE__ */ c(mt, {
|
|
1637
|
+
...n,
|
|
1638
|
+
ref: t
|
|
1639
|
+
}) : null;
|
|
1640
|
+
});
|
|
1641
|
+
Zr.displayName = Y;
|
|
1642
|
+
var Ca = s.forwardRef((e, t) => {
|
|
1643
|
+
const { forceMount: r, ...n } = e, o = V(Y, e.__scopeScrollArea), [a, l] = s.useState(!1);
|
|
1644
|
+
return s.useEffect(() => {
|
|
1645
|
+
const i = o.scrollArea;
|
|
1646
|
+
let d = 0;
|
|
1647
|
+
if (i) {
|
|
1648
|
+
const u = () => {
|
|
1649
|
+
window.clearTimeout(d), l(!0);
|
|
1650
|
+
}, f = () => {
|
|
1651
|
+
d = window.setTimeout(() => l(!1), o.scrollHideDelay);
|
|
1652
|
+
};
|
|
1653
|
+
return i.addEventListener("pointerenter", u), i.addEventListener("pointerleave", f), () => {
|
|
1654
|
+
window.clearTimeout(d), i.removeEventListener("pointerenter", u), i.removeEventListener("pointerleave", f);
|
|
1655
|
+
};
|
|
1656
|
+
}
|
|
1657
|
+
}, [o.scrollArea, o.scrollHideDelay]), /* @__PURE__ */ c(Q, {
|
|
1658
|
+
present: r || a,
|
|
1659
|
+
children: /* @__PURE__ */ c(Qr, {
|
|
1660
|
+
"data-state": a ? "visible" : "hidden",
|
|
1661
|
+
...n,
|
|
1662
|
+
ref: t
|
|
1663
|
+
})
|
|
1664
|
+
});
|
|
1665
|
+
}), ka = s.forwardRef((e, t) => {
|
|
1666
|
+
const { forceMount: r, ...n } = e, o = V(Y, e.__scopeScrollArea), a = e.orientation === "horizontal", l = je(() => d("SCROLL_END"), 100), [i, d] = wa("hidden", {
|
|
1667
|
+
hidden: { SCROLL: "scrolling" },
|
|
1668
|
+
scrolling: {
|
|
1669
|
+
SCROLL_END: "idle",
|
|
1670
|
+
POINTER_ENTER: "interacting"
|
|
1671
|
+
},
|
|
1672
|
+
interacting: {
|
|
1673
|
+
SCROLL: "interacting",
|
|
1674
|
+
POINTER_LEAVE: "idle"
|
|
1675
|
+
},
|
|
1676
|
+
idle: {
|
|
1677
|
+
HIDE: "hidden",
|
|
1678
|
+
SCROLL: "scrolling",
|
|
1679
|
+
POINTER_ENTER: "interacting"
|
|
1680
|
+
}
|
|
1681
|
+
});
|
|
1682
|
+
return s.useEffect(() => {
|
|
1683
|
+
if (i === "idle") {
|
|
1684
|
+
const u = window.setTimeout(() => d("HIDE"), o.scrollHideDelay);
|
|
1685
|
+
return () => window.clearTimeout(u);
|
|
1686
|
+
}
|
|
1687
|
+
}, [
|
|
1688
|
+
i,
|
|
1689
|
+
o.scrollHideDelay,
|
|
1690
|
+
d
|
|
1691
|
+
]), s.useEffect(() => {
|
|
1692
|
+
const u = o.viewport, f = a ? "scrollLeft" : "scrollTop";
|
|
1693
|
+
if (u) {
|
|
1694
|
+
let m = u[f];
|
|
1695
|
+
const p = () => {
|
|
1696
|
+
const g = u[f];
|
|
1697
|
+
m !== g && (d("SCROLL"), l()), m = g;
|
|
1698
|
+
};
|
|
1699
|
+
return u.addEventListener("scroll", p), () => u.removeEventListener("scroll", p);
|
|
1700
|
+
}
|
|
1701
|
+
}, [
|
|
1702
|
+
o.viewport,
|
|
1703
|
+
a,
|
|
1704
|
+
d,
|
|
1705
|
+
l
|
|
1706
|
+
]), /* @__PURE__ */ c(Q, {
|
|
1707
|
+
present: r || i !== "hidden",
|
|
1708
|
+
children: /* @__PURE__ */ c(mt, {
|
|
1709
|
+
"data-state": i === "hidden" ? "hidden" : "visible",
|
|
1710
|
+
...n,
|
|
1711
|
+
ref: t,
|
|
1712
|
+
onPointerEnter: F(e.onPointerEnter, () => d("POINTER_ENTER")),
|
|
1713
|
+
onPointerLeave: F(e.onPointerLeave, () => d("POINTER_LEAVE"))
|
|
1714
|
+
})
|
|
1715
|
+
});
|
|
1716
|
+
}), Qr = s.forwardRef((e, t) => {
|
|
1717
|
+
const r = V(Y, e.__scopeScrollArea), { forceMount: n, ...o } = e, [a, l] = s.useState(!1), i = e.orientation === "horizontal", d = je(() => {
|
|
1718
|
+
if (r.viewport) {
|
|
1719
|
+
const u = r.viewport.offsetWidth < r.viewport.scrollWidth, f = r.viewport.offsetHeight < r.viewport.scrollHeight;
|
|
1720
|
+
l(i ? u : f);
|
|
1721
|
+
}
|
|
1722
|
+
}, 10);
|
|
1723
|
+
return me(r.viewport, d), me(r.content, d), /* @__PURE__ */ c(Q, {
|
|
1724
|
+
present: n || a,
|
|
1725
|
+
children: /* @__PURE__ */ c(mt, {
|
|
1726
|
+
"data-state": a ? "visible" : "hidden",
|
|
1727
|
+
...o,
|
|
1728
|
+
ref: t
|
|
1729
|
+
})
|
|
1730
|
+
});
|
|
1731
|
+
}), mt = s.forwardRef((e, t) => {
|
|
1732
|
+
const { orientation: r = "vertical", ...n } = e, o = V(Y, e.__scopeScrollArea), a = s.useRef(null), l = s.useRef(0), [i, d] = s.useState({
|
|
1733
|
+
content: 0,
|
|
1734
|
+
viewport: 0,
|
|
1735
|
+
scrollbar: {
|
|
1736
|
+
size: 0,
|
|
1737
|
+
paddingStart: 0,
|
|
1738
|
+
paddingEnd: 0
|
|
1739
|
+
}
|
|
1740
|
+
}), u = nn(i.viewport, i.content), f = {
|
|
1741
|
+
...n,
|
|
1742
|
+
sizes: i,
|
|
1743
|
+
onSizesChange: d,
|
|
1744
|
+
hasThumb: u > 0 && u < 1,
|
|
1745
|
+
onThumbChange: (p) => a.current = p,
|
|
1746
|
+
onThumbPointerUp: () => l.current = 0,
|
|
1747
|
+
onThumbPointerDown: (p) => l.current = p
|
|
1748
|
+
};
|
|
1749
|
+
function m(p, g) {
|
|
1750
|
+
return Ta(p, l.current, i, g);
|
|
1751
|
+
}
|
|
1752
|
+
return r === "horizontal" ? /* @__PURE__ */ c(Ea, {
|
|
1753
|
+
...f,
|
|
1754
|
+
ref: t,
|
|
1755
|
+
onThumbPositionChange: () => {
|
|
1756
|
+
if (o.viewport && a.current) {
|
|
1757
|
+
const p = o.viewport.scrollLeft, g = Bt(p, i, o.dir);
|
|
1758
|
+
a.current.style.transform = `translate3d(${g}px, 0, 0)`;
|
|
1759
|
+
}
|
|
1760
|
+
},
|
|
1761
|
+
onWheelScroll: (p) => {
|
|
1762
|
+
o.viewport && (o.viewport.scrollLeft = p);
|
|
1763
|
+
},
|
|
1764
|
+
onDragScroll: (p) => {
|
|
1765
|
+
o.viewport && (o.viewport.scrollLeft = m(p, o.dir));
|
|
1766
|
+
}
|
|
1767
|
+
}) : r === "vertical" ? /* @__PURE__ */ c(Na, {
|
|
1768
|
+
...f,
|
|
1769
|
+
ref: t,
|
|
1770
|
+
onThumbPositionChange: () => {
|
|
1771
|
+
if (o.viewport && a.current) {
|
|
1772
|
+
const p = o.viewport.scrollTop, g = Bt(p, i);
|
|
1773
|
+
a.current.style.transform = `translate3d(0, ${g}px, 0)`;
|
|
1774
|
+
}
|
|
1775
|
+
},
|
|
1776
|
+
onWheelScroll: (p) => {
|
|
1777
|
+
o.viewport && (o.viewport.scrollTop = p);
|
|
1778
|
+
},
|
|
1779
|
+
onDragScroll: (p) => {
|
|
1780
|
+
o.viewport && (o.viewport.scrollTop = m(p));
|
|
1781
|
+
}
|
|
1782
|
+
}) : null;
|
|
1783
|
+
}), Ea = s.forwardRef((e, t) => {
|
|
1784
|
+
const { sizes: r, onSizesChange: n, ...o } = e, a = V(Y, e.__scopeScrollArea), [l, i] = s.useState(), d = s.useRef(null), u = B(t, d, a.onScrollbarXChange);
|
|
1785
|
+
return s.useEffect(() => {
|
|
1786
|
+
d.current && i(getComputedStyle(d.current));
|
|
1787
|
+
}, [d]), /* @__PURE__ */ c(en, {
|
|
1788
|
+
"data-orientation": "horizontal",
|
|
1789
|
+
...o,
|
|
1790
|
+
ref: u,
|
|
1791
|
+
sizes: r,
|
|
1792
|
+
style: {
|
|
1793
|
+
bottom: 0,
|
|
1794
|
+
left: a.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
1795
|
+
right: a.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
1796
|
+
"--radix-scroll-area-thumb-width": $e(r) + "px",
|
|
1797
|
+
...e.style
|
|
1798
|
+
},
|
|
1799
|
+
onThumbPointerDown: (f) => e.onThumbPointerDown(f.x),
|
|
1800
|
+
onDragScroll: (f) => e.onDragScroll(f.x),
|
|
1801
|
+
onWheelScroll: (f, m) => {
|
|
1802
|
+
if (a.viewport) {
|
|
1803
|
+
const p = a.viewport.scrollLeft + f.deltaX;
|
|
1804
|
+
e.onWheelScroll(p), an(p, m) && f.preventDefault();
|
|
1805
|
+
}
|
|
1806
|
+
},
|
|
1807
|
+
onResize: () => {
|
|
1808
|
+
d.current && a.viewport && l && n({
|
|
1809
|
+
content: a.viewport.scrollWidth,
|
|
1810
|
+
viewport: a.viewport.offsetWidth,
|
|
1811
|
+
scrollbar: {
|
|
1812
|
+
size: d.current.clientWidth,
|
|
1813
|
+
paddingStart: Ie(l.paddingLeft),
|
|
1814
|
+
paddingEnd: Ie(l.paddingRight)
|
|
1815
|
+
}
|
|
1816
|
+
});
|
|
1817
|
+
}
|
|
1818
|
+
});
|
|
1819
|
+
}), Na = s.forwardRef((e, t) => {
|
|
1820
|
+
const { sizes: r, onSizesChange: n, ...o } = e, a = V(Y, e.__scopeScrollArea), [l, i] = s.useState(), d = s.useRef(null), u = B(t, d, a.onScrollbarYChange);
|
|
1821
|
+
return s.useEffect(() => {
|
|
1822
|
+
d.current && i(getComputedStyle(d.current));
|
|
1823
|
+
}, [d]), /* @__PURE__ */ c(en, {
|
|
1824
|
+
"data-orientation": "vertical",
|
|
1825
|
+
...o,
|
|
1826
|
+
ref: u,
|
|
1827
|
+
sizes: r,
|
|
1828
|
+
style: {
|
|
1829
|
+
top: 0,
|
|
1830
|
+
right: a.dir === "ltr" ? 0 : void 0,
|
|
1831
|
+
left: a.dir === "rtl" ? 0 : void 0,
|
|
1832
|
+
bottom: "var(--radix-scroll-area-corner-height)",
|
|
1833
|
+
"--radix-scroll-area-thumb-height": $e(r) + "px",
|
|
1834
|
+
...e.style
|
|
1835
|
+
},
|
|
1836
|
+
onThumbPointerDown: (f) => e.onThumbPointerDown(f.y),
|
|
1837
|
+
onDragScroll: (f) => e.onDragScroll(f.y),
|
|
1838
|
+
onWheelScroll: (f, m) => {
|
|
1839
|
+
if (a.viewport) {
|
|
1840
|
+
const p = a.viewport.scrollTop + f.deltaY;
|
|
1841
|
+
e.onWheelScroll(p), an(p, m) && f.preventDefault();
|
|
1842
|
+
}
|
|
1843
|
+
},
|
|
1844
|
+
onResize: () => {
|
|
1845
|
+
d.current && a.viewport && l && n({
|
|
1846
|
+
content: a.viewport.scrollHeight,
|
|
1847
|
+
viewport: a.viewport.offsetHeight,
|
|
1848
|
+
scrollbar: {
|
|
1849
|
+
size: d.current.clientHeight,
|
|
1850
|
+
paddingStart: Ie(l.paddingTop),
|
|
1851
|
+
paddingEnd: Ie(l.paddingBottom)
|
|
1852
|
+
}
|
|
1853
|
+
});
|
|
1854
|
+
}
|
|
1855
|
+
});
|
|
1856
|
+
}), [Ra, Jr] = Xr(Y), en = s.forwardRef((e, t) => {
|
|
1857
|
+
const { __scopeScrollArea: r, sizes: n, hasThumb: o, onThumbChange: a, onThumbPointerUp: l, onThumbPointerDown: i, onThumbPositionChange: d, onDragScroll: u, onWheelScroll: f, onResize: m, ...p } = e, g = V(Y, r), [C, h] = s.useState(null), v = B(t, (O) => h(O)), E = s.useRef(null), R = s.useRef(""), w = g.viewport, S = n.content - n.viewport, D = U(f), _ = U(d), T = je(m, 10);
|
|
1858
|
+
function k(O) {
|
|
1859
|
+
E.current && u({
|
|
1860
|
+
x: O.clientX - E.current.left,
|
|
1861
|
+
y: O.clientY - E.current.top
|
|
1862
|
+
});
|
|
1863
|
+
}
|
|
1864
|
+
return s.useEffect(() => {
|
|
1865
|
+
const O = (z) => {
|
|
1866
|
+
const q = z.target;
|
|
1867
|
+
C?.contains(q) && D(z, S);
|
|
1868
|
+
};
|
|
1869
|
+
return document.addEventListener("wheel", O, { passive: !1 }), () => document.removeEventListener("wheel", O, { passive: !1 });
|
|
1870
|
+
}, [
|
|
1871
|
+
w,
|
|
1872
|
+
C,
|
|
1873
|
+
S,
|
|
1874
|
+
D
|
|
1875
|
+
]), s.useEffect(_, [n, _]), me(C, T), me(g.content, T), /* @__PURE__ */ c(Ra, {
|
|
1876
|
+
scope: r,
|
|
1877
|
+
scrollbar: C,
|
|
1878
|
+
hasThumb: o,
|
|
1879
|
+
onThumbChange: U(a),
|
|
1880
|
+
onThumbPointerUp: U(l),
|
|
1881
|
+
onThumbPositionChange: _,
|
|
1882
|
+
onThumbPointerDown: U(i),
|
|
1883
|
+
children: /* @__PURE__ */ c(I.div, {
|
|
1884
|
+
...p,
|
|
1885
|
+
ref: v,
|
|
1886
|
+
style: {
|
|
1887
|
+
position: "absolute",
|
|
1888
|
+
...p.style
|
|
1889
|
+
},
|
|
1890
|
+
onPointerDown: F(e.onPointerDown, (O) => {
|
|
1891
|
+
O.button === 0 && (O.target.setPointerCapture(O.pointerId), E.current = C.getBoundingClientRect(), R.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", g.viewport && (g.viewport.style.scrollBehavior = "auto"), k(O));
|
|
1892
|
+
}),
|
|
1893
|
+
onPointerMove: F(e.onPointerMove, k),
|
|
1894
|
+
onPointerUp: F(e.onPointerUp, (O) => {
|
|
1895
|
+
const z = O.target;
|
|
1896
|
+
z.hasPointerCapture(O.pointerId) && z.releasePointerCapture(O.pointerId), document.body.style.webkitUserSelect = R.current, g.viewport && (g.viewport.style.scrollBehavior = ""), E.current = null;
|
|
1897
|
+
})
|
|
1898
|
+
})
|
|
1899
|
+
});
|
|
1900
|
+
}), Me = "ScrollAreaThumb", tn = s.forwardRef((e, t) => {
|
|
1901
|
+
const { forceMount: r, ...n } = e, o = Jr(Me, e.__scopeScrollArea);
|
|
1902
|
+
return /* @__PURE__ */ c(Q, {
|
|
1903
|
+
present: r || o.hasThumb,
|
|
1904
|
+
children: /* @__PURE__ */ c(Pa, {
|
|
1905
|
+
ref: t,
|
|
1906
|
+
...n
|
|
1907
|
+
})
|
|
1908
|
+
});
|
|
1909
|
+
}), Pa = s.forwardRef((e, t) => {
|
|
1910
|
+
const { __scopeScrollArea: r, style: n, ...o } = e, a = V(Me, r), l = Jr(Me, r), { onThumbPositionChange: i } = l, d = B(t, (m) => l.onThumbChange(m)), u = s.useRef(void 0), f = je(() => {
|
|
1911
|
+
u.current && (u.current(), u.current = void 0);
|
|
1912
|
+
}, 100);
|
|
1913
|
+
return s.useEffect(() => {
|
|
1914
|
+
const m = a.viewport;
|
|
1915
|
+
if (m) {
|
|
1916
|
+
const p = () => {
|
|
1917
|
+
f(), u.current || (u.current = Oa(m, i), i());
|
|
1918
|
+
};
|
|
1919
|
+
return i(), m.addEventListener("scroll", p), () => m.removeEventListener("scroll", p);
|
|
1920
|
+
}
|
|
1921
|
+
}, [
|
|
1922
|
+
a.viewport,
|
|
1923
|
+
f,
|
|
1924
|
+
i
|
|
1925
|
+
]), /* @__PURE__ */ c(I.div, {
|
|
1926
|
+
"data-state": l.hasThumb ? "visible" : "hidden",
|
|
1927
|
+
...o,
|
|
1928
|
+
ref: d,
|
|
1929
|
+
style: {
|
|
1930
|
+
width: "var(--radix-scroll-area-thumb-width)",
|
|
1931
|
+
height: "var(--radix-scroll-area-thumb-height)",
|
|
1932
|
+
...n
|
|
1933
|
+
},
|
|
1934
|
+
onPointerDownCapture: F(e.onPointerDownCapture, (m) => {
|
|
1935
|
+
const p = m.target.getBoundingClientRect(), g = m.clientX - p.left, C = m.clientY - p.top;
|
|
1936
|
+
l.onThumbPointerDown({
|
|
1937
|
+
x: g,
|
|
1938
|
+
y: C
|
|
1939
|
+
});
|
|
1940
|
+
}),
|
|
1941
|
+
onPointerUp: F(e.onPointerUp, l.onThumbPointerUp)
|
|
1942
|
+
});
|
|
1943
|
+
});
|
|
1944
|
+
tn.displayName = Me;
|
|
1945
|
+
var pt = "ScrollAreaCorner", rn = s.forwardRef((e, t) => {
|
|
1946
|
+
const r = V(pt, e.__scopeScrollArea), n = !!(r.scrollbarX && r.scrollbarY);
|
|
1947
|
+
return r.type !== "scroll" && n ? /* @__PURE__ */ c(Aa, {
|
|
1948
|
+
...e,
|
|
1949
|
+
ref: t
|
|
1950
|
+
}) : null;
|
|
1951
|
+
});
|
|
1952
|
+
rn.displayName = pt;
|
|
1953
|
+
var Aa = s.forwardRef((e, t) => {
|
|
1954
|
+
const { __scopeScrollArea: r, ...n } = e, o = V(pt, r), [a, l] = s.useState(0), [i, d] = s.useState(0), u = !!(a && i);
|
|
1955
|
+
return me(o.scrollbarX, () => {
|
|
1956
|
+
const f = o.scrollbarX?.offsetHeight || 0;
|
|
1957
|
+
o.onCornerHeightChange(f), d(f);
|
|
1958
|
+
}), me(o.scrollbarY, () => {
|
|
1959
|
+
const f = o.scrollbarY?.offsetWidth || 0;
|
|
1960
|
+
o.onCornerWidthChange(f), l(f);
|
|
1961
|
+
}), u ? /* @__PURE__ */ c(I.div, {
|
|
1962
|
+
...n,
|
|
1963
|
+
ref: t,
|
|
1964
|
+
style: {
|
|
1965
|
+
width: a,
|
|
1966
|
+
height: i,
|
|
1967
|
+
position: "absolute",
|
|
1968
|
+
right: o.dir === "ltr" ? 0 : void 0,
|
|
1969
|
+
left: o.dir === "rtl" ? 0 : void 0,
|
|
1970
|
+
bottom: 0,
|
|
1971
|
+
...e.style
|
|
1972
|
+
}
|
|
1973
|
+
}) : null;
|
|
1974
|
+
});
|
|
1975
|
+
function Ie(e) {
|
|
1976
|
+
return e ? parseInt(e, 10) : 0;
|
|
1977
|
+
}
|
|
1978
|
+
function nn(e, t) {
|
|
1979
|
+
const r = e / t;
|
|
1980
|
+
return isNaN(r) ? 0 : r;
|
|
1981
|
+
}
|
|
1982
|
+
function $e(e) {
|
|
1983
|
+
const t = nn(e.viewport, e.content), r = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, n = (e.scrollbar.size - r) * t;
|
|
1984
|
+
return Math.max(n, 18);
|
|
1985
|
+
}
|
|
1986
|
+
function Ta(e, t, r, n = "ltr") {
|
|
1987
|
+
const o = $e(r), a = o / 2, l = t || a, i = o - l, d = r.scrollbar.paddingStart + l, u = r.scrollbar.size - r.scrollbar.paddingEnd - i, f = r.content - r.viewport, m = n === "ltr" ? [0, f] : [f * -1, 0];
|
|
1988
|
+
return on([d, u], m)(e);
|
|
1989
|
+
}
|
|
1990
|
+
function Bt(e, t, r = "ltr") {
|
|
1991
|
+
const n = $e(t), o = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, a = t.scrollbar.size - o, l = t.content - t.viewport, i = a - n, d = xa(e, r === "ltr" ? [0, l] : [l * -1, 0]);
|
|
1992
|
+
return on([0, l], [0, i])(d);
|
|
1993
|
+
}
|
|
1994
|
+
function on(e, t) {
|
|
1995
|
+
return (r) => {
|
|
1996
|
+
if (e[0] === e[1] || t[0] === t[1]) return t[0];
|
|
1997
|
+
const n = (t[1] - t[0]) / (e[1] - e[0]);
|
|
1998
|
+
return t[0] + n * (r - e[0]);
|
|
1999
|
+
};
|
|
2000
|
+
}
|
|
2001
|
+
function an(e, t) {
|
|
2002
|
+
return e > 0 && e < t;
|
|
2003
|
+
}
|
|
2004
|
+
var Oa = (e, t = () => {
|
|
2005
|
+
}) => {
|
|
2006
|
+
let r = {
|
|
2007
|
+
left: e.scrollLeft,
|
|
2008
|
+
top: e.scrollTop
|
|
2009
|
+
}, n = 0;
|
|
2010
|
+
return (function o() {
|
|
2011
|
+
const a = {
|
|
2012
|
+
left: e.scrollLeft,
|
|
2013
|
+
top: e.scrollTop
|
|
2014
|
+
}, l = r.left !== a.left, i = r.top !== a.top;
|
|
2015
|
+
(l || i) && t(), r = a, n = window.requestAnimationFrame(o);
|
|
2016
|
+
})(), () => window.cancelAnimationFrame(n);
|
|
2017
|
+
};
|
|
2018
|
+
function je(e, t) {
|
|
2019
|
+
const r = U(e), n = s.useRef(0);
|
|
2020
|
+
return s.useEffect(() => () => window.clearTimeout(n.current), []), s.useCallback(() => {
|
|
2021
|
+
window.clearTimeout(n.current), n.current = window.setTimeout(r, t);
|
|
2022
|
+
}, [r, t]);
|
|
2023
|
+
}
|
|
2024
|
+
function me(e, t) {
|
|
2025
|
+
const r = U(t);
|
|
2026
|
+
ie(() => {
|
|
2027
|
+
let n = 0;
|
|
2028
|
+
if (e) {
|
|
2029
|
+
const o = new ResizeObserver(() => {
|
|
2030
|
+
cancelAnimationFrame(n), n = window.requestAnimationFrame(r);
|
|
2031
|
+
});
|
|
2032
|
+
return o.observe(e), () => {
|
|
2033
|
+
window.cancelAnimationFrame(n), o.unobserve(e);
|
|
2034
|
+
};
|
|
2035
|
+
}
|
|
2036
|
+
}, [e, r]);
|
|
2037
|
+
}
|
|
2038
|
+
var Da = Yr, _a = Kr, Ma = rn, Ia = "Separator", $t = "horizontal", za = ["horizontal", "vertical"], sn = s.forwardRef((e, t) => {
|
|
2039
|
+
const { decorative: r, orientation: n = $t, ...o } = e, a = La(n) ? n : $t, i = r ? { role: "none" } : {
|
|
2040
|
+
"aria-orientation": a === "vertical" ? a : void 0,
|
|
2041
|
+
role: "separator"
|
|
2042
|
+
};
|
|
2043
|
+
return /* @__PURE__ */ c(I.div, {
|
|
2044
|
+
"data-orientation": a,
|
|
2045
|
+
...i,
|
|
2046
|
+
...o,
|
|
2047
|
+
ref: t
|
|
2048
|
+
});
|
|
2049
|
+
});
|
|
2050
|
+
sn.displayName = Ia;
|
|
2051
|
+
function La(e) {
|
|
2052
|
+
return za.includes(e);
|
|
2053
|
+
}
|
|
2054
|
+
var Fa = sn, Wa = (e, t) => {
|
|
125
2055
|
const r = new Array(e.length + t.length);
|
|
126
|
-
for (let
|
|
127
|
-
for (let
|
|
2056
|
+
for (let n = 0; n < e.length; n++) r[n] = e[n];
|
|
2057
|
+
for (let n = 0; n < t.length; n++) r[e.length + n] = t[n];
|
|
128
2058
|
return r;
|
|
129
|
-
},
|
|
2059
|
+
}, Ba = (e, t) => ({
|
|
130
2060
|
classGroupId: e,
|
|
131
2061
|
validator: t
|
|
132
|
-
}),
|
|
2062
|
+
}), ln = (e = /* @__PURE__ */ new Map(), t = null, r) => ({
|
|
133
2063
|
nextPart: e,
|
|
134
2064
|
validators: t,
|
|
135
2065
|
classGroupId: r
|
|
136
|
-
}),
|
|
137
|
-
const t =
|
|
2066
|
+
}), ze = "-", jt = [], $a = "arbitrary..", ja = (e) => {
|
|
2067
|
+
const t = Va(e), { conflictingClassGroups: r, conflictingClassGroupModifiers: n } = e;
|
|
138
2068
|
return {
|
|
139
|
-
getClassGroupId: (
|
|
140
|
-
if (
|
|
141
|
-
const
|
|
142
|
-
return
|
|
2069
|
+
getClassGroupId: (l) => {
|
|
2070
|
+
if (l.startsWith("[") && l.endsWith("]")) return Ua(l);
|
|
2071
|
+
const i = l.split(ze);
|
|
2072
|
+
return cn(i, i[0] === "" && i.length > 1 ? 1 : 0, t);
|
|
143
2073
|
},
|
|
144
|
-
getConflictingClassGroupIds: (
|
|
145
|
-
if (
|
|
146
|
-
const
|
|
147
|
-
return
|
|
2074
|
+
getConflictingClassGroupIds: (l, i) => {
|
|
2075
|
+
if (i) {
|
|
2076
|
+
const d = n[l], u = r[l];
|
|
2077
|
+
return d ? u ? Wa(u, d) : d : u || jt;
|
|
148
2078
|
}
|
|
149
|
-
return r[
|
|
2079
|
+
return r[l] || jt;
|
|
150
2080
|
}
|
|
151
2081
|
};
|
|
152
|
-
},
|
|
2082
|
+
}, cn = (e, t, r) => {
|
|
153
2083
|
if (e.length - t === 0) return r.classGroupId;
|
|
154
|
-
const
|
|
155
|
-
if (
|
|
156
|
-
const
|
|
157
|
-
if (
|
|
2084
|
+
const n = e[t], o = r.nextPart.get(n);
|
|
2085
|
+
if (o) {
|
|
2086
|
+
const d = cn(e, t + 1, o);
|
|
2087
|
+
if (d) return d;
|
|
158
2088
|
}
|
|
159
|
-
const
|
|
160
|
-
if (
|
|
161
|
-
const
|
|
162
|
-
for (let
|
|
163
|
-
const
|
|
164
|
-
if (
|
|
2089
|
+
const a = r.validators;
|
|
2090
|
+
if (a === null) return;
|
|
2091
|
+
const l = t === 0 ? e.join(ze) : e.slice(t).join(ze), i = a.length;
|
|
2092
|
+
for (let d = 0; d < i; d++) {
|
|
2093
|
+
const u = a[d];
|
|
2094
|
+
if (u.validator(l)) return u.classGroupId;
|
|
165
2095
|
}
|
|
166
|
-
},
|
|
167
|
-
const t = e.slice(1, -1), r = t.indexOf(":"),
|
|
168
|
-
return
|
|
169
|
-
})(),
|
|
2096
|
+
}, Ua = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
2097
|
+
const t = e.slice(1, -1), r = t.indexOf(":"), n = t.slice(0, r);
|
|
2098
|
+
return n ? $a + n : void 0;
|
|
2099
|
+
})(), Va = (e) => {
|
|
170
2100
|
const { theme: t, classGroups: r } = e;
|
|
171
|
-
return
|
|
172
|
-
},
|
|
173
|
-
const r =
|
|
174
|
-
for (const
|
|
175
|
-
const
|
|
176
|
-
|
|
2101
|
+
return Ha(r, t);
|
|
2102
|
+
}, Ha = (e, t) => {
|
|
2103
|
+
const r = ln();
|
|
2104
|
+
for (const n in e) {
|
|
2105
|
+
const o = e[n];
|
|
2106
|
+
ht(o, r, n, t);
|
|
177
2107
|
}
|
|
178
2108
|
return r;
|
|
179
|
-
},
|
|
180
|
-
const
|
|
181
|
-
for (let
|
|
182
|
-
const
|
|
183
|
-
|
|
2109
|
+
}, ht = (e, t, r, n) => {
|
|
2110
|
+
const o = e.length;
|
|
2111
|
+
for (let a = 0; a < o; a++) {
|
|
2112
|
+
const l = e[a];
|
|
2113
|
+
Ga(l, t, r, n);
|
|
184
2114
|
}
|
|
185
|
-
},
|
|
2115
|
+
}, Ga = (e, t, r, n) => {
|
|
186
2116
|
if (typeof e == "string") {
|
|
187
|
-
|
|
2117
|
+
Xa(e, t, r);
|
|
188
2118
|
return;
|
|
189
2119
|
}
|
|
190
2120
|
if (typeof e == "function") {
|
|
191
|
-
|
|
2121
|
+
Ya(e, t, r, n);
|
|
192
2122
|
return;
|
|
193
2123
|
}
|
|
194
|
-
|
|
195
|
-
},
|
|
196
|
-
const
|
|
197
|
-
|
|
198
|
-
},
|
|
199
|
-
if (
|
|
200
|
-
|
|
2124
|
+
qa(e, t, r, n);
|
|
2125
|
+
}, Xa = (e, t, r) => {
|
|
2126
|
+
const n = e === "" ? t : dn(t, e);
|
|
2127
|
+
n.classGroupId = r;
|
|
2128
|
+
}, Ya = (e, t, r, n) => {
|
|
2129
|
+
if (Ka(e)) {
|
|
2130
|
+
ht(e(n), t, r, n);
|
|
201
2131
|
return;
|
|
202
2132
|
}
|
|
203
|
-
t.validators === null && (t.validators = []), t.validators.push(
|
|
204
|
-
},
|
|
205
|
-
const
|
|
206
|
-
for (let
|
|
207
|
-
const [
|
|
208
|
-
|
|
2133
|
+
t.validators === null && (t.validators = []), t.validators.push(Ba(r, e));
|
|
2134
|
+
}, qa = (e, t, r, n) => {
|
|
2135
|
+
const o = Object.entries(e), a = o.length;
|
|
2136
|
+
for (let l = 0; l < a; l++) {
|
|
2137
|
+
const [i, d] = o[l];
|
|
2138
|
+
ht(d, dn(t, i), r, n);
|
|
209
2139
|
}
|
|
210
|
-
},
|
|
2140
|
+
}, dn = (e, t) => {
|
|
211
2141
|
let r = e;
|
|
212
|
-
const
|
|
213
|
-
for (let
|
|
214
|
-
const
|
|
215
|
-
let
|
|
216
|
-
|
|
2142
|
+
const n = t.split(ze), o = n.length;
|
|
2143
|
+
for (let a = 0; a < o; a++) {
|
|
2144
|
+
const l = n[a];
|
|
2145
|
+
let i = r.nextPart.get(l);
|
|
2146
|
+
i || (i = ln(), r.nextPart.set(l, i)), r = i;
|
|
217
2147
|
}
|
|
218
2148
|
return r;
|
|
219
|
-
},
|
|
2149
|
+
}, Ka = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, Za = (e) => {
|
|
220
2150
|
if (e < 1) return {
|
|
221
2151
|
get: () => {
|
|
222
2152
|
},
|
|
223
2153
|
set: () => {
|
|
224
2154
|
}
|
|
225
2155
|
};
|
|
226
|
-
let t = 0, r = /* @__PURE__ */ Object.create(null),
|
|
227
|
-
const
|
|
228
|
-
r[
|
|
2156
|
+
let t = 0, r = /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null);
|
|
2157
|
+
const o = (a, l) => {
|
|
2158
|
+
r[a] = l, t++, t > e && (t = 0, n = r, r = /* @__PURE__ */ Object.create(null));
|
|
229
2159
|
};
|
|
230
2160
|
return {
|
|
231
|
-
get(
|
|
232
|
-
let
|
|
233
|
-
if (
|
|
234
|
-
if ((
|
|
235
|
-
return
|
|
2161
|
+
get(a) {
|
|
2162
|
+
let l = r[a];
|
|
2163
|
+
if (l !== void 0) return l;
|
|
2164
|
+
if ((l = n[a]) !== void 0)
|
|
2165
|
+
return o(a, l), l;
|
|
236
2166
|
},
|
|
237
|
-
set(
|
|
238
|
-
|
|
2167
|
+
set(a, l) {
|
|
2168
|
+
a in r ? r[a] = l : o(a, l);
|
|
239
2169
|
}
|
|
240
2170
|
};
|
|
241
|
-
},
|
|
2171
|
+
}, at = "!", Ut = ":", Qa = [], Vt = (e, t, r, n, o) => ({
|
|
242
2172
|
modifiers: e,
|
|
243
2173
|
hasImportantModifier: t,
|
|
244
2174
|
baseClassName: r,
|
|
245
|
-
maybePostfixModifierPosition:
|
|
246
|
-
isExternal:
|
|
247
|
-
}),
|
|
2175
|
+
maybePostfixModifierPosition: n,
|
|
2176
|
+
isExternal: o
|
|
2177
|
+
}), Ja = (e) => {
|
|
248
2178
|
const { prefix: t, experimentalParseClassName: r } = e;
|
|
249
|
-
let
|
|
250
|
-
const
|
|
251
|
-
let
|
|
252
|
-
const
|
|
253
|
-
for (let
|
|
254
|
-
const
|
|
255
|
-
if (
|
|
256
|
-
if (
|
|
257
|
-
|
|
2179
|
+
let n = (o) => {
|
|
2180
|
+
const a = [];
|
|
2181
|
+
let l = 0, i = 0, d = 0, u;
|
|
2182
|
+
const f = o.length;
|
|
2183
|
+
for (let h = 0; h < f; h++) {
|
|
2184
|
+
const v = o[h];
|
|
2185
|
+
if (l === 0 && i === 0) {
|
|
2186
|
+
if (v === Ut) {
|
|
2187
|
+
a.push(o.slice(d, h)), d = h + 1;
|
|
258
2188
|
continue;
|
|
259
2189
|
}
|
|
260
|
-
if (
|
|
261
|
-
|
|
2190
|
+
if (v === "/") {
|
|
2191
|
+
u = h;
|
|
262
2192
|
continue;
|
|
263
2193
|
}
|
|
264
2194
|
}
|
|
265
|
-
|
|
2195
|
+
v === "[" ? l++ : v === "]" ? l-- : v === "(" ? i++ : v === ")" && i--;
|
|
266
2196
|
}
|
|
267
|
-
const
|
|
268
|
-
let
|
|
269
|
-
|
|
270
|
-
const
|
|
271
|
-
return
|
|
2197
|
+
const m = a.length === 0 ? o : o.slice(d);
|
|
2198
|
+
let p = m, g = !1;
|
|
2199
|
+
m.endsWith(at) ? (p = m.slice(0, -1), g = !0) : m.startsWith(at) && (p = m.slice(1), g = !0);
|
|
2200
|
+
const C = u && u > d ? u - d : void 0;
|
|
2201
|
+
return Vt(a, g, p, C);
|
|
272
2202
|
};
|
|
273
2203
|
if (t) {
|
|
274
|
-
const
|
|
275
|
-
|
|
2204
|
+
const o = t + Ut, a = n;
|
|
2205
|
+
n = (l) => l.startsWith(o) ? a(l.slice(o.length)) : Vt(Qa, !1, l, void 0, !0);
|
|
276
2206
|
}
|
|
277
2207
|
if (r) {
|
|
278
|
-
const
|
|
279
|
-
|
|
280
|
-
className:
|
|
281
|
-
parseClassName:
|
|
2208
|
+
const o = n;
|
|
2209
|
+
n = (a) => r({
|
|
2210
|
+
className: a,
|
|
2211
|
+
parseClassName: o
|
|
282
2212
|
});
|
|
283
2213
|
}
|
|
284
|
-
return
|
|
285
|
-
},
|
|
2214
|
+
return n;
|
|
2215
|
+
}, ei = (e) => {
|
|
286
2216
|
const t = /* @__PURE__ */ new Map();
|
|
287
|
-
return e.orderSensitiveModifiers.forEach((r,
|
|
288
|
-
t.set(r, 1e6 +
|
|
2217
|
+
return e.orderSensitiveModifiers.forEach((r, n) => {
|
|
2218
|
+
t.set(r, 1e6 + n);
|
|
289
2219
|
}), (r) => {
|
|
290
|
-
const
|
|
291
|
-
let
|
|
292
|
-
for (let
|
|
293
|
-
const
|
|
294
|
-
|
|
2220
|
+
const n = [];
|
|
2221
|
+
let o = [];
|
|
2222
|
+
for (let a = 0; a < r.length; a++) {
|
|
2223
|
+
const l = r[a], i = l[0] === "[", d = t.has(l);
|
|
2224
|
+
i || d ? (o.length > 0 && (o.sort(), n.push(...o), o = []), n.push(l)) : o.push(l);
|
|
295
2225
|
}
|
|
296
|
-
return
|
|
2226
|
+
return o.length > 0 && (o.sort(), n.push(...o)), n;
|
|
297
2227
|
};
|
|
298
|
-
},
|
|
299
|
-
cache:
|
|
300
|
-
parseClassName:
|
|
301
|
-
sortModifiers:
|
|
302
|
-
...
|
|
303
|
-
}),
|
|
304
|
-
const { parseClassName: r, getClassGroupId:
|
|
305
|
-
let
|
|
306
|
-
for (let
|
|
307
|
-
const
|
|
308
|
-
if (
|
|
309
|
-
|
|
2228
|
+
}, ti = (e) => ({
|
|
2229
|
+
cache: Za(e.cacheSize),
|
|
2230
|
+
parseClassName: Ja(e),
|
|
2231
|
+
sortModifiers: ei(e),
|
|
2232
|
+
...ja(e)
|
|
2233
|
+
}), ri = /\s+/, ni = (e, t) => {
|
|
2234
|
+
const { parseClassName: r, getClassGroupId: n, getConflictingClassGroupIds: o, sortModifiers: a } = t, l = [], i = e.trim().split(ri);
|
|
2235
|
+
let d = "";
|
|
2236
|
+
for (let u = i.length - 1; u >= 0; u -= 1) {
|
|
2237
|
+
const f = i[u], { isExternal: m, modifiers: p, hasImportantModifier: g, baseClassName: C, maybePostfixModifierPosition: h } = r(f);
|
|
2238
|
+
if (m) {
|
|
2239
|
+
d = f + (d.length > 0 ? " " + d : d);
|
|
310
2240
|
continue;
|
|
311
2241
|
}
|
|
312
|
-
let
|
|
313
|
-
if (!
|
|
314
|
-
if (!
|
|
315
|
-
|
|
2242
|
+
let v = !!h, E = n(v ? C.substring(0, h) : C);
|
|
2243
|
+
if (!E) {
|
|
2244
|
+
if (!v) {
|
|
2245
|
+
d = f + (d.length > 0 ? " " + d : d);
|
|
316
2246
|
continue;
|
|
317
2247
|
}
|
|
318
|
-
if (
|
|
319
|
-
|
|
2248
|
+
if (E = n(C), !E) {
|
|
2249
|
+
d = f + (d.length > 0 ? " " + d : d);
|
|
320
2250
|
continue;
|
|
321
2251
|
}
|
|
322
|
-
|
|
2252
|
+
v = !1;
|
|
323
2253
|
}
|
|
324
|
-
const
|
|
325
|
-
if (
|
|
326
|
-
|
|
327
|
-
const
|
|
328
|
-
for (let
|
|
329
|
-
const
|
|
330
|
-
|
|
2254
|
+
const R = p.length === 0 ? "" : p.length === 1 ? p[0] : a(p).join(":"), w = g ? R + at : R, S = w + E;
|
|
2255
|
+
if (l.indexOf(S) > -1) continue;
|
|
2256
|
+
l.push(S);
|
|
2257
|
+
const D = o(E, v);
|
|
2258
|
+
for (let _ = 0; _ < D.length; ++_) {
|
|
2259
|
+
const T = D[_];
|
|
2260
|
+
l.push(w + T);
|
|
331
2261
|
}
|
|
332
|
-
|
|
2262
|
+
d = f + (d.length > 0 ? " " + d : d);
|
|
333
2263
|
}
|
|
334
|
-
return
|
|
335
|
-
},
|
|
336
|
-
let t = 0, r,
|
|
337
|
-
for (; t < e.length; ) (r = e[t++]) && (
|
|
338
|
-
return
|
|
339
|
-
},
|
|
2264
|
+
return d;
|
|
2265
|
+
}, oi = (...e) => {
|
|
2266
|
+
let t = 0, r, n, o = "";
|
|
2267
|
+
for (; t < e.length; ) (r = e[t++]) && (n = un(r)) && (o && (o += " "), o += n);
|
|
2268
|
+
return o;
|
|
2269
|
+
}, un = (e) => {
|
|
340
2270
|
if (typeof e == "string") return e;
|
|
341
2271
|
let t, r = "";
|
|
342
|
-
for (let
|
|
2272
|
+
for (let n = 0; n < e.length; n++) e[n] && (t = un(e[n])) && (r && (r += " "), r += t);
|
|
343
2273
|
return r;
|
|
344
|
-
},
|
|
345
|
-
let r,
|
|
346
|
-
const
|
|
347
|
-
const
|
|
348
|
-
if (
|
|
349
|
-
const
|
|
350
|
-
return
|
|
2274
|
+
}, ai = (e, ...t) => {
|
|
2275
|
+
let r, n, o, a;
|
|
2276
|
+
const l = (d) => (r = ti(t.reduce((u, f) => f(u), e())), n = r.cache.get, o = r.cache.set, a = i, i(d)), i = (d) => {
|
|
2277
|
+
const u = n(d);
|
|
2278
|
+
if (u) return u;
|
|
2279
|
+
const f = ni(d, r);
|
|
2280
|
+
return o(d, f), f;
|
|
351
2281
|
};
|
|
352
|
-
return
|
|
353
|
-
},
|
|
354
|
-
const t = (r) => r[e] ||
|
|
2282
|
+
return a = l, (...d) => a(oi(...d));
|
|
2283
|
+
}, ii = [], M = (e) => {
|
|
2284
|
+
const t = (r) => r[e] || ii;
|
|
355
2285
|
return t.isThemeGetter = !0, t;
|
|
356
|
-
},
|
|
357
|
-
const
|
|
358
|
-
return
|
|
359
|
-
},
|
|
360
|
-
const
|
|
361
|
-
return
|
|
362
|
-
},
|
|
363
|
-
const e =
|
|
2286
|
+
}, fn = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, mn = /^\((?:(\w[\w-]*):)?(.+)\)$/i, si = /^\d+\/\d+$/, li = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, ci = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, di = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, ui = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, fi = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, fe = (e) => si.test(e), A = (e) => !!e && !Number.isNaN(Number(e)), ee = (e) => !!e && Number.isInteger(Number(e)), et = (e) => e.endsWith("%") && A(e.slice(0, -1)), Z = (e) => li.test(e), mi = () => !0, pi = (e) => ci.test(e) && !di.test(e), pn = () => !1, hi = (e) => ui.test(e), vi = (e) => fi.test(e), gi = (e) => !b(e) && !y(e), bi = (e) => pe(e, gn, pn), b = (e) => fn.test(e), ae = (e) => pe(e, bn, pi), tt = (e) => pe(e, Ci, A), Ht = (e) => pe(e, hn, pn), yi = (e) => pe(e, vn, vi), Pe = (e) => pe(e, yn, hi), y = (e) => mn.test(e), ve = (e) => he(e, bn), xi = (e) => he(e, ki), Gt = (e) => he(e, hn), wi = (e) => he(e, gn), Si = (e) => he(e, vn), Ae = (e) => he(e, yn, !0), pe = (e, t, r) => {
|
|
2287
|
+
const n = fn.exec(e);
|
|
2288
|
+
return n ? n[1] ? t(n[1]) : r(n[2]) : !1;
|
|
2289
|
+
}, he = (e, t, r = !1) => {
|
|
2290
|
+
const n = mn.exec(e);
|
|
2291
|
+
return n ? n[1] ? t(n[1]) : r : !1;
|
|
2292
|
+
}, hn = (e) => e === "position" || e === "percentage", vn = (e) => e === "image" || e === "url", gn = (e) => e === "length" || e === "size" || e === "bg-size", bn = (e) => e === "length", Ci = (e) => e === "number", ki = (e) => e === "family-name", yn = (e) => e === "shadow", Ei = () => {
|
|
2293
|
+
const e = M("color"), t = M("font"), r = M("text"), n = M("font-weight"), o = M("tracking"), a = M("leading"), l = M("breakpoint"), i = M("container"), d = M("spacing"), u = M("radius"), f = M("shadow"), m = M("inset-shadow"), p = M("text-shadow"), g = M("drop-shadow"), C = M("blur"), h = M("perspective"), v = M("aspect"), E = M("ease"), R = M("animate"), w = () => [
|
|
364
2294
|
"auto",
|
|
365
2295
|
"avoid",
|
|
366
2296
|
"all",
|
|
@@ -369,7 +2299,7 @@ var Ye = (e, t) => {
|
|
|
369
2299
|
"left",
|
|
370
2300
|
"right",
|
|
371
2301
|
"column"
|
|
372
|
-
],
|
|
2302
|
+
], S = () => [
|
|
373
2303
|
"center",
|
|
374
2304
|
"top",
|
|
375
2305
|
"bottom",
|
|
@@ -383,59 +2313,59 @@ var Ye = (e, t) => {
|
|
|
383
2313
|
"right-bottom",
|
|
384
2314
|
"bottom-left",
|
|
385
2315
|
"left-bottom"
|
|
386
|
-
],
|
|
387
|
-
...
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
],
|
|
2316
|
+
], D = () => [
|
|
2317
|
+
...S(),
|
|
2318
|
+
y,
|
|
2319
|
+
b
|
|
2320
|
+
], _ = () => [
|
|
391
2321
|
"auto",
|
|
392
2322
|
"hidden",
|
|
393
2323
|
"clip",
|
|
394
2324
|
"visible",
|
|
395
2325
|
"scroll"
|
|
396
|
-
],
|
|
2326
|
+
], T = () => [
|
|
397
2327
|
"auto",
|
|
398
2328
|
"contain",
|
|
399
2329
|
"none"
|
|
400
|
-
],
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
],
|
|
405
|
-
|
|
2330
|
+
], k = () => [
|
|
2331
|
+
y,
|
|
2332
|
+
b,
|
|
2333
|
+
d
|
|
2334
|
+
], O = () => [
|
|
2335
|
+
fe,
|
|
406
2336
|
"full",
|
|
407
2337
|
"auto",
|
|
408
|
-
...
|
|
409
|
-
],
|
|
410
|
-
|
|
2338
|
+
...k()
|
|
2339
|
+
], z = () => [
|
|
2340
|
+
ee,
|
|
411
2341
|
"none",
|
|
412
2342
|
"subgrid",
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
],
|
|
2343
|
+
y,
|
|
2344
|
+
b
|
|
2345
|
+
], q = () => [
|
|
416
2346
|
"auto",
|
|
417
2347
|
{ span: [
|
|
418
2348
|
"full",
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
2349
|
+
ee,
|
|
2350
|
+
y,
|
|
2351
|
+
b
|
|
422
2352
|
] },
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
],
|
|
427
|
-
|
|
2353
|
+
ee,
|
|
2354
|
+
y,
|
|
2355
|
+
b
|
|
2356
|
+
], be = () => [
|
|
2357
|
+
ee,
|
|
428
2358
|
"auto",
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
],
|
|
2359
|
+
y,
|
|
2360
|
+
b
|
|
2361
|
+
], bt = () => [
|
|
432
2362
|
"auto",
|
|
433
2363
|
"min",
|
|
434
2364
|
"max",
|
|
435
2365
|
"fr",
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
],
|
|
2366
|
+
y,
|
|
2367
|
+
b
|
|
2368
|
+
], Ue = () => [
|
|
439
2369
|
"start",
|
|
440
2370
|
"end",
|
|
441
2371
|
"center",
|
|
@@ -446,15 +2376,15 @@ var Ye = (e, t) => {
|
|
|
446
2376
|
"baseline",
|
|
447
2377
|
"center-safe",
|
|
448
2378
|
"end-safe"
|
|
449
|
-
],
|
|
2379
|
+
], le = () => [
|
|
450
2380
|
"start",
|
|
451
2381
|
"end",
|
|
452
2382
|
"center",
|
|
453
2383
|
"stretch",
|
|
454
2384
|
"center-safe",
|
|
455
2385
|
"end-safe"
|
|
456
|
-
],
|
|
457
|
-
|
|
2386
|
+
], K = () => ["auto", ...k()], oe = () => [
|
|
2387
|
+
fe,
|
|
458
2388
|
"auto",
|
|
459
2389
|
"full",
|
|
460
2390
|
"dvw",
|
|
@@ -466,51 +2396,51 @@ var Ye = (e, t) => {
|
|
|
466
2396
|
"min",
|
|
467
2397
|
"max",
|
|
468
2398
|
"fit",
|
|
469
|
-
...
|
|
470
|
-
],
|
|
2399
|
+
...k()
|
|
2400
|
+
], N = () => [
|
|
471
2401
|
e,
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
],
|
|
475
|
-
...
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
{ position: [
|
|
479
|
-
],
|
|
2402
|
+
y,
|
|
2403
|
+
b
|
|
2404
|
+
], yt = () => [
|
|
2405
|
+
...S(),
|
|
2406
|
+
Gt,
|
|
2407
|
+
Ht,
|
|
2408
|
+
{ position: [y, b] }
|
|
2409
|
+
], xt = () => ["no-repeat", { repeat: [
|
|
480
2410
|
"",
|
|
481
2411
|
"x",
|
|
482
2412
|
"y",
|
|
483
2413
|
"space",
|
|
484
2414
|
"round"
|
|
485
|
-
] }],
|
|
2415
|
+
] }], wt = () => [
|
|
486
2416
|
"auto",
|
|
487
2417
|
"cover",
|
|
488
2418
|
"contain",
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
{ size: [
|
|
492
|
-
],
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
],
|
|
2419
|
+
wi,
|
|
2420
|
+
bi,
|
|
2421
|
+
{ size: [y, b] }
|
|
2422
|
+
], Ve = () => [
|
|
2423
|
+
et,
|
|
2424
|
+
ve,
|
|
2425
|
+
ae
|
|
2426
|
+
], W = () => [
|
|
497
2427
|
"",
|
|
498
2428
|
"none",
|
|
499
2429
|
"full",
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
],
|
|
2430
|
+
u,
|
|
2431
|
+
y,
|
|
2432
|
+
b
|
|
2433
|
+
], $ = () => [
|
|
504
2434
|
"",
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
],
|
|
2435
|
+
A,
|
|
2436
|
+
ve,
|
|
2437
|
+
ae
|
|
2438
|
+
], ye = () => [
|
|
509
2439
|
"solid",
|
|
510
2440
|
"dashed",
|
|
511
2441
|
"dotted",
|
|
512
2442
|
"double"
|
|
513
|
-
],
|
|
2443
|
+
], St = () => [
|
|
514
2444
|
"normal",
|
|
515
2445
|
"multiply",
|
|
516
2446
|
"screen",
|
|
@@ -527,35 +2457,35 @@ var Ye = (e, t) => {
|
|
|
527
2457
|
"saturation",
|
|
528
2458
|
"color",
|
|
529
2459
|
"luminosity"
|
|
530
|
-
],
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
],
|
|
2460
|
+
], L = () => [
|
|
2461
|
+
A,
|
|
2462
|
+
et,
|
|
2463
|
+
Gt,
|
|
2464
|
+
Ht
|
|
2465
|
+
], Ct = () => [
|
|
536
2466
|
"",
|
|
537
2467
|
"none",
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
],
|
|
2468
|
+
C,
|
|
2469
|
+
y,
|
|
2470
|
+
b
|
|
2471
|
+
], xe = () => [
|
|
542
2472
|
"none",
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
],
|
|
2473
|
+
A,
|
|
2474
|
+
y,
|
|
2475
|
+
b
|
|
2476
|
+
], we = () => [
|
|
547
2477
|
"none",
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
],
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
],
|
|
556
|
-
|
|
2478
|
+
A,
|
|
2479
|
+
y,
|
|
2480
|
+
b
|
|
2481
|
+
], He = () => [
|
|
2482
|
+
A,
|
|
2483
|
+
y,
|
|
2484
|
+
b
|
|
2485
|
+
], Se = () => [
|
|
2486
|
+
fe,
|
|
557
2487
|
"full",
|
|
558
|
-
...
|
|
2488
|
+
...k()
|
|
559
2489
|
];
|
|
560
2490
|
return {
|
|
561
2491
|
cacheSize: 500,
|
|
@@ -567,17 +2497,17 @@ var Ye = (e, t) => {
|
|
|
567
2497
|
"bounce"
|
|
568
2498
|
],
|
|
569
2499
|
aspect: ["video"],
|
|
570
|
-
blur: [
|
|
571
|
-
breakpoint: [
|
|
572
|
-
color: [
|
|
573
|
-
container: [
|
|
574
|
-
"drop-shadow": [
|
|
2500
|
+
blur: [Z],
|
|
2501
|
+
breakpoint: [Z],
|
|
2502
|
+
color: [mi],
|
|
2503
|
+
container: [Z],
|
|
2504
|
+
"drop-shadow": [Z],
|
|
575
2505
|
ease: [
|
|
576
2506
|
"in",
|
|
577
2507
|
"out",
|
|
578
2508
|
"in-out"
|
|
579
2509
|
],
|
|
580
|
-
font: [
|
|
2510
|
+
font: [gi],
|
|
581
2511
|
"font-weight": [
|
|
582
2512
|
"thin",
|
|
583
2513
|
"extralight",
|
|
@@ -589,7 +2519,7 @@ var Ye = (e, t) => {
|
|
|
589
2519
|
"extrabold",
|
|
590
2520
|
"black"
|
|
591
2521
|
],
|
|
592
|
-
"inset-shadow": [
|
|
2522
|
+
"inset-shadow": [Z],
|
|
593
2523
|
leading: [
|
|
594
2524
|
"none",
|
|
595
2525
|
"tight",
|
|
@@ -606,11 +2536,11 @@ var Ye = (e, t) => {
|
|
|
606
2536
|
"distant",
|
|
607
2537
|
"none"
|
|
608
2538
|
],
|
|
609
|
-
radius: [
|
|
610
|
-
shadow: [
|
|
611
|
-
spacing: ["px",
|
|
612
|
-
text: [
|
|
613
|
-
"text-shadow": [
|
|
2539
|
+
radius: [Z],
|
|
2540
|
+
shadow: [Z],
|
|
2541
|
+
spacing: ["px", A],
|
|
2542
|
+
text: [Z],
|
|
2543
|
+
"text-shadow": [Z],
|
|
614
2544
|
tracking: [
|
|
615
2545
|
"tighter",
|
|
616
2546
|
"tight",
|
|
@@ -624,20 +2554,20 @@ var Ye = (e, t) => {
|
|
|
624
2554
|
aspect: [{ aspect: [
|
|
625
2555
|
"auto",
|
|
626
2556
|
"square",
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
2557
|
+
fe,
|
|
2558
|
+
b,
|
|
2559
|
+
y,
|
|
2560
|
+
v
|
|
631
2561
|
] }],
|
|
632
2562
|
container: ["container"],
|
|
633
2563
|
columns: [{ columns: [
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
2564
|
+
A,
|
|
2565
|
+
b,
|
|
2566
|
+
y,
|
|
2567
|
+
i
|
|
638
2568
|
] }],
|
|
639
|
-
"break-after": [{ "break-after":
|
|
640
|
-
"break-before": [{ "break-before":
|
|
2569
|
+
"break-after": [{ "break-after": w() }],
|
|
2570
|
+
"break-before": [{ "break-before": w() }],
|
|
641
2571
|
"break-inside": [{ "break-inside": [
|
|
642
2572
|
"auto",
|
|
643
2573
|
"avoid",
|
|
@@ -693,13 +2623,13 @@ var Ye = (e, t) => {
|
|
|
693
2623
|
"none",
|
|
694
2624
|
"scale-down"
|
|
695
2625
|
] }],
|
|
696
|
-
"object-position": [{ object:
|
|
697
|
-
overflow: [{ overflow:
|
|
698
|
-
"overflow-x": [{ "overflow-x":
|
|
699
|
-
"overflow-y": [{ "overflow-y":
|
|
700
|
-
overscroll: [{ overscroll:
|
|
701
|
-
"overscroll-x": [{ "overscroll-x":
|
|
702
|
-
"overscroll-y": [{ "overscroll-y":
|
|
2626
|
+
"object-position": [{ object: D() }],
|
|
2627
|
+
overflow: [{ overflow: _() }],
|
|
2628
|
+
"overflow-x": [{ "overflow-x": _() }],
|
|
2629
|
+
"overflow-y": [{ "overflow-y": _() }],
|
|
2630
|
+
overscroll: [{ overscroll: T() }],
|
|
2631
|
+
"overscroll-x": [{ "overscroll-x": T() }],
|
|
2632
|
+
"overscroll-y": [{ "overscroll-y": T() }],
|
|
703
2633
|
position: [
|
|
704
2634
|
"static",
|
|
705
2635
|
"fixed",
|
|
@@ -707,32 +2637,32 @@ var Ye = (e, t) => {
|
|
|
707
2637
|
"relative",
|
|
708
2638
|
"sticky"
|
|
709
2639
|
],
|
|
710
|
-
inset: [{ inset:
|
|
711
|
-
"inset-x": [{ "inset-x":
|
|
712
|
-
"inset-y": [{ "inset-y":
|
|
713
|
-
start: [{ start:
|
|
714
|
-
end: [{ end:
|
|
715
|
-
top: [{ top:
|
|
716
|
-
right: [{ right:
|
|
717
|
-
bottom: [{ bottom:
|
|
718
|
-
left: [{ left:
|
|
2640
|
+
inset: [{ inset: O() }],
|
|
2641
|
+
"inset-x": [{ "inset-x": O() }],
|
|
2642
|
+
"inset-y": [{ "inset-y": O() }],
|
|
2643
|
+
start: [{ start: O() }],
|
|
2644
|
+
end: [{ end: O() }],
|
|
2645
|
+
top: [{ top: O() }],
|
|
2646
|
+
right: [{ right: O() }],
|
|
2647
|
+
bottom: [{ bottom: O() }],
|
|
2648
|
+
left: [{ left: O() }],
|
|
719
2649
|
visibility: [
|
|
720
2650
|
"visible",
|
|
721
2651
|
"invisible",
|
|
722
2652
|
"collapse"
|
|
723
2653
|
],
|
|
724
2654
|
z: [{ z: [
|
|
725
|
-
|
|
2655
|
+
ee,
|
|
726
2656
|
"auto",
|
|
727
|
-
|
|
728
|
-
|
|
2657
|
+
y,
|
|
2658
|
+
b
|
|
729
2659
|
] }],
|
|
730
2660
|
basis: [{ basis: [
|
|
731
|
-
|
|
2661
|
+
fe,
|
|
732
2662
|
"full",
|
|
733
2663
|
"auto",
|
|
734
|
-
|
|
735
|
-
...
|
|
2664
|
+
i,
|
|
2665
|
+
...k()
|
|
736
2666
|
] }],
|
|
737
2667
|
"flex-direction": [{ flex: [
|
|
738
2668
|
"row",
|
|
@@ -746,41 +2676,41 @@ var Ye = (e, t) => {
|
|
|
746
2676
|
"wrap-reverse"
|
|
747
2677
|
] }],
|
|
748
2678
|
flex: [{ flex: [
|
|
749
|
-
|
|
750
|
-
|
|
2679
|
+
A,
|
|
2680
|
+
fe,
|
|
751
2681
|
"auto",
|
|
752
2682
|
"initial",
|
|
753
2683
|
"none",
|
|
754
|
-
|
|
2684
|
+
b
|
|
755
2685
|
] }],
|
|
756
2686
|
grow: [{ grow: [
|
|
757
2687
|
"",
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
2688
|
+
A,
|
|
2689
|
+
y,
|
|
2690
|
+
b
|
|
761
2691
|
] }],
|
|
762
2692
|
shrink: [{ shrink: [
|
|
763
2693
|
"",
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
2694
|
+
A,
|
|
2695
|
+
y,
|
|
2696
|
+
b
|
|
767
2697
|
] }],
|
|
768
2698
|
order: [{ order: [
|
|
769
|
-
|
|
2699
|
+
ee,
|
|
770
2700
|
"first",
|
|
771
2701
|
"last",
|
|
772
2702
|
"none",
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
] }],
|
|
776
|
-
"grid-cols": [{ "grid-cols":
|
|
777
|
-
"col-start-end": [{ col:
|
|
778
|
-
"col-start": [{ "col-start":
|
|
779
|
-
"col-end": [{ "col-end":
|
|
780
|
-
"grid-rows": [{ "grid-rows":
|
|
781
|
-
"row-start-end": [{ row:
|
|
782
|
-
"row-start": [{ "row-start":
|
|
783
|
-
"row-end": [{ "row-end":
|
|
2703
|
+
y,
|
|
2704
|
+
b
|
|
2705
|
+
] }],
|
|
2706
|
+
"grid-cols": [{ "grid-cols": z() }],
|
|
2707
|
+
"col-start-end": [{ col: q() }],
|
|
2708
|
+
"col-start": [{ "col-start": be() }],
|
|
2709
|
+
"col-end": [{ "col-end": be() }],
|
|
2710
|
+
"grid-rows": [{ "grid-rows": z() }],
|
|
2711
|
+
"row-start-end": [{ row: q() }],
|
|
2712
|
+
"row-start": [{ "row-start": be() }],
|
|
2713
|
+
"row-end": [{ "row-end": be() }],
|
|
784
2714
|
"grid-flow": [{ "grid-flow": [
|
|
785
2715
|
"row",
|
|
786
2716
|
"col",
|
|
@@ -788,94 +2718,94 @@ var Ye = (e, t) => {
|
|
|
788
2718
|
"row-dense",
|
|
789
2719
|
"col-dense"
|
|
790
2720
|
] }],
|
|
791
|
-
"auto-cols": [{ "auto-cols":
|
|
792
|
-
"auto-rows": [{ "auto-rows":
|
|
793
|
-
gap: [{ gap:
|
|
794
|
-
"gap-x": [{ "gap-x":
|
|
795
|
-
"gap-y": [{ "gap-y":
|
|
796
|
-
"justify-content": [{ justify: [...
|
|
797
|
-
"justify-items": [{ "justify-items": [...
|
|
798
|
-
"justify-self": [{ "justify-self": ["auto", ...
|
|
799
|
-
"align-content": [{ content: ["normal", ...
|
|
800
|
-
"align-items": [{ items: [...
|
|
2721
|
+
"auto-cols": [{ "auto-cols": bt() }],
|
|
2722
|
+
"auto-rows": [{ "auto-rows": bt() }],
|
|
2723
|
+
gap: [{ gap: k() }],
|
|
2724
|
+
"gap-x": [{ "gap-x": k() }],
|
|
2725
|
+
"gap-y": [{ "gap-y": k() }],
|
|
2726
|
+
"justify-content": [{ justify: [...Ue(), "normal"] }],
|
|
2727
|
+
"justify-items": [{ "justify-items": [...le(), "normal"] }],
|
|
2728
|
+
"justify-self": [{ "justify-self": ["auto", ...le()] }],
|
|
2729
|
+
"align-content": [{ content: ["normal", ...Ue()] }],
|
|
2730
|
+
"align-items": [{ items: [...le(), { baseline: ["", "last"] }] }],
|
|
801
2731
|
"align-self": [{ self: [
|
|
802
2732
|
"auto",
|
|
803
|
-
...
|
|
2733
|
+
...le(),
|
|
804
2734
|
{ baseline: ["", "last"] }
|
|
805
2735
|
] }],
|
|
806
|
-
"place-content": [{ "place-content":
|
|
807
|
-
"place-items": [{ "place-items": [...
|
|
808
|
-
"place-self": [{ "place-self": ["auto", ...
|
|
809
|
-
p: [{ p:
|
|
810
|
-
px: [{ px:
|
|
811
|
-
py: [{ py:
|
|
812
|
-
ps: [{ ps:
|
|
813
|
-
pe: [{ pe:
|
|
814
|
-
pt: [{ pt:
|
|
815
|
-
pr: [{ pr:
|
|
816
|
-
pb: [{ pb:
|
|
817
|
-
pl: [{ pl:
|
|
818
|
-
m: [{ m:
|
|
819
|
-
mx: [{ mx:
|
|
820
|
-
my: [{ my:
|
|
821
|
-
ms: [{ ms:
|
|
822
|
-
me: [{ me:
|
|
823
|
-
mt: [{ mt:
|
|
824
|
-
mr: [{ mr:
|
|
825
|
-
mb: [{ mb:
|
|
826
|
-
ml: [{ ml:
|
|
827
|
-
"space-x": [{ "space-x":
|
|
2736
|
+
"place-content": [{ "place-content": Ue() }],
|
|
2737
|
+
"place-items": [{ "place-items": [...le(), "baseline"] }],
|
|
2738
|
+
"place-self": [{ "place-self": ["auto", ...le()] }],
|
|
2739
|
+
p: [{ p: k() }],
|
|
2740
|
+
px: [{ px: k() }],
|
|
2741
|
+
py: [{ py: k() }],
|
|
2742
|
+
ps: [{ ps: k() }],
|
|
2743
|
+
pe: [{ pe: k() }],
|
|
2744
|
+
pt: [{ pt: k() }],
|
|
2745
|
+
pr: [{ pr: k() }],
|
|
2746
|
+
pb: [{ pb: k() }],
|
|
2747
|
+
pl: [{ pl: k() }],
|
|
2748
|
+
m: [{ m: K() }],
|
|
2749
|
+
mx: [{ mx: K() }],
|
|
2750
|
+
my: [{ my: K() }],
|
|
2751
|
+
ms: [{ ms: K() }],
|
|
2752
|
+
me: [{ me: K() }],
|
|
2753
|
+
mt: [{ mt: K() }],
|
|
2754
|
+
mr: [{ mr: K() }],
|
|
2755
|
+
mb: [{ mb: K() }],
|
|
2756
|
+
ml: [{ ml: K() }],
|
|
2757
|
+
"space-x": [{ "space-x": k() }],
|
|
828
2758
|
"space-x-reverse": ["space-x-reverse"],
|
|
829
|
-
"space-y": [{ "space-y":
|
|
2759
|
+
"space-y": [{ "space-y": k() }],
|
|
830
2760
|
"space-y-reverse": ["space-y-reverse"],
|
|
831
|
-
size: [{ size:
|
|
2761
|
+
size: [{ size: oe() }],
|
|
832
2762
|
w: [{ w: [
|
|
833
|
-
|
|
2763
|
+
i,
|
|
834
2764
|
"screen",
|
|
835
|
-
...
|
|
2765
|
+
...oe()
|
|
836
2766
|
] }],
|
|
837
2767
|
"min-w": [{ "min-w": [
|
|
838
|
-
|
|
2768
|
+
i,
|
|
839
2769
|
"screen",
|
|
840
2770
|
"none",
|
|
841
|
-
...
|
|
2771
|
+
...oe()
|
|
842
2772
|
] }],
|
|
843
2773
|
"max-w": [{ "max-w": [
|
|
844
|
-
|
|
2774
|
+
i,
|
|
845
2775
|
"screen",
|
|
846
2776
|
"none",
|
|
847
2777
|
"prose",
|
|
848
|
-
{ screen: [
|
|
849
|
-
...
|
|
2778
|
+
{ screen: [l] },
|
|
2779
|
+
...oe()
|
|
850
2780
|
] }],
|
|
851
2781
|
h: [{ h: [
|
|
852
2782
|
"screen",
|
|
853
2783
|
"lh",
|
|
854
|
-
...
|
|
2784
|
+
...oe()
|
|
855
2785
|
] }],
|
|
856
2786
|
"min-h": [{ "min-h": [
|
|
857
2787
|
"screen",
|
|
858
2788
|
"lh",
|
|
859
2789
|
"none",
|
|
860
|
-
...
|
|
2790
|
+
...oe()
|
|
861
2791
|
] }],
|
|
862
2792
|
"max-h": [{ "max-h": [
|
|
863
2793
|
"screen",
|
|
864
2794
|
"lh",
|
|
865
|
-
...
|
|
2795
|
+
...oe()
|
|
866
2796
|
] }],
|
|
867
2797
|
"font-size": [{ text: [
|
|
868
2798
|
"base",
|
|
869
2799
|
r,
|
|
870
|
-
|
|
871
|
-
|
|
2800
|
+
ve,
|
|
2801
|
+
ae
|
|
872
2802
|
] }],
|
|
873
2803
|
"font-smoothing": ["antialiased", "subpixel-antialiased"],
|
|
874
2804
|
"font-style": ["italic", "not-italic"],
|
|
875
2805
|
"font-weight": [{ font: [
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
2806
|
+
n,
|
|
2807
|
+
y,
|
|
2808
|
+
tt
|
|
879
2809
|
] }],
|
|
880
2810
|
"font-stretch": [{ "font-stretch": [
|
|
881
2811
|
"ultra-condensed",
|
|
@@ -887,12 +2817,12 @@ var Ye = (e, t) => {
|
|
|
887
2817
|
"expanded",
|
|
888
2818
|
"extra-expanded",
|
|
889
2819
|
"ultra-expanded",
|
|
890
|
-
|
|
891
|
-
|
|
2820
|
+
et,
|
|
2821
|
+
b
|
|
892
2822
|
] }],
|
|
893
2823
|
"font-family": [{ font: [
|
|
894
|
-
|
|
895
|
-
|
|
2824
|
+
xi,
|
|
2825
|
+
b,
|
|
896
2826
|
t
|
|
897
2827
|
] }],
|
|
898
2828
|
"fvn-normal": ["normal-nums"],
|
|
@@ -902,29 +2832,29 @@ var Ye = (e, t) => {
|
|
|
902
2832
|
"fvn-spacing": ["proportional-nums", "tabular-nums"],
|
|
903
2833
|
"fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
|
|
904
2834
|
tracking: [{ tracking: [
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
2835
|
+
o,
|
|
2836
|
+
y,
|
|
2837
|
+
b
|
|
908
2838
|
] }],
|
|
909
2839
|
"line-clamp": [{ "line-clamp": [
|
|
910
|
-
|
|
2840
|
+
A,
|
|
911
2841
|
"none",
|
|
912
|
-
|
|
913
|
-
|
|
2842
|
+
y,
|
|
2843
|
+
tt
|
|
914
2844
|
] }],
|
|
915
|
-
leading: [{ leading: [
|
|
2845
|
+
leading: [{ leading: [a, ...k()] }],
|
|
916
2846
|
"list-image": [{ "list-image": [
|
|
917
2847
|
"none",
|
|
918
|
-
|
|
919
|
-
|
|
2848
|
+
y,
|
|
2849
|
+
b
|
|
920
2850
|
] }],
|
|
921
2851
|
"list-style-position": [{ list: ["inside", "outside"] }],
|
|
922
2852
|
"list-style-type": [{ list: [
|
|
923
2853
|
"disc",
|
|
924
2854
|
"decimal",
|
|
925
2855
|
"none",
|
|
926
|
-
|
|
927
|
-
|
|
2856
|
+
y,
|
|
2857
|
+
b
|
|
928
2858
|
] }],
|
|
929
2859
|
"text-alignment": [{ text: [
|
|
930
2860
|
"left",
|
|
@@ -934,28 +2864,28 @@ var Ye = (e, t) => {
|
|
|
934
2864
|
"start",
|
|
935
2865
|
"end"
|
|
936
2866
|
] }],
|
|
937
|
-
"placeholder-color": [{ placeholder:
|
|
938
|
-
"text-color": [{ text:
|
|
2867
|
+
"placeholder-color": [{ placeholder: N() }],
|
|
2868
|
+
"text-color": [{ text: N() }],
|
|
939
2869
|
"text-decoration": [
|
|
940
2870
|
"underline",
|
|
941
2871
|
"overline",
|
|
942
2872
|
"line-through",
|
|
943
2873
|
"no-underline"
|
|
944
2874
|
],
|
|
945
|
-
"text-decoration-style": [{ decoration: [...
|
|
2875
|
+
"text-decoration-style": [{ decoration: [...ye(), "wavy"] }],
|
|
946
2876
|
"text-decoration-thickness": [{ decoration: [
|
|
947
|
-
|
|
2877
|
+
A,
|
|
948
2878
|
"from-font",
|
|
949
2879
|
"auto",
|
|
950
|
-
|
|
951
|
-
|
|
2880
|
+
y,
|
|
2881
|
+
ae
|
|
952
2882
|
] }],
|
|
953
|
-
"text-decoration-color": [{ decoration:
|
|
2883
|
+
"text-decoration-color": [{ decoration: N() }],
|
|
954
2884
|
"underline-offset": [{ "underline-offset": [
|
|
955
|
-
|
|
2885
|
+
A,
|
|
956
2886
|
"auto",
|
|
957
|
-
|
|
958
|
-
|
|
2887
|
+
y,
|
|
2888
|
+
b
|
|
959
2889
|
] }],
|
|
960
2890
|
"text-transform": [
|
|
961
2891
|
"uppercase",
|
|
@@ -974,7 +2904,7 @@ var Ye = (e, t) => {
|
|
|
974
2904
|
"balance",
|
|
975
2905
|
"pretty"
|
|
976
2906
|
] }],
|
|
977
|
-
indent: [{ indent:
|
|
2907
|
+
indent: [{ indent: k() }],
|
|
978
2908
|
"vertical-align": [{ align: [
|
|
979
2909
|
"baseline",
|
|
980
2910
|
"top",
|
|
@@ -984,8 +2914,8 @@ var Ye = (e, t) => {
|
|
|
984
2914
|
"text-bottom",
|
|
985
2915
|
"sub",
|
|
986
2916
|
"super",
|
|
987
|
-
|
|
988
|
-
|
|
2917
|
+
y,
|
|
2918
|
+
b
|
|
989
2919
|
] }],
|
|
990
2920
|
whitespace: [{ whitespace: [
|
|
991
2921
|
"normal",
|
|
@@ -1013,8 +2943,8 @@ var Ye = (e, t) => {
|
|
|
1013
2943
|
] }],
|
|
1014
2944
|
content: [{ content: [
|
|
1015
2945
|
"none",
|
|
1016
|
-
|
|
1017
|
-
|
|
2946
|
+
y,
|
|
2947
|
+
b
|
|
1018
2948
|
] }],
|
|
1019
2949
|
"bg-attachment": [{ bg: [
|
|
1020
2950
|
"fixed",
|
|
@@ -1032,9 +2962,9 @@ var Ye = (e, t) => {
|
|
|
1032
2962
|
"padding",
|
|
1033
2963
|
"content"
|
|
1034
2964
|
] }],
|
|
1035
|
-
"bg-position": [{ bg:
|
|
1036
|
-
"bg-repeat": [{ bg:
|
|
1037
|
-
"bg-size": [{ bg:
|
|
2965
|
+
"bg-position": [{ bg: yt() }],
|
|
2966
|
+
"bg-repeat": [{ bg: xt() }],
|
|
2967
|
+
"bg-size": [{ bg: wt() }],
|
|
1038
2968
|
"bg-image": [{ bg: [
|
|
1039
2969
|
"none",
|
|
1040
2970
|
{
|
|
@@ -1049,136 +2979,136 @@ var Ye = (e, t) => {
|
|
|
1049
2979
|
"l",
|
|
1050
2980
|
"tl"
|
|
1051
2981
|
] },
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
2982
|
+
ee,
|
|
2983
|
+
y,
|
|
2984
|
+
b
|
|
1055
2985
|
],
|
|
1056
2986
|
radial: [
|
|
1057
2987
|
"",
|
|
1058
|
-
|
|
1059
|
-
|
|
2988
|
+
y,
|
|
2989
|
+
b
|
|
1060
2990
|
],
|
|
1061
2991
|
conic: [
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
2992
|
+
ee,
|
|
2993
|
+
y,
|
|
2994
|
+
b
|
|
1065
2995
|
]
|
|
1066
2996
|
},
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
] }],
|
|
1070
|
-
"bg-color": [{ bg:
|
|
1071
|
-
"gradient-from-pos": [{ from:
|
|
1072
|
-
"gradient-via-pos": [{ via:
|
|
1073
|
-
"gradient-to-pos": [{ to:
|
|
1074
|
-
"gradient-from": [{ from:
|
|
1075
|
-
"gradient-via": [{ via:
|
|
1076
|
-
"gradient-to": [{ to:
|
|
1077
|
-
rounded: [{ rounded:
|
|
1078
|
-
"rounded-s": [{ "rounded-s":
|
|
1079
|
-
"rounded-e": [{ "rounded-e":
|
|
1080
|
-
"rounded-t": [{ "rounded-t":
|
|
1081
|
-
"rounded-r": [{ "rounded-r":
|
|
1082
|
-
"rounded-b": [{ "rounded-b":
|
|
1083
|
-
"rounded-l": [{ "rounded-l":
|
|
1084
|
-
"rounded-ss": [{ "rounded-ss":
|
|
1085
|
-
"rounded-se": [{ "rounded-se":
|
|
1086
|
-
"rounded-ee": [{ "rounded-ee":
|
|
1087
|
-
"rounded-es": [{ "rounded-es":
|
|
1088
|
-
"rounded-tl": [{ "rounded-tl":
|
|
1089
|
-
"rounded-tr": [{ "rounded-tr":
|
|
1090
|
-
"rounded-br": [{ "rounded-br":
|
|
1091
|
-
"rounded-bl": [{ "rounded-bl":
|
|
1092
|
-
"border-w": [{ border:
|
|
1093
|
-
"border-w-x": [{ "border-x":
|
|
1094
|
-
"border-w-y": [{ "border-y":
|
|
1095
|
-
"border-w-s": [{ "border-s":
|
|
1096
|
-
"border-w-e": [{ "border-e":
|
|
1097
|
-
"border-w-t": [{ "border-t":
|
|
1098
|
-
"border-w-r": [{ "border-r":
|
|
1099
|
-
"border-w-b": [{ "border-b":
|
|
1100
|
-
"border-w-l": [{ "border-l":
|
|
1101
|
-
"divide-x": [{ "divide-x":
|
|
2997
|
+
Si,
|
|
2998
|
+
yi
|
|
2999
|
+
] }],
|
|
3000
|
+
"bg-color": [{ bg: N() }],
|
|
3001
|
+
"gradient-from-pos": [{ from: Ve() }],
|
|
3002
|
+
"gradient-via-pos": [{ via: Ve() }],
|
|
3003
|
+
"gradient-to-pos": [{ to: Ve() }],
|
|
3004
|
+
"gradient-from": [{ from: N() }],
|
|
3005
|
+
"gradient-via": [{ via: N() }],
|
|
3006
|
+
"gradient-to": [{ to: N() }],
|
|
3007
|
+
rounded: [{ rounded: W() }],
|
|
3008
|
+
"rounded-s": [{ "rounded-s": W() }],
|
|
3009
|
+
"rounded-e": [{ "rounded-e": W() }],
|
|
3010
|
+
"rounded-t": [{ "rounded-t": W() }],
|
|
3011
|
+
"rounded-r": [{ "rounded-r": W() }],
|
|
3012
|
+
"rounded-b": [{ "rounded-b": W() }],
|
|
3013
|
+
"rounded-l": [{ "rounded-l": W() }],
|
|
3014
|
+
"rounded-ss": [{ "rounded-ss": W() }],
|
|
3015
|
+
"rounded-se": [{ "rounded-se": W() }],
|
|
3016
|
+
"rounded-ee": [{ "rounded-ee": W() }],
|
|
3017
|
+
"rounded-es": [{ "rounded-es": W() }],
|
|
3018
|
+
"rounded-tl": [{ "rounded-tl": W() }],
|
|
3019
|
+
"rounded-tr": [{ "rounded-tr": W() }],
|
|
3020
|
+
"rounded-br": [{ "rounded-br": W() }],
|
|
3021
|
+
"rounded-bl": [{ "rounded-bl": W() }],
|
|
3022
|
+
"border-w": [{ border: $() }],
|
|
3023
|
+
"border-w-x": [{ "border-x": $() }],
|
|
3024
|
+
"border-w-y": [{ "border-y": $() }],
|
|
3025
|
+
"border-w-s": [{ "border-s": $() }],
|
|
3026
|
+
"border-w-e": [{ "border-e": $() }],
|
|
3027
|
+
"border-w-t": [{ "border-t": $() }],
|
|
3028
|
+
"border-w-r": [{ "border-r": $() }],
|
|
3029
|
+
"border-w-b": [{ "border-b": $() }],
|
|
3030
|
+
"border-w-l": [{ "border-l": $() }],
|
|
3031
|
+
"divide-x": [{ "divide-x": $() }],
|
|
1102
3032
|
"divide-x-reverse": ["divide-x-reverse"],
|
|
1103
|
-
"divide-y": [{ "divide-y":
|
|
3033
|
+
"divide-y": [{ "divide-y": $() }],
|
|
1104
3034
|
"divide-y-reverse": ["divide-y-reverse"],
|
|
1105
3035
|
"border-style": [{ border: [
|
|
1106
|
-
...
|
|
3036
|
+
...ye(),
|
|
1107
3037
|
"hidden",
|
|
1108
3038
|
"none"
|
|
1109
3039
|
] }],
|
|
1110
3040
|
"divide-style": [{ divide: [
|
|
1111
|
-
...
|
|
3041
|
+
...ye(),
|
|
1112
3042
|
"hidden",
|
|
1113
3043
|
"none"
|
|
1114
3044
|
] }],
|
|
1115
|
-
"border-color": [{ border:
|
|
1116
|
-
"border-color-x": [{ "border-x":
|
|
1117
|
-
"border-color-y": [{ "border-y":
|
|
1118
|
-
"border-color-s": [{ "border-s":
|
|
1119
|
-
"border-color-e": [{ "border-e":
|
|
1120
|
-
"border-color-t": [{ "border-t":
|
|
1121
|
-
"border-color-r": [{ "border-r":
|
|
1122
|
-
"border-color-b": [{ "border-b":
|
|
1123
|
-
"border-color-l": [{ "border-l":
|
|
1124
|
-
"divide-color": [{ divide:
|
|
3045
|
+
"border-color": [{ border: N() }],
|
|
3046
|
+
"border-color-x": [{ "border-x": N() }],
|
|
3047
|
+
"border-color-y": [{ "border-y": N() }],
|
|
3048
|
+
"border-color-s": [{ "border-s": N() }],
|
|
3049
|
+
"border-color-e": [{ "border-e": N() }],
|
|
3050
|
+
"border-color-t": [{ "border-t": N() }],
|
|
3051
|
+
"border-color-r": [{ "border-r": N() }],
|
|
3052
|
+
"border-color-b": [{ "border-b": N() }],
|
|
3053
|
+
"border-color-l": [{ "border-l": N() }],
|
|
3054
|
+
"divide-color": [{ divide: N() }],
|
|
1125
3055
|
"outline-style": [{ outline: [
|
|
1126
|
-
...
|
|
3056
|
+
...ye(),
|
|
1127
3057
|
"none",
|
|
1128
3058
|
"hidden"
|
|
1129
3059
|
] }],
|
|
1130
3060
|
"outline-offset": [{ "outline-offset": [
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
3061
|
+
A,
|
|
3062
|
+
y,
|
|
3063
|
+
b
|
|
1134
3064
|
] }],
|
|
1135
3065
|
"outline-w": [{ outline: [
|
|
1136
3066
|
"",
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
3067
|
+
A,
|
|
3068
|
+
ve,
|
|
3069
|
+
ae
|
|
1140
3070
|
] }],
|
|
1141
|
-
"outline-color": [{ outline:
|
|
3071
|
+
"outline-color": [{ outline: N() }],
|
|
1142
3072
|
shadow: [{ shadow: [
|
|
1143
3073
|
"",
|
|
1144
3074
|
"none",
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
3075
|
+
f,
|
|
3076
|
+
Ae,
|
|
3077
|
+
Pe
|
|
1148
3078
|
] }],
|
|
1149
|
-
"shadow-color": [{ shadow:
|
|
3079
|
+
"shadow-color": [{ shadow: N() }],
|
|
1150
3080
|
"inset-shadow": [{ "inset-shadow": [
|
|
1151
3081
|
"none",
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
3082
|
+
m,
|
|
3083
|
+
Ae,
|
|
3084
|
+
Pe
|
|
1155
3085
|
] }],
|
|
1156
|
-
"inset-shadow-color": [{ "inset-shadow":
|
|
1157
|
-
"ring-w": [{ ring:
|
|
3086
|
+
"inset-shadow-color": [{ "inset-shadow": N() }],
|
|
3087
|
+
"ring-w": [{ ring: $() }],
|
|
1158
3088
|
"ring-w-inset": ["ring-inset"],
|
|
1159
|
-
"ring-color": [{ ring:
|
|
1160
|
-
"ring-offset-w": [{ "ring-offset": [
|
|
1161
|
-
"ring-offset-color": [{ "ring-offset":
|
|
1162
|
-
"inset-ring-w": [{ "inset-ring":
|
|
1163
|
-
"inset-ring-color": [{ "inset-ring":
|
|
3089
|
+
"ring-color": [{ ring: N() }],
|
|
3090
|
+
"ring-offset-w": [{ "ring-offset": [A, ae] }],
|
|
3091
|
+
"ring-offset-color": [{ "ring-offset": N() }],
|
|
3092
|
+
"inset-ring-w": [{ "inset-ring": $() }],
|
|
3093
|
+
"inset-ring-color": [{ "inset-ring": N() }],
|
|
1164
3094
|
"text-shadow": [{ "text-shadow": [
|
|
1165
3095
|
"none",
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
3096
|
+
p,
|
|
3097
|
+
Ae,
|
|
3098
|
+
Pe
|
|
1169
3099
|
] }],
|
|
1170
|
-
"text-shadow-color": [{ "text-shadow":
|
|
3100
|
+
"text-shadow-color": [{ "text-shadow": N() }],
|
|
1171
3101
|
opacity: [{ opacity: [
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
3102
|
+
A,
|
|
3103
|
+
y,
|
|
3104
|
+
b
|
|
1175
3105
|
] }],
|
|
1176
3106
|
"mix-blend": [{ "mix-blend": [
|
|
1177
|
-
...
|
|
3107
|
+
...St(),
|
|
1178
3108
|
"plus-darker",
|
|
1179
3109
|
"plus-lighter"
|
|
1180
3110
|
] }],
|
|
1181
|
-
"bg-blend": [{ "bg-blend":
|
|
3111
|
+
"bg-blend": [{ "bg-blend": St() }],
|
|
1182
3112
|
"mask-clip": [{ "mask-clip": [
|
|
1183
3113
|
"border",
|
|
1184
3114
|
"padding",
|
|
@@ -1193,51 +3123,51 @@ var Ye = (e, t) => {
|
|
|
1193
3123
|
"intersect",
|
|
1194
3124
|
"exclude"
|
|
1195
3125
|
] }],
|
|
1196
|
-
"mask-image-linear-pos": [{ "mask-linear": [
|
|
1197
|
-
"mask-image-linear-from-pos": [{ "mask-linear-from":
|
|
1198
|
-
"mask-image-linear-to-pos": [{ "mask-linear-to":
|
|
1199
|
-
"mask-image-linear-from-color": [{ "mask-linear-from":
|
|
1200
|
-
"mask-image-linear-to-color": [{ "mask-linear-to":
|
|
1201
|
-
"mask-image-t-from-pos": [{ "mask-t-from":
|
|
1202
|
-
"mask-image-t-to-pos": [{ "mask-t-to":
|
|
1203
|
-
"mask-image-t-from-color": [{ "mask-t-from":
|
|
1204
|
-
"mask-image-t-to-color": [{ "mask-t-to":
|
|
1205
|
-
"mask-image-r-from-pos": [{ "mask-r-from":
|
|
1206
|
-
"mask-image-r-to-pos": [{ "mask-r-to":
|
|
1207
|
-
"mask-image-r-from-color": [{ "mask-r-from":
|
|
1208
|
-
"mask-image-r-to-color": [{ "mask-r-to":
|
|
1209
|
-
"mask-image-b-from-pos": [{ "mask-b-from":
|
|
1210
|
-
"mask-image-b-to-pos": [{ "mask-b-to":
|
|
1211
|
-
"mask-image-b-from-color": [{ "mask-b-from":
|
|
1212
|
-
"mask-image-b-to-color": [{ "mask-b-to":
|
|
1213
|
-
"mask-image-l-from-pos": [{ "mask-l-from":
|
|
1214
|
-
"mask-image-l-to-pos": [{ "mask-l-to":
|
|
1215
|
-
"mask-image-l-from-color": [{ "mask-l-from":
|
|
1216
|
-
"mask-image-l-to-color": [{ "mask-l-to":
|
|
1217
|
-
"mask-image-x-from-pos": [{ "mask-x-from":
|
|
1218
|
-
"mask-image-x-to-pos": [{ "mask-x-to":
|
|
1219
|
-
"mask-image-x-from-color": [{ "mask-x-from":
|
|
1220
|
-
"mask-image-x-to-color": [{ "mask-x-to":
|
|
1221
|
-
"mask-image-y-from-pos": [{ "mask-y-from":
|
|
1222
|
-
"mask-image-y-to-pos": [{ "mask-y-to":
|
|
1223
|
-
"mask-image-y-from-color": [{ "mask-y-from":
|
|
1224
|
-
"mask-image-y-to-color": [{ "mask-y-to":
|
|
1225
|
-
"mask-image-radial": [{ "mask-radial": [
|
|
1226
|
-
"mask-image-radial-from-pos": [{ "mask-radial-from":
|
|
1227
|
-
"mask-image-radial-to-pos": [{ "mask-radial-to":
|
|
1228
|
-
"mask-image-radial-from-color": [{ "mask-radial-from":
|
|
1229
|
-
"mask-image-radial-to-color": [{ "mask-radial-to":
|
|
3126
|
+
"mask-image-linear-pos": [{ "mask-linear": [A] }],
|
|
3127
|
+
"mask-image-linear-from-pos": [{ "mask-linear-from": L() }],
|
|
3128
|
+
"mask-image-linear-to-pos": [{ "mask-linear-to": L() }],
|
|
3129
|
+
"mask-image-linear-from-color": [{ "mask-linear-from": N() }],
|
|
3130
|
+
"mask-image-linear-to-color": [{ "mask-linear-to": N() }],
|
|
3131
|
+
"mask-image-t-from-pos": [{ "mask-t-from": L() }],
|
|
3132
|
+
"mask-image-t-to-pos": [{ "mask-t-to": L() }],
|
|
3133
|
+
"mask-image-t-from-color": [{ "mask-t-from": N() }],
|
|
3134
|
+
"mask-image-t-to-color": [{ "mask-t-to": N() }],
|
|
3135
|
+
"mask-image-r-from-pos": [{ "mask-r-from": L() }],
|
|
3136
|
+
"mask-image-r-to-pos": [{ "mask-r-to": L() }],
|
|
3137
|
+
"mask-image-r-from-color": [{ "mask-r-from": N() }],
|
|
3138
|
+
"mask-image-r-to-color": [{ "mask-r-to": N() }],
|
|
3139
|
+
"mask-image-b-from-pos": [{ "mask-b-from": L() }],
|
|
3140
|
+
"mask-image-b-to-pos": [{ "mask-b-to": L() }],
|
|
3141
|
+
"mask-image-b-from-color": [{ "mask-b-from": N() }],
|
|
3142
|
+
"mask-image-b-to-color": [{ "mask-b-to": N() }],
|
|
3143
|
+
"mask-image-l-from-pos": [{ "mask-l-from": L() }],
|
|
3144
|
+
"mask-image-l-to-pos": [{ "mask-l-to": L() }],
|
|
3145
|
+
"mask-image-l-from-color": [{ "mask-l-from": N() }],
|
|
3146
|
+
"mask-image-l-to-color": [{ "mask-l-to": N() }],
|
|
3147
|
+
"mask-image-x-from-pos": [{ "mask-x-from": L() }],
|
|
3148
|
+
"mask-image-x-to-pos": [{ "mask-x-to": L() }],
|
|
3149
|
+
"mask-image-x-from-color": [{ "mask-x-from": N() }],
|
|
3150
|
+
"mask-image-x-to-color": [{ "mask-x-to": N() }],
|
|
3151
|
+
"mask-image-y-from-pos": [{ "mask-y-from": L() }],
|
|
3152
|
+
"mask-image-y-to-pos": [{ "mask-y-to": L() }],
|
|
3153
|
+
"mask-image-y-from-color": [{ "mask-y-from": N() }],
|
|
3154
|
+
"mask-image-y-to-color": [{ "mask-y-to": N() }],
|
|
3155
|
+
"mask-image-radial": [{ "mask-radial": [y, b] }],
|
|
3156
|
+
"mask-image-radial-from-pos": [{ "mask-radial-from": L() }],
|
|
3157
|
+
"mask-image-radial-to-pos": [{ "mask-radial-to": L() }],
|
|
3158
|
+
"mask-image-radial-from-color": [{ "mask-radial-from": N() }],
|
|
3159
|
+
"mask-image-radial-to-color": [{ "mask-radial-to": N() }],
|
|
1230
3160
|
"mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }],
|
|
1231
3161
|
"mask-image-radial-size": [{ "mask-radial": [{
|
|
1232
3162
|
closest: ["side", "corner"],
|
|
1233
3163
|
farthest: ["side", "corner"]
|
|
1234
3164
|
}] }],
|
|
1235
|
-
"mask-image-radial-pos": [{ "mask-radial-at":
|
|
1236
|
-
"mask-image-conic-pos": [{ "mask-conic": [
|
|
1237
|
-
"mask-image-conic-from-pos": [{ "mask-conic-from":
|
|
1238
|
-
"mask-image-conic-to-pos": [{ "mask-conic-to":
|
|
1239
|
-
"mask-image-conic-from-color": [{ "mask-conic-from":
|
|
1240
|
-
"mask-image-conic-to-color": [{ "mask-conic-to":
|
|
3165
|
+
"mask-image-radial-pos": [{ "mask-radial-at": S() }],
|
|
3166
|
+
"mask-image-conic-pos": [{ "mask-conic": [A] }],
|
|
3167
|
+
"mask-image-conic-from-pos": [{ "mask-conic-from": L() }],
|
|
3168
|
+
"mask-image-conic-to-pos": [{ "mask-conic-to": L() }],
|
|
3169
|
+
"mask-image-conic-from-color": [{ "mask-conic-from": N() }],
|
|
3170
|
+
"mask-image-conic-to-color": [{ "mask-conic-to": N() }],
|
|
1241
3171
|
"mask-mode": [{ mask: [
|
|
1242
3172
|
"alpha",
|
|
1243
3173
|
"luminance",
|
|
@@ -1251,122 +3181,122 @@ var Ye = (e, t) => {
|
|
|
1251
3181
|
"stroke",
|
|
1252
3182
|
"view"
|
|
1253
3183
|
] }],
|
|
1254
|
-
"mask-position": [{ mask:
|
|
1255
|
-
"mask-repeat": [{ mask:
|
|
1256
|
-
"mask-size": [{ mask:
|
|
3184
|
+
"mask-position": [{ mask: yt() }],
|
|
3185
|
+
"mask-repeat": [{ mask: xt() }],
|
|
3186
|
+
"mask-size": [{ mask: wt() }],
|
|
1257
3187
|
"mask-type": [{ "mask-type": ["alpha", "luminance"] }],
|
|
1258
3188
|
"mask-image": [{ mask: [
|
|
1259
3189
|
"none",
|
|
1260
|
-
|
|
1261
|
-
|
|
3190
|
+
y,
|
|
3191
|
+
b
|
|
1262
3192
|
] }],
|
|
1263
3193
|
filter: [{ filter: [
|
|
1264
3194
|
"",
|
|
1265
3195
|
"none",
|
|
1266
|
-
|
|
1267
|
-
|
|
3196
|
+
y,
|
|
3197
|
+
b
|
|
1268
3198
|
] }],
|
|
1269
|
-
blur: [{ blur:
|
|
3199
|
+
blur: [{ blur: Ct() }],
|
|
1270
3200
|
brightness: [{ brightness: [
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
3201
|
+
A,
|
|
3202
|
+
y,
|
|
3203
|
+
b
|
|
1274
3204
|
] }],
|
|
1275
3205
|
contrast: [{ contrast: [
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
3206
|
+
A,
|
|
3207
|
+
y,
|
|
3208
|
+
b
|
|
1279
3209
|
] }],
|
|
1280
3210
|
"drop-shadow": [{ "drop-shadow": [
|
|
1281
3211
|
"",
|
|
1282
3212
|
"none",
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
3213
|
+
g,
|
|
3214
|
+
Ae,
|
|
3215
|
+
Pe
|
|
1286
3216
|
] }],
|
|
1287
|
-
"drop-shadow-color": [{ "drop-shadow":
|
|
3217
|
+
"drop-shadow-color": [{ "drop-shadow": N() }],
|
|
1288
3218
|
grayscale: [{ grayscale: [
|
|
1289
3219
|
"",
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
3220
|
+
A,
|
|
3221
|
+
y,
|
|
3222
|
+
b
|
|
1293
3223
|
] }],
|
|
1294
3224
|
"hue-rotate": [{ "hue-rotate": [
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
3225
|
+
A,
|
|
3226
|
+
y,
|
|
3227
|
+
b
|
|
1298
3228
|
] }],
|
|
1299
3229
|
invert: [{ invert: [
|
|
1300
3230
|
"",
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
3231
|
+
A,
|
|
3232
|
+
y,
|
|
3233
|
+
b
|
|
1304
3234
|
] }],
|
|
1305
3235
|
saturate: [{ saturate: [
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
3236
|
+
A,
|
|
3237
|
+
y,
|
|
3238
|
+
b
|
|
1309
3239
|
] }],
|
|
1310
3240
|
sepia: [{ sepia: [
|
|
1311
3241
|
"",
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
3242
|
+
A,
|
|
3243
|
+
y,
|
|
3244
|
+
b
|
|
1315
3245
|
] }],
|
|
1316
3246
|
"backdrop-filter": [{ "backdrop-filter": [
|
|
1317
3247
|
"",
|
|
1318
3248
|
"none",
|
|
1319
|
-
|
|
1320
|
-
|
|
3249
|
+
y,
|
|
3250
|
+
b
|
|
1321
3251
|
] }],
|
|
1322
|
-
"backdrop-blur": [{ "backdrop-blur":
|
|
3252
|
+
"backdrop-blur": [{ "backdrop-blur": Ct() }],
|
|
1323
3253
|
"backdrop-brightness": [{ "backdrop-brightness": [
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
3254
|
+
A,
|
|
3255
|
+
y,
|
|
3256
|
+
b
|
|
1327
3257
|
] }],
|
|
1328
3258
|
"backdrop-contrast": [{ "backdrop-contrast": [
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
3259
|
+
A,
|
|
3260
|
+
y,
|
|
3261
|
+
b
|
|
1332
3262
|
] }],
|
|
1333
3263
|
"backdrop-grayscale": [{ "backdrop-grayscale": [
|
|
1334
3264
|
"",
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
3265
|
+
A,
|
|
3266
|
+
y,
|
|
3267
|
+
b
|
|
1338
3268
|
] }],
|
|
1339
3269
|
"backdrop-hue-rotate": [{ "backdrop-hue-rotate": [
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
3270
|
+
A,
|
|
3271
|
+
y,
|
|
3272
|
+
b
|
|
1343
3273
|
] }],
|
|
1344
3274
|
"backdrop-invert": [{ "backdrop-invert": [
|
|
1345
3275
|
"",
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
3276
|
+
A,
|
|
3277
|
+
y,
|
|
3278
|
+
b
|
|
1349
3279
|
] }],
|
|
1350
3280
|
"backdrop-opacity": [{ "backdrop-opacity": [
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
3281
|
+
A,
|
|
3282
|
+
y,
|
|
3283
|
+
b
|
|
1354
3284
|
] }],
|
|
1355
3285
|
"backdrop-saturate": [{ "backdrop-saturate": [
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
3286
|
+
A,
|
|
3287
|
+
y,
|
|
3288
|
+
b
|
|
1359
3289
|
] }],
|
|
1360
3290
|
"backdrop-sepia": [{ "backdrop-sepia": [
|
|
1361
3291
|
"",
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
3292
|
+
A,
|
|
3293
|
+
y,
|
|
3294
|
+
b
|
|
1365
3295
|
] }],
|
|
1366
3296
|
"border-collapse": [{ border: ["collapse", "separate"] }],
|
|
1367
|
-
"border-spacing": [{ "border-spacing":
|
|
1368
|
-
"border-spacing-x": [{ "border-spacing-x":
|
|
1369
|
-
"border-spacing-y": [{ "border-spacing-y":
|
|
3297
|
+
"border-spacing": [{ "border-spacing": k() }],
|
|
3298
|
+
"border-spacing-x": [{ "border-spacing-x": k() }],
|
|
3299
|
+
"border-spacing-y": [{ "border-spacing-y": k() }],
|
|
1370
3300
|
"table-layout": [{ table: ["auto", "fixed"] }],
|
|
1371
3301
|
caption: [{ caption: ["top", "bottom"] }],
|
|
1372
3302
|
transition: [{ transition: [
|
|
@@ -1377,71 +3307,71 @@ var Ye = (e, t) => {
|
|
|
1377
3307
|
"shadow",
|
|
1378
3308
|
"transform",
|
|
1379
3309
|
"none",
|
|
1380
|
-
|
|
1381
|
-
|
|
3310
|
+
y,
|
|
3311
|
+
b
|
|
1382
3312
|
] }],
|
|
1383
3313
|
"transition-behavior": [{ transition: ["normal", "discrete"] }],
|
|
1384
3314
|
duration: [{ duration: [
|
|
1385
|
-
|
|
3315
|
+
A,
|
|
1386
3316
|
"initial",
|
|
1387
|
-
|
|
1388
|
-
|
|
3317
|
+
y,
|
|
3318
|
+
b
|
|
1389
3319
|
] }],
|
|
1390
3320
|
ease: [{ ease: [
|
|
1391
3321
|
"linear",
|
|
1392
3322
|
"initial",
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
3323
|
+
E,
|
|
3324
|
+
y,
|
|
3325
|
+
b
|
|
1396
3326
|
] }],
|
|
1397
3327
|
delay: [{ delay: [
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
3328
|
+
A,
|
|
3329
|
+
y,
|
|
3330
|
+
b
|
|
1401
3331
|
] }],
|
|
1402
3332
|
animate: [{ animate: [
|
|
1403
3333
|
"none",
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
3334
|
+
R,
|
|
3335
|
+
y,
|
|
3336
|
+
b
|
|
1407
3337
|
] }],
|
|
1408
3338
|
backface: [{ backface: ["hidden", "visible"] }],
|
|
1409
3339
|
perspective: [{ perspective: [
|
|
3340
|
+
h,
|
|
1410
3341
|
y,
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
rotate: [{ rotate:
|
|
1416
|
-
"rotate-
|
|
1417
|
-
"rotate-
|
|
1418
|
-
|
|
1419
|
-
scale: [{ scale:
|
|
1420
|
-
"scale-
|
|
1421
|
-
"scale-
|
|
1422
|
-
"scale-z": [{ "scale-z": X() }],
|
|
3342
|
+
b
|
|
3343
|
+
] }],
|
|
3344
|
+
"perspective-origin": [{ "perspective-origin": D() }],
|
|
3345
|
+
rotate: [{ rotate: xe() }],
|
|
3346
|
+
"rotate-x": [{ "rotate-x": xe() }],
|
|
3347
|
+
"rotate-y": [{ "rotate-y": xe() }],
|
|
3348
|
+
"rotate-z": [{ "rotate-z": xe() }],
|
|
3349
|
+
scale: [{ scale: we() }],
|
|
3350
|
+
"scale-x": [{ "scale-x": we() }],
|
|
3351
|
+
"scale-y": [{ "scale-y": we() }],
|
|
3352
|
+
"scale-z": [{ "scale-z": we() }],
|
|
1423
3353
|
"scale-3d": ["scale-3d"],
|
|
1424
|
-
skew: [{ skew:
|
|
1425
|
-
"skew-x": [{ "skew-x":
|
|
1426
|
-
"skew-y": [{ "skew-y":
|
|
3354
|
+
skew: [{ skew: He() }],
|
|
3355
|
+
"skew-x": [{ "skew-x": He() }],
|
|
3356
|
+
"skew-y": [{ "skew-y": He() }],
|
|
1427
3357
|
transform: [{ transform: [
|
|
1428
|
-
|
|
1429
|
-
|
|
3358
|
+
y,
|
|
3359
|
+
b,
|
|
1430
3360
|
"",
|
|
1431
3361
|
"none",
|
|
1432
3362
|
"gpu",
|
|
1433
3363
|
"cpu"
|
|
1434
3364
|
] }],
|
|
1435
|
-
"transform-origin": [{ origin:
|
|
3365
|
+
"transform-origin": [{ origin: D() }],
|
|
1436
3366
|
"transform-style": [{ transform: ["3d", "flat"] }],
|
|
1437
|
-
translate: [{ translate:
|
|
1438
|
-
"translate-x": [{ "translate-x":
|
|
1439
|
-
"translate-y": [{ "translate-y":
|
|
1440
|
-
"translate-z": [{ "translate-z":
|
|
3367
|
+
translate: [{ translate: Se() }],
|
|
3368
|
+
"translate-x": [{ "translate-x": Se() }],
|
|
3369
|
+
"translate-y": [{ "translate-y": Se() }],
|
|
3370
|
+
"translate-z": [{ "translate-z": Se() }],
|
|
1441
3371
|
"translate-none": ["translate-none"],
|
|
1442
|
-
accent: [{ accent:
|
|
3372
|
+
accent: [{ accent: N() }],
|
|
1443
3373
|
appearance: [{ appearance: ["none", "auto"] }],
|
|
1444
|
-
"caret-color": [{ caret:
|
|
3374
|
+
"caret-color": [{ caret: N() }],
|
|
1445
3375
|
"color-scheme": [{ scheme: [
|
|
1446
3376
|
"normal",
|
|
1447
3377
|
"dark",
|
|
@@ -1487,8 +3417,8 @@ var Ye = (e, t) => {
|
|
|
1487
3417
|
"nwse-resize",
|
|
1488
3418
|
"zoom-in",
|
|
1489
3419
|
"zoom-out",
|
|
1490
|
-
|
|
1491
|
-
|
|
3420
|
+
y,
|
|
3421
|
+
b
|
|
1492
3422
|
] }],
|
|
1493
3423
|
"field-sizing": [{ "field-sizing": ["fixed", "content"] }],
|
|
1494
3424
|
"pointer-events": [{ "pointer-events": ["auto", "none"] }],
|
|
@@ -1499,24 +3429,24 @@ var Ye = (e, t) => {
|
|
|
1499
3429
|
"x"
|
|
1500
3430
|
] }],
|
|
1501
3431
|
"scroll-behavior": [{ scroll: ["auto", "smooth"] }],
|
|
1502
|
-
"scroll-m": [{ "scroll-m":
|
|
1503
|
-
"scroll-mx": [{ "scroll-mx":
|
|
1504
|
-
"scroll-my": [{ "scroll-my":
|
|
1505
|
-
"scroll-ms": [{ "scroll-ms":
|
|
1506
|
-
"scroll-me": [{ "scroll-me":
|
|
1507
|
-
"scroll-mt": [{ "scroll-mt":
|
|
1508
|
-
"scroll-mr": [{ "scroll-mr":
|
|
1509
|
-
"scroll-mb": [{ "scroll-mb":
|
|
1510
|
-
"scroll-ml": [{ "scroll-ml":
|
|
1511
|
-
"scroll-p": [{ "scroll-p":
|
|
1512
|
-
"scroll-px": [{ "scroll-px":
|
|
1513
|
-
"scroll-py": [{ "scroll-py":
|
|
1514
|
-
"scroll-ps": [{ "scroll-ps":
|
|
1515
|
-
"scroll-pe": [{ "scroll-pe":
|
|
1516
|
-
"scroll-pt": [{ "scroll-pt":
|
|
1517
|
-
"scroll-pr": [{ "scroll-pr":
|
|
1518
|
-
"scroll-pb": [{ "scroll-pb":
|
|
1519
|
-
"scroll-pl": [{ "scroll-pl":
|
|
3432
|
+
"scroll-m": [{ "scroll-m": k() }],
|
|
3433
|
+
"scroll-mx": [{ "scroll-mx": k() }],
|
|
3434
|
+
"scroll-my": [{ "scroll-my": k() }],
|
|
3435
|
+
"scroll-ms": [{ "scroll-ms": k() }],
|
|
3436
|
+
"scroll-me": [{ "scroll-me": k() }],
|
|
3437
|
+
"scroll-mt": [{ "scroll-mt": k() }],
|
|
3438
|
+
"scroll-mr": [{ "scroll-mr": k() }],
|
|
3439
|
+
"scroll-mb": [{ "scroll-mb": k() }],
|
|
3440
|
+
"scroll-ml": [{ "scroll-ml": k() }],
|
|
3441
|
+
"scroll-p": [{ "scroll-p": k() }],
|
|
3442
|
+
"scroll-px": [{ "scroll-px": k() }],
|
|
3443
|
+
"scroll-py": [{ "scroll-py": k() }],
|
|
3444
|
+
"scroll-ps": [{ "scroll-ps": k() }],
|
|
3445
|
+
"scroll-pe": [{ "scroll-pe": k() }],
|
|
3446
|
+
"scroll-pt": [{ "scroll-pt": k() }],
|
|
3447
|
+
"scroll-pr": [{ "scroll-pr": k() }],
|
|
3448
|
+
"scroll-pb": [{ "scroll-pb": k() }],
|
|
3449
|
+
"scroll-pl": [{ "scroll-pl": k() }],
|
|
1520
3450
|
"snap-align": [{ snap: [
|
|
1521
3451
|
"start",
|
|
1522
3452
|
"end",
|
|
@@ -1558,17 +3488,17 @@ var Ye = (e, t) => {
|
|
|
1558
3488
|
"scroll",
|
|
1559
3489
|
"contents",
|
|
1560
3490
|
"transform",
|
|
1561
|
-
|
|
1562
|
-
|
|
3491
|
+
y,
|
|
3492
|
+
b
|
|
1563
3493
|
] }],
|
|
1564
|
-
fill: [{ fill: ["none", ...
|
|
3494
|
+
fill: [{ fill: ["none", ...N()] }],
|
|
1565
3495
|
"stroke-w": [{ stroke: [
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
3496
|
+
A,
|
|
3497
|
+
ve,
|
|
3498
|
+
ae,
|
|
3499
|
+
tt
|
|
1570
3500
|
] }],
|
|
1571
|
-
stroke: [{ stroke: ["none", ...
|
|
3501
|
+
stroke: [{ stroke: ["none", ...N()] }],
|
|
1572
3502
|
"forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
|
|
1573
3503
|
},
|
|
1574
3504
|
conflictingClassGroups: {
|
|
@@ -1738,11 +3668,11 @@ var Ye = (e, t) => {
|
|
|
1738
3668
|
"selection"
|
|
1739
3669
|
]
|
|
1740
3670
|
};
|
|
1741
|
-
},
|
|
1742
|
-
function
|
|
1743
|
-
return
|
|
3671
|
+
}, Ni = /* @__PURE__ */ ai(Ei);
|
|
3672
|
+
function P(...e) {
|
|
3673
|
+
return Ni(Qt(e));
|
|
1744
3674
|
}
|
|
1745
|
-
var
|
|
3675
|
+
var Ri = Jt("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
|
|
1746
3676
|
variants: {
|
|
1747
3677
|
variant: {
|
|
1748
3678
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
@@ -1768,20 +3698,966 @@ var jr = Ne("inline-flex items-center justify-center gap-2 whitespace-nowrap rou
|
|
|
1768
3698
|
size: "default"
|
|
1769
3699
|
}
|
|
1770
3700
|
});
|
|
1771
|
-
function
|
|
1772
|
-
return /* @__PURE__ */
|
|
3701
|
+
function X({ className: e, variant: t = "default", size: r = "default", asChild: n = !1, ...o }) {
|
|
3702
|
+
return /* @__PURE__ */ c(n ? tr : "button", {
|
|
1773
3703
|
"data-slot": "button",
|
|
1774
3704
|
"data-variant": t,
|
|
1775
3705
|
"data-size": r,
|
|
1776
|
-
className:
|
|
3706
|
+
className: P(Ri({
|
|
1777
3707
|
variant: t,
|
|
1778
3708
|
size: r,
|
|
1779
3709
|
className: e
|
|
1780
3710
|
})),
|
|
3711
|
+
...o
|
|
3712
|
+
});
|
|
3713
|
+
}
|
|
3714
|
+
var xn = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim();
|
|
3715
|
+
var Pi = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
3716
|
+
var Ai = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (t, r, n) => n ? n.toUpperCase() : r.toLowerCase());
|
|
3717
|
+
var Xt = (e) => {
|
|
3718
|
+
const t = Ai(e);
|
|
3719
|
+
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
3720
|
+
};
|
|
3721
|
+
var Ti = {
|
|
3722
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3723
|
+
width: 24,
|
|
3724
|
+
height: 24,
|
|
3725
|
+
viewBox: "0 0 24 24",
|
|
3726
|
+
fill: "none",
|
|
3727
|
+
stroke: "currentColor",
|
|
3728
|
+
strokeWidth: 2,
|
|
3729
|
+
strokeLinecap: "round",
|
|
3730
|
+
strokeLinejoin: "round"
|
|
3731
|
+
};
|
|
3732
|
+
var Oi = (e) => {
|
|
3733
|
+
for (const t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
3734
|
+
return !1;
|
|
3735
|
+
};
|
|
3736
|
+
var Di = Kt(({ color: e = "currentColor", size: t = 24, strokeWidth: r = 2, absoluteStrokeWidth: n, className: o = "", children: a, iconNode: l, ...i }, d) => rt("svg", {
|
|
3737
|
+
ref: d,
|
|
3738
|
+
...Ti,
|
|
3739
|
+
width: t,
|
|
3740
|
+
height: t,
|
|
3741
|
+
stroke: e,
|
|
3742
|
+
strokeWidth: n ? Number(r) * 24 / Number(t) : r,
|
|
3743
|
+
className: xn("lucide", o),
|
|
3744
|
+
...!a && !Oi(i) && { "aria-hidden": "true" },
|
|
3745
|
+
...i
|
|
3746
|
+
}, [...l.map(([u, f]) => rt(u, f)), ...Array.isArray(a) ? a : [a]]));
|
|
3747
|
+
var J = (e, t) => {
|
|
3748
|
+
const r = Kt(({ className: n, ...o }, a) => rt(Di, {
|
|
3749
|
+
ref: a,
|
|
3750
|
+
iconNode: t,
|
|
3751
|
+
className: xn(`lucide-${Pi(Xt(e))}`, `lucide-${e}`, n),
|
|
3752
|
+
...o
|
|
3753
|
+
}));
|
|
3754
|
+
return r.displayName = Xt(e), r;
|
|
3755
|
+
};
|
|
3756
|
+
var _i = [["path", {
|
|
3757
|
+
d: "m12 19-7-7 7-7",
|
|
3758
|
+
key: "1l729n"
|
|
3759
|
+
}], ["path", {
|
|
3760
|
+
d: "M19 12H5",
|
|
3761
|
+
key: "x3x0zl"
|
|
3762
|
+
}]], Mi = J("arrow-left", _i);
|
|
3763
|
+
var Ii = [["path", {
|
|
3764
|
+
d: "M20 6 9 17l-5-5",
|
|
3765
|
+
key: "1gmf2c"
|
|
3766
|
+
}]], zi = J("check", Ii);
|
|
3767
|
+
var Li = [["circle", {
|
|
3768
|
+
cx: "12",
|
|
3769
|
+
cy: "12",
|
|
3770
|
+
r: "10",
|
|
3771
|
+
key: "1mglay"
|
|
3772
|
+
}], ["path", {
|
|
3773
|
+
d: "m9 12 2 2 4-4",
|
|
3774
|
+
key: "dzmm74"
|
|
3775
|
+
}]], Fi = J("circle-check", Li);
|
|
3776
|
+
var Wi = [["path", {
|
|
3777
|
+
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
3778
|
+
key: "13zald"
|
|
3779
|
+
}]], Bi = J("loader-circle", Wi);
|
|
3780
|
+
var $i = [["path", {
|
|
3781
|
+
d: "M5 12h14",
|
|
3782
|
+
key: "1ays0h"
|
|
3783
|
+
}]], ji = J("minus", $i);
|
|
3784
|
+
var Ui = [["path", {
|
|
3785
|
+
d: "M5 12h14",
|
|
3786
|
+
key: "1ays0h"
|
|
3787
|
+
}], ["path", {
|
|
3788
|
+
d: "M12 5v14",
|
|
3789
|
+
key: "s699le"
|
|
3790
|
+
}]], Vi = J("plus", Ui);
|
|
3791
|
+
var Hi = [
|
|
3792
|
+
["circle", {
|
|
3793
|
+
cx: "8",
|
|
3794
|
+
cy: "21",
|
|
3795
|
+
r: "1",
|
|
3796
|
+
key: "jimo8o"
|
|
3797
|
+
}],
|
|
3798
|
+
["circle", {
|
|
3799
|
+
cx: "19",
|
|
3800
|
+
cy: "21",
|
|
3801
|
+
r: "1",
|
|
3802
|
+
key: "13723u"
|
|
3803
|
+
}],
|
|
3804
|
+
["path", {
|
|
3805
|
+
d: "M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",
|
|
3806
|
+
key: "9zh506"
|
|
3807
|
+
}]
|
|
3808
|
+
], wn = J("shopping-cart", Hi);
|
|
3809
|
+
var Gi = [
|
|
3810
|
+
["path", {
|
|
3811
|
+
d: "M10 11v6",
|
|
3812
|
+
key: "nco0om"
|
|
3813
|
+
}],
|
|
3814
|
+
["path", {
|
|
3815
|
+
d: "M14 11v6",
|
|
3816
|
+
key: "outv1u"
|
|
3817
|
+
}],
|
|
3818
|
+
["path", {
|
|
3819
|
+
d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",
|
|
3820
|
+
key: "miytrc"
|
|
3821
|
+
}],
|
|
3822
|
+
["path", {
|
|
3823
|
+
d: "M3 6h18",
|
|
3824
|
+
key: "d0wm0j"
|
|
3825
|
+
}],
|
|
3826
|
+
["path", {
|
|
3827
|
+
d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
|
|
3828
|
+
key: "e791ji"
|
|
3829
|
+
}]
|
|
3830
|
+
], Xi = J("trash-2", Gi);
|
|
3831
|
+
var Yi = [["path", {
|
|
3832
|
+
d: "M18 6 6 18",
|
|
3833
|
+
key: "1bl5f8"
|
|
3834
|
+
}], ["path", {
|
|
3835
|
+
d: "m6 6 12 12",
|
|
3836
|
+
key: "d8bk6v"
|
|
3837
|
+
}]], vt = J("x", Yi);
|
|
3838
|
+
function ws({ title: e, subtitle: t, showBack: r = !1, onBack: n, actions: o, className: a }) {
|
|
3839
|
+
return /* @__PURE__ */ c("header", {
|
|
3840
|
+
className: P("sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", a),
|
|
3841
|
+
children: /* @__PURE__ */ x("div", {
|
|
3842
|
+
className: "flex h-14 items-center gap-4 px-4",
|
|
3843
|
+
children: [
|
|
3844
|
+
r && /* @__PURE__ */ c(X, {
|
|
3845
|
+
variant: "ghost",
|
|
3846
|
+
size: "icon-sm",
|
|
3847
|
+
onClick: n,
|
|
3848
|
+
"aria-label": "Voltar",
|
|
3849
|
+
children: /* @__PURE__ */ c(Mi, {})
|
|
3850
|
+
}),
|
|
3851
|
+
/* @__PURE__ */ x("div", {
|
|
3852
|
+
className: "flex flex-1 flex-col justify-center min-w-0",
|
|
3853
|
+
children: [/* @__PURE__ */ c("h1", {
|
|
3854
|
+
className: "text-lg font-semibold leading-none truncate",
|
|
3855
|
+
children: e
|
|
3856
|
+
}), t && /* @__PURE__ */ c("p", {
|
|
3857
|
+
className: "text-sm text-muted-foreground truncate",
|
|
3858
|
+
children: t
|
|
3859
|
+
})]
|
|
3860
|
+
}),
|
|
3861
|
+
o && /* @__PURE__ */ c("div", {
|
|
3862
|
+
className: "flex items-center gap-2",
|
|
3863
|
+
children: o
|
|
3864
|
+
})
|
|
3865
|
+
]
|
|
3866
|
+
})
|
|
3867
|
+
});
|
|
3868
|
+
}
|
|
3869
|
+
var qi = Jt("inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", {
|
|
3870
|
+
variants: { variant: {
|
|
3871
|
+
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
3872
|
+
secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
3873
|
+
destructive: "bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
3874
|
+
outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
3875
|
+
ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
3876
|
+
link: "text-primary underline-offset-4 [a&]:hover:underline"
|
|
3877
|
+
} },
|
|
3878
|
+
defaultVariants: { variant: "default" }
|
|
3879
|
+
});
|
|
3880
|
+
function Le({ className: e, variant: t = "default", asChild: r = !1, ...n }) {
|
|
3881
|
+
return /* @__PURE__ */ c(r ? tr : "span", {
|
|
3882
|
+
"data-slot": "badge",
|
|
3883
|
+
"data-variant": t,
|
|
3884
|
+
className: P(qi({ variant: t }), e),
|
|
3885
|
+
...n
|
|
3886
|
+
});
|
|
3887
|
+
}
|
|
3888
|
+
function j(e) {
|
|
3889
|
+
return new Intl.NumberFormat("pt-BR", {
|
|
3890
|
+
style: "currency",
|
|
3891
|
+
currency: "BRL"
|
|
3892
|
+
}).format(e);
|
|
3893
|
+
}
|
|
3894
|
+
function Ss({ count: e, total: t, onClick: r, className: n }) {
|
|
3895
|
+
return e === 0 ? null : /* @__PURE__ */ x(X, {
|
|
3896
|
+
variant: "ghost",
|
|
3897
|
+
onClick: r,
|
|
3898
|
+
className: P("relative gap-2 font-semibold text-primary hover:text-primary", n),
|
|
3899
|
+
children: [/* @__PURE__ */ x("div", {
|
|
3900
|
+
className: "relative",
|
|
3901
|
+
children: [/* @__PURE__ */ c(wn, { className: "size-5" }), /* @__PURE__ */ c(Le, {
|
|
3902
|
+
variant: "destructive",
|
|
3903
|
+
className: "absolute -right-2 -top-2 size-5 flex items-center justify-center p-0 text-xs font-bold",
|
|
3904
|
+
children: e
|
|
3905
|
+
})]
|
|
3906
|
+
}), /* @__PURE__ */ c("span", {
|
|
3907
|
+
className: "hidden sm:inline",
|
|
3908
|
+
children: j(t)
|
|
3909
|
+
})]
|
|
3910
|
+
});
|
|
3911
|
+
}
|
|
3912
|
+
function Sn({ value: e, onChange: t, min: r = 1, max: n, size: o = "default", className: a }) {
|
|
3913
|
+
const l = () => {
|
|
3914
|
+
e > r && t(e - 1);
|
|
3915
|
+
}, i = () => {
|
|
3916
|
+
(!n || e < n) && t(e + 1);
|
|
3917
|
+
}, d = e > r, u = !n || e < n, f = {
|
|
3918
|
+
sm: "h-7 gap-2",
|
|
3919
|
+
default: "h-9 gap-3",
|
|
3920
|
+
lg: "h-11 gap-4"
|
|
3921
|
+
}, m = o === "sm" ? "icon-xs" : o === "lg" ? "icon-sm" : "icon-xs", p = o === "sm" ? "text-sm" : o === "lg" ? "text-lg" : "text-base";
|
|
3922
|
+
return /* @__PURE__ */ x("div", {
|
|
3923
|
+
className: P("inline-flex items-center rounded-md border bg-background", f[o], a),
|
|
3924
|
+
children: [
|
|
3925
|
+
/* @__PURE__ */ c(X, {
|
|
3926
|
+
variant: "ghost",
|
|
3927
|
+
size: m,
|
|
3928
|
+
onClick: l,
|
|
3929
|
+
disabled: !d,
|
|
3930
|
+
"aria-label": "Diminuir quantidade",
|
|
3931
|
+
className: "rounded-r-none",
|
|
3932
|
+
children: /* @__PURE__ */ c(ji, {})
|
|
3933
|
+
}),
|
|
3934
|
+
/* @__PURE__ */ c("span", {
|
|
3935
|
+
className: P("min-w-8 text-center font-semibold tabular-nums", p),
|
|
3936
|
+
children: e
|
|
3937
|
+
}),
|
|
3938
|
+
/* @__PURE__ */ c(X, {
|
|
3939
|
+
variant: "ghost",
|
|
3940
|
+
size: m,
|
|
3941
|
+
onClick: i,
|
|
3942
|
+
disabled: !u,
|
|
3943
|
+
"aria-label": "Aumentar quantidade",
|
|
3944
|
+
className: "rounded-l-none",
|
|
3945
|
+
children: /* @__PURE__ */ c(Vi, {})
|
|
3946
|
+
})
|
|
3947
|
+
]
|
|
3948
|
+
});
|
|
3949
|
+
}
|
|
3950
|
+
function Cs({ children: e, className: t, ...r }) {
|
|
3951
|
+
return /* @__PURE__ */ c("div", {
|
|
3952
|
+
className: P("grid gap-4 p-4", "grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6", t),
|
|
3953
|
+
...r,
|
|
3954
|
+
children: e
|
|
3955
|
+
});
|
|
3956
|
+
}
|
|
3957
|
+
function Cn({ className: e, ...t }) {
|
|
3958
|
+
return /* @__PURE__ */ c("div", {
|
|
3959
|
+
"data-slot": "card",
|
|
3960
|
+
className: P("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", e),
|
|
3961
|
+
...t
|
|
3962
|
+
});
|
|
3963
|
+
}
|
|
3964
|
+
var Ki = {
|
|
3965
|
+
available: {
|
|
3966
|
+
label: "Livre",
|
|
3967
|
+
variant: "default"
|
|
3968
|
+
},
|
|
3969
|
+
occupied: {
|
|
3970
|
+
label: "Ocupada",
|
|
3971
|
+
variant: "destructive"
|
|
3972
|
+
},
|
|
3973
|
+
reserved: {
|
|
3974
|
+
label: "Reservada",
|
|
3975
|
+
variant: "secondary"
|
|
3976
|
+
}
|
|
3977
|
+
};
|
|
3978
|
+
function Zi({ status: e, className: t }) {
|
|
3979
|
+
const r = Ki[e];
|
|
3980
|
+
return /* @__PURE__ */ c(Le, {
|
|
3981
|
+
variant: r.variant,
|
|
3982
|
+
className: P("text-xs", t),
|
|
3983
|
+
children: r.label
|
|
3984
|
+
});
|
|
3985
|
+
}
|
|
3986
|
+
function ks({ number: e, status: t, onClick: r, className: n }) {
|
|
3987
|
+
const o = t === "reserved";
|
|
3988
|
+
return /* @__PURE__ */ x(Cn, {
|
|
3989
|
+
className: P("relative flex aspect-square cursor-pointer flex-col items-center justify-center gap-2 p-4 transition-all", "hover:scale-105 hover:shadow-lg", "active:scale-95", o && "cursor-not-allowed opacity-50 hover:scale-100", n),
|
|
3990
|
+
onClick: o ? void 0 : r,
|
|
3991
|
+
children: [
|
|
3992
|
+
/* @__PURE__ */ c("span", {
|
|
3993
|
+
className: "text-sm text-muted-foreground font-medium uppercase",
|
|
3994
|
+
children: "Mesa"
|
|
3995
|
+
}),
|
|
3996
|
+
/* @__PURE__ */ c("span", {
|
|
3997
|
+
className: "text-4xl font-bold leading-none",
|
|
3998
|
+
children: e
|
|
3999
|
+
}),
|
|
4000
|
+
/* @__PURE__ */ c(Zi, { status: t })
|
|
4001
|
+
]
|
|
4002
|
+
});
|
|
4003
|
+
}
|
|
4004
|
+
function gt({ className: e, children: t, ...r }) {
|
|
4005
|
+
return /* @__PURE__ */ x(Da, {
|
|
4006
|
+
"data-slot": "scroll-area",
|
|
4007
|
+
className: P("relative", e),
|
|
4008
|
+
...r,
|
|
4009
|
+
children: [
|
|
4010
|
+
/* @__PURE__ */ c(_a, {
|
|
4011
|
+
"data-slot": "scroll-area-viewport",
|
|
4012
|
+
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
|
|
4013
|
+
children: t
|
|
4014
|
+
}),
|
|
4015
|
+
/* @__PURE__ */ c(Qi, {}),
|
|
4016
|
+
/* @__PURE__ */ c(Ma, {})
|
|
4017
|
+
]
|
|
4018
|
+
});
|
|
4019
|
+
}
|
|
4020
|
+
function Qi({ className: e, orientation: t = "vertical", ...r }) {
|
|
4021
|
+
return /* @__PURE__ */ c(Zr, {
|
|
4022
|
+
"data-slot": "scroll-area-scrollbar",
|
|
4023
|
+
orientation: t,
|
|
4024
|
+
className: P("flex touch-none p-px transition-colors select-none", t === "vertical" && "h-full w-2.5 border-l border-l-transparent", t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", e),
|
|
4025
|
+
...r,
|
|
4026
|
+
children: /* @__PURE__ */ c(tn, {
|
|
4027
|
+
"data-slot": "scroll-area-thumb",
|
|
4028
|
+
className: "bg-border relative flex-1 rounded-full"
|
|
4029
|
+
})
|
|
4030
|
+
});
|
|
4031
|
+
}
|
|
4032
|
+
function Yt({ name: e, isActive: t = !1, onClick: r, className: n }) {
|
|
4033
|
+
return /* @__PURE__ */ c(X, {
|
|
4034
|
+
variant: t ? "default" : "outline",
|
|
4035
|
+
size: "sm",
|
|
4036
|
+
onClick: r,
|
|
4037
|
+
className: P("shrink-0 rounded-full px-4 transition-all", t && "shadow-sm", n),
|
|
4038
|
+
children: e
|
|
4039
|
+
});
|
|
4040
|
+
}
|
|
4041
|
+
function Es({ categories: e, activeCategory: t, onSelectCategory: r, className: n }) {
|
|
4042
|
+
return /* @__PURE__ */ c("div", {
|
|
4043
|
+
className: P("sticky top-14 z-40 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", n),
|
|
4044
|
+
children: /* @__PURE__ */ c(gt, {
|
|
4045
|
+
className: "w-full",
|
|
4046
|
+
children: /* @__PURE__ */ x("div", {
|
|
4047
|
+
className: "flex gap-2 p-4",
|
|
4048
|
+
children: [/* @__PURE__ */ c(Yt, {
|
|
4049
|
+
name: "Todos",
|
|
4050
|
+
isActive: !t,
|
|
4051
|
+
onClick: () => r("")
|
|
4052
|
+
}), e.map((o) => /* @__PURE__ */ c(Yt, {
|
|
4053
|
+
name: o.name,
|
|
4054
|
+
isActive: t === o.id,
|
|
4055
|
+
onClick: () => r(o.id)
|
|
4056
|
+
}, o.id))]
|
|
4057
|
+
})
|
|
4058
|
+
})
|
|
4059
|
+
});
|
|
4060
|
+
}
|
|
4061
|
+
function Ns({ children: e, className: t, ...r }) {
|
|
4062
|
+
return /* @__PURE__ */ c("div", {
|
|
4063
|
+
className: P("grid gap-4 p-4", "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4", t),
|
|
4064
|
+
...r,
|
|
4065
|
+
children: e
|
|
4066
|
+
});
|
|
4067
|
+
}
|
|
4068
|
+
function Rs({ product: e, onClick: t, className: r }) {
|
|
4069
|
+
const n = !e.isActive;
|
|
4070
|
+
return /* @__PURE__ */ x(Cn, {
|
|
4071
|
+
className: P("group relative flex cursor-pointer flex-col overflow-hidden transition-all", "hover:shadow-lg hover:scale-[1.02]", "active:scale-[0.98]", n && "cursor-not-allowed opacity-50 hover:scale-100", r),
|
|
4072
|
+
onClick: n ? void 0 : t,
|
|
4073
|
+
children: [/* @__PURE__ */ x("div", {
|
|
4074
|
+
className: "relative aspect-video w-full overflow-hidden bg-muted",
|
|
4075
|
+
children: [
|
|
4076
|
+
e.imageUrl ? /* @__PURE__ */ c("img", {
|
|
4077
|
+
src: e.imageUrl,
|
|
4078
|
+
alt: e.name,
|
|
4079
|
+
className: "size-full object-cover transition-transform group-hover:scale-110"
|
|
4080
|
+
}) : /* @__PURE__ */ c("div", {
|
|
4081
|
+
className: "flex size-full items-center justify-center text-muted-foreground",
|
|
4082
|
+
children: /* @__PURE__ */ c("span", {
|
|
4083
|
+
className: "text-sm",
|
|
4084
|
+
children: "Sem imagem"
|
|
4085
|
+
})
|
|
4086
|
+
}),
|
|
4087
|
+
/* @__PURE__ */ c(Le, {
|
|
4088
|
+
variant: "secondary",
|
|
4089
|
+
className: "absolute right-2 top-2 bg-background/90 backdrop-blur-sm font-semibold",
|
|
4090
|
+
children: j(e.price)
|
|
4091
|
+
}),
|
|
4092
|
+
n && /* @__PURE__ */ c(Le, {
|
|
4093
|
+
variant: "destructive",
|
|
4094
|
+
className: "absolute left-2 top-2 bg-destructive/90 backdrop-blur-sm",
|
|
4095
|
+
children: "Indisponível"
|
|
4096
|
+
})
|
|
4097
|
+
]
|
|
4098
|
+
}), /* @__PURE__ */ x("div", {
|
|
4099
|
+
className: "flex flex-1 flex-col gap-1 p-3",
|
|
4100
|
+
children: [/* @__PURE__ */ c("h3", {
|
|
4101
|
+
className: "font-semibold leading-tight line-clamp-1",
|
|
4102
|
+
children: e.name
|
|
4103
|
+
}), e.description && /* @__PURE__ */ c("p", {
|
|
4104
|
+
className: "text-sm text-muted-foreground line-clamp-2",
|
|
4105
|
+
children: e.description
|
|
4106
|
+
})]
|
|
4107
|
+
})]
|
|
4108
|
+
});
|
|
4109
|
+
}
|
|
4110
|
+
function Ji({ basePrice: e, additionalPrice: t, className: r }) {
|
|
4111
|
+
const n = e + t, o = t > 0;
|
|
4112
|
+
return /* @__PURE__ */ c("div", {
|
|
4113
|
+
className: P("flex flex-col gap-1", r),
|
|
4114
|
+
children: o ? /* @__PURE__ */ x(ne, { children: [/* @__PURE__ */ x("div", {
|
|
4115
|
+
className: "flex items-center gap-2 text-sm text-muted-foreground",
|
|
4116
|
+
children: [
|
|
4117
|
+
/* @__PURE__ */ c("span", { children: j(e) }),
|
|
4118
|
+
/* @__PURE__ */ c("span", { children: "+" }),
|
|
4119
|
+
/* @__PURE__ */ c("span", {
|
|
4120
|
+
className: "text-primary font-medium",
|
|
4121
|
+
children: j(t)
|
|
4122
|
+
})
|
|
4123
|
+
]
|
|
4124
|
+
}), /* @__PURE__ */ c("div", {
|
|
4125
|
+
className: "text-2xl font-bold text-primary",
|
|
4126
|
+
children: j(n)
|
|
4127
|
+
})] }) : /* @__PURE__ */ c("div", {
|
|
4128
|
+
className: "text-2xl font-bold text-primary",
|
|
4129
|
+
children: j(n)
|
|
4130
|
+
})
|
|
4131
|
+
});
|
|
4132
|
+
}
|
|
4133
|
+
function kn({ ...e }) {
|
|
4134
|
+
return /* @__PURE__ */ c(Dr, {
|
|
4135
|
+
"data-slot": "dialog",
|
|
4136
|
+
...e
|
|
4137
|
+
});
|
|
4138
|
+
}
|
|
4139
|
+
function es({ ...e }) {
|
|
4140
|
+
return /* @__PURE__ */ c(_r, {
|
|
4141
|
+
"data-slot": "dialog-portal",
|
|
4142
|
+
...e
|
|
4143
|
+
});
|
|
4144
|
+
}
|
|
4145
|
+
function ts({ className: e, ...t }) {
|
|
4146
|
+
return /* @__PURE__ */ c(Mr, {
|
|
4147
|
+
"data-slot": "dialog-overlay",
|
|
4148
|
+
className: P("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", e),
|
|
4149
|
+
...t
|
|
4150
|
+
});
|
|
4151
|
+
}
|
|
4152
|
+
function En({ className: e, children: t, showCloseButton: r = !0, ...n }) {
|
|
4153
|
+
return /* @__PURE__ */ x(es, {
|
|
4154
|
+
"data-slot": "dialog-portal",
|
|
4155
|
+
children: [/* @__PURE__ */ c(ts, {}), /* @__PURE__ */ x(Ir, {
|
|
4156
|
+
"data-slot": "dialog-content",
|
|
4157
|
+
className: P("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg", e),
|
|
4158
|
+
...n,
|
|
4159
|
+
children: [t, r && /* @__PURE__ */ x(Lr, {
|
|
4160
|
+
"data-slot": "dialog-close",
|
|
4161
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
4162
|
+
children: [/* @__PURE__ */ c(vt, {}), /* @__PURE__ */ c("span", {
|
|
4163
|
+
className: "sr-only",
|
|
4164
|
+
children: "Close"
|
|
4165
|
+
})]
|
|
4166
|
+
})]
|
|
4167
|
+
})]
|
|
4168
|
+
});
|
|
4169
|
+
}
|
|
4170
|
+
function Nn({ className: e, ...t }) {
|
|
4171
|
+
return /* @__PURE__ */ c("div", {
|
|
4172
|
+
"data-slot": "dialog-header",
|
|
4173
|
+
className: P("flex flex-col gap-2 text-center sm:text-left", e),
|
|
4174
|
+
...t
|
|
4175
|
+
});
|
|
4176
|
+
}
|
|
4177
|
+
function Rn({ className: e, ...t }) {
|
|
4178
|
+
return /* @__PURE__ */ c(zr, {
|
|
4179
|
+
"data-slot": "dialog-title",
|
|
4180
|
+
className: P("text-lg leading-none font-semibold", e),
|
|
4181
|
+
...t
|
|
4182
|
+
});
|
|
4183
|
+
}
|
|
4184
|
+
function De({ className: e, orientation: t = "horizontal", decorative: r = !0, ...n }) {
|
|
4185
|
+
return /* @__PURE__ */ c(Fa, {
|
|
4186
|
+
"data-slot": "separator",
|
|
4187
|
+
decorative: r,
|
|
4188
|
+
orientation: t,
|
|
4189
|
+
className: P("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", e),
|
|
1781
4190
|
...n
|
|
1782
4191
|
});
|
|
1783
4192
|
}
|
|
4193
|
+
function qt({ title: e, description: t, children: r, className: n }) {
|
|
4194
|
+
return /* @__PURE__ */ x("div", {
|
|
4195
|
+
className: P("space-y-3", n),
|
|
4196
|
+
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ c("h3", {
|
|
4197
|
+
className: "text-sm font-medium leading-none",
|
|
4198
|
+
children: e
|
|
4199
|
+
}), t && /* @__PURE__ */ c("p", {
|
|
4200
|
+
className: "mt-1 text-xs text-muted-foreground",
|
|
4201
|
+
children: t
|
|
4202
|
+
})] }), /* @__PURE__ */ c("div", {
|
|
4203
|
+
className: "space-y-2",
|
|
4204
|
+
children: r
|
|
4205
|
+
})]
|
|
4206
|
+
});
|
|
4207
|
+
}
|
|
4208
|
+
function Pn({ className: e, ...t }) {
|
|
4209
|
+
return /* @__PURE__ */ c(Br, {
|
|
4210
|
+
"data-slot": "checkbox",
|
|
4211
|
+
className: P("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", e),
|
|
4212
|
+
...t,
|
|
4213
|
+
children: /* @__PURE__ */ c(jr, {
|
|
4214
|
+
"data-slot": "checkbox-indicator",
|
|
4215
|
+
className: "grid place-content-center text-current transition-none",
|
|
4216
|
+
children: /* @__PURE__ */ c(zi, { className: "size-3.5" })
|
|
4217
|
+
})
|
|
4218
|
+
});
|
|
4219
|
+
}
|
|
4220
|
+
function An({ className: e, ...t }) {
|
|
4221
|
+
return /* @__PURE__ */ c(ya, {
|
|
4222
|
+
"data-slot": "label",
|
|
4223
|
+
className: P("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", e),
|
|
4224
|
+
...t
|
|
4225
|
+
});
|
|
4226
|
+
}
|
|
4227
|
+
function rs({ ingredient: e, checked: t, onCheckedChange: r, className: n }) {
|
|
4228
|
+
const o = `ingredient-${e.id}`, a = e.unit ? `${e.quantity} ${e.unit}` : e.quantity > 1 ? `${e.quantity}x` : "";
|
|
4229
|
+
return /* @__PURE__ */ x("div", {
|
|
4230
|
+
className: P("flex items-center gap-3", n),
|
|
4231
|
+
children: [/* @__PURE__ */ c(Pn, {
|
|
4232
|
+
id: o,
|
|
4233
|
+
checked: t,
|
|
4234
|
+
onCheckedChange: r
|
|
4235
|
+
}), /* @__PURE__ */ x(An, {
|
|
4236
|
+
htmlFor: o,
|
|
4237
|
+
className: "flex-1 cursor-pointer select-none text-sm leading-tight",
|
|
4238
|
+
children: [/* @__PURE__ */ c("span", {
|
|
4239
|
+
className: P(t && "line-through text-muted-foreground"),
|
|
4240
|
+
children: e.name
|
|
4241
|
+
}), a && /* @__PURE__ */ x("span", {
|
|
4242
|
+
className: "ml-2 text-xs text-muted-foreground",
|
|
4243
|
+
children: [
|
|
4244
|
+
"(",
|
|
4245
|
+
a,
|
|
4246
|
+
")"
|
|
4247
|
+
]
|
|
4248
|
+
})]
|
|
4249
|
+
})]
|
|
4250
|
+
});
|
|
4251
|
+
}
|
|
4252
|
+
function ns({ extra: e, checked: t, onCheckedChange: r, className: n }) {
|
|
4253
|
+
const o = `extra-${e.id}`;
|
|
4254
|
+
return /* @__PURE__ */ x("div", {
|
|
4255
|
+
className: P("flex items-center gap-3", n),
|
|
4256
|
+
children: [/* @__PURE__ */ c(Pn, {
|
|
4257
|
+
id: o,
|
|
4258
|
+
checked: t,
|
|
4259
|
+
onCheckedChange: r
|
|
4260
|
+
}), /* @__PURE__ */ x(An, {
|
|
4261
|
+
htmlFor: o,
|
|
4262
|
+
className: "flex flex-1 cursor-pointer select-none items-center justify-between text-sm leading-tight",
|
|
4263
|
+
children: [/* @__PURE__ */ c("span", {
|
|
4264
|
+
className: P(t && "font-medium text-primary"),
|
|
4265
|
+
children: e.name
|
|
4266
|
+
}), /* @__PURE__ */ x("span", {
|
|
4267
|
+
className: P("text-sm font-semibold", t ? "text-primary" : "text-muted-foreground"),
|
|
4268
|
+
children: ["+ ", j(e.price)]
|
|
4269
|
+
})]
|
|
4270
|
+
})]
|
|
4271
|
+
});
|
|
4272
|
+
}
|
|
4273
|
+
function Ps({ open: e, onOpenChange: t, product: r, removableIngredients: n = [], availableExtras: o = [], onAddToCart: a, className: l }) {
|
|
4274
|
+
const [i, d] = s.useState(1), [u, f] = s.useState([]), [m, p] = s.useState([]), [g, C] = s.useState("");
|
|
4275
|
+
s.useEffect(() => {
|
|
4276
|
+
e && (d(1), f([]), p([]), C(""));
|
|
4277
|
+
}, [e]);
|
|
4278
|
+
const h = m.reduce((w, S) => w + (o.find((D) => D.id === S)?.price || 0), 0), v = (w, S) => {
|
|
4279
|
+
f((D) => S ? [...D, w] : D.filter((_) => _ !== w));
|
|
4280
|
+
}, E = (w, S) => {
|
|
4281
|
+
p((D) => S ? [...D, w] : D.filter((_) => _ !== w));
|
|
4282
|
+
}, R = () => {
|
|
4283
|
+
a({
|
|
4284
|
+
productId: r.id,
|
|
4285
|
+
quantity: i,
|
|
4286
|
+
removedIngredients: u,
|
|
4287
|
+
addedExtras: m,
|
|
4288
|
+
notes: g.trim() || void 0
|
|
4289
|
+
}), t(!1);
|
|
4290
|
+
};
|
|
4291
|
+
return /* @__PURE__ */ c(kn, {
|
|
4292
|
+
open: e,
|
|
4293
|
+
onOpenChange: t,
|
|
4294
|
+
children: /* @__PURE__ */ x(En, {
|
|
4295
|
+
className: P("flex max-h-[90vh] max-w-lg flex-col gap-0 p-0", l),
|
|
4296
|
+
children: [
|
|
4297
|
+
/* @__PURE__ */ x("div", {
|
|
4298
|
+
className: "relative",
|
|
4299
|
+
children: [r.imageUrl && /* @__PURE__ */ c("div", {
|
|
4300
|
+
className: "aspect-video w-full overflow-hidden bg-muted",
|
|
4301
|
+
children: /* @__PURE__ */ c("img", {
|
|
4302
|
+
src: r.imageUrl,
|
|
4303
|
+
alt: r.name,
|
|
4304
|
+
className: "size-full object-cover"
|
|
4305
|
+
})
|
|
4306
|
+
}), /* @__PURE__ */ c(X, {
|
|
4307
|
+
variant: "ghost",
|
|
4308
|
+
size: "icon-sm",
|
|
4309
|
+
onClick: () => t(!1),
|
|
4310
|
+
className: "absolute right-2 top-2 bg-background/80 backdrop-blur-sm hover:bg-background",
|
|
4311
|
+
children: /* @__PURE__ */ c(vt, {})
|
|
4312
|
+
})]
|
|
4313
|
+
}),
|
|
4314
|
+
/* @__PURE__ */ c(gt, {
|
|
4315
|
+
className: "flex-1",
|
|
4316
|
+
children: /* @__PURE__ */ x("div", {
|
|
4317
|
+
className: "space-y-4 p-6",
|
|
4318
|
+
children: [
|
|
4319
|
+
/* @__PURE__ */ x(Nn, { children: [/* @__PURE__ */ c(Rn, {
|
|
4320
|
+
className: "text-2xl",
|
|
4321
|
+
children: r.name
|
|
4322
|
+
}), r.description && /* @__PURE__ */ c("p", {
|
|
4323
|
+
className: "text-muted-foreground",
|
|
4324
|
+
children: r.description
|
|
4325
|
+
})] }),
|
|
4326
|
+
/* @__PURE__ */ c(Ji, {
|
|
4327
|
+
basePrice: r.price,
|
|
4328
|
+
additionalPrice: h
|
|
4329
|
+
}),
|
|
4330
|
+
n.length > 0 && /* @__PURE__ */ x(ne, { children: [/* @__PURE__ */ c(De, {}), /* @__PURE__ */ c(qt, {
|
|
4331
|
+
title: "Remover ingredientes?",
|
|
4332
|
+
children: n.map((w) => /* @__PURE__ */ c(rs, {
|
|
4333
|
+
ingredient: w,
|
|
4334
|
+
checked: u.includes(w.id),
|
|
4335
|
+
onCheckedChange: (S) => v(w.id, S)
|
|
4336
|
+
}, w.id))
|
|
4337
|
+
})] }),
|
|
4338
|
+
o.length > 0 && /* @__PURE__ */ x(ne, { children: [/* @__PURE__ */ c(De, {}), /* @__PURE__ */ c(qt, {
|
|
4339
|
+
title: "Adicionar extras?",
|
|
4340
|
+
children: o.map((w) => /* @__PURE__ */ c(ns, {
|
|
4341
|
+
extra: w,
|
|
4342
|
+
checked: m.includes(w.id),
|
|
4343
|
+
onCheckedChange: (S) => E(w.id, S)
|
|
4344
|
+
}, w.id))
|
|
4345
|
+
})] }),
|
|
4346
|
+
/* @__PURE__ */ c(De, {}),
|
|
4347
|
+
/* @__PURE__ */ x("div", {
|
|
4348
|
+
className: "space-y-2",
|
|
4349
|
+
children: [/* @__PURE__ */ c("label", {
|
|
4350
|
+
htmlFor: "notes",
|
|
4351
|
+
className: "text-sm font-medium leading-none",
|
|
4352
|
+
children: "Observações"
|
|
4353
|
+
}), /* @__PURE__ */ c("textarea", {
|
|
4354
|
+
id: "notes",
|
|
4355
|
+
value: g,
|
|
4356
|
+
onChange: (w) => C(w.target.value),
|
|
4357
|
+
placeholder: "Ex: sem cebola, bem passado...",
|
|
4358
|
+
className: "min-h-20 w-full rounded-md border bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"
|
|
4359
|
+
})]
|
|
4360
|
+
})
|
|
4361
|
+
]
|
|
4362
|
+
})
|
|
4363
|
+
}),
|
|
4364
|
+
/* @__PURE__ */ x("div", {
|
|
4365
|
+
className: "flex items-center justify-between gap-4 border-t p-4",
|
|
4366
|
+
children: [/* @__PURE__ */ c(Sn, {
|
|
4367
|
+
value: i,
|
|
4368
|
+
onChange: d
|
|
4369
|
+
}), /* @__PURE__ */ c(X, {
|
|
4370
|
+
onClick: R,
|
|
4371
|
+
size: "lg",
|
|
4372
|
+
className: "flex-1",
|
|
4373
|
+
children: "Adicionar ao pedido"
|
|
4374
|
+
})]
|
|
4375
|
+
})
|
|
4376
|
+
]
|
|
4377
|
+
})
|
|
4378
|
+
});
|
|
4379
|
+
}
|
|
4380
|
+
function os({ ...e }) {
|
|
4381
|
+
return /* @__PURE__ */ c(Dr, {
|
|
4382
|
+
"data-slot": "sheet",
|
|
4383
|
+
...e
|
|
4384
|
+
});
|
|
4385
|
+
}
|
|
4386
|
+
function as({ ...e }) {
|
|
4387
|
+
return /* @__PURE__ */ c(_r, {
|
|
4388
|
+
"data-slot": "sheet-portal",
|
|
4389
|
+
...e
|
|
4390
|
+
});
|
|
4391
|
+
}
|
|
4392
|
+
function is({ className: e, ...t }) {
|
|
4393
|
+
return /* @__PURE__ */ c(Mr, {
|
|
4394
|
+
"data-slot": "sheet-overlay",
|
|
4395
|
+
className: P("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", e),
|
|
4396
|
+
...t
|
|
4397
|
+
});
|
|
4398
|
+
}
|
|
4399
|
+
function ss({ className: e, children: t, side: r = "right", showCloseButton: n = !0, ...o }) {
|
|
4400
|
+
return /* @__PURE__ */ x(as, { children: [/* @__PURE__ */ c(is, {}), /* @__PURE__ */ x(Ir, {
|
|
4401
|
+
"data-slot": "sheet-content",
|
|
4402
|
+
className: P("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", r === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", r === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", r === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", r === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", e),
|
|
4403
|
+
...o,
|
|
4404
|
+
children: [t, n && /* @__PURE__ */ x(Lr, {
|
|
4405
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",
|
|
4406
|
+
children: [/* @__PURE__ */ c(vt, { className: "size-4" }), /* @__PURE__ */ c("span", {
|
|
4407
|
+
className: "sr-only",
|
|
4408
|
+
children: "Close"
|
|
4409
|
+
})]
|
|
4410
|
+
})]
|
|
4411
|
+
})] });
|
|
4412
|
+
}
|
|
4413
|
+
function ls({ className: e, ...t }) {
|
|
4414
|
+
return /* @__PURE__ */ c("div", {
|
|
4415
|
+
"data-slot": "sheet-header",
|
|
4416
|
+
className: P("flex flex-col gap-1.5 p-4", e),
|
|
4417
|
+
...t
|
|
4418
|
+
});
|
|
4419
|
+
}
|
|
4420
|
+
function cs({ className: e, ...t }) {
|
|
4421
|
+
return /* @__PURE__ */ c(zr, {
|
|
4422
|
+
"data-slot": "sheet-title",
|
|
4423
|
+
className: P("text-foreground font-semibold", e),
|
|
4424
|
+
...t
|
|
4425
|
+
});
|
|
4426
|
+
}
|
|
4427
|
+
function ds({ className: e }) {
|
|
4428
|
+
return /* @__PURE__ */ x("div", {
|
|
4429
|
+
className: P("flex flex-col items-center justify-center gap-3 py-12 text-center", e),
|
|
4430
|
+
children: [/* @__PURE__ */ c("div", {
|
|
4431
|
+
className: "rounded-full bg-muted p-4",
|
|
4432
|
+
children: /* @__PURE__ */ c(wn, { className: "size-8 text-muted-foreground" })
|
|
4433
|
+
}), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ c("h3", {
|
|
4434
|
+
className: "font-semibold",
|
|
4435
|
+
children: "Carrinho vazio"
|
|
4436
|
+
}), /* @__PURE__ */ c("p", {
|
|
4437
|
+
className: "text-sm text-muted-foreground",
|
|
4438
|
+
children: "Adicione produtos para começar o pedido"
|
|
4439
|
+
})] })]
|
|
4440
|
+
});
|
|
4441
|
+
}
|
|
4442
|
+
function us({ item: e, onQuantityChange: t, onRemove: r, className: n }) {
|
|
4443
|
+
const o = (e.unitPrice + e.additionalPrice) * e.quantity;
|
|
4444
|
+
return /* @__PURE__ */ c("div", {
|
|
4445
|
+
className: P("flex gap-3 rounded-lg border p-3", n),
|
|
4446
|
+
children: /* @__PURE__ */ x("div", {
|
|
4447
|
+
className: "flex flex-1 flex-col gap-2",
|
|
4448
|
+
children: [
|
|
4449
|
+
/* @__PURE__ */ x("div", {
|
|
4450
|
+
className: "flex items-start justify-between gap-2",
|
|
4451
|
+
children: [/* @__PURE__ */ c("h4", {
|
|
4452
|
+
className: "font-semibold leading-tight",
|
|
4453
|
+
children: e.productName
|
|
4454
|
+
}), /* @__PURE__ */ c("span", {
|
|
4455
|
+
className: "shrink-0 font-semibold text-primary",
|
|
4456
|
+
children: j(o)
|
|
4457
|
+
})]
|
|
4458
|
+
}),
|
|
4459
|
+
e.removedIngredients && e.removedIngredients.length > 0 && /* @__PURE__ */ x("p", {
|
|
4460
|
+
className: "text-xs text-destructive",
|
|
4461
|
+
children: ["- SEM ", e.removedIngredients.join(", ")]
|
|
4462
|
+
}),
|
|
4463
|
+
e.addedExtras && e.addedExtras.length > 0 && /* @__PURE__ */ x("p", {
|
|
4464
|
+
className: "text-xs text-primary",
|
|
4465
|
+
children: ["+ EXTRA ", e.addedExtras.join(", ")]
|
|
4466
|
+
}),
|
|
4467
|
+
e.notes && /* @__PURE__ */ x("p", {
|
|
4468
|
+
className: "text-xs text-muted-foreground italic",
|
|
4469
|
+
children: ["Obs: ", e.notes]
|
|
4470
|
+
}),
|
|
4471
|
+
e.additionalPrice > 0 && /* @__PURE__ */ x("p", {
|
|
4472
|
+
className: "text-xs text-muted-foreground",
|
|
4473
|
+
children: [
|
|
4474
|
+
j(e.unitPrice),
|
|
4475
|
+
" + ",
|
|
4476
|
+
j(e.additionalPrice),
|
|
4477
|
+
" extras"
|
|
4478
|
+
]
|
|
4479
|
+
}),
|
|
4480
|
+
/* @__PURE__ */ x("div", {
|
|
4481
|
+
className: "flex items-center justify-between gap-2 pt-1",
|
|
4482
|
+
children: [/* @__PURE__ */ c(Sn, {
|
|
4483
|
+
value: e.quantity,
|
|
4484
|
+
onChange: (a) => t(e.id, a),
|
|
4485
|
+
size: "sm"
|
|
4486
|
+
}), /* @__PURE__ */ c(X, {
|
|
4487
|
+
variant: "ghost",
|
|
4488
|
+
size: "icon-xs",
|
|
4489
|
+
onClick: () => r(e.id),
|
|
4490
|
+
className: "text-destructive hover:text-destructive",
|
|
4491
|
+
children: /* @__PURE__ */ c(Xi, {})
|
|
4492
|
+
})]
|
|
4493
|
+
})
|
|
4494
|
+
]
|
|
4495
|
+
})
|
|
4496
|
+
});
|
|
4497
|
+
}
|
|
4498
|
+
function fs({ subtotal: e, itemCount: t, onConfirm: r, loading: n = !1, className: o }) {
|
|
4499
|
+
return /* @__PURE__ */ x("div", {
|
|
4500
|
+
className: P("space-y-4", o),
|
|
4501
|
+
children: [
|
|
4502
|
+
/* @__PURE__ */ c(De, {}),
|
|
4503
|
+
/* @__PURE__ */ x("div", {
|
|
4504
|
+
className: "space-y-2",
|
|
4505
|
+
children: [/* @__PURE__ */ x("div", {
|
|
4506
|
+
className: "flex items-center justify-between text-sm",
|
|
4507
|
+
children: [/* @__PURE__ */ x("span", {
|
|
4508
|
+
className: "text-muted-foreground",
|
|
4509
|
+
children: [
|
|
4510
|
+
t,
|
|
4511
|
+
" ",
|
|
4512
|
+
t === 1 ? "item" : "itens"
|
|
4513
|
+
]
|
|
4514
|
+
}), /* @__PURE__ */ c("span", {
|
|
4515
|
+
className: "font-medium",
|
|
4516
|
+
children: j(e)
|
|
4517
|
+
})]
|
|
4518
|
+
}), /* @__PURE__ */ x("div", {
|
|
4519
|
+
className: "flex items-center justify-between",
|
|
4520
|
+
children: [/* @__PURE__ */ c("span", {
|
|
4521
|
+
className: "text-lg font-semibold",
|
|
4522
|
+
children: "Subtotal"
|
|
4523
|
+
}), /* @__PURE__ */ c("span", {
|
|
4524
|
+
className: "text-2xl font-bold text-primary",
|
|
4525
|
+
children: j(e)
|
|
4526
|
+
})]
|
|
4527
|
+
})]
|
|
4528
|
+
}),
|
|
4529
|
+
/* @__PURE__ */ c(X, {
|
|
4530
|
+
size: "lg",
|
|
4531
|
+
className: "w-full",
|
|
4532
|
+
onClick: r,
|
|
4533
|
+
disabled: n || t === 0,
|
|
4534
|
+
children: n ? "Enviando..." : "Confirmar e enviar"
|
|
4535
|
+
})
|
|
4536
|
+
]
|
|
4537
|
+
});
|
|
4538
|
+
}
|
|
4539
|
+
function As({ open: e, onOpenChange: t, items: r, onQuantityChange: n, onRemoveItem: o, onConfirmOrder: a, loading: l = !1, className: i }) {
|
|
4540
|
+
const d = r.reduce((u, f) => u + (f.unitPrice + f.additionalPrice) * f.quantity, 0);
|
|
4541
|
+
return /* @__PURE__ */ c(os, {
|
|
4542
|
+
open: e,
|
|
4543
|
+
onOpenChange: t,
|
|
4544
|
+
children: /* @__PURE__ */ x(ss, {
|
|
4545
|
+
side: "right",
|
|
4546
|
+
className: P("flex w-full flex-col gap-0 p-0 sm:max-w-lg", i),
|
|
4547
|
+
children: [/* @__PURE__ */ c(ls, {
|
|
4548
|
+
className: "border-b p-6 pb-4",
|
|
4549
|
+
children: /* @__PURE__ */ c(cs, {
|
|
4550
|
+
className: "text-xl",
|
|
4551
|
+
children: "Revisão do pedido"
|
|
4552
|
+
})
|
|
4553
|
+
}), r.length === 0 ? /* @__PURE__ */ c(ds, {}) : /* @__PURE__ */ x(ne, { children: [/* @__PURE__ */ c(gt, {
|
|
4554
|
+
className: "flex-1",
|
|
4555
|
+
children: /* @__PURE__ */ c("div", {
|
|
4556
|
+
className: "space-y-3 p-6",
|
|
4557
|
+
children: r.map((u) => /* @__PURE__ */ c(us, {
|
|
4558
|
+
item: u,
|
|
4559
|
+
onQuantityChange: n,
|
|
4560
|
+
onRemove: o
|
|
4561
|
+
}, u.id))
|
|
4562
|
+
})
|
|
4563
|
+
}), /* @__PURE__ */ c("div", {
|
|
4564
|
+
className: "border-t p-6 pt-4",
|
|
4565
|
+
children: /* @__PURE__ */ c(fs, {
|
|
4566
|
+
subtotal: d,
|
|
4567
|
+
itemCount: r.length,
|
|
4568
|
+
onConfirm: a,
|
|
4569
|
+
loading: l
|
|
4570
|
+
})
|
|
4571
|
+
})] })]
|
|
4572
|
+
})
|
|
4573
|
+
});
|
|
4574
|
+
}
|
|
4575
|
+
function Ts({ open: e, onOpenChange: t, orderId: r, totalValue: n, onClose: o, className: a }) {
|
|
4576
|
+
return /* @__PURE__ */ c(kn, {
|
|
4577
|
+
open: e,
|
|
4578
|
+
onOpenChange: t,
|
|
4579
|
+
children: /* @__PURE__ */ x(En, {
|
|
4580
|
+
className: P("max-w-md", a),
|
|
4581
|
+
children: [/* @__PURE__ */ c(Nn, { children: /* @__PURE__ */ x("div", {
|
|
4582
|
+
className: "flex flex-col items-center gap-4 text-center",
|
|
4583
|
+
children: [/* @__PURE__ */ c("div", {
|
|
4584
|
+
className: "rounded-full bg-primary/10 p-4",
|
|
4585
|
+
children: /* @__PURE__ */ c(Fi, { className: "size-12 text-primary" })
|
|
4586
|
+
}), /* @__PURE__ */ x("div", {
|
|
4587
|
+
className: "space-y-2",
|
|
4588
|
+
children: [/* @__PURE__ */ c(Rn, {
|
|
4589
|
+
className: "text-2xl",
|
|
4590
|
+
children: "Pedido enviado!"
|
|
4591
|
+
}), /* @__PURE__ */ c("p", {
|
|
4592
|
+
className: "text-muted-foreground",
|
|
4593
|
+
children: "O pedido foi enviado para a cozinha com sucesso"
|
|
4594
|
+
})]
|
|
4595
|
+
})]
|
|
4596
|
+
}) }), /* @__PURE__ */ x("div", {
|
|
4597
|
+
className: "space-y-4 pt-4",
|
|
4598
|
+
children: [
|
|
4599
|
+
r && /* @__PURE__ */ x("div", {
|
|
4600
|
+
className: "rounded-lg bg-muted p-4 text-center",
|
|
4601
|
+
children: [/* @__PURE__ */ c("p", {
|
|
4602
|
+
className: "text-sm text-muted-foreground",
|
|
4603
|
+
children: "Número do pedido"
|
|
4604
|
+
}), /* @__PURE__ */ x("p", {
|
|
4605
|
+
className: "text-lg font-mono font-semibold",
|
|
4606
|
+
children: ["#", r.slice(0, 8)]
|
|
4607
|
+
})]
|
|
4608
|
+
}),
|
|
4609
|
+
/* @__PURE__ */ x("div", {
|
|
4610
|
+
className: "flex items-center justify-between rounded-lg border p-4",
|
|
4611
|
+
children: [/* @__PURE__ */ c("span", {
|
|
4612
|
+
className: "text-sm text-muted-foreground",
|
|
4613
|
+
children: "Valor total"
|
|
4614
|
+
}), /* @__PURE__ */ c("span", {
|
|
4615
|
+
className: "text-xl font-bold text-primary",
|
|
4616
|
+
children: j(n)
|
|
4617
|
+
})]
|
|
4618
|
+
}),
|
|
4619
|
+
/* @__PURE__ */ c(X, {
|
|
4620
|
+
size: "lg",
|
|
4621
|
+
className: "w-full",
|
|
4622
|
+
onClick: o,
|
|
4623
|
+
children: "Voltar para mesas"
|
|
4624
|
+
})
|
|
4625
|
+
]
|
|
4626
|
+
})]
|
|
4627
|
+
})
|
|
4628
|
+
});
|
|
4629
|
+
}
|
|
4630
|
+
function Os({ message: e = "Enviando pedido...", className: t }) {
|
|
4631
|
+
return /* @__PURE__ */ x("div", {
|
|
4632
|
+
className: P("flex flex-col items-center justify-center gap-4 py-12 text-center", t),
|
|
4633
|
+
children: [/* @__PURE__ */ c(Bi, { className: "size-12 animate-spin text-primary" }), /* @__PURE__ */ c("p", {
|
|
4634
|
+
className: "text-lg font-medium text-muted-foreground",
|
|
4635
|
+
children: e
|
|
4636
|
+
})]
|
|
4637
|
+
});
|
|
4638
|
+
}
|
|
1784
4639
|
export {
|
|
1785
|
-
|
|
1786
|
-
|
|
4640
|
+
ws as AppHeader,
|
|
4641
|
+
X as Button,
|
|
4642
|
+
ds as CartEmptyState,
|
|
4643
|
+
Ss as CartIndicator,
|
|
4644
|
+
us as CartItem,
|
|
4645
|
+
As as CartSheet,
|
|
4646
|
+
fs as CartSummary,
|
|
4647
|
+
Yt as CategoryPill,
|
|
4648
|
+
Es as CategoryTabs,
|
|
4649
|
+
ns as ExtraCheckbox,
|
|
4650
|
+
rs as IngredientCheckbox,
|
|
4651
|
+
qt as IngredientList,
|
|
4652
|
+
Ts as OrderConfirmationModal,
|
|
4653
|
+
Os as OrderLoadingState,
|
|
4654
|
+
Rs as ProductCard,
|
|
4655
|
+
Ps as ProductDetailModal,
|
|
4656
|
+
Ns as ProductGrid,
|
|
4657
|
+
Ji as ProductPriceDisplay,
|
|
4658
|
+
Sn as QuantityStepper,
|
|
4659
|
+
Zi as TableBadge,
|
|
4660
|
+
ks as TableCard,
|
|
4661
|
+
Cs as TableGrid,
|
|
4662
|
+
Ri as buttonVariants
|
|
1787
4663
|
};
|