zudoku 0.6.1-dev.1 → 0.6.1-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/validators/validate.d.ts +18 -0
- package/dist/config/validators/validate.js +4 -0
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/lib/components/Banner.d.ts +1 -0
- package/dist/lib/components/Banner.js +21 -0
- package/dist/lib/components/Banner.js.map +1 -0
- package/dist/lib/components/Header.js +2 -1
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/core/DevPortalContext.d.ts +2 -0
- package/dist/lib/core/DevPortalContext.js.map +1 -1
- package/dist/lib/demo/DemoAnnouncement.js +2 -2
- package/dist/lib/demo/DemoAnnouncement.js.map +1 -1
- package/lib/zudoku.components.js +587 -546
- package/lib/zudoku.components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/demo-cdn.html +5 -0
- package/src/app/main.css +1 -1
- package/src/lib/components/Banner.tsx +41 -0
- package/src/lib/components/Header.tsx +2 -9
- package/src/lib/core/DevPortalContext.ts +2 -0
- package/src/lib/demo/DemoAnnouncement.tsx +2 -2
package/lib/zudoku.components.js
CHANGED
|
@@ -4,27 +4,27 @@ var ln = (e) => {
|
|
|
4
4
|
};
|
|
5
5
|
var Ao = (e, t, n) => t in e ? Io(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
6
|
var J = (e, t, n) => Ao(e, typeof t != "symbol" ? t + "" : t, n), cn = (e, t, n) => t.has(e) || ln("Cannot " + n);
|
|
7
|
-
var
|
|
7
|
+
var b = (e, t, n) => (cn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), ae = (e, t, n) => t.has(e) ? ln("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), G = (e, t, n, r) => (cn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
|
|
8
8
|
var lt = (e, t, n, r) => ({
|
|
9
9
|
set _(a) {
|
|
10
10
|
G(e, t, a, n);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
|
-
return
|
|
13
|
+
return b(e, t, r);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
import { H as Dn, a as Ot, M as ko, u as $o, A as Lo, b as Fo } from "./utils-BPHLKjns.js";
|
|
17
|
-
import { d as Ho, a as Uo, R as Bo, N as
|
|
17
|
+
import { d as Ho, a as Uo, R as Bo, N as Ye, L as It, u as zo, O as jn, b as Ko, c as At } from "./index-ChhUJhLT.js";
|
|
18
18
|
import { E as Nn, S as Te, a as qo, R as Vo } from "./SlotletProvider-CNyl5wU0.js";
|
|
19
19
|
import { j as o } from "./jsx-runtime-B6kdoens.js";
|
|
20
|
-
import { M as Qo, c as Go, a as Pn, b as Tn, A as Wo, u as
|
|
21
|
-
import { c as
|
|
20
|
+
import { M as Qo, c as Go, a as Pn, b as Tn, A as Wo, u as et, h as Yo, d as A, e as Xo, F as Jo, D as Zo, C as ea, P as Ue, f as kt, g as ta, i as _n, R as na, S as ra, j as oa, k as aa, l as On, m as sa, n as pt, o as In, V as An, p as un, B as Dt } from "./index-BGY8VjAV.js";
|
|
21
|
+
import { c as xe, a as O, C as ia, b as kn, u as la, T as ca, M as ua, V as da, d as $t, e as fa, f as ha } from "./Markdown-BZUoEvL7.js";
|
|
22
22
|
import * as h from "react";
|
|
23
|
-
import g, { StrictMode as $n, createContext as Ln, Component as pa, createElement as dn, isValidElement as ma,
|
|
23
|
+
import g, { StrictMode as $n, createContext as Ln, Component as pa, createElement as dn, isValidElement as ma, useState as _e, useLayoutEffect as ga, useEffect as be, useCallback as Fn, Suspense as Hn, memo as Un, useMemo as yt, useContext as va, Fragment as wa, useRef as Lt, forwardRef as ba } from "react";
|
|
24
24
|
import { g as Ft } from "./_commonjsHelpers-BVfed4GL.js";
|
|
25
|
-
import { r as
|
|
26
|
-
import { S as jt, R as
|
|
27
|
-
import { S as Bn, h as zn, Q as Ea, n as ee, m as fn, a as hn, b as ve, e as Ca, c as Ra, d as Da, f as ja, o as pn, r as mn, g as Na, i as gn, p as vn, s as Pa, u as
|
|
25
|
+
import { r as xa } from "./router-BiRCp01d.js";
|
|
26
|
+
import { S as jt, R as ya, T as Ma, C as Sa } from "./index-CbJpF8Yf.js";
|
|
27
|
+
import { S as Bn, h as zn, Q as Ea, n as ee, m as fn, a as hn, b as ve, e as Ca, c as Ra, d as Da, f as ja, o as pn, r as mn, g as Na, i as gn, p as vn, s as Pa, u as Be, j as Ta, Z as _a, k as Oa, l as Kn, q as Ia } from "./ZudokuContext-BHNQL3XO.js";
|
|
28
28
|
import { j as Ht } from "./joinPath-B7kNnUX4.js";
|
|
29
29
|
import { c as qn, P as vt, R as Aa, I as ka, O as $a, C as La, T as Fa, a as Ha, b as Ua, d as Ba, D as za, e as Ka, S as Mt } from "./SidebarBadge-6EEz-Bwe.js";
|
|
30
30
|
import { S as qa } from "./Spinner-B9eFggre.js";
|
|
@@ -34,7 +34,7 @@ import { S as qa } from "./Spinner-B9eFggre.js";
|
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
36
|
*/
|
|
37
|
-
const Vn =
|
|
37
|
+
const Vn = xe("ChevronRight", [
|
|
38
38
|
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
39
39
|
]);
|
|
40
40
|
/**
|
|
@@ -43,7 +43,18 @@ const Vn = Re("ChevronRight", [
|
|
|
43
43
|
* This source code is licensed under the ISC license.
|
|
44
44
|
* See the LICENSE file in the root directory of this source tree.
|
|
45
45
|
*/
|
|
46
|
-
const Va =
|
|
46
|
+
const Va = xe("CircleX", [
|
|
47
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
48
|
+
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
49
|
+
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
50
|
+
]);
|
|
51
|
+
/**
|
|
52
|
+
* @license lucide-react v0.378.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/
|
|
57
|
+
const Qa = xe("Dot", [
|
|
47
58
|
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
|
48
59
|
]);
|
|
49
60
|
/**
|
|
@@ -52,7 +63,7 @@ const Va = Re("Dot", [
|
|
|
52
63
|
* This source code is licensed under the ISC license.
|
|
53
64
|
* See the LICENSE file in the root directory of this source tree.
|
|
54
65
|
*/
|
|
55
|
-
const
|
|
66
|
+
const Ga = xe("ExternalLink", [
|
|
56
67
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
57
68
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
58
69
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
@@ -63,7 +74,7 @@ const Qa = Re("ExternalLink", [
|
|
|
63
74
|
* This source code is licensed under the ISC license.
|
|
64
75
|
* See the LICENSE file in the root directory of this source tree.
|
|
65
76
|
*/
|
|
66
|
-
const
|
|
77
|
+
const Wa = xe("Menu", [
|
|
67
78
|
["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }],
|
|
68
79
|
["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }],
|
|
69
80
|
["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }]
|
|
@@ -74,7 +85,7 @@ const Ga = Re("Menu", [
|
|
|
74
85
|
* This source code is licensed under the ISC license.
|
|
75
86
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
87
|
*/
|
|
77
|
-
const
|
|
88
|
+
const Ya = xe("MoonStar", [
|
|
78
89
|
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9", key: "4ay0iu" }],
|
|
79
90
|
["path", { d: "M20 3v4", key: "1olli1" }],
|
|
80
91
|
["path", { d: "M22 5h-4", key: "1gvqau" }]
|
|
@@ -85,7 +96,7 @@ const Wa = Re("MoonStar", [
|
|
|
85
96
|
* This source code is licensed under the ISC license.
|
|
86
97
|
* See the LICENSE file in the root directory of this source tree.
|
|
87
98
|
*/
|
|
88
|
-
const
|
|
99
|
+
const Xa = xe("PanelLeft", [
|
|
89
100
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
90
101
|
["path", { d: "M9 3v18", key: "fh3hqa" }]
|
|
91
102
|
]);
|
|
@@ -95,7 +106,7 @@ const Ya = Re("PanelLeft", [
|
|
|
95
106
|
* This source code is licensed under the ISC license.
|
|
96
107
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
108
|
*/
|
|
98
|
-
const
|
|
109
|
+
const Ja = xe("Search", [
|
|
99
110
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
100
111
|
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
|
|
101
112
|
]);
|
|
@@ -105,7 +116,7 @@ const Xa = Re("Search", [
|
|
|
105
116
|
* This source code is licensed under the ISC license.
|
|
106
117
|
* See the LICENSE file in the root directory of this source tree.
|
|
107
118
|
*/
|
|
108
|
-
const
|
|
119
|
+
const Za = xe("Sun", [
|
|
109
120
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
110
121
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
111
122
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -116,14 +127,14 @@ const Ja = Re("Sun", [
|
|
|
116
127
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
117
128
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
118
129
|
]);
|
|
119
|
-
function
|
|
130
|
+
function es({ error: e }) {
|
|
120
131
|
return /* @__PURE__ */ o.jsx(Nn, { error: e });
|
|
121
132
|
}
|
|
122
133
|
var tt = {};
|
|
123
|
-
const
|
|
134
|
+
const ts = /* @__PURE__ */ Ft(xa), ns = /* @__PURE__ */ Ft(Ho), rs = /* @__PURE__ */ Ft(Uo);
|
|
124
135
|
Object.defineProperty(tt, "__esModule", { value: !0 });
|
|
125
|
-
var
|
|
126
|
-
function
|
|
136
|
+
var os = g, fe = ts, Ut = ns, we = rs;
|
|
137
|
+
function as(e) {
|
|
127
138
|
if (e && e.__esModule) return e;
|
|
128
139
|
var t = /* @__PURE__ */ Object.create(null);
|
|
129
140
|
return e && Object.keys(e).forEach(function(n) {
|
|
@@ -138,8 +149,8 @@ function os(e) {
|
|
|
138
149
|
}
|
|
139
150
|
}), t.default = e, Object.freeze(t);
|
|
140
151
|
}
|
|
141
|
-
var ue = /* @__PURE__ */ os
|
|
142
|
-
function
|
|
152
|
+
var ue = /* @__PURE__ */ as(os);
|
|
153
|
+
function ss({
|
|
143
154
|
basename: e,
|
|
144
155
|
children: t,
|
|
145
156
|
location: n = "/",
|
|
@@ -163,7 +174,7 @@ function as({
|
|
|
163
174
|
static: !0
|
|
164
175
|
});
|
|
165
176
|
}
|
|
166
|
-
function
|
|
177
|
+
function is({
|
|
167
178
|
context: e,
|
|
168
179
|
router: t,
|
|
169
180
|
hydrate: n = !0,
|
|
@@ -181,9 +192,9 @@ function ss({
|
|
|
181
192
|
let u = {
|
|
182
193
|
loaderData: e.loaderData,
|
|
183
194
|
actionData: e.actionData,
|
|
184
|
-
errors:
|
|
195
|
+
errors: cs(e.errors)
|
|
185
196
|
};
|
|
186
|
-
i = `window.__staticRouterHydrationData = JSON.parse(${
|
|
197
|
+
i = `window.__staticRouterHydrationData = JSON.parse(${ms(JSON.stringify(JSON.stringify(u)))});`;
|
|
187
198
|
}
|
|
188
199
|
let {
|
|
189
200
|
state: l
|
|
@@ -207,7 +218,7 @@ function ss({
|
|
|
207
218
|
future: {
|
|
208
219
|
v7_relativeSplatPath: t.future.v7_relativeSplatPath
|
|
209
220
|
}
|
|
210
|
-
}, /* @__PURE__ */ ue.createElement(
|
|
221
|
+
}, /* @__PURE__ */ ue.createElement(ls, {
|
|
211
222
|
routes: t.routes,
|
|
212
223
|
future: t.future,
|
|
213
224
|
state: l
|
|
@@ -219,14 +230,14 @@ function ss({
|
|
|
219
230
|
}
|
|
220
231
|
}) : null);
|
|
221
232
|
}
|
|
222
|
-
function
|
|
233
|
+
function ls({
|
|
223
234
|
routes: e,
|
|
224
235
|
future: t,
|
|
225
236
|
state: n
|
|
226
237
|
}) {
|
|
227
238
|
return Ut.UNSAFE_useRoutesImpl(e, void 0, n, t);
|
|
228
239
|
}
|
|
229
|
-
function
|
|
240
|
+
function cs(e) {
|
|
230
241
|
if (!e) return null;
|
|
231
242
|
let t = Object.entries(e), n = {};
|
|
232
243
|
for (let [r, a] of t)
|
|
@@ -265,13 +276,13 @@ function Qn() {
|
|
|
265
276
|
}
|
|
266
277
|
};
|
|
267
278
|
}
|
|
268
|
-
function
|
|
279
|
+
function us(e, t) {
|
|
269
280
|
return fe.createStaticHandler(e, {
|
|
270
281
|
...t,
|
|
271
282
|
mapRouteProperties: Ut.UNSAFE_mapRouteProperties
|
|
272
283
|
});
|
|
273
284
|
}
|
|
274
|
-
function
|
|
285
|
+
function ds(e, t, n = {}) {
|
|
275
286
|
let r = {}, a = fe.UNSAFE_convertRoutesToDataRoutes(e, Ut.UNSAFE_mapRouteProperties, void 0, r), s = t.matches.map((l) => {
|
|
276
287
|
let u = r[l.route.id] || l.route;
|
|
277
288
|
return {
|
|
@@ -367,36 +378,36 @@ function Gn(e) {
|
|
|
367
378
|
function Wn(e) {
|
|
368
379
|
let t = typeof e == "string" ? e : we.createPath(e);
|
|
369
380
|
t = t.replace(/ $/, "%20");
|
|
370
|
-
let n =
|
|
381
|
+
let n = fs.test(t) ? new URL(t) : new URL(t, "http://localhost");
|
|
371
382
|
return {
|
|
372
383
|
pathname: n.pathname,
|
|
373
384
|
search: n.search,
|
|
374
385
|
hash: n.hash
|
|
375
386
|
};
|
|
376
387
|
}
|
|
377
|
-
const
|
|
388
|
+
const fs = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, hs = {
|
|
378
389
|
"&": "\\u0026",
|
|
379
390
|
">": "\\u003e",
|
|
380
391
|
"<": "\\u003c",
|
|
381
392
|
"\u2028": "\\u2028",
|
|
382
393
|
"\u2029": "\\u2029"
|
|
383
|
-
},
|
|
384
|
-
function
|
|
385
|
-
return e.replace(
|
|
394
|
+
}, ps = /[&><\u2028\u2029]/g;
|
|
395
|
+
function ms(e) {
|
|
396
|
+
return e.replace(ps, (t) => hs[t]);
|
|
386
397
|
}
|
|
387
|
-
tt.StaticRouter =
|
|
388
|
-
var
|
|
389
|
-
tt.createStaticHandler =
|
|
390
|
-
tt.createStaticRouter =
|
|
391
|
-
const
|
|
398
|
+
tt.StaticRouter = ss;
|
|
399
|
+
var gs = tt.StaticRouterProvider = is;
|
|
400
|
+
tt.createStaticHandler = us;
|
|
401
|
+
tt.createStaticRouter = ds;
|
|
402
|
+
const vs = ({
|
|
392
403
|
router: e,
|
|
393
404
|
hydrate: t = !1
|
|
394
|
-
}) => /* @__PURE__ */ o.jsx($n, { children: /* @__PURE__ */ o.jsx(Dn, { children: /* @__PURE__ */ o.jsx(jt.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ o.jsx(Bo, { router: e }) }) }) }),
|
|
405
|
+
}) => /* @__PURE__ */ o.jsx($n, { children: /* @__PURE__ */ o.jsx(Dn, { children: /* @__PURE__ */ o.jsx(jt.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ o.jsx(Bo, { router: e }) }) }) }), ws = ({
|
|
395
406
|
router: e,
|
|
396
407
|
context: t,
|
|
397
408
|
helmetContext: n
|
|
398
|
-
}) => /* @__PURE__ */ o.jsx($n, { children: /* @__PURE__ */ o.jsx(Dn, { context: n, children: /* @__PURE__ */ o.jsx(
|
|
399
|
-
var de, En,
|
|
409
|
+
}) => /* @__PURE__ */ o.jsx($n, { children: /* @__PURE__ */ o.jsx(Dn, { context: n, children: /* @__PURE__ */ o.jsx(gs, { router: e, context: t }) }) });
|
|
410
|
+
var de, En, bs = (En = class extends Bn {
|
|
400
411
|
constructor(t = {}) {
|
|
401
412
|
super();
|
|
402
413
|
ae(this, de);
|
|
@@ -415,14 +426,14 @@ var de, En, ws = (En = class extends Bn {
|
|
|
415
426
|
}), this.add(i)), i;
|
|
416
427
|
}
|
|
417
428
|
add(t) {
|
|
418
|
-
|
|
429
|
+
b(this, de).has(t.queryHash) || (b(this, de).set(t.queryHash, t), this.notify({
|
|
419
430
|
type: "added",
|
|
420
431
|
query: t
|
|
421
432
|
}));
|
|
422
433
|
}
|
|
423
434
|
remove(t) {
|
|
424
|
-
const n =
|
|
425
|
-
n && (t.destroy(), n === t &&
|
|
435
|
+
const n = b(this, de).get(t.queryHash);
|
|
436
|
+
n && (t.destroy(), n === t && b(this, de).delete(t.queryHash), this.notify({ type: "removed", query: t }));
|
|
426
437
|
}
|
|
427
438
|
clear() {
|
|
428
439
|
ee.batch(() => {
|
|
@@ -432,10 +443,10 @@ var de, En, ws = (En = class extends Bn {
|
|
|
432
443
|
});
|
|
433
444
|
}
|
|
434
445
|
get(t) {
|
|
435
|
-
return
|
|
446
|
+
return b(this, de).get(t);
|
|
436
447
|
}
|
|
437
448
|
getAll() {
|
|
438
|
-
return [...
|
|
449
|
+
return [...b(this, de).values()];
|
|
439
450
|
}
|
|
440
451
|
find(t) {
|
|
441
452
|
const n = { exact: !0, ...t };
|
|
@@ -468,43 +479,43 @@ var de, En, ws = (En = class extends Bn {
|
|
|
468
479
|
});
|
|
469
480
|
});
|
|
470
481
|
}
|
|
471
|
-
}, de = new WeakMap(), En), Z,
|
|
482
|
+
}, de = new WeakMap(), En), Z, Ze, Cn, xs = (Cn = class extends Bn {
|
|
472
483
|
constructor(t = {}) {
|
|
473
484
|
super();
|
|
474
485
|
ae(this, Z);
|
|
475
|
-
ae(this,
|
|
476
|
-
this.config = t, G(this, Z, /* @__PURE__ */ new Map()), G(this,
|
|
486
|
+
ae(this, Ze);
|
|
487
|
+
this.config = t, G(this, Z, /* @__PURE__ */ new Map()), G(this, Ze, Date.now());
|
|
477
488
|
}
|
|
478
489
|
build(t, n, r) {
|
|
479
490
|
const a = new Qo({
|
|
480
491
|
mutationCache: this,
|
|
481
|
-
mutationId: ++lt(this,
|
|
492
|
+
mutationId: ++lt(this, Ze)._,
|
|
482
493
|
options: t.defaultMutationOptions(n),
|
|
483
494
|
state: r
|
|
484
495
|
});
|
|
485
496
|
return this.add(a), a;
|
|
486
497
|
}
|
|
487
498
|
add(t) {
|
|
488
|
-
const n = ct(t), r =
|
|
489
|
-
r.push(t),
|
|
499
|
+
const n = ct(t), r = b(this, Z).get(n) ?? [];
|
|
500
|
+
r.push(t), b(this, Z).set(n, r), this.notify({ type: "added", mutation: t });
|
|
490
501
|
}
|
|
491
502
|
remove(t) {
|
|
492
503
|
var r;
|
|
493
504
|
const n = ct(t);
|
|
494
|
-
if (
|
|
495
|
-
const a = (r =
|
|
496
|
-
a && (a.length === 0 ?
|
|
505
|
+
if (b(this, Z).has(n)) {
|
|
506
|
+
const a = (r = b(this, Z).get(n)) == null ? void 0 : r.filter((s) => s !== t);
|
|
507
|
+
a && (a.length === 0 ? b(this, Z).delete(n) : b(this, Z).set(n, a));
|
|
497
508
|
}
|
|
498
509
|
this.notify({ type: "removed", mutation: t });
|
|
499
510
|
}
|
|
500
511
|
canRun(t) {
|
|
501
512
|
var r;
|
|
502
|
-
const n = (r =
|
|
513
|
+
const n = (r = b(this, Z).get(ct(t))) == null ? void 0 : r.find((a) => a.state.status === "pending");
|
|
503
514
|
return !n || n === t;
|
|
504
515
|
}
|
|
505
516
|
runNext(t) {
|
|
506
517
|
var r;
|
|
507
|
-
const n = (r =
|
|
518
|
+
const n = (r = b(this, Z).get(ct(t))) == null ? void 0 : r.find((a) => a !== t && a.state.isPaused);
|
|
508
519
|
return (n == null ? void 0 : n.continue()) ?? Promise.resolve();
|
|
509
520
|
}
|
|
510
521
|
clear() {
|
|
@@ -515,7 +526,7 @@ var de, En, ws = (En = class extends Bn {
|
|
|
515
526
|
});
|
|
516
527
|
}
|
|
517
528
|
getAll() {
|
|
518
|
-
return [...
|
|
529
|
+
return [...b(this, Z).values()].flat();
|
|
519
530
|
}
|
|
520
531
|
find(t) {
|
|
521
532
|
const n = { exact: !0, ...t };
|
|
@@ -541,7 +552,7 @@ var de, En, ws = (En = class extends Bn {
|
|
|
541
552
|
)
|
|
542
553
|
);
|
|
543
554
|
}
|
|
544
|
-
}, Z = new WeakMap(),
|
|
555
|
+
}, Z = new WeakMap(), Ze = new WeakMap(), Cn);
|
|
545
556
|
function ct(e) {
|
|
546
557
|
var t;
|
|
547
558
|
return ((t = e.options.scope) == null ? void 0 : t.id) ?? String(e.mutationId);
|
|
@@ -550,21 +561,21 @@ function ys(e) {
|
|
|
550
561
|
return {
|
|
551
562
|
onFetch: (t, n) => {
|
|
552
563
|
const r = async () => {
|
|
553
|
-
var
|
|
554
|
-
const a = t.options, s = (K = (R = (
|
|
564
|
+
var y, R, K, H, Q;
|
|
565
|
+
const a = t.options, s = (K = (R = (y = t.fetchOptions) == null ? void 0 : y.meta) == null ? void 0 : R.fetchMore) == null ? void 0 : K.direction, i = ((H = t.state.data) == null ? void 0 : H.pages) || [], l = ((Q = t.state.data) == null ? void 0 : Q.pageParams) || [], u = { pages: [], pageParams: [] };
|
|
555
566
|
let v = !1;
|
|
556
|
-
const m = (
|
|
557
|
-
Object.defineProperty(
|
|
567
|
+
const m = (x) => {
|
|
568
|
+
Object.defineProperty(x, "signal", {
|
|
558
569
|
enumerable: !0,
|
|
559
570
|
get: () => (t.signal.aborted ? v = !0 : t.signal.addEventListener("abort", () => {
|
|
560
571
|
v = !0;
|
|
561
572
|
}), t.signal)
|
|
562
573
|
});
|
|
563
|
-
}, c = Ca(t.options, t.fetchOptions), d = async (
|
|
574
|
+
}, c = Ca(t.options, t.fetchOptions), d = async (x, p, C) => {
|
|
564
575
|
if (v)
|
|
565
576
|
return Promise.reject();
|
|
566
|
-
if (p == null &&
|
|
567
|
-
return Promise.resolve(
|
|
577
|
+
if (p == null && x.pages.length)
|
|
578
|
+
return Promise.resolve(x);
|
|
568
579
|
const N = {
|
|
569
580
|
queryKey: t.queryKey,
|
|
570
581
|
pageParam: p,
|
|
@@ -576,24 +587,24 @@ function ys(e) {
|
|
|
576
587
|
N
|
|
577
588
|
), { maxPages: _ } = t.options, w = C ? Ra : Da;
|
|
578
589
|
return {
|
|
579
|
-
pages: w(
|
|
580
|
-
pageParams: w(
|
|
590
|
+
pages: w(x.pages, P, _),
|
|
591
|
+
pageParams: w(x.pageParams, p, _)
|
|
581
592
|
};
|
|
582
593
|
};
|
|
583
594
|
let f;
|
|
584
595
|
if (s && i.length) {
|
|
585
|
-
const
|
|
596
|
+
const x = s === "backward", p = x ? Ms : wn, C = {
|
|
586
597
|
pages: i,
|
|
587
598
|
pageParams: l
|
|
588
599
|
}, N = p(a, C);
|
|
589
|
-
f = await d(C, N,
|
|
600
|
+
f = await d(C, N, x);
|
|
590
601
|
} else {
|
|
591
602
|
f = await d(
|
|
592
603
|
u,
|
|
593
604
|
l[0] ?? a.initialPageParam
|
|
594
605
|
);
|
|
595
|
-
const
|
|
596
|
-
for (let p = 1; p <
|
|
606
|
+
const x = e ?? i.length;
|
|
607
|
+
for (let p = 1; p < x; p++) {
|
|
597
608
|
const C = wn(a, f);
|
|
598
609
|
f = await d(f, C);
|
|
599
610
|
}
|
|
@@ -625,7 +636,7 @@ function wn(e, { pages: t, pageParams: n }) {
|
|
|
625
636
|
n
|
|
626
637
|
);
|
|
627
638
|
}
|
|
628
|
-
function
|
|
639
|
+
function Ms(e, { pages: t, pageParams: n }) {
|
|
629
640
|
var r;
|
|
630
641
|
return (r = e.getPreviousPageParam) == null ? void 0 : r.call(
|
|
631
642
|
e,
|
|
@@ -635,65 +646,65 @@ function bs(e, { pages: t, pageParams: n }) {
|
|
|
635
646
|
n
|
|
636
647
|
);
|
|
637
648
|
}
|
|
638
|
-
var $,
|
|
649
|
+
var $, Ee, Ce, $e, Le, Re, Fe, He, Rn, Ss = (Rn = class {
|
|
639
650
|
constructor(e = {}) {
|
|
640
651
|
ae(this, $);
|
|
641
|
-
ae(this, Se);
|
|
642
652
|
ae(this, Ee);
|
|
643
|
-
ae(this, ke);
|
|
644
|
-
ae(this, $e);
|
|
645
653
|
ae(this, Ce);
|
|
654
|
+
ae(this, $e);
|
|
646
655
|
ae(this, Le);
|
|
656
|
+
ae(this, Re);
|
|
647
657
|
ae(this, Fe);
|
|
648
|
-
|
|
658
|
+
ae(this, He);
|
|
659
|
+
G(this, $, e.queryCache || new bs()), G(this, Ee, e.mutationCache || new xs()), G(this, Ce, e.defaultOptions || {}), G(this, $e, /* @__PURE__ */ new Map()), G(this, Le, /* @__PURE__ */ new Map()), G(this, Re, 0);
|
|
649
660
|
}
|
|
650
661
|
mount() {
|
|
651
|
-
lt(this,
|
|
652
|
-
e && (await this.resumePausedMutations(),
|
|
653
|
-
})), G(this,
|
|
654
|
-
e && (await this.resumePausedMutations(),
|
|
662
|
+
lt(this, Re)._++, b(this, Re) === 1 && (G(this, Fe, ja.subscribe(async (e) => {
|
|
663
|
+
e && (await this.resumePausedMutations(), b(this, $).onFocus());
|
|
664
|
+
})), G(this, He, pn.subscribe(async (e) => {
|
|
665
|
+
e && (await this.resumePausedMutations(), b(this, $).onOnline());
|
|
655
666
|
})));
|
|
656
667
|
}
|
|
657
668
|
unmount() {
|
|
658
669
|
var e, t;
|
|
659
|
-
lt(this,
|
|
670
|
+
lt(this, Re)._--, b(this, Re) === 0 && ((e = b(this, Fe)) == null || e.call(this), G(this, Fe, void 0), (t = b(this, He)) == null || t.call(this), G(this, He, void 0));
|
|
660
671
|
}
|
|
661
672
|
isFetching(e) {
|
|
662
|
-
return
|
|
673
|
+
return b(this, $).findAll({ ...e, fetchStatus: "fetching" }).length;
|
|
663
674
|
}
|
|
664
675
|
isMutating(e) {
|
|
665
|
-
return
|
|
676
|
+
return b(this, Ee).findAll({ ...e, status: "pending" }).length;
|
|
666
677
|
}
|
|
667
678
|
getQueryData(e) {
|
|
668
679
|
var n;
|
|
669
680
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
670
|
-
return (n =
|
|
681
|
+
return (n = b(this, $).get(t.queryHash)) == null ? void 0 : n.state.data;
|
|
671
682
|
}
|
|
672
683
|
ensureQueryData(e) {
|
|
673
684
|
const t = this.getQueryData(e.queryKey);
|
|
674
685
|
if (t === void 0)
|
|
675
686
|
return this.fetchQuery(e);
|
|
676
687
|
{
|
|
677
|
-
const n = this.defaultQueryOptions(e), r =
|
|
688
|
+
const n = this.defaultQueryOptions(e), r = b(this, $).build(this, n);
|
|
678
689
|
return e.revalidateIfStale && r.isStaleByTime(mn(n.staleTime, r)) && this.prefetchQuery(n), Promise.resolve(t);
|
|
679
690
|
}
|
|
680
691
|
}
|
|
681
692
|
getQueriesData(e) {
|
|
682
|
-
return
|
|
693
|
+
return b(this, $).findAll(e).map(({ queryKey: t, state: n }) => {
|
|
683
694
|
const r = n.data;
|
|
684
695
|
return [t, r];
|
|
685
696
|
});
|
|
686
697
|
}
|
|
687
698
|
setQueryData(e, t, n) {
|
|
688
|
-
const r = this.defaultQueryOptions({ queryKey: e }), a =
|
|
699
|
+
const r = this.defaultQueryOptions({ queryKey: e }), a = b(this, $).get(
|
|
689
700
|
r.queryHash
|
|
690
701
|
), s = a == null ? void 0 : a.state.data, i = Na(t, s);
|
|
691
702
|
if (i !== void 0)
|
|
692
|
-
return
|
|
703
|
+
return b(this, $).build(this, r).setData(i, { ...n, manual: !0 });
|
|
693
704
|
}
|
|
694
705
|
setQueriesData(e, t, n) {
|
|
695
706
|
return ee.batch(
|
|
696
|
-
() =>
|
|
707
|
+
() => b(this, $).findAll(e).map(({ queryKey: r }) => [
|
|
697
708
|
r,
|
|
698
709
|
this.setQueryData(r, t, n)
|
|
699
710
|
])
|
|
@@ -702,10 +713,10 @@ var $, Se, Ee, ke, $e, Ce, Le, Fe, Rn, Ms = (Rn = class {
|
|
|
702
713
|
getQueryState(e) {
|
|
703
714
|
var n;
|
|
704
715
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
705
|
-
return (n =
|
|
716
|
+
return (n = b(this, $).get(t.queryHash)) == null ? void 0 : n.state;
|
|
706
717
|
}
|
|
707
718
|
removeQueries(e) {
|
|
708
|
-
const t =
|
|
719
|
+
const t = b(this, $);
|
|
709
720
|
ee.batch(() => {
|
|
710
721
|
t.findAll(e).forEach((n) => {
|
|
711
722
|
t.remove(n);
|
|
@@ -713,7 +724,7 @@ var $, Se, Ee, ke, $e, Ce, Le, Fe, Rn, Ms = (Rn = class {
|
|
|
713
724
|
});
|
|
714
725
|
}
|
|
715
726
|
resetQueries(e, t) {
|
|
716
|
-
const n =
|
|
727
|
+
const n = b(this, $), r = {
|
|
717
728
|
type: "active",
|
|
718
729
|
...e
|
|
719
730
|
};
|
|
@@ -723,13 +734,13 @@ var $, Se, Ee, ke, $e, Ce, Le, Fe, Rn, Ms = (Rn = class {
|
|
|
723
734
|
}
|
|
724
735
|
cancelQueries(e = {}, t = {}) {
|
|
725
736
|
const n = { revert: !0, ...t }, r = ee.batch(
|
|
726
|
-
() =>
|
|
737
|
+
() => b(this, $).findAll(e).map((a) => a.cancel(n))
|
|
727
738
|
);
|
|
728
739
|
return Promise.all(r).then(ve).catch(ve);
|
|
729
740
|
}
|
|
730
741
|
invalidateQueries(e = {}, t = {}) {
|
|
731
742
|
return ee.batch(() => {
|
|
732
|
-
if (
|
|
743
|
+
if (b(this, $).findAll(e).forEach((r) => {
|
|
733
744
|
r.invalidate();
|
|
734
745
|
}), e.refetchType === "none")
|
|
735
746
|
return Promise.resolve();
|
|
@@ -745,7 +756,7 @@ var $, Se, Ee, ke, $e, Ce, Le, Fe, Rn, Ms = (Rn = class {
|
|
|
745
756
|
...t,
|
|
746
757
|
cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
|
|
747
758
|
}, r = ee.batch(
|
|
748
|
-
() =>
|
|
759
|
+
() => b(this, $).findAll(e).filter((a) => !a.isDisabled()).map((a) => {
|
|
749
760
|
let s = a.fetch(void 0, n);
|
|
750
761
|
return n.throwOnError || (s = s.catch(ve)), a.state.fetchStatus === "paused" ? Promise.resolve() : s;
|
|
751
762
|
})
|
|
@@ -755,7 +766,7 @@ var $, Se, Ee, ke, $e, Ce, Le, Fe, Rn, Ms = (Rn = class {
|
|
|
755
766
|
fetchQuery(e) {
|
|
756
767
|
const t = this.defaultQueryOptions(e);
|
|
757
768
|
t.retry === void 0 && (t.retry = !1);
|
|
758
|
-
const n =
|
|
769
|
+
const n = b(this, $).build(this, t);
|
|
759
770
|
return n.isStaleByTime(
|
|
760
771
|
mn(t.staleTime, n)
|
|
761
772
|
) ? n.fetch(t) : Promise.resolve(n.state.data);
|
|
@@ -770,41 +781,41 @@ var $, Se, Ee, ke, $e, Ce, Le, Fe, Rn, Ms = (Rn = class {
|
|
|
770
781
|
return this.fetchInfiniteQuery(e).then(ve).catch(ve);
|
|
771
782
|
}
|
|
772
783
|
resumePausedMutations() {
|
|
773
|
-
return pn.isOnline() ?
|
|
784
|
+
return pn.isOnline() ? b(this, Ee).resumePausedMutations() : Promise.resolve();
|
|
774
785
|
}
|
|
775
786
|
getQueryCache() {
|
|
776
|
-
return
|
|
787
|
+
return b(this, $);
|
|
777
788
|
}
|
|
778
789
|
getMutationCache() {
|
|
779
|
-
return
|
|
790
|
+
return b(this, Ee);
|
|
780
791
|
}
|
|
781
792
|
getDefaultOptions() {
|
|
782
|
-
return
|
|
793
|
+
return b(this, Ce);
|
|
783
794
|
}
|
|
784
795
|
setDefaultOptions(e) {
|
|
785
|
-
G(this,
|
|
796
|
+
G(this, Ce, e);
|
|
786
797
|
}
|
|
787
798
|
setQueryDefaults(e, t) {
|
|
788
|
-
|
|
799
|
+
b(this, $e).set(gn(e), {
|
|
789
800
|
queryKey: e,
|
|
790
801
|
defaultOptions: t
|
|
791
802
|
});
|
|
792
803
|
}
|
|
793
804
|
getQueryDefaults(e) {
|
|
794
|
-
const t = [...
|
|
805
|
+
const t = [...b(this, $e).values()];
|
|
795
806
|
let n = {};
|
|
796
807
|
return t.forEach((r) => {
|
|
797
808
|
vn(e, r.queryKey) && (n = { ...n, ...r.defaultOptions });
|
|
798
809
|
}), n;
|
|
799
810
|
}
|
|
800
811
|
setMutationDefaults(e, t) {
|
|
801
|
-
|
|
812
|
+
b(this, Le).set(gn(e), {
|
|
802
813
|
mutationKey: e,
|
|
803
814
|
defaultOptions: t
|
|
804
815
|
});
|
|
805
816
|
}
|
|
806
817
|
getMutationDefaults(e) {
|
|
807
|
-
const t = [...
|
|
818
|
+
const t = [...b(this, Le).values()];
|
|
808
819
|
let n = {};
|
|
809
820
|
return t.forEach((r) => {
|
|
810
821
|
vn(e, r.mutationKey) && (n = { ...n, ...r.defaultOptions });
|
|
@@ -814,7 +825,7 @@ var $, Se, Ee, ke, $e, Ce, Le, Fe, Rn, Ms = (Rn = class {
|
|
|
814
825
|
if (e._defaulted)
|
|
815
826
|
return e;
|
|
816
827
|
const t = {
|
|
817
|
-
...
|
|
828
|
+
...b(this, Ce).queries,
|
|
818
829
|
...this.getQueryDefaults(e.queryKey),
|
|
819
830
|
...e,
|
|
820
831
|
_defaulted: !0
|
|
@@ -826,21 +837,21 @@ var $, Se, Ee, ke, $e, Ce, Le, Fe, Rn, Ms = (Rn = class {
|
|
|
826
837
|
}
|
|
827
838
|
defaultMutationOptions(e) {
|
|
828
839
|
return e != null && e._defaulted ? e : {
|
|
829
|
-
...
|
|
840
|
+
...b(this, Ce).mutations,
|
|
830
841
|
...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
|
|
831
842
|
...e,
|
|
832
843
|
_defaulted: !0
|
|
833
844
|
};
|
|
834
845
|
}
|
|
835
846
|
clear() {
|
|
836
|
-
|
|
847
|
+
b(this, $).clear(), b(this, Ee).clear();
|
|
837
848
|
}
|
|
838
|
-
}, $ = new WeakMap(),
|
|
839
|
-
const
|
|
849
|
+
}, $ = new WeakMap(), Ee = new WeakMap(), Ce = new WeakMap(), $e = new WeakMap(), Le = new WeakMap(), Re = new WeakMap(), Fe = new WeakMap(), He = new WeakMap(), Rn);
|
|
850
|
+
const Es = Ln(null), St = {
|
|
840
851
|
didCatch: !1,
|
|
841
852
|
error: null
|
|
842
853
|
};
|
|
843
|
-
class
|
|
854
|
+
class Cs extends pa {
|
|
844
855
|
constructor(t) {
|
|
845
856
|
super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = St;
|
|
846
857
|
}
|
|
@@ -873,7 +884,7 @@ class Es extends pa {
|
|
|
873
884
|
} = this.state, {
|
|
874
885
|
resetKeys: a
|
|
875
886
|
} = this.props;
|
|
876
|
-
if (r && n.error !== null &&
|
|
887
|
+
if (r && n.error !== null && Rs(t.resetKeys, a)) {
|
|
877
888
|
var s, i;
|
|
878
889
|
(s = (i = this.props).onReset) === null || s === void 0 || s.call(i, {
|
|
879
890
|
next: a,
|
|
@@ -907,7 +918,7 @@ class Es extends pa {
|
|
|
907
918
|
else
|
|
908
919
|
throw i;
|
|
909
920
|
}
|
|
910
|
-
return dn(
|
|
921
|
+
return dn(Es.Provider, {
|
|
911
922
|
value: {
|
|
912
923
|
didCatch: s,
|
|
913
924
|
error: i,
|
|
@@ -916,12 +927,12 @@ class Es extends pa {
|
|
|
916
927
|
}, l);
|
|
917
928
|
}
|
|
918
929
|
}
|
|
919
|
-
function
|
|
930
|
+
function Rs() {
|
|
920
931
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
921
932
|
return e.length !== t.length || e.some((n, r) => !Object.is(n, t[r]));
|
|
922
933
|
}
|
|
923
|
-
const
|
|
924
|
-
class
|
|
934
|
+
const Ds = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems == "function", js = (e) => "getRoutes" in e && typeof e.getRoutes == "function", Ns = (e) => "renderSearch" in e && typeof e.renderSearch == "function", Ps = (e) => "initialize" in e && typeof e.initialize == "function", Ts = (e) => "getHead" in e && typeof e.getHead == "function", _s = (e) => "getMdxComponents" in e && typeof e.getMdxComponents == "function", Os = (e) => "getIdentities" in e && typeof e.getIdentities == "function", Yn = new Ss();
|
|
935
|
+
class Is {
|
|
925
936
|
constructor(t) {
|
|
926
937
|
J(this, "plugins");
|
|
927
938
|
J(this, "sidebars");
|
|
@@ -932,7 +943,7 @@ class Os {
|
|
|
932
943
|
J(this, "navigationPlugins");
|
|
933
944
|
J(this, "initialize", async () => {
|
|
934
945
|
await Promise.all(
|
|
935
|
-
this.plugins.filter(
|
|
946
|
+
this.plugins.filter(Ps).map((t) => {
|
|
936
947
|
var n;
|
|
937
948
|
return (n = t.initialize) == null ? void 0 : n.call(t, this);
|
|
938
949
|
})
|
|
@@ -942,7 +953,7 @@ class Os {
|
|
|
942
953
|
await Yn.invalidateQueries({ queryKey: t });
|
|
943
954
|
});
|
|
944
955
|
J(this, "getApiIdentities", async () => (await Promise.all(
|
|
945
|
-
this.plugins.filter(
|
|
956
|
+
this.plugins.filter(Os).map((n) => n.getIdentities(this))
|
|
946
957
|
)).flat());
|
|
947
958
|
J(this, "getPluginSidebar", async (t) => (await Promise.all(
|
|
948
959
|
this.navigationPlugins.map(
|
|
@@ -958,32 +969,32 @@ class Os {
|
|
|
958
969
|
const n = await this.authentication.getAccessToken();
|
|
959
970
|
return t.headers.set("Authorization", `Bearer ${n}`), t;
|
|
960
971
|
});
|
|
961
|
-
this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(
|
|
972
|
+
this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(js), this.authentication = t.authentication, this.meta = t.metadata, this.page = t.page;
|
|
962
973
|
}
|
|
963
974
|
}
|
|
964
|
-
function
|
|
975
|
+
function As({ error: e, resetErrorBoundary: t }) {
|
|
965
976
|
return /* @__PURE__ */ o.jsx(Nn, { error: e });
|
|
966
977
|
}
|
|
967
978
|
const ut = globalThis;
|
|
968
979
|
(!ut.requestIdleCallback || !ut.cancelIdleCallback) && (ut.requestIdleCallback = (e) => setTimeout(e, 1), ut.cancelIdleCallback = clearTimeout);
|
|
969
|
-
var Nt = ["Enter", " "],
|
|
980
|
+
var Nt = ["Enter", " "], ks = ["ArrowDown", "PageUp", "Home"], Xn = ["ArrowUp", "PageDown", "End"], $s = [...ks, ...Xn], Ls = {
|
|
970
981
|
ltr: [...Nt, "ArrowRight"],
|
|
971
982
|
rtl: [...Nt, "ArrowLeft"]
|
|
972
|
-
},
|
|
983
|
+
}, Fs = {
|
|
973
984
|
ltr: ["ArrowLeft"],
|
|
974
985
|
rtl: ["ArrowRight"]
|
|
975
|
-
}, nt = "Menu", [
|
|
976
|
-
|
|
986
|
+
}, nt = "Menu", [Xe, Hs, Us] = Go(nt), [Oe, Jn] = Pn(nt, [
|
|
987
|
+
Us,
|
|
977
988
|
Tn,
|
|
978
989
|
qn
|
|
979
|
-
]), rt = Tn(), Zn = qn(), [er, De] =
|
|
990
|
+
]), rt = Tn(), Zn = qn(), [er, De] = Oe(nt), [Bs, ot] = Oe(nt), tr = (e) => {
|
|
980
991
|
const { __scopeMenu: t, open: n = !1, children: r, dir: a, onOpenChange: s, modal: i = !0 } = e, l = rt(t), [u, v] = h.useState(null), m = h.useRef(!1), c = kt(s), d = aa(a);
|
|
981
992
|
return h.useEffect(() => {
|
|
982
993
|
const f = () => {
|
|
983
|
-
m.current = !0, document.addEventListener("pointerdown",
|
|
984
|
-
},
|
|
994
|
+
m.current = !0, document.addEventListener("pointerdown", y, { capture: !0, once: !0 }), document.addEventListener("pointermove", y, { capture: !0, once: !0 });
|
|
995
|
+
}, y = () => m.current = !1;
|
|
985
996
|
return document.addEventListener("keydown", f, { capture: !0 }), () => {
|
|
986
|
-
document.removeEventListener("keydown", f, { capture: !0 }), document.removeEventListener("pointerdown",
|
|
997
|
+
document.removeEventListener("keydown", f, { capture: !0 }), document.removeEventListener("pointerdown", y, { capture: !0 }), document.removeEventListener("pointermove", y, { capture: !0 });
|
|
987
998
|
};
|
|
988
999
|
}, []), /* @__PURE__ */ o.jsx(On, { ...l, children: /* @__PURE__ */ o.jsx(
|
|
989
1000
|
er,
|
|
@@ -994,7 +1005,7 @@ var Nt = ["Enter", " "], As = ["ArrowDown", "PageUp", "Home"], Xn = ["ArrowUp",
|
|
|
994
1005
|
content: u,
|
|
995
1006
|
onContentChange: v,
|
|
996
1007
|
children: /* @__PURE__ */ o.jsx(
|
|
997
|
-
|
|
1008
|
+
Bs,
|
|
998
1009
|
{
|
|
999
1010
|
scope: t,
|
|
1000
1011
|
onClose: h.useCallback(() => c(!1), [c]),
|
|
@@ -1008,28 +1019,28 @@ var Nt = ["Enter", " "], As = ["ArrowDown", "PageUp", "Home"], Xn = ["ArrowUp",
|
|
|
1008
1019
|
) });
|
|
1009
1020
|
};
|
|
1010
1021
|
tr.displayName = nt;
|
|
1011
|
-
var
|
|
1022
|
+
var zs = "MenuAnchor", Bt = h.forwardRef(
|
|
1012
1023
|
(e, t) => {
|
|
1013
1024
|
const { __scopeMenu: n, ...r } = e, a = rt(n);
|
|
1014
1025
|
return /* @__PURE__ */ o.jsx(Wo, { ...a, ...r, ref: t });
|
|
1015
1026
|
}
|
|
1016
1027
|
);
|
|
1017
|
-
Bt.displayName =
|
|
1018
|
-
var zt = "MenuPortal", [
|
|
1028
|
+
Bt.displayName = zs;
|
|
1029
|
+
var zt = "MenuPortal", [Ks, nr] = Oe(zt, {
|
|
1019
1030
|
forceMount: void 0
|
|
1020
1031
|
}), rr = (e) => {
|
|
1021
1032
|
const { __scopeMenu: t, forceMount: n, children: r, container: a } = e, s = De(zt, t);
|
|
1022
|
-
return /* @__PURE__ */ o.jsx(
|
|
1033
|
+
return /* @__PURE__ */ o.jsx(Ks, { scope: t, forceMount: n, children: /* @__PURE__ */ o.jsx(vt, { present: n || s.open, children: /* @__PURE__ */ o.jsx(sa, { asChild: !0, container: a, children: r }) }) });
|
|
1023
1034
|
};
|
|
1024
1035
|
rr.displayName = zt;
|
|
1025
|
-
var se = "MenuContent", [
|
|
1036
|
+
var se = "MenuContent", [qs, Kt] = Oe(se), or = h.forwardRef(
|
|
1026
1037
|
(e, t) => {
|
|
1027
1038
|
const n = nr(se, e.__scopeMenu), { forceMount: r = n.forceMount, ...a } = e, s = De(se, e.__scopeMenu), i = ot(se, e.__scopeMenu);
|
|
1028
|
-
return /* @__PURE__ */ o.jsx(
|
|
1039
|
+
return /* @__PURE__ */ o.jsx(Xe.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ o.jsx(vt, { present: r || s.open, children: /* @__PURE__ */ o.jsx(Xe.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ o.jsx(Vs, { ...a, ref: t }) : /* @__PURE__ */ o.jsx(Qs, { ...a, ref: t }) }) }) });
|
|
1029
1040
|
}
|
|
1030
|
-
),
|
|
1041
|
+
), Vs = h.forwardRef(
|
|
1031
1042
|
(e, t) => {
|
|
1032
|
-
const n = De(se, e.__scopeMenu), r = h.useRef(null), a =
|
|
1043
|
+
const n = De(se, e.__scopeMenu), r = h.useRef(null), a = et(t, r);
|
|
1033
1044
|
return h.useEffect(() => {
|
|
1034
1045
|
const s = r.current;
|
|
1035
1046
|
if (s) return Yo(s);
|
|
@@ -1041,7 +1052,7 @@ var se = "MenuContent", [Ks, Kt] = _e(se), or = h.forwardRef(
|
|
|
1041
1052
|
trapFocus: n.open,
|
|
1042
1053
|
disableOutsidePointerEvents: n.open,
|
|
1043
1054
|
disableOutsideScroll: !0,
|
|
1044
|
-
onFocusOutside:
|
|
1055
|
+
onFocusOutside: A(
|
|
1045
1056
|
e.onFocusOutside,
|
|
1046
1057
|
(s) => s.preventDefault(),
|
|
1047
1058
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -1050,7 +1061,7 @@ var se = "MenuContent", [Ks, Kt] = _e(se), or = h.forwardRef(
|
|
|
1050
1061
|
}
|
|
1051
1062
|
);
|
|
1052
1063
|
}
|
|
1053
|
-
),
|
|
1064
|
+
), Qs = h.forwardRef((e, t) => {
|
|
1054
1065
|
const n = De(se, e.__scopeMenu);
|
|
1055
1066
|
return /* @__PURE__ */ o.jsx(
|
|
1056
1067
|
qt,
|
|
@@ -1078,11 +1089,11 @@ var se = "MenuContent", [Ks, Kt] = _e(se), or = h.forwardRef(
|
|
|
1078
1089
|
onFocusOutside: c,
|
|
1079
1090
|
onInteractOutside: d,
|
|
1080
1091
|
onDismiss: f,
|
|
1081
|
-
disableOutsideScroll:
|
|
1092
|
+
disableOutsideScroll: y,
|
|
1082
1093
|
...R
|
|
1083
|
-
} = e, K = De(se, n), H = ot(se, n), Q = rt(n),
|
|
1094
|
+
} = e, K = De(se, n), H = ot(se, n), Q = rt(n), x = Zn(n), p = Hs(n), [C, N] = h.useState(null), P = h.useRef(null), _ = et(t, P, K.onContentChange), w = h.useRef(0), L = h.useRef(""), te = h.useRef(0), V = h.useRef(null), q = h.useRef("right"), X = h.useRef(0), Ie = y ? na : h.Fragment, he = y ? { as: ra, allowPinchZoom: !0 } : void 0, ze = (E) => {
|
|
1084
1095
|
var le, ge;
|
|
1085
|
-
const U = L.current + E, Y = p().filter((re) => !re.disabled), ne = document.activeElement, je = (le = Y.find((re) => re.ref.current === ne)) == null ? void 0 : le.textValue, pe = Y.map((re) => re.textValue),
|
|
1096
|
+
const U = L.current + E, Y = p().filter((re) => !re.disabled), ne = document.activeElement, je = (le = Y.find((re) => re.ref.current === ne)) == null ? void 0 : le.textValue, pe = Y.map((re) => re.textValue), Me = ai(pe, U, je), me = (ge = Y.find((re) => re.textValue === Me)) == null ? void 0 : ge.ref.current;
|
|
1086
1097
|
(function re(M) {
|
|
1087
1098
|
L.current = M, window.clearTimeout(w.current), M !== "" && (w.current = window.setTimeout(() => re(""), 1e3));
|
|
1088
1099
|
})(U), me && setTimeout(() => me.focus());
|
|
@@ -1090,10 +1101,10 @@ var se = "MenuContent", [Ks, Kt] = _e(se), or = h.forwardRef(
|
|
|
1090
1101
|
h.useEffect(() => () => window.clearTimeout(w.current), []), Xo();
|
|
1091
1102
|
const ye = h.useCallback((E) => {
|
|
1092
1103
|
var Y, ne;
|
|
1093
|
-
return q.current === ((Y = V.current) == null ? void 0 : Y.side) &&
|
|
1104
|
+
return q.current === ((Y = V.current) == null ? void 0 : Y.side) && ii(E, (ne = V.current) == null ? void 0 : ne.area);
|
|
1094
1105
|
}, []);
|
|
1095
1106
|
return /* @__PURE__ */ o.jsx(
|
|
1096
|
-
|
|
1107
|
+
qs,
|
|
1097
1108
|
{
|
|
1098
1109
|
scope: n,
|
|
1099
1110
|
searchRef: L,
|
|
@@ -1120,12 +1131,12 @@ var se = "MenuContent", [Ks, Kt] = _e(se), or = h.forwardRef(
|
|
|
1120
1131
|
onPointerGraceIntentChange: h.useCallback((E) => {
|
|
1121
1132
|
V.current = E;
|
|
1122
1133
|
}, []),
|
|
1123
|
-
children: /* @__PURE__ */ o.jsx(
|
|
1134
|
+
children: /* @__PURE__ */ o.jsx(Ie, { ...he, children: /* @__PURE__ */ o.jsx(
|
|
1124
1135
|
Jo,
|
|
1125
1136
|
{
|
|
1126
1137
|
asChild: !0,
|
|
1127
1138
|
trapped: a,
|
|
1128
|
-
onMountAutoFocus:
|
|
1139
|
+
onMountAutoFocus: A(s, (E) => {
|
|
1129
1140
|
var U;
|
|
1130
1141
|
E.preventDefault(), (U = P.current) == null || U.focus({ preventScroll: !0 });
|
|
1131
1142
|
}),
|
|
@@ -1144,13 +1155,13 @@ var se = "MenuContent", [Ks, Kt] = _e(se), or = h.forwardRef(
|
|
|
1144
1155
|
Aa,
|
|
1145
1156
|
{
|
|
1146
1157
|
asChild: !0,
|
|
1147
|
-
...
|
|
1158
|
+
...x,
|
|
1148
1159
|
dir: H.dir,
|
|
1149
1160
|
orientation: "vertical",
|
|
1150
1161
|
loop: r,
|
|
1151
1162
|
currentTabStopId: C,
|
|
1152
1163
|
onCurrentTabStopIdChange: N,
|
|
1153
|
-
onEntryFocus:
|
|
1164
|
+
onEntryFocus: A(u, (E) => {
|
|
1154
1165
|
H.isUsingKeyboardRef.current || E.preventDefault();
|
|
1155
1166
|
}),
|
|
1156
1167
|
preventScrollOnEntryFocus: !0,
|
|
@@ -1159,28 +1170,28 @@ var se = "MenuContent", [Ks, Kt] = _e(se), or = h.forwardRef(
|
|
|
1159
1170
|
{
|
|
1160
1171
|
role: "menu",
|
|
1161
1172
|
"aria-orientation": "vertical",
|
|
1162
|
-
"data-state":
|
|
1173
|
+
"data-state": yr(K.open),
|
|
1163
1174
|
"data-radix-menu-content": "",
|
|
1164
1175
|
dir: H.dir,
|
|
1165
1176
|
...Q,
|
|
1166
1177
|
...R,
|
|
1167
1178
|
ref: _,
|
|
1168
1179
|
style: { outline: "none", ...R.style },
|
|
1169
|
-
onKeyDown:
|
|
1180
|
+
onKeyDown: A(R.onKeyDown, (E) => {
|
|
1170
1181
|
const Y = E.target.closest("[data-radix-menu-content]") === E.currentTarget, ne = E.ctrlKey || E.altKey || E.metaKey, je = E.key.length === 1;
|
|
1171
|
-
Y && (E.key === "Tab" && E.preventDefault(), !ne && je &&
|
|
1182
|
+
Y && (E.key === "Tab" && E.preventDefault(), !ne && je && ze(E.key));
|
|
1172
1183
|
const pe = P.current;
|
|
1173
|
-
if (E.target !== pe ||
|
|
1184
|
+
if (E.target !== pe || !$s.includes(E.key)) return;
|
|
1174
1185
|
E.preventDefault();
|
|
1175
1186
|
const me = p().filter((le) => !le.disabled).map((le) => le.ref.current);
|
|
1176
|
-
Xn.includes(E.key) && me.reverse(),
|
|
1187
|
+
Xn.includes(E.key) && me.reverse(), ri(me);
|
|
1177
1188
|
}),
|
|
1178
|
-
onBlur:
|
|
1189
|
+
onBlur: A(e.onBlur, (E) => {
|
|
1179
1190
|
E.currentTarget.contains(E.target) || (window.clearTimeout(w.current), L.current = "");
|
|
1180
1191
|
}),
|
|
1181
|
-
onPointerMove:
|
|
1192
|
+
onPointerMove: A(
|
|
1182
1193
|
e.onPointerMove,
|
|
1183
|
-
|
|
1194
|
+
Je((E) => {
|
|
1184
1195
|
const U = E.target, Y = X.current !== E.clientX;
|
|
1185
1196
|
if (E.currentTarget.contains(U) && Y) {
|
|
1186
1197
|
const ne = E.clientX > X.current ? "right" : "left";
|
|
@@ -1201,27 +1212,27 @@ var se = "MenuContent", [Ks, Kt] = _e(se), or = h.forwardRef(
|
|
|
1201
1212
|
}
|
|
1202
1213
|
);
|
|
1203
1214
|
or.displayName = se;
|
|
1204
|
-
var
|
|
1215
|
+
var Gs = "MenuGroup", Vt = h.forwardRef(
|
|
1205
1216
|
(e, t) => {
|
|
1206
1217
|
const { __scopeMenu: n, ...r } = e;
|
|
1207
1218
|
return /* @__PURE__ */ o.jsx(Ue.div, { role: "group", ...r, ref: t });
|
|
1208
1219
|
}
|
|
1209
1220
|
);
|
|
1210
|
-
Vt.displayName =
|
|
1211
|
-
var
|
|
1221
|
+
Vt.displayName = Gs;
|
|
1222
|
+
var Ws = "MenuLabel", ar = h.forwardRef(
|
|
1212
1223
|
(e, t) => {
|
|
1213
1224
|
const { __scopeMenu: n, ...r } = e;
|
|
1214
1225
|
return /* @__PURE__ */ o.jsx(Ue.div, { ...r, ref: t });
|
|
1215
1226
|
}
|
|
1216
1227
|
);
|
|
1217
|
-
ar.displayName =
|
|
1218
|
-
var mt = "MenuItem",
|
|
1228
|
+
ar.displayName = Ws;
|
|
1229
|
+
var mt = "MenuItem", bn = "menu.itemSelect", wt = h.forwardRef(
|
|
1219
1230
|
(e, t) => {
|
|
1220
|
-
const { disabled: n = !1, onSelect: r, ...a } = e, s = h.useRef(null), i = ot(mt, e.__scopeMenu), l = Kt(mt, e.__scopeMenu), u =
|
|
1231
|
+
const { disabled: n = !1, onSelect: r, ...a } = e, s = h.useRef(null), i = ot(mt, e.__scopeMenu), l = Kt(mt, e.__scopeMenu), u = et(t, s), v = h.useRef(!1), m = () => {
|
|
1221
1232
|
const c = s.current;
|
|
1222
1233
|
if (!n && c) {
|
|
1223
|
-
const d = new CustomEvent(
|
|
1224
|
-
c.addEventListener(
|
|
1234
|
+
const d = new CustomEvent(bn, { bubbles: !0, cancelable: !0 });
|
|
1235
|
+
c.addEventListener(bn, (f) => r == null ? void 0 : r(f), { once: !0 }), oa(c, d), d.defaultPrevented ? v.current = !1 : i.onClose();
|
|
1225
1236
|
}
|
|
1226
1237
|
};
|
|
1227
1238
|
return /* @__PURE__ */ o.jsx(
|
|
@@ -1230,16 +1241,16 @@ var mt = "MenuItem", xn = "menu.itemSelect", wt = h.forwardRef(
|
|
|
1230
1241
|
...a,
|
|
1231
1242
|
ref: u,
|
|
1232
1243
|
disabled: n,
|
|
1233
|
-
onClick:
|
|
1244
|
+
onClick: A(e.onClick, m),
|
|
1234
1245
|
onPointerDown: (c) => {
|
|
1235
1246
|
var d;
|
|
1236
1247
|
(d = e.onPointerDown) == null || d.call(e, c), v.current = !0;
|
|
1237
1248
|
},
|
|
1238
|
-
onPointerUp:
|
|
1249
|
+
onPointerUp: A(e.onPointerUp, (c) => {
|
|
1239
1250
|
var d;
|
|
1240
1251
|
v.current || (d = c.currentTarget) == null || d.click();
|
|
1241
1252
|
}),
|
|
1242
|
-
onKeyDown:
|
|
1253
|
+
onKeyDown: A(e.onKeyDown, (c) => {
|
|
1243
1254
|
const d = l.searchRef.current !== "";
|
|
1244
1255
|
n || d && c.key === " " || Nt.includes(c.key) && (c.currentTarget.click(), c.preventDefault());
|
|
1245
1256
|
})
|
|
@@ -1250,12 +1261,12 @@ var mt = "MenuItem", xn = "menu.itemSelect", wt = h.forwardRef(
|
|
|
1250
1261
|
wt.displayName = mt;
|
|
1251
1262
|
var sr = h.forwardRef(
|
|
1252
1263
|
(e, t) => {
|
|
1253
|
-
const { __scopeMenu: n, disabled: r = !1, textValue: a, ...s } = e, i = Kt(mt, n), l = Zn(n), u = h.useRef(null), v =
|
|
1264
|
+
const { __scopeMenu: n, disabled: r = !1, textValue: a, ...s } = e, i = Kt(mt, n), l = Zn(n), u = h.useRef(null), v = et(t, u), [m, c] = h.useState(!1), [d, f] = h.useState("");
|
|
1254
1265
|
return h.useEffect(() => {
|
|
1255
|
-
const
|
|
1256
|
-
|
|
1266
|
+
const y = u.current;
|
|
1267
|
+
y && f((y.textContent ?? "").trim());
|
|
1257
1268
|
}, [s.children]), /* @__PURE__ */ o.jsx(
|
|
1258
|
-
|
|
1269
|
+
Xe.ItemSlot,
|
|
1259
1270
|
{
|
|
1260
1271
|
scope: n,
|
|
1261
1272
|
disabled: r,
|
|
@@ -1269,24 +1280,24 @@ var sr = h.forwardRef(
|
|
|
1269
1280
|
"data-disabled": r ? "" : void 0,
|
|
1270
1281
|
...s,
|
|
1271
1282
|
ref: v,
|
|
1272
|
-
onPointerMove:
|
|
1283
|
+
onPointerMove: A(
|
|
1273
1284
|
e.onPointerMove,
|
|
1274
|
-
|
|
1275
|
-
r ? i.onItemLeave(
|
|
1285
|
+
Je((y) => {
|
|
1286
|
+
r ? i.onItemLeave(y) : (i.onItemEnter(y), y.defaultPrevented || y.currentTarget.focus({ preventScroll: !0 }));
|
|
1276
1287
|
})
|
|
1277
1288
|
),
|
|
1278
|
-
onPointerLeave:
|
|
1289
|
+
onPointerLeave: A(
|
|
1279
1290
|
e.onPointerLeave,
|
|
1280
|
-
|
|
1291
|
+
Je((y) => i.onItemLeave(y))
|
|
1281
1292
|
),
|
|
1282
|
-
onFocus:
|
|
1283
|
-
onBlur:
|
|
1293
|
+
onFocus: A(e.onFocus, () => c(!0)),
|
|
1294
|
+
onBlur: A(e.onBlur, () => c(!1))
|
|
1284
1295
|
}
|
|
1285
1296
|
) })
|
|
1286
1297
|
}
|
|
1287
1298
|
);
|
|
1288
1299
|
}
|
|
1289
|
-
),
|
|
1300
|
+
), Ys = "MenuCheckboxItem", ir = h.forwardRef(
|
|
1290
1301
|
(e, t) => {
|
|
1291
1302
|
const { checked: n = !1, onCheckedChange: r, ...a } = e;
|
|
1292
1303
|
return /* @__PURE__ */ o.jsx(fr, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ o.jsx(
|
|
@@ -1297,7 +1308,7 @@ var sr = h.forwardRef(
|
|
|
1297
1308
|
...a,
|
|
1298
1309
|
ref: t,
|
|
1299
1310
|
"data-state": Wt(n),
|
|
1300
|
-
onSelect:
|
|
1311
|
+
onSelect: A(
|
|
1301
1312
|
a.onSelect,
|
|
1302
1313
|
() => r == null ? void 0 : r(gt(n) ? !0 : !n),
|
|
1303
1314
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -1306,21 +1317,21 @@ var sr = h.forwardRef(
|
|
|
1306
1317
|
) });
|
|
1307
1318
|
}
|
|
1308
1319
|
);
|
|
1309
|
-
ir.displayName =
|
|
1310
|
-
var lr = "MenuRadioGroup", [
|
|
1320
|
+
ir.displayName = Ys;
|
|
1321
|
+
var lr = "MenuRadioGroup", [Xs, Js] = Oe(
|
|
1311
1322
|
lr,
|
|
1312
1323
|
{ value: void 0, onValueChange: () => {
|
|
1313
1324
|
} }
|
|
1314
1325
|
), cr = h.forwardRef(
|
|
1315
1326
|
(e, t) => {
|
|
1316
1327
|
const { value: n, onValueChange: r, ...a } = e, s = kt(r);
|
|
1317
|
-
return /* @__PURE__ */ o.jsx(
|
|
1328
|
+
return /* @__PURE__ */ o.jsx(Xs, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ o.jsx(Vt, { ...a, ref: t }) });
|
|
1318
1329
|
}
|
|
1319
1330
|
);
|
|
1320
1331
|
cr.displayName = lr;
|
|
1321
1332
|
var ur = "MenuRadioItem", dr = h.forwardRef(
|
|
1322
1333
|
(e, t) => {
|
|
1323
|
-
const { value: n, ...r } = e, a =
|
|
1334
|
+
const { value: n, ...r } = e, a = Js(ur, e.__scopeMenu), s = n === a.value;
|
|
1324
1335
|
return /* @__PURE__ */ o.jsx(fr, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ o.jsx(
|
|
1325
1336
|
wt,
|
|
1326
1337
|
{
|
|
@@ -1329,7 +1340,7 @@ var ur = "MenuRadioItem", dr = h.forwardRef(
|
|
|
1329
1340
|
...r,
|
|
1330
1341
|
ref: t,
|
|
1331
1342
|
"data-state": Wt(s),
|
|
1332
|
-
onSelect:
|
|
1343
|
+
onSelect: A(
|
|
1333
1344
|
r.onSelect,
|
|
1334
1345
|
() => {
|
|
1335
1346
|
var i;
|
|
@@ -1342,12 +1353,12 @@ var ur = "MenuRadioItem", dr = h.forwardRef(
|
|
|
1342
1353
|
}
|
|
1343
1354
|
);
|
|
1344
1355
|
dr.displayName = ur;
|
|
1345
|
-
var Qt = "MenuItemIndicator", [fr,
|
|
1356
|
+
var Qt = "MenuItemIndicator", [fr, Zs] = Oe(
|
|
1346
1357
|
Qt,
|
|
1347
1358
|
{ checked: !1 }
|
|
1348
1359
|
), hr = h.forwardRef(
|
|
1349
1360
|
(e, t) => {
|
|
1350
|
-
const { __scopeMenu: n, forceMount: r, ...a } = e, s =
|
|
1361
|
+
const { __scopeMenu: n, forceMount: r, ...a } = e, s = Zs(Qt, n);
|
|
1351
1362
|
return /* @__PURE__ */ o.jsx(
|
|
1352
1363
|
vt,
|
|
1353
1364
|
{
|
|
@@ -1365,7 +1376,7 @@ var Qt = "MenuItemIndicator", [fr, Js] = _e(
|
|
|
1365
1376
|
}
|
|
1366
1377
|
);
|
|
1367
1378
|
hr.displayName = Qt;
|
|
1368
|
-
var
|
|
1379
|
+
var ei = "MenuSeparator", pr = h.forwardRef(
|
|
1369
1380
|
(e, t) => {
|
|
1370
1381
|
const { __scopeMenu: n, ...r } = e;
|
|
1371
1382
|
return /* @__PURE__ */ o.jsx(
|
|
@@ -1379,15 +1390,15 @@ var Zs = "MenuSeparator", pr = h.forwardRef(
|
|
|
1379
1390
|
);
|
|
1380
1391
|
}
|
|
1381
1392
|
);
|
|
1382
|
-
pr.displayName =
|
|
1383
|
-
var
|
|
1393
|
+
pr.displayName = ei;
|
|
1394
|
+
var ti = "MenuArrow", mr = h.forwardRef(
|
|
1384
1395
|
(e, t) => {
|
|
1385
1396
|
const { __scopeMenu: n, ...r } = e, a = rt(n);
|
|
1386
1397
|
return /* @__PURE__ */ o.jsx(ta, { ...a, ...r, ref: t });
|
|
1387
1398
|
}
|
|
1388
1399
|
);
|
|
1389
|
-
mr.displayName =
|
|
1390
|
-
var Gt = "MenuSub", [
|
|
1400
|
+
mr.displayName = ti;
|
|
1401
|
+
var Gt = "MenuSub", [ni, gr] = Oe(Gt), vr = (e) => {
|
|
1391
1402
|
const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: a } = e, s = De(Gt, t), i = rt(t), [l, u] = h.useState(null), [v, m] = h.useState(null), c = kt(a);
|
|
1392
1403
|
return h.useEffect(() => (s.open === !1 && c(!1), () => c(!1)), [s.open, c]), /* @__PURE__ */ o.jsx(On, { ...i, children: /* @__PURE__ */ o.jsx(
|
|
1393
1404
|
er,
|
|
@@ -1398,7 +1409,7 @@ var Gt = "MenuSub", [ti, gr] = _e(Gt), vr = (e) => {
|
|
|
1398
1409
|
content: v,
|
|
1399
1410
|
onContentChange: m,
|
|
1400
1411
|
children: /* @__PURE__ */ o.jsx(
|
|
1401
|
-
|
|
1412
|
+
ni,
|
|
1402
1413
|
{
|
|
1403
1414
|
scope: t,
|
|
1404
1415
|
contentId: pt(),
|
|
@@ -1412,9 +1423,9 @@ var Gt = "MenuSub", [ti, gr] = _e(Gt), vr = (e) => {
|
|
|
1412
1423
|
) });
|
|
1413
1424
|
};
|
|
1414
1425
|
vr.displayName = Gt;
|
|
1415
|
-
var
|
|
1426
|
+
var Ge = "MenuSubTrigger", wr = h.forwardRef(
|
|
1416
1427
|
(e, t) => {
|
|
1417
|
-
const n = De(
|
|
1428
|
+
const n = De(Ge, e.__scopeMenu), r = ot(Ge, e.__scopeMenu), a = gr(Ge, e.__scopeMenu), s = Kt(Ge, e.__scopeMenu), i = h.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: u } = s, v = { __scopeMenu: e.__scopeMenu }, m = h.useCallback(() => {
|
|
1418
1429
|
i.current && window.clearTimeout(i.current), i.current = null;
|
|
1419
1430
|
}, []);
|
|
1420
1431
|
return h.useEffect(() => m, [m]), h.useEffect(() => {
|
|
@@ -1429,37 +1440,37 @@ var Qe = "MenuSubTrigger", wr = h.forwardRef(
|
|
|
1429
1440
|
"aria-haspopup": "menu",
|
|
1430
1441
|
"aria-expanded": n.open,
|
|
1431
1442
|
"aria-controls": a.contentId,
|
|
1432
|
-
"data-state":
|
|
1443
|
+
"data-state": yr(n.open),
|
|
1433
1444
|
...e,
|
|
1434
1445
|
ref: _n(t, a.onTriggerChange),
|
|
1435
1446
|
onClick: (c) => {
|
|
1436
1447
|
var d;
|
|
1437
1448
|
(d = e.onClick) == null || d.call(e, c), !(e.disabled || c.defaultPrevented) && (c.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
1438
1449
|
},
|
|
1439
|
-
onPointerMove:
|
|
1450
|
+
onPointerMove: A(
|
|
1440
1451
|
e.onPointerMove,
|
|
1441
|
-
|
|
1452
|
+
Je((c) => {
|
|
1442
1453
|
s.onItemEnter(c), !c.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
|
|
1443
1454
|
n.onOpenChange(!0), m();
|
|
1444
1455
|
}, 100));
|
|
1445
1456
|
})
|
|
1446
1457
|
),
|
|
1447
|
-
onPointerLeave:
|
|
1458
|
+
onPointerLeave: A(
|
|
1448
1459
|
e.onPointerLeave,
|
|
1449
|
-
|
|
1450
|
-
var f,
|
|
1460
|
+
Je((c) => {
|
|
1461
|
+
var f, y;
|
|
1451
1462
|
m();
|
|
1452
1463
|
const d = (f = n.content) == null ? void 0 : f.getBoundingClientRect();
|
|
1453
1464
|
if (d) {
|
|
1454
|
-
const R = (
|
|
1465
|
+
const R = (y = n.content) == null ? void 0 : y.dataset.side, K = R === "right", H = K ? -5 : 5, Q = d[K ? "left" : "right"], x = d[K ? "right" : "left"];
|
|
1455
1466
|
s.onPointerGraceIntentChange({
|
|
1456
1467
|
area: [
|
|
1457
1468
|
// Apply a bleed on clientX to ensure that our exit point is
|
|
1458
1469
|
// consistently within polygon bounds
|
|
1459
1470
|
{ x: c.clientX + H, y: c.clientY },
|
|
1460
1471
|
{ x: Q, y: d.top },
|
|
1461
|
-
{ x
|
|
1462
|
-
{ x
|
|
1472
|
+
{ x, y: d.top },
|
|
1473
|
+
{ x, y: d.bottom },
|
|
1463
1474
|
{ x: Q, y: d.bottom }
|
|
1464
1475
|
],
|
|
1465
1476
|
side: R
|
|
@@ -1473,20 +1484,20 @@ var Qe = "MenuSubTrigger", wr = h.forwardRef(
|
|
|
1473
1484
|
}
|
|
1474
1485
|
})
|
|
1475
1486
|
),
|
|
1476
|
-
onKeyDown:
|
|
1487
|
+
onKeyDown: A(e.onKeyDown, (c) => {
|
|
1477
1488
|
var f;
|
|
1478
1489
|
const d = s.searchRef.current !== "";
|
|
1479
|
-
e.disabled || d && c.key === " " ||
|
|
1490
|
+
e.disabled || d && c.key === " " || Ls[r.dir].includes(c.key) && (n.onOpenChange(!0), (f = n.content) == null || f.focus(), c.preventDefault());
|
|
1480
1491
|
})
|
|
1481
1492
|
}
|
|
1482
1493
|
) });
|
|
1483
1494
|
}
|
|
1484
1495
|
);
|
|
1485
|
-
wr.displayName =
|
|
1486
|
-
var
|
|
1496
|
+
wr.displayName = Ge;
|
|
1497
|
+
var br = "MenuSubContent", xr = h.forwardRef(
|
|
1487
1498
|
(e, t) => {
|
|
1488
|
-
const n = nr(se, e.__scopeMenu), { forceMount: r = n.forceMount, ...a } = e, s = De(se, e.__scopeMenu), i = ot(se, e.__scopeMenu), l = gr(
|
|
1489
|
-
return /* @__PURE__ */ o.jsx(
|
|
1499
|
+
const n = nr(se, e.__scopeMenu), { forceMount: r = n.forceMount, ...a } = e, s = De(se, e.__scopeMenu), i = ot(se, e.__scopeMenu), l = gr(br, e.__scopeMenu), u = h.useRef(null), v = et(t, u);
|
|
1500
|
+
return /* @__PURE__ */ o.jsx(Xe.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ o.jsx(vt, { present: r || s.open, children: /* @__PURE__ */ o.jsx(Xe.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ o.jsx(
|
|
1490
1501
|
qt,
|
|
1491
1502
|
{
|
|
1492
1503
|
id: l.contentId,
|
|
@@ -1503,23 +1514,23 @@ var xr = "MenuSubContent", yr = h.forwardRef(
|
|
|
1503
1514
|
i.isUsingKeyboardRef.current && ((c = u.current) == null || c.focus()), m.preventDefault();
|
|
1504
1515
|
},
|
|
1505
1516
|
onCloseAutoFocus: (m) => m.preventDefault(),
|
|
1506
|
-
onFocusOutside:
|
|
1517
|
+
onFocusOutside: A(e.onFocusOutside, (m) => {
|
|
1507
1518
|
m.target !== l.trigger && s.onOpenChange(!1);
|
|
1508
1519
|
}),
|
|
1509
|
-
onEscapeKeyDown:
|
|
1520
|
+
onEscapeKeyDown: A(e.onEscapeKeyDown, (m) => {
|
|
1510
1521
|
i.onClose(), m.preventDefault();
|
|
1511
1522
|
}),
|
|
1512
|
-
onKeyDown:
|
|
1523
|
+
onKeyDown: A(e.onKeyDown, (m) => {
|
|
1513
1524
|
var f;
|
|
1514
|
-
const c = m.currentTarget.contains(m.target), d =
|
|
1525
|
+
const c = m.currentTarget.contains(m.target), d = Fs[i.dir].includes(m.key);
|
|
1515
1526
|
c && d && (s.onOpenChange(!1), (f = l.trigger) == null || f.focus(), m.preventDefault());
|
|
1516
1527
|
})
|
|
1517
1528
|
}
|
|
1518
1529
|
) }) }) });
|
|
1519
1530
|
}
|
|
1520
1531
|
);
|
|
1521
|
-
|
|
1522
|
-
function
|
|
1532
|
+
xr.displayName = br;
|
|
1533
|
+
function yr(e) {
|
|
1523
1534
|
return e ? "open" : "closed";
|
|
1524
1535
|
}
|
|
1525
1536
|
function gt(e) {
|
|
@@ -1528,24 +1539,24 @@ function gt(e) {
|
|
|
1528
1539
|
function Wt(e) {
|
|
1529
1540
|
return gt(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
1530
1541
|
}
|
|
1531
|
-
function
|
|
1542
|
+
function ri(e) {
|
|
1532
1543
|
const t = document.activeElement;
|
|
1533
1544
|
for (const n of e)
|
|
1534
1545
|
if (n === t || (n.focus(), document.activeElement !== t)) return;
|
|
1535
1546
|
}
|
|
1536
|
-
function
|
|
1547
|
+
function oi(e, t) {
|
|
1537
1548
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
1538
1549
|
}
|
|
1539
|
-
function
|
|
1550
|
+
function ai(e, t, n) {
|
|
1540
1551
|
const a = t.length > 1 && Array.from(t).every((v) => v === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
|
|
1541
|
-
let i =
|
|
1552
|
+
let i = oi(e, Math.max(s, 0));
|
|
1542
1553
|
a.length === 1 && (i = i.filter((v) => v !== n));
|
|
1543
1554
|
const u = i.find(
|
|
1544
1555
|
(v) => v.toLowerCase().startsWith(a.toLowerCase())
|
|
1545
1556
|
);
|
|
1546
1557
|
return u !== n ? u : void 0;
|
|
1547
1558
|
}
|
|
1548
|
-
function
|
|
1559
|
+
function si(e, t) {
|
|
1549
1560
|
const { x: n, y: r } = e;
|
|
1550
1561
|
let a = !1;
|
|
1551
1562
|
for (let s = 0, i = t.length - 1; s < t.length; i = s++) {
|
|
@@ -1554,18 +1565,18 @@ function ai(e, t) {
|
|
|
1554
1565
|
}
|
|
1555
1566
|
return a;
|
|
1556
1567
|
}
|
|
1557
|
-
function
|
|
1568
|
+
function ii(e, t) {
|
|
1558
1569
|
if (!t) return !1;
|
|
1559
1570
|
const n = { x: e.clientX, y: e.clientY };
|
|
1560
|
-
return
|
|
1571
|
+
return si(n, t);
|
|
1561
1572
|
}
|
|
1562
|
-
function
|
|
1573
|
+
function Je(e) {
|
|
1563
1574
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
1564
1575
|
}
|
|
1565
|
-
var
|
|
1576
|
+
var li = tr, ci = Bt, ui = rr, di = or, fi = Vt, hi = ar, pi = wt, mi = ir, gi = cr, vi = dr, wi = hr, bi = pr, xi = mr, yi = vr, Mi = wr, Si = xr, Yt = "DropdownMenu", [Ei, Jl] = Pn(
|
|
1566
1577
|
Yt,
|
|
1567
1578
|
[Jn]
|
|
1568
|
-
), W = Jn(), [
|
|
1579
|
+
), W = Jn(), [Ci, Mr] = Ei(Yt), Sr = (e) => {
|
|
1569
1580
|
const {
|
|
1570
1581
|
__scopeDropdownMenu: t,
|
|
1571
1582
|
children: n,
|
|
@@ -1580,7 +1591,7 @@ var ii = tr, li = Bt, ci = rr, ui = or, di = Vt, fi = ar, hi = wt, pi = ir, mi =
|
|
|
1580
1591
|
onChange: i
|
|
1581
1592
|
});
|
|
1582
1593
|
return /* @__PURE__ */ o.jsx(
|
|
1583
|
-
|
|
1594
|
+
Ci,
|
|
1584
1595
|
{
|
|
1585
1596
|
scope: t,
|
|
1586
1597
|
triggerId: pt(),
|
|
@@ -1590,7 +1601,7 @@ var ii = tr, li = Bt, ci = rr, ui = or, di = Vt, fi = ar, hi = wt, pi = ir, mi =
|
|
|
1590
1601
|
onOpenChange: c,
|
|
1591
1602
|
onOpenToggle: h.useCallback(() => c((d) => !d), [c]),
|
|
1592
1603
|
modal: l,
|
|
1593
|
-
children: /* @__PURE__ */ o.jsx(
|
|
1604
|
+
children: /* @__PURE__ */ o.jsx(li, { ...u, open: m, onOpenChange: c, dir: r, modal: l, children: n })
|
|
1594
1605
|
}
|
|
1595
1606
|
);
|
|
1596
1607
|
};
|
|
@@ -1598,7 +1609,7 @@ Sr.displayName = Yt;
|
|
|
1598
1609
|
var Er = "DropdownMenuTrigger", Cr = h.forwardRef(
|
|
1599
1610
|
(e, t) => {
|
|
1600
1611
|
const { __scopeDropdownMenu: n, disabled: r = !1, ...a } = e, s = Mr(Er, n), i = W(n);
|
|
1601
|
-
return /* @__PURE__ */ o.jsx(
|
|
1612
|
+
return /* @__PURE__ */ o.jsx(ci, { asChild: !0, ...i, children: /* @__PURE__ */ o.jsx(
|
|
1602
1613
|
Ue.button,
|
|
1603
1614
|
{
|
|
1604
1615
|
type: "button",
|
|
@@ -1611,10 +1622,10 @@ var Er = "DropdownMenuTrigger", Cr = h.forwardRef(
|
|
|
1611
1622
|
disabled: r,
|
|
1612
1623
|
...a,
|
|
1613
1624
|
ref: _n(t, s.triggerRef),
|
|
1614
|
-
onPointerDown:
|
|
1625
|
+
onPointerDown: A(e.onPointerDown, (l) => {
|
|
1615
1626
|
!r && l.button === 0 && l.ctrlKey === !1 && (s.onOpenToggle(), s.open || l.preventDefault());
|
|
1616
1627
|
}),
|
|
1617
|
-
onKeyDown:
|
|
1628
|
+
onKeyDown: A(e.onKeyDown, (l) => {
|
|
1618
1629
|
r || (["Enter", " "].includes(l.key) && s.onOpenToggle(), l.key === "ArrowDown" && s.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(l.key) && l.preventDefault());
|
|
1619
1630
|
})
|
|
1620
1631
|
}
|
|
@@ -1622,27 +1633,27 @@ var Er = "DropdownMenuTrigger", Cr = h.forwardRef(
|
|
|
1622
1633
|
}
|
|
1623
1634
|
);
|
|
1624
1635
|
Cr.displayName = Er;
|
|
1625
|
-
var
|
|
1636
|
+
var Ri = "DropdownMenuPortal", Rr = (e) => {
|
|
1626
1637
|
const { __scopeDropdownMenu: t, ...n } = e, r = W(t);
|
|
1627
|
-
return /* @__PURE__ */ o.jsx(
|
|
1638
|
+
return /* @__PURE__ */ o.jsx(ui, { ...r, ...n });
|
|
1628
1639
|
};
|
|
1629
|
-
Rr.displayName =
|
|
1640
|
+
Rr.displayName = Ri;
|
|
1630
1641
|
var Dr = "DropdownMenuContent", jr = h.forwardRef(
|
|
1631
1642
|
(e, t) => {
|
|
1632
1643
|
const { __scopeDropdownMenu: n, ...r } = e, a = Mr(Dr, n), s = W(n), i = h.useRef(!1);
|
|
1633
1644
|
return /* @__PURE__ */ o.jsx(
|
|
1634
|
-
|
|
1645
|
+
di,
|
|
1635
1646
|
{
|
|
1636
1647
|
id: a.contentId,
|
|
1637
1648
|
"aria-labelledby": a.triggerId,
|
|
1638
1649
|
...s,
|
|
1639
1650
|
...r,
|
|
1640
1651
|
ref: t,
|
|
1641
|
-
onCloseAutoFocus:
|
|
1652
|
+
onCloseAutoFocus: A(e.onCloseAutoFocus, (l) => {
|
|
1642
1653
|
var u;
|
|
1643
1654
|
i.current || (u = a.triggerRef.current) == null || u.focus(), i.current = !1, l.preventDefault();
|
|
1644
1655
|
}),
|
|
1645
|
-
onInteractOutside:
|
|
1656
|
+
onInteractOutside: A(e.onInteractOutside, (l) => {
|
|
1646
1657
|
const u = l.detail.originalEvent, v = u.button === 0 && u.ctrlKey === !0, m = u.button === 2 || v;
|
|
1647
1658
|
(!a.modal || m) && (i.current = !0);
|
|
1648
1659
|
}),
|
|
@@ -1659,75 +1670,75 @@ var Dr = "DropdownMenuContent", jr = h.forwardRef(
|
|
|
1659
1670
|
}
|
|
1660
1671
|
);
|
|
1661
1672
|
jr.displayName = Dr;
|
|
1662
|
-
var
|
|
1673
|
+
var Di = "DropdownMenuGroup", ji = h.forwardRef(
|
|
1663
1674
|
(e, t) => {
|
|
1664
1675
|
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1665
|
-
return /* @__PURE__ */ o.jsx(
|
|
1676
|
+
return /* @__PURE__ */ o.jsx(fi, { ...a, ...r, ref: t });
|
|
1666
1677
|
}
|
|
1667
1678
|
);
|
|
1668
|
-
|
|
1669
|
-
var
|
|
1679
|
+
ji.displayName = Di;
|
|
1680
|
+
var Ni = "DropdownMenuLabel", Nr = h.forwardRef(
|
|
1670
1681
|
(e, t) => {
|
|
1671
1682
|
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1672
|
-
return /* @__PURE__ */ o.jsx(
|
|
1683
|
+
return /* @__PURE__ */ o.jsx(hi, { ...a, ...r, ref: t });
|
|
1673
1684
|
}
|
|
1674
1685
|
);
|
|
1675
|
-
Nr.displayName =
|
|
1676
|
-
var
|
|
1686
|
+
Nr.displayName = Ni;
|
|
1687
|
+
var Pi = "DropdownMenuItem", Pr = h.forwardRef(
|
|
1677
1688
|
(e, t) => {
|
|
1678
1689
|
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1679
|
-
return /* @__PURE__ */ o.jsx(
|
|
1690
|
+
return /* @__PURE__ */ o.jsx(pi, { ...a, ...r, ref: t });
|
|
1680
1691
|
}
|
|
1681
1692
|
);
|
|
1682
|
-
Pr.displayName =
|
|
1683
|
-
var
|
|
1684
|
-
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1685
|
-
return /* @__PURE__ */ o.jsx(pi, { ...a, ...r, ref: t });
|
|
1686
|
-
});
|
|
1687
|
-
Tr.displayName = Pi;
|
|
1688
|
-
var Ti = "DropdownMenuRadioGroup", _i = h.forwardRef((e, t) => {
|
|
1693
|
+
Pr.displayName = Pi;
|
|
1694
|
+
var Ti = "DropdownMenuCheckboxItem", Tr = h.forwardRef((e, t) => {
|
|
1689
1695
|
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1690
1696
|
return /* @__PURE__ */ o.jsx(mi, { ...a, ...r, ref: t });
|
|
1691
1697
|
});
|
|
1692
|
-
|
|
1693
|
-
var
|
|
1698
|
+
Tr.displayName = Ti;
|
|
1699
|
+
var _i = "DropdownMenuRadioGroup", Oi = h.forwardRef((e, t) => {
|
|
1694
1700
|
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1695
1701
|
return /* @__PURE__ */ o.jsx(gi, { ...a, ...r, ref: t });
|
|
1696
1702
|
});
|
|
1697
|
-
|
|
1698
|
-
var Ii = "
|
|
1703
|
+
Oi.displayName = _i;
|
|
1704
|
+
var Ii = "DropdownMenuRadioItem", _r = h.forwardRef((e, t) => {
|
|
1699
1705
|
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1700
1706
|
return /* @__PURE__ */ o.jsx(vi, { ...a, ...r, ref: t });
|
|
1701
1707
|
});
|
|
1702
|
-
|
|
1703
|
-
var Ai = "
|
|
1708
|
+
_r.displayName = Ii;
|
|
1709
|
+
var Ai = "DropdownMenuItemIndicator", Or = h.forwardRef((e, t) => {
|
|
1704
1710
|
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1705
1711
|
return /* @__PURE__ */ o.jsx(wi, { ...a, ...r, ref: t });
|
|
1706
1712
|
});
|
|
1707
|
-
|
|
1708
|
-
var ki = "
|
|
1713
|
+
Or.displayName = Ai;
|
|
1714
|
+
var ki = "DropdownMenuSeparator", Ir = h.forwardRef((e, t) => {
|
|
1715
|
+
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1716
|
+
return /* @__PURE__ */ o.jsx(bi, { ...a, ...r, ref: t });
|
|
1717
|
+
});
|
|
1718
|
+
Ir.displayName = ki;
|
|
1719
|
+
var $i = "DropdownMenuArrow", Li = h.forwardRef(
|
|
1709
1720
|
(e, t) => {
|
|
1710
1721
|
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1711
1722
|
return /* @__PURE__ */ o.jsx(xi, { ...a, ...r, ref: t });
|
|
1712
1723
|
}
|
|
1713
1724
|
);
|
|
1714
|
-
|
|
1715
|
-
var
|
|
1725
|
+
Li.displayName = $i;
|
|
1726
|
+
var Fi = (e) => {
|
|
1716
1727
|
const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: a, defaultOpen: s } = e, i = W(t), [l = !1, u] = In({
|
|
1717
1728
|
prop: r,
|
|
1718
1729
|
defaultProp: s,
|
|
1719
1730
|
onChange: a
|
|
1720
1731
|
});
|
|
1721
1732
|
return /* @__PURE__ */ o.jsx(yi, { ...i, open: l, onOpenChange: u, children: n });
|
|
1722
|
-
},
|
|
1733
|
+
}, Hi = "DropdownMenuSubTrigger", Ar = h.forwardRef((e, t) => {
|
|
1723
1734
|
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1724
|
-
return /* @__PURE__ */ o.jsx(
|
|
1735
|
+
return /* @__PURE__ */ o.jsx(Mi, { ...a, ...r, ref: t });
|
|
1725
1736
|
});
|
|
1726
|
-
Ar.displayName =
|
|
1727
|
-
var
|
|
1737
|
+
Ar.displayName = Hi;
|
|
1738
|
+
var Ui = "DropdownMenuSubContent", kr = h.forwardRef((e, t) => {
|
|
1728
1739
|
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1729
1740
|
return /* @__PURE__ */ o.jsx(
|
|
1730
|
-
|
|
1741
|
+
Si,
|
|
1731
1742
|
{
|
|
1732
1743
|
...a,
|
|
1733
1744
|
...r,
|
|
@@ -1743,13 +1754,13 @@ var Hi = "DropdownMenuSubContent", kr = h.forwardRef((e, t) => {
|
|
|
1743
1754
|
}
|
|
1744
1755
|
);
|
|
1745
1756
|
});
|
|
1746
|
-
kr.displayName =
|
|
1747
|
-
var
|
|
1748
|
-
const
|
|
1757
|
+
kr.displayName = Ui;
|
|
1758
|
+
var Bi = Sr, zi = Cr, $r = Rr, Lr = jr, Fr = Nr, Hr = Pr, Ur = Tr, Br = _r, zr = Or, Kr = Ir, Ki = Fi, qr = Ar, Vr = kr;
|
|
1759
|
+
const qi = Bi, Vi = zi, Qi = $r, Gi = Ki, Qr = h.forwardRef(({ className: e, inset: t, children: n, ...r }, a) => /* @__PURE__ */ o.jsxs(
|
|
1749
1760
|
qr,
|
|
1750
1761
|
{
|
|
1751
1762
|
ref: a,
|
|
1752
|
-
className:
|
|
1763
|
+
className: O(
|
|
1753
1764
|
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
|
|
1754
1765
|
t && "pl-8",
|
|
1755
1766
|
e
|
|
@@ -1766,7 +1777,7 @@ const Gr = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
|
|
|
1766
1777
|
Vr,
|
|
1767
1778
|
{
|
|
1768
1779
|
ref: n,
|
|
1769
|
-
className:
|
|
1780
|
+
className: O(
|
|
1770
1781
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1771
1782
|
e
|
|
1772
1783
|
),
|
|
@@ -1779,7 +1790,7 @@ const Wr = h.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__
|
|
|
1779
1790
|
{
|
|
1780
1791
|
ref: r,
|
|
1781
1792
|
sideOffset: t,
|
|
1782
|
-
className:
|
|
1793
|
+
className: O(
|
|
1783
1794
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1784
1795
|
"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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1785
1796
|
e
|
|
@@ -1792,7 +1803,7 @@ const Yr = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
|
|
|
1792
1803
|
Hr,
|
|
1793
1804
|
{
|
|
1794
1805
|
ref: r,
|
|
1795
|
-
className:
|
|
1806
|
+
className: O(
|
|
1796
1807
|
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1797
1808
|
t && "pl-8",
|
|
1798
1809
|
e
|
|
@@ -1801,11 +1812,11 @@ const Yr = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
|
|
|
1801
1812
|
}
|
|
1802
1813
|
));
|
|
1803
1814
|
Yr.displayName = Hr.displayName;
|
|
1804
|
-
const
|
|
1815
|
+
const Wi = h.forwardRef(({ className: e, children: t, checked: n, ...r }, a) => /* @__PURE__ */ o.jsxs(
|
|
1805
1816
|
Ur,
|
|
1806
1817
|
{
|
|
1807
1818
|
ref: a,
|
|
1808
|
-
className:
|
|
1819
|
+
className: O(
|
|
1809
1820
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1810
1821
|
e
|
|
1811
1822
|
),
|
|
@@ -1817,28 +1828,28 @@ const Gi = h.forwardRef(({ className: e, children: t, checked: n, ...r }, a) =>
|
|
|
1817
1828
|
]
|
|
1818
1829
|
}
|
|
1819
1830
|
));
|
|
1820
|
-
|
|
1821
|
-
const
|
|
1831
|
+
Wi.displayName = Ur.displayName;
|
|
1832
|
+
const Yi = h.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ o.jsxs(
|
|
1822
1833
|
Br,
|
|
1823
1834
|
{
|
|
1824
1835
|
ref: r,
|
|
1825
|
-
className:
|
|
1836
|
+
className: O(
|
|
1826
1837
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1827
1838
|
e
|
|
1828
1839
|
),
|
|
1829
1840
|
...n,
|
|
1830
1841
|
children: [
|
|
1831
|
-
/* @__PURE__ */ o.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ o.jsx(zr, { children: /* @__PURE__ */ o.jsx(
|
|
1842
|
+
/* @__PURE__ */ o.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ o.jsx(zr, { children: /* @__PURE__ */ o.jsx(Qa, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1832
1843
|
t
|
|
1833
1844
|
]
|
|
1834
1845
|
}
|
|
1835
1846
|
));
|
|
1836
|
-
|
|
1847
|
+
Yi.displayName = Br.displayName;
|
|
1837
1848
|
const Xr = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ o.jsx(
|
|
1838
1849
|
Fr,
|
|
1839
1850
|
{
|
|
1840
1851
|
ref: r,
|
|
1841
|
-
className:
|
|
1852
|
+
className: O(
|
|
1842
1853
|
"px-2 py-1.5 text-sm font-semibold",
|
|
1843
1854
|
t && "pl-8",
|
|
1844
1855
|
e
|
|
@@ -1851,12 +1862,42 @@ const Jr = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
|
|
|
1851
1862
|
Kr,
|
|
1852
1863
|
{
|
|
1853
1864
|
ref: n,
|
|
1854
|
-
className:
|
|
1865
|
+
className: O("-mx-1 my-1 h-px bg-muted", e),
|
|
1855
1866
|
...t
|
|
1856
1867
|
}
|
|
1857
1868
|
));
|
|
1858
1869
|
Jr.displayName = Kr.displayName;
|
|
1859
|
-
|
|
1870
|
+
const Xi = {
|
|
1871
|
+
info: "bg-blue-500",
|
|
1872
|
+
note: "bg-gray-500",
|
|
1873
|
+
tip: "bg-green-600",
|
|
1874
|
+
caution: "bg-orange-500",
|
|
1875
|
+
danger: "bg-rose-500"
|
|
1876
|
+
}, Ji = () => {
|
|
1877
|
+
const { page: e } = Be(), [t, n] = _e(!0);
|
|
1878
|
+
return !(e != null && e.banner) || !t ? /* @__PURE__ */ o.jsx("style", { children: ":root { --banner-height: 0px; }" }) : /* @__PURE__ */ o.jsxs(
|
|
1879
|
+
"div",
|
|
1880
|
+
{
|
|
1881
|
+
className: O(
|
|
1882
|
+
"relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
|
|
1883
|
+
e.banner.color ? Xi[e.banner.color] : "bg-primary"
|
|
1884
|
+
),
|
|
1885
|
+
children: [
|
|
1886
|
+
/* @__PURE__ */ o.jsx("div", { className: "w-full", children: e.banner.message }),
|
|
1887
|
+
e.banner.dismissible && /* @__PURE__ */ o.jsx(
|
|
1888
|
+
"button",
|
|
1889
|
+
{
|
|
1890
|
+
type: "button",
|
|
1891
|
+
className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
|
|
1892
|
+
onClick: () => n(!1),
|
|
1893
|
+
children: /* @__PURE__ */ o.jsx(Va, { size: 16 })
|
|
1894
|
+
}
|
|
1895
|
+
)
|
|
1896
|
+
]
|
|
1897
|
+
}
|
|
1898
|
+
);
|
|
1899
|
+
};
|
|
1900
|
+
function Zi(e) {
|
|
1860
1901
|
if (typeof document > "u") return;
|
|
1861
1902
|
let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
|
|
1862
1903
|
n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
|
|
@@ -1905,47 +1946,47 @@ const Zr = g.createContext({
|
|
|
1905
1946
|
setVisible: () => {
|
|
1906
1947
|
},
|
|
1907
1948
|
direction: "bottom"
|
|
1908
|
-
}),
|
|
1949
|
+
}), bt = () => {
|
|
1909
1950
|
const e = g.useContext(Zr);
|
|
1910
1951
|
if (!e)
|
|
1911
1952
|
throw new Error("useDrawerContext must be used within a Drawer.Root");
|
|
1912
1953
|
return e;
|
|
1913
1954
|
};
|
|
1914
|
-
|
|
1915
|
-
const eo = typeof window < "u" ? ga :
|
|
1955
|
+
Zi("[vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1)}[vaul-drawer][vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[vaul-drawer][vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[vaul-drawer][vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[vaul-drawer][vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}.vaul-dragging .vaul-scrollable [vault-drawer-direction=top]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=bottom]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=left]{overflow-x:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=right]{overflow-x:hidden!important}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-overlay]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[vaul-overlay][vaul-drawer-visible=true]{opacity:1}[vaul-drawer]::after{content:'';position:absolute;background:inherit;background-color:inherit}[vaul-drawer][vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[vaul-drawer][vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[vaul-handle]{display:block;position:relative;opacity:.8;margin-left:auto;margin-right:auto;height:5px;width:56px;border-radius:1rem;touch-action:pan-y;cursor:grab}[vaul-handle]:active,[vaul-handle]:hover{opacity:1}[vaul-handle]:active{cursor:grabbing}[vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}[vaul-overlay][vaul-snap-points=true]:not([vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[vaul-overlay][vaul-snap-points-overlay=true]:not([vaul-drawer-visible=false]){opacity:1}@media (hover:hover) and (pointer:fine){[vaul-drawer]{user-select:none}}@media (pointer:fine){[vaul-handle-hitarea]:{width:100%;height:100%}}");
|
|
1956
|
+
const eo = typeof window < "u" ? ga : be;
|
|
1916
1957
|
function Pt(...e) {
|
|
1917
1958
|
return (...t) => {
|
|
1918
1959
|
for (let n of e)
|
|
1919
1960
|
typeof n == "function" && n(...t);
|
|
1920
1961
|
};
|
|
1921
1962
|
}
|
|
1922
|
-
function
|
|
1963
|
+
function el() {
|
|
1923
1964
|
return Xt(/^Mac/);
|
|
1924
1965
|
}
|
|
1925
|
-
function
|
|
1966
|
+
function tl() {
|
|
1926
1967
|
return Xt(/^iPhone/);
|
|
1927
1968
|
}
|
|
1928
|
-
function
|
|
1969
|
+
function nl() {
|
|
1929
1970
|
return Xt(/^iPad/) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
1930
|
-
|
|
1971
|
+
el() && navigator.maxTouchPoints > 1;
|
|
1931
1972
|
}
|
|
1932
1973
|
function to() {
|
|
1933
|
-
return
|
|
1974
|
+
return tl() || nl();
|
|
1934
1975
|
}
|
|
1935
1976
|
function Xt(e) {
|
|
1936
1977
|
return typeof window < "u" && window.navigator != null ? e.test(window.navigator.platform) : void 0;
|
|
1937
1978
|
}
|
|
1938
1979
|
const Et = typeof document < "u" && window.visualViewport;
|
|
1939
|
-
function
|
|
1980
|
+
function xn(e) {
|
|
1940
1981
|
let t = window.getComputedStyle(e);
|
|
1941
1982
|
return /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY);
|
|
1942
1983
|
}
|
|
1943
1984
|
function no(e) {
|
|
1944
|
-
for (
|
|
1985
|
+
for (xn(e) && (e = e.parentElement); e && !xn(e); )
|
|
1945
1986
|
e = e.parentElement;
|
|
1946
1987
|
return e || document.scrollingElement || document.documentElement;
|
|
1947
1988
|
}
|
|
1948
|
-
const
|
|
1989
|
+
const rl = /* @__PURE__ */ new Set([
|
|
1949
1990
|
"checkbox",
|
|
1950
1991
|
"radio",
|
|
1951
1992
|
"range",
|
|
@@ -1957,21 +1998,21 @@ const el = /* @__PURE__ */ new Set([
|
|
|
1957
1998
|
"reset"
|
|
1958
1999
|
]);
|
|
1959
2000
|
let dt = 0, Ct;
|
|
1960
|
-
function
|
|
2001
|
+
function ol(e = {}) {
|
|
1961
2002
|
let { isDisabled: t } = e;
|
|
1962
2003
|
eo(() => {
|
|
1963
2004
|
if (!t)
|
|
1964
|
-
return dt++, dt === 1 && (to() ? Ct =
|
|
2005
|
+
return dt++, dt === 1 && (to() ? Ct = sl() : Ct = al()), () => {
|
|
1965
2006
|
dt--, dt === 0 && Ct();
|
|
1966
2007
|
};
|
|
1967
2008
|
}, [
|
|
1968
2009
|
t
|
|
1969
2010
|
]);
|
|
1970
2011
|
}
|
|
1971
|
-
function
|
|
2012
|
+
function al() {
|
|
1972
2013
|
return Pt(ro(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
|
|
1973
2014
|
}
|
|
1974
|
-
function
|
|
2015
|
+
function sl() {
|
|
1975
2016
|
let e, t = 0, n = (c) => {
|
|
1976
2017
|
e = no(c.target), !(e === document.documentElement && e === document.body) && (t = c.changedTouches[0].pageY);
|
|
1977
2018
|
}, r = (c) => {
|
|
@@ -1979,8 +2020,8 @@ function rl() {
|
|
|
1979
2020
|
c.preventDefault();
|
|
1980
2021
|
return;
|
|
1981
2022
|
}
|
|
1982
|
-
let d = c.changedTouches[0].pageY, f = e.scrollTop,
|
|
1983
|
-
|
|
2023
|
+
let d = c.changedTouches[0].pageY, f = e.scrollTop, y = e.scrollHeight - e.clientHeight;
|
|
2024
|
+
y !== 0 && ((f <= 0 && d > t || f >= y && d < t) && c.preventDefault(), t = d);
|
|
1984
2025
|
}, a = (c) => {
|
|
1985
2026
|
let d = c.target;
|
|
1986
2027
|
Tt(d) && d !== document.activeElement && (c.preventDefault(), d.style.transform = "translateY(-2000px)", d.focus(), requestAnimationFrame(() => {
|
|
@@ -1990,8 +2031,8 @@ function rl() {
|
|
|
1990
2031
|
let d = c.target;
|
|
1991
2032
|
Tt(d) && (d.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
|
|
1992
2033
|
d.style.transform = "", Et && (Et.height < window.innerHeight ? requestAnimationFrame(() => {
|
|
1993
|
-
|
|
1994
|
-
}) : Et.addEventListener("resize", () =>
|
|
2034
|
+
yn(d);
|
|
2035
|
+
}) : Et.addEventListener("resize", () => yn(d), {
|
|
1995
2036
|
once: !0
|
|
1996
2037
|
}));
|
|
1997
2038
|
}));
|
|
@@ -1999,16 +2040,16 @@ function rl() {
|
|
|
1999
2040
|
window.scrollTo(0, 0);
|
|
2000
2041
|
}, l = window.pageXOffset, u = window.pageYOffset, v = Pt(ro(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
|
|
2001
2042
|
window.scrollTo(0, 0);
|
|
2002
|
-
let m = Pt(
|
|
2043
|
+
let m = Pt(Ve(document, "touchstart", n, {
|
|
2003
2044
|
passive: !1,
|
|
2004
2045
|
capture: !0
|
|
2005
|
-
}),
|
|
2046
|
+
}), Ve(document, "touchmove", r, {
|
|
2006
2047
|
passive: !1,
|
|
2007
2048
|
capture: !0
|
|
2008
|
-
}),
|
|
2049
|
+
}), Ve(document, "touchend", a, {
|
|
2009
2050
|
passive: !1,
|
|
2010
2051
|
capture: !0
|
|
2011
|
-
}),
|
|
2052
|
+
}), Ve(document, "focus", s, !0), Ve(window, "scroll", i));
|
|
2012
2053
|
return () => {
|
|
2013
2054
|
v(), m(), window.scrollTo(l, u);
|
|
2014
2055
|
};
|
|
@@ -2019,12 +2060,12 @@ function ro(e, t, n) {
|
|
|
2019
2060
|
e.style[t] = r;
|
|
2020
2061
|
};
|
|
2021
2062
|
}
|
|
2022
|
-
function
|
|
2063
|
+
function Ve(e, t, n, r) {
|
|
2023
2064
|
return e.addEventListener(t, n, r), () => {
|
|
2024
2065
|
e.removeEventListener(t, n, r);
|
|
2025
2066
|
};
|
|
2026
2067
|
}
|
|
2027
|
-
function
|
|
2068
|
+
function yn(e) {
|
|
2028
2069
|
let t = document.scrollingElement || document.documentElement;
|
|
2029
2070
|
for (; e && e !== t; ) {
|
|
2030
2071
|
let n = no(e);
|
|
@@ -2037,22 +2078,22 @@ function bn(e) {
|
|
|
2037
2078
|
}
|
|
2038
2079
|
}
|
|
2039
2080
|
function Tt(e) {
|
|
2040
|
-
return e instanceof HTMLInputElement && !
|
|
2081
|
+
return e instanceof HTMLInputElement && !rl.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
|
|
2041
2082
|
}
|
|
2042
|
-
function
|
|
2083
|
+
function il(e, t) {
|
|
2043
2084
|
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
2044
2085
|
}
|
|
2045
|
-
function
|
|
2046
|
-
return (t) => e.forEach((n) =>
|
|
2086
|
+
function ll(...e) {
|
|
2087
|
+
return (t) => e.forEach((n) => il(n, t));
|
|
2047
2088
|
}
|
|
2048
2089
|
function oo(...e) {
|
|
2049
|
-
return h.useCallback(
|
|
2090
|
+
return h.useCallback(ll(...e), e);
|
|
2050
2091
|
}
|
|
2051
|
-
let
|
|
2052
|
-
function
|
|
2092
|
+
let Qe = null;
|
|
2093
|
+
function cl({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRestoration: a, noBodyStyles: s }) {
|
|
2053
2094
|
const [i, l] = g.useState(() => typeof window < "u" ? window.location.href : ""), u = g.useRef(0), v = g.useCallback(() => {
|
|
2054
|
-
if (
|
|
2055
|
-
|
|
2095
|
+
if (Qe === null && e && !s) {
|
|
2096
|
+
Qe = {
|
|
2056
2097
|
position: document.body.style.position,
|
|
2057
2098
|
top: document.body.style.top,
|
|
2058
2099
|
left: document.body.style.left,
|
|
@@ -2073,15 +2114,15 @@ function sl({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRes
|
|
|
2073
2114
|
}, [
|
|
2074
2115
|
e
|
|
2075
2116
|
]), m = g.useCallback(() => {
|
|
2076
|
-
if (
|
|
2117
|
+
if (Qe !== null && !s) {
|
|
2077
2118
|
const c = -parseInt(document.body.style.top, 10), d = -parseInt(document.body.style.left, 10);
|
|
2078
|
-
Object.assign(document.body.style,
|
|
2119
|
+
Object.assign(document.body.style, Qe), window.requestAnimationFrame(() => {
|
|
2079
2120
|
if (a && i !== window.location.href) {
|
|
2080
2121
|
l(window.location.href);
|
|
2081
2122
|
return;
|
|
2082
2123
|
}
|
|
2083
2124
|
window.scrollTo(d, c);
|
|
2084
|
-
}),
|
|
2125
|
+
}), Qe = null;
|
|
2085
2126
|
}
|
|
2086
2127
|
}, [
|
|
2087
2128
|
i
|
|
@@ -2110,7 +2151,7 @@ function sl({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRes
|
|
|
2110
2151
|
};
|
|
2111
2152
|
}
|
|
2112
2153
|
const ao = /* @__PURE__ */ new WeakMap();
|
|
2113
|
-
function
|
|
2154
|
+
function I(e, t, n = !1) {
|
|
2114
2155
|
if (!e || !(e instanceof HTMLElement)) return;
|
|
2115
2156
|
let r = {};
|
|
2116
2157
|
Object.entries(t).forEach(([a, s]) => {
|
|
@@ -2150,7 +2191,7 @@ function ht(e, t) {
|
|
|
2150
2191
|
let a = r.match(/^matrix3d\((.+)\)$/);
|
|
2151
2192
|
return a ? parseFloat(a[1].split(", ")[z(t) ? 13 : 12]) : (a = r.match(/^matrix\((.+)\)$/), a ? parseFloat(a[1].split(", ")[z(t) ? 5 : 4]) : null);
|
|
2152
2193
|
}
|
|
2153
|
-
function
|
|
2194
|
+
function ul(e) {
|
|
2154
2195
|
return 8 * (Math.log(e + 1) - 2);
|
|
2155
2196
|
}
|
|
2156
2197
|
const T = {
|
|
@@ -2168,7 +2209,7 @@ function io(e) {
|
|
|
2168
2209
|
t.current = e;
|
|
2169
2210
|
}), g.useMemo(() => (...n) => t.current == null ? void 0 : t.current.call(t, ...n), []);
|
|
2170
2211
|
}
|
|
2171
|
-
function
|
|
2212
|
+
function dl({ defaultProp: e, onChange: t }) {
|
|
2172
2213
|
const n = g.useState(e), [r] = n, a = g.useRef(r), s = io(t);
|
|
2173
2214
|
return g.useEffect(() => {
|
|
2174
2215
|
a.current !== r && (s(r), a.current = r);
|
|
@@ -2178,9 +2219,9 @@ function ll({ defaultProp: e, onChange: t }) {
|
|
|
2178
2219
|
s
|
|
2179
2220
|
]), n;
|
|
2180
2221
|
}
|
|
2181
|
-
function
|
|
2222
|
+
function fl({ prop: e, defaultProp: t, onChange: n = () => {
|
|
2182
2223
|
} }) {
|
|
2183
|
-
const [r, a] =
|
|
2224
|
+
const [r, a] = dl({
|
|
2184
2225
|
defaultProp: t,
|
|
2185
2226
|
onChange: n
|
|
2186
2227
|
}), s = e !== void 0, i = s ? e : r, l = io(n), u = g.useCallback((v) => {
|
|
@@ -2200,20 +2241,20 @@ function cl({ prop: e, defaultProp: t, onChange: n = () => {
|
|
|
2200
2241
|
u
|
|
2201
2242
|
];
|
|
2202
2243
|
}
|
|
2203
|
-
function
|
|
2204
|
-
const [u, v] =
|
|
2244
|
+
function hl({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n, drawerRef: r, overlayRef: a, fadeFromIndex: s, onSnapPointChange: i, direction: l = "bottom" }) {
|
|
2245
|
+
const [u, v] = fl({
|
|
2205
2246
|
prop: e,
|
|
2206
2247
|
defaultProp: n == null ? void 0 : n[0],
|
|
2207
2248
|
onChange: t
|
|
2208
2249
|
}), m = g.useMemo(() => u === (n == null ? void 0 : n[n.length - 1]) || null, [
|
|
2209
2250
|
n,
|
|
2210
2251
|
u
|
|
2211
|
-
]), c = n && n.length > 0 && (s || s === 0) && !Number.isNaN(s) && n[s] === u || !n, d = g.useMemo(() => n == null ? void 0 : n.findIndex((
|
|
2252
|
+
]), c = n && n.length > 0 && (s || s === 0) && !Number.isNaN(s) && n[s] === u || !n, d = g.useMemo(() => n == null ? void 0 : n.findIndex((x) => x === u), [
|
|
2212
2253
|
n,
|
|
2213
2254
|
u
|
|
2214
2255
|
]), f = g.useMemo(() => {
|
|
2215
|
-
var
|
|
2216
|
-
return (
|
|
2256
|
+
var x;
|
|
2257
|
+
return (x = n == null ? void 0 : n.map((p) => {
|
|
2217
2258
|
const C = typeof window < "u", N = typeof p == "string";
|
|
2218
2259
|
let P = 0;
|
|
2219
2260
|
if (N && (P = parseInt(p, 10)), z(l)) {
|
|
@@ -2222,22 +2263,22 @@ function ul({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
2222
2263
|
}
|
|
2223
2264
|
const _ = N ? P : C ? p * window.innerWidth : 0;
|
|
2224
2265
|
return C ? l === "right" ? window.innerWidth - _ : -window.innerWidth + _ : _;
|
|
2225
|
-
})) != null ?
|
|
2266
|
+
})) != null ? x : [];
|
|
2226
2267
|
}, [
|
|
2227
2268
|
n
|
|
2228
|
-
]),
|
|
2269
|
+
]), y = g.useMemo(() => d !== null ? f == null ? void 0 : f[d] : null, [
|
|
2229
2270
|
f,
|
|
2230
2271
|
d
|
|
2231
|
-
]), R = g.useCallback((
|
|
2272
|
+
]), R = g.useCallback((x) => {
|
|
2232
2273
|
var p;
|
|
2233
|
-
const C = (p = f == null ? void 0 : f.findIndex((N) => N ===
|
|
2234
|
-
i(C),
|
|
2274
|
+
const C = (p = f == null ? void 0 : f.findIndex((N) => N === x)) != null ? p : null;
|
|
2275
|
+
i(C), I(r.current, {
|
|
2235
2276
|
transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2236
|
-
transform: z(l) ? `translate3d(0, ${
|
|
2237
|
-
}), f && C !== f.length - 1 && C !== s ?
|
|
2277
|
+
transform: z(l) ? `translate3d(0, ${x}px, 0)` : `translate3d(${x}px, 0, 0)`
|
|
2278
|
+
}), f && C !== f.length - 1 && C !== s ? I(a.current, {
|
|
2238
2279
|
transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2239
2280
|
opacity: "0"
|
|
2240
|
-
}) :
|
|
2281
|
+
}) : I(a.current, {
|
|
2241
2282
|
transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2242
2283
|
opacity: "1"
|
|
2243
2284
|
}), v(C !== null ? n == null ? void 0 : n[C] : null);
|
|
@@ -2251,8 +2292,8 @@ function ul({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
2251
2292
|
]);
|
|
2252
2293
|
g.useEffect(() => {
|
|
2253
2294
|
if (u || e) {
|
|
2254
|
-
var
|
|
2255
|
-
const p = (
|
|
2295
|
+
var x;
|
|
2296
|
+
const p = (x = n == null ? void 0 : n.findIndex((C) => C === e || C === u)) != null ? x : -1;
|
|
2256
2297
|
f && p !== -1 && typeof f[p] == "number" && R(f[p]);
|
|
2257
2298
|
}
|
|
2258
2299
|
}, [
|
|
@@ -2262,10 +2303,10 @@ function ul({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
2262
2303
|
f,
|
|
2263
2304
|
R
|
|
2264
2305
|
]);
|
|
2265
|
-
function K({ draggedDistance:
|
|
2306
|
+
function K({ draggedDistance: x, closeDrawer: p, velocity: C, dismissible: N }) {
|
|
2266
2307
|
if (s === void 0) return;
|
|
2267
|
-
const P = l === "bottom" || l === "right" ? (
|
|
2268
|
-
if (_ &&
|
|
2308
|
+
const P = l === "bottom" || l === "right" ? (y ?? 0) - x : (y ?? 0) + x, _ = d === s - 1, w = d === 0, L = x > 0;
|
|
2309
|
+
if (_ && I(a.current, {
|
|
2269
2310
|
transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`
|
|
2270
2311
|
}), C > 2 && !L) {
|
|
2271
2312
|
N ? p() : R(f[0]);
|
|
@@ -2276,7 +2317,7 @@ function ul({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
2276
2317
|
return;
|
|
2277
2318
|
}
|
|
2278
2319
|
const te = f == null ? void 0 : f.reduce((q, X) => typeof q != "number" || typeof X != "number" ? q : Math.abs(X - P) < Math.abs(q - P) ? X : q), V = z(l) ? window.innerHeight : window.innerWidth;
|
|
2279
|
-
if (C > so && Math.abs(
|
|
2320
|
+
if (C > so && Math.abs(x) < V * 0.4) {
|
|
2280
2321
|
const q = L ? 1 : -1;
|
|
2281
2322
|
if (q > 0 && m) {
|
|
2282
2323
|
R(f[n.length - 1]);
|
|
@@ -2288,21 +2329,21 @@ function ul({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
2288
2329
|
}
|
|
2289
2330
|
R(te);
|
|
2290
2331
|
}
|
|
2291
|
-
function H({ draggedDistance:
|
|
2292
|
-
if (
|
|
2293
|
-
const p = l === "bottom" || l === "right" ?
|
|
2294
|
-
(l === "bottom" || l === "right") && p < f[f.length - 1] || (l === "top" || l === "left") && p > f[f.length - 1] ||
|
|
2332
|
+
function H({ draggedDistance: x }) {
|
|
2333
|
+
if (y === null) return;
|
|
2334
|
+
const p = l === "bottom" || l === "right" ? y - x : y + x;
|
|
2335
|
+
(l === "bottom" || l === "right") && p < f[f.length - 1] || (l === "top" || l === "left") && p > f[f.length - 1] || I(r.current, {
|
|
2295
2336
|
transform: z(l) ? `translate3d(0, ${p}px, 0)` : `translate3d(${p}px, 0, 0)`
|
|
2296
2337
|
});
|
|
2297
2338
|
}
|
|
2298
|
-
function Q(
|
|
2339
|
+
function Q(x, p) {
|
|
2299
2340
|
if (!n || typeof d != "number" || !f || s === void 0) return null;
|
|
2300
2341
|
const C = d === s - 1;
|
|
2301
2342
|
if (d >= s && p)
|
|
2302
2343
|
return 0;
|
|
2303
2344
|
if (C && !p) return 1;
|
|
2304
2345
|
if (!c && !C) return null;
|
|
2305
|
-
const P = C ? d + 1 : d - 1, _ = C ? f[P] - f[P - 1] : f[P + 1] - f[P], w =
|
|
2346
|
+
const P = C ? d + 1 : d - 1, _ = C ? f[P] - f[P - 1] : f[P + 1] - f[P], w = x / Math.abs(_);
|
|
2306
2347
|
return C ? 1 - w : w;
|
|
2307
2348
|
}
|
|
2308
2349
|
return {
|
|
@@ -2317,38 +2358,38 @@ function ul({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
2317
2358
|
snapPointsOffset: f
|
|
2318
2359
|
};
|
|
2319
2360
|
}
|
|
2320
|
-
const
|
|
2321
|
-
function lo({ open: e, onOpenChange: t, children: n, shouldScaleBackground: r, onDrag: a, onRelease: s, snapPoints: i, nested: l = !1, setBackgroundColorOnScale: u = !0, closeThreshold: v =
|
|
2361
|
+
const pl = 0.25, ml = 100, Mn = 8, Pe = 16, Sn = 26, Rt = "vaul-dragging";
|
|
2362
|
+
function lo({ open: e, onOpenChange: t, children: n, shouldScaleBackground: r, onDrag: a, onRelease: s, snapPoints: i, nested: l = !1, setBackgroundColorOnScale: u = !0, closeThreshold: v = pl, scrollLockTimeout: m = ml, dismissible: c = !0, handleOnly: d = !1, fadeFromIndex: f = i && i.length - 1, activeSnapPoint: y, setActiveSnapPoint: R, fixed: K, modal: H = !0, onClose: Q, noBodyStyles: x, direction: p = "bottom", preventScrollRestoration: C = !0, disablePreventScroll: N = !1 }) {
|
|
2322
2363
|
var P;
|
|
2323
|
-
const [_ = !1, w] = g.useState(!1), [L, te] = g.useState(!1), [V, q] = g.useState(!1), [X,
|
|
2324
|
-
i && S ===
|
|
2325
|
-
}, []), { activeSnapPoint: Mo, activeSnapPointIndex:
|
|
2364
|
+
const [_ = !1, w] = g.useState(!1), [L, te] = g.useState(!1), [V, q] = g.useState(!1), [X, Ie] = g.useState(!1), [he, ze] = g.useState(!1), [ye, E] = g.useState(!1), U = g.useRef(null), Y = g.useRef(null), ne = g.useRef(null), je = g.useRef(null), pe = g.useRef(null), Me = g.useRef(!1), me = g.useRef(null), le = g.useRef(0), ge = g.useRef(!1), re = g.useRef(0), M = g.useRef(null), tn = g.useRef(((P = M.current) == null ? void 0 : P.getBoundingClientRect().height) || 0), xt = g.useRef(0), yo = g.useCallback((S) => {
|
|
2365
|
+
i && S === qe.length - 1 && (Y.current = /* @__PURE__ */ new Date());
|
|
2366
|
+
}, []), { activeSnapPoint: Mo, activeSnapPointIndex: Ke, setActiveSnapPoint: nn, onRelease: So, snapPointsOffset: qe, onDrag: Eo, shouldFade: rn, getPercentageDragged: Co } = hl({
|
|
2326
2367
|
snapPoints: i,
|
|
2327
|
-
activeSnapPointProp:
|
|
2368
|
+
activeSnapPointProp: y,
|
|
2328
2369
|
setActiveSnapPointProp: R,
|
|
2329
2370
|
drawerRef: M,
|
|
2330
2371
|
fadeFromIndex: f,
|
|
2331
2372
|
overlayRef: U,
|
|
2332
|
-
onSnapPointChange:
|
|
2373
|
+
onSnapPointChange: yo,
|
|
2333
2374
|
direction: p
|
|
2334
2375
|
});
|
|
2335
|
-
|
|
2376
|
+
ol({
|
|
2336
2377
|
isDisabled: !_ || he || !H || ye || !L || N
|
|
2337
2378
|
});
|
|
2338
|
-
const { restorePositionSetting: Ro } =
|
|
2379
|
+
const { restorePositionSetting: Ro } = cl({
|
|
2339
2380
|
isOpen: _,
|
|
2340
2381
|
modal: H,
|
|
2341
2382
|
nested: l,
|
|
2342
2383
|
hasBeenOpened: L,
|
|
2343
2384
|
preventScrollRestoration: C,
|
|
2344
|
-
noBodyStyles:
|
|
2385
|
+
noBodyStyles: x
|
|
2345
2386
|
});
|
|
2346
|
-
function
|
|
2387
|
+
function Ae() {
|
|
2347
2388
|
return (window.innerWidth - Sn) / window.innerWidth;
|
|
2348
2389
|
}
|
|
2349
2390
|
function Do(S) {
|
|
2350
2391
|
var D;
|
|
2351
|
-
!c && !i || M.current && !M.current.contains(S.target) || (tn.current = ((D = M.current) == null ? void 0 : D.getBoundingClientRect().height) || 0,
|
|
2392
|
+
!c && !i || M.current && !M.current.contains(S.target) || (tn.current = ((D = M.current) == null ? void 0 : D.getBoundingClientRect().height) || 0, ze(!0), ne.current = /* @__PURE__ */ new Date(), to() && window.addEventListener("touchend", () => Me.current = !1, {
|
|
2352
2393
|
once: !0
|
|
2353
2394
|
}), S.target.setPointerCapture(S.pointerId), le.current = z(p) ? S.clientY : S.clientX);
|
|
2354
2395
|
}
|
|
@@ -2382,31 +2423,31 @@ function lo({ open: e, onOpenChange: t, children: n, shouldScaleBackground: r, o
|
|
|
2382
2423
|
function jo(S) {
|
|
2383
2424
|
if (M.current && he) {
|
|
2384
2425
|
const D = p === "bottom" || p === "right" ? 1 : -1, k = (le.current - (z(p) ? S.clientY : S.clientX)) * D, j = k > 0, F = i && !c && !j;
|
|
2385
|
-
if (F &&
|
|
2426
|
+
if (F && Ke === 0) return;
|
|
2386
2427
|
const B = Math.abs(k), oe = document.querySelector("[vaul-drawer-wrapper]");
|
|
2387
2428
|
let ce = B / tn.current;
|
|
2388
|
-
const
|
|
2389
|
-
if (
|
|
2390
|
-
if (M.current.classList.add(Rt),
|
|
2429
|
+
const Se = Co(B, j);
|
|
2430
|
+
if (Se !== null && (ce = Se), F && ce >= 1 || !Me.current && !on(S.target, j)) return;
|
|
2431
|
+
if (M.current.classList.add(Rt), Me.current = !0, I(M.current, {
|
|
2391
2432
|
transition: "none"
|
|
2392
|
-
}),
|
|
2433
|
+
}), I(U.current, {
|
|
2393
2434
|
transition: "none"
|
|
2394
2435
|
}), i && Eo({
|
|
2395
2436
|
draggedDistance: k
|
|
2396
2437
|
}), j && !i) {
|
|
2397
|
-
const Ne =
|
|
2398
|
-
|
|
2438
|
+
const Ne = ul(k), it = Math.min(Ne * -1, 0) * D;
|
|
2439
|
+
I(M.current, {
|
|
2399
2440
|
transform: z(p) ? `translate3d(0, ${it}px, 0)` : `translate3d(${it}px, 0, 0)`
|
|
2400
2441
|
});
|
|
2401
2442
|
return;
|
|
2402
2443
|
}
|
|
2403
2444
|
const st = 1 - ce;
|
|
2404
|
-
if ((rn || f &&
|
|
2445
|
+
if ((rn || f && Ke === f - 1) && (a == null || a(S, ce), I(U.current, {
|
|
2405
2446
|
opacity: `${st}`,
|
|
2406
2447
|
transition: "none"
|
|
2407
2448
|
}, !0)), oe && U.current && r) {
|
|
2408
|
-
const Ne = Math.min(
|
|
2409
|
-
|
|
2449
|
+
const Ne = Math.min(Ae() + ce * (1 - Ae()), 1), it = 8 - ce * 8, sn = Math.max(0, 14 - ce * 14);
|
|
2450
|
+
I(oe, {
|
|
2410
2451
|
borderRadius: `${it}px`,
|
|
2411
2452
|
transform: z(p) ? `scale(${Ne}) translate3d(0, ${sn}px, 0)` : `scale(${Ne}) translate3d(${sn}px, 0, 0)`,
|
|
2412
2453
|
transition: "none"
|
|
@@ -2414,7 +2455,7 @@ function lo({ open: e, onOpenChange: t, children: n, shouldScaleBackground: r, o
|
|
|
2414
2455
|
}
|
|
2415
2456
|
if (!i) {
|
|
2416
2457
|
const Ne = B * D;
|
|
2417
|
-
|
|
2458
|
+
I(M.current, {
|
|
2418
2459
|
transform: z(p) ? `translate3d(0, ${Ne}px, 0)` : `translate3d(${Ne}px, 0, 0)`
|
|
2419
2460
|
});
|
|
2420
2461
|
}
|
|
@@ -2432,18 +2473,18 @@ function lo({ open: e, onOpenChange: t, children: n, shouldScaleBackground: r, o
|
|
|
2432
2473
|
const F = ((j = window.visualViewport) == null ? void 0 : j.height) || 0;
|
|
2433
2474
|
let B = window.innerHeight - F;
|
|
2434
2475
|
const oe = M.current.getBoundingClientRect().height || 0;
|
|
2435
|
-
|
|
2476
|
+
xt.current || (xt.current = oe);
|
|
2436
2477
|
const ce = M.current.getBoundingClientRect().top;
|
|
2437
|
-
if (Math.abs(re.current - B) > 60 && (ge.current = !ge.current), i && i.length > 0 &&
|
|
2438
|
-
const
|
|
2439
|
-
B +=
|
|
2478
|
+
if (Math.abs(re.current - B) > 60 && (ge.current = !ge.current), i && i.length > 0 && qe && Ke) {
|
|
2479
|
+
const Se = qe[Ke] || 0;
|
|
2480
|
+
B += Se;
|
|
2440
2481
|
}
|
|
2441
2482
|
if (re.current = B, oe > F || ge.current) {
|
|
2442
|
-
const
|
|
2443
|
-
let st =
|
|
2444
|
-
|
|
2483
|
+
const Se = M.current.getBoundingClientRect().height;
|
|
2484
|
+
let st = Se;
|
|
2485
|
+
Se > F && (st = F - Sn), K ? M.current.style.height = `${Se - Math.max(B, 0)}px` : M.current.style.height = `${Math.max(st, F - ce)}px`;
|
|
2445
2486
|
} else
|
|
2446
|
-
M.current.style.height = `${
|
|
2487
|
+
M.current.style.height = `${xt.current}px`;
|
|
2447
2488
|
i && i.length > 0 && !ge.current ? M.current.style.bottom = "0px" : M.current.style.bottom = `${Math.max(B, 0)}px`;
|
|
2448
2489
|
}
|
|
2449
2490
|
}
|
|
@@ -2452,15 +2493,15 @@ function lo({ open: e, onOpenChange: t, children: n, shouldScaleBackground: r, o
|
|
|
2452
2493
|
return (k = window.visualViewport) == null ? void 0 : k.removeEventListener("resize", D);
|
|
2453
2494
|
};
|
|
2454
2495
|
}, [
|
|
2455
|
-
|
|
2496
|
+
Ke,
|
|
2456
2497
|
i,
|
|
2457
|
-
|
|
2498
|
+
qe
|
|
2458
2499
|
]);
|
|
2459
|
-
function
|
|
2460
|
-
M.current && (No(), Q == null || Q(),
|
|
2500
|
+
function ke() {
|
|
2501
|
+
M.current && (No(), Q == null || Q(), I(M.current, {
|
|
2461
2502
|
transform: z(p) ? `translate3d(0, ${p === "bottom" ? "100%" : "-100%"}, 0)` : `translate3d(${p === "right" ? "100%" : "-100%"}, 0, 0)`,
|
|
2462
2503
|
transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`
|
|
2463
|
-
}),
|
|
2504
|
+
}), I(U.current, {
|
|
2464
2505
|
opacity: "0",
|
|
2465
2506
|
transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`
|
|
2466
2507
|
}), at(!1), setTimeout(() => {
|
|
@@ -2480,7 +2521,7 @@ function lo({ open: e, onOpenChange: t, children: n, shouldScaleBackground: r, o
|
|
|
2480
2521
|
_,
|
|
2481
2522
|
r
|
|
2482
2523
|
]), eo(() => {
|
|
2483
|
-
e ? (w(!0), te(!0)) :
|
|
2524
|
+
e ? (w(!0), te(!0)) : ke();
|
|
2484
2525
|
}, [
|
|
2485
2526
|
e
|
|
2486
2527
|
]), g.useEffect(() => {
|
|
@@ -2488,25 +2529,25 @@ function lo({ open: e, onOpenChange: t, children: n, shouldScaleBackground: r, o
|
|
|
2488
2529
|
}, [
|
|
2489
2530
|
_
|
|
2490
2531
|
]), g.useEffect(() => {
|
|
2491
|
-
|
|
2532
|
+
Ie(!0);
|
|
2492
2533
|
}, []);
|
|
2493
2534
|
function an() {
|
|
2494
2535
|
if (!M.current) return;
|
|
2495
2536
|
const S = document.querySelector("[vaul-drawer-wrapper]"), D = ht(M.current, p);
|
|
2496
|
-
|
|
2537
|
+
I(M.current, {
|
|
2497
2538
|
transform: "translate3d(0, 0, 0)",
|
|
2498
2539
|
transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`
|
|
2499
|
-
}),
|
|
2540
|
+
}), I(U.current, {
|
|
2500
2541
|
transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2501
2542
|
opacity: "1"
|
|
2502
|
-
}), r && D && D > 0 && _ &&
|
|
2543
|
+
}), r && D && D > 0 && _ && I(S, {
|
|
2503
2544
|
borderRadius: `${Mn}px`,
|
|
2504
2545
|
overflow: "hidden",
|
|
2505
2546
|
...z(p) ? {
|
|
2506
|
-
transform: `scale(${
|
|
2547
|
+
transform: `scale(${Ae()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
|
|
2507
2548
|
transformOrigin: "top"
|
|
2508
2549
|
} : {
|
|
2509
|
-
transform: `scale(${
|
|
2550
|
+
transform: `scale(${Ae()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
|
|
2510
2551
|
transformOrigin: "left"
|
|
2511
2552
|
},
|
|
2512
2553
|
transitionProperty: "transform, border-radius",
|
|
@@ -2515,11 +2556,11 @@ function lo({ open: e, onOpenChange: t, children: n, shouldScaleBackground: r, o
|
|
|
2515
2556
|
}, !0);
|
|
2516
2557
|
}
|
|
2517
2558
|
function No() {
|
|
2518
|
-
!he || !M.current || (M.current.classList.remove(Rt),
|
|
2559
|
+
!he || !M.current || (M.current.classList.remove(Rt), Me.current = !1, ze(!1), je.current = /* @__PURE__ */ new Date());
|
|
2519
2560
|
}
|
|
2520
2561
|
function Po(S) {
|
|
2521
2562
|
if (!he || !M.current) return;
|
|
2522
|
-
M.current.classList.remove(Rt),
|
|
2563
|
+
M.current.classList.remove(Rt), Me.current = !1, ze(!1), je.current = /* @__PURE__ */ new Date();
|
|
2523
2564
|
const D = ht(M.current, p);
|
|
2524
2565
|
if (!on(S.target, !1) || !D || Number.isNaN(D) || ne.current === null) return;
|
|
2525
2566
|
const k = je.current.getTime() - ne.current.getTime(), j = le.current - (z(p) ? S.clientY : S.clientX), F = Math.abs(j) / k;
|
|
@@ -2528,7 +2569,7 @@ function lo({ open: e, onOpenChange: t, children: n, shouldScaleBackground: r, o
|
|
|
2528
2569
|
}, 200)), i) {
|
|
2529
2570
|
So({
|
|
2530
2571
|
draggedDistance: j * (p === "bottom" || p === "right" ? 1 : -1),
|
|
2531
|
-
closeDrawer:
|
|
2572
|
+
closeDrawer: ke,
|
|
2532
2573
|
velocity: F,
|
|
2533
2574
|
dismissible: c
|
|
2534
2575
|
}), s == null || s(S, !0);
|
|
@@ -2539,19 +2580,19 @@ function lo({ open: e, onOpenChange: t, children: n, shouldScaleBackground: r, o
|
|
|
2539
2580
|
return;
|
|
2540
2581
|
}
|
|
2541
2582
|
if (F > so) {
|
|
2542
|
-
|
|
2583
|
+
ke(), s == null || s(S, !1);
|
|
2543
2584
|
return;
|
|
2544
2585
|
}
|
|
2545
2586
|
var B;
|
|
2546
2587
|
const oe = Math.min((B = M.current.getBoundingClientRect().height) != null ? B : 0, window.innerHeight);
|
|
2547
2588
|
if (D >= oe * v) {
|
|
2548
|
-
|
|
2589
|
+
ke(), s == null || s(S, !1);
|
|
2549
2590
|
return;
|
|
2550
2591
|
}
|
|
2551
2592
|
s == null || s(S, !0), an();
|
|
2552
2593
|
}
|
|
2553
2594
|
g.useEffect(() => {
|
|
2554
|
-
_ && (
|
|
2595
|
+
_ && (I(document.documentElement, {
|
|
2555
2596
|
scrollBehavior: "auto"
|
|
2556
2597
|
}), Y.current = /* @__PURE__ */ new Date(), at(!0));
|
|
2557
2598
|
}, [
|
|
@@ -2570,24 +2611,24 @@ function lo({ open: e, onOpenChange: t, children: n, shouldScaleBackground: r, o
|
|
|
2570
2611
|
]);
|
|
2571
2612
|
function at(S) {
|
|
2572
2613
|
const D = document.querySelector("[vaul-drawer-wrapper]");
|
|
2573
|
-
!D || !r || (S ? (u && (
|
|
2614
|
+
!D || !r || (S ? (u && (x || (I(document.body, {
|
|
2574
2615
|
background: document.body.style.backgroundColor || document.body.style.background
|
|
2575
|
-
}),
|
|
2616
|
+
}), I(document.body, {
|
|
2576
2617
|
background: "black"
|
|
2577
|
-
}, !0))),
|
|
2618
|
+
}, !0))), I(D, {
|
|
2578
2619
|
borderRadius: `${Mn}px`,
|
|
2579
2620
|
overflow: "hidden",
|
|
2580
2621
|
...z(p) ? {
|
|
2581
|
-
transform: `scale(${
|
|
2622
|
+
transform: `scale(${Ae()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
|
|
2582
2623
|
transformOrigin: "top"
|
|
2583
2624
|
} : {
|
|
2584
|
-
transform: `scale(${
|
|
2625
|
+
transform: `scale(${Ae()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
|
|
2585
2626
|
transformOrigin: "left"
|
|
2586
2627
|
},
|
|
2587
2628
|
transitionProperty: "transform, border-radius",
|
|
2588
2629
|
transitionDuration: `${T.DURATION}s`,
|
|
2589
2630
|
transitionTimingFunction: `cubic-bezier(${T.EASE.join(",")})`
|
|
2590
|
-
})) : (ft(D, "overflow"), ft(D, "transform"), ft(D, "borderRadius"),
|
|
2631
|
+
})) : (ft(D, "overflow"), ft(D, "transform"), ft(D, "borderRadius"), I(D, {
|
|
2591
2632
|
transitionProperty: "transform, border-radius",
|
|
2592
2633
|
transitionDuration: `${T.DURATION}s`,
|
|
2593
2634
|
transitionTimingFunction: `cubic-bezier(${T.EASE.join(",")})`
|
|
@@ -2595,12 +2636,12 @@ function lo({ open: e, onOpenChange: t, children: n, shouldScaleBackground: r, o
|
|
|
2595
2636
|
}
|
|
2596
2637
|
function To(S) {
|
|
2597
2638
|
const D = S ? (window.innerWidth - Pe) / window.innerWidth : 1, k = S ? -Pe : 0;
|
|
2598
|
-
me.current && window.clearTimeout(me.current),
|
|
2639
|
+
me.current && window.clearTimeout(me.current), I(M.current, {
|
|
2599
2640
|
transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2600
2641
|
transform: `scale(${D}) translate3d(0, ${k}px, 0)`
|
|
2601
2642
|
}), !S && M.current && (me.current = setTimeout(() => {
|
|
2602
2643
|
const j = ht(M.current, p);
|
|
2603
|
-
|
|
2644
|
+
I(M.current, {
|
|
2604
2645
|
transition: "none",
|
|
2605
2646
|
transform: z(p) ? `translate3d(0, ${j}px, 0)` : `translate3d(${j}px, 0, 0)`
|
|
2606
2647
|
});
|
|
@@ -2609,14 +2650,14 @@ function lo({ open: e, onOpenChange: t, children: n, shouldScaleBackground: r, o
|
|
|
2609
2650
|
function _o(S, D) {
|
|
2610
2651
|
if (D < 0) return;
|
|
2611
2652
|
const k = z(p) ? window.innerHeight : window.innerWidth, j = (k - Pe) / k, F = j + D * (1 - j), B = -Pe + D * Pe;
|
|
2612
|
-
|
|
2653
|
+
I(M.current, {
|
|
2613
2654
|
transform: z(p) ? `scale(${F}) translate3d(0, ${B}px, 0)` : `scale(${F}) translate3d(${B}px, 0, 0)`,
|
|
2614
2655
|
transition: "none"
|
|
2615
2656
|
});
|
|
2616
2657
|
}
|
|
2617
2658
|
function Oo(S, D) {
|
|
2618
2659
|
const k = z(p) ? window.innerHeight : window.innerWidth, j = D ? (k - Pe) / k : 1, F = D ? -Pe : 0;
|
|
2619
|
-
D &&
|
|
2660
|
+
D && I(M.current, {
|
|
2620
2661
|
transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2621
2662
|
transform: z(p) ? `scale(${j}) translate3d(0, ${F}px, 0)` : `scale(${j}) translate3d(${F}px, 0, 0)`
|
|
2622
2663
|
});
|
|
@@ -2628,7 +2669,7 @@ function lo({ open: e, onOpenChange: t, children: n, shouldScaleBackground: r, o
|
|
|
2628
2669
|
t == null || t(S);
|
|
2629
2670
|
return;
|
|
2630
2671
|
}
|
|
2631
|
-
S ? (te(!0), w(S)) :
|
|
2672
|
+
S ? (te(!0), w(S)) : ke();
|
|
2632
2673
|
},
|
|
2633
2674
|
open: _
|
|
2634
2675
|
}, /* @__PURE__ */ g.createElement(Zr.Provider, {
|
|
@@ -2650,35 +2691,35 @@ function lo({ open: e, onOpenChange: t, children: n, shouldScaleBackground: r, o
|
|
|
2650
2691
|
isOpen: _,
|
|
2651
2692
|
isDragging: he,
|
|
2652
2693
|
shouldFade: rn,
|
|
2653
|
-
closeDrawer:
|
|
2694
|
+
closeDrawer: ke,
|
|
2654
2695
|
onNestedDrag: _o,
|
|
2655
2696
|
onNestedOpenChange: To,
|
|
2656
2697
|
onNestedRelease: Oo,
|
|
2657
2698
|
keyboardIsOpen: ge,
|
|
2658
2699
|
openProp: e,
|
|
2659
2700
|
modal: H,
|
|
2660
|
-
snapPointsOffset:
|
|
2701
|
+
snapPointsOffset: qe,
|
|
2661
2702
|
direction: p
|
|
2662
2703
|
}
|
|
2663
2704
|
}, n));
|
|
2664
2705
|
}
|
|
2665
|
-
const
|
|
2666
|
-
const { visible: a, closeDrawer: s, isDragging: i, snapPoints: l, activeSnapPoint: u, setActiveSnapPoint: v, dismissible: m, handleOnly: c, onPress: d, onDrag: f } =
|
|
2706
|
+
const gl = 250, vl = 120, co = /* @__PURE__ */ g.forwardRef(function({ preventCycle: e = !1, children: t, ...n }, r) {
|
|
2707
|
+
const { visible: a, closeDrawer: s, isDragging: i, snapPoints: l, activeSnapPoint: u, setActiveSnapPoint: v, dismissible: m, handleOnly: c, onPress: d, onDrag: f } = bt(), y = g.useRef(null), R = g.useRef(!1);
|
|
2667
2708
|
function K() {
|
|
2668
2709
|
if (R.current) {
|
|
2669
|
-
|
|
2710
|
+
x();
|
|
2670
2711
|
return;
|
|
2671
2712
|
}
|
|
2672
2713
|
window.setTimeout(() => {
|
|
2673
2714
|
H();
|
|
2674
|
-
},
|
|
2715
|
+
}, vl);
|
|
2675
2716
|
}
|
|
2676
2717
|
function H() {
|
|
2677
2718
|
if (i || e || R.current) {
|
|
2678
|
-
|
|
2719
|
+
x();
|
|
2679
2720
|
return;
|
|
2680
2721
|
}
|
|
2681
|
-
if (
|
|
2722
|
+
if (x(), (!l || l.length === 0) && m) {
|
|
2682
2723
|
s();
|
|
2683
2724
|
return;
|
|
2684
2725
|
}
|
|
@@ -2692,19 +2733,19 @@ const hl = 250, pl = 120, co = /* @__PURE__ */ g.forwardRef(function({ preventCy
|
|
|
2692
2733
|
v(N);
|
|
2693
2734
|
}
|
|
2694
2735
|
function Q() {
|
|
2695
|
-
|
|
2736
|
+
y.current = window.setTimeout(() => {
|
|
2696
2737
|
R.current = !0;
|
|
2697
|
-
},
|
|
2738
|
+
}, gl);
|
|
2698
2739
|
}
|
|
2699
|
-
function
|
|
2700
|
-
window.clearTimeout(
|
|
2740
|
+
function x() {
|
|
2741
|
+
window.clearTimeout(y.current), R.current = !1;
|
|
2701
2742
|
}
|
|
2702
2743
|
return /* @__PURE__ */ g.createElement("div", {
|
|
2703
2744
|
onClick: K,
|
|
2704
2745
|
onDoubleClick: () => {
|
|
2705
2746
|
R.current = !0, s();
|
|
2706
2747
|
},
|
|
2707
|
-
onPointerCancel:
|
|
2748
|
+
onPointerCancel: x,
|
|
2708
2749
|
onPointerDown: (p) => {
|
|
2709
2750
|
c && d(p), Q();
|
|
2710
2751
|
},
|
|
@@ -2724,7 +2765,7 @@ const hl = 250, pl = 120, co = /* @__PURE__ */ g.forwardRef(function({ preventCy
|
|
|
2724
2765
|
});
|
|
2725
2766
|
co.displayName = "Drawer.Handle";
|
|
2726
2767
|
const uo = /* @__PURE__ */ g.forwardRef(function({ children: e, ...t }, n) {
|
|
2727
|
-
const { overlayRef: r, snapPoints: a, onRelease: s, shouldFade: i, isOpen: l, visible: u } =
|
|
2768
|
+
const { overlayRef: r, snapPoints: a, onRelease: s, shouldFade: i, isOpen: l, visible: u } = bt(), v = oo(n, r), m = a && a.length > 0;
|
|
2728
2769
|
return /* @__PURE__ */ g.createElement($a, {
|
|
2729
2770
|
onMouseUp: s,
|
|
2730
2771
|
ref: v,
|
|
@@ -2737,16 +2778,16 @@ const uo = /* @__PURE__ */ g.forwardRef(function({ children: e, ...t }, n) {
|
|
|
2737
2778
|
});
|
|
2738
2779
|
uo.displayName = "Drawer.Overlay";
|
|
2739
2780
|
const fo = /* @__PURE__ */ g.forwardRef(function({ onOpenAutoFocus: e, onPointerDownOutside: t, onAnimationEnd: n, style: r, ...a }, s) {
|
|
2740
|
-
const { drawerRef: i, onPress: l, onRelease: u, onDrag: v, dismissible: m, keyboardIsOpen: c, snapPointsOffset: d, visible: f, closeDrawer:
|
|
2781
|
+
const { drawerRef: i, onPress: l, onRelease: u, onDrag: v, dismissible: m, keyboardIsOpen: c, snapPointsOffset: d, visible: f, closeDrawer: y, modal: R, openProp: K, onOpenChange: H, setVisible: Q, handleOnly: x, direction: p } = bt(), C = oo(s, i), N = g.useRef(null), P = g.useRef(!1), _ = (w, L, te = 0) => {
|
|
2741
2782
|
if (P.current) return !0;
|
|
2742
|
-
const V = Math.abs(w.y), q = Math.abs(w.x), X = q > V,
|
|
2783
|
+
const V = Math.abs(w.y), q = Math.abs(w.x), X = q > V, Ie = [
|
|
2743
2784
|
"bottom",
|
|
2744
2785
|
"right"
|
|
2745
2786
|
].includes(L) ? 1 : -1;
|
|
2746
2787
|
if (L === "left" || L === "right") {
|
|
2747
|
-
if (!(w.x *
|
|
2788
|
+
if (!(w.x * Ie < 0) && q >= 0 && q <= te)
|
|
2748
2789
|
return X;
|
|
2749
|
-
} else if (!(w.y *
|
|
2790
|
+
} else if (!(w.y * Ie < 0) && V >= 0 && V <= te)
|
|
2750
2791
|
return !X;
|
|
2751
2792
|
return P.current = !0, !0;
|
|
2752
2793
|
};
|
|
@@ -2771,7 +2812,7 @@ const fo = /* @__PURE__ */ g.forwardRef(function({ onOpenAutoFocus: e, onPointer
|
|
|
2771
2812
|
}
|
|
2772
2813
|
},
|
|
2773
2814
|
onPointerDown: (w) => {
|
|
2774
|
-
|
|
2815
|
+
x || (a.onPointerDown == null || a.onPointerDown.call(a, w), N.current = {
|
|
2775
2816
|
x: w.clientX,
|
|
2776
2817
|
y: w.clientY
|
|
2777
2818
|
}, l(w));
|
|
@@ -2781,7 +2822,7 @@ const fo = /* @__PURE__ */ g.forwardRef(function({ onOpenAutoFocus: e, onPointer
|
|
|
2781
2822
|
w.preventDefault();
|
|
2782
2823
|
return;
|
|
2783
2824
|
}
|
|
2784
|
-
c.current && (c.current = !1), w.preventDefault(), H == null || H(!1), !(!m || K !== void 0) &&
|
|
2825
|
+
c.current && (c.current = !1), w.preventDefault(), H == null || H(!1), !(!m || K !== void 0) && y();
|
|
2785
2826
|
},
|
|
2786
2827
|
onFocusOutside: (w) => {
|
|
2787
2828
|
if (!R) {
|
|
@@ -2796,7 +2837,7 @@ const fo = /* @__PURE__ */ g.forwardRef(function({ onOpenAutoFocus: e, onPointer
|
|
|
2796
2837
|
}
|
|
2797
2838
|
},
|
|
2798
2839
|
onPointerMove: (w) => {
|
|
2799
|
-
if (
|
|
2840
|
+
if (x || (a.onPointerMove == null || a.onPointerMove.call(a, w), !N.current)) return;
|
|
2800
2841
|
const L = w.clientY - N.current.y, te = w.clientX - N.current.x, V = w.pointerType === "touch" ? 10 : 2;
|
|
2801
2842
|
_({
|
|
2802
2843
|
x: te,
|
|
@@ -2809,8 +2850,8 @@ const fo = /* @__PURE__ */ g.forwardRef(function({ onOpenAutoFocus: e, onPointer
|
|
|
2809
2850
|
});
|
|
2810
2851
|
});
|
|
2811
2852
|
fo.displayName = "Drawer.Content";
|
|
2812
|
-
function
|
|
2813
|
-
const { onNestedDrag: r, onNestedOpenChange: a, onNestedRelease: s } =
|
|
2853
|
+
function wl({ onDrag: e, onOpenChange: t, ...n }) {
|
|
2854
|
+
const { onNestedDrag: r, onNestedOpenChange: a, onNestedRelease: s } = bt();
|
|
2814
2855
|
if (!r)
|
|
2815
2856
|
throw new Error("Drawer.NestedRoot must be placed in another drawer");
|
|
2816
2857
|
return /* @__PURE__ */ g.createElement(lo, {
|
|
@@ -2830,7 +2871,7 @@ function ml({ onDrag: e, onOpenChange: t, ...n }) {
|
|
|
2830
2871
|
}
|
|
2831
2872
|
const ie = {
|
|
2832
2873
|
Root: lo,
|
|
2833
|
-
NestedRoot:
|
|
2874
|
+
NestedRoot: wl,
|
|
2834
2875
|
Content: fo,
|
|
2835
2876
|
Handle: co,
|
|
2836
2877
|
Overlay: uo,
|
|
@@ -2850,22 +2891,22 @@ const ie = {
|
|
|
2850
2891
|
}
|
|
2851
2892
|
);
|
|
2852
2893
|
Jt.displayName = "Drawer";
|
|
2853
|
-
const ho = ie.Trigger,
|
|
2894
|
+
const ho = ie.Trigger, bl = ie.Portal, xl = ie.Close, po = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
|
|
2854
2895
|
ie.Overlay,
|
|
2855
2896
|
{
|
|
2856
2897
|
ref: n,
|
|
2857
|
-
className:
|
|
2898
|
+
className: O("fixed inset-0 z-50 bg-black/80", e),
|
|
2858
2899
|
...t
|
|
2859
2900
|
}
|
|
2860
2901
|
));
|
|
2861
2902
|
po.displayName = ie.Overlay.displayName;
|
|
2862
|
-
const Zt = h.forwardRef(({ className: e, children: t, hideBar: n = !0, ...r }, a) => /* @__PURE__ */ o.jsxs(
|
|
2903
|
+
const Zt = h.forwardRef(({ className: e, children: t, hideBar: n = !0, ...r }, a) => /* @__PURE__ */ o.jsxs(bl, { children: [
|
|
2863
2904
|
/* @__PURE__ */ o.jsx(po, {}),
|
|
2864
2905
|
/* @__PURE__ */ o.jsxs(
|
|
2865
2906
|
ie.Content,
|
|
2866
2907
|
{
|
|
2867
2908
|
ref: a,
|
|
2868
|
-
className:
|
|
2909
|
+
className: O(
|
|
2869
2910
|
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
|
2870
2911
|
e
|
|
2871
2912
|
),
|
|
@@ -2882,7 +2923,7 @@ const en = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
|
|
|
2882
2923
|
ie.Title,
|
|
2883
2924
|
{
|
|
2884
2925
|
ref: n,
|
|
2885
|
-
className:
|
|
2926
|
+
className: O(
|
|
2886
2927
|
"text-lg font-semibold leading-none tracking-tight",
|
|
2887
2928
|
e
|
|
2888
2929
|
),
|
|
@@ -2890,19 +2931,19 @@ const en = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
|
|
|
2890
2931
|
}
|
|
2891
2932
|
));
|
|
2892
2933
|
en.displayName = ie.Title.displayName;
|
|
2893
|
-
const
|
|
2934
|
+
const yl = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
|
|
2894
2935
|
ie.Description,
|
|
2895
2936
|
{
|
|
2896
2937
|
ref: n,
|
|
2897
|
-
className:
|
|
2938
|
+
className: O("text-sm text-muted-foreground", e),
|
|
2898
2939
|
...t
|
|
2899
2940
|
}
|
|
2900
2941
|
));
|
|
2901
|
-
|
|
2902
|
-
const
|
|
2903
|
-
const { topNavigation: e } =
|
|
2942
|
+
yl.displayName = ie.Description.displayName;
|
|
2943
|
+
const Ml = () => {
|
|
2944
|
+
const { topNavigation: e } = Be();
|
|
2904
2945
|
return /* @__PURE__ */ o.jsxs(Jt, { direction: "right", children: [
|
|
2905
|
-
/* @__PURE__ */ o.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ o.jsx(ho, { className: "lg:hidden", children: /* @__PURE__ */ o.jsx(
|
|
2946
|
+
/* @__PURE__ */ o.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ o.jsx(ho, { className: "lg:hidden", children: /* @__PURE__ */ o.jsx(Wa, { size: 22 }) }) }),
|
|
2906
2947
|
/* @__PURE__ */ o.jsxs(
|
|
2907
2948
|
Zt,
|
|
2908
2949
|
{
|
|
@@ -2911,23 +2952,23 @@ const xl = () => {
|
|
|
2911
2952
|
children: [
|
|
2912
2953
|
/* @__PURE__ */ o.jsx(An, { children: /* @__PURE__ */ o.jsx(en, { children: "Navigation" }) }),
|
|
2913
2954
|
/* @__PURE__ */ o.jsx("ul", { className: "flex flex-col items-center gap-4 p-4", children: e.map((t) => /* @__PURE__ */ o.jsx("li", { children: /* @__PURE__ */ o.jsx(
|
|
2914
|
-
|
|
2955
|
+
Ye,
|
|
2915
2956
|
{
|
|
2916
2957
|
className: ({ isActive: n }) => kn(
|
|
2917
2958
|
"block font-medium border-b-2",
|
|
2918
2959
|
n ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
2919
2960
|
),
|
|
2920
2961
|
to: t.id,
|
|
2921
|
-
children: /* @__PURE__ */ o.jsx(
|
|
2962
|
+
children: /* @__PURE__ */ o.jsx(xl, { children: t.label })
|
|
2922
2963
|
}
|
|
2923
2964
|
) }, t.label)) })
|
|
2924
2965
|
]
|
|
2925
2966
|
}
|
|
2926
2967
|
)
|
|
2927
2968
|
] });
|
|
2928
|
-
},
|
|
2929
|
-
const e =
|
|
2930
|
-
|
|
2969
|
+
}, Sl = () => {
|
|
2970
|
+
const e = Be(), [t, n] = _e(!1), r = Fn(() => n(!1), []);
|
|
2971
|
+
be(() => {
|
|
2931
2972
|
if (t)
|
|
2932
2973
|
return;
|
|
2933
2974
|
function s(i) {
|
|
@@ -2937,7 +2978,7 @@ const xl = () => {
|
|
|
2937
2978
|
window.removeEventListener("keydown", s);
|
|
2938
2979
|
};
|
|
2939
2980
|
}, [t, n]);
|
|
2940
|
-
const a = e.plugins.find(
|
|
2981
|
+
const a = e.plugins.find(Ns);
|
|
2941
2982
|
return a ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
2942
2983
|
/* @__PURE__ */ o.jsxs(
|
|
2943
2984
|
"button",
|
|
@@ -2947,7 +2988,7 @@ const xl = () => {
|
|
|
2947
2988
|
className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-40 sm:w-72",
|
|
2948
2989
|
children: [
|
|
2949
2990
|
/* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
|
|
2950
|
-
/* @__PURE__ */ o.jsx(
|
|
2991
|
+
/* @__PURE__ */ o.jsx(Ja, { size: 14 }),
|
|
2951
2992
|
"Search"
|
|
2952
2993
|
] }),
|
|
2953
2994
|
/* @__PURE__ */ o.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
|
|
@@ -2959,10 +3000,10 @@ const xl = () => {
|
|
|
2959
3000
|
onClose: r
|
|
2960
3001
|
}) })
|
|
2961
3002
|
] }) : null;
|
|
2962
|
-
},
|
|
2963
|
-
const { topNavigation: e } =
|
|
3003
|
+
}, El = () => {
|
|
3004
|
+
const { topNavigation: e } = Be();
|
|
2964
3005
|
return e.length <= 1 ? /* @__PURE__ */ o.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ o.jsx("nav", { className: "hidden lg:block border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ o.jsx("ul", { className: "flex flex-row items-center gap-8", children: e.map((t) => /* @__PURE__ */ o.jsx("li", { children: /* @__PURE__ */ o.jsx(
|
|
2965
|
-
|
|
3006
|
+
Ye,
|
|
2966
3007
|
{
|
|
2967
3008
|
className: ({ isActive: n }) => kn(
|
|
2968
3009
|
"block py-3.5 font-medium -mb-px border-b-2",
|
|
@@ -2972,16 +3013,16 @@ const xl = () => {
|
|
|
2972
3013
|
children: t.label
|
|
2973
3014
|
}
|
|
2974
3015
|
) }, t.label)) }) });
|
|
2975
|
-
}, mo = ({ item: e }) => e.children ? /* @__PURE__ */ o.jsxs(
|
|
3016
|
+
}, mo = ({ item: e }) => e.children ? /* @__PURE__ */ o.jsxs(Gi, { children: [
|
|
2976
3017
|
/* @__PURE__ */ o.jsx(Qr, { children: e.label }),
|
|
2977
|
-
/* @__PURE__ */ o.jsx(
|
|
3018
|
+
/* @__PURE__ */ o.jsx(Qi, { children: /* @__PURE__ */ o.jsx(Gr, { children: e.children.map((t, n) => (
|
|
2978
3019
|
// eslint-disable-next-line react/no-array-index-key
|
|
2979
3020
|
/* @__PURE__ */ o.jsx(mo, { item: t }, n)
|
|
2980
3021
|
)) }) })
|
|
2981
3022
|
] }, e.label) : /* @__PURE__ */ o.jsx(It, { to: e.path ?? "", children: /* @__PURE__ */ o.jsx(Yr, { children: e.label }, e.label) }), go = Un(function() {
|
|
2982
|
-
const t = un(), [n, r] = la(), { isAuthenticated: a, profile: s, isAuthEnabled: i } = un(), l =
|
|
3023
|
+
const t = un(), [n, r] = la(), { isAuthenticated: a, profile: s, isAuthEnabled: i } = un(), l = Be(), { page: u, plugins: v } = l, m = v.filter((d) => Ds(d)).flatMap((d) => d.getProfileMenuItems(l)).map((d) => /* @__PURE__ */ o.jsx(mo, { item: d }, d.label)), c = n ? Ya : Za;
|
|
2983
3024
|
return /* @__PURE__ */ o.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
|
|
2984
|
-
/* @__PURE__ */ o.jsx(
|
|
3025
|
+
/* @__PURE__ */ o.jsx(Ji, {}),
|
|
2985
3026
|
/* @__PURE__ */ o.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
|
|
2986
3027
|
/* @__PURE__ */ o.jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-10 lg:px-12 h-[--top-header-height]", children: [
|
|
2987
3028
|
/* @__PURE__ */ o.jsx("div", { className: "flex", children: /* @__PURE__ */ o.jsx(It, { to: "/", children: /* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
@@ -2992,7 +3033,7 @@ const xl = () => {
|
|
|
2992
3033
|
src: u.logo.src.light,
|
|
2993
3034
|
alt: u.logo.alt ?? u.pageTitle,
|
|
2994
3035
|
style: { width: u.logo.width },
|
|
2995
|
-
className:
|
|
3036
|
+
className: O("h-10", n && "hidden"),
|
|
2996
3037
|
loading: "lazy"
|
|
2997
3038
|
}
|
|
2998
3039
|
),
|
|
@@ -3002,7 +3043,7 @@ const xl = () => {
|
|
|
3002
3043
|
src: u.logo.src.dark,
|
|
3003
3044
|
alt: u.logo.alt ?? u.pageTitle,
|
|
3004
3045
|
style: { width: u.logo.width },
|
|
3005
|
-
className:
|
|
3046
|
+
className: O("h-10", !n && "hidden"),
|
|
3006
3047
|
loading: "lazy"
|
|
3007
3048
|
}
|
|
3008
3049
|
)
|
|
@@ -3010,12 +3051,12 @@ const xl = () => {
|
|
|
3010
3051
|
/* @__PURE__ */ o.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: u == null ? void 0 : u.pageTitle })
|
|
3011
3052
|
] }) }) }),
|
|
3012
3053
|
/* @__PURE__ */ o.jsxs("div", { className: "grid grid-cols-2 md:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
|
|
3013
|
-
/* @__PURE__ */ o.jsx("div", { className: "w-full justify-center flex", children: /* @__PURE__ */ o.jsx(
|
|
3014
|
-
/* @__PURE__ */ o.jsx(
|
|
3054
|
+
/* @__PURE__ */ o.jsx("div", { className: "w-full justify-center flex", children: /* @__PURE__ */ o.jsx(Sl, {}) }),
|
|
3055
|
+
/* @__PURE__ */ o.jsx(Ml, {}),
|
|
3015
3056
|
/* @__PURE__ */ o.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
|
|
3016
3057
|
/* @__PURE__ */ o.jsx(Te, { name: "head-navigation-start" }),
|
|
3017
|
-
i && !a ? /* @__PURE__ */ o.jsx(Dt, { variant: "ghost", onClick: () => t.login(), children: "Login" }) : m.length > 0 && /* @__PURE__ */ o.jsxs(
|
|
3018
|
-
/* @__PURE__ */ o.jsx(
|
|
3058
|
+
i && !a ? /* @__PURE__ */ o.jsx(Dt, { variant: "ghost", onClick: () => t.login(), children: "Login" }) : m.length > 0 && /* @__PURE__ */ o.jsxs(qi, { modal: !1, children: [
|
|
3059
|
+
/* @__PURE__ */ o.jsx(Vi, { asChild: !0, children: /* @__PURE__ */ o.jsx(Dt, { variant: "ghost", children: s != null && s.email ? `${s.email}` : "My Account" }) }),
|
|
3019
3060
|
/* @__PURE__ */ o.jsxs(Wr, { className: "w-56", children: [
|
|
3020
3061
|
/* @__PURE__ */ o.jsx(Xr, { children: "My Account" }),
|
|
3021
3062
|
/* @__PURE__ */ o.jsx(Jr, {}),
|
|
@@ -3036,14 +3077,14 @@ const xl = () => {
|
|
|
3036
3077
|
] })
|
|
3037
3078
|
] })
|
|
3038
3079
|
] }),
|
|
3039
|
-
/* @__PURE__ */ o.jsx(
|
|
3080
|
+
/* @__PURE__ */ o.jsx(El, {})
|
|
3040
3081
|
] })
|
|
3041
3082
|
] });
|
|
3042
3083
|
}), vo = {
|
|
3043
3084
|
Header: go
|
|
3044
|
-
},
|
|
3045
|
-
const [t, n] =
|
|
3046
|
-
|
|
3085
|
+
}, Cl = Ln(vo), Rl = Cl.Provider, Dl = (e) => {
|
|
3086
|
+
const [t, n] = _e(!1);
|
|
3087
|
+
be(() => {
|
|
3047
3088
|
const s = localStorage.getItem("theme"), i = window.matchMedia("(prefers-color-scheme: dark)"), l = s === "dark" || !s && i.matches;
|
|
3048
3089
|
n(l);
|
|
3049
3090
|
}, [t]);
|
|
@@ -3052,53 +3093,53 @@ const xl = () => {
|
|
|
3052
3093
|
document.documentElement.classList.toggle("dark", s), localStorage.setItem("theme", s ? "dark" : "light"), n(s);
|
|
3053
3094
|
}, [t]), a = [t, r];
|
|
3054
3095
|
return /* @__PURE__ */ o.jsx(ca.Provider, { value: a, ...e });
|
|
3055
|
-
},
|
|
3096
|
+
}, jl = ({
|
|
3056
3097
|
children: e,
|
|
3057
3098
|
context: t
|
|
3058
3099
|
}) => (Ta({
|
|
3059
3100
|
queryFn: async () => (await t.initialize(), !0),
|
|
3060
3101
|
queryKey: ["zudoku-initialize"]
|
|
3061
|
-
}), /* @__PURE__ */ o.jsx(_a.Provider, { value: t, children: e })),
|
|
3102
|
+
}), /* @__PURE__ */ o.jsx(_a.Provider, { value: t, children: e })), Nl = ({
|
|
3062
3103
|
children: e,
|
|
3063
3104
|
...t
|
|
3064
3105
|
}) => {
|
|
3065
3106
|
var c, d;
|
|
3066
|
-
const n =
|
|
3107
|
+
const n = yt(
|
|
3067
3108
|
() => ({ ...vo, ...t.overrides }),
|
|
3068
3109
|
[t.overrides]
|
|
3069
|
-
), r =
|
|
3070
|
-
var
|
|
3110
|
+
), r = yt(() => {
|
|
3111
|
+
var y;
|
|
3071
3112
|
return {
|
|
3072
|
-
...(t.plugins ?? []).filter(
|
|
3113
|
+
...(t.plugins ?? []).filter(_s).flatMap(
|
|
3073
3114
|
(R) => R.getMdxComponents ? [R.getMdxComponents()] : []
|
|
3074
3115
|
).reduce((R, K) => ({ ...R, ...K }), {}),
|
|
3075
3116
|
...ua,
|
|
3076
|
-
...(
|
|
3117
|
+
...(y = t.mdx) == null ? void 0 : y.components
|
|
3077
3118
|
};
|
|
3078
|
-
}, [(c = t.mdx) == null ? void 0 : c.components, t.plugins]), { stagger: a } = va(jt), [s, i] =
|
|
3119
|
+
}, [(c = t.mdx) == null ? void 0 : c.components, t.plugins]), { stagger: a } = va(jt), [s, i] = _e(!1), l = yt(
|
|
3079
3120
|
() => s ? { stagger: !0 } : { stagger: a },
|
|
3080
3121
|
[a, s]
|
|
3081
3122
|
), u = zo();
|
|
3082
|
-
|
|
3123
|
+
be(() => {
|
|
3083
3124
|
s || i(!0);
|
|
3084
3125
|
}, [s, u.location]);
|
|
3085
|
-
const [v] =
|
|
3126
|
+
const [v] = _e(() => new Is(t)), m = (d = t.plugins) == null ? void 0 : d.filter(Ts).map((f, y) => {
|
|
3086
3127
|
var R;
|
|
3087
|
-
return /* @__PURE__ */ o.jsx(wa, { children: (R = f.getHead) == null ? void 0 : R.call(f) },
|
|
3128
|
+
return /* @__PURE__ */ o.jsx(wa, { children: (R = f.getHead) == null ? void 0 : R.call(f) }, y);
|
|
3088
3129
|
});
|
|
3089
3130
|
return /* @__PURE__ */ o.jsxs(Oa, { client: Yn, children: [
|
|
3090
3131
|
/* @__PURE__ */ o.jsx(Ot, { children: m }),
|
|
3091
|
-
/* @__PURE__ */ o.jsx(jt.Provider, { value: l, children: /* @__PURE__ */ o.jsx(
|
|
3132
|
+
/* @__PURE__ */ o.jsx(jt.Provider, { value: l, children: /* @__PURE__ */ o.jsx(jl, { context: v, children: /* @__PURE__ */ o.jsx(ko, { components: r, children: /* @__PURE__ */ o.jsx(Dl, { children: /* @__PURE__ */ o.jsx(Rl, { value: n, children: /* @__PURE__ */ o.jsx(qo, { slotlets: t.slotlets, children: /* @__PURE__ */ o.jsx(da, { children: e ?? /* @__PURE__ */ o.jsx(jn, {}) }) }) }) }) }) }) })
|
|
3092
3133
|
] });
|
|
3093
|
-
},
|
|
3134
|
+
}, Pl = Un(Nl), wo = (e) => /* @__PURE__ */ o.jsx(Cs, { FallbackComponent: As, children: /* @__PURE__ */ o.jsx(Pl, { ...e }) });
|
|
3094
3135
|
wo.displayName = "DevPortal";
|
|
3095
|
-
const
|
|
3136
|
+
const Tl = ({
|
|
3096
3137
|
category: e,
|
|
3097
3138
|
level: t
|
|
3098
3139
|
}) => {
|
|
3099
3140
|
var d;
|
|
3100
|
-
const n = Kn(), r = $o(e), [a, s] =
|
|
3101
|
-
|
|
3141
|
+
const n = Kn(), r = $o(e), [a, s] = _e(!1), i = e.collapsible ?? !0, l = e.collapsed ?? !0, u = !!(!i || !l || r), [v, m] = _e(u);
|
|
3142
|
+
be(() => {
|
|
3102
3143
|
r && m(!0);
|
|
3103
3144
|
}, [r]);
|
|
3104
3145
|
const c = i && /* @__PURE__ */ o.jsx(
|
|
@@ -3106,13 +3147,13 @@ const jl = ({
|
|
|
3106
3147
|
{
|
|
3107
3148
|
type: "button",
|
|
3108
3149
|
onClick: (f) => {
|
|
3109
|
-
f.preventDefault(), m((
|
|
3150
|
+
f.preventDefault(), m((y) => !y), s(!0);
|
|
3110
3151
|
},
|
|
3111
3152
|
children: /* @__PURE__ */ o.jsx(
|
|
3112
3153
|
Vn,
|
|
3113
3154
|
{
|
|
3114
3155
|
size: 16,
|
|
3115
|
-
className:
|
|
3156
|
+
className: O(
|
|
3116
3157
|
a && "transition",
|
|
3117
3158
|
"shrink-0 group-data-[state=open]:rotate-90"
|
|
3118
3159
|
)
|
|
@@ -3121,9 +3162,9 @@ const jl = ({
|
|
|
3121
3162
|
}
|
|
3122
3163
|
);
|
|
3123
3164
|
return /* @__PURE__ */ o.jsxs(
|
|
3124
|
-
|
|
3165
|
+
ya,
|
|
3125
3166
|
{
|
|
3126
|
-
className:
|
|
3167
|
+
className: O("flex flex-col", t === 0 && "-mx-[--padding-nav-item]"),
|
|
3127
3168
|
defaultOpen: u,
|
|
3128
3169
|
open: v,
|
|
3129
3170
|
onOpenChange: () => m(!0),
|
|
@@ -3131,17 +3172,17 @@ const jl = ({
|
|
|
3131
3172
|
/* @__PURE__ */ o.jsx(
|
|
3132
3173
|
Ma,
|
|
3133
3174
|
{
|
|
3134
|
-
className:
|
|
3175
|
+
className: O(
|
|
3135
3176
|
"group text-start",
|
|
3136
|
-
|
|
3177
|
+
We({ isActive: !1, isTopLevel: t === 0 }),
|
|
3137
3178
|
i ? "cursor-pointer" : "cursor-default hover:bg-transparent"
|
|
3138
3179
|
),
|
|
3139
3180
|
asChild: !0,
|
|
3140
3181
|
disabled: !i,
|
|
3141
|
-
children: ((d = e.link) == null ? void 0 : d.type) === "doc" ? /* @__PURE__ */ o.jsx(
|
|
3182
|
+
children: ((d = e.link) == null ? void 0 : d.type) === "doc" ? /* @__PURE__ */ o.jsx(Ye, { to: Ht(n == null ? void 0 : n.id, e.link.id), children: ({ isActive: f }) => /* @__PURE__ */ o.jsxs(
|
|
3142
3183
|
"div",
|
|
3143
3184
|
{
|
|
3144
|
-
className:
|
|
3185
|
+
className: O(
|
|
3145
3186
|
"flex items-center gap-2 justify-between w-full",
|
|
3146
3187
|
f ? "text-primary font-medium" : "text-foreground/80"
|
|
3147
3188
|
),
|
|
@@ -3159,7 +3200,7 @@ const jl = ({
|
|
|
3159
3200
|
/* @__PURE__ */ o.jsx(
|
|
3160
3201
|
Sa,
|
|
3161
3202
|
{
|
|
3162
|
-
className:
|
|
3203
|
+
className: O(
|
|
3163
3204
|
// CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle
|
|
3164
3205
|
a && "CollapsibleContent",
|
|
3165
3206
|
"ms-[calc(var(--padding-nav-item)*1.125)]"
|
|
@@ -3177,7 +3218,7 @@ const jl = ({
|
|
|
3177
3218
|
]
|
|
3178
3219
|
}
|
|
3179
3220
|
);
|
|
3180
|
-
},
|
|
3221
|
+
}, We = fa(
|
|
3181
3222
|
"flex px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
|
|
3182
3223
|
{
|
|
3183
3224
|
variants: {
|
|
@@ -3194,19 +3235,19 @@ const jl = ({
|
|
|
3194
3235
|
}
|
|
3195
3236
|
}
|
|
3196
3237
|
}
|
|
3197
|
-
),
|
|
3238
|
+
), bo = "data-anchor", _t = ({
|
|
3198
3239
|
item: e,
|
|
3199
3240
|
level: t = 0
|
|
3200
3241
|
}) => {
|
|
3201
3242
|
const n = Kn(), { activeAnchor: r } = $t(), [a] = Ko();
|
|
3202
3243
|
switch (e.type) {
|
|
3203
3244
|
case "category":
|
|
3204
|
-
return /* @__PURE__ */ o.jsx(
|
|
3245
|
+
return /* @__PURE__ */ o.jsx(Tl, { category: e, level: t });
|
|
3205
3246
|
case "doc":
|
|
3206
3247
|
return /* @__PURE__ */ o.jsx(
|
|
3207
|
-
|
|
3248
|
+
Ye,
|
|
3208
3249
|
{
|
|
3209
|
-
className: ({ isActive: s }) =>
|
|
3250
|
+
className: ({ isActive: s }) => We({ isActive: s, isTopLevel: t === 0 }),
|
|
3210
3251
|
to: Ht(n == null ? void 0 : n.id, e.id),
|
|
3211
3252
|
children: e.badge ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
3212
3253
|
/* @__PURE__ */ o.jsx("span", { className: "truncate", title: e.label, children: e.label }),
|
|
@@ -3219,11 +3260,11 @@ const jl = ({
|
|
|
3219
3260
|
Lo,
|
|
3220
3261
|
{
|
|
3221
3262
|
to: { hash: e.href, search: a.toString() },
|
|
3222
|
-
[
|
|
3223
|
-
className:
|
|
3263
|
+
[bo]: e.href.slice(1),
|
|
3264
|
+
className: O(
|
|
3224
3265
|
"flex gap-2.5 justify-between",
|
|
3225
3266
|
t === 0 && "-mx-[--padding-nav-item]",
|
|
3226
|
-
|
|
3267
|
+
We({
|
|
3227
3268
|
isActive: e.href.slice(1) === r
|
|
3228
3269
|
})
|
|
3229
3270
|
),
|
|
@@ -3235,8 +3276,8 @@ const jl = ({
|
|
|
3235
3276
|
) : e.href.startsWith("http") ? /* @__PURE__ */ o.jsxs(
|
|
3236
3277
|
"a",
|
|
3237
3278
|
{
|
|
3238
|
-
className:
|
|
3239
|
-
|
|
3279
|
+
className: O(
|
|
3280
|
+
We({ isTopLevel: t === 0 }),
|
|
3240
3281
|
"block"
|
|
3241
3282
|
),
|
|
3242
3283
|
href: e.href,
|
|
@@ -3246,14 +3287,14 @@ const jl = ({
|
|
|
3246
3287
|
/* @__PURE__ */ o.jsx("span", { className: "whitespace-normal", children: e.label }),
|
|
3247
3288
|
/* @__PURE__ */ o.jsxs("span", { className: "whitespace-nowrap", children: [
|
|
3248
3289
|
" ",
|
|
3249
|
-
/* @__PURE__ */ o.jsx(
|
|
3290
|
+
/* @__PURE__ */ o.jsx(Ga, { className: "inline ml-1", size: 12 })
|
|
3250
3291
|
] })
|
|
3251
3292
|
]
|
|
3252
3293
|
}
|
|
3253
3294
|
) : /* @__PURE__ */ o.jsx(
|
|
3254
|
-
|
|
3295
|
+
Ye,
|
|
3255
3296
|
{
|
|
3256
|
-
className:
|
|
3297
|
+
className: O("flex gap-2.5 justify-between", We()),
|
|
3257
3298
|
to: e.href,
|
|
3258
3299
|
children: e.badge ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
3259
3300
|
/* @__PURE__ */ o.jsx("span", { className: "truncate", title: e.label, children: e.label }),
|
|
@@ -3262,17 +3303,17 @@ const jl = ({
|
|
|
3262
3303
|
}
|
|
3263
3304
|
);
|
|
3264
3305
|
}
|
|
3265
|
-
},
|
|
3306
|
+
}, _l = (e, t = { block: "center" }) => {
|
|
3266
3307
|
if (!e) return;
|
|
3267
3308
|
const n = e.getBoundingClientRect();
|
|
3268
3309
|
n.top >= 0 && n.left >= 0 && n.bottom <= (window.innerHeight || document.documentElement.clientHeight) && n.right <= (window.innerWidth || document.documentElement.clientWidth) || e.scrollIntoView(t);
|
|
3269
|
-
},
|
|
3310
|
+
}, Ol = () => {
|
|
3270
3311
|
const e = At(), { setActiveAnchor: t } = $t();
|
|
3271
|
-
|
|
3312
|
+
be(() => {
|
|
3272
3313
|
if (!e.hash) return;
|
|
3273
3314
|
const n = decodeURIComponent(e.hash.split("/")[0].slice(1)), r = () => {
|
|
3274
|
-
const a = document.getElementById(n), s = document.querySelector(`[${
|
|
3275
|
-
return a ? (a.scrollIntoView(),
|
|
3315
|
+
const a = document.getElementById(n), s = document.querySelector(`[${bo}="${n}"]`);
|
|
3316
|
+
return a ? (a.scrollIntoView(), _l(s), requestIdleCallback(() => t(n)), !0) : !1;
|
|
3276
3317
|
};
|
|
3277
3318
|
if (!r()) {
|
|
3278
3319
|
const a = new MutationObserver((s, i) => {
|
|
@@ -3281,16 +3322,16 @@ const jl = ({
|
|
|
3281
3322
|
return a.observe(document.body, { childList: !0, subtree: !0 }), () => a.disconnect();
|
|
3282
3323
|
}
|
|
3283
3324
|
}, [e.hash, t]);
|
|
3284
|
-
},
|
|
3325
|
+
}, Il = () => {
|
|
3285
3326
|
const e = At(), t = Lt(e.pathname);
|
|
3286
|
-
|
|
3327
|
+
be(() => {
|
|
3287
3328
|
t.current !== e.pathname && (window.scrollTo(0, 0), t.current = e.pathname);
|
|
3288
3329
|
}, [e.pathname]);
|
|
3289
|
-
},
|
|
3330
|
+
}, xo = ba(({ children: e, className: t, pushMainContent: n }, r) => /* @__PURE__ */ o.jsx(
|
|
3290
3331
|
"nav",
|
|
3291
3332
|
{
|
|
3292
3333
|
"data-navigation": String(n),
|
|
3293
|
-
className:
|
|
3334
|
+
className: O(
|
|
3294
3335
|
"scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0",
|
|
3295
3336
|
"px-[--padding-nav-item] -mx-[--padding-nav-item] pb-20 mt-[--padding-content-top]",
|
|
3296
3337
|
"w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
|
|
@@ -3300,12 +3341,12 @@ const jl = ({
|
|
|
3300
3341
|
children: e
|
|
3301
3342
|
}
|
|
3302
3343
|
));
|
|
3303
|
-
|
|
3304
|
-
const
|
|
3344
|
+
xo.displayName = "SidebarWrapper";
|
|
3345
|
+
const Al = () => {
|
|
3305
3346
|
const e = Lt(null), t = Ia();
|
|
3306
3347
|
return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
3307
3348
|
/* @__PURE__ */ o.jsxs(
|
|
3308
|
-
|
|
3349
|
+
xo,
|
|
3309
3350
|
{
|
|
3310
3351
|
ref: e,
|
|
3311
3352
|
pushMainContent: t.data.items.length > 0,
|
|
@@ -3328,14 +3369,14 @@ const _l = () => {
|
|
|
3328
3369
|
}
|
|
3329
3370
|
)
|
|
3330
3371
|
] });
|
|
3331
|
-
},
|
|
3332
|
-
const t = At(), { setActiveAnchor: n } = $t(), { meta: r, authentication: a } =
|
|
3333
|
-
|
|
3372
|
+
}, kl = ({ children: e }) => {
|
|
3373
|
+
const t = At(), { setActiveAnchor: n } = $t(), { meta: r, authentication: a } = Be();
|
|
3374
|
+
Ol(), Il();
|
|
3334
3375
|
const s = Lt(t.pathname);
|
|
3335
|
-
return
|
|
3376
|
+
return be(() => {
|
|
3336
3377
|
var i;
|
|
3337
3378
|
(i = a == null ? void 0 : a.pageLoad) == null || i.call(a);
|
|
3338
|
-
}, [a]),
|
|
3379
|
+
}, [a]), be(() => {
|
|
3339
3380
|
t.pathname !== s.current && n(""), s.current = t.pathname;
|
|
3340
3381
|
}, [t.pathname, n]), /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
3341
3382
|
!1,
|
|
@@ -3350,16 +3391,16 @@ const _l = () => {
|
|
|
3350
3391
|
{
|
|
3351
3392
|
fallback: /* @__PURE__ */ o.jsx("main", { className: "grid h-full place-items-center", children: /* @__PURE__ */ o.jsx(qa, {}) }),
|
|
3352
3393
|
children: /* @__PURE__ */ o.jsxs(Jt, { direction: "left", children: [
|
|
3353
|
-
/* @__PURE__ */ o.jsx(
|
|
3394
|
+
/* @__PURE__ */ o.jsx(Al, {}),
|
|
3354
3395
|
/* @__PURE__ */ o.jsx(
|
|
3355
3396
|
"div",
|
|
3356
3397
|
{
|
|
3357
|
-
className:
|
|
3398
|
+
className: O(
|
|
3358
3399
|
"lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
|
|
3359
3400
|
"peer-data-[navigation=false]:hidden"
|
|
3360
3401
|
),
|
|
3361
3402
|
children: /* @__PURE__ */ o.jsxs(ho, { className: "flex items-center gap-2", children: [
|
|
3362
|
-
/* @__PURE__ */ o.jsx(
|
|
3403
|
+
/* @__PURE__ */ o.jsx(Xa, { size: 16, strokeWidth: 1.5 }),
|
|
3363
3404
|
/* @__PURE__ */ o.jsx("span", { className: "text-sm", children: "Menu" })
|
|
3364
3405
|
] })
|
|
3365
3406
|
}
|
|
@@ -3367,7 +3408,7 @@ const _l = () => {
|
|
|
3367
3408
|
/* @__PURE__ */ o.jsxs(
|
|
3368
3409
|
"main",
|
|
3369
3410
|
{
|
|
3370
|
-
className:
|
|
3411
|
+
className: O(
|
|
3371
3412
|
"h-full dark:border-white/10 translate-x-0",
|
|
3372
3413
|
"lg:overflow-visible",
|
|
3373
3414
|
// This works in tandem with the `SidebarWrapper` component
|
|
@@ -3385,18 +3426,18 @@ const _l = () => {
|
|
|
3385
3426
|
}
|
|
3386
3427
|
) })
|
|
3387
3428
|
] });
|
|
3388
|
-
},
|
|
3429
|
+
}, Zl = Fo, ec = ha, tc = wo, nc = kl, rc = It, oc = Vo, ac = es, sc = vs, ic = ws, lc = Dt, cc = Ot;
|
|
3389
3430
|
export {
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3431
|
+
sc as Bootstrap,
|
|
3432
|
+
ic as BootstrapStatic,
|
|
3433
|
+
lc as Button,
|
|
3434
|
+
ec as Callout,
|
|
3435
|
+
tc as DevPortal,
|
|
3436
|
+
cc as Head,
|
|
3437
|
+
nc as Layout,
|
|
3438
|
+
rc as Link,
|
|
3439
|
+
oc as RouterError,
|
|
3440
|
+
ac as ServerError,
|
|
3441
|
+
Zl as useMDXComponents
|
|
3401
3442
|
};
|
|
3402
3443
|
//# sourceMappingURL=zudoku.components.js.map
|