@rinzai/zen 0.1.6 → 0.1.7
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/dropdown/index.d.ts.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/popover/index.d.ts +2 -1
- package/dist/popover/index.d.ts.map +1 -1
- package/dist/zen.css +1 -1
- package/dist/zen.js +390 -391
- package/package.json +1 -1
package/dist/zen.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsx as b, jsxs as W, Fragment as
|
|
1
|
+
import { jsx as b, jsxs as W, Fragment as Fe } from "react/jsx-runtime";
|
|
2
2
|
import * as C from "react";
|
|
3
|
-
import { useLayoutEffect as tt, useEffect as re, useState as de, useId as nt, useMemo as ve, useRef as
|
|
3
|
+
import { useLayoutEffect as tt, useEffect as re, useState as de, useId as nt, useMemo as ve, useRef as Ee } from "react";
|
|
4
4
|
import * as ot from "react-dom";
|
|
5
5
|
import { createPortal as st, flushSync as it } from "react-dom";
|
|
6
|
-
const
|
|
6
|
+
const k = (...e) => e.reduce((o, t) => t == null || t === !1 ? o : typeof t == "string" || typeof t == "number" ? o + " " + t : Array.isArray(t) ? o + " " + k(...t) : typeof t == "object" ? o + " " + Object.entries(t).reduce((n, [s, i]) => i == null || i === !1 ? n : typeof i == "string" || typeof i == "number" ? n + " " + s + "-" + i : typeof i == "boolean" && i ? n + " " + s : n, "") : o, ""), Te = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ve = (e, o) => (t) => {
|
|
7
7
|
var c;
|
|
8
|
-
if ((o == null ? void 0 : o.variants) == null) return
|
|
8
|
+
if ((o == null ? void 0 : o.variants) == null) return k(e, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
|
|
9
9
|
const { variants: n, defaultVariants: s } = o, i = Object.keys(n).map((a) => {
|
|
10
|
-
const u = t == null ? void 0 : t[a],
|
|
10
|
+
const u = t == null ? void 0 : t[a], d = s == null ? void 0 : s[a];
|
|
11
11
|
if (u === null) return null;
|
|
12
|
-
const
|
|
13
|
-
return n[a][
|
|
12
|
+
const m = Te(u) || Te(d);
|
|
13
|
+
return n[a][m];
|
|
14
14
|
}), r = t && Object.entries(t).reduce(
|
|
15
|
-
(a, [u,
|
|
15
|
+
(a, [u, d]) => (d === void 0 || (a[u] = d), a),
|
|
16
16
|
{}
|
|
17
17
|
), l = (c = o == null ? void 0 : o.compoundVariants) == null ? void 0 : c.reduce(
|
|
18
|
-
(a, { class: u, className:
|
|
19
|
-
([
|
|
18
|
+
(a, { class: u, className: d, ...m }) => Object.entries(m).every(
|
|
19
|
+
([f, g]) => Array.isArray(g) ? g.includes(
|
|
20
20
|
{
|
|
21
21
|
...s,
|
|
22
22
|
...r
|
|
23
|
-
}[
|
|
23
|
+
}[f]
|
|
24
24
|
) : {
|
|
25
25
|
...s,
|
|
26
26
|
...r
|
|
27
|
-
}[
|
|
28
|
-
) ? [...a, u,
|
|
27
|
+
}[f] === g
|
|
28
|
+
) ? [...a, u, d] : a,
|
|
29
29
|
[]
|
|
30
30
|
);
|
|
31
|
-
return
|
|
31
|
+
return k(e, i, l, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
|
|
32
32
|
};
|
|
33
33
|
function We({ variant: e, className: o, ...t }) {
|
|
34
34
|
return /* @__PURE__ */ b("span", { ...t, className: rt({ variant: e, className: o }) });
|
|
@@ -89,7 +89,7 @@ const ct = Ve(
|
|
|
89
89
|
start: "end",
|
|
90
90
|
end: "start"
|
|
91
91
|
};
|
|
92
|
-
function
|
|
92
|
+
function Ae(e, o, t) {
|
|
93
93
|
return H(e, le(o, t));
|
|
94
94
|
}
|
|
95
95
|
function he(e, o) {
|
|
@@ -121,9 +121,9 @@ function ft(e, o, t) {
|
|
|
121
121
|
}
|
|
122
122
|
function dt(e) {
|
|
123
123
|
const o = ae(e);
|
|
124
|
-
return [
|
|
124
|
+
return [Se(e), o, Se(o)];
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function Se(e) {
|
|
127
127
|
return e.replace(/start|end/g, (o) => ut[o]);
|
|
128
128
|
}
|
|
129
129
|
function ht(e, o, t) {
|
|
@@ -142,7 +142,7 @@ function ht(e, o, t) {
|
|
|
142
142
|
function mt(e, o, t, n) {
|
|
143
143
|
const s = me(e);
|
|
144
144
|
let i = ht(U(e), t === "start", n);
|
|
145
|
-
return s && (i = i.map((r) => r + "-" + s), o && (i = i.concat(i.map(
|
|
145
|
+
return s && (i = i.map((r) => r + "-" + s), o && (i = i.concat(i.map(Se)))), i;
|
|
146
146
|
}
|
|
147
147
|
function ae(e) {
|
|
148
148
|
return e.replace(/left|right|bottom|top/g, (o) => at[o]);
|
|
@@ -182,53 +182,53 @@ function ue(e) {
|
|
|
182
182
|
y: t
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function ze(e, o, t) {
|
|
186
186
|
let {
|
|
187
187
|
reference: n,
|
|
188
188
|
floating: s
|
|
189
189
|
} = e;
|
|
190
|
-
const i = G(o), r = $e(o), l = je(r), c = U(o), a = i === "y", u = n.x + n.width / 2 - s.width / 2,
|
|
191
|
-
let
|
|
190
|
+
const i = G(o), r = $e(o), l = je(r), c = U(o), a = i === "y", u = n.x + n.width / 2 - s.width / 2, d = n.y + n.height / 2 - s.height / 2, m = n[l] / 2 - s[l] / 2;
|
|
191
|
+
let f;
|
|
192
192
|
switch (c) {
|
|
193
193
|
case "top":
|
|
194
|
-
|
|
194
|
+
f = {
|
|
195
195
|
x: u,
|
|
196
196
|
y: n.y - s.height
|
|
197
197
|
};
|
|
198
198
|
break;
|
|
199
199
|
case "bottom":
|
|
200
|
-
|
|
200
|
+
f = {
|
|
201
201
|
x: u,
|
|
202
202
|
y: n.y + n.height
|
|
203
203
|
};
|
|
204
204
|
break;
|
|
205
205
|
case "right":
|
|
206
|
-
|
|
206
|
+
f = {
|
|
207
207
|
x: n.x + n.width,
|
|
208
|
-
y:
|
|
208
|
+
y: d
|
|
209
209
|
};
|
|
210
210
|
break;
|
|
211
211
|
case "left":
|
|
212
|
-
|
|
212
|
+
f = {
|
|
213
213
|
x: n.x - s.width,
|
|
214
|
-
y:
|
|
214
|
+
y: d
|
|
215
215
|
};
|
|
216
216
|
break;
|
|
217
217
|
default:
|
|
218
|
-
|
|
218
|
+
f = {
|
|
219
219
|
x: n.x,
|
|
220
220
|
y: n.y
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
223
|
switch (me(o)) {
|
|
224
224
|
case "start":
|
|
225
|
-
|
|
225
|
+
f[r] -= m * (t && a ? -1 : 1);
|
|
226
226
|
break;
|
|
227
227
|
case "end":
|
|
228
|
-
|
|
228
|
+
f[r] += m * (t && a ? -1 : 1);
|
|
229
229
|
break;
|
|
230
230
|
}
|
|
231
|
-
return
|
|
231
|
+
return f;
|
|
232
232
|
}
|
|
233
233
|
const xt = async (e, o, t) => {
|
|
234
234
|
const {
|
|
@@ -243,24 +243,24 @@ const xt = async (e, o, t) => {
|
|
|
243
243
|
strategy: s
|
|
244
244
|
}), {
|
|
245
245
|
x: u,
|
|
246
|
-
y:
|
|
247
|
-
} =
|
|
248
|
-
for (let
|
|
246
|
+
y: d
|
|
247
|
+
} = ze(a, n, c), m = n, f = {}, g = 0;
|
|
248
|
+
for (let x = 0; x < l.length; x++) {
|
|
249
249
|
const {
|
|
250
250
|
name: w,
|
|
251
|
-
fn:
|
|
252
|
-
} = l[
|
|
253
|
-
x,
|
|
251
|
+
fn: h
|
|
252
|
+
} = l[x], {
|
|
253
|
+
x: p,
|
|
254
254
|
y: v,
|
|
255
255
|
data: E,
|
|
256
256
|
reset: y
|
|
257
|
-
} = await
|
|
257
|
+
} = await h({
|
|
258
258
|
x: u,
|
|
259
|
-
y:
|
|
259
|
+
y: d,
|
|
260
260
|
initialPlacement: n,
|
|
261
|
-
placement:
|
|
261
|
+
placement: m,
|
|
262
262
|
strategy: s,
|
|
263
|
-
middlewareData:
|
|
263
|
+
middlewareData: f,
|
|
264
264
|
rects: a,
|
|
265
265
|
platform: r,
|
|
266
266
|
elements: {
|
|
@@ -268,27 +268,27 @@ const xt = async (e, o, t) => {
|
|
|
268
268
|
floating: o
|
|
269
269
|
}
|
|
270
270
|
});
|
|
271
|
-
u =
|
|
272
|
-
...
|
|
271
|
+
u = p ?? u, d = v ?? d, f = {
|
|
272
|
+
...f,
|
|
273
273
|
[w]: {
|
|
274
|
-
...
|
|
274
|
+
...f[w],
|
|
275
275
|
...E
|
|
276
276
|
}
|
|
277
|
-
}, y &&
|
|
277
|
+
}, y && g <= 50 && (g++, typeof y == "object" && (y.placement && (m = y.placement), y.rects && (a = y.rects === !0 ? await r.getElementRects({
|
|
278
278
|
reference: e,
|
|
279
279
|
floating: o,
|
|
280
280
|
strategy: s
|
|
281
281
|
}) : y.rects), {
|
|
282
282
|
x: u,
|
|
283
|
-
y:
|
|
284
|
-
} =
|
|
283
|
+
y: d
|
|
284
|
+
} = ze(a, m, c)), x = -1);
|
|
285
285
|
}
|
|
286
286
|
return {
|
|
287
287
|
x: u,
|
|
288
|
-
y:
|
|
289
|
-
placement:
|
|
288
|
+
y: d,
|
|
289
|
+
placement: m,
|
|
290
290
|
strategy: s,
|
|
291
|
-
middlewareData:
|
|
291
|
+
middlewareData: f
|
|
292
292
|
};
|
|
293
293
|
};
|
|
294
294
|
async function He(e, o) {
|
|
@@ -304,15 +304,15 @@ async function He(e, o) {
|
|
|
304
304
|
} = e, {
|
|
305
305
|
boundary: a = "clippingAncestors",
|
|
306
306
|
rootBoundary: u = "viewport",
|
|
307
|
-
elementContext:
|
|
308
|
-
altBoundary:
|
|
309
|
-
padding:
|
|
310
|
-
} = he(o, e),
|
|
307
|
+
elementContext: d = "floating",
|
|
308
|
+
altBoundary: m = !1,
|
|
309
|
+
padding: f = 0
|
|
310
|
+
} = he(o, e), g = pt(f), w = l[m ? d === "floating" ? "reference" : "floating" : d], h = ue(await i.getClippingRect({
|
|
311
311
|
element: (t = await (i.isElement == null ? void 0 : i.isElement(w))) == null || t ? w : w.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(l.floating)),
|
|
312
312
|
boundary: a,
|
|
313
313
|
rootBoundary: u,
|
|
314
314
|
strategy: c
|
|
315
|
-
})),
|
|
315
|
+
})), p = d === "floating" ? {
|
|
316
316
|
x: n,
|
|
317
317
|
y: s,
|
|
318
318
|
width: r.floating.width,
|
|
@@ -325,15 +325,15 @@ async function He(e, o) {
|
|
|
325
325
|
y: 1
|
|
326
326
|
}, y = ue(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
327
327
|
elements: l,
|
|
328
|
-
rect:
|
|
328
|
+
rect: p,
|
|
329
329
|
offsetParent: v,
|
|
330
330
|
strategy: c
|
|
331
|
-
}) :
|
|
331
|
+
}) : p);
|
|
332
332
|
return {
|
|
333
|
-
top: (
|
|
334
|
-
bottom: (y.bottom -
|
|
335
|
-
left: (
|
|
336
|
-
right: (y.right -
|
|
333
|
+
top: (h.top - y.top + g.top) / E.y,
|
|
334
|
+
bottom: (y.bottom - h.bottom + g.bottom) / E.y,
|
|
335
|
+
left: (h.left - y.left + g.left) / E.x,
|
|
336
|
+
right: (y.right - h.right + g.right) / E.x
|
|
337
337
|
};
|
|
338
338
|
}
|
|
339
339
|
const wt = function(e) {
|
|
@@ -351,20 +351,20 @@ const wt = function(e) {
|
|
|
351
351
|
elements: a
|
|
352
352
|
} = o, {
|
|
353
353
|
mainAxis: u = !0,
|
|
354
|
-
crossAxis:
|
|
355
|
-
fallbackPlacements:
|
|
356
|
-
fallbackStrategy:
|
|
357
|
-
fallbackAxisSideDirection:
|
|
358
|
-
flipAlignment:
|
|
354
|
+
crossAxis: d = !0,
|
|
355
|
+
fallbackPlacements: m,
|
|
356
|
+
fallbackStrategy: f = "bestFit",
|
|
357
|
+
fallbackAxisSideDirection: g = "none",
|
|
358
|
+
flipAlignment: x = !0,
|
|
359
359
|
...w
|
|
360
360
|
} = he(e, o);
|
|
361
361
|
if ((t = i.arrow) != null && t.alignmentOffset)
|
|
362
362
|
return {};
|
|
363
|
-
const
|
|
364
|
-
!
|
|
365
|
-
const
|
|
363
|
+
const h = U(s), p = G(l), v = U(l) === l, E = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), y = m || (v || !x ? [ae(l)] : dt(l)), O = g !== "none";
|
|
364
|
+
!m && O && y.push(...mt(l, x, g, E));
|
|
365
|
+
const R = [l, ...y], z = await He(o, w), Y = [];
|
|
366
366
|
let F = ((n = i.flip) == null ? void 0 : n.overflows) || [];
|
|
367
|
-
if (u && Y.push(z[
|
|
367
|
+
if (u && Y.push(z[h]), d) {
|
|
368
368
|
const I = ft(s, r, E);
|
|
369
369
|
Y.push(z[I[0]], z[I[1]]);
|
|
370
370
|
}
|
|
@@ -373,7 +373,7 @@ const wt = function(e) {
|
|
|
373
373
|
overflows: Y
|
|
374
374
|
}], !Y.every((I) => I <= 0)) {
|
|
375
375
|
var q, ee;
|
|
376
|
-
const I = (((q = i.flip) == null ? void 0 : q.index) || 0) + 1, te =
|
|
376
|
+
const I = (((q = i.flip) == null ? void 0 : q.index) || 0) + 1, te = R[I];
|
|
377
377
|
if (te)
|
|
378
378
|
return {
|
|
379
379
|
data: {
|
|
@@ -384,31 +384,31 @@ const wt = function(e) {
|
|
|
384
384
|
placement: te
|
|
385
385
|
}
|
|
386
386
|
};
|
|
387
|
-
let
|
|
388
|
-
if (!
|
|
389
|
-
switch (
|
|
387
|
+
let M = (ee = F.filter((V) => V.overflows[0] <= 0).sort((V, S) => V.overflows[1] - S.overflows[1])[0]) == null ? void 0 : ee.placement;
|
|
388
|
+
if (!M)
|
|
389
|
+
switch (f) {
|
|
390
390
|
case "bestFit": {
|
|
391
391
|
var B;
|
|
392
392
|
const V = (B = F.filter((S) => {
|
|
393
393
|
if (O) {
|
|
394
|
-
const
|
|
395
|
-
return
|
|
394
|
+
const T = G(S.placement);
|
|
395
|
+
return T === p || // Create a bias to the `y` side axis due to horizontal
|
|
396
396
|
// reading directions favoring greater width.
|
|
397
|
-
|
|
397
|
+
T === "y";
|
|
398
398
|
}
|
|
399
399
|
return !0;
|
|
400
|
-
}).map((S) => [S.placement, S.overflows.filter((
|
|
401
|
-
V && (
|
|
400
|
+
}).map((S) => [S.placement, S.overflows.filter((T) => T > 0).reduce((T, j) => T + j, 0)]).sort((S, T) => S[1] - T[1])[0]) == null ? void 0 : B[0];
|
|
401
|
+
V && (M = V);
|
|
402
402
|
break;
|
|
403
403
|
}
|
|
404
404
|
case "initialPlacement":
|
|
405
|
-
|
|
405
|
+
M = l;
|
|
406
406
|
break;
|
|
407
407
|
}
|
|
408
|
-
if (s !==
|
|
408
|
+
if (s !== M)
|
|
409
409
|
return {
|
|
410
410
|
reset: {
|
|
411
|
-
placement:
|
|
411
|
+
placement: M
|
|
412
412
|
}
|
|
413
413
|
};
|
|
414
414
|
}
|
|
@@ -421,26 +421,26 @@ async function yt(e, o) {
|
|
|
421
421
|
placement: t,
|
|
422
422
|
platform: n,
|
|
423
423
|
elements: s
|
|
424
|
-
} = e, i = await (n.isRTL == null ? void 0 : n.isRTL(s.floating)), r = U(t), l = me(t), c = G(t) === "y", a = ["left", "top"].includes(r) ? -1 : 1, u = i && c ? -1 : 1,
|
|
424
|
+
} = e, i = await (n.isRTL == null ? void 0 : n.isRTL(s.floating)), r = U(t), l = me(t), c = G(t) === "y", a = ["left", "top"].includes(r) ? -1 : 1, u = i && c ? -1 : 1, d = he(o, e);
|
|
425
425
|
let {
|
|
426
|
-
mainAxis:
|
|
427
|
-
crossAxis:
|
|
428
|
-
alignmentAxis:
|
|
429
|
-
} = typeof
|
|
430
|
-
mainAxis:
|
|
426
|
+
mainAxis: m,
|
|
427
|
+
crossAxis: f,
|
|
428
|
+
alignmentAxis: g
|
|
429
|
+
} = typeof d == "number" ? {
|
|
430
|
+
mainAxis: d,
|
|
431
431
|
crossAxis: 0,
|
|
432
432
|
alignmentAxis: null
|
|
433
433
|
} : {
|
|
434
|
-
mainAxis:
|
|
435
|
-
crossAxis:
|
|
436
|
-
alignmentAxis:
|
|
434
|
+
mainAxis: d.mainAxis || 0,
|
|
435
|
+
crossAxis: d.crossAxis || 0,
|
|
436
|
+
alignmentAxis: d.alignmentAxis
|
|
437
437
|
};
|
|
438
|
-
return l && typeof
|
|
439
|
-
x:
|
|
440
|
-
y:
|
|
438
|
+
return l && typeof g == "number" && (f = l === "end" ? g * -1 : g), c ? {
|
|
439
|
+
x: f * u,
|
|
440
|
+
y: m * a
|
|
441
441
|
} : {
|
|
442
|
-
x:
|
|
443
|
-
y:
|
|
442
|
+
x: m * a,
|
|
443
|
+
y: f * u
|
|
444
444
|
};
|
|
445
445
|
}
|
|
446
446
|
const bt = function(e) {
|
|
@@ -480,12 +480,12 @@ const bt = function(e) {
|
|
|
480
480
|
limiter: l = {
|
|
481
481
|
fn: (w) => {
|
|
482
482
|
let {
|
|
483
|
-
x:
|
|
484
|
-
y:
|
|
483
|
+
x: h,
|
|
484
|
+
y: p
|
|
485
485
|
} = w;
|
|
486
486
|
return {
|
|
487
|
-
x:
|
|
488
|
-
y:
|
|
487
|
+
x: h,
|
|
488
|
+
y: p
|
|
489
489
|
};
|
|
490
490
|
}
|
|
491
491
|
},
|
|
@@ -493,29 +493,29 @@ const bt = function(e) {
|
|
|
493
493
|
} = he(e, o), a = {
|
|
494
494
|
x: t,
|
|
495
495
|
y: n
|
|
496
|
-
}, u = await He(o, c),
|
|
497
|
-
let
|
|
496
|
+
}, u = await He(o, c), d = G(U(s)), m = Be(d);
|
|
497
|
+
let f = a[m], g = a[d];
|
|
498
498
|
if (i) {
|
|
499
|
-
const w =
|
|
500
|
-
|
|
499
|
+
const w = m === "y" ? "top" : "left", h = m === "y" ? "bottom" : "right", p = f + u[w], v = f - u[h];
|
|
500
|
+
f = Ae(p, f, v);
|
|
501
501
|
}
|
|
502
502
|
if (r) {
|
|
503
|
-
const w =
|
|
504
|
-
|
|
503
|
+
const w = d === "y" ? "top" : "left", h = d === "y" ? "bottom" : "right", p = g + u[w], v = g - u[h];
|
|
504
|
+
g = Ae(p, g, v);
|
|
505
505
|
}
|
|
506
|
-
const
|
|
506
|
+
const x = l.fn({
|
|
507
507
|
...o,
|
|
508
|
-
[
|
|
509
|
-
[
|
|
508
|
+
[m]: f,
|
|
509
|
+
[d]: g
|
|
510
510
|
});
|
|
511
511
|
return {
|
|
512
|
-
...
|
|
512
|
+
...x,
|
|
513
513
|
data: {
|
|
514
|
-
x:
|
|
515
|
-
y:
|
|
514
|
+
x: x.x - t,
|
|
515
|
+
y: x.y - n,
|
|
516
516
|
enabled: {
|
|
517
|
-
[
|
|
518
|
-
[
|
|
517
|
+
[m]: i,
|
|
518
|
+
[d]: r
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
521
|
};
|
|
@@ -528,7 +528,7 @@ function ge() {
|
|
|
528
528
|
function Q(e) {
|
|
529
529
|
return Ue(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function A(e) {
|
|
532
532
|
var o;
|
|
533
533
|
return (e == null || (o = e.ownerDocument) == null ? void 0 : o.defaultView) || window;
|
|
534
534
|
}
|
|
@@ -537,16 +537,16 @@ function P(e) {
|
|
|
537
537
|
return (o = (Ue(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : o.documentElement;
|
|
538
538
|
}
|
|
539
539
|
function Ue(e) {
|
|
540
|
-
return ge() ? e instanceof Node || e instanceof
|
|
540
|
+
return ge() ? e instanceof Node || e instanceof A(e).Node : !1;
|
|
541
541
|
}
|
|
542
542
|
function N(e) {
|
|
543
|
-
return ge() ? e instanceof Element || e instanceof
|
|
543
|
+
return ge() ? e instanceof Element || e instanceof A(e).Element : !1;
|
|
544
544
|
}
|
|
545
545
|
function D(e) {
|
|
546
|
-
return ge() ? e instanceof HTMLElement || e instanceof
|
|
546
|
+
return ge() ? e instanceof HTMLElement || e instanceof A(e).HTMLElement : !1;
|
|
547
547
|
}
|
|
548
|
-
function
|
|
549
|
-
return !ge() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof
|
|
548
|
+
function Ie(e) {
|
|
549
|
+
return !ge() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof A(e).ShadowRoot;
|
|
550
550
|
}
|
|
551
551
|
function oe(e) {
|
|
552
552
|
const {
|
|
@@ -569,14 +569,14 @@ function pe(e) {
|
|
|
569
569
|
}
|
|
570
570
|
});
|
|
571
571
|
}
|
|
572
|
-
function
|
|
573
|
-
const o =
|
|
572
|
+
function Oe(e) {
|
|
573
|
+
const o = Re(), t = N(e) ? L(e) : e;
|
|
574
574
|
return t.transform !== "none" || t.perspective !== "none" || (t.containerType ? t.containerType !== "normal" : !1) || !o && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !o && (t.filter ? t.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((n) => (t.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (t.contain || "").includes(n));
|
|
575
575
|
}
|
|
576
576
|
function St(e) {
|
|
577
577
|
let o = $(e);
|
|
578
578
|
for (; D(o) && !J(o); ) {
|
|
579
|
-
if (
|
|
579
|
+
if (Oe(o))
|
|
580
580
|
return o;
|
|
581
581
|
if (pe(o))
|
|
582
582
|
return null;
|
|
@@ -584,14 +584,14 @@ function St(e) {
|
|
|
584
584
|
}
|
|
585
585
|
return null;
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function Re() {
|
|
588
588
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
589
589
|
}
|
|
590
590
|
function J(e) {
|
|
591
591
|
return ["html", "body", "#document"].includes(Q(e));
|
|
592
592
|
}
|
|
593
593
|
function L(e) {
|
|
594
|
-
return
|
|
594
|
+
return A(e).getComputedStyle(e);
|
|
595
595
|
}
|
|
596
596
|
function xe(e) {
|
|
597
597
|
return N(e) ? {
|
|
@@ -609,10 +609,10 @@ function $(e) {
|
|
|
609
609
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
610
610
|
e.assignedSlot || // DOM Element detected.
|
|
611
611
|
e.parentNode || // ShadowRoot detected.
|
|
612
|
-
|
|
612
|
+
Ie(e) && e.host || // Fallback.
|
|
613
613
|
P(e)
|
|
614
614
|
);
|
|
615
|
-
return
|
|
615
|
+
return Ie(o) ? o.host : o;
|
|
616
616
|
}
|
|
617
617
|
function Ke(e) {
|
|
618
618
|
const o = $(e);
|
|
@@ -621,14 +621,14 @@ function Ke(e) {
|
|
|
621
621
|
function ne(e, o, t) {
|
|
622
622
|
var n;
|
|
623
623
|
o === void 0 && (o = []), t === void 0 && (t = !0);
|
|
624
|
-
const s = Ke(e), i = s === ((n = e.ownerDocument) == null ? void 0 : n.body), r =
|
|
624
|
+
const s = Ke(e), i = s === ((n = e.ownerDocument) == null ? void 0 : n.body), r = A(s);
|
|
625
625
|
if (i) {
|
|
626
|
-
const l =
|
|
626
|
+
const l = Ce(r);
|
|
627
627
|
return o.concat(r, r.visualViewport || [], oe(s) ? s : [], l && t ? ne(l) : []);
|
|
628
628
|
}
|
|
629
629
|
return o.concat(s, ne(s, [], t));
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function Ce(e) {
|
|
632
632
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
633
633
|
}
|
|
634
634
|
function Ye(e) {
|
|
@@ -641,11 +641,11 @@ function Ye(e) {
|
|
|
641
641
|
$: l
|
|
642
642
|
};
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function ke(e) {
|
|
645
645
|
return N(e) ? e : e.contextElement;
|
|
646
646
|
}
|
|
647
647
|
function Z(e) {
|
|
648
|
-
const o =
|
|
648
|
+
const o = ke(e);
|
|
649
649
|
if (!D(o))
|
|
650
650
|
return _(1);
|
|
651
651
|
const t = o.getBoundingClientRect(), {
|
|
@@ -661,38 +661,38 @@ function Z(e) {
|
|
|
661
661
|
}
|
|
662
662
|
const Ct = /* @__PURE__ */ _(0);
|
|
663
663
|
function qe(e) {
|
|
664
|
-
const o =
|
|
665
|
-
return !
|
|
664
|
+
const o = A(e);
|
|
665
|
+
return !Re() || !o.visualViewport ? Ct : {
|
|
666
666
|
x: o.visualViewport.offsetLeft,
|
|
667
667
|
y: o.visualViewport.offsetTop
|
|
668
668
|
};
|
|
669
669
|
}
|
|
670
670
|
function Ot(e, o, t) {
|
|
671
|
-
return o === void 0 && (o = !1), !t || o && t !==
|
|
671
|
+
return o === void 0 && (o = !1), !t || o && t !== A(e) ? !1 : o;
|
|
672
672
|
}
|
|
673
673
|
function K(e, o, t, n) {
|
|
674
674
|
o === void 0 && (o = !1), t === void 0 && (t = !1);
|
|
675
|
-
const s = e.getBoundingClientRect(), i =
|
|
675
|
+
const s = e.getBoundingClientRect(), i = ke(e);
|
|
676
676
|
let r = _(1);
|
|
677
677
|
o && (n ? N(n) && (r = Z(n)) : r = Z(e));
|
|
678
678
|
const l = Ot(i, t, n) ? qe(i) : _(0);
|
|
679
|
-
let c = (s.left + l.x) / r.x, a = (s.top + l.y) / r.y, u = s.width / r.x,
|
|
679
|
+
let c = (s.left + l.x) / r.x, a = (s.top + l.y) / r.y, u = s.width / r.x, d = s.height / r.y;
|
|
680
680
|
if (i) {
|
|
681
|
-
const
|
|
682
|
-
let
|
|
683
|
-
for (;
|
|
684
|
-
const w = Z(
|
|
685
|
-
c *= w.x, a *= w.y, u *= w.x,
|
|
681
|
+
const m = A(i), f = n && N(n) ? A(n) : n;
|
|
682
|
+
let g = m, x = Ce(g);
|
|
683
|
+
for (; x && n && f !== g; ) {
|
|
684
|
+
const w = Z(x), h = x.getBoundingClientRect(), p = L(x), v = h.left + (x.clientLeft + parseFloat(p.paddingLeft)) * w.x, E = h.top + (x.clientTop + parseFloat(p.paddingTop)) * w.y;
|
|
685
|
+
c *= w.x, a *= w.y, u *= w.x, d *= w.y, c += v, a += E, g = A(x), x = Ce(g);
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
688
|
return ue({
|
|
689
689
|
width: u,
|
|
690
|
-
height:
|
|
690
|
+
height: d,
|
|
691
691
|
x: c,
|
|
692
692
|
y: a
|
|
693
693
|
});
|
|
694
694
|
}
|
|
695
|
-
function
|
|
695
|
+
function Me(e, o) {
|
|
696
696
|
const t = xe(e).scrollLeft;
|
|
697
697
|
return o ? o.left + t : K(P(e)).left + t;
|
|
698
698
|
}
|
|
@@ -700,7 +700,7 @@ function Xe(e, o, t) {
|
|
|
700
700
|
t === void 0 && (t = !1);
|
|
701
701
|
const n = e.getBoundingClientRect(), s = n.left + o.scrollLeft - (t ? 0 : (
|
|
702
702
|
// RTL <body> scrollbar.
|
|
703
|
-
|
|
703
|
+
Me(e, n)
|
|
704
704
|
)), i = n.top + o.scrollTop;
|
|
705
705
|
return {
|
|
706
706
|
x: s,
|
|
@@ -721,17 +721,17 @@ function Rt(e) {
|
|
|
721
721
|
scrollLeft: 0,
|
|
722
722
|
scrollTop: 0
|
|
723
723
|
}, a = _(1);
|
|
724
|
-
const u = _(0),
|
|
725
|
-
if ((
|
|
726
|
-
const
|
|
727
|
-
a = Z(n), u.x =
|
|
724
|
+
const u = _(0), d = D(n);
|
|
725
|
+
if ((d || !d && !i) && ((Q(n) !== "body" || oe(r)) && (c = xe(n)), D(n))) {
|
|
726
|
+
const f = K(n);
|
|
727
|
+
a = Z(n), u.x = f.x + n.clientLeft, u.y = f.y + n.clientTop;
|
|
728
728
|
}
|
|
729
|
-
const
|
|
729
|
+
const m = r && !d && !i ? Xe(r, c, !0) : _(0);
|
|
730
730
|
return {
|
|
731
731
|
width: t.width * a.x,
|
|
732
732
|
height: t.height * a.y,
|
|
733
|
-
x: t.x * a.x - c.scrollLeft * a.x + u.x +
|
|
734
|
-
y: t.y * a.y - c.scrollTop * a.y + u.y +
|
|
733
|
+
x: t.x * a.x - c.scrollLeft * a.x + u.x + m.x,
|
|
734
|
+
y: t.y * a.y - c.scrollTop * a.y + u.y + m.y
|
|
735
735
|
};
|
|
736
736
|
}
|
|
737
737
|
function kt(e) {
|
|
@@ -739,7 +739,7 @@ function kt(e) {
|
|
|
739
739
|
}
|
|
740
740
|
function Mt(e) {
|
|
741
741
|
const o = P(e), t = xe(e), n = e.ownerDocument.body, s = H(o.scrollWidth, o.clientWidth, n.scrollWidth, n.clientWidth), i = H(o.scrollHeight, o.clientHeight, n.scrollHeight, n.clientHeight);
|
|
742
|
-
let r = -t.scrollLeft +
|
|
742
|
+
let r = -t.scrollLeft + Me(e);
|
|
743
743
|
const l = -t.scrollTop;
|
|
744
744
|
return L(n).direction === "rtl" && (r += H(o.clientWidth, n.clientWidth) - s), {
|
|
745
745
|
width: s,
|
|
@@ -749,11 +749,11 @@ function Mt(e) {
|
|
|
749
749
|
};
|
|
750
750
|
}
|
|
751
751
|
function Tt(e, o) {
|
|
752
|
-
const t =
|
|
752
|
+
const t = A(e), n = P(e), s = t.visualViewport;
|
|
753
753
|
let i = n.clientWidth, r = n.clientHeight, l = 0, c = 0;
|
|
754
754
|
if (s) {
|
|
755
755
|
i = s.width, r = s.height;
|
|
756
|
-
const a =
|
|
756
|
+
const a = Re();
|
|
757
757
|
(!a || a && o === "fixed") && (l = s.offsetLeft, c = s.offsetTop);
|
|
758
758
|
}
|
|
759
759
|
return {
|
|
@@ -772,7 +772,7 @@ function At(e, o) {
|
|
|
772
772
|
y: a
|
|
773
773
|
};
|
|
774
774
|
}
|
|
775
|
-
function
|
|
775
|
+
function Ne(e, o, t) {
|
|
776
776
|
let n;
|
|
777
777
|
if (o === "viewport")
|
|
778
778
|
n = Tt(e, t);
|
|
@@ -803,7 +803,7 @@ function zt(e, o) {
|
|
|
803
803
|
const i = L(e).position === "fixed";
|
|
804
804
|
let r = i ? $(e) : e;
|
|
805
805
|
for (; N(r) && !J(r); ) {
|
|
806
|
-
const l = L(r), c =
|
|
806
|
+
const l = L(r), c = Oe(r);
|
|
807
807
|
!c && l.position === "fixed" && (s = null), (i ? !c && !s : !c && l.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || oe(r) && !c && Ze(e, r)) ? n = n.filter((u) => u !== r) : s = l, r = $(r);
|
|
808
808
|
}
|
|
809
809
|
return o.set(e, n), n;
|
|
@@ -816,9 +816,9 @@ function It(e) {
|
|
|
816
816
|
strategy: s
|
|
817
817
|
} = e;
|
|
818
818
|
const r = [...t === "clippingAncestors" ? pe(o) ? [] : zt(o, this._c) : [].concat(t), n], l = r[0], c = r.reduce((a, u) => {
|
|
819
|
-
const
|
|
820
|
-
return a.top = H(
|
|
821
|
-
},
|
|
819
|
+
const d = Ne(o, u, s);
|
|
820
|
+
return a.top = H(d.top, a.top), a.right = le(d.right, a.right), a.bottom = le(d.bottom, a.bottom), a.left = H(d.left, a.left), a;
|
|
821
|
+
}, Ne(o, l, s));
|
|
822
822
|
return {
|
|
823
823
|
width: c.right - c.left,
|
|
824
824
|
height: c.bottom - c.top,
|
|
@@ -845,13 +845,13 @@ function Lt(e, o, t) {
|
|
|
845
845
|
const c = _(0);
|
|
846
846
|
if (n || !n && !i)
|
|
847
847
|
if ((Q(o) !== "body" || oe(s)) && (l = xe(o)), n) {
|
|
848
|
-
const
|
|
849
|
-
c.x =
|
|
850
|
-
} else s && (c.x =
|
|
851
|
-
const a = s && !n && !i ? Xe(s, l) : _(0), u = r.left + l.scrollLeft - c.x - a.x,
|
|
848
|
+
const m = K(o, !0, i, o);
|
|
849
|
+
c.x = m.x + o.clientLeft, c.y = m.y + o.clientTop;
|
|
850
|
+
} else s && (c.x = Me(s));
|
|
851
|
+
const a = s && !n && !i ? Xe(s, l) : _(0), u = r.left + l.scrollLeft - c.x - a.x, d = r.top + l.scrollTop - c.y - a.y;
|
|
852
852
|
return {
|
|
853
853
|
x: u,
|
|
854
|
-
y:
|
|
854
|
+
y: d,
|
|
855
855
|
width: r.width,
|
|
856
856
|
height: r.height
|
|
857
857
|
};
|
|
@@ -859,7 +859,7 @@ function Lt(e, o, t) {
|
|
|
859
859
|
function we(e) {
|
|
860
860
|
return L(e).position === "static";
|
|
861
861
|
}
|
|
862
|
-
function
|
|
862
|
+
function Le(e, o) {
|
|
863
863
|
if (!D(e) || L(e).position === "fixed")
|
|
864
864
|
return null;
|
|
865
865
|
if (o)
|
|
@@ -868,7 +868,7 @@ function Ne(e, o) {
|
|
|
868
868
|
return P(e) === t && (t = t.ownerDocument.body), t;
|
|
869
869
|
}
|
|
870
870
|
function Ge(e, o) {
|
|
871
|
-
const t =
|
|
871
|
+
const t = A(e);
|
|
872
872
|
if (pe(e))
|
|
873
873
|
return t;
|
|
874
874
|
if (!D(e)) {
|
|
@@ -880,10 +880,10 @@ function Ge(e, o) {
|
|
|
880
880
|
}
|
|
881
881
|
return t;
|
|
882
882
|
}
|
|
883
|
-
let n =
|
|
883
|
+
let n = Le(e, o);
|
|
884
884
|
for (; n && Et(n) && we(n); )
|
|
885
|
-
n =
|
|
886
|
-
return n && J(n) && we(n) && !
|
|
885
|
+
n = Le(n, o);
|
|
886
|
+
return n && J(n) && we(n) && !Oe(n) ? t : n || St(e) || t;
|
|
887
887
|
}
|
|
888
888
|
const _t = async function(e) {
|
|
889
889
|
const o = this.getOffsetParent || Ge, t = this.getDimensions, n = await t(e.floating);
|
|
@@ -924,13 +924,13 @@ function Ft(e, o) {
|
|
|
924
924
|
const {
|
|
925
925
|
left: a,
|
|
926
926
|
top: u,
|
|
927
|
-
width:
|
|
928
|
-
height:
|
|
927
|
+
width: d,
|
|
928
|
+
height: m
|
|
929
929
|
} = e.getBoundingClientRect();
|
|
930
|
-
if (l || o(), !
|
|
930
|
+
if (l || o(), !d || !m)
|
|
931
931
|
return;
|
|
932
|
-
const
|
|
933
|
-
rootMargin: -
|
|
932
|
+
const f = se(u), g = se(s.clientWidth - (a + d)), x = se(s.clientHeight - (u + m)), w = se(a), p = {
|
|
933
|
+
rootMargin: -f + "px " + -g + "px " + -x + "px " + -w + "px",
|
|
934
934
|
threshold: H(0, le(1, c)) || 1
|
|
935
935
|
};
|
|
936
936
|
let v = !0;
|
|
@@ -947,12 +947,12 @@ function Ft(e, o) {
|
|
|
947
947
|
}
|
|
948
948
|
try {
|
|
949
949
|
t = new IntersectionObserver(E, {
|
|
950
|
-
...
|
|
950
|
+
...p,
|
|
951
951
|
// Handle <iframe>s
|
|
952
952
|
root: s.ownerDocument
|
|
953
953
|
});
|
|
954
954
|
} catch {
|
|
955
|
-
t = new IntersectionObserver(E,
|
|
955
|
+
t = new IntersectionObserver(E, p);
|
|
956
956
|
}
|
|
957
957
|
t.observe(e);
|
|
958
958
|
}
|
|
@@ -966,32 +966,32 @@ function Vt(e, o, t, n) {
|
|
|
966
966
|
elementResize: r = typeof ResizeObserver == "function",
|
|
967
967
|
layoutShift: l = typeof IntersectionObserver == "function",
|
|
968
968
|
animationFrame: c = !1
|
|
969
|
-
} = n, a =
|
|
970
|
-
u.forEach((
|
|
971
|
-
s &&
|
|
969
|
+
} = n, a = ke(e), u = s || i ? [...a ? ne(a) : [], ...ne(o)] : [];
|
|
970
|
+
u.forEach((h) => {
|
|
971
|
+
s && h.addEventListener("scroll", t, {
|
|
972
972
|
passive: !0
|
|
973
|
-
}), i &&
|
|
973
|
+
}), i && h.addEventListener("resize", t);
|
|
974
974
|
});
|
|
975
|
-
const
|
|
976
|
-
let
|
|
977
|
-
r && (
|
|
978
|
-
let [
|
|
979
|
-
|
|
975
|
+
const d = a && l ? Ft(a, t) : null;
|
|
976
|
+
let m = -1, f = null;
|
|
977
|
+
r && (f = new ResizeObserver((h) => {
|
|
978
|
+
let [p] = h;
|
|
979
|
+
p && p.target === a && f && (f.unobserve(o), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
980
980
|
var v;
|
|
981
|
-
(v =
|
|
981
|
+
(v = f) == null || v.observe(o);
|
|
982
982
|
})), t();
|
|
983
|
-
}), a && !c &&
|
|
984
|
-
let
|
|
983
|
+
}), a && !c && f.observe(a), f.observe(o));
|
|
984
|
+
let g, x = c ? K(e) : null;
|
|
985
985
|
c && w();
|
|
986
986
|
function w() {
|
|
987
|
-
const
|
|
988
|
-
|
|
987
|
+
const h = K(e);
|
|
988
|
+
x && (h.x !== x.x || h.y !== x.y || h.width !== x.width || h.height !== x.height) && t(), x = h, g = requestAnimationFrame(w);
|
|
989
989
|
}
|
|
990
990
|
return t(), () => {
|
|
991
|
-
var
|
|
992
|
-
u.forEach((
|
|
993
|
-
s &&
|
|
994
|
-
}),
|
|
991
|
+
var h;
|
|
992
|
+
u.forEach((p) => {
|
|
993
|
+
s && p.removeEventListener("scroll", t), i && p.removeEventListener("resize", t);
|
|
994
|
+
}), d == null || d(), (h = f) == null || h.disconnect(), f = null, c && cancelAnimationFrame(g);
|
|
995
995
|
};
|
|
996
996
|
}
|
|
997
997
|
const Wt = bt, Bt = vt, jt = wt, $t = (e, o, t) => {
|
|
@@ -1041,7 +1041,7 @@ function fe(e, o) {
|
|
|
1041
1041
|
function Je(e) {
|
|
1042
1042
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1044
|
+
function _e(e, o) {
|
|
1045
1045
|
const t = Je(e);
|
|
1046
1046
|
return Math.round(o * t) / t;
|
|
1047
1047
|
}
|
|
@@ -1065,30 +1065,30 @@ function Ht(e) {
|
|
|
1065
1065
|
transform: l = !0,
|
|
1066
1066
|
whileElementsMounted: c,
|
|
1067
1067
|
open: a
|
|
1068
|
-
} = e, [u,
|
|
1068
|
+
} = e, [u, d] = C.useState({
|
|
1069
1069
|
x: 0,
|
|
1070
1070
|
y: 0,
|
|
1071
1071
|
strategy: t,
|
|
1072
1072
|
placement: o,
|
|
1073
1073
|
middlewareData: {},
|
|
1074
1074
|
isPositioned: !1
|
|
1075
|
-
}), [
|
|
1076
|
-
fe(
|
|
1077
|
-
const [
|
|
1078
|
-
S !== O.current && (O.current = S,
|
|
1075
|
+
}), [m, f] = C.useState(n);
|
|
1076
|
+
fe(m, n) || f(n);
|
|
1077
|
+
const [g, x] = C.useState(null), [w, h] = C.useState(null), p = C.useCallback((S) => {
|
|
1078
|
+
S !== O.current && (O.current = S, x(S));
|
|
1079
1079
|
}, []), v = C.useCallback((S) => {
|
|
1080
|
-
S !==
|
|
1081
|
-
}, []), E = i ||
|
|
1082
|
-
if (!O.current || !
|
|
1080
|
+
S !== R.current && (R.current = S, h(S));
|
|
1081
|
+
}, []), E = i || g, y = r || w, O = C.useRef(null), R = C.useRef(null), z = C.useRef(u), Y = c != null, F = ye(c), q = ye(s), ee = ye(a), B = C.useCallback(() => {
|
|
1082
|
+
if (!O.current || !R.current)
|
|
1083
1083
|
return;
|
|
1084
1084
|
const S = {
|
|
1085
1085
|
placement: o,
|
|
1086
1086
|
strategy: t,
|
|
1087
|
-
middleware:
|
|
1087
|
+
middleware: m
|
|
1088
1088
|
};
|
|
1089
|
-
q.current && (S.platform = q.current), $t(O.current,
|
|
1089
|
+
q.current && (S.platform = q.current), $t(O.current, R.current, S).then((T) => {
|
|
1090
1090
|
const j = {
|
|
1091
|
-
...
|
|
1091
|
+
...T,
|
|
1092
1092
|
// The floating element's position may be recomputed while it's closed
|
|
1093
1093
|
// but still mounted (such as when transitioning out). To ensure
|
|
1094
1094
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
@@ -1096,12 +1096,12 @@ function Ht(e) {
|
|
|
1096
1096
|
isPositioned: ee.current !== !1
|
|
1097
1097
|
};
|
|
1098
1098
|
I.current && !fe(z.current, j) && (z.current = j, ot.flushSync(() => {
|
|
1099
|
-
|
|
1099
|
+
d(j);
|
|
1100
1100
|
}));
|
|
1101
1101
|
});
|
|
1102
|
-
}, [
|
|
1102
|
+
}, [m, o, t, q, ee]);
|
|
1103
1103
|
ie(() => {
|
|
1104
|
-
a === !1 && z.current.isPositioned && (z.current.isPositioned = !1,
|
|
1104
|
+
a === !1 && z.current.isPositioned && (z.current.isPositioned = !1, d((S) => ({
|
|
1105
1105
|
...S,
|
|
1106
1106
|
isPositioned: !1
|
|
1107
1107
|
})));
|
|
@@ -1110,7 +1110,7 @@ function Ht(e) {
|
|
|
1110
1110
|
ie(() => (I.current = !0, () => {
|
|
1111
1111
|
I.current = !1;
|
|
1112
1112
|
}), []), ie(() => {
|
|
1113
|
-
if (E && (O.current = E), y && (
|
|
1113
|
+
if (E && (O.current = E), y && (R.current = y), E && y) {
|
|
1114
1114
|
if (F.current)
|
|
1115
1115
|
return F.current(E, y, B);
|
|
1116
1116
|
B();
|
|
@@ -1118,10 +1118,10 @@ function Ht(e) {
|
|
|
1118
1118
|
}, [E, y, B, F, Y]);
|
|
1119
1119
|
const te = C.useMemo(() => ({
|
|
1120
1120
|
reference: O,
|
|
1121
|
-
floating:
|
|
1122
|
-
setReference:
|
|
1121
|
+
floating: R,
|
|
1122
|
+
setReference: p,
|
|
1123
1123
|
setFloating: v
|
|
1124
|
-
}), [
|
|
1124
|
+
}), [p, v]), M = C.useMemo(() => ({
|
|
1125
1125
|
reference: E,
|
|
1126
1126
|
floating: y
|
|
1127
1127
|
}), [E, y]), V = C.useMemo(() => {
|
|
@@ -1130,28 +1130,28 @@ function Ht(e) {
|
|
|
1130
1130
|
left: 0,
|
|
1131
1131
|
top: 0
|
|
1132
1132
|
};
|
|
1133
|
-
if (!
|
|
1133
|
+
if (!M.floating)
|
|
1134
1134
|
return S;
|
|
1135
|
-
const
|
|
1135
|
+
const T = _e(M.floating, u.x), j = _e(M.floating, u.y);
|
|
1136
1136
|
return l ? {
|
|
1137
1137
|
...S,
|
|
1138
|
-
transform: "translate(" +
|
|
1139
|
-
...Je(
|
|
1138
|
+
transform: "translate(" + T + "px, " + j + "px)",
|
|
1139
|
+
...Je(M.floating) >= 1.5 && {
|
|
1140
1140
|
willChange: "transform"
|
|
1141
1141
|
}
|
|
1142
1142
|
} : {
|
|
1143
1143
|
position: t,
|
|
1144
|
-
left:
|
|
1144
|
+
left: T,
|
|
1145
1145
|
top: j
|
|
1146
1146
|
};
|
|
1147
|
-
}, [t, l,
|
|
1147
|
+
}, [t, l, M.floating, u.x, u.y]);
|
|
1148
1148
|
return C.useMemo(() => ({
|
|
1149
1149
|
...u,
|
|
1150
1150
|
update: B,
|
|
1151
1151
|
refs: te,
|
|
1152
|
-
elements:
|
|
1152
|
+
elements: M,
|
|
1153
1153
|
floatingStyles: V
|
|
1154
|
-
}), [u, B, te,
|
|
1154
|
+
}), [u, B, te, M, V]);
|
|
1155
1155
|
}
|
|
1156
1156
|
const Ut = (e, o) => ({
|
|
1157
1157
|
...Wt(e),
|
|
@@ -1187,52 +1187,56 @@ function Qe(e) {
|
|
|
1187
1187
|
disabled: c = !1,
|
|
1188
1188
|
show: a = !1,
|
|
1189
1189
|
setShow: u,
|
|
1190
|
-
role:
|
|
1191
|
-
|
|
1192
|
-
|
|
1190
|
+
role: d = "tooltip",
|
|
1191
|
+
style: m,
|
|
1192
|
+
...f
|
|
1193
|
+
} = e, [g, x] = de(a), w = () => u !== void 0 && a !== void 0 ? a : g, h = () => u !== void 0 && a !== void 0 ? u : x, { x: p, y: v, strategy: E, refs: y } = Ht({
|
|
1194
|
+
open: w(),
|
|
1193
1195
|
middleware: [Ut(4), Yt(), Kt()],
|
|
1194
1196
|
whileElementsMounted: Vt,
|
|
1195
1197
|
placement: t
|
|
1196
|
-
}),
|
|
1198
|
+
}), O = nt();
|
|
1197
1199
|
return re(
|
|
1198
|
-
qt(
|
|
1199
|
-
|
|
1200
|
+
qt(y.floating, (R) => {
|
|
1201
|
+
R && h()(!1);
|
|
1200
1202
|
}),
|
|
1201
1203
|
[]
|
|
1202
|
-
), /* @__PURE__ */ W(
|
|
1204
|
+
), /* @__PURE__ */ W(Fe, { children: [
|
|
1203
1205
|
/* @__PURE__ */ b(
|
|
1204
1206
|
"div",
|
|
1205
1207
|
{
|
|
1206
|
-
className: "z-auto
|
|
1207
|
-
id: `zen__popover-${
|
|
1208
|
-
ref:
|
|
1209
|
-
onClick: (
|
|
1208
|
+
className: "z-auto min-w-fit max-w-fit",
|
|
1209
|
+
id: `zen__popover-${O}`,
|
|
1210
|
+
ref: y.setReference,
|
|
1211
|
+
onClick: (R) => {
|
|
1210
1212
|
if (n === "click") {
|
|
1211
1213
|
if (c)
|
|
1212
1214
|
return;
|
|
1213
|
-
|
|
1215
|
+
w() ? (h()(!1), r == null || r()) : (h()(!0), l == null || l());
|
|
1214
1216
|
}
|
|
1215
|
-
|
|
1217
|
+
R.stopPropagation();
|
|
1216
1218
|
},
|
|
1217
|
-
role:
|
|
1219
|
+
role: d,
|
|
1218
1220
|
children: i
|
|
1219
1221
|
}
|
|
1220
1222
|
),
|
|
1221
|
-
|
|
1223
|
+
w() && st(
|
|
1222
1224
|
/* @__PURE__ */ b(
|
|
1223
1225
|
"div",
|
|
1224
1226
|
{
|
|
1225
|
-
|
|
1227
|
+
...f,
|
|
1228
|
+
onClick: (R) => R.stopPropagation(),
|
|
1226
1229
|
role: "tooltip",
|
|
1227
|
-
className:
|
|
1230
|
+
className: k(
|
|
1228
1231
|
"zen__popover z-50 w-fit rounded border border-border bg-background shadow-secondary",
|
|
1229
1232
|
o
|
|
1230
1233
|
),
|
|
1231
|
-
ref:
|
|
1234
|
+
ref: y.setFloating,
|
|
1232
1235
|
style: {
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
+
...m,
|
|
1237
|
+
position: E,
|
|
1238
|
+
top: v ?? 0,
|
|
1239
|
+
left: p ?? 0
|
|
1236
1240
|
},
|
|
1237
1241
|
children: s
|
|
1238
1242
|
}
|
|
@@ -1242,59 +1246,59 @@ function Qe(e) {
|
|
|
1242
1246
|
] });
|
|
1243
1247
|
}
|
|
1244
1248
|
function Xt(e) {
|
|
1245
|
-
var
|
|
1249
|
+
var x, w;
|
|
1246
1250
|
const {
|
|
1247
1251
|
items: o = [],
|
|
1248
1252
|
children: t,
|
|
1249
1253
|
moreItemsLabel: n = "",
|
|
1250
1254
|
parentRef: s,
|
|
1251
1255
|
data: i,
|
|
1252
|
-
estimator: r = (
|
|
1256
|
+
estimator: r = (h, p) => p + 30,
|
|
1253
1257
|
font: l = "12px Inter",
|
|
1254
1258
|
badgeVariant: c = "secondary",
|
|
1255
1259
|
badgeStyles: a
|
|
1256
|
-
} = e, [u,
|
|
1260
|
+
} = e, [u, d] = de({
|
|
1257
1261
|
visible: o,
|
|
1258
1262
|
hidden: []
|
|
1259
|
-
}),
|
|
1263
|
+
}), m = ve(() => {
|
|
1260
1264
|
if (typeof document > "u")
|
|
1261
1265
|
return null;
|
|
1262
|
-
const
|
|
1263
|
-
return
|
|
1264
|
-
}, []),
|
|
1265
|
-
const
|
|
1266
|
-
if (!
|
|
1266
|
+
const p = document.createElement("canvas").getContext("2d");
|
|
1267
|
+
return p && (p.font = l), p;
|
|
1268
|
+
}, []), f = () => {
|
|
1269
|
+
const h = s == null ? void 0 : s.current;
|
|
1270
|
+
if (!h)
|
|
1267
1271
|
return;
|
|
1268
|
-
const
|
|
1269
|
-
|
|
1272
|
+
const p = h.offsetWidth, v = [], E = [], y = r(n, m.measureText(n).width + 10);
|
|
1273
|
+
g == null || g.reduce((O, R, z) => (O + R + y > p - 20 ? E.push(o[z]) : v.push(o[z]), O + R), 0), d({
|
|
1270
1274
|
visible: v,
|
|
1271
1275
|
hidden: E
|
|
1272
1276
|
});
|
|
1273
|
-
},
|
|
1274
|
-
() => (o == null ? void 0 : o.map((
|
|
1277
|
+
}, g = ve(
|
|
1278
|
+
() => (o == null ? void 0 : o.map((h) => r(h, m.measureText(h).width))) ?? [],
|
|
1275
1279
|
[o]
|
|
1276
1280
|
);
|
|
1277
1281
|
return re(() => {
|
|
1278
|
-
|
|
1282
|
+
f();
|
|
1279
1283
|
}, [o]), re(() => {
|
|
1280
1284
|
if (!(s != null && s.current)) return;
|
|
1281
|
-
const
|
|
1282
|
-
|
|
1285
|
+
const h = new ResizeObserver(() => {
|
|
1286
|
+
f();
|
|
1283
1287
|
});
|
|
1284
|
-
return
|
|
1285
|
-
|
|
1288
|
+
return h.observe(s.current), () => {
|
|
1289
|
+
h.disconnect();
|
|
1286
1290
|
};
|
|
1287
|
-
}, [o]), /* @__PURE__ */ W(
|
|
1288
|
-
(
|
|
1291
|
+
}, [o]), /* @__PURE__ */ W(Fe, { children: [
|
|
1292
|
+
(x = u.visible) == null ? void 0 : x.map((h, p) => t(h, p, i == null ? void 0 : i[p])),
|
|
1289
1293
|
((w = u.hidden) == null ? void 0 : w.length) > 0 && /* @__PURE__ */ b(
|
|
1290
1294
|
Qe,
|
|
1291
1295
|
{
|
|
1292
1296
|
trigger: "click",
|
|
1293
1297
|
content: /* @__PURE__ */ b("div", { className: "grid max-h-60 grid-flow-row grid-cols-2 gap-3 overflow-auto p-2", children: u.hidden.map(
|
|
1294
|
-
(
|
|
1295
|
-
|
|
1296
|
-
u.visible.length +
|
|
1297
|
-
i == null ? void 0 : i[u.visible.length +
|
|
1298
|
+
(h, p) => t(
|
|
1299
|
+
h,
|
|
1300
|
+
u.visible.length + p,
|
|
1301
|
+
i == null ? void 0 : i[u.visible.length + p]
|
|
1298
1302
|
)
|
|
1299
1303
|
) }),
|
|
1300
1304
|
children: /* @__PURE__ */ b(We, { className: a, variant: c, children: /* @__PURE__ */ b("p", { children: `+${u.hidden.length} ${n}` }) }, "more_items_button")
|
|
@@ -1309,24 +1313,24 @@ function X(e, o, t) {
|
|
|
1309
1313
|
let a;
|
|
1310
1314
|
t.key && ((i = t.debug) != null && i.call(t)) && (a = Date.now());
|
|
1311
1315
|
const u = e();
|
|
1312
|
-
if (!(u.length !== n.length || u.some((
|
|
1316
|
+
if (!(u.length !== n.length || u.some((f, g) => n[g] !== f)))
|
|
1313
1317
|
return s;
|
|
1314
1318
|
n = u;
|
|
1315
|
-
let
|
|
1316
|
-
if (t.key && ((r = t.debug) != null && r.call(t)) && (
|
|
1317
|
-
const
|
|
1318
|
-
for (
|
|
1319
|
-
|
|
1320
|
-
return
|
|
1319
|
+
let m;
|
|
1320
|
+
if (t.key && ((r = t.debug) != null && r.call(t)) && (m = Date.now()), s = o(...u), t.key && ((l = t.debug) != null && l.call(t))) {
|
|
1321
|
+
const f = Math.round((Date.now() - a) * 100) / 100, g = Math.round((Date.now() - m) * 100) / 100, x = g / 16, w = (h, p) => {
|
|
1322
|
+
for (h = String(h); h.length < p; )
|
|
1323
|
+
h = " " + h;
|
|
1324
|
+
return h;
|
|
1321
1325
|
};
|
|
1322
1326
|
console.info(
|
|
1323
|
-
`%c⏱ ${w(
|
|
1327
|
+
`%c⏱ ${w(g, 5)} /${w(f, 5)} ms`,
|
|
1324
1328
|
`
|
|
1325
1329
|
font-size: .6rem;
|
|
1326
1330
|
font-weight: bold;
|
|
1327
1331
|
color: hsl(${Math.max(
|
|
1328
1332
|
0,
|
|
1329
|
-
Math.min(120 - 120 *
|
|
1333
|
+
Math.min(120 - 120 * x, 120)
|
|
1330
1334
|
)}deg 100% 31%);`,
|
|
1331
1335
|
t == null ? void 0 : t.key
|
|
1332
1336
|
);
|
|
@@ -1377,7 +1381,7 @@ const Zt = (e, o) => Math.abs(e - o) < 1, Gt = (e, o, t) => {
|
|
|
1377
1381
|
return i.observe(t, { box: "border-box" }), () => {
|
|
1378
1382
|
i.unobserve(t);
|
|
1379
1383
|
};
|
|
1380
|
-
},
|
|
1384
|
+
}, De = {
|
|
1381
1385
|
passive: !0
|
|
1382
1386
|
}, tn = typeof window > "u" ? !0 : "onscrollend" in window, nn = (e, o) => {
|
|
1383
1387
|
const t = e.scrollElement;
|
|
@@ -1395,10 +1399,10 @@ const Zt = (e, o) => Math.abs(e - o) < 1, Gt = (e, o, t) => {
|
|
|
1395
1399
|
},
|
|
1396
1400
|
e.options.isScrollingResetDelay
|
|
1397
1401
|
), r = (a) => () => {
|
|
1398
|
-
const { horizontal: u, isRtl:
|
|
1399
|
-
s = u ? t.scrollLeft * (
|
|
1402
|
+
const { horizontal: u, isRtl: d } = e.options;
|
|
1403
|
+
s = u ? t.scrollLeft * (d && -1 || 1) : t.scrollTop, i(), o(s, a);
|
|
1400
1404
|
}, l = r(!0), c = r(!1);
|
|
1401
|
-
return c(), t.addEventListener("scroll", l,
|
|
1405
|
+
return c(), t.addEventListener("scroll", l, De), t.addEventListener("scrollend", c, De), () => {
|
|
1402
1406
|
t.removeEventListener("scroll", l), t.removeEventListener("scrollend", c);
|
|
1403
1407
|
};
|
|
1404
1408
|
}, on = (e, o, t) => {
|
|
@@ -1566,14 +1570,14 @@ class rn {
|
|
|
1566
1570
|
this.pendingMeasuredCacheIndexes = [];
|
|
1567
1571
|
const a = this.measurementsCache.slice(0, c);
|
|
1568
1572
|
for (let u = c; u < t; u++) {
|
|
1569
|
-
const
|
|
1573
|
+
const d = i(u), m = this.options.lanes === 1 ? a[u - 1] : this.getFurthestMeasurement(a, u), f = m ? m.end + this.options.gap : n + s, g = l.get(d), x = typeof g == "number" ? g : this.options.estimateSize(u), w = f + x, h = m ? m.lane : u % this.options.lanes;
|
|
1570
1574
|
a[u] = {
|
|
1571
1575
|
index: u,
|
|
1572
|
-
start:
|
|
1573
|
-
size:
|
|
1576
|
+
start: f,
|
|
1577
|
+
size: x,
|
|
1574
1578
|
end: w,
|
|
1575
|
-
key:
|
|
1576
|
-
lane:
|
|
1579
|
+
key: d,
|
|
1580
|
+
lane: h
|
|
1577
1581
|
};
|
|
1578
1582
|
}
|
|
1579
1583
|
return this.measurementsCache = a, a;
|
|
@@ -1760,7 +1764,7 @@ function ln({
|
|
|
1760
1764
|
r++;
|
|
1761
1765
|
return { startIndex: i, endIndex: r };
|
|
1762
1766
|
}
|
|
1763
|
-
const
|
|
1767
|
+
const Pe = typeof document < "u" ? C.useLayoutEffect : C.useEffect;
|
|
1764
1768
|
function cn(e) {
|
|
1765
1769
|
const o = C.useReducer(() => ({}), {})[1], t = {
|
|
1766
1770
|
...e,
|
|
@@ -1771,7 +1775,7 @@ function cn(e) {
|
|
|
1771
1775
|
}, [n] = C.useState(
|
|
1772
1776
|
() => new rn(t)
|
|
1773
1777
|
);
|
|
1774
|
-
return n.setOptions(t),
|
|
1778
|
+
return n.setOptions(t), Pe(() => n._didMount(), []), Pe(() => n._willUpdate()), n;
|
|
1775
1779
|
}
|
|
1776
1780
|
function an(e) {
|
|
1777
1781
|
return cn({
|
|
@@ -1834,6 +1838,7 @@ function dn(e) {
|
|
|
1834
1838
|
);
|
|
1835
1839
|
}
|
|
1836
1840
|
function xn(e) {
|
|
1841
|
+
var g;
|
|
1837
1842
|
const {
|
|
1838
1843
|
items: o,
|
|
1839
1844
|
selected: t,
|
|
@@ -1842,67 +1847,68 @@ function xn(e) {
|
|
|
1842
1847
|
disabled: i,
|
|
1843
1848
|
placeholder: r = "Select an Item",
|
|
1844
1849
|
multiple: l,
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
onAdd: f
|
|
1849
|
-
} = e, g = Fe(null), [h, d] = de(!1);
|
|
1850
|
+
mutable: c,
|
|
1851
|
+
onAdd: a
|
|
1852
|
+
} = e, u = Ee(null), [d, m] = de(!1), f = Ee(null);
|
|
1850
1853
|
return /* @__PURE__ */ b(
|
|
1851
1854
|
Qe,
|
|
1852
1855
|
{
|
|
1853
1856
|
placement: "bottom",
|
|
1854
1857
|
trigger: "click",
|
|
1855
|
-
show:
|
|
1856
|
-
setShow:
|
|
1858
|
+
show: d,
|
|
1859
|
+
setShow: m,
|
|
1857
1860
|
role: "combobox",
|
|
1858
1861
|
disabled: i,
|
|
1862
|
+
style: {
|
|
1863
|
+
"--input-width": `${(g = f.current) == null ? void 0 : g.offsetWidth}px`
|
|
1864
|
+
},
|
|
1859
1865
|
content: /* @__PURE__ */ b(
|
|
1860
1866
|
hn,
|
|
1861
1867
|
{
|
|
1862
|
-
...
|
|
1863
|
-
...l ? { multiple: l, items: o, onChange: s, selected: t } : { items: o, onChange: s, selected: t }
|
|
1864
|
-
width: c
|
|
1868
|
+
...c ? { mutable: c, onAdd: a } : { mutable: c },
|
|
1869
|
+
...l ? { multiple: l, items: o, onChange: s, selected: t } : { items: o, onChange: s, selected: t }
|
|
1865
1870
|
}
|
|
1866
1871
|
),
|
|
1867
1872
|
children: /* @__PURE__ */ W(
|
|
1868
1873
|
"div",
|
|
1869
1874
|
{
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
"inline-flex grow items-center justify-between rounded border-2 border-input bg-background p-2 transition",
|
|
1875
|
+
className: k(
|
|
1876
|
+
"inline-flex h-10 w-56 grow items-center justify-between rounded border-2 border-input bg-background p-2 transition",
|
|
1873
1877
|
i ? "cursor-not-allowed bg-muted text-muted" : "cursor-pointer",
|
|
1874
|
-
|
|
1878
|
+
d && "border-primary shadow-sm shadow-ring",
|
|
1875
1879
|
n
|
|
1876
1880
|
),
|
|
1881
|
+
ref: f,
|
|
1877
1882
|
children: [
|
|
1878
1883
|
/* @__PURE__ */ b(
|
|
1879
1884
|
"div",
|
|
1880
1885
|
{
|
|
1881
|
-
className:
|
|
1886
|
+
className: k(
|
|
1882
1887
|
"flex max-w-[calc(100%-30px)] flex-none grow items-center gap-1 text-sm",
|
|
1883
1888
|
i ? "text-muted-foreground" : "text-foreground"
|
|
1884
1889
|
),
|
|
1885
|
-
ref:
|
|
1890
|
+
ref: u,
|
|
1886
1891
|
children: l ? /* @__PURE__ */ b(
|
|
1887
1892
|
Xt,
|
|
1888
1893
|
{
|
|
1889
|
-
items: t.map((
|
|
1894
|
+
items: t.map((x) => x.text),
|
|
1890
1895
|
data: t,
|
|
1891
|
-
parentRef:
|
|
1896
|
+
parentRef: u,
|
|
1897
|
+
estimator: (x, w) => w + 40,
|
|
1892
1898
|
badgeVariant: "secondary",
|
|
1893
1899
|
badgeStyles: "!bg-input h-6 min-w-min gap-2 !bg-input",
|
|
1894
|
-
children: (
|
|
1900
|
+
children: (x, w, h) => /* @__PURE__ */ W(
|
|
1895
1901
|
We,
|
|
1896
1902
|
{
|
|
1897
1903
|
className: "flex h-6 min-w-min gap-2 !bg-input pr-1",
|
|
1898
1904
|
variant: "secondary",
|
|
1899
1905
|
children: [
|
|
1900
|
-
|
|
1906
|
+
x,
|
|
1901
1907
|
/* @__PURE__ */ b(
|
|
1902
1908
|
lt,
|
|
1903
1909
|
{
|
|
1904
1910
|
onClick: () => {
|
|
1905
|
-
s(t.filter((
|
|
1911
|
+
s(t.filter((p) => p.key !== (h == null ? void 0 : h.key)));
|
|
1906
1912
|
},
|
|
1907
1913
|
variant: "icon",
|
|
1908
1914
|
size: "icon",
|
|
@@ -1921,9 +1927,9 @@ function xn(e) {
|
|
|
1921
1927
|
/* @__PURE__ */ b(
|
|
1922
1928
|
un,
|
|
1923
1929
|
{
|
|
1924
|
-
className:
|
|
1930
|
+
className: k(
|
|
1925
1931
|
"size-4 rounded-full bg-input p-0.5 transition duration-300 ease-in-out",
|
|
1926
|
-
|
|
1932
|
+
d ? "rotate-180" : "rotate-0",
|
|
1927
1933
|
i ? "text-muted-foreground" : "text-foreground"
|
|
1928
1934
|
)
|
|
1929
1935
|
}
|
|
@@ -1935,91 +1941,84 @@ function xn(e) {
|
|
|
1935
1941
|
);
|
|
1936
1942
|
}
|
|
1937
1943
|
function hn(e) {
|
|
1938
|
-
const { items: o, multiple: t, selected: n, onChange: s,
|
|
1939
|
-
() => o.reduce((
|
|
1940
|
-
[o,
|
|
1941
|
-
),
|
|
1942
|
-
count:
|
|
1943
|
-
getScrollElement: () =>
|
|
1944
|
+
const { items: o, multiple: t, selected: n, onChange: s, mutable: i, onAdd: r } = e, [l, c] = de(""), a = Ee(null), u = ve(
|
|
1945
|
+
() => o.reduce((f, g) => ((!l.length || g.text.toLowerCase().includes(l.toLowerCase())) && f.push(g), f), []),
|
|
1946
|
+
[o, l]
|
|
1947
|
+
), d = an({
|
|
1948
|
+
count: u.length,
|
|
1949
|
+
getScrollElement: () => a.current,
|
|
1944
1950
|
estimateSize: () => 35
|
|
1945
|
-
}),
|
|
1946
|
-
return /* @__PURE__ */ W(
|
|
1947
|
-
"div",
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1951
|
+
}), m = n instanceof Array ? n.map((f) => f.key) : [n.key];
|
|
1952
|
+
return /* @__PURE__ */ W("div", { className: "flex min-w-[var(--input-width)] flex-col divide-y-2 divide-border overflow-hidden rounded border border-input bg-background", children: [
|
|
1953
|
+
/* @__PURE__ */ W("div", { className: k("inline-flex grow items-center rounded px-3 py-2"), children: [
|
|
1954
|
+
/* @__PURE__ */ b(fn, { className: "left-3 top-3 mr-2 size-4 text-muted-foreground" }),
|
|
1955
|
+
/* @__PURE__ */ b(
|
|
1956
|
+
"input",
|
|
1957
|
+
{
|
|
1958
|
+
className: "inline-flex grow bg-transparent text-sm text-foreground outline-none",
|
|
1959
|
+
placeholder: "Search",
|
|
1960
|
+
value: l,
|
|
1961
|
+
onChange: (f) => c(f.target.value)
|
|
1962
|
+
}
|
|
1963
|
+
)
|
|
1964
|
+
] }),
|
|
1965
|
+
/* @__PURE__ */ W(
|
|
1966
|
+
"ul",
|
|
1967
|
+
{
|
|
1968
|
+
className: k("max-h-60 grow overflow-auto shadow", "focus:outline-none focus:ring-0"),
|
|
1969
|
+
ref: a,
|
|
1970
|
+
children: [
|
|
1954
1971
|
/* @__PURE__ */ b(
|
|
1955
|
-
"
|
|
1972
|
+
"div",
|
|
1956
1973
|
{
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
/* @__PURE__ */ W(
|
|
1965
|
-
"ul",
|
|
1966
|
-
{
|
|
1967
|
-
className: R("max-h-60 grow overflow-auto shadow", "focus:outline-none focus:ring-0"),
|
|
1968
|
-
ref: u,
|
|
1969
|
-
children: [
|
|
1970
|
-
/* @__PURE__ */ b(
|
|
1971
|
-
"div",
|
|
1974
|
+
style: {
|
|
1975
|
+
height: `${d.getTotalSize()}px`,
|
|
1976
|
+
width: "100%",
|
|
1977
|
+
position: "relative"
|
|
1978
|
+
},
|
|
1979
|
+
children: d.getVirtualItems().map((f) => /* @__PURE__ */ b(
|
|
1980
|
+
"li",
|
|
1972
1981
|
{
|
|
1973
1982
|
style: {
|
|
1974
|
-
height: `${
|
|
1975
|
-
|
|
1976
|
-
position: "relative"
|
|
1983
|
+
height: `${f.size}px`,
|
|
1984
|
+
transform: `translateY(${f.start}px)`
|
|
1977
1985
|
},
|
|
1978
|
-
|
|
1979
|
-
"
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
height: `${d.size}px`,
|
|
1983
|
-
transform: `translateY(${d.start}px)`
|
|
1984
|
-
},
|
|
1985
|
-
className: R(
|
|
1986
|
-
"absolute left-0 top-0 w-full cursor-pointer px-3 py-2 text-sm text-foreground",
|
|
1987
|
-
h.includes(f[d.index].key) ? "bg-primary/90 text-primary-foreground" : "transition hover:bg-primary/60"
|
|
1988
|
-
),
|
|
1989
|
-
onClick: () => {
|
|
1990
|
-
t ? h.includes(f[d.index].key) ? s(
|
|
1991
|
-
structuredClone(
|
|
1992
|
-
n.filter(
|
|
1993
|
-
(p) => p.key !== f[d.index].key
|
|
1994
|
-
)
|
|
1995
|
-
)
|
|
1996
|
-
) : s(structuredClone([...n, f[d.index]])) : s(f[d.index]);
|
|
1997
|
-
},
|
|
1998
|
-
children: f[d.index].text
|
|
1999
|
-
},
|
|
2000
|
-
d.key
|
|
2001
|
-
))
|
|
2002
|
-
}
|
|
2003
|
-
),
|
|
2004
|
-
c.length > 0 && f.length === 0 && (r ? /* @__PURE__ */ W(
|
|
2005
|
-
"li",
|
|
2006
|
-
{
|
|
2007
|
-
className: R("px-3 py-2 text-sm text-foreground"),
|
|
1986
|
+
className: k(
|
|
1987
|
+
"absolute left-0 top-0 w-full cursor-pointer px-3 py-2 text-sm text-foreground",
|
|
1988
|
+
m.includes(u[f.index].key) ? "bg-primary/90 text-primary-foreground" : "transition hover:bg-primary/60"
|
|
1989
|
+
),
|
|
2008
1990
|
onClick: () => {
|
|
2009
|
-
|
|
1991
|
+
t ? m.includes(u[f.index].key) ? s(
|
|
1992
|
+
structuredClone(
|
|
1993
|
+
n.filter(
|
|
1994
|
+
(g) => g.key !== u[f.index].key
|
|
1995
|
+
)
|
|
1996
|
+
)
|
|
1997
|
+
) : s(structuredClone([...n, u[f.index]])) : s(u[f.index]);
|
|
2010
1998
|
},
|
|
2011
|
-
children: [
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
1999
|
+
children: u[f.index].text
|
|
2000
|
+
},
|
|
2001
|
+
f.key
|
|
2002
|
+
))
|
|
2003
|
+
}
|
|
2004
|
+
),
|
|
2005
|
+
l.length > 0 && u.length === 0 && (i ? /* @__PURE__ */ W(
|
|
2006
|
+
"li",
|
|
2007
|
+
{
|
|
2008
|
+
className: k("px-3 py-2 text-sm text-foreground"),
|
|
2009
|
+
onClick: () => {
|
|
2010
|
+
r({ text: l, key: l }), c("");
|
|
2011
|
+
},
|
|
2012
|
+
children: [
|
|
2013
|
+
"Add ",
|
|
2014
|
+
l
|
|
2015
|
+
]
|
|
2016
|
+
}
|
|
2017
|
+
) : /* @__PURE__ */ b("li", { className: k("cursor-not-allowed px-3 py-2 text-sm text-foreground"), children: "No results found" }))
|
|
2018
|
+
]
|
|
2019
|
+
}
|
|
2020
|
+
)
|
|
2021
|
+
] });
|
|
2023
2022
|
}
|
|
2024
2023
|
function wn(e) {
|
|
2025
2024
|
return /* @__PURE__ */ b(
|
|
@@ -2041,7 +2040,7 @@ function yn(e) {
|
|
|
2041
2040
|
return /* @__PURE__ */ b(
|
|
2042
2041
|
"input",
|
|
2043
2042
|
{
|
|
2044
|
-
className:
|
|
2043
|
+
className: k(
|
|
2045
2044
|
"h-10 w-full rounded border-2 border-input bg-background px-3 py-2 text-sm text-foreground transition",
|
|
2046
2045
|
"focus-visible:border-primary focus-visible:shadow-sm focus-visible:shadow-ring focus-visible:outline-none",
|
|
2047
2046
|
"read-only:cursor-pointer read-only:!border-none read-only:bg-transparent read-only:text-foreground read-only:!shadow-none read-only:!outline-none",
|
|
@@ -2058,7 +2057,7 @@ function bn(e) {
|
|
|
2058
2057
|
return /* @__PURE__ */ W(
|
|
2059
2058
|
"div",
|
|
2060
2059
|
{
|
|
2061
|
-
className:
|
|
2060
|
+
className: k(
|
|
2062
2061
|
"rounded-full",
|
|
2063
2062
|
"h-5 w-10",
|
|
2064
2063
|
"border border-muted bg-secondary",
|
|
@@ -2071,7 +2070,7 @@ function bn(e) {
|
|
|
2071
2070
|
/* @__PURE__ */ b(
|
|
2072
2071
|
"div",
|
|
2073
2072
|
{
|
|
2074
|
-
className:
|
|
2073
|
+
className: k(
|
|
2075
2074
|
"[animation-timing-function:cubic-bezier(1, 0, 0, 1)] duration-250 h-4 w-4 rounded-full bg-primary transition-all",
|
|
2076
2075
|
t ? "translate-x-5" : "translate-x-1"
|
|
2077
2076
|
)
|
|
@@ -2093,5 +2092,5 @@ export {
|
|
|
2093
2092
|
fn as Search,
|
|
2094
2093
|
bn as Toggle,
|
|
2095
2094
|
Ve as cva,
|
|
2096
|
-
|
|
2095
|
+
k as cx
|
|
2097
2096
|
};
|