@rinzai/zen 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/collapse/index.d.ts.map +1 -1
- 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 +657 -655
- 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
|
-
import { createPortal as
|
|
6
|
-
const
|
|
5
|
+
import { createPortal as it, flushSync as st } from "react-dom";
|
|
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, [i, s]) => s == null || s === !1 ? n : typeof s == "string" || typeof s == "number" ? n + " " + i + "-" + s : typeof s == "boolean" && s ? n + " " + i : 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
|
|
9
|
-
const { variants: n, defaultVariants:
|
|
10
|
-
const u = t == null ? void 0 : t[a],
|
|
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
|
+
const { variants: n, defaultVariants: i } = o, s = Object.keys(n).map((a) => {
|
|
10
|
+
const u = t == null ? void 0 : t[a], d = i == null ? void 0 : i[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
|
+
...i,
|
|
22
22
|
...r
|
|
23
|
-
}[
|
|
23
|
+
}[f]
|
|
24
24
|
) : {
|
|
25
|
-
...
|
|
25
|
+
...i,
|
|
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, s, 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 }) });
|
|
@@ -77,7 +77,7 @@ const ct = Ve(
|
|
|
77
77
|
size: "default"
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
), le = Math.min, H = Math.max, ce = Math.round,
|
|
80
|
+
), le = Math.min, H = Math.max, ce = Math.round, ie = Math.floor, _ = (e) => ({
|
|
81
81
|
x: e,
|
|
82
82
|
y: e
|
|
83
83
|
}), at = {
|
|
@@ -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) {
|
|
@@ -115,34 +115,34 @@ function $e(e) {
|
|
|
115
115
|
}
|
|
116
116
|
function ft(e, o, t) {
|
|
117
117
|
t === void 0 && (t = !1);
|
|
118
|
-
const n = me(e),
|
|
119
|
-
let r =
|
|
120
|
-
return o.reference[
|
|
118
|
+
const n = me(e), i = $e(e), s = je(i);
|
|
119
|
+
let r = i === "x" ? n === (t ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
120
|
+
return o.reference[s] > o.floating[s] && (r = ae(r)), [r, ae(r)];
|
|
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) {
|
|
130
|
-
const n = ["left", "right"],
|
|
130
|
+
const n = ["left", "right"], i = ["right", "left"], s = ["top", "bottom"], r = ["bottom", "top"];
|
|
131
131
|
switch (e) {
|
|
132
132
|
case "top":
|
|
133
133
|
case "bottom":
|
|
134
|
-
return t ? o ?
|
|
134
|
+
return t ? o ? i : n : o ? n : i;
|
|
135
135
|
case "left":
|
|
136
136
|
case "right":
|
|
137
|
-
return o ?
|
|
137
|
+
return o ? s : r;
|
|
138
138
|
default:
|
|
139
139
|
return [];
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
function mt(e, o, t, n) {
|
|
143
|
-
const
|
|
144
|
-
let
|
|
145
|
-
return
|
|
143
|
+
const i = me(e);
|
|
144
|
+
let s = ht(U(e), t === "start", n);
|
|
145
|
+
return i && (s = s.map((r) => r + "-" + i), o && (s = s.concat(s.map(Se)))), s;
|
|
146
146
|
}
|
|
147
147
|
function ae(e) {
|
|
148
148
|
return e.replace(/left|right|bottom|top/g, (o) => at[o]);
|
|
@@ -169,98 +169,98 @@ function ue(e) {
|
|
|
169
169
|
x: o,
|
|
170
170
|
y: t,
|
|
171
171
|
width: n,
|
|
172
|
-
height:
|
|
172
|
+
height: i
|
|
173
173
|
} = e;
|
|
174
174
|
return {
|
|
175
175
|
width: n,
|
|
176
|
-
height:
|
|
176
|
+
height: i,
|
|
177
177
|
top: t,
|
|
178
178
|
left: o,
|
|
179
179
|
right: o + n,
|
|
180
|
-
bottom: t +
|
|
180
|
+
bottom: t + i,
|
|
181
181
|
x: o,
|
|
182
182
|
y: t
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function ze(e, o, t) {
|
|
186
186
|
let {
|
|
187
187
|
reference: n,
|
|
188
|
-
floating:
|
|
188
|
+
floating: i
|
|
189
189
|
} = e;
|
|
190
|
-
const
|
|
191
|
-
let
|
|
190
|
+
const s = G(o), r = $e(o), l = je(r), c = U(o), a = s === "y", u = n.x + n.width / 2 - i.width / 2, d = n.y + n.height / 2 - i.height / 2, m = n[l] / 2 - i[l] / 2;
|
|
191
|
+
let f;
|
|
192
192
|
switch (c) {
|
|
193
193
|
case "top":
|
|
194
|
-
|
|
194
|
+
f = {
|
|
195
195
|
x: u,
|
|
196
|
-
y: n.y -
|
|
196
|
+
y: n.y - i.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
|
-
|
|
213
|
-
x: n.x -
|
|
214
|
-
y:
|
|
212
|
+
f = {
|
|
213
|
+
x: n.x - i.width,
|
|
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
|
-
const
|
|
233
|
+
const wt = async (e, o, t) => {
|
|
234
234
|
const {
|
|
235
235
|
placement: n = "bottom",
|
|
236
|
-
strategy:
|
|
237
|
-
middleware:
|
|
236
|
+
strategy: i = "absolute",
|
|
237
|
+
middleware: s = [],
|
|
238
238
|
platform: r
|
|
239
|
-
} = t, l =
|
|
239
|
+
} = t, l = s.filter(Boolean), c = await (r.isRTL == null ? void 0 : r.isRTL(o));
|
|
240
240
|
let a = await r.getElementRects({
|
|
241
241
|
reference: e,
|
|
242
242
|
floating: o,
|
|
243
|
-
strategy:
|
|
243
|
+
strategy: i
|
|
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 w = 0; w < l.length; w++) {
|
|
249
249
|
const {
|
|
250
|
-
name:
|
|
251
|
-
fn:
|
|
252
|
-
} = l[
|
|
253
|
-
x,
|
|
250
|
+
name: x,
|
|
251
|
+
fn: h
|
|
252
|
+
} = l[w], {
|
|
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:
|
|
262
|
-
strategy:
|
|
263
|
-
middlewareData:
|
|
261
|
+
placement: m,
|
|
262
|
+
strategy: i,
|
|
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
|
-
...
|
|
273
|
-
[
|
|
274
|
-
...
|
|
271
|
+
u = p ?? u, d = v ?? d, f = {
|
|
272
|
+
...f,
|
|
273
|
+
[x]: {
|
|
274
|
+
...f[x],
|
|
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
|
-
strategy:
|
|
280
|
+
strategy: i
|
|
281
281
|
}) : y.rects), {
|
|
282
282
|
x: u,
|
|
283
|
-
y:
|
|
284
|
-
} =
|
|
283
|
+
y: d
|
|
284
|
+
} = ze(a, m, c)), w = -1);
|
|
285
285
|
}
|
|
286
286
|
return {
|
|
287
287
|
x: u,
|
|
288
|
-
y:
|
|
289
|
-
placement:
|
|
290
|
-
strategy:
|
|
291
|
-
middlewareData:
|
|
288
|
+
y: d,
|
|
289
|
+
placement: m,
|
|
290
|
+
strategy: i,
|
|
291
|
+
middlewareData: f
|
|
292
292
|
};
|
|
293
293
|
};
|
|
294
294
|
async function He(e, o) {
|
|
@@ -296,84 +296,84 @@ async function He(e, o) {
|
|
|
296
296
|
o === void 0 && (o = {});
|
|
297
297
|
const {
|
|
298
298
|
x: n,
|
|
299
|
-
y:
|
|
300
|
-
platform:
|
|
299
|
+
y: i,
|
|
300
|
+
platform: s,
|
|
301
301
|
rects: r,
|
|
302
302
|
elements: l,
|
|
303
303
|
strategy: c
|
|
304
304
|
} = e, {
|
|
305
305
|
boundary: a = "clippingAncestors",
|
|
306
306
|
rootBoundary: u = "viewport",
|
|
307
|
-
elementContext:
|
|
308
|
-
altBoundary:
|
|
309
|
-
padding:
|
|
310
|
-
} = he(o, e),
|
|
311
|
-
element: (t = await (
|
|
307
|
+
elementContext: d = "floating",
|
|
308
|
+
altBoundary: m = !1,
|
|
309
|
+
padding: f = 0
|
|
310
|
+
} = he(o, e), g = pt(f), x = l[m ? d === "floating" ? "reference" : "floating" : d], h = ue(await s.getClippingRect({
|
|
311
|
+
element: (t = await (s.isElement == null ? void 0 : s.isElement(x))) == null || t ? x : x.contextElement || await (s.getDocumentElement == null ? void 0 : s.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
|
-
y:
|
|
317
|
+
y: i,
|
|
318
318
|
width: r.floating.width,
|
|
319
319
|
height: r.floating.height
|
|
320
|
-
} : r.reference, v = await (
|
|
320
|
+
} : r.reference, v = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l.floating)), E = await (s.isElement == null ? void 0 : s.isElement(v)) ? await (s.getScale == null ? void 0 : s.getScale(v)) || {
|
|
321
321
|
x: 1,
|
|
322
322
|
y: 1
|
|
323
323
|
} : {
|
|
324
324
|
x: 1,
|
|
325
325
|
y: 1
|
|
326
|
-
}, y = ue(
|
|
326
|
+
}, y = ue(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.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
|
-
const
|
|
339
|
+
const xt = function(e) {
|
|
340
340
|
return e === void 0 && (e = {}), {
|
|
341
341
|
name: "flip",
|
|
342
342
|
options: e,
|
|
343
343
|
async fn(o) {
|
|
344
344
|
var t, n;
|
|
345
345
|
const {
|
|
346
|
-
placement:
|
|
347
|
-
middlewareData:
|
|
346
|
+
placement: i,
|
|
347
|
+
middlewareData: s,
|
|
348
348
|
rects: r,
|
|
349
349
|
initialPlacement: l,
|
|
350
350
|
platform: c,
|
|
351
351
|
elements: a
|
|
352
352
|
} = o, {
|
|
353
353
|
mainAxis: u = !0,
|
|
354
|
-
crossAxis:
|
|
355
|
-
fallbackPlacements:
|
|
356
|
-
fallbackStrategy:
|
|
357
|
-
fallbackAxisSideDirection:
|
|
358
|
-
flipAlignment:
|
|
359
|
-
...
|
|
354
|
+
crossAxis: d = !0,
|
|
355
|
+
fallbackPlacements: m,
|
|
356
|
+
fallbackStrategy: f = "bestFit",
|
|
357
|
+
fallbackAxisSideDirection: g = "none",
|
|
358
|
+
flipAlignment: w = !0,
|
|
359
|
+
...x
|
|
360
360
|
} = he(e, o);
|
|
361
|
-
if ((t =
|
|
361
|
+
if ((t = s.arrow) != null && t.alignmentOffset)
|
|
362
362
|
return {};
|
|
363
|
-
const
|
|
364
|
-
!
|
|
365
|
-
const
|
|
366
|
-
let F = ((n =
|
|
367
|
-
if (u && Y.push(z[
|
|
368
|
-
const I = ft(
|
|
363
|
+
const h = U(i), p = G(l), v = U(l) === l, E = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), y = m || (v || !w ? [ae(l)] : dt(l)), O = g !== "none";
|
|
364
|
+
!m && O && y.push(...mt(l, w, g, E));
|
|
365
|
+
const R = [l, ...y], z = await He(o, x), Y = [];
|
|
366
|
+
let F = ((n = s.flip) == null ? void 0 : n.overflows) || [];
|
|
367
|
+
if (u && Y.push(z[h]), d) {
|
|
368
|
+
const I = ft(i, r, E);
|
|
369
369
|
Y.push(z[I[0]], z[I[1]]);
|
|
370
370
|
}
|
|
371
371
|
if (F = [...F, {
|
|
372
|
-
placement:
|
|
372
|
+
placement: i,
|
|
373
373
|
overflows: Y
|
|
374
374
|
}], !Y.every((I) => I <= 0)) {
|
|
375
375
|
var q, ee;
|
|
376
|
-
const I = (((q =
|
|
376
|
+
const I = (((q = s.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 (
|
|
408
|
+
if (i !== M)
|
|
409
409
|
return {
|
|
410
410
|
reset: {
|
|
411
|
-
placement:
|
|
411
|
+
placement: M
|
|
412
412
|
}
|
|
413
413
|
};
|
|
414
414
|
}
|
|
@@ -420,27 +420,27 @@ async function yt(e, o) {
|
|
|
420
420
|
const {
|
|
421
421
|
placement: t,
|
|
422
422
|
platform: n,
|
|
423
|
-
elements:
|
|
424
|
-
} = e,
|
|
423
|
+
elements: i
|
|
424
|
+
} = e, s = await (n.isRTL == null ? void 0 : n.isRTL(i.floating)), r = U(t), l = me(t), c = G(t) === "y", a = ["left", "top"].includes(r) ? -1 : 1, u = s && 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) {
|
|
@@ -450,14 +450,14 @@ const bt = function(e) {
|
|
|
450
450
|
async fn(o) {
|
|
451
451
|
var t, n;
|
|
452
452
|
const {
|
|
453
|
-
x:
|
|
454
|
-
y:
|
|
453
|
+
x: i,
|
|
454
|
+
y: s,
|
|
455
455
|
placement: r,
|
|
456
456
|
middlewareData: l
|
|
457
457
|
} = o, c = await yt(o, e);
|
|
458
458
|
return r === ((t = l.offset) == null ? void 0 : t.placement) && (n = l.arrow) != null && n.alignmentOffset ? {} : {
|
|
459
|
-
x:
|
|
460
|
-
y:
|
|
459
|
+
x: i + c.x,
|
|
460
|
+
y: s + c.y,
|
|
461
461
|
data: {
|
|
462
462
|
...c,
|
|
463
463
|
placement: r
|
|
@@ -473,19 +473,19 @@ const bt = function(e) {
|
|
|
473
473
|
const {
|
|
474
474
|
x: t,
|
|
475
475
|
y: n,
|
|
476
|
-
placement:
|
|
476
|
+
placement: i
|
|
477
477
|
} = o, {
|
|
478
|
-
mainAxis:
|
|
478
|
+
mainAxis: s = !0,
|
|
479
479
|
crossAxis: r = !1,
|
|
480
480
|
limiter: l = {
|
|
481
|
-
fn: (
|
|
481
|
+
fn: (x) => {
|
|
482
482
|
let {
|
|
483
|
-
x:
|
|
484
|
-
y:
|
|
485
|
-
} =
|
|
483
|
+
x: h,
|
|
484
|
+
y: p
|
|
485
|
+
} = x;
|
|
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
|
|
498
|
-
if (
|
|
499
|
-
const
|
|
500
|
-
|
|
496
|
+
}, u = await He(o, c), d = G(U(i)), m = Be(d);
|
|
497
|
+
let f = a[m], g = a[d];
|
|
498
|
+
if (s) {
|
|
499
|
+
const x = m === "y" ? "top" : "left", h = m === "y" ? "bottom" : "right", p = f + u[x], v = f - u[h];
|
|
500
|
+
f = Ae(p, f, v);
|
|
501
501
|
}
|
|
502
502
|
if (r) {
|
|
503
|
-
const
|
|
504
|
-
|
|
503
|
+
const x = d === "y" ? "top" : "left", h = d === "y" ? "bottom" : "right", p = g + u[x], v = g - u[h];
|
|
504
|
+
g = Ae(p, g, v);
|
|
505
505
|
}
|
|
506
|
-
const
|
|
506
|
+
const w = l.fn({
|
|
507
507
|
...o,
|
|
508
|
-
[
|
|
509
|
-
[
|
|
508
|
+
[m]: f,
|
|
509
|
+
[d]: g
|
|
510
510
|
});
|
|
511
511
|
return {
|
|
512
|
-
...
|
|
512
|
+
...w,
|
|
513
513
|
data: {
|
|
514
|
-
x:
|
|
515
|
-
y:
|
|
514
|
+
x: w.x - t,
|
|
515
|
+
y: w.y - n,
|
|
516
516
|
enabled: {
|
|
517
|
-
[
|
|
518
|
-
[
|
|
517
|
+
[m]: s,
|
|
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,25 +537,25 @@ 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 {
|
|
553
553
|
overflow: o,
|
|
554
554
|
overflowX: t,
|
|
555
555
|
overflowY: n,
|
|
556
|
-
display:
|
|
556
|
+
display: i
|
|
557
557
|
} = L(e);
|
|
558
|
-
return /auto|scroll|overlay|hidden|clip/.test(o + n + t) && !["inline", "contents"].includes(
|
|
558
|
+
return /auto|scroll|overlay|hidden|clip/.test(o + n + t) && !["inline", "contents"].includes(i);
|
|
559
559
|
}
|
|
560
560
|
function Et(e) {
|
|
561
561
|
return ["table", "td", "th"].includes(Q(e));
|
|
@@ -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,16 +584,16 @@ 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
|
-
function
|
|
596
|
+
function we(e) {
|
|
597
597
|
return N(e) ? {
|
|
598
598
|
scrollLeft: e.scrollLeft,
|
|
599
599
|
scrollTop: e.scrollTop
|
|
@@ -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,39 +621,39 @@ 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
|
|
625
|
-
if (
|
|
626
|
-
const l =
|
|
627
|
-
return o.concat(r, r.visualViewport || [], oe(
|
|
624
|
+
const i = Ke(e), s = i === ((n = e.ownerDocument) == null ? void 0 : n.body), r = A(i);
|
|
625
|
+
if (s) {
|
|
626
|
+
const l = Ce(r);
|
|
627
|
+
return o.concat(r, r.visualViewport || [], oe(i) ? i : [], l && t ? ne(l) : []);
|
|
628
628
|
}
|
|
629
|
-
return o.concat(
|
|
629
|
+
return o.concat(i, ne(i, [], 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) {
|
|
635
635
|
const o = L(e);
|
|
636
636
|
let t = parseFloat(o.width) || 0, n = parseFloat(o.height) || 0;
|
|
637
|
-
const
|
|
638
|
-
return l && (t =
|
|
637
|
+
const i = D(e), s = i ? e.offsetWidth : t, r = i ? e.offsetHeight : n, l = ce(t) !== s || ce(n) !== r;
|
|
638
|
+
return l && (t = s, n = r), {
|
|
639
639
|
width: t,
|
|
640
640
|
height: n,
|
|
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(), {
|
|
652
652
|
width: n,
|
|
653
|
-
height:
|
|
654
|
-
$:
|
|
653
|
+
height: i,
|
|
654
|
+
$: s
|
|
655
655
|
} = Ye(o);
|
|
656
|
-
let r = (
|
|
656
|
+
let r = (s ? ce(t.width) : t.width) / n, l = (s ? ce(t.height) : t.height) / i;
|
|
657
657
|
return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
658
658
|
x: r,
|
|
659
659
|
y: l
|
|
@@ -661,50 +661,50 @@ 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
|
|
675
|
+
const i = e.getBoundingClientRect(), s = ke(e);
|
|
676
676
|
let r = _(1);
|
|
677
677
|
o && (n ? N(n) && (r = Z(n)) : r = Z(e));
|
|
678
|
-
const l = Ot(
|
|
679
|
-
let c = (
|
|
680
|
-
if (
|
|
681
|
-
const
|
|
682
|
-
let
|
|
683
|
-
for (;
|
|
684
|
-
const
|
|
685
|
-
c *=
|
|
678
|
+
const l = Ot(s, t, n) ? qe(s) : _(0);
|
|
679
|
+
let c = (i.left + l.x) / r.x, a = (i.top + l.y) / r.y, u = i.width / r.x, d = i.height / r.y;
|
|
680
|
+
if (s) {
|
|
681
|
+
const m = A(s), f = n && N(n) ? A(n) : n;
|
|
682
|
+
let g = m, w = Ce(g);
|
|
683
|
+
for (; w && n && f !== g; ) {
|
|
684
|
+
const x = Z(w), h = w.getBoundingClientRect(), p = L(w), v = h.left + (w.clientLeft + parseFloat(p.paddingLeft)) * x.x, E = h.top + (w.clientTop + parseFloat(p.paddingTop)) * x.y;
|
|
685
|
+
c *= x.x, a *= x.y, u *= x.x, d *= x.y, c += v, a += E, g = A(w), w = 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
|
|
696
|
-
const t =
|
|
695
|
+
function Me(e, o) {
|
|
696
|
+
const t = we(e).scrollLeft;
|
|
697
697
|
return o ? o.left + t : K(P(e)).left + t;
|
|
698
698
|
}
|
|
699
699
|
function Xe(e, o, t) {
|
|
700
700
|
t === void 0 && (t = !1);
|
|
701
|
-
const n = e.getBoundingClientRect(),
|
|
701
|
+
const n = e.getBoundingClientRect(), i = n.left + o.scrollLeft - (t ? 0 : (
|
|
702
702
|
// RTL <body> scrollbar.
|
|
703
|
-
|
|
704
|
-
)),
|
|
703
|
+
Me(e, n)
|
|
704
|
+
)), s = n.top + o.scrollTop;
|
|
705
705
|
return {
|
|
706
|
-
x:
|
|
707
|
-
y:
|
|
706
|
+
x: i,
|
|
707
|
+
y: s
|
|
708
708
|
};
|
|
709
709
|
}
|
|
710
710
|
function Rt(e) {
|
|
@@ -712,59 +712,59 @@ function Rt(e) {
|
|
|
712
712
|
elements: o,
|
|
713
713
|
rect: t,
|
|
714
714
|
offsetParent: n,
|
|
715
|
-
strategy:
|
|
715
|
+
strategy: i
|
|
716
716
|
} = e;
|
|
717
|
-
const
|
|
718
|
-
if (n === r || l &&
|
|
717
|
+
const s = i === "fixed", r = P(n), l = o ? pe(o.floating) : !1;
|
|
718
|
+
if (n === r || l && s)
|
|
719
719
|
return t;
|
|
720
720
|
let c = {
|
|
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 && !s) && ((Q(n) !== "body" || oe(r)) && (c = we(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 && !s ? 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) {
|
|
738
738
|
return Array.from(e.getClientRects());
|
|
739
739
|
}
|
|
740
740
|
function Mt(e) {
|
|
741
|
-
const o = P(e), t =
|
|
742
|
-
let r = -t.scrollLeft +
|
|
741
|
+
const o = P(e), t = we(e), n = e.ownerDocument.body, i = H(o.scrollWidth, o.clientWidth, n.scrollWidth, n.clientWidth), s = H(o.scrollHeight, o.clientHeight, n.scrollHeight, n.clientHeight);
|
|
742
|
+
let r = -t.scrollLeft + Me(e);
|
|
743
743
|
const l = -t.scrollTop;
|
|
744
|
-
return L(n).direction === "rtl" && (r += H(o.clientWidth, n.clientWidth) -
|
|
745
|
-
width:
|
|
746
|
-
height:
|
|
744
|
+
return L(n).direction === "rtl" && (r += H(o.clientWidth, n.clientWidth) - i), {
|
|
745
|
+
width: i,
|
|
746
|
+
height: s,
|
|
747
747
|
x: r,
|
|
748
748
|
y: l
|
|
749
749
|
};
|
|
750
750
|
}
|
|
751
751
|
function Tt(e, o) {
|
|
752
|
-
const t =
|
|
753
|
-
let
|
|
754
|
-
if (
|
|
755
|
-
|
|
756
|
-
const a =
|
|
757
|
-
(!a || a && o === "fixed") && (l =
|
|
752
|
+
const t = A(e), n = P(e), i = t.visualViewport;
|
|
753
|
+
let s = n.clientWidth, r = n.clientHeight, l = 0, c = 0;
|
|
754
|
+
if (i) {
|
|
755
|
+
s = i.width, r = i.height;
|
|
756
|
+
const a = Re();
|
|
757
|
+
(!a || a && o === "fixed") && (l = i.offsetLeft, c = i.offsetTop);
|
|
758
758
|
}
|
|
759
759
|
return {
|
|
760
|
-
width:
|
|
760
|
+
width: s,
|
|
761
761
|
height: r,
|
|
762
762
|
x: l,
|
|
763
763
|
y: c
|
|
764
764
|
};
|
|
765
765
|
}
|
|
766
766
|
function At(e, o) {
|
|
767
|
-
const t = K(e, !0, o === "fixed"), n = t.top + e.clientTop,
|
|
767
|
+
const t = K(e, !0, o === "fixed"), n = t.top + e.clientTop, i = t.left + e.clientLeft, s = D(e) ? Z(e) : _(1), r = e.clientWidth * s.x, l = e.clientHeight * s.y, c = i * s.x, a = n * s.y;
|
|
768
768
|
return {
|
|
769
769
|
width: r,
|
|
770
770
|
height: l,
|
|
@@ -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);
|
|
@@ -781,10 +781,10 @@ function Ie(e, o, t) {
|
|
|
781
781
|
else if (N(o))
|
|
782
782
|
n = At(o, t);
|
|
783
783
|
else {
|
|
784
|
-
const
|
|
784
|
+
const i = qe(e);
|
|
785
785
|
n = {
|
|
786
|
-
x: o.x -
|
|
787
|
-
y: o.y -
|
|
786
|
+
x: o.x - i.x,
|
|
787
|
+
y: o.y - i.y,
|
|
788
788
|
width: o.width,
|
|
789
789
|
height: o.height
|
|
790
790
|
};
|
|
@@ -799,12 +799,12 @@ function zt(e, o) {
|
|
|
799
799
|
const t = o.get(e);
|
|
800
800
|
if (t)
|
|
801
801
|
return t;
|
|
802
|
-
let n = ne(e, [], !1).filter((l) => N(l) && Q(l) !== "body"),
|
|
803
|
-
const
|
|
804
|
-
let r =
|
|
802
|
+
let n = ne(e, [], !1).filter((l) => N(l) && Q(l) !== "body"), i = null;
|
|
803
|
+
const s = L(e).position === "fixed";
|
|
804
|
+
let r = s ? $(e) : e;
|
|
805
805
|
for (; N(r) && !J(r); ) {
|
|
806
|
-
const l = L(r), c =
|
|
807
|
-
!c && l.position === "fixed" && (
|
|
806
|
+
const l = L(r), c = Oe(r);
|
|
807
|
+
!c && l.position === "fixed" && (i = null), (s ? !c && !i : !c && l.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || oe(r) && !c && Ze(e, r)) ? n = n.filter((u) => u !== r) : i = l, r = $(r);
|
|
808
808
|
}
|
|
809
809
|
return o.set(e, n), n;
|
|
810
810
|
}
|
|
@@ -813,12 +813,12 @@ function It(e) {
|
|
|
813
813
|
element: o,
|
|
814
814
|
boundary: t,
|
|
815
815
|
rootBoundary: n,
|
|
816
|
-
strategy:
|
|
816
|
+
strategy: i
|
|
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, i);
|
|
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, i));
|
|
822
822
|
return {
|
|
823
823
|
width: c.right - c.left,
|
|
824
824
|
height: c.bottom - c.top,
|
|
@@ -837,29 +837,29 @@ function Nt(e) {
|
|
|
837
837
|
};
|
|
838
838
|
}
|
|
839
839
|
function Lt(e, o, t) {
|
|
840
|
-
const n = D(o),
|
|
840
|
+
const n = D(o), i = P(o), s = t === "fixed", r = K(e, !0, s, o);
|
|
841
841
|
let l = {
|
|
842
842
|
scrollLeft: 0,
|
|
843
843
|
scrollTop: 0
|
|
844
844
|
};
|
|
845
845
|
const c = _(0);
|
|
846
|
-
if (n || !n && !
|
|
847
|
-
if ((Q(o) !== "body" || oe(
|
|
848
|
-
const
|
|
849
|
-
c.x =
|
|
850
|
-
} else
|
|
851
|
-
const a =
|
|
846
|
+
if (n || !n && !s)
|
|
847
|
+
if ((Q(o) !== "body" || oe(i)) && (l = we(o)), n) {
|
|
848
|
+
const m = K(o, !0, s, o);
|
|
849
|
+
c.x = m.x + o.clientLeft, c.y = m.y + o.clientTop;
|
|
850
|
+
} else i && (c.x = Me(i));
|
|
851
|
+
const a = i && !n && !s ? Xe(i, 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
|
};
|
|
858
858
|
}
|
|
859
|
-
function
|
|
859
|
+
function xe(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,22 +868,22 @@ 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)) {
|
|
875
|
-
let
|
|
876
|
-
for (;
|
|
877
|
-
if (N(
|
|
878
|
-
return
|
|
879
|
-
|
|
875
|
+
let i = $(e);
|
|
876
|
+
for (; i && !J(i); ) {
|
|
877
|
+
if (N(i) && !xe(i))
|
|
878
|
+
return i;
|
|
879
|
+
i = $(i);
|
|
880
880
|
}
|
|
881
881
|
return t;
|
|
882
882
|
}
|
|
883
|
-
let n =
|
|
884
|
-
for (; n && Et(n) &&
|
|
885
|
-
n =
|
|
886
|
-
return n && J(n) &&
|
|
883
|
+
let n = Le(e, o);
|
|
884
|
+
for (; n && Et(n) && xe(n); )
|
|
885
|
+
n = Le(n, o);
|
|
886
|
+
return n && J(n) && xe(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);
|
|
@@ -914,23 +914,23 @@ const Pt = {
|
|
|
914
914
|
};
|
|
915
915
|
function Ft(e, o) {
|
|
916
916
|
let t = null, n;
|
|
917
|
-
const
|
|
918
|
-
function
|
|
917
|
+
const i = P(e);
|
|
918
|
+
function s() {
|
|
919
919
|
var l;
|
|
920
920
|
clearTimeout(n), (l = t) == null || l.disconnect(), t = null;
|
|
921
921
|
}
|
|
922
922
|
function r(l, c) {
|
|
923
|
-
l === void 0 && (l = !1), c === void 0 && (c = 1),
|
|
923
|
+
l === void 0 && (l = !1), c === void 0 && (c = 1), s();
|
|
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 = ie(u), g = ie(i.clientWidth - (a + d)), w = ie(i.clientHeight - (u + m)), x = ie(a), p = {
|
|
933
|
+
rootMargin: -f + "px " + -g + "px " + -w + "px " + -x + "px",
|
|
934
934
|
threshold: H(0, le(1, c)) || 1
|
|
935
935
|
};
|
|
936
936
|
let v = !0;
|
|
@@ -947,67 +947,67 @@ function Ft(e, o) {
|
|
|
947
947
|
}
|
|
948
948
|
try {
|
|
949
949
|
t = new IntersectionObserver(E, {
|
|
950
|
-
...
|
|
950
|
+
...p,
|
|
951
951
|
// Handle <iframe>s
|
|
952
|
-
root:
|
|
952
|
+
root: i.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
|
}
|
|
959
|
-
return r(!0),
|
|
959
|
+
return r(!0), s;
|
|
960
960
|
}
|
|
961
961
|
function Vt(e, o, t, n) {
|
|
962
962
|
n === void 0 && (n = {});
|
|
963
963
|
const {
|
|
964
|
-
ancestorScroll:
|
|
965
|
-
ancestorResize:
|
|
964
|
+
ancestorScroll: i = !0,
|
|
965
|
+
ancestorResize: s = !0,
|
|
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
|
-
|
|
969
|
+
} = n, a = ke(e), u = i || s ? [...a ? ne(a) : [], ...ne(o)] : [];
|
|
970
|
+
u.forEach((h) => {
|
|
971
|
+
i && h.addEventListener("scroll", t, {
|
|
972
972
|
passive: !0
|
|
973
|
-
}),
|
|
973
|
+
}), s && 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
|
|
985
|
-
c &&
|
|
986
|
-
function
|
|
987
|
-
const
|
|
988
|
-
|
|
983
|
+
}), a && !c && f.observe(a), f.observe(o));
|
|
984
|
+
let g, w = c ? K(e) : null;
|
|
985
|
+
c && x();
|
|
986
|
+
function x() {
|
|
987
|
+
const h = K(e);
|
|
988
|
+
w && (h.x !== w.x || h.y !== w.y || h.width !== w.width || h.height !== w.height) && t(), w = h, g = requestAnimationFrame(x);
|
|
989
989
|
}
|
|
990
990
|
return t(), () => {
|
|
991
|
-
var
|
|
992
|
-
u.forEach((
|
|
993
|
-
|
|
994
|
-
}),
|
|
991
|
+
var h;
|
|
992
|
+
u.forEach((p) => {
|
|
993
|
+
i && p.removeEventListener("scroll", t), s && p.removeEventListener("resize", t);
|
|
994
|
+
}), d == null || d(), (h = f) == null || h.disconnect(), f = null, c && cancelAnimationFrame(g);
|
|
995
995
|
};
|
|
996
996
|
}
|
|
997
|
-
const Wt = bt, Bt = vt, jt =
|
|
998
|
-
const n = /* @__PURE__ */ new Map(),
|
|
997
|
+
const Wt = bt, Bt = vt, jt = xt, $t = (e, o, t) => {
|
|
998
|
+
const n = /* @__PURE__ */ new Map(), i = {
|
|
999
999
|
platform: Pt,
|
|
1000
1000
|
...t
|
|
1001
|
-
},
|
|
1002
|
-
...
|
|
1001
|
+
}, s = {
|
|
1002
|
+
...i.platform,
|
|
1003
1003
|
_c: n
|
|
1004
1004
|
};
|
|
1005
|
-
return
|
|
1006
|
-
...
|
|
1007
|
-
platform:
|
|
1005
|
+
return wt(e, o, {
|
|
1006
|
+
...i,
|
|
1007
|
+
platform: s
|
|
1008
1008
|
});
|
|
1009
1009
|
};
|
|
1010
|
-
var
|
|
1010
|
+
var se = typeof document < "u" ? tt : re;
|
|
1011
1011
|
function fe(e, o) {
|
|
1012
1012
|
if (e === o)
|
|
1013
1013
|
return !0;
|
|
@@ -1015,7 +1015,7 @@ function fe(e, o) {
|
|
|
1015
1015
|
return !1;
|
|
1016
1016
|
if (typeof e == "function" && e.toString() === o.toString())
|
|
1017
1017
|
return !0;
|
|
1018
|
-
let t, n,
|
|
1018
|
+
let t, n, i;
|
|
1019
1019
|
if (e && o && typeof e == "object") {
|
|
1020
1020
|
if (Array.isArray(e)) {
|
|
1021
1021
|
if (t = e.length, t !== o.length) return !1;
|
|
@@ -1024,14 +1024,14 @@ function fe(e, o) {
|
|
|
1024
1024
|
return !1;
|
|
1025
1025
|
return !0;
|
|
1026
1026
|
}
|
|
1027
|
-
if (
|
|
1027
|
+
if (i = Object.keys(e), t = i.length, t !== Object.keys(o).length)
|
|
1028
1028
|
return !1;
|
|
1029
1029
|
for (n = t; n-- !== 0; )
|
|
1030
|
-
if (!{}.hasOwnProperty.call(o,
|
|
1030
|
+
if (!{}.hasOwnProperty.call(o, i[n]))
|
|
1031
1031
|
return !1;
|
|
1032
1032
|
for (n = t; n-- !== 0; ) {
|
|
1033
|
-
const
|
|
1034
|
-
if (!(
|
|
1033
|
+
const s = i[n];
|
|
1034
|
+
if (!(s === "_owner" && e.$$typeof) && !fe(e[s], o[s]))
|
|
1035
1035
|
return !1;
|
|
1036
1036
|
}
|
|
1037
1037
|
return !0;
|
|
@@ -1041,13 +1041,13 @@ 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
|
}
|
|
1048
1048
|
function ye(e) {
|
|
1049
1049
|
const o = C.useRef(e);
|
|
1050
|
-
return
|
|
1050
|
+
return se(() => {
|
|
1051
1051
|
o.current = e;
|
|
1052
1052
|
}), o;
|
|
1053
1053
|
}
|
|
@@ -1057,38 +1057,38 @@ function Ht(e) {
|
|
|
1057
1057
|
placement: o = "bottom",
|
|
1058
1058
|
strategy: t = "absolute",
|
|
1059
1059
|
middleware: n = [],
|
|
1060
|
-
platform:
|
|
1060
|
+
platform: i,
|
|
1061
1061
|
elements: {
|
|
1062
|
-
reference:
|
|
1062
|
+
reference: s,
|
|
1063
1063
|
floating: r
|
|
1064
1064
|
} = {},
|
|
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, w] = C.useState(null), [x, h] = C.useState(null), p = C.useCallback((S) => {
|
|
1078
|
+
S !== O.current && (O.current = S, w(S));
|
|
1079
1079
|
}, []), v = C.useCallback((S) => {
|
|
1080
|
-
S !==
|
|
1081
|
-
}, []), E =
|
|
1082
|
-
if (!O.current || !
|
|
1080
|
+
S !== R.current && (R.current = S, h(S));
|
|
1081
|
+
}, []), E = s || g, y = r || x, O = C.useRef(null), R = C.useRef(null), z = C.useRef(u), Y = c != null, F = ye(c), q = ye(i), 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,21 +1096,21 @@ 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
|
-
}, [
|
|
1103
|
-
|
|
1104
|
-
a === !1 && z.current.isPositioned && (z.current.isPositioned = !1,
|
|
1102
|
+
}, [m, o, t, q, ee]);
|
|
1103
|
+
se(() => {
|
|
1104
|
+
a === !1 && z.current.isPositioned && (z.current.isPositioned = !1, d((S) => ({
|
|
1105
1105
|
...S,
|
|
1106
1106
|
isPositioned: !1
|
|
1107
1107
|
})));
|
|
1108
1108
|
}, [a]);
|
|
1109
1109
|
const I = C.useRef(!1);
|
|
1110
|
-
|
|
1110
|
+
se(() => (I.current = !0, () => {
|
|
1111
1111
|
I.current = !1;
|
|
1112
|
-
}), []),
|
|
1113
|
-
if (E && (O.current = E), y && (
|
|
1112
|
+
}), []), se(() => {
|
|
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),
|
|
@@ -1180,61 +1180,65 @@ function Qe(e) {
|
|
|
1180
1180
|
className: o,
|
|
1181
1181
|
placement: t = "bottom-start",
|
|
1182
1182
|
trigger: n = "hover",
|
|
1183
|
-
content:
|
|
1184
|
-
children:
|
|
1183
|
+
content: i,
|
|
1184
|
+
children: s,
|
|
1185
1185
|
onClose: r,
|
|
1186
1186
|
onOpen: l,
|
|
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, w] = de(a), x = () => u !== void 0 && a !== void 0 ? a : g, h = () => u !== void 0 && a !== void 0 ? u : w, { x: p, y: v, strategy: E, refs: y } = Ht({
|
|
1194
|
+
open: x(),
|
|
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
|
+
x() ? (h()(!1), r == null || r()) : (h()(!0), l == null || l());
|
|
1214
1216
|
}
|
|
1215
|
-
|
|
1217
|
+
R.stopPropagation();
|
|
1216
1218
|
},
|
|
1217
|
-
role:
|
|
1218
|
-
children:
|
|
1219
|
+
role: d,
|
|
1220
|
+
children: s
|
|
1219
1221
|
}
|
|
1220
1222
|
),
|
|
1221
|
-
|
|
1223
|
+
x() && it(
|
|
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
|
-
children:
|
|
1241
|
+
children: i
|
|
1238
1242
|
}
|
|
1239
1243
|
),
|
|
1240
1244
|
document.body
|
|
@@ -1242,59 +1246,62 @@ function Qe(e) {
|
|
|
1242
1246
|
] });
|
|
1243
1247
|
}
|
|
1244
1248
|
function Xt(e) {
|
|
1245
|
-
var
|
|
1249
|
+
var w, x;
|
|
1246
1250
|
const {
|
|
1247
1251
|
items: o = [],
|
|
1248
1252
|
children: t,
|
|
1249
1253
|
moreItemsLabel: n = "",
|
|
1250
|
-
parentRef:
|
|
1251
|
-
data:
|
|
1252
|
-
estimator: r = (
|
|
1254
|
+
parentRef: i,
|
|
1255
|
+
data: s,
|
|
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 = i == null ? void 0 : i.current;
|
|
1270
|
+
if (!h)
|
|
1267
1271
|
return;
|
|
1268
|
-
const
|
|
1269
|
-
|
|
1272
|
+
const p = h.offsetWidth, v = [], E = [], y = r(
|
|
1273
|
+
n,
|
|
1274
|
+
((m == null ? void 0 : m.measureText(n).width) ?? 0) + 10
|
|
1275
|
+
);
|
|
1276
|
+
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
1277
|
visible: v,
|
|
1271
1278
|
hidden: E
|
|
1272
1279
|
});
|
|
1273
|
-
},
|
|
1274
|
-
() => (o == null ? void 0 : o.map((
|
|
1280
|
+
}, g = ve(
|
|
1281
|
+
() => (o == null ? void 0 : o.map((h) => r(h, (m == null ? void 0 : m.measureText(h).width) ?? 0))) ?? [],
|
|
1275
1282
|
[o]
|
|
1276
1283
|
);
|
|
1277
1284
|
return re(() => {
|
|
1278
|
-
|
|
1285
|
+
f();
|
|
1279
1286
|
}, [o]), re(() => {
|
|
1280
|
-
if (!(
|
|
1281
|
-
const
|
|
1282
|
-
|
|
1287
|
+
if (!(i != null && i.current)) return;
|
|
1288
|
+
const h = new ResizeObserver(() => {
|
|
1289
|
+
f();
|
|
1283
1290
|
});
|
|
1284
|
-
return
|
|
1285
|
-
|
|
1291
|
+
return h.observe(i.current), () => {
|
|
1292
|
+
h.disconnect();
|
|
1286
1293
|
};
|
|
1287
|
-
}, [o]), /* @__PURE__ */ W(
|
|
1288
|
-
(
|
|
1289
|
-
((
|
|
1294
|
+
}, [o]), /* @__PURE__ */ W(Fe, { children: [
|
|
1295
|
+
(w = u.visible) == null ? void 0 : w.map((h, p) => t(h, p, s == null ? void 0 : s[p])),
|
|
1296
|
+
((x = u.hidden) == null ? void 0 : x.length) > 0 && /* @__PURE__ */ b(
|
|
1290
1297
|
Qe,
|
|
1291
1298
|
{
|
|
1292
1299
|
trigger: "click",
|
|
1293
1300
|
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
|
-
|
|
1301
|
+
(h, p) => t(
|
|
1302
|
+
h,
|
|
1303
|
+
u.visible.length + p,
|
|
1304
|
+
s == null ? void 0 : s[u.visible.length + p]
|
|
1298
1305
|
)
|
|
1299
1306
|
) }),
|
|
1300
1307
|
children: /* @__PURE__ */ b(We, { className: a, variant: c, children: /* @__PURE__ */ b("p", { children: `+${u.hidden.length} ${n}` }) }, "more_items_button")
|
|
@@ -1303,35 +1310,35 @@ function Xt(e) {
|
|
|
1303
1310
|
] });
|
|
1304
1311
|
}
|
|
1305
1312
|
function X(e, o, t) {
|
|
1306
|
-
let n = t.initialDeps ?? [],
|
|
1313
|
+
let n = t.initialDeps ?? [], i;
|
|
1307
1314
|
return () => {
|
|
1308
|
-
var
|
|
1315
|
+
var s, r, l, c;
|
|
1309
1316
|
let a;
|
|
1310
|
-
t.key && ((
|
|
1317
|
+
t.key && ((s = t.debug) != null && s.call(t)) && (a = Date.now());
|
|
1311
1318
|
const u = e();
|
|
1312
|
-
if (!(u.length !== n.length || u.some((
|
|
1313
|
-
return
|
|
1319
|
+
if (!(u.length !== n.length || u.some((f, g) => n[g] !== f)))
|
|
1320
|
+
return i;
|
|
1314
1321
|
n = u;
|
|
1315
|
-
let
|
|
1316
|
-
if (t.key && ((r = t.debug) != null && r.call(t)) && (
|
|
1317
|
-
const
|
|
1318
|
-
for (
|
|
1319
|
-
|
|
1320
|
-
return
|
|
1322
|
+
let m;
|
|
1323
|
+
if (t.key && ((r = t.debug) != null && r.call(t)) && (m = Date.now()), i = o(...u), t.key && ((l = t.debug) != null && l.call(t))) {
|
|
1324
|
+
const f = Math.round((Date.now() - a) * 100) / 100, g = Math.round((Date.now() - m) * 100) / 100, w = g / 16, x = (h, p) => {
|
|
1325
|
+
for (h = String(h); h.length < p; )
|
|
1326
|
+
h = " " + h;
|
|
1327
|
+
return h;
|
|
1321
1328
|
};
|
|
1322
1329
|
console.info(
|
|
1323
|
-
`%c⏱ ${
|
|
1330
|
+
`%c⏱ ${x(g, 5)} /${x(f, 5)} ms`,
|
|
1324
1331
|
`
|
|
1325
1332
|
font-size: .6rem;
|
|
1326
1333
|
font-weight: bold;
|
|
1327
1334
|
color: hsl(${Math.max(
|
|
1328
1335
|
0,
|
|
1329
|
-
Math.min(120 - 120 *
|
|
1336
|
+
Math.min(120 - 120 * w, 120)
|
|
1330
1337
|
)}deg 100% 31%);`,
|
|
1331
1338
|
t == null ? void 0 : t.key
|
|
1332
1339
|
);
|
|
1333
1340
|
}
|
|
1334
|
-
return (c = t == null ? void 0 : t.onChange) == null || c.call(t,
|
|
1341
|
+
return (c = t == null ? void 0 : t.onChange) == null || c.call(t, i), i;
|
|
1335
1342
|
};
|
|
1336
1343
|
}
|
|
1337
1344
|
function be(e, o) {
|
|
@@ -1341,13 +1348,13 @@ function be(e, o) {
|
|
|
1341
1348
|
}
|
|
1342
1349
|
const Zt = (e, o) => Math.abs(e - o) < 1, Gt = (e, o, t) => {
|
|
1343
1350
|
let n;
|
|
1344
|
-
return function(...
|
|
1345
|
-
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this,
|
|
1351
|
+
return function(...i) {
|
|
1352
|
+
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this, i), t);
|
|
1346
1353
|
};
|
|
1347
1354
|
}, Jt = (e) => e, Qt = (e) => {
|
|
1348
1355
|
const o = Math.max(e.startIndex - e.overscan, 0), t = Math.min(e.endIndex + e.overscan, e.count - 1), n = [];
|
|
1349
|
-
for (let
|
|
1350
|
-
n.push(
|
|
1356
|
+
for (let i = o; i <= t; i++)
|
|
1357
|
+
n.push(i);
|
|
1351
1358
|
return n;
|
|
1352
1359
|
}, en = (e, o) => {
|
|
1353
1360
|
const t = e.scrollElement;
|
|
@@ -1356,28 +1363,28 @@ const Zt = (e, o) => Math.abs(e - o) < 1, Gt = (e, o, t) => {
|
|
|
1356
1363
|
const n = e.targetWindow;
|
|
1357
1364
|
if (!n)
|
|
1358
1365
|
return;
|
|
1359
|
-
const
|
|
1366
|
+
const i = (r) => {
|
|
1360
1367
|
const { width: l, height: c } = r;
|
|
1361
1368
|
o({ width: Math.round(l), height: Math.round(c) });
|
|
1362
1369
|
};
|
|
1363
|
-
if (
|
|
1370
|
+
if (i(t.getBoundingClientRect()), !n.ResizeObserver)
|
|
1364
1371
|
return () => {
|
|
1365
1372
|
};
|
|
1366
|
-
const
|
|
1373
|
+
const s = new n.ResizeObserver((r) => {
|
|
1367
1374
|
const l = r[0];
|
|
1368
1375
|
if (l != null && l.borderBoxSize) {
|
|
1369
1376
|
const c = l.borderBoxSize[0];
|
|
1370
1377
|
if (c) {
|
|
1371
|
-
|
|
1378
|
+
i({ width: c.inlineSize, height: c.blockSize });
|
|
1372
1379
|
return;
|
|
1373
1380
|
}
|
|
1374
1381
|
}
|
|
1375
|
-
|
|
1382
|
+
i(t.getBoundingClientRect());
|
|
1376
1383
|
});
|
|
1377
|
-
return
|
|
1378
|
-
|
|
1384
|
+
return s.observe(t, { box: "border-box" }), () => {
|
|
1385
|
+
s.unobserve(t);
|
|
1379
1386
|
};
|
|
1380
|
-
},
|
|
1387
|
+
}, De = {
|
|
1381
1388
|
passive: !0
|
|
1382
1389
|
}, tn = typeof window > "u" ? !0 : "onscrollend" in window, nn = (e, o) => {
|
|
1383
1390
|
const t = e.scrollElement;
|
|
@@ -1386,19 +1393,19 @@ const Zt = (e, o) => Math.abs(e - o) < 1, Gt = (e, o, t) => {
|
|
|
1386
1393
|
const n = e.targetWindow;
|
|
1387
1394
|
if (!n)
|
|
1388
1395
|
return;
|
|
1389
|
-
let
|
|
1390
|
-
const
|
|
1396
|
+
let i = 0;
|
|
1397
|
+
const s = e.options.useScrollendEvent && tn ? () => {
|
|
1391
1398
|
} : Gt(
|
|
1392
1399
|
n,
|
|
1393
1400
|
() => {
|
|
1394
|
-
o(
|
|
1401
|
+
o(i, !1);
|
|
1395
1402
|
},
|
|
1396
1403
|
e.options.isScrollingResetDelay
|
|
1397
1404
|
), r = (a) => () => {
|
|
1398
|
-
const { horizontal: u, isRtl:
|
|
1399
|
-
|
|
1405
|
+
const { horizontal: u, isRtl: d } = e.options;
|
|
1406
|
+
i = u ? t.scrollLeft * (d && -1 || 1) : t.scrollTop, s(), o(i, a);
|
|
1400
1407
|
}, l = r(!0), c = r(!1);
|
|
1401
|
-
return c(), t.addEventListener("scroll", l,
|
|
1408
|
+
return c(), t.addEventListener("scroll", l, De), t.addEventListener("scrollend", c, De), () => {
|
|
1402
1409
|
t.removeEventListener("scroll", l), t.removeEventListener("scrollend", c);
|
|
1403
1410
|
};
|
|
1404
1411
|
}, on = (e, o, t) => {
|
|
@@ -1416,9 +1423,9 @@ const Zt = (e, o) => Math.abs(e - o) < 1, Gt = (e, o, t) => {
|
|
|
1416
1423
|
adjustments: o = 0,
|
|
1417
1424
|
behavior: t
|
|
1418
1425
|
}, n) => {
|
|
1419
|
-
var
|
|
1426
|
+
var i, s;
|
|
1420
1427
|
const r = e + o;
|
|
1421
|
-
(
|
|
1428
|
+
(s = (i = n.scrollElement) == null ? void 0 : i.scrollTo) == null || s.call(i, {
|
|
1422
1429
|
[n.options.horizontal ? "left" : "top"]: r,
|
|
1423
1430
|
behavior: t
|
|
1424
1431
|
});
|
|
@@ -1427,28 +1434,28 @@ class rn {
|
|
|
1427
1434
|
constructor(o) {
|
|
1428
1435
|
this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
|
|
1429
1436
|
let t = null;
|
|
1430
|
-
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((
|
|
1431
|
-
|
|
1432
|
-
this._measureElement(
|
|
1437
|
+
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((i) => {
|
|
1438
|
+
i.forEach((s) => {
|
|
1439
|
+
this._measureElement(s.target, s);
|
|
1433
1440
|
});
|
|
1434
1441
|
}));
|
|
1435
1442
|
return {
|
|
1436
1443
|
disconnect: () => {
|
|
1437
|
-
var s;
|
|
1438
|
-
(s = n()) == null || s.disconnect(), t = null;
|
|
1439
|
-
},
|
|
1440
|
-
observe: (s) => {
|
|
1441
1444
|
var i;
|
|
1442
|
-
|
|
1445
|
+
(i = n()) == null || i.disconnect(), t = null;
|
|
1443
1446
|
},
|
|
1444
|
-
|
|
1445
|
-
var
|
|
1446
|
-
return (
|
|
1447
|
+
observe: (i) => {
|
|
1448
|
+
var s;
|
|
1449
|
+
return (s = n()) == null ? void 0 : s.observe(i, { box: "border-box" });
|
|
1450
|
+
},
|
|
1451
|
+
unobserve: (i) => {
|
|
1452
|
+
var s;
|
|
1453
|
+
return (s = n()) == null ? void 0 : s.unobserve(i);
|
|
1447
1454
|
}
|
|
1448
1455
|
};
|
|
1449
1456
|
})(), this.range = null, this.setOptions = (t) => {
|
|
1450
|
-
Object.entries(t).forEach(([n,
|
|
1451
|
-
typeof
|
|
1457
|
+
Object.entries(t).forEach(([n, i]) => {
|
|
1458
|
+
typeof i > "u" && delete t[n];
|
|
1452
1459
|
}), this.options = {
|
|
1453
1460
|
debug: !1,
|
|
1454
1461
|
initialOffset: 0,
|
|
@@ -1476,8 +1483,8 @@ class rn {
|
|
|
1476
1483
|
...t
|
|
1477
1484
|
};
|
|
1478
1485
|
}, this.notify = (t) => {
|
|
1479
|
-
var n,
|
|
1480
|
-
(
|
|
1486
|
+
var n, i;
|
|
1487
|
+
(i = (n = this.options).onChange) == null || i.call(n, this, t);
|
|
1481
1488
|
}, this.maybeNotify = X(
|
|
1482
1489
|
() => (this.calculateRange(), [
|
|
1483
1490
|
this.isScrolling,
|
|
@@ -1508,34 +1515,34 @@ class rn {
|
|
|
1508
1515
|
this.maybeNotify();
|
|
1509
1516
|
return;
|
|
1510
1517
|
}
|
|
1511
|
-
this.scrollElement = n, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((t = this.scrollElement) == null ? void 0 : t.window) ?? null, this.elementsCache.forEach((
|
|
1512
|
-
this.observer.observe(
|
|
1518
|
+
this.scrollElement = n, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((t = this.scrollElement) == null ? void 0 : t.window) ?? null, this.elementsCache.forEach((i) => {
|
|
1519
|
+
this.observer.observe(i);
|
|
1513
1520
|
}), this._scrollToOffset(this.getScrollOffset(), {
|
|
1514
1521
|
adjustments: void 0,
|
|
1515
1522
|
behavior: void 0
|
|
1516
1523
|
}), this.unsubs.push(
|
|
1517
|
-
this.options.observeElementRect(this, (
|
|
1518
|
-
this.scrollRect =
|
|
1524
|
+
this.options.observeElementRect(this, (i) => {
|
|
1525
|
+
this.scrollRect = i, this.maybeNotify();
|
|
1519
1526
|
})
|
|
1520
1527
|
), this.unsubs.push(
|
|
1521
|
-
this.options.observeElementOffset(this, (
|
|
1522
|
-
this.scrollAdjustments = 0, this.scrollDirection =
|
|
1528
|
+
this.options.observeElementOffset(this, (i, s) => {
|
|
1529
|
+
this.scrollAdjustments = 0, this.scrollDirection = s ? this.getScrollOffset() < i ? "forward" : "backward" : null, this.scrollOffset = i, this.isScrolling = s, this.maybeNotify();
|
|
1523
1530
|
})
|
|
1524
1531
|
);
|
|
1525
1532
|
}
|
|
1526
1533
|
}, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getFurthestMeasurement = (t, n) => {
|
|
1527
|
-
const
|
|
1534
|
+
const i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
|
|
1528
1535
|
for (let r = n - 1; r >= 0; r--) {
|
|
1529
1536
|
const l = t[r];
|
|
1530
|
-
if (
|
|
1537
|
+
if (i.has(l.lane))
|
|
1531
1538
|
continue;
|
|
1532
|
-
const c =
|
|
1539
|
+
const c = s.get(
|
|
1533
1540
|
l.lane
|
|
1534
1541
|
);
|
|
1535
|
-
if (c == null || l.end > c.end ?
|
|
1542
|
+
if (c == null || l.end > c.end ? s.set(l.lane, l) : l.end < c.end && i.set(l.lane, !0), i.size === this.options.lanes)
|
|
1536
1543
|
break;
|
|
1537
1544
|
}
|
|
1538
|
-
return
|
|
1545
|
+
return s.size === this.options.lanes ? Array.from(s.values()).sort((r, l) => r.end === l.end ? r.index - l.index : r.end - l.end)[0] : void 0;
|
|
1539
1546
|
}, this.getMeasurementOptions = X(
|
|
1540
1547
|
() => [
|
|
1541
1548
|
this.options.count,
|
|
@@ -1544,11 +1551,11 @@ class rn {
|
|
|
1544
1551
|
this.options.getItemKey,
|
|
1545
1552
|
this.options.enabled
|
|
1546
1553
|
],
|
|
1547
|
-
(t, n,
|
|
1554
|
+
(t, n, i, s, r) => (this.pendingMeasuredCacheIndexes = [], {
|
|
1548
1555
|
count: t,
|
|
1549
1556
|
paddingStart: n,
|
|
1550
|
-
scrollMargin:
|
|
1551
|
-
getItemKey:
|
|
1557
|
+
scrollMargin: i,
|
|
1558
|
+
getItemKey: s,
|
|
1552
1559
|
enabled: r
|
|
1553
1560
|
}),
|
|
1554
1561
|
{
|
|
@@ -1556,7 +1563,7 @@ class rn {
|
|
|
1556
1563
|
}
|
|
1557
1564
|
), this.getMeasurements = X(
|
|
1558
1565
|
() => [this.getMeasurementOptions(), this.itemSizeCache],
|
|
1559
|
-
({ count: t, paddingStart: n, scrollMargin:
|
|
1566
|
+
({ count: t, paddingStart: n, scrollMargin: i, getItemKey: s, enabled: r }, l) => {
|
|
1560
1567
|
if (!r)
|
|
1561
1568
|
return this.measurementsCache = [], this.itemSizeCache.clear(), [];
|
|
1562
1569
|
this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((u) => {
|
|
@@ -1566,14 +1573,14 @@ class rn {
|
|
|
1566
1573
|
this.pendingMeasuredCacheIndexes = [];
|
|
1567
1574
|
const a = this.measurementsCache.slice(0, c);
|
|
1568
1575
|
for (let u = c; u < t; u++) {
|
|
1569
|
-
const
|
|
1576
|
+
const d = s(u), m = this.options.lanes === 1 ? a[u - 1] : this.getFurthestMeasurement(a, u), f = m ? m.end + this.options.gap : n + i, g = l.get(d), w = typeof g == "number" ? g : this.options.estimateSize(u), x = f + w, h = m ? m.lane : u % this.options.lanes;
|
|
1570
1577
|
a[u] = {
|
|
1571
1578
|
index: u,
|
|
1572
|
-
start:
|
|
1573
|
-
size:
|
|
1574
|
-
end:
|
|
1575
|
-
key:
|
|
1576
|
-
lane:
|
|
1579
|
+
start: f,
|
|
1580
|
+
size: w,
|
|
1581
|
+
end: x,
|
|
1582
|
+
key: d,
|
|
1583
|
+
lane: h
|
|
1577
1584
|
};
|
|
1578
1585
|
}
|
|
1579
1586
|
return this.measurementsCache = a, a;
|
|
@@ -1584,10 +1591,10 @@ class rn {
|
|
|
1584
1591
|
}
|
|
1585
1592
|
), this.calculateRange = X(
|
|
1586
1593
|
() => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
|
|
1587
|
-
(t, n,
|
|
1594
|
+
(t, n, i) => this.range = t.length > 0 && n > 0 ? ln({
|
|
1588
1595
|
measurements: t,
|
|
1589
1596
|
outerSize: n,
|
|
1590
|
-
scrollOffset:
|
|
1597
|
+
scrollOffset: i
|
|
1591
1598
|
}) : null,
|
|
1592
1599
|
{
|
|
1593
1600
|
key: process.env.NODE_ENV !== "production" && "calculateRange",
|
|
@@ -1600,40 +1607,40 @@ class rn {
|
|
|
1600
1607
|
this.options.overscan,
|
|
1601
1608
|
this.options.count
|
|
1602
1609
|
],
|
|
1603
|
-
(t, n,
|
|
1610
|
+
(t, n, i, s) => n === null ? [] : t({
|
|
1604
1611
|
startIndex: n.startIndex,
|
|
1605
1612
|
endIndex: n.endIndex,
|
|
1606
|
-
overscan:
|
|
1607
|
-
count:
|
|
1613
|
+
overscan: i,
|
|
1614
|
+
count: s
|
|
1608
1615
|
}),
|
|
1609
1616
|
{
|
|
1610
1617
|
key: process.env.NODE_ENV !== "production" && "getIndexes",
|
|
1611
1618
|
debug: () => this.options.debug
|
|
1612
1619
|
}
|
|
1613
1620
|
), this.indexFromElement = (t) => {
|
|
1614
|
-
const n = this.options.indexAttribute,
|
|
1615
|
-
return
|
|
1621
|
+
const n = this.options.indexAttribute, i = t.getAttribute(n);
|
|
1622
|
+
return i ? parseInt(i, 10) : (console.warn(
|
|
1616
1623
|
`Missing attribute name '${n}={index}' on measured element.`
|
|
1617
1624
|
), -1);
|
|
1618
1625
|
}, this._measureElement = (t, n) => {
|
|
1619
|
-
const
|
|
1620
|
-
if (!
|
|
1626
|
+
const i = this.indexFromElement(t), s = this.measurementsCache[i];
|
|
1627
|
+
if (!s)
|
|
1621
1628
|
return;
|
|
1622
|
-
const r =
|
|
1623
|
-
l !== t && (l && this.observer.unobserve(l), this.observer.observe(t), this.elementsCache.set(r, t)), t.isConnected && this.resizeItem(
|
|
1629
|
+
const r = s.key, l = this.elementsCache.get(r);
|
|
1630
|
+
l !== t && (l && this.observer.unobserve(l), this.observer.observe(t), this.elementsCache.set(r, t)), t.isConnected && this.resizeItem(i, this.options.measureElement(t, n, this));
|
|
1624
1631
|
}, this.resizeItem = (t, n) => {
|
|
1625
|
-
const
|
|
1626
|
-
if (!
|
|
1632
|
+
const i = this.measurementsCache[t];
|
|
1633
|
+
if (!i)
|
|
1627
1634
|
return;
|
|
1628
|
-
const
|
|
1629
|
-
r !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(
|
|
1635
|
+
const s = this.itemSizeCache.get(i.key) ?? i.size, r = n - s;
|
|
1636
|
+
r !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(i, r, this) : i.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", r), this._scrollToOffset(this.getScrollOffset(), {
|
|
1630
1637
|
adjustments: this.scrollAdjustments += r,
|
|
1631
1638
|
behavior: void 0
|
|
1632
|
-
})), this.pendingMeasuredCacheIndexes.push(
|
|
1639
|
+
})), this.pendingMeasuredCacheIndexes.push(i.index), this.itemSizeCache = new Map(this.itemSizeCache.set(i.key, n)), this.notify(!1));
|
|
1633
1640
|
}, this.measureElement = (t) => {
|
|
1634
1641
|
if (!t) {
|
|
1635
|
-
this.elementsCache.forEach((n,
|
|
1636
|
-
n.isConnected || (this.observer.unobserve(n), this.elementsCache.delete(
|
|
1642
|
+
this.elementsCache.forEach((n, i) => {
|
|
1643
|
+
n.isConnected || (this.observer.unobserve(n), this.elementsCache.delete(i));
|
|
1637
1644
|
});
|
|
1638
1645
|
return;
|
|
1639
1646
|
}
|
|
@@ -1641,12 +1648,12 @@ class rn {
|
|
|
1641
1648
|
}, this.getVirtualItems = X(
|
|
1642
1649
|
() => [this.getIndexes(), this.getMeasurements()],
|
|
1643
1650
|
(t, n) => {
|
|
1644
|
-
const
|
|
1645
|
-
for (let
|
|
1646
|
-
const l = t[
|
|
1647
|
-
|
|
1651
|
+
const i = [];
|
|
1652
|
+
for (let s = 0, r = t.length; s < r; s++) {
|
|
1653
|
+
const l = t[s], c = n[l];
|
|
1654
|
+
i.push(c);
|
|
1648
1655
|
}
|
|
1649
|
-
return
|
|
1656
|
+
return i;
|
|
1650
1657
|
},
|
|
1651
1658
|
{
|
|
1652
1659
|
key: process.env.NODE_ENV !== "production" && "getVirtualItems",
|
|
@@ -1659,56 +1666,56 @@ class rn {
|
|
|
1659
1666
|
n[et(
|
|
1660
1667
|
0,
|
|
1661
1668
|
n.length - 1,
|
|
1662
|
-
(
|
|
1669
|
+
(i) => be(n[i]).start,
|
|
1663
1670
|
t
|
|
1664
1671
|
)]
|
|
1665
1672
|
);
|
|
1666
1673
|
}, this.getOffsetForAlignment = (t, n) => {
|
|
1667
|
-
const
|
|
1668
|
-
n === "auto" && (t <=
|
|
1669
|
-
const r = this.options.horizontal ? "scrollWidth" : "scrollHeight", c = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[r] : this.scrollElement[r] : 0) -
|
|
1674
|
+
const i = this.getSize(), s = this.getScrollOffset();
|
|
1675
|
+
n === "auto" && (t <= s ? n = "start" : t >= s + i ? n = "end" : n = "start"), n === "start" ? t = t : n === "end" ? t = t - i : n === "center" && (t = t - i / 2);
|
|
1676
|
+
const r = this.options.horizontal ? "scrollWidth" : "scrollHeight", c = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[r] : this.scrollElement[r] : 0) - i;
|
|
1670
1677
|
return Math.max(Math.min(c, t), 0);
|
|
1671
1678
|
}, this.getOffsetForIndex = (t, n = "auto") => {
|
|
1672
1679
|
t = Math.max(0, Math.min(t, this.options.count - 1));
|
|
1673
|
-
const
|
|
1674
|
-
if (!
|
|
1680
|
+
const i = this.measurementsCache[t];
|
|
1681
|
+
if (!i)
|
|
1675
1682
|
return;
|
|
1676
|
-
const
|
|
1683
|
+
const s = this.getSize(), r = this.getScrollOffset();
|
|
1677
1684
|
if (n === "auto")
|
|
1678
|
-
if (
|
|
1685
|
+
if (i.end >= r + s - this.options.scrollPaddingEnd)
|
|
1679
1686
|
n = "end";
|
|
1680
|
-
else if (
|
|
1687
|
+
else if (i.start <= r + this.options.scrollPaddingStart)
|
|
1681
1688
|
n = "start";
|
|
1682
1689
|
else
|
|
1683
1690
|
return [r, n];
|
|
1684
|
-
const l = n === "end" ?
|
|
1691
|
+
const l = n === "end" ? i.end + this.options.scrollPaddingEnd : i.start - this.options.scrollPaddingStart;
|
|
1685
1692
|
return [this.getOffsetForAlignment(l, n), n];
|
|
1686
1693
|
}, this.isDynamicMode = () => this.elementsCache.size > 0, this.cancelScrollToIndex = () => {
|
|
1687
1694
|
this.scrollToIndexTimeoutId !== null && this.targetWindow && (this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId), this.scrollToIndexTimeoutId = null);
|
|
1688
|
-
}, this.scrollToOffset = (t, { align: n = "start", behavior:
|
|
1689
|
-
this.cancelScrollToIndex(),
|
|
1695
|
+
}, this.scrollToOffset = (t, { align: n = "start", behavior: i } = {}) => {
|
|
1696
|
+
this.cancelScrollToIndex(), i === "smooth" && this.isDynamicMode() && console.warn(
|
|
1690
1697
|
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
1691
1698
|
), this._scrollToOffset(this.getOffsetForAlignment(t, n), {
|
|
1692
1699
|
adjustments: void 0,
|
|
1693
|
-
behavior:
|
|
1700
|
+
behavior: i
|
|
1694
1701
|
});
|
|
1695
|
-
}, this.scrollToIndex = (t, { align: n = "auto", behavior:
|
|
1696
|
-
t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(),
|
|
1702
|
+
}, this.scrollToIndex = (t, { align: n = "auto", behavior: i } = {}) => {
|
|
1703
|
+
t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(), i === "smooth" && this.isDynamicMode() && console.warn(
|
|
1697
1704
|
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
1698
1705
|
);
|
|
1699
|
-
const
|
|
1700
|
-
if (!
|
|
1701
|
-
const [r, l] =
|
|
1702
|
-
this._scrollToOffset(r, { adjustments: void 0, behavior:
|
|
1706
|
+
const s = this.getOffsetForIndex(t, n);
|
|
1707
|
+
if (!s) return;
|
|
1708
|
+
const [r, l] = s;
|
|
1709
|
+
this._scrollToOffset(r, { adjustments: void 0, behavior: i }), i !== "smooth" && this.isDynamicMode() && this.targetWindow && (this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
|
|
1703
1710
|
if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
|
|
1704
1711
|
this.options.getItemKey(t)
|
|
1705
1712
|
)) {
|
|
1706
1713
|
const [a] = be(
|
|
1707
1714
|
this.getOffsetForIndex(t, l)
|
|
1708
1715
|
);
|
|
1709
|
-
Zt(a, this.getScrollOffset()) || this.scrollToIndex(t, { align: l, behavior:
|
|
1716
|
+
Zt(a, this.getScrollOffset()) || this.scrollToIndex(t, { align: l, behavior: i });
|
|
1710
1717
|
} else
|
|
1711
|
-
this.scrollToIndex(t, { align: l, behavior:
|
|
1718
|
+
this.scrollToIndex(t, { align: l, behavior: i });
|
|
1712
1719
|
}));
|
|
1713
1720
|
}, this.scrollBy = (t, { behavior: n } = {}) => {
|
|
1714
1721
|
this.cancelScrollToIndex(), n === "smooth" && this.isDynamicMode() && console.warn(
|
|
@@ -1720,18 +1727,18 @@ class rn {
|
|
|
1720
1727
|
}, this.getTotalSize = () => {
|
|
1721
1728
|
var t;
|
|
1722
1729
|
const n = this.getMeasurements();
|
|
1723
|
-
let
|
|
1724
|
-
return n.length === 0 ?
|
|
1725
|
-
...n.slice(-this.options.lanes).map((
|
|
1730
|
+
let i;
|
|
1731
|
+
return n.length === 0 ? i = this.options.paddingStart : i = this.options.lanes === 1 ? ((t = n[n.length - 1]) == null ? void 0 : t.end) ?? 0 : Math.max(
|
|
1732
|
+
...n.slice(-this.options.lanes).map((s) => s.end)
|
|
1726
1733
|
), Math.max(
|
|
1727
|
-
|
|
1734
|
+
i - this.options.scrollMargin + this.options.paddingEnd,
|
|
1728
1735
|
0
|
|
1729
1736
|
);
|
|
1730
1737
|
}, this._scrollToOffset = (t, {
|
|
1731
1738
|
adjustments: n,
|
|
1732
|
-
behavior:
|
|
1739
|
+
behavior: i
|
|
1733
1740
|
}) => {
|
|
1734
|
-
this.options.scrollToFn(t, { behavior:
|
|
1741
|
+
this.options.scrollToFn(t, { behavior: i, adjustments: n }, this);
|
|
1735
1742
|
}, this.measure = () => {
|
|
1736
1743
|
this.itemSizeCache = /* @__PURE__ */ new Map(), this.notify(!1);
|
|
1737
1744
|
}, this.setOptions(o);
|
|
@@ -1739,13 +1746,13 @@ class rn {
|
|
|
1739
1746
|
}
|
|
1740
1747
|
const et = (e, o, t, n) => {
|
|
1741
1748
|
for (; e <= o; ) {
|
|
1742
|
-
const
|
|
1743
|
-
if (
|
|
1744
|
-
e =
|
|
1745
|
-
else if (
|
|
1746
|
-
o =
|
|
1749
|
+
const i = (e + o) / 2 | 0, s = t(i);
|
|
1750
|
+
if (s < n)
|
|
1751
|
+
e = i + 1;
|
|
1752
|
+
else if (s > n)
|
|
1753
|
+
o = i - 1;
|
|
1747
1754
|
else
|
|
1748
|
-
return
|
|
1755
|
+
return i;
|
|
1749
1756
|
}
|
|
1750
1757
|
return e > 0 ? e - 1 : 0;
|
|
1751
1758
|
};
|
|
@@ -1754,24 +1761,24 @@ function ln({
|
|
|
1754
1761
|
outerSize: o,
|
|
1755
1762
|
scrollOffset: t
|
|
1756
1763
|
}) {
|
|
1757
|
-
const n = e.length - 1,
|
|
1758
|
-
let r =
|
|
1764
|
+
const n = e.length - 1, s = et(0, n, (l) => e[l].start, t);
|
|
1765
|
+
let r = s;
|
|
1759
1766
|
for (; r < n && e[r].end < t + o; )
|
|
1760
1767
|
r++;
|
|
1761
|
-
return { startIndex:
|
|
1768
|
+
return { startIndex: s, endIndex: r };
|
|
1762
1769
|
}
|
|
1763
|
-
const
|
|
1770
|
+
const Pe = typeof document < "u" ? C.useLayoutEffect : C.useEffect;
|
|
1764
1771
|
function cn(e) {
|
|
1765
1772
|
const o = C.useReducer(() => ({}), {})[1], t = {
|
|
1766
1773
|
...e,
|
|
1767
|
-
onChange: (
|
|
1774
|
+
onChange: (i, s) => {
|
|
1768
1775
|
var r;
|
|
1769
|
-
|
|
1776
|
+
s ? st(o) : o(), (r = e.onChange) == null || r.call(e, i, s);
|
|
1770
1777
|
}
|
|
1771
1778
|
}, [n] = C.useState(
|
|
1772
1779
|
() => new rn(t)
|
|
1773
1780
|
);
|
|
1774
|
-
return n.setOptions(t),
|
|
1781
|
+
return n.setOptions(t), Pe(() => n._didMount(), []), Pe(() => n._willUpdate()), n;
|
|
1775
1782
|
}
|
|
1776
1783
|
function an(e) {
|
|
1777
1784
|
return cn({
|
|
@@ -1833,76 +1840,78 @@ function dn(e) {
|
|
|
1833
1840
|
}
|
|
1834
1841
|
);
|
|
1835
1842
|
}
|
|
1836
|
-
function
|
|
1843
|
+
function wn(e) {
|
|
1844
|
+
var g;
|
|
1837
1845
|
const {
|
|
1838
1846
|
items: o,
|
|
1839
1847
|
selected: t,
|
|
1840
1848
|
className: n,
|
|
1841
|
-
onChange:
|
|
1842
|
-
disabled:
|
|
1849
|
+
onChange: i,
|
|
1850
|
+
disabled: s,
|
|
1843
1851
|
placeholder: r = "Select an Item",
|
|
1844
1852
|
multiple: l,
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
onAdd: f
|
|
1849
|
-
} = e, g = Fe(null), [h, d] = de(!1);
|
|
1853
|
+
mutable: c,
|
|
1854
|
+
onAdd: a
|
|
1855
|
+
} = e, u = Ee(null), [d, m] = de(!1), f = Ee(null);
|
|
1850
1856
|
return /* @__PURE__ */ b(
|
|
1851
1857
|
Qe,
|
|
1852
1858
|
{
|
|
1853
1859
|
placement: "bottom",
|
|
1854
1860
|
trigger: "click",
|
|
1855
|
-
show:
|
|
1856
|
-
setShow:
|
|
1861
|
+
show: d,
|
|
1862
|
+
setShow: m,
|
|
1857
1863
|
role: "combobox",
|
|
1858
|
-
disabled:
|
|
1864
|
+
disabled: s,
|
|
1865
|
+
style: {
|
|
1866
|
+
"--input-width": `${(g = f.current) == null ? void 0 : g.offsetWidth}px`
|
|
1867
|
+
},
|
|
1859
1868
|
content: /* @__PURE__ */ b(
|
|
1860
1869
|
hn,
|
|
1861
1870
|
{
|
|
1862
|
-
...
|
|
1863
|
-
...l ? { multiple: l, items: o, onChange:
|
|
1864
|
-
width: c
|
|
1871
|
+
...c ? { mutable: c, onAdd: a } : { mutable: c },
|
|
1872
|
+
...l ? { multiple: l, items: o, onChange: i, selected: t } : { items: o, onChange: i, selected: t }
|
|
1865
1873
|
}
|
|
1866
1874
|
),
|
|
1867
1875
|
children: /* @__PURE__ */ W(
|
|
1868
1876
|
"div",
|
|
1869
1877
|
{
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
h && "border-primary shadow-sm shadow-ring",
|
|
1878
|
+
className: k(
|
|
1879
|
+
"inline-flex h-10 w-56 grow items-center justify-between rounded border-2 border-input bg-background p-2 transition",
|
|
1880
|
+
s ? "cursor-not-allowed bg-muted text-muted" : "cursor-pointer",
|
|
1881
|
+
d && "border-primary shadow-sm shadow-ring",
|
|
1875
1882
|
n
|
|
1876
1883
|
),
|
|
1884
|
+
ref: f,
|
|
1877
1885
|
children: [
|
|
1878
1886
|
/* @__PURE__ */ b(
|
|
1879
1887
|
"div",
|
|
1880
1888
|
{
|
|
1881
|
-
className:
|
|
1889
|
+
className: k(
|
|
1882
1890
|
"flex max-w-[calc(100%-30px)] flex-none grow items-center gap-1 text-sm",
|
|
1883
|
-
|
|
1891
|
+
s ? "text-muted-foreground" : "text-foreground"
|
|
1884
1892
|
),
|
|
1885
|
-
ref:
|
|
1893
|
+
ref: u,
|
|
1886
1894
|
children: l ? /* @__PURE__ */ b(
|
|
1887
1895
|
Xt,
|
|
1888
1896
|
{
|
|
1889
|
-
items: t.map((
|
|
1897
|
+
items: t.map((w) => w.text),
|
|
1890
1898
|
data: t,
|
|
1891
|
-
parentRef:
|
|
1899
|
+
parentRef: u,
|
|
1900
|
+
estimator: (w, x) => x + 40,
|
|
1892
1901
|
badgeVariant: "secondary",
|
|
1893
1902
|
badgeStyles: "!bg-input h-6 min-w-min gap-2 !bg-input",
|
|
1894
|
-
children: (
|
|
1903
|
+
children: (w, x, h) => /* @__PURE__ */ W(
|
|
1895
1904
|
We,
|
|
1896
1905
|
{
|
|
1897
1906
|
className: "flex h-6 min-w-min gap-2 !bg-input pr-1",
|
|
1898
1907
|
variant: "secondary",
|
|
1899
1908
|
children: [
|
|
1900
|
-
|
|
1909
|
+
w,
|
|
1901
1910
|
/* @__PURE__ */ b(
|
|
1902
1911
|
lt,
|
|
1903
1912
|
{
|
|
1904
1913
|
onClick: () => {
|
|
1905
|
-
|
|
1914
|
+
i(t.filter((p) => p.key !== (h == null ? void 0 : h.key)));
|
|
1906
1915
|
},
|
|
1907
1916
|
variant: "icon",
|
|
1908
1917
|
size: "icon",
|
|
@@ -1912,7 +1921,7 @@ function xn(e) {
|
|
|
1912
1921
|
)
|
|
1913
1922
|
]
|
|
1914
1923
|
},
|
|
1915
|
-
`collapsed_item_${
|
|
1924
|
+
`collapsed_item_${x}`
|
|
1916
1925
|
)
|
|
1917
1926
|
}
|
|
1918
1927
|
) : t.text ?? r
|
|
@@ -1921,10 +1930,10 @@ function xn(e) {
|
|
|
1921
1930
|
/* @__PURE__ */ b(
|
|
1922
1931
|
un,
|
|
1923
1932
|
{
|
|
1924
|
-
className:
|
|
1933
|
+
className: k(
|
|
1925
1934
|
"size-4 rounded-full bg-input p-0.5 transition duration-300 ease-in-out",
|
|
1926
|
-
|
|
1927
|
-
|
|
1935
|
+
d ? "rotate-180" : "rotate-0",
|
|
1936
|
+
s ? "text-muted-foreground" : "text-foreground"
|
|
1928
1937
|
)
|
|
1929
1938
|
}
|
|
1930
1939
|
)
|
|
@@ -1935,93 +1944,86 @@ function xn(e) {
|
|
|
1935
1944
|
);
|
|
1936
1945
|
}
|
|
1937
1946
|
function hn(e) {
|
|
1938
|
-
const { items: o, multiple: t, selected: n, onChange:
|
|
1939
|
-
() => o.reduce((
|
|
1940
|
-
[o,
|
|
1941
|
-
),
|
|
1942
|
-
count:
|
|
1943
|
-
getScrollElement: () =>
|
|
1947
|
+
const { items: o, multiple: t, selected: n, onChange: i, mutable: s, onAdd: r } = e, [l, c] = de(""), a = Ee(null), u = ve(
|
|
1948
|
+
() => o.reduce((f, g) => ((!l.length || g.text.toLowerCase().includes(l.toLowerCase())) && f.push(g), f), []),
|
|
1949
|
+
[o, l]
|
|
1950
|
+
), d = an({
|
|
1951
|
+
count: u.length,
|
|
1952
|
+
getScrollElement: () => a.current,
|
|
1944
1953
|
estimateSize: () => 35
|
|
1945
|
-
}),
|
|
1946
|
-
return /* @__PURE__ */ W(
|
|
1947
|
-
"div",
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
+
}), m = n instanceof Array ? n.map((f) => f.key) : [n.key];
|
|
1955
|
+
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: [
|
|
1956
|
+
/* @__PURE__ */ W("div", { className: k("inline-flex grow items-center rounded px-3 py-2"), children: [
|
|
1957
|
+
/* @__PURE__ */ b(fn, { className: "left-3 top-3 mr-2 size-4 text-muted-foreground" }),
|
|
1958
|
+
/* @__PURE__ */ b(
|
|
1959
|
+
"input",
|
|
1960
|
+
{
|
|
1961
|
+
className: "inline-flex grow bg-transparent text-sm text-foreground outline-none",
|
|
1962
|
+
placeholder: "Search",
|
|
1963
|
+
value: l,
|
|
1964
|
+
onChange: (f) => c(f.target.value)
|
|
1965
|
+
}
|
|
1966
|
+
)
|
|
1967
|
+
] }),
|
|
1968
|
+
/* @__PURE__ */ W(
|
|
1969
|
+
"ul",
|
|
1970
|
+
{
|
|
1971
|
+
className: k("max-h-60 grow overflow-auto shadow", "focus:outline-none focus:ring-0"),
|
|
1972
|
+
ref: a,
|
|
1973
|
+
children: [
|
|
1954
1974
|
/* @__PURE__ */ b(
|
|
1955
|
-
"
|
|
1975
|
+
"div",
|
|
1956
1976
|
{
|
|
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",
|
|
1977
|
+
style: {
|
|
1978
|
+
height: `${d.getTotalSize()}px`,
|
|
1979
|
+
width: "100%",
|
|
1980
|
+
position: "relative"
|
|
1981
|
+
},
|
|
1982
|
+
children: d.getVirtualItems().map((f) => /* @__PURE__ */ b(
|
|
1983
|
+
"li",
|
|
1972
1984
|
{
|
|
1973
1985
|
style: {
|
|
1974
|
-
height: `${
|
|
1975
|
-
|
|
1976
|
-
position: "relative"
|
|
1986
|
+
height: `${f.size}px`,
|
|
1987
|
+
transform: `translateY(${f.start}px)`
|
|
1977
1988
|
},
|
|
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"),
|
|
1989
|
+
className: k(
|
|
1990
|
+
"absolute left-0 top-0 w-full cursor-pointer px-3 py-2 text-sm text-foreground",
|
|
1991
|
+
m.includes(u[f.index].key) ? "bg-primary/90 text-primary-foreground" : "transition hover:bg-primary/60"
|
|
1992
|
+
),
|
|
2008
1993
|
onClick: () => {
|
|
2009
|
-
|
|
1994
|
+
t ? m.includes(u[f.index].key) ? i(
|
|
1995
|
+
structuredClone(
|
|
1996
|
+
n.filter(
|
|
1997
|
+
(g) => g.key !== u[f.index].key
|
|
1998
|
+
)
|
|
1999
|
+
)
|
|
2000
|
+
) : i(structuredClone([...n, u[f.index]])) : i(u[f.index]);
|
|
2010
2001
|
},
|
|
2011
|
-
children: [
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2002
|
+
children: u[f.index].text
|
|
2003
|
+
},
|
|
2004
|
+
f.key
|
|
2005
|
+
))
|
|
2006
|
+
}
|
|
2007
|
+
),
|
|
2008
|
+
l.length > 0 && u.length === 0 && (s ? /* @__PURE__ */ W(
|
|
2009
|
+
"li",
|
|
2010
|
+
{
|
|
2011
|
+
className: k("px-3 py-2 text-sm text-foreground"),
|
|
2012
|
+
onClick: () => {
|
|
2013
|
+
r({ text: l, key: l }), c("");
|
|
2014
|
+
},
|
|
2015
|
+
children: [
|
|
2016
|
+
"Add ",
|
|
2017
|
+
l
|
|
2018
|
+
]
|
|
2019
|
+
}
|
|
2020
|
+
) : /* @__PURE__ */ b("li", { className: k("cursor-not-allowed px-3 py-2 text-sm text-foreground"), children: "No results found" }))
|
|
2021
|
+
]
|
|
2022
|
+
}
|
|
2023
|
+
)
|
|
2024
|
+
] });
|
|
2023
2025
|
}
|
|
2024
|
-
function
|
|
2026
|
+
function xn(e) {
|
|
2025
2027
|
return /* @__PURE__ */ b(
|
|
2026
2028
|
"svg",
|
|
2027
2029
|
{
|
|
@@ -2041,7 +2043,7 @@ function yn(e) {
|
|
|
2041
2043
|
return /* @__PURE__ */ b(
|
|
2042
2044
|
"input",
|
|
2043
2045
|
{
|
|
2044
|
-
className:
|
|
2046
|
+
className: k(
|
|
2045
2047
|
"h-10 w-full rounded border-2 border-input bg-background px-3 py-2 text-sm text-foreground transition",
|
|
2046
2048
|
"focus-visible:border-primary focus-visible:shadow-sm focus-visible:shadow-ring focus-visible:outline-none",
|
|
2047
2049
|
"read-only:cursor-pointer read-only:!border-none read-only:bg-transparent read-only:text-foreground read-only:!shadow-none read-only:!outline-none",
|
|
@@ -2054,11 +2056,11 @@ function yn(e) {
|
|
|
2054
2056
|
);
|
|
2055
2057
|
}
|
|
2056
2058
|
function bn(e) {
|
|
2057
|
-
const { className: o, checked: t, onChange: n, defaultChecked:
|
|
2059
|
+
const { className: o, checked: t, onChange: n, defaultChecked: i, ...s } = e;
|
|
2058
2060
|
return /* @__PURE__ */ W(
|
|
2059
2061
|
"div",
|
|
2060
2062
|
{
|
|
2061
|
-
className:
|
|
2063
|
+
className: k(
|
|
2062
2064
|
"rounded-full",
|
|
2063
2065
|
"h-5 w-10",
|
|
2064
2066
|
"border border-muted bg-secondary",
|
|
@@ -2067,11 +2069,11 @@ function bn(e) {
|
|
|
2067
2069
|
),
|
|
2068
2070
|
onClick: () => n == null ? void 0 : n(!t),
|
|
2069
2071
|
children: [
|
|
2070
|
-
/* @__PURE__ */ b("input", { type: "hidden", readOnly: !0, ...
|
|
2072
|
+
/* @__PURE__ */ b("input", { type: "hidden", readOnly: !0, ...s, defaultChecked: i, checked: t }),
|
|
2071
2073
|
/* @__PURE__ */ b(
|
|
2072
2074
|
"div",
|
|
2073
2075
|
{
|
|
2074
|
-
className:
|
|
2076
|
+
className: k(
|
|
2075
2077
|
"[animation-timing-function:cubic-bezier(1, 0, 0, 1)] duration-250 h-4 w-4 rounded-full bg-primary transition-all",
|
|
2076
2078
|
t ? "translate-x-5" : "translate-x-1"
|
|
2077
2079
|
)
|
|
@@ -2084,14 +2086,14 @@ function bn(e) {
|
|
|
2084
2086
|
export {
|
|
2085
2087
|
We as Badge,
|
|
2086
2088
|
lt as Button,
|
|
2087
|
-
|
|
2089
|
+
xn as ChevronDown,
|
|
2088
2090
|
un as ChevronUp,
|
|
2089
2091
|
Xt as Collapse,
|
|
2090
|
-
|
|
2092
|
+
wn as Dropdown,
|
|
2091
2093
|
yn as Input,
|
|
2092
2094
|
Qe as Popover,
|
|
2093
2095
|
fn as Search,
|
|
2094
2096
|
bn as Toggle,
|
|
2095
2097
|
Ve as cva,
|
|
2096
|
-
|
|
2098
|
+
k as cx
|
|
2097
2099
|
};
|