@rinzai/zen 0.1.10 → 0.1.11
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/utils/cva.d.ts.map +1 -1
- package/dist/utils/cx.d.ts.map +1 -1
- package/dist/zen.css +1 -1
- package/dist/zen.js +936 -884
- package/package.json +72 -75
package/dist/zen.js
CHANGED
|
@@ -1,39 +1,38 @@
|
|
|
1
|
-
import { jsx as y, jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { useLayoutEffect as
|
|
4
|
-
import * as
|
|
5
|
-
import { createPortal as
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const u = t == null ? void 0 : t[c], d = i == null ? void 0 : i[c];
|
|
1
|
+
import { jsx as y, jsxs as V, Fragment as je } from "react/jsx-runtime";
|
|
2
|
+
import * as O from "react";
|
|
3
|
+
import { useLayoutEffect as rt, useState as fe, useId as lt, useEffect as be, useMemo as ye, useRef as ve } from "react";
|
|
4
|
+
import * as ct from "react-dom";
|
|
5
|
+
import { createPortal as at, flushSync as ut } 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, [s, i]) => i == null || i === !1 ? n : typeof i == "string" || typeof i == "number" ? n + " " + s + "-" + i : typeof i == "boolean" && i ? n + " " + s : n, "") : o, ""), Ae = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, $e = (e, o) => (t) => {
|
|
7
|
+
if (o?.variants == null) return k(e, t?.class, t?.className);
|
|
8
|
+
const { variants: n, defaultVariants: s } = o, i = Object.keys(n).map((c) => {
|
|
9
|
+
const u = t?.[c], a = s?.[c];
|
|
11
10
|
if (u === null) return null;
|
|
12
|
-
const
|
|
13
|
-
return n[c][
|
|
11
|
+
const d = Ae(u) || Ae(a);
|
|
12
|
+
return n[c][d];
|
|
14
13
|
}), r = t && Object.entries(t).reduce(
|
|
15
|
-
(c, [u,
|
|
14
|
+
(c, [u, a]) => (a === void 0 || (c[u] = a), c),
|
|
16
15
|
{}
|
|
17
|
-
), l =
|
|
18
|
-
(c, { class: u, className:
|
|
19
|
-
([
|
|
16
|
+
), l = o?.compoundVariants?.reduce(
|
|
17
|
+
(c, { class: u, className: a, ...d }) => Object.entries(d).every(
|
|
18
|
+
([h, f]) => Array.isArray(f) ? f.includes(
|
|
20
19
|
{
|
|
21
|
-
...
|
|
20
|
+
...s,
|
|
22
21
|
...r
|
|
23
|
-
}[
|
|
22
|
+
}[h]
|
|
24
23
|
) : {
|
|
25
|
-
...
|
|
24
|
+
...s,
|
|
26
25
|
...r
|
|
27
|
-
}[
|
|
28
|
-
) ? [...c, u,
|
|
26
|
+
}[h] === f
|
|
27
|
+
) ? [...c, u, a] : c,
|
|
29
28
|
[]
|
|
30
29
|
);
|
|
31
|
-
return
|
|
30
|
+
return k(e, i, l, t?.class, t?.className);
|
|
32
31
|
};
|
|
33
|
-
function
|
|
34
|
-
return /* @__PURE__ */ y("span", { ...t, className:
|
|
32
|
+
function He({ variant: e, className: o, ...t }) {
|
|
33
|
+
return /* @__PURE__ */ y("span", { ...t, className: ft({ variant: e, className: o }) });
|
|
35
34
|
}
|
|
36
|
-
const
|
|
35
|
+
const ft = $e(
|
|
37
36
|
"zen__badge inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors whitespace-nowrap",
|
|
38
37
|
{
|
|
39
38
|
variants: {
|
|
@@ -49,10 +48,10 @@ const ct = We(
|
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
50
|
);
|
|
52
|
-
function
|
|
53
|
-
return /* @__PURE__ */ y("button", { className:
|
|
51
|
+
function dt({ className: e, variant: o, size: t, ...n }) {
|
|
52
|
+
return /* @__PURE__ */ y("button", { className: ht({ variant: o, size: t, className: e }), ...n });
|
|
54
53
|
}
|
|
55
|
-
const
|
|
54
|
+
const ht = $e(
|
|
56
55
|
"zen__button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
57
56
|
{
|
|
58
57
|
variants: {
|
|
@@ -77,77 +76,78 @@ const ut = We(
|
|
|
77
76
|
size: "default"
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
|
-
),
|
|
79
|
+
), re = Math.min, q = Math.max, le = Math.round, se = Math.floor, I = (e) => ({
|
|
81
80
|
x: e,
|
|
82
81
|
y: e
|
|
83
|
-
}),
|
|
82
|
+
}), mt = {
|
|
84
83
|
left: "right",
|
|
85
84
|
right: "left",
|
|
86
85
|
bottom: "top",
|
|
87
86
|
top: "bottom"
|
|
88
|
-
},
|
|
87
|
+
}, gt = {
|
|
89
88
|
start: "end",
|
|
90
89
|
end: "start"
|
|
91
90
|
};
|
|
92
|
-
function
|
|
93
|
-
return
|
|
91
|
+
function Me(e, o, t) {
|
|
92
|
+
return q(e, re(o, t));
|
|
94
93
|
}
|
|
95
|
-
function
|
|
94
|
+
function de(e, o) {
|
|
96
95
|
return typeof e == "function" ? e(o) : e;
|
|
97
96
|
}
|
|
98
97
|
function U(e) {
|
|
99
98
|
return e.split("-")[0];
|
|
100
99
|
}
|
|
101
|
-
function
|
|
100
|
+
function he(e) {
|
|
102
101
|
return e.split("-")[1];
|
|
103
102
|
}
|
|
104
|
-
function
|
|
103
|
+
function qe(e) {
|
|
105
104
|
return e === "x" ? "y" : "x";
|
|
106
105
|
}
|
|
107
|
-
function
|
|
106
|
+
function Ue(e) {
|
|
108
107
|
return e === "y" ? "height" : "width";
|
|
109
108
|
}
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
const pt = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
110
|
+
function $(e) {
|
|
111
|
+
return pt.has(U(e)) ? "y" : "x";
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
return
|
|
113
|
+
function Ke(e) {
|
|
114
|
+
return qe($(e));
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function wt(e, o, t) {
|
|
117
117
|
t === void 0 && (t = !1);
|
|
118
|
-
const n =
|
|
119
|
-
let r =
|
|
120
|
-
return o.reference[
|
|
118
|
+
const n = he(e), s = Ke(e), i = Ue(s);
|
|
119
|
+
let r = s === "x" ? n === (t ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
120
|
+
return o.reference[i] > o.floating[i] && (r = ce(r)), [r, ce(r)];
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
const o =
|
|
122
|
+
function xt(e) {
|
|
123
|
+
const o = ce(e);
|
|
124
124
|
return [Se(e), o, Se(o)];
|
|
125
125
|
}
|
|
126
126
|
function Se(e) {
|
|
127
|
-
return e.replace(/start|end/g, (o) =>
|
|
127
|
+
return e.replace(/start|end/g, (o) => gt[o]);
|
|
128
128
|
}
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
const ze = ["left", "right"], Ne = ["right", "left"], bt = ["top", "bottom"], yt = ["bottom", "top"];
|
|
130
|
+
function vt(e, o, t) {
|
|
131
131
|
switch (e) {
|
|
132
132
|
case "top":
|
|
133
133
|
case "bottom":
|
|
134
|
-
return t ? o ?
|
|
134
|
+
return t ? o ? Ne : ze : o ? ze : Ne;
|
|
135
135
|
case "left":
|
|
136
136
|
case "right":
|
|
137
|
-
return o ?
|
|
137
|
+
return o ? bt : yt;
|
|
138
138
|
default:
|
|
139
139
|
return [];
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
const
|
|
144
|
-
let
|
|
145
|
-
return
|
|
142
|
+
function St(e, o, t, n) {
|
|
143
|
+
const s = he(e);
|
|
144
|
+
let i = vt(U(e), t === "start", n);
|
|
145
|
+
return s && (i = i.map((r) => r + "-" + s), o && (i = i.concat(i.map(Se)))), i;
|
|
146
146
|
}
|
|
147
|
-
function
|
|
148
|
-
return e.replace(/left|right|bottom|top/g, (o) =>
|
|
147
|
+
function ce(e) {
|
|
148
|
+
return e.replace(/left|right|bottom|top/g, (o) => mt[o]);
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function Ct(e) {
|
|
151
151
|
return {
|
|
152
152
|
top: 0,
|
|
153
153
|
right: 0,
|
|
@@ -156,49 +156,49 @@ function xt(e) {
|
|
|
156
156
|
...e
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
return typeof e != "number" ?
|
|
159
|
+
function Ot(e) {
|
|
160
|
+
return typeof e != "number" ? Ct(e) : {
|
|
161
161
|
top: e,
|
|
162
162
|
right: e,
|
|
163
163
|
bottom: e,
|
|
164
164
|
left: e
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function ae(e) {
|
|
168
168
|
const {
|
|
169
169
|
x: o,
|
|
170
170
|
y: t,
|
|
171
171
|
width: n,
|
|
172
|
-
height:
|
|
172
|
+
height: s
|
|
173
173
|
} = e;
|
|
174
174
|
return {
|
|
175
175
|
width: n,
|
|
176
|
-
height:
|
|
176
|
+
height: s,
|
|
177
177
|
top: t,
|
|
178
178
|
left: o,
|
|
179
179
|
right: o + n,
|
|
180
|
-
bottom: t +
|
|
180
|
+
bottom: t + s,
|
|
181
181
|
x: o,
|
|
182
182
|
y: t
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function Le(e, o, t) {
|
|
186
186
|
let {
|
|
187
187
|
reference: n,
|
|
188
|
-
floating:
|
|
188
|
+
floating: s
|
|
189
189
|
} = e;
|
|
190
|
-
const
|
|
190
|
+
const i = $(o), r = Ke(o), l = Ue(r), c = U(o), u = i === "y", a = n.x + n.width / 2 - s.width / 2, d = n.y + n.height / 2 - s.height / 2, h = n[l] / 2 - s[l] / 2;
|
|
191
191
|
let f;
|
|
192
|
-
switch (
|
|
192
|
+
switch (c) {
|
|
193
193
|
case "top":
|
|
194
194
|
f = {
|
|
195
|
-
x:
|
|
196
|
-
y: n.y -
|
|
195
|
+
x: a,
|
|
196
|
+
y: n.y - s.height
|
|
197
197
|
};
|
|
198
198
|
break;
|
|
199
199
|
case "bottom":
|
|
200
200
|
f = {
|
|
201
|
-
x:
|
|
201
|
+
x: a,
|
|
202
202
|
y: n.y + n.height
|
|
203
203
|
};
|
|
204
204
|
break;
|
|
@@ -210,7 +210,7 @@ function ze(e, o, t) {
|
|
|
210
210
|
break;
|
|
211
211
|
case "left":
|
|
212
212
|
f = {
|
|
213
|
-
x: n.x -
|
|
213
|
+
x: n.x - s.width,
|
|
214
214
|
y: d
|
|
215
215
|
};
|
|
216
216
|
break;
|
|
@@ -220,208 +220,210 @@ function ze(e, o, t) {
|
|
|
220
220
|
y: n.y
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
|
-
switch (
|
|
223
|
+
switch (he(o)) {
|
|
224
224
|
case "start":
|
|
225
|
-
f[r] -= h * (t &&
|
|
225
|
+
f[r] -= h * (t && u ? -1 : 1);
|
|
226
226
|
break;
|
|
227
227
|
case "end":
|
|
228
|
-
f[r] += h * (t &&
|
|
228
|
+
f[r] += h * (t && u ? -1 : 1);
|
|
229
229
|
break;
|
|
230
230
|
}
|
|
231
231
|
return f;
|
|
232
232
|
}
|
|
233
|
-
const
|
|
233
|
+
const Et = async (e, o, t) => {
|
|
234
234
|
const {
|
|
235
235
|
placement: n = "bottom",
|
|
236
|
-
strategy:
|
|
237
|
-
middleware:
|
|
236
|
+
strategy: s = "absolute",
|
|
237
|
+
middleware: i = [],
|
|
238
238
|
platform: r
|
|
239
|
-
} = t, l =
|
|
240
|
-
let
|
|
239
|
+
} = t, l = i.filter(Boolean), c = await (r.isRTL == null ? void 0 : r.isRTL(o));
|
|
240
|
+
let u = await r.getElementRects({
|
|
241
241
|
reference: e,
|
|
242
242
|
floating: o,
|
|
243
|
-
strategy:
|
|
243
|
+
strategy: s
|
|
244
244
|
}), {
|
|
245
|
-
x:
|
|
245
|
+
x: a,
|
|
246
246
|
y: d
|
|
247
|
-
} =
|
|
248
|
-
for (let
|
|
247
|
+
} = Le(u, n, c), h = n, f = {}, g = 0;
|
|
248
|
+
for (let m = 0; m < l.length; m++) {
|
|
249
249
|
const {
|
|
250
|
-
name:
|
|
251
|
-
fn:
|
|
252
|
-
} = l[
|
|
253
|
-
x
|
|
250
|
+
name: p,
|
|
251
|
+
fn: w
|
|
252
|
+
} = l[m], {
|
|
253
|
+
x,
|
|
254
254
|
y: v,
|
|
255
|
-
data:
|
|
255
|
+
data: S,
|
|
256
256
|
reset: b
|
|
257
|
-
} = await
|
|
258
|
-
x:
|
|
257
|
+
} = await w({
|
|
258
|
+
x: a,
|
|
259
259
|
y: d,
|
|
260
260
|
initialPlacement: n,
|
|
261
261
|
placement: h,
|
|
262
|
-
strategy:
|
|
262
|
+
strategy: s,
|
|
263
263
|
middlewareData: f,
|
|
264
|
-
rects:
|
|
264
|
+
rects: u,
|
|
265
265
|
platform: r,
|
|
266
266
|
elements: {
|
|
267
267
|
reference: e,
|
|
268
268
|
floating: o
|
|
269
269
|
}
|
|
270
270
|
});
|
|
271
|
-
|
|
271
|
+
a = x ?? a, d = v ?? d, f = {
|
|
272
272
|
...f,
|
|
273
|
-
[
|
|
274
|
-
...f[
|
|
275
|
-
...
|
|
273
|
+
[p]: {
|
|
274
|
+
...f[p],
|
|
275
|
+
...S
|
|
276
276
|
}
|
|
277
|
-
}, b && g <= 50 && (g++, typeof b == "object" && (b.placement && (h = b.placement), b.rects && (
|
|
277
|
+
}, b && g <= 50 && (g++, typeof b == "object" && (b.placement && (h = b.placement), b.rects && (u = b.rects === !0 ? await r.getElementRects({
|
|
278
278
|
reference: e,
|
|
279
279
|
floating: o,
|
|
280
|
-
strategy:
|
|
280
|
+
strategy: s
|
|
281
281
|
}) : b.rects), {
|
|
282
|
-
x:
|
|
282
|
+
x: a,
|
|
283
283
|
y: d
|
|
284
|
-
} =
|
|
284
|
+
} = Le(u, h, c)), m = -1);
|
|
285
285
|
}
|
|
286
286
|
return {
|
|
287
|
-
x:
|
|
287
|
+
x: a,
|
|
288
288
|
y: d,
|
|
289
289
|
placement: h,
|
|
290
|
-
strategy:
|
|
290
|
+
strategy: s,
|
|
291
291
|
middlewareData: f
|
|
292
292
|
};
|
|
293
293
|
};
|
|
294
|
-
async function
|
|
294
|
+
async function Ye(e, o) {
|
|
295
295
|
var t;
|
|
296
296
|
o === void 0 && (o = {});
|
|
297
297
|
const {
|
|
298
298
|
x: n,
|
|
299
|
-
y:
|
|
300
|
-
platform:
|
|
299
|
+
y: s,
|
|
300
|
+
platform: i,
|
|
301
301
|
rects: r,
|
|
302
302
|
elements: l,
|
|
303
|
-
strategy:
|
|
303
|
+
strategy: c
|
|
304
304
|
} = e, {
|
|
305
|
-
boundary:
|
|
306
|
-
rootBoundary:
|
|
305
|
+
boundary: u = "clippingAncestors",
|
|
306
|
+
rootBoundary: a = "viewport",
|
|
307
307
|
elementContext: d = "floating",
|
|
308
308
|
altBoundary: h = !1,
|
|
309
309
|
padding: f = 0
|
|
310
|
-
} =
|
|
311
|
-
element: (t = await (
|
|
312
|
-
boundary:
|
|
313
|
-
rootBoundary:
|
|
314
|
-
strategy:
|
|
315
|
-
})),
|
|
310
|
+
} = de(o, e), g = Ot(f), p = l[h ? d === "floating" ? "reference" : "floating" : d], w = ae(await i.getClippingRect({
|
|
311
|
+
element: (t = await (i.isElement == null ? void 0 : i.isElement(p))) == null || t ? p : p.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(l.floating)),
|
|
312
|
+
boundary: u,
|
|
313
|
+
rootBoundary: a,
|
|
314
|
+
strategy: c
|
|
315
|
+
})), x = d === "floating" ? {
|
|
316
316
|
x: n,
|
|
317
|
-
y:
|
|
317
|
+
y: s,
|
|
318
318
|
width: r.floating.width,
|
|
319
319
|
height: r.floating.height
|
|
320
|
-
} : r.reference, v = await (
|
|
320
|
+
} : r.reference, v = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l.floating)), S = await (i.isElement == null ? void 0 : i.isElement(v)) ? await (i.getScale == null ? void 0 : i.getScale(v)) || {
|
|
321
321
|
x: 1,
|
|
322
322
|
y: 1
|
|
323
323
|
} : {
|
|
324
324
|
x: 1,
|
|
325
325
|
y: 1
|
|
326
|
-
}, b =
|
|
326
|
+
}, b = ae(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
327
327
|
elements: l,
|
|
328
|
-
rect:
|
|
328
|
+
rect: x,
|
|
329
329
|
offsetParent: v,
|
|
330
|
-
strategy:
|
|
331
|
-
}) :
|
|
330
|
+
strategy: c
|
|
331
|
+
}) : x);
|
|
332
332
|
return {
|
|
333
|
-
top: (
|
|
334
|
-
bottom: (b.bottom -
|
|
335
|
-
left: (
|
|
336
|
-
right: (b.right -
|
|
333
|
+
top: (w.top - b.top + g.top) / S.y,
|
|
334
|
+
bottom: (b.bottom - w.bottom + g.bottom) / S.y,
|
|
335
|
+
left: (w.left - b.left + g.left) / S.x,
|
|
336
|
+
right: (b.right - w.right + g.right) / S.x
|
|
337
337
|
};
|
|
338
338
|
}
|
|
339
|
-
const
|
|
339
|
+
const Rt = 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: s,
|
|
347
|
+
middlewareData: i,
|
|
348
348
|
rects: r,
|
|
349
349
|
initialPlacement: l,
|
|
350
|
-
platform:
|
|
351
|
-
elements:
|
|
350
|
+
platform: c,
|
|
351
|
+
elements: u
|
|
352
352
|
} = o, {
|
|
353
|
-
mainAxis:
|
|
353
|
+
mainAxis: a = !0,
|
|
354
354
|
crossAxis: d = !0,
|
|
355
355
|
fallbackPlacements: h,
|
|
356
356
|
fallbackStrategy: f = "bestFit",
|
|
357
357
|
fallbackAxisSideDirection: g = "none",
|
|
358
|
-
flipAlignment:
|
|
359
|
-
...
|
|
360
|
-
} =
|
|
361
|
-
if ((t =
|
|
358
|
+
flipAlignment: m = !0,
|
|
359
|
+
...p
|
|
360
|
+
} = de(e, o);
|
|
361
|
+
if ((t = i.arrow) != null && t.alignmentOffset)
|
|
362
362
|
return {};
|
|
363
|
-
const
|
|
364
|
-
!h && R && b.push(...
|
|
365
|
-
const
|
|
366
|
-
let
|
|
367
|
-
if (
|
|
368
|
-
const N =
|
|
369
|
-
|
|
363
|
+
const w = U(s), x = $(l), v = U(l) === l, S = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), b = h || (v || !m ? [ce(l)] : xt(l)), R = g !== "none";
|
|
364
|
+
!h && R && b.push(...St(l, m, g, S));
|
|
365
|
+
const E = [l, ...b], W = await Ye(o, p), Y = [];
|
|
366
|
+
let _ = ((n = i.flip) == null ? void 0 : n.overflows) || [];
|
|
367
|
+
if (a && Y.push(W[w]), d) {
|
|
368
|
+
const N = wt(s, r, S);
|
|
369
|
+
Y.push(W[N[0]], W[N[1]]);
|
|
370
370
|
}
|
|
371
|
-
if (
|
|
372
|
-
placement:
|
|
373
|
-
overflows:
|
|
374
|
-
}], !
|
|
375
|
-
var
|
|
376
|
-
const N = (((
|
|
377
|
-
if (
|
|
371
|
+
if (_ = [..._, {
|
|
372
|
+
placement: s,
|
|
373
|
+
overflows: Y
|
|
374
|
+
}], !Y.every((N) => N <= 0)) {
|
|
375
|
+
var X, te;
|
|
376
|
+
const N = (((X = i.flip) == null ? void 0 : X.index) || 0) + 1, Z = E[N];
|
|
377
|
+
if (Z && (!(d === "alignment" ? x !== $(Z) : !1) || // We leave the current main axis only if every placement on that axis
|
|
378
|
+
// overflows the main axis.
|
|
379
|
+
_.every((C) => C.overflows[0] > 0 && $(C.placement) === x)))
|
|
378
380
|
return {
|
|
379
381
|
data: {
|
|
380
382
|
index: N,
|
|
381
|
-
overflows:
|
|
383
|
+
overflows: _
|
|
382
384
|
},
|
|
383
385
|
reset: {
|
|
384
|
-
placement:
|
|
386
|
+
placement: Z
|
|
385
387
|
}
|
|
386
388
|
};
|
|
387
|
-
let
|
|
388
|
-
if (!
|
|
389
|
+
let A = (te = _.filter((D) => D.overflows[0] <= 0).sort((D, C) => D.overflows[1] - C.overflows[1])[0]) == null ? void 0 : te.placement;
|
|
390
|
+
if (!A)
|
|
389
391
|
switch (f) {
|
|
390
392
|
case "bestFit": {
|
|
391
393
|
var B;
|
|
392
|
-
const
|
|
394
|
+
const D = (B = _.filter((C) => {
|
|
393
395
|
if (R) {
|
|
394
|
-
const
|
|
395
|
-
return
|
|
396
|
+
const M = $(C.placement);
|
|
397
|
+
return M === x || // Create a bias to the `y` side axis due to horizontal
|
|
396
398
|
// reading directions favoring greater width.
|
|
397
|
-
|
|
399
|
+
M === "y";
|
|
398
400
|
}
|
|
399
401
|
return !0;
|
|
400
|
-
}).map((
|
|
401
|
-
|
|
402
|
+
}).map((C) => [C.placement, C.overflows.filter((M) => M > 0).reduce((M, j) => M + j, 0)]).sort((C, M) => C[1] - M[1])[0]) == null ? void 0 : B[0];
|
|
403
|
+
D && (A = D);
|
|
402
404
|
break;
|
|
403
405
|
}
|
|
404
406
|
case "initialPlacement":
|
|
405
|
-
|
|
407
|
+
A = l;
|
|
406
408
|
break;
|
|
407
409
|
}
|
|
408
|
-
if (
|
|
410
|
+
if (s !== A)
|
|
409
411
|
return {
|
|
410
412
|
reset: {
|
|
411
|
-
placement:
|
|
413
|
+
placement: A
|
|
412
414
|
}
|
|
413
415
|
};
|
|
414
416
|
}
|
|
415
417
|
return {};
|
|
416
418
|
}
|
|
417
419
|
};
|
|
418
|
-
};
|
|
419
|
-
async function
|
|
420
|
+
}, kt = /* @__PURE__ */ new Set(["left", "top"]);
|
|
421
|
+
async function At(e, o) {
|
|
420
422
|
const {
|
|
421
423
|
placement: t,
|
|
422
424
|
platform: n,
|
|
423
|
-
elements:
|
|
424
|
-
} = e,
|
|
425
|
+
elements: s
|
|
426
|
+
} = e, i = await (n.isRTL == null ? void 0 : n.isRTL(s.floating)), r = U(t), l = he(t), c = $(t) === "y", u = kt.has(r) ? -1 : 1, a = i && c ? -1 : 1, d = de(o, e);
|
|
425
427
|
let {
|
|
426
428
|
mainAxis: h,
|
|
427
429
|
crossAxis: f,
|
|
@@ -435,37 +437,37 @@ async function vt(e, o) {
|
|
|
435
437
|
crossAxis: d.crossAxis || 0,
|
|
436
438
|
alignmentAxis: d.alignmentAxis
|
|
437
439
|
};
|
|
438
|
-
return l && typeof g == "number" && (f = l === "end" ? g * -1 : g),
|
|
439
|
-
x: f *
|
|
440
|
-
y: h *
|
|
440
|
+
return l && typeof g == "number" && (f = l === "end" ? g * -1 : g), c ? {
|
|
441
|
+
x: f * a,
|
|
442
|
+
y: h * u
|
|
441
443
|
} : {
|
|
442
|
-
x: h *
|
|
443
|
-
y: f *
|
|
444
|
+
x: h * u,
|
|
445
|
+
y: f * a
|
|
444
446
|
};
|
|
445
447
|
}
|
|
446
|
-
const
|
|
448
|
+
const Mt = function(e) {
|
|
447
449
|
return e === void 0 && (e = 0), {
|
|
448
450
|
name: "offset",
|
|
449
451
|
options: e,
|
|
450
452
|
async fn(o) {
|
|
451
453
|
var t, n;
|
|
452
454
|
const {
|
|
453
|
-
x:
|
|
454
|
-
y:
|
|
455
|
+
x: s,
|
|
456
|
+
y: i,
|
|
455
457
|
placement: r,
|
|
456
458
|
middlewareData: l
|
|
457
|
-
} = o,
|
|
459
|
+
} = o, c = await At(o, e);
|
|
458
460
|
return r === ((t = l.offset) == null ? void 0 : t.placement) && (n = l.arrow) != null && n.alignmentOffset ? {} : {
|
|
459
|
-
x:
|
|
460
|
-
y:
|
|
461
|
+
x: s + c.x,
|
|
462
|
+
y: i + c.y,
|
|
461
463
|
data: {
|
|
462
|
-
...
|
|
464
|
+
...c,
|
|
463
465
|
placement: r
|
|
464
466
|
}
|
|
465
467
|
};
|
|
466
468
|
}
|
|
467
469
|
};
|
|
468
|
-
},
|
|
470
|
+
}, zt = function(e) {
|
|
469
471
|
return e === void 0 && (e = {}), {
|
|
470
472
|
name: "shift",
|
|
471
473
|
options: e,
|
|
@@ -473,48 +475,48 @@ const Et = function(e) {
|
|
|
473
475
|
const {
|
|
474
476
|
x: t,
|
|
475
477
|
y: n,
|
|
476
|
-
placement:
|
|
478
|
+
placement: s
|
|
477
479
|
} = o, {
|
|
478
|
-
mainAxis:
|
|
480
|
+
mainAxis: i = !0,
|
|
479
481
|
crossAxis: r = !1,
|
|
480
482
|
limiter: l = {
|
|
481
|
-
fn: (
|
|
483
|
+
fn: (p) => {
|
|
482
484
|
let {
|
|
483
|
-
x:
|
|
484
|
-
y:
|
|
485
|
-
} =
|
|
485
|
+
x: w,
|
|
486
|
+
y: x
|
|
487
|
+
} = p;
|
|
486
488
|
return {
|
|
487
|
-
x:
|
|
488
|
-
y:
|
|
489
|
+
x: w,
|
|
490
|
+
y: x
|
|
489
491
|
};
|
|
490
492
|
}
|
|
491
493
|
},
|
|
492
|
-
...
|
|
493
|
-
} =
|
|
494
|
+
...c
|
|
495
|
+
} = de(e, o), u = {
|
|
494
496
|
x: t,
|
|
495
497
|
y: n
|
|
496
|
-
},
|
|
497
|
-
let f =
|
|
498
|
-
if (
|
|
499
|
-
const
|
|
500
|
-
f =
|
|
498
|
+
}, a = await Ye(o, c), d = $(U(s)), h = qe(d);
|
|
499
|
+
let f = u[h], g = u[d];
|
|
500
|
+
if (i) {
|
|
501
|
+
const p = h === "y" ? "top" : "left", w = h === "y" ? "bottom" : "right", x = f + a[p], v = f - a[w];
|
|
502
|
+
f = Me(x, f, v);
|
|
501
503
|
}
|
|
502
504
|
if (r) {
|
|
503
|
-
const
|
|
504
|
-
g =
|
|
505
|
+
const p = d === "y" ? "top" : "left", w = d === "y" ? "bottom" : "right", x = g + a[p], v = g - a[w];
|
|
506
|
+
g = Me(x, g, v);
|
|
505
507
|
}
|
|
506
|
-
const
|
|
508
|
+
const m = l.fn({
|
|
507
509
|
...o,
|
|
508
510
|
[h]: f,
|
|
509
511
|
[d]: g
|
|
510
512
|
});
|
|
511
513
|
return {
|
|
512
|
-
...
|
|
514
|
+
...m,
|
|
513
515
|
data: {
|
|
514
|
-
x:
|
|
515
|
-
y:
|
|
516
|
+
x: m.x - t,
|
|
517
|
+
y: m.y - n,
|
|
516
518
|
enabled: {
|
|
517
|
-
[h]:
|
|
519
|
+
[h]: i,
|
|
518
520
|
[d]: r
|
|
519
521
|
}
|
|
520
522
|
}
|
|
@@ -522,46 +524,49 @@ const Et = function(e) {
|
|
|
522
524
|
}
|
|
523
525
|
};
|
|
524
526
|
};
|
|
525
|
-
function
|
|
527
|
+
function me() {
|
|
526
528
|
return typeof window < "u";
|
|
527
529
|
}
|
|
528
|
-
function
|
|
529
|
-
return
|
|
530
|
+
function ee(e) {
|
|
531
|
+
return Xe(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
530
532
|
}
|
|
531
|
-
function
|
|
533
|
+
function z(e) {
|
|
532
534
|
var o;
|
|
533
535
|
return (e == null || (o = e.ownerDocument) == null ? void 0 : o.defaultView) || window;
|
|
534
536
|
}
|
|
535
|
-
function
|
|
537
|
+
function P(e) {
|
|
536
538
|
var o;
|
|
537
|
-
return (o = (
|
|
539
|
+
return (o = (Xe(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : o.documentElement;
|
|
538
540
|
}
|
|
539
|
-
function
|
|
540
|
-
return
|
|
541
|
+
function Xe(e) {
|
|
542
|
+
return me() ? e instanceof Node || e instanceof z(e).Node : !1;
|
|
541
543
|
}
|
|
542
|
-
function
|
|
543
|
-
return
|
|
544
|
+
function L(e) {
|
|
545
|
+
return me() ? e instanceof Element || e instanceof z(e).Element : !1;
|
|
544
546
|
}
|
|
545
|
-
function
|
|
546
|
-
return
|
|
547
|
+
function F(e) {
|
|
548
|
+
return me() ? e instanceof HTMLElement || e instanceof z(e).HTMLElement : !1;
|
|
547
549
|
}
|
|
548
|
-
function
|
|
549
|
-
return !
|
|
550
|
+
function Te(e) {
|
|
551
|
+
return !me() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof z(e).ShadowRoot;
|
|
550
552
|
}
|
|
553
|
+
const Nt = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
551
554
|
function oe(e) {
|
|
552
555
|
const {
|
|
553
556
|
overflow: o,
|
|
554
557
|
overflowX: t,
|
|
555
558
|
overflowY: n,
|
|
556
|
-
display:
|
|
557
|
-
} =
|
|
558
|
-
return /auto|scroll|overlay|hidden|clip/.test(o + n + t) && !
|
|
559
|
+
display: s
|
|
560
|
+
} = T(e);
|
|
561
|
+
return /auto|scroll|overlay|hidden|clip/.test(o + n + t) && !Nt.has(s);
|
|
559
562
|
}
|
|
560
|
-
|
|
561
|
-
|
|
563
|
+
const Lt = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
564
|
+
function Tt(e) {
|
|
565
|
+
return Lt.has(ee(e));
|
|
562
566
|
}
|
|
563
|
-
|
|
564
|
-
|
|
567
|
+
const _t = [":popover-open", ":modal"];
|
|
568
|
+
function ge(e) {
|
|
569
|
+
return _t.some((o) => {
|
|
565
570
|
try {
|
|
566
571
|
return e.matches(o);
|
|
567
572
|
} catch {
|
|
@@ -569,32 +574,34 @@ function pe(e) {
|
|
|
569
574
|
}
|
|
570
575
|
});
|
|
571
576
|
}
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
577
|
+
const Dt = ["transform", "translate", "scale", "rotate", "perspective"], It = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Ft = ["paint", "layout", "strict", "content"];
|
|
578
|
+
function Oe(e) {
|
|
579
|
+
const o = Ee(), t = L(e) ? T(e) : e;
|
|
580
|
+
return Dt.some((n) => t[n] ? t[n] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !o && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !o && (t.filter ? t.filter !== "none" : !1) || It.some((n) => (t.willChange || "").includes(n)) || Ft.some((n) => (t.contain || "").includes(n));
|
|
575
581
|
}
|
|
576
|
-
function
|
|
577
|
-
let o =
|
|
578
|
-
for (;
|
|
579
|
-
if (
|
|
582
|
+
function Pt(e) {
|
|
583
|
+
let o = H(e);
|
|
584
|
+
for (; F(o) && !Q(o); ) {
|
|
585
|
+
if (Oe(o))
|
|
580
586
|
return o;
|
|
581
|
-
if (
|
|
587
|
+
if (ge(o))
|
|
582
588
|
return null;
|
|
583
|
-
o =
|
|
589
|
+
o = H(o);
|
|
584
590
|
}
|
|
585
591
|
return null;
|
|
586
592
|
}
|
|
587
|
-
function
|
|
593
|
+
function Ee() {
|
|
588
594
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
589
595
|
}
|
|
590
|
-
|
|
591
|
-
|
|
596
|
+
const Vt = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
597
|
+
function Q(e) {
|
|
598
|
+
return Vt.has(ee(e));
|
|
592
599
|
}
|
|
593
|
-
function
|
|
594
|
-
return
|
|
600
|
+
function T(e) {
|
|
601
|
+
return z(e).getComputedStyle(e);
|
|
595
602
|
}
|
|
596
|
-
function
|
|
597
|
-
return
|
|
603
|
+
function pe(e) {
|
|
604
|
+
return L(e) ? {
|
|
598
605
|
scrollLeft: e.scrollLeft,
|
|
599
606
|
scrollTop: e.scrollTop
|
|
600
607
|
} : {
|
|
@@ -602,293 +609,298 @@ function xe(e) {
|
|
|
602
609
|
scrollTop: e.scrollY
|
|
603
610
|
};
|
|
604
611
|
}
|
|
605
|
-
function
|
|
606
|
-
if (
|
|
612
|
+
function H(e) {
|
|
613
|
+
if (ee(e) === "html")
|
|
607
614
|
return e;
|
|
608
615
|
const o = (
|
|
609
616
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
610
617
|
e.assignedSlot || // DOM Element detected.
|
|
611
618
|
e.parentNode || // ShadowRoot detected.
|
|
612
|
-
|
|
613
|
-
|
|
619
|
+
Te(e) && e.host || // Fallback.
|
|
620
|
+
P(e)
|
|
614
621
|
);
|
|
615
|
-
return
|
|
622
|
+
return Te(o) ? o.host : o;
|
|
616
623
|
}
|
|
617
|
-
function
|
|
618
|
-
const o =
|
|
619
|
-
return
|
|
624
|
+
function Ze(e) {
|
|
625
|
+
const o = H(e);
|
|
626
|
+
return Q(o) ? e.ownerDocument ? e.ownerDocument.body : e.body : F(o) && oe(o) ? o : Ze(o);
|
|
620
627
|
}
|
|
621
628
|
function ne(e, o, t) {
|
|
622
629
|
var n;
|
|
623
630
|
o === void 0 && (o = []), t === void 0 && (t = !0);
|
|
624
|
-
const
|
|
625
|
-
if (
|
|
626
|
-
const l =
|
|
627
|
-
return o.concat(r, r.visualViewport || [], oe(
|
|
631
|
+
const s = Ze(e), i = s === ((n = e.ownerDocument) == null ? void 0 : n.body), r = z(s);
|
|
632
|
+
if (i) {
|
|
633
|
+
const l = Ce(r);
|
|
634
|
+
return o.concat(r, r.visualViewport || [], oe(s) ? s : [], l && t ? ne(l) : []);
|
|
628
635
|
}
|
|
629
|
-
return o.concat(
|
|
636
|
+
return o.concat(s, ne(s, [], t));
|
|
630
637
|
}
|
|
631
|
-
function
|
|
638
|
+
function Ce(e) {
|
|
632
639
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
633
640
|
}
|
|
634
|
-
function
|
|
635
|
-
const o =
|
|
641
|
+
function Ge(e) {
|
|
642
|
+
const o = T(e);
|
|
636
643
|
let t = parseFloat(o.width) || 0, n = parseFloat(o.height) || 0;
|
|
637
|
-
const
|
|
638
|
-
return l && (t =
|
|
644
|
+
const s = F(e), i = s ? e.offsetWidth : t, r = s ? e.offsetHeight : n, l = le(t) !== i || le(n) !== r;
|
|
645
|
+
return l && (t = i, n = r), {
|
|
639
646
|
width: t,
|
|
640
647
|
height: n,
|
|
641
648
|
$: l
|
|
642
649
|
};
|
|
643
650
|
}
|
|
644
|
-
function
|
|
645
|
-
return
|
|
651
|
+
function Re(e) {
|
|
652
|
+
return L(e) ? e : e.contextElement;
|
|
646
653
|
}
|
|
647
|
-
function
|
|
648
|
-
const o =
|
|
649
|
-
if (!
|
|
650
|
-
return
|
|
654
|
+
function J(e) {
|
|
655
|
+
const o = Re(e);
|
|
656
|
+
if (!F(o))
|
|
657
|
+
return I(1);
|
|
651
658
|
const t = o.getBoundingClientRect(), {
|
|
652
659
|
width: n,
|
|
653
|
-
height:
|
|
654
|
-
$:
|
|
655
|
-
} =
|
|
656
|
-
let r = (
|
|
660
|
+
height: s,
|
|
661
|
+
$: i
|
|
662
|
+
} = Ge(o);
|
|
663
|
+
let r = (i ? le(t.width) : t.width) / n, l = (i ? le(t.height) : t.height) / s;
|
|
657
664
|
return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
658
665
|
x: r,
|
|
659
666
|
y: l
|
|
660
667
|
};
|
|
661
668
|
}
|
|
662
|
-
const
|
|
663
|
-
function
|
|
664
|
-
const o =
|
|
665
|
-
return !
|
|
669
|
+
const Wt = /* @__PURE__ */ I(0);
|
|
670
|
+
function Je(e) {
|
|
671
|
+
const o = z(e);
|
|
672
|
+
return !Ee() || !o.visualViewport ? Wt : {
|
|
666
673
|
x: o.visualViewport.offsetLeft,
|
|
667
674
|
y: o.visualViewport.offsetTop
|
|
668
675
|
};
|
|
669
676
|
}
|
|
670
|
-
function
|
|
671
|
-
return o === void 0 && (o = !1), !t || o && t !==
|
|
677
|
+
function Bt(e, o, t) {
|
|
678
|
+
return o === void 0 && (o = !1), !t || o && t !== z(e) ? !1 : o;
|
|
672
679
|
}
|
|
673
|
-
function
|
|
680
|
+
function K(e, o, t, n) {
|
|
674
681
|
o === void 0 && (o = !1), t === void 0 && (t = !1);
|
|
675
|
-
const
|
|
676
|
-
let r =
|
|
677
|
-
o && (n ?
|
|
678
|
-
const l =
|
|
679
|
-
let
|
|
680
|
-
if (
|
|
681
|
-
const h =
|
|
682
|
-
let g = h,
|
|
683
|
-
for (;
|
|
684
|
-
const
|
|
685
|
-
|
|
682
|
+
const s = e.getBoundingClientRect(), i = Re(e);
|
|
683
|
+
let r = I(1);
|
|
684
|
+
o && (n ? L(n) && (r = J(n)) : r = J(e));
|
|
685
|
+
const l = Bt(i, t, n) ? Je(i) : I(0);
|
|
686
|
+
let c = (s.left + l.x) / r.x, u = (s.top + l.y) / r.y, a = s.width / r.x, d = s.height / r.y;
|
|
687
|
+
if (i) {
|
|
688
|
+
const h = z(i), f = n && L(n) ? z(n) : n;
|
|
689
|
+
let g = h, m = Ce(g);
|
|
690
|
+
for (; m && n && f !== g; ) {
|
|
691
|
+
const p = J(m), w = m.getBoundingClientRect(), x = T(m), v = w.left + (m.clientLeft + parseFloat(x.paddingLeft)) * p.x, S = w.top + (m.clientTop + parseFloat(x.paddingTop)) * p.y;
|
|
692
|
+
c *= p.x, u *= p.y, a *= p.x, d *= p.y, c += v, u += S, g = z(m), m = Ce(g);
|
|
686
693
|
}
|
|
687
694
|
}
|
|
688
|
-
return
|
|
689
|
-
width:
|
|
695
|
+
return ae({
|
|
696
|
+
width: a,
|
|
690
697
|
height: d,
|
|
691
|
-
x:
|
|
692
|
-
y:
|
|
698
|
+
x: c,
|
|
699
|
+
y: u
|
|
693
700
|
});
|
|
694
701
|
}
|
|
695
702
|
function ke(e, o) {
|
|
696
|
-
const t =
|
|
697
|
-
return o ? o.left + t :
|
|
703
|
+
const t = pe(e).scrollLeft;
|
|
704
|
+
return o ? o.left + t : K(P(e)).left + t;
|
|
698
705
|
}
|
|
699
|
-
function
|
|
706
|
+
function Qe(e, o, t) {
|
|
700
707
|
t === void 0 && (t = !1);
|
|
701
|
-
const n = e.getBoundingClientRect(),
|
|
708
|
+
const n = e.getBoundingClientRect(), s = n.left + o.scrollLeft - (t ? 0 : (
|
|
702
709
|
// RTL <body> scrollbar.
|
|
703
710
|
ke(e, n)
|
|
704
|
-
)),
|
|
711
|
+
)), i = n.top + o.scrollTop;
|
|
705
712
|
return {
|
|
706
|
-
x:
|
|
707
|
-
y:
|
|
713
|
+
x: s,
|
|
714
|
+
y: i
|
|
708
715
|
};
|
|
709
716
|
}
|
|
710
|
-
function
|
|
717
|
+
function jt(e) {
|
|
711
718
|
let {
|
|
712
719
|
elements: o,
|
|
713
720
|
rect: t,
|
|
714
721
|
offsetParent: n,
|
|
715
|
-
strategy:
|
|
722
|
+
strategy: s
|
|
716
723
|
} = e;
|
|
717
|
-
const
|
|
718
|
-
if (n === r || l &&
|
|
724
|
+
const i = s === "fixed", r = P(n), l = o ? ge(o.floating) : !1;
|
|
725
|
+
if (n === r || l && i)
|
|
719
726
|
return t;
|
|
720
|
-
let
|
|
727
|
+
let c = {
|
|
721
728
|
scrollLeft: 0,
|
|
722
729
|
scrollTop: 0
|
|
723
|
-
},
|
|
724
|
-
const
|
|
725
|
-
if ((d || !d && !
|
|
726
|
-
const f =
|
|
727
|
-
|
|
730
|
+
}, u = I(1);
|
|
731
|
+
const a = I(0), d = F(n);
|
|
732
|
+
if ((d || !d && !i) && ((ee(n) !== "body" || oe(r)) && (c = pe(n)), F(n))) {
|
|
733
|
+
const f = K(n);
|
|
734
|
+
u = J(n), a.x = f.x + n.clientLeft, a.y = f.y + n.clientTop;
|
|
728
735
|
}
|
|
729
|
-
const h = r && !d && !
|
|
736
|
+
const h = r && !d && !i ? Qe(r, c, !0) : I(0);
|
|
730
737
|
return {
|
|
731
|
-
width: t.width *
|
|
732
|
-
height: t.height *
|
|
733
|
-
x: t.x *
|
|
734
|
-
y: t.y *
|
|
738
|
+
width: t.width * u.x,
|
|
739
|
+
height: t.height * u.y,
|
|
740
|
+
x: t.x * u.x - c.scrollLeft * u.x + a.x + h.x,
|
|
741
|
+
y: t.y * u.y - c.scrollTop * u.y + a.y + h.y
|
|
735
742
|
};
|
|
736
743
|
}
|
|
737
|
-
function
|
|
744
|
+
function $t(e) {
|
|
738
745
|
return Array.from(e.getClientRects());
|
|
739
746
|
}
|
|
740
|
-
function
|
|
741
|
-
const o =
|
|
747
|
+
function Ht(e) {
|
|
748
|
+
const o = P(e), t = pe(e), n = e.ownerDocument.body, s = q(o.scrollWidth, o.clientWidth, n.scrollWidth, n.clientWidth), i = q(o.scrollHeight, o.clientHeight, n.scrollHeight, n.clientHeight);
|
|
742
749
|
let r = -t.scrollLeft + ke(e);
|
|
743
750
|
const l = -t.scrollTop;
|
|
744
|
-
return
|
|
745
|
-
width:
|
|
746
|
-
height:
|
|
751
|
+
return T(n).direction === "rtl" && (r += q(o.clientWidth, n.clientWidth) - s), {
|
|
752
|
+
width: s,
|
|
753
|
+
height: i,
|
|
747
754
|
x: r,
|
|
748
755
|
y: l
|
|
749
756
|
};
|
|
750
757
|
}
|
|
751
|
-
function
|
|
752
|
-
const t =
|
|
753
|
-
let
|
|
754
|
-
if (
|
|
755
|
-
|
|
756
|
-
const
|
|
757
|
-
(!
|
|
758
|
+
function qt(e, o) {
|
|
759
|
+
const t = z(e), n = P(e), s = t.visualViewport;
|
|
760
|
+
let i = n.clientWidth, r = n.clientHeight, l = 0, c = 0;
|
|
761
|
+
if (s) {
|
|
762
|
+
i = s.width, r = s.height;
|
|
763
|
+
const u = Ee();
|
|
764
|
+
(!u || u && o === "fixed") && (l = s.offsetLeft, c = s.offsetTop);
|
|
758
765
|
}
|
|
759
766
|
return {
|
|
760
|
-
width:
|
|
767
|
+
width: i,
|
|
761
768
|
height: r,
|
|
762
769
|
x: l,
|
|
763
|
-
y:
|
|
770
|
+
y: c
|
|
764
771
|
};
|
|
765
772
|
}
|
|
766
|
-
|
|
767
|
-
|
|
773
|
+
const Ut = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
774
|
+
function Kt(e, o) {
|
|
775
|
+
const t = K(e, !0, o === "fixed"), n = t.top + e.clientTop, s = t.left + e.clientLeft, i = F(e) ? J(e) : I(1), r = e.clientWidth * i.x, l = e.clientHeight * i.y, c = s * i.x, u = n * i.y;
|
|
768
776
|
return {
|
|
769
777
|
width: r,
|
|
770
778
|
height: l,
|
|
771
|
-
x:
|
|
772
|
-
y:
|
|
779
|
+
x: c,
|
|
780
|
+
y: u
|
|
773
781
|
};
|
|
774
782
|
}
|
|
775
|
-
function
|
|
783
|
+
function _e(e, o, t) {
|
|
776
784
|
let n;
|
|
777
785
|
if (o === "viewport")
|
|
778
|
-
n =
|
|
786
|
+
n = qt(e, t);
|
|
779
787
|
else if (o === "document")
|
|
780
|
-
n =
|
|
781
|
-
else if (
|
|
782
|
-
n =
|
|
788
|
+
n = Ht(P(e));
|
|
789
|
+
else if (L(o))
|
|
790
|
+
n = Kt(o, t);
|
|
783
791
|
else {
|
|
784
|
-
const
|
|
792
|
+
const s = Je(e);
|
|
785
793
|
n = {
|
|
786
|
-
x: o.x -
|
|
787
|
-
y: o.y -
|
|
794
|
+
x: o.x - s.x,
|
|
795
|
+
y: o.y - s.y,
|
|
788
796
|
width: o.width,
|
|
789
797
|
height: o.height
|
|
790
798
|
};
|
|
791
799
|
}
|
|
792
|
-
return
|
|
800
|
+
return ae(n);
|
|
793
801
|
}
|
|
794
|
-
function
|
|
795
|
-
const t =
|
|
796
|
-
return t === o || !
|
|
802
|
+
function et(e, o) {
|
|
803
|
+
const t = H(e);
|
|
804
|
+
return t === o || !L(t) || Q(t) ? !1 : T(t).position === "fixed" || et(t, o);
|
|
797
805
|
}
|
|
798
|
-
function
|
|
806
|
+
function Yt(e, o) {
|
|
799
807
|
const t = o.get(e);
|
|
800
808
|
if (t)
|
|
801
809
|
return t;
|
|
802
|
-
let n = ne(e, [], !1).filter((l) =>
|
|
803
|
-
const
|
|
804
|
-
let r =
|
|
805
|
-
for (;
|
|
806
|
-
const l =
|
|
807
|
-
!
|
|
810
|
+
let n = ne(e, [], !1).filter((l) => L(l) && ee(l) !== "body"), s = null;
|
|
811
|
+
const i = T(e).position === "fixed";
|
|
812
|
+
let r = i ? H(e) : e;
|
|
813
|
+
for (; L(r) && !Q(r); ) {
|
|
814
|
+
const l = T(r), c = Oe(r);
|
|
815
|
+
!c && l.position === "fixed" && (s = null), (i ? !c && !s : !c && l.position === "static" && !!s && Ut.has(s.position) || oe(r) && !c && et(e, r)) ? n = n.filter((a) => a !== r) : s = l, r = H(r);
|
|
808
816
|
}
|
|
809
817
|
return o.set(e, n), n;
|
|
810
818
|
}
|
|
811
|
-
function
|
|
819
|
+
function Xt(e) {
|
|
812
820
|
let {
|
|
813
821
|
element: o,
|
|
814
822
|
boundary: t,
|
|
815
823
|
rootBoundary: n,
|
|
816
|
-
strategy:
|
|
824
|
+
strategy: s
|
|
817
825
|
} = e;
|
|
818
|
-
const r = [...t === "clippingAncestors" ?
|
|
819
|
-
const d =
|
|
820
|
-
return
|
|
821
|
-
},
|
|
826
|
+
const r = [...t === "clippingAncestors" ? ge(o) ? [] : Yt(o, this._c) : [].concat(t), n], l = r[0], c = r.reduce((u, a) => {
|
|
827
|
+
const d = _e(o, a, s);
|
|
828
|
+
return u.top = q(d.top, u.top), u.right = re(d.right, u.right), u.bottom = re(d.bottom, u.bottom), u.left = q(d.left, u.left), u;
|
|
829
|
+
}, _e(o, l, s));
|
|
822
830
|
return {
|
|
823
|
-
width:
|
|
824
|
-
height:
|
|
825
|
-
x:
|
|
826
|
-
y:
|
|
831
|
+
width: c.right - c.left,
|
|
832
|
+
height: c.bottom - c.top,
|
|
833
|
+
x: c.left,
|
|
834
|
+
y: c.top
|
|
827
835
|
};
|
|
828
836
|
}
|
|
829
|
-
function
|
|
837
|
+
function Zt(e) {
|
|
830
838
|
const {
|
|
831
839
|
width: o,
|
|
832
840
|
height: t
|
|
833
|
-
} =
|
|
841
|
+
} = Ge(e);
|
|
834
842
|
return {
|
|
835
843
|
width: o,
|
|
836
844
|
height: t
|
|
837
845
|
};
|
|
838
846
|
}
|
|
839
|
-
function
|
|
840
|
-
const n =
|
|
847
|
+
function Gt(e, o, t) {
|
|
848
|
+
const n = F(o), s = P(o), i = t === "fixed", r = K(e, !0, i, o);
|
|
841
849
|
let l = {
|
|
842
850
|
scrollLeft: 0,
|
|
843
851
|
scrollTop: 0
|
|
844
852
|
};
|
|
845
|
-
const
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
853
|
+
const c = I(0);
|
|
854
|
+
function u() {
|
|
855
|
+
c.x = ke(s);
|
|
856
|
+
}
|
|
857
|
+
if (n || !n && !i)
|
|
858
|
+
if ((ee(o) !== "body" || oe(s)) && (l = pe(o)), n) {
|
|
859
|
+
const f = K(o, !0, i, o);
|
|
860
|
+
c.x = f.x + o.clientLeft, c.y = f.y + o.clientTop;
|
|
861
|
+
} else s && u();
|
|
862
|
+
i && !n && s && u();
|
|
863
|
+
const a = s && !n && !i ? Qe(s, l) : I(0), d = r.left + l.scrollLeft - c.x - a.x, h = r.top + l.scrollTop - c.y - a.y;
|
|
852
864
|
return {
|
|
853
|
-
x:
|
|
854
|
-
y:
|
|
865
|
+
x: d,
|
|
866
|
+
y: h,
|
|
855
867
|
width: r.width,
|
|
856
868
|
height: r.height
|
|
857
869
|
};
|
|
858
870
|
}
|
|
859
871
|
function we(e) {
|
|
860
|
-
return
|
|
872
|
+
return T(e).position === "static";
|
|
861
873
|
}
|
|
862
|
-
function
|
|
863
|
-
if (!
|
|
874
|
+
function De(e, o) {
|
|
875
|
+
if (!F(e) || T(e).position === "fixed")
|
|
864
876
|
return null;
|
|
865
877
|
if (o)
|
|
866
878
|
return o(e);
|
|
867
879
|
let t = e.offsetParent;
|
|
868
|
-
return
|
|
880
|
+
return P(e) === t && (t = t.ownerDocument.body), t;
|
|
869
881
|
}
|
|
870
|
-
function
|
|
871
|
-
const t =
|
|
872
|
-
if (
|
|
882
|
+
function tt(e, o) {
|
|
883
|
+
const t = z(e);
|
|
884
|
+
if (ge(e))
|
|
873
885
|
return t;
|
|
874
|
-
if (!
|
|
875
|
-
let
|
|
876
|
-
for (;
|
|
877
|
-
if (
|
|
878
|
-
return
|
|
879
|
-
|
|
886
|
+
if (!F(e)) {
|
|
887
|
+
let s = H(e);
|
|
888
|
+
for (; s && !Q(s); ) {
|
|
889
|
+
if (L(s) && !we(s))
|
|
890
|
+
return s;
|
|
891
|
+
s = H(s);
|
|
880
892
|
}
|
|
881
893
|
return t;
|
|
882
894
|
}
|
|
883
|
-
let n =
|
|
884
|
-
for (; n &&
|
|
885
|
-
n =
|
|
886
|
-
return n &&
|
|
895
|
+
let n = De(e, o);
|
|
896
|
+
for (; n && Tt(n) && we(n); )
|
|
897
|
+
n = De(n, o);
|
|
898
|
+
return n && Q(n) && we(n) && !Oe(n) ? t : n || Pt(e) || t;
|
|
887
899
|
}
|
|
888
|
-
const
|
|
889
|
-
const o = this.getOffsetParent ||
|
|
900
|
+
const Jt = async function(e) {
|
|
901
|
+
const o = this.getOffsetParent || tt, t = this.getDimensions, n = await t(e.floating);
|
|
890
902
|
return {
|
|
891
|
-
reference:
|
|
903
|
+
reference: Gt(e.reference, await o(e.floating), e.strategy),
|
|
892
904
|
floating: {
|
|
893
905
|
x: 0,
|
|
894
906
|
y: 0,
|
|
@@ -897,276 +909,277 @@ const Ft = async function(e) {
|
|
|
897
909
|
}
|
|
898
910
|
};
|
|
899
911
|
};
|
|
900
|
-
function
|
|
901
|
-
return
|
|
902
|
-
}
|
|
903
|
-
const
|
|
904
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
905
|
-
getDocumentElement:
|
|
906
|
-
getClippingRect:
|
|
907
|
-
getOffsetParent:
|
|
908
|
-
getElementRects:
|
|
909
|
-
getClientRects:
|
|
910
|
-
getDimensions:
|
|
911
|
-
getScale:
|
|
912
|
-
isElement:
|
|
913
|
-
isRTL:
|
|
912
|
+
function Qt(e) {
|
|
913
|
+
return T(e).direction === "rtl";
|
|
914
|
+
}
|
|
915
|
+
const en = {
|
|
916
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: jt,
|
|
917
|
+
getDocumentElement: P,
|
|
918
|
+
getClippingRect: Xt,
|
|
919
|
+
getOffsetParent: tt,
|
|
920
|
+
getElementRects: Jt,
|
|
921
|
+
getClientRects: $t,
|
|
922
|
+
getDimensions: Zt,
|
|
923
|
+
getScale: J,
|
|
924
|
+
isElement: L,
|
|
925
|
+
isRTL: Qt
|
|
914
926
|
};
|
|
915
|
-
function
|
|
927
|
+
function nt(e, o) {
|
|
916
928
|
return e.x === o.x && e.y === o.y && e.width === o.width && e.height === o.height;
|
|
917
929
|
}
|
|
918
|
-
function
|
|
930
|
+
function tn(e, o) {
|
|
919
931
|
let t = null, n;
|
|
920
|
-
const
|
|
921
|
-
function
|
|
932
|
+
const s = P(e);
|
|
933
|
+
function i() {
|
|
922
934
|
var l;
|
|
923
935
|
clearTimeout(n), (l = t) == null || l.disconnect(), t = null;
|
|
924
936
|
}
|
|
925
|
-
function r(l,
|
|
926
|
-
l === void 0 && (l = !1),
|
|
927
|
-
const
|
|
928
|
-
left:
|
|
937
|
+
function r(l, c) {
|
|
938
|
+
l === void 0 && (l = !1), c === void 0 && (c = 1), i();
|
|
939
|
+
const u = e.getBoundingClientRect(), {
|
|
940
|
+
left: a,
|
|
929
941
|
top: d,
|
|
930
942
|
width: h,
|
|
931
943
|
height: f
|
|
932
|
-
} =
|
|
944
|
+
} = u;
|
|
933
945
|
if (l || o(), !h || !f)
|
|
934
946
|
return;
|
|
935
|
-
const g =
|
|
936
|
-
rootMargin: -g + "px " + -
|
|
937
|
-
threshold:
|
|
947
|
+
const g = se(d), m = se(s.clientWidth - (a + h)), p = se(s.clientHeight - (d + f)), w = se(a), v = {
|
|
948
|
+
rootMargin: -g + "px " + -m + "px " + -p + "px " + -w + "px",
|
|
949
|
+
threshold: q(0, re(1, c)) || 1
|
|
938
950
|
};
|
|
939
|
-
let
|
|
951
|
+
let S = !0;
|
|
940
952
|
function b(R) {
|
|
941
|
-
const
|
|
942
|
-
if (
|
|
943
|
-
if (!
|
|
953
|
+
const E = R[0].intersectionRatio;
|
|
954
|
+
if (E !== c) {
|
|
955
|
+
if (!S)
|
|
944
956
|
return r();
|
|
945
|
-
|
|
957
|
+
E ? r(!1, E) : n = setTimeout(() => {
|
|
946
958
|
r(!1, 1e-7);
|
|
947
959
|
}, 1e3);
|
|
948
960
|
}
|
|
949
|
-
|
|
961
|
+
E === 1 && !nt(u, e.getBoundingClientRect()) && r(), S = !1;
|
|
950
962
|
}
|
|
951
963
|
try {
|
|
952
964
|
t = new IntersectionObserver(b, {
|
|
953
965
|
...v,
|
|
954
966
|
// Handle <iframe>s
|
|
955
|
-
root:
|
|
967
|
+
root: s.ownerDocument
|
|
956
968
|
});
|
|
957
969
|
} catch {
|
|
958
970
|
t = new IntersectionObserver(b, v);
|
|
959
971
|
}
|
|
960
972
|
t.observe(e);
|
|
961
973
|
}
|
|
962
|
-
return r(!0),
|
|
974
|
+
return r(!0), i;
|
|
963
975
|
}
|
|
964
|
-
function
|
|
976
|
+
function nn(e, o, t, n) {
|
|
965
977
|
n === void 0 && (n = {});
|
|
966
978
|
const {
|
|
967
|
-
ancestorScroll:
|
|
968
|
-
ancestorResize:
|
|
979
|
+
ancestorScroll: s = !0,
|
|
980
|
+
ancestorResize: i = !0,
|
|
969
981
|
elementResize: r = typeof ResizeObserver == "function",
|
|
970
982
|
layoutShift: l = typeof IntersectionObserver == "function",
|
|
971
|
-
animationFrame:
|
|
972
|
-
} = n,
|
|
973
|
-
|
|
974
|
-
|
|
983
|
+
animationFrame: c = !1
|
|
984
|
+
} = n, u = Re(e), a = s || i ? [...u ? ne(u) : [], ...ne(o)] : [];
|
|
985
|
+
a.forEach((w) => {
|
|
986
|
+
s && w.addEventListener("scroll", t, {
|
|
975
987
|
passive: !0
|
|
976
|
-
}),
|
|
988
|
+
}), i && w.addEventListener("resize", t);
|
|
977
989
|
});
|
|
978
|
-
const d =
|
|
990
|
+
const d = u && l ? tn(u, t) : null;
|
|
979
991
|
let h = -1, f = null;
|
|
980
|
-
r && (f = new ResizeObserver((
|
|
981
|
-
let [
|
|
982
|
-
|
|
992
|
+
r && (f = new ResizeObserver((w) => {
|
|
993
|
+
let [x] = w;
|
|
994
|
+
x && x.target === u && f && (f.unobserve(o), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
983
995
|
var v;
|
|
984
996
|
(v = f) == null || v.observe(o);
|
|
985
997
|
})), t();
|
|
986
|
-
}),
|
|
987
|
-
let g,
|
|
988
|
-
|
|
989
|
-
function
|
|
990
|
-
const
|
|
991
|
-
|
|
998
|
+
}), u && !c && f.observe(u), f.observe(o));
|
|
999
|
+
let g, m = c ? K(e) : null;
|
|
1000
|
+
c && p();
|
|
1001
|
+
function p() {
|
|
1002
|
+
const w = K(e);
|
|
1003
|
+
m && !nt(m, w) && t(), m = w, g = requestAnimationFrame(p);
|
|
992
1004
|
}
|
|
993
1005
|
return t(), () => {
|
|
994
|
-
var
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
}), d
|
|
1006
|
+
var w;
|
|
1007
|
+
a.forEach((x) => {
|
|
1008
|
+
s && x.removeEventListener("scroll", t), i && x.removeEventListener("resize", t);
|
|
1009
|
+
}), d?.(), (w = f) == null || w.disconnect(), f = null, c && cancelAnimationFrame(g);
|
|
998
1010
|
};
|
|
999
1011
|
}
|
|
1000
|
-
const
|
|
1001
|
-
const n = /* @__PURE__ */ new Map(),
|
|
1002
|
-
platform:
|
|
1012
|
+
const on = Mt, sn = zt, rn = Rt, ln = (e, o, t) => {
|
|
1013
|
+
const n = /* @__PURE__ */ new Map(), s = {
|
|
1014
|
+
platform: en,
|
|
1003
1015
|
...t
|
|
1004
|
-
},
|
|
1005
|
-
...
|
|
1016
|
+
}, i = {
|
|
1017
|
+
...s.platform,
|
|
1006
1018
|
_c: n
|
|
1007
1019
|
};
|
|
1008
|
-
return
|
|
1009
|
-
...
|
|
1010
|
-
platform:
|
|
1020
|
+
return Et(e, o, {
|
|
1021
|
+
...s,
|
|
1022
|
+
platform: i
|
|
1011
1023
|
});
|
|
1012
1024
|
};
|
|
1013
|
-
var
|
|
1014
|
-
|
|
1025
|
+
var cn = typeof document < "u", an = function() {
|
|
1026
|
+
}, ie = cn ? rt : an;
|
|
1027
|
+
function ue(e, o) {
|
|
1015
1028
|
if (e === o)
|
|
1016
1029
|
return !0;
|
|
1017
1030
|
if (typeof e != typeof o)
|
|
1018
1031
|
return !1;
|
|
1019
1032
|
if (typeof e == "function" && e.toString() === o.toString())
|
|
1020
1033
|
return !0;
|
|
1021
|
-
let t, n,
|
|
1034
|
+
let t, n, s;
|
|
1022
1035
|
if (e && o && typeof e == "object") {
|
|
1023
1036
|
if (Array.isArray(e)) {
|
|
1024
1037
|
if (t = e.length, t !== o.length) return !1;
|
|
1025
1038
|
for (n = t; n-- !== 0; )
|
|
1026
|
-
if (!
|
|
1039
|
+
if (!ue(e[n], o[n]))
|
|
1027
1040
|
return !1;
|
|
1028
1041
|
return !0;
|
|
1029
1042
|
}
|
|
1030
|
-
if (
|
|
1043
|
+
if (s = Object.keys(e), t = s.length, t !== Object.keys(o).length)
|
|
1031
1044
|
return !1;
|
|
1032
1045
|
for (n = t; n-- !== 0; )
|
|
1033
|
-
if (!{}.hasOwnProperty.call(o,
|
|
1046
|
+
if (!{}.hasOwnProperty.call(o, s[n]))
|
|
1034
1047
|
return !1;
|
|
1035
1048
|
for (n = t; n-- !== 0; ) {
|
|
1036
|
-
const
|
|
1037
|
-
if (!(
|
|
1049
|
+
const i = s[n];
|
|
1050
|
+
if (!(i === "_owner" && e.$$typeof) && !ue(e[i], o[i]))
|
|
1038
1051
|
return !1;
|
|
1039
1052
|
}
|
|
1040
1053
|
return !0;
|
|
1041
1054
|
}
|
|
1042
1055
|
return e !== e && o !== o;
|
|
1043
1056
|
}
|
|
1044
|
-
function
|
|
1057
|
+
function ot(e) {
|
|
1045
1058
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1046
1059
|
}
|
|
1047
|
-
function
|
|
1048
|
-
const t =
|
|
1060
|
+
function Ie(e, o) {
|
|
1061
|
+
const t = ot(e);
|
|
1049
1062
|
return Math.round(o * t) / t;
|
|
1050
1063
|
}
|
|
1051
|
-
function
|
|
1052
|
-
const o =
|
|
1053
|
-
return
|
|
1064
|
+
function xe(e) {
|
|
1065
|
+
const o = O.useRef(e);
|
|
1066
|
+
return ie(() => {
|
|
1054
1067
|
o.current = e;
|
|
1055
1068
|
}), o;
|
|
1056
1069
|
}
|
|
1057
|
-
function
|
|
1070
|
+
function un(e) {
|
|
1058
1071
|
e === void 0 && (e = {});
|
|
1059
1072
|
const {
|
|
1060
1073
|
placement: o = "bottom",
|
|
1061
1074
|
strategy: t = "absolute",
|
|
1062
1075
|
middleware: n = [],
|
|
1063
|
-
platform:
|
|
1076
|
+
platform: s,
|
|
1064
1077
|
elements: {
|
|
1065
|
-
reference:
|
|
1078
|
+
reference: i,
|
|
1066
1079
|
floating: r
|
|
1067
1080
|
} = {},
|
|
1068
1081
|
transform: l = !0,
|
|
1069
|
-
whileElementsMounted:
|
|
1070
|
-
open:
|
|
1071
|
-
} = e, [
|
|
1082
|
+
whileElementsMounted: c,
|
|
1083
|
+
open: u
|
|
1084
|
+
} = e, [a, d] = O.useState({
|
|
1072
1085
|
x: 0,
|
|
1073
1086
|
y: 0,
|
|
1074
1087
|
strategy: t,
|
|
1075
1088
|
placement: o,
|
|
1076
1089
|
middlewareData: {},
|
|
1077
1090
|
isPositioned: !1
|
|
1078
|
-
}), [h, f] =
|
|
1079
|
-
|
|
1080
|
-
const [g,
|
|
1081
|
-
|
|
1082
|
-
}, []), v =
|
|
1083
|
-
|
|
1084
|
-
}, []),
|
|
1085
|
-
if (!R.current || !
|
|
1091
|
+
}), [h, f] = O.useState(n);
|
|
1092
|
+
ue(h, n) || f(n);
|
|
1093
|
+
const [g, m] = O.useState(null), [p, w] = O.useState(null), x = O.useCallback((C) => {
|
|
1094
|
+
C !== R.current && (R.current = C, m(C));
|
|
1095
|
+
}, []), v = O.useCallback((C) => {
|
|
1096
|
+
C !== E.current && (E.current = C, w(C));
|
|
1097
|
+
}, []), S = i || g, b = r || p, R = O.useRef(null), E = O.useRef(null), W = O.useRef(a), Y = c != null, _ = xe(c), X = xe(s), te = xe(u), B = O.useCallback(() => {
|
|
1098
|
+
if (!R.current || !E.current)
|
|
1086
1099
|
return;
|
|
1087
|
-
const
|
|
1100
|
+
const C = {
|
|
1088
1101
|
placement: o,
|
|
1089
1102
|
strategy: t,
|
|
1090
1103
|
middleware: h
|
|
1091
1104
|
};
|
|
1092
|
-
|
|
1105
|
+
X.current && (C.platform = X.current), ln(R.current, E.current, C).then((M) => {
|
|
1093
1106
|
const j = {
|
|
1094
|
-
...
|
|
1107
|
+
...M,
|
|
1095
1108
|
// The floating element's position may be recomputed while it's closed
|
|
1096
1109
|
// but still mounted (such as when transitioning out). To ensure
|
|
1097
1110
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
1098
1111
|
// setting it to `true` when `open === false` (must be specified).
|
|
1099
|
-
isPositioned:
|
|
1112
|
+
isPositioned: te.current !== !1
|
|
1100
1113
|
};
|
|
1101
|
-
N.current && !
|
|
1114
|
+
N.current && !ue(W.current, j) && (W.current = j, ct.flushSync(() => {
|
|
1102
1115
|
d(j);
|
|
1103
1116
|
}));
|
|
1104
1117
|
});
|
|
1105
|
-
}, [h, o, t,
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
...
|
|
1118
|
+
}, [h, o, t, X, te]);
|
|
1119
|
+
ie(() => {
|
|
1120
|
+
u === !1 && W.current.isPositioned && (W.current.isPositioned = !1, d((C) => ({
|
|
1121
|
+
...C,
|
|
1109
1122
|
isPositioned: !1
|
|
1110
1123
|
})));
|
|
1111
|
-
}, [
|
|
1112
|
-
const N =
|
|
1113
|
-
|
|
1124
|
+
}, [u]);
|
|
1125
|
+
const N = O.useRef(!1);
|
|
1126
|
+
ie(() => (N.current = !0, () => {
|
|
1114
1127
|
N.current = !1;
|
|
1115
|
-
}), []),
|
|
1116
|
-
if (
|
|
1117
|
-
if (
|
|
1118
|
-
return
|
|
1128
|
+
}), []), ie(() => {
|
|
1129
|
+
if (S && (R.current = S), b && (E.current = b), S && b) {
|
|
1130
|
+
if (_.current)
|
|
1131
|
+
return _.current(S, b, B);
|
|
1119
1132
|
B();
|
|
1120
1133
|
}
|
|
1121
|
-
}, [
|
|
1122
|
-
const
|
|
1134
|
+
}, [S, b, B, _, Y]);
|
|
1135
|
+
const Z = O.useMemo(() => ({
|
|
1123
1136
|
reference: R,
|
|
1124
|
-
floating:
|
|
1125
|
-
setReference:
|
|
1137
|
+
floating: E,
|
|
1138
|
+
setReference: x,
|
|
1126
1139
|
setFloating: v
|
|
1127
|
-
}), [
|
|
1128
|
-
reference:
|
|
1140
|
+
}), [x, v]), A = O.useMemo(() => ({
|
|
1141
|
+
reference: S,
|
|
1129
1142
|
floating: b
|
|
1130
|
-
}), [
|
|
1131
|
-
const
|
|
1143
|
+
}), [S, b]), D = O.useMemo(() => {
|
|
1144
|
+
const C = {
|
|
1132
1145
|
position: t,
|
|
1133
1146
|
left: 0,
|
|
1134
1147
|
top: 0
|
|
1135
1148
|
};
|
|
1136
|
-
if (!
|
|
1137
|
-
return
|
|
1138
|
-
const
|
|
1149
|
+
if (!A.floating)
|
|
1150
|
+
return C;
|
|
1151
|
+
const M = Ie(A.floating, a.x), j = Ie(A.floating, a.y);
|
|
1139
1152
|
return l ? {
|
|
1140
|
-
...
|
|
1141
|
-
transform: "translate(" +
|
|
1142
|
-
...
|
|
1153
|
+
...C,
|
|
1154
|
+
transform: "translate(" + M + "px, " + j + "px)",
|
|
1155
|
+
...ot(A.floating) >= 1.5 && {
|
|
1143
1156
|
willChange: "transform"
|
|
1144
1157
|
}
|
|
1145
1158
|
} : {
|
|
1146
1159
|
position: t,
|
|
1147
|
-
left:
|
|
1160
|
+
left: M,
|
|
1148
1161
|
top: j
|
|
1149
1162
|
};
|
|
1150
|
-
}, [t, l,
|
|
1151
|
-
return
|
|
1152
|
-
...
|
|
1163
|
+
}, [t, l, A.floating, a.x, a.y]);
|
|
1164
|
+
return O.useMemo(() => ({
|
|
1165
|
+
...a,
|
|
1153
1166
|
update: B,
|
|
1154
|
-
refs:
|
|
1155
|
-
elements:
|
|
1156
|
-
floatingStyles:
|
|
1157
|
-
}), [
|
|
1167
|
+
refs: Z,
|
|
1168
|
+
elements: A,
|
|
1169
|
+
floatingStyles: D
|
|
1170
|
+
}), [a, B, Z, A, D]);
|
|
1158
1171
|
}
|
|
1159
|
-
const
|
|
1160
|
-
...
|
|
1172
|
+
const fn = (e, o) => ({
|
|
1173
|
+
...on(e),
|
|
1161
1174
|
options: [e, o]
|
|
1162
|
-
}),
|
|
1163
|
-
|
|
1175
|
+
}), dn = (e, o) => ({
|
|
1176
|
+
...sn(e),
|
|
1164
1177
|
options: [e, o]
|
|
1165
|
-
}),
|
|
1166
|
-
...
|
|
1178
|
+
}), hn = (e, o) => ({
|
|
1179
|
+
...rn(e),
|
|
1167
1180
|
options: [e, o]
|
|
1168
1181
|
});
|
|
1169
|
-
function
|
|
1182
|
+
function mn(e, o) {
|
|
1170
1183
|
return () => {
|
|
1171
1184
|
if (typeof document > "u")
|
|
1172
1185
|
return;
|
|
@@ -1178,295 +1191,298 @@ function Zt(e, o) {
|
|
|
1178
1191
|
};
|
|
1179
1192
|
};
|
|
1180
1193
|
}
|
|
1181
|
-
function
|
|
1194
|
+
function st(e) {
|
|
1182
1195
|
const {
|
|
1183
1196
|
className: o,
|
|
1184
1197
|
placement: t = "bottom-start",
|
|
1185
1198
|
trigger: n = "hover",
|
|
1186
|
-
content:
|
|
1187
|
-
children:
|
|
1199
|
+
content: s,
|
|
1200
|
+
children: i,
|
|
1188
1201
|
onClose: r,
|
|
1189
1202
|
onOpen: l,
|
|
1190
|
-
disabled:
|
|
1191
|
-
show:
|
|
1192
|
-
setShow:
|
|
1203
|
+
disabled: c = !1,
|
|
1204
|
+
show: u = !1,
|
|
1205
|
+
setShow: a,
|
|
1193
1206
|
role: d = "tooltip",
|
|
1194
1207
|
style: h,
|
|
1195
1208
|
...f
|
|
1196
|
-
} = e, [g,
|
|
1197
|
-
open:
|
|
1198
|
-
middleware: [
|
|
1199
|
-
whileElementsMounted:
|
|
1209
|
+
} = e, [g, m] = fe(u), p = () => a !== void 0 && u !== void 0 ? u : g, w = () => a !== void 0 && u !== void 0 ? a : m, { x, y: v, strategy: S, refs: b } = un({
|
|
1210
|
+
open: p(),
|
|
1211
|
+
middleware: [fn(4), hn(), dn()],
|
|
1212
|
+
whileElementsMounted: nn,
|
|
1200
1213
|
placement: t
|
|
1201
|
-
}), R =
|
|
1202
|
-
return
|
|
1203
|
-
|
|
1204
|
-
|
|
1214
|
+
}), R = lt();
|
|
1215
|
+
return be(
|
|
1216
|
+
mn(b.floating, (E) => {
|
|
1217
|
+
E && w()(!1);
|
|
1205
1218
|
}),
|
|
1206
1219
|
[]
|
|
1207
|
-
), /* @__PURE__ */
|
|
1220
|
+
), /* @__PURE__ */ V(je, { children: [
|
|
1208
1221
|
/* @__PURE__ */ y(
|
|
1209
1222
|
"div",
|
|
1210
1223
|
{
|
|
1211
1224
|
className: "z-auto min-w-fit max-w-fit",
|
|
1212
1225
|
id: `zen__popover-${R}`,
|
|
1213
1226
|
ref: b.setReference,
|
|
1214
|
-
onClick: (
|
|
1227
|
+
onClick: (E) => {
|
|
1215
1228
|
if (n === "click") {
|
|
1216
|
-
if (
|
|
1229
|
+
if (c)
|
|
1217
1230
|
return;
|
|
1218
|
-
|
|
1231
|
+
p() ? (w()(!1), r?.()) : (w()(!0), l?.());
|
|
1219
1232
|
}
|
|
1220
|
-
|
|
1233
|
+
E.stopPropagation();
|
|
1221
1234
|
},
|
|
1222
1235
|
role: d,
|
|
1223
|
-
children:
|
|
1236
|
+
children: i
|
|
1224
1237
|
}
|
|
1225
1238
|
),
|
|
1226
|
-
|
|
1239
|
+
p() && at(
|
|
1227
1240
|
/* @__PURE__ */ y(
|
|
1228
1241
|
"div",
|
|
1229
1242
|
{
|
|
1230
1243
|
...f,
|
|
1231
|
-
onClick: (
|
|
1244
|
+
onClick: (E) => E.stopPropagation(),
|
|
1232
1245
|
role: "tooltip",
|
|
1233
|
-
className:
|
|
1246
|
+
className: k(
|
|
1234
1247
|
"zen__popover z-50 w-fit rounded border border-border bg-background shadow-secondary",
|
|
1235
1248
|
o
|
|
1236
1249
|
),
|
|
1237
1250
|
ref: b.setFloating,
|
|
1238
1251
|
style: {
|
|
1239
1252
|
...h,
|
|
1240
|
-
position:
|
|
1253
|
+
position: S,
|
|
1241
1254
|
top: v ?? 0,
|
|
1242
|
-
left:
|
|
1255
|
+
left: x ?? 0
|
|
1243
1256
|
},
|
|
1244
|
-
children:
|
|
1257
|
+
children: s
|
|
1245
1258
|
}
|
|
1246
1259
|
),
|
|
1247
1260
|
document.body
|
|
1248
1261
|
)
|
|
1249
1262
|
] });
|
|
1250
1263
|
}
|
|
1251
|
-
function
|
|
1252
|
-
var x, w;
|
|
1264
|
+
function gn(e) {
|
|
1253
1265
|
const {
|
|
1254
1266
|
items: o = [],
|
|
1255
1267
|
children: t,
|
|
1256
1268
|
moreItemsLabel: n = "",
|
|
1257
|
-
parentRef:
|
|
1258
|
-
data:
|
|
1269
|
+
parentRef: s,
|
|
1270
|
+
data: i,
|
|
1259
1271
|
estimator: r = (m, p) => p + 30,
|
|
1260
1272
|
font: l = "12px Inter",
|
|
1261
|
-
badgeVariant:
|
|
1262
|
-
badgeStyles:
|
|
1263
|
-
} = e, [
|
|
1273
|
+
badgeVariant: c = "secondary",
|
|
1274
|
+
badgeStyles: u
|
|
1275
|
+
} = e, [a, d] = fe({
|
|
1264
1276
|
visible: o,
|
|
1265
1277
|
hidden: []
|
|
1266
|
-
}), h =
|
|
1278
|
+
}), h = ye(() => {
|
|
1267
1279
|
if (typeof document > "u")
|
|
1268
1280
|
return null;
|
|
1269
1281
|
const p = document.createElement("canvas").getContext("2d");
|
|
1270
1282
|
return p && (p.font = l), p;
|
|
1271
1283
|
}, []), f = () => {
|
|
1272
|
-
const m =
|
|
1284
|
+
const m = s?.current;
|
|
1273
1285
|
if (!m)
|
|
1274
1286
|
return;
|
|
1275
|
-
const p = m.offsetWidth,
|
|
1287
|
+
const p = m.offsetWidth, w = [], x = [], v = r(
|
|
1276
1288
|
n,
|
|
1277
|
-
(
|
|
1289
|
+
(h?.measureText(n).width ?? 0) + 10
|
|
1278
1290
|
);
|
|
1279
|
-
g
|
|
1280
|
-
visible:
|
|
1281
|
-
hidden:
|
|
1291
|
+
g?.reduce((S, b, R) => (S + b + v > p - 20 ? x.push(o[R]) : w.push(o[R]), S + b), 0), d({
|
|
1292
|
+
visible: w,
|
|
1293
|
+
hidden: x
|
|
1282
1294
|
});
|
|
1283
|
-
}, g =
|
|
1284
|
-
() =>
|
|
1295
|
+
}, g = ye(
|
|
1296
|
+
() => o?.map((m) => r(m, h?.measureText(m).width ?? 0)) ?? [],
|
|
1285
1297
|
[o]
|
|
1286
1298
|
);
|
|
1287
|
-
return
|
|
1299
|
+
return be(() => {
|
|
1288
1300
|
f();
|
|
1289
|
-
}, [o]),
|
|
1290
|
-
if (!
|
|
1301
|
+
}, [o]), be(() => {
|
|
1302
|
+
if (!s?.current) return;
|
|
1291
1303
|
const m = new ResizeObserver(() => {
|
|
1292
1304
|
f();
|
|
1293
1305
|
});
|
|
1294
|
-
return m.observe(
|
|
1306
|
+
return m.observe(s.current), () => {
|
|
1295
1307
|
m.disconnect();
|
|
1296
1308
|
};
|
|
1297
|
-
}, [o]), /* @__PURE__ */
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1309
|
+
}, [o]), /* @__PURE__ */ V(je, { children: [
|
|
1310
|
+
a.visible?.map((m, p) => t(m, p, i?.[p])),
|
|
1311
|
+
a.hidden?.length > 0 && /* @__PURE__ */ y(
|
|
1312
|
+
st,
|
|
1301
1313
|
{
|
|
1302
1314
|
trigger: "click",
|
|
1303
|
-
content: /* @__PURE__ */ y("div", { className: "grid max-h-60 grid-flow-row grid-cols-2 gap-3 overflow-auto p-2", children:
|
|
1315
|
+
content: /* @__PURE__ */ y("div", { className: "grid max-h-60 grid-flow-row grid-cols-2 gap-3 overflow-auto p-2", children: a.hidden.map(
|
|
1304
1316
|
(m, p) => t(
|
|
1305
1317
|
m,
|
|
1306
|
-
|
|
1307
|
-
|
|
1318
|
+
a.visible.length + p,
|
|
1319
|
+
i?.[a.visible.length + p]
|
|
1308
1320
|
)
|
|
1309
1321
|
) }),
|
|
1310
|
-
children: /* @__PURE__ */ y(
|
|
1322
|
+
children: /* @__PURE__ */ y(He, { className: u, variant: c, children: /* @__PURE__ */ y("p", { children: `+${a.hidden.length} ${n}` }) }, "more_items_button")
|
|
1311
1323
|
}
|
|
1312
1324
|
)
|
|
1313
1325
|
] });
|
|
1314
1326
|
}
|
|
1315
|
-
function
|
|
1316
|
-
let n = t.initialDeps ?? [],
|
|
1317
|
-
|
|
1318
|
-
var
|
|
1319
|
-
let
|
|
1320
|
-
t.key && ((
|
|
1321
|
-
const
|
|
1322
|
-
if (!(
|
|
1323
|
-
return
|
|
1324
|
-
n =
|
|
1325
|
-
let
|
|
1326
|
-
if (t.key && ((
|
|
1327
|
-
const
|
|
1328
|
-
for (
|
|
1329
|
-
|
|
1330
|
-
return
|
|
1327
|
+
function G(e, o, t) {
|
|
1328
|
+
let n = t.initialDeps ?? [], s;
|
|
1329
|
+
function i() {
|
|
1330
|
+
var r, l, c, u;
|
|
1331
|
+
let a;
|
|
1332
|
+
t.key && ((r = t.debug) != null && r.call(t)) && (a = Date.now());
|
|
1333
|
+
const d = e();
|
|
1334
|
+
if (!(d.length !== n.length || d.some((g, m) => n[m] !== g)))
|
|
1335
|
+
return s;
|
|
1336
|
+
n = d;
|
|
1337
|
+
let f;
|
|
1338
|
+
if (t.key && ((l = t.debug) != null && l.call(t)) && (f = Date.now()), s = o(...d), t.key && ((c = t.debug) != null && c.call(t))) {
|
|
1339
|
+
const g = Math.round((Date.now() - a) * 100) / 100, m = Math.round((Date.now() - f) * 100) / 100, p = m / 16, w = (x, v) => {
|
|
1340
|
+
for (x = String(x); x.length < v; )
|
|
1341
|
+
x = " " + x;
|
|
1342
|
+
return x;
|
|
1331
1343
|
};
|
|
1332
1344
|
console.info(
|
|
1333
|
-
`%c⏱ ${w(
|
|
1345
|
+
`%c⏱ ${w(m, 5)} /${w(g, 5)} ms`,
|
|
1334
1346
|
`
|
|
1335
1347
|
font-size: .6rem;
|
|
1336
1348
|
font-weight: bold;
|
|
1337
1349
|
color: hsl(${Math.max(
|
|
1338
1350
|
0,
|
|
1339
|
-
Math.min(120 - 120 *
|
|
1351
|
+
Math.min(120 - 120 * p, 120)
|
|
1340
1352
|
)}deg 100% 31%);`,
|
|
1341
|
-
t
|
|
1353
|
+
t?.key
|
|
1342
1354
|
);
|
|
1343
1355
|
}
|
|
1344
|
-
return (
|
|
1345
|
-
}
|
|
1356
|
+
return (u = t?.onChange) == null || u.call(t, s), s;
|
|
1357
|
+
}
|
|
1358
|
+
return i.updateDeps = (r) => {
|
|
1359
|
+
n = r;
|
|
1360
|
+
}, i;
|
|
1346
1361
|
}
|
|
1347
|
-
function
|
|
1362
|
+
function Fe(e, o) {
|
|
1348
1363
|
if (e === void 0)
|
|
1349
1364
|
throw new Error("Unexpected undefined");
|
|
1350
1365
|
return e;
|
|
1351
1366
|
}
|
|
1352
|
-
const
|
|
1367
|
+
const pn = (e, o) => Math.abs(e - o) < 1.01, wn = (e, o, t) => {
|
|
1353
1368
|
let n;
|
|
1354
|
-
return function(...
|
|
1355
|
-
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this,
|
|
1369
|
+
return function(...s) {
|
|
1370
|
+
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this, s), t);
|
|
1356
1371
|
};
|
|
1357
|
-
},
|
|
1372
|
+
}, Pe = (e) => {
|
|
1373
|
+
const { offsetWidth: o, offsetHeight: t } = e;
|
|
1374
|
+
return { width: o, height: t };
|
|
1375
|
+
}, xn = (e) => e, bn = (e) => {
|
|
1358
1376
|
const o = Math.max(e.startIndex - e.overscan, 0), t = Math.min(e.endIndex + e.overscan, e.count - 1), n = [];
|
|
1359
|
-
for (let
|
|
1360
|
-
n.push(
|
|
1377
|
+
for (let s = o; s <= t; s++)
|
|
1378
|
+
n.push(s);
|
|
1361
1379
|
return n;
|
|
1362
|
-
},
|
|
1380
|
+
}, yn = (e, o) => {
|
|
1363
1381
|
const t = e.scrollElement;
|
|
1364
1382
|
if (!t)
|
|
1365
1383
|
return;
|
|
1366
1384
|
const n = e.targetWindow;
|
|
1367
1385
|
if (!n)
|
|
1368
1386
|
return;
|
|
1369
|
-
const
|
|
1370
|
-
const { width: l, height:
|
|
1371
|
-
o({ width: Math.round(l), height: Math.round(
|
|
1387
|
+
const s = (r) => {
|
|
1388
|
+
const { width: l, height: c } = r;
|
|
1389
|
+
o({ width: Math.round(l), height: Math.round(c) });
|
|
1372
1390
|
};
|
|
1373
|
-
if (
|
|
1391
|
+
if (s(Pe(t)), !n.ResizeObserver)
|
|
1374
1392
|
return () => {
|
|
1375
1393
|
};
|
|
1376
|
-
const
|
|
1394
|
+
const i = new n.ResizeObserver((r) => {
|
|
1377
1395
|
const l = () => {
|
|
1378
|
-
const
|
|
1379
|
-
if (
|
|
1380
|
-
const
|
|
1381
|
-
if (
|
|
1382
|
-
|
|
1396
|
+
const c = r[0];
|
|
1397
|
+
if (c?.borderBoxSize) {
|
|
1398
|
+
const u = c.borderBoxSize[0];
|
|
1399
|
+
if (u) {
|
|
1400
|
+
s({ width: u.inlineSize, height: u.blockSize });
|
|
1383
1401
|
return;
|
|
1384
1402
|
}
|
|
1385
1403
|
}
|
|
1386
|
-
|
|
1404
|
+
s(Pe(t));
|
|
1387
1405
|
};
|
|
1388
1406
|
e.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(l) : l();
|
|
1389
1407
|
});
|
|
1390
|
-
return
|
|
1391
|
-
|
|
1408
|
+
return i.observe(t, { box: "border-box" }), () => {
|
|
1409
|
+
i.unobserve(t);
|
|
1392
1410
|
};
|
|
1393
|
-
},
|
|
1411
|
+
}, Ve = {
|
|
1394
1412
|
passive: !0
|
|
1395
|
-
},
|
|
1413
|
+
}, We = typeof window > "u" ? !0 : "onscrollend" in window, vn = (e, o) => {
|
|
1396
1414
|
const t = e.scrollElement;
|
|
1397
1415
|
if (!t)
|
|
1398
1416
|
return;
|
|
1399
1417
|
const n = e.targetWindow;
|
|
1400
1418
|
if (!n)
|
|
1401
1419
|
return;
|
|
1402
|
-
let
|
|
1403
|
-
const
|
|
1404
|
-
} :
|
|
1420
|
+
let s = 0;
|
|
1421
|
+
const i = e.options.useScrollendEvent && We ? () => {
|
|
1422
|
+
} : wn(
|
|
1405
1423
|
n,
|
|
1406
1424
|
() => {
|
|
1407
|
-
o(
|
|
1425
|
+
o(s, !1);
|
|
1408
1426
|
},
|
|
1409
1427
|
e.options.isScrollingResetDelay
|
|
1410
|
-
), r = (
|
|
1428
|
+
), r = (a) => () => {
|
|
1411
1429
|
const { horizontal: d, isRtl: h } = e.options;
|
|
1412
|
-
|
|
1413
|
-
}, l = r(!0),
|
|
1414
|
-
|
|
1415
|
-
const
|
|
1416
|
-
return
|
|
1417
|
-
t.removeEventListener("scroll", l),
|
|
1430
|
+
s = d ? t.scrollLeft * (h && -1 || 1) : t.scrollTop, i(), o(s, a);
|
|
1431
|
+
}, l = r(!0), c = r(!1);
|
|
1432
|
+
c(), t.addEventListener("scroll", l, Ve);
|
|
1433
|
+
const u = e.options.useScrollendEvent && We;
|
|
1434
|
+
return u && t.addEventListener("scrollend", c, Ve), () => {
|
|
1435
|
+
t.removeEventListener("scroll", l), u && t.removeEventListener("scrollend", c);
|
|
1418
1436
|
};
|
|
1419
|
-
},
|
|
1420
|
-
if (o
|
|
1437
|
+
}, Sn = (e, o, t) => {
|
|
1438
|
+
if (o?.borderBoxSize) {
|
|
1421
1439
|
const n = o.borderBoxSize[0];
|
|
1422
1440
|
if (n)
|
|
1423
1441
|
return Math.round(
|
|
1424
1442
|
n[t.options.horizontal ? "inlineSize" : "blockSize"]
|
|
1425
1443
|
);
|
|
1426
1444
|
}
|
|
1427
|
-
return
|
|
1428
|
-
|
|
1429
|
-
);
|
|
1430
|
-
}, rn = (e, {
|
|
1445
|
+
return e[t.options.horizontal ? "offsetWidth" : "offsetHeight"];
|
|
1446
|
+
}, Cn = (e, {
|
|
1431
1447
|
adjustments: o = 0,
|
|
1432
1448
|
behavior: t
|
|
1433
1449
|
}, n) => {
|
|
1434
|
-
var
|
|
1450
|
+
var s, i;
|
|
1435
1451
|
const r = e + o;
|
|
1436
|
-
(
|
|
1452
|
+
(i = (s = n.scrollElement) == null ? void 0 : s.scrollTo) == null || i.call(s, {
|
|
1437
1453
|
[n.options.horizontal ? "left" : "top"]: r,
|
|
1438
1454
|
behavior: t
|
|
1439
1455
|
});
|
|
1440
1456
|
};
|
|
1441
|
-
class
|
|
1457
|
+
class On {
|
|
1442
1458
|
constructor(o) {
|
|
1443
|
-
this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.
|
|
1459
|
+
this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, 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__ */ (() => {
|
|
1444
1460
|
let t = null;
|
|
1445
|
-
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((
|
|
1446
|
-
|
|
1461
|
+
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((s) => {
|
|
1462
|
+
s.forEach((i) => {
|
|
1447
1463
|
const r = () => {
|
|
1448
|
-
this._measureElement(
|
|
1464
|
+
this._measureElement(i.target, i);
|
|
1449
1465
|
};
|
|
1450
1466
|
this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(r) : r();
|
|
1451
1467
|
});
|
|
1452
1468
|
}));
|
|
1453
1469
|
return {
|
|
1454
1470
|
disconnect: () => {
|
|
1455
|
-
var i;
|
|
1456
|
-
(i = n()) == null || i.disconnect(), t = null;
|
|
1457
|
-
},
|
|
1458
|
-
observe: (i) => {
|
|
1459
1471
|
var s;
|
|
1460
|
-
|
|
1472
|
+
(s = n()) == null || s.disconnect(), t = null;
|
|
1461
1473
|
},
|
|
1462
|
-
|
|
1463
|
-
var
|
|
1464
|
-
return (
|
|
1474
|
+
observe: (s) => {
|
|
1475
|
+
var i;
|
|
1476
|
+
return (i = n()) == null ? void 0 : i.observe(s, { box: "border-box" });
|
|
1477
|
+
},
|
|
1478
|
+
unobserve: (s) => {
|
|
1479
|
+
var i;
|
|
1480
|
+
return (i = n()) == null ? void 0 : i.unobserve(s);
|
|
1465
1481
|
}
|
|
1466
1482
|
};
|
|
1467
1483
|
})(), this.range = null, this.setOptions = (t) => {
|
|
1468
|
-
Object.entries(t).forEach(([n,
|
|
1469
|
-
typeof
|
|
1484
|
+
Object.entries(t).forEach(([n, s]) => {
|
|
1485
|
+
typeof s > "u" && delete t[n];
|
|
1470
1486
|
}), this.options = {
|
|
1471
1487
|
debug: !1,
|
|
1472
1488
|
initialOffset: 0,
|
|
@@ -1476,11 +1492,11 @@ class ln {
|
|
|
1476
1492
|
scrollPaddingStart: 0,
|
|
1477
1493
|
scrollPaddingEnd: 0,
|
|
1478
1494
|
horizontal: !1,
|
|
1479
|
-
getItemKey:
|
|
1480
|
-
rangeExtractor:
|
|
1495
|
+
getItemKey: xn,
|
|
1496
|
+
rangeExtractor: bn,
|
|
1481
1497
|
onChange: () => {
|
|
1482
1498
|
},
|
|
1483
|
-
measureElement:
|
|
1499
|
+
measureElement: Sn,
|
|
1484
1500
|
initialRect: { width: 0, height: 0 },
|
|
1485
1501
|
scrollMargin: 0,
|
|
1486
1502
|
gap: 0,
|
|
@@ -1490,14 +1506,14 @@ class ln {
|
|
|
1490
1506
|
isScrollingResetDelay: 150,
|
|
1491
1507
|
enabled: !0,
|
|
1492
1508
|
isRtl: !1,
|
|
1493
|
-
useScrollendEvent: !
|
|
1509
|
+
useScrollendEvent: !1,
|
|
1494
1510
|
useAnimationFrameWithResizeObserver: !1,
|
|
1495
1511
|
...t
|
|
1496
1512
|
};
|
|
1497
1513
|
}, this.notify = (t) => {
|
|
1498
|
-
var n,
|
|
1499
|
-
(
|
|
1500
|
-
}, this.maybeNotify =
|
|
1514
|
+
var n, s;
|
|
1515
|
+
(s = (n = this.options).onChange) == null || s.call(n, this, t);
|
|
1516
|
+
}, this.maybeNotify = G(
|
|
1501
1517
|
() => (this.calculateRange(), [
|
|
1502
1518
|
this.isScrolling,
|
|
1503
1519
|
this.range ? this.range.startIndex : null,
|
|
@@ -1527,35 +1543,35 @@ class ln {
|
|
|
1527
1543
|
this.maybeNotify();
|
|
1528
1544
|
return;
|
|
1529
1545
|
}
|
|
1530
|
-
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((
|
|
1531
|
-
this.observer.observe(
|
|
1546
|
+
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((s) => {
|
|
1547
|
+
this.observer.observe(s);
|
|
1532
1548
|
}), this._scrollToOffset(this.getScrollOffset(), {
|
|
1533
1549
|
adjustments: void 0,
|
|
1534
1550
|
behavior: void 0
|
|
1535
1551
|
}), this.unsubs.push(
|
|
1536
|
-
this.options.observeElementRect(this, (
|
|
1537
|
-
this.scrollRect =
|
|
1552
|
+
this.options.observeElementRect(this, (s) => {
|
|
1553
|
+
this.scrollRect = s, this.maybeNotify();
|
|
1538
1554
|
})
|
|
1539
1555
|
), this.unsubs.push(
|
|
1540
|
-
this.options.observeElementOffset(this, (
|
|
1541
|
-
this.scrollAdjustments = 0, this.scrollDirection =
|
|
1556
|
+
this.options.observeElementOffset(this, (s, i) => {
|
|
1557
|
+
this.scrollAdjustments = 0, this.scrollDirection = i ? this.getScrollOffset() < s ? "forward" : "backward" : null, this.scrollOffset = s, this.isScrolling = i, this.maybeNotify();
|
|
1542
1558
|
})
|
|
1543
1559
|
);
|
|
1544
1560
|
}
|
|
1545
1561
|
}, 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) => {
|
|
1546
|
-
const
|
|
1562
|
+
const s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
1547
1563
|
for (let r = n - 1; r >= 0; r--) {
|
|
1548
1564
|
const l = t[r];
|
|
1549
|
-
if (
|
|
1565
|
+
if (s.has(l.lane))
|
|
1550
1566
|
continue;
|
|
1551
|
-
const
|
|
1567
|
+
const c = i.get(
|
|
1552
1568
|
l.lane
|
|
1553
1569
|
);
|
|
1554
|
-
if (
|
|
1570
|
+
if (c == null || l.end > c.end ? i.set(l.lane, l) : l.end < c.end && s.set(l.lane, !0), s.size === this.options.lanes)
|
|
1555
1571
|
break;
|
|
1556
1572
|
}
|
|
1557
|
-
return
|
|
1558
|
-
}, this.getMeasurementOptions =
|
|
1573
|
+
return i.size === this.options.lanes ? Array.from(i.values()).sort((r, l) => r.end === l.end ? r.index - l.index : r.end - l.end)[0] : void 0;
|
|
1574
|
+
}, this.getMeasurementOptions = G(
|
|
1559
1575
|
() => [
|
|
1560
1576
|
this.options.count,
|
|
1561
1577
|
this.options.paddingStart,
|
|
@@ -1563,66 +1579,66 @@ class ln {
|
|
|
1563
1579
|
this.options.getItemKey,
|
|
1564
1580
|
this.options.enabled
|
|
1565
1581
|
],
|
|
1566
|
-
(t, n,
|
|
1582
|
+
(t, n, s, i, r) => (this.pendingMeasuredCacheIndexes = [], {
|
|
1567
1583
|
count: t,
|
|
1568
1584
|
paddingStart: n,
|
|
1569
|
-
scrollMargin:
|
|
1570
|
-
getItemKey:
|
|
1585
|
+
scrollMargin: s,
|
|
1586
|
+
getItemKey: i,
|
|
1571
1587
|
enabled: r
|
|
1572
1588
|
}),
|
|
1573
1589
|
{
|
|
1574
1590
|
key: !1
|
|
1575
1591
|
}
|
|
1576
|
-
), this.getMeasurements =
|
|
1592
|
+
), this.getMeasurements = G(
|
|
1577
1593
|
() => [this.getMeasurementOptions(), this.itemSizeCache],
|
|
1578
|
-
({ count: t, paddingStart: n, scrollMargin:
|
|
1594
|
+
({ count: t, paddingStart: n, scrollMargin: s, getItemKey: i, enabled: r }, l) => {
|
|
1579
1595
|
if (!r)
|
|
1580
1596
|
return this.measurementsCache = [], this.itemSizeCache.clear(), [];
|
|
1581
|
-
this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((
|
|
1582
|
-
this.itemSizeCache.set(
|
|
1597
|
+
this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((a) => {
|
|
1598
|
+
this.itemSizeCache.set(a.key, a.size);
|
|
1583
1599
|
}));
|
|
1584
|
-
const
|
|
1600
|
+
const c = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
|
|
1585
1601
|
this.pendingMeasuredCacheIndexes = [];
|
|
1586
|
-
const
|
|
1587
|
-
for (let
|
|
1588
|
-
const d =
|
|
1589
|
-
|
|
1590
|
-
index:
|
|
1602
|
+
const u = this.measurementsCache.slice(0, c);
|
|
1603
|
+
for (let a = c; a < t; a++) {
|
|
1604
|
+
const d = i(a), h = this.options.lanes === 1 ? u[a - 1] : this.getFurthestMeasurement(u, a), f = h ? h.end + this.options.gap : n + s, g = l.get(d), m = typeof g == "number" ? g : this.options.estimateSize(a), p = f + m, w = h ? h.lane : a % this.options.lanes;
|
|
1605
|
+
u[a] = {
|
|
1606
|
+
index: a,
|
|
1591
1607
|
start: f,
|
|
1592
|
-
size:
|
|
1593
|
-
end:
|
|
1608
|
+
size: m,
|
|
1609
|
+
end: p,
|
|
1594
1610
|
key: d,
|
|
1595
|
-
lane:
|
|
1611
|
+
lane: w
|
|
1596
1612
|
};
|
|
1597
1613
|
}
|
|
1598
|
-
return this.measurementsCache =
|
|
1614
|
+
return this.measurementsCache = u, u;
|
|
1599
1615
|
},
|
|
1600
1616
|
{
|
|
1601
1617
|
key: process.env.NODE_ENV !== "production" && "getMeasurements",
|
|
1602
1618
|
debug: () => this.options.debug
|
|
1603
1619
|
}
|
|
1604
|
-
), this.calculateRange =
|
|
1620
|
+
), this.calculateRange = G(
|
|
1605
1621
|
() => [
|
|
1606
1622
|
this.getMeasurements(),
|
|
1607
1623
|
this.getSize(),
|
|
1608
1624
|
this.getScrollOffset(),
|
|
1609
1625
|
this.options.lanes
|
|
1610
1626
|
],
|
|
1611
|
-
(t, n,
|
|
1627
|
+
(t, n, s, i) => this.range = t.length > 0 && n > 0 ? En({
|
|
1612
1628
|
measurements: t,
|
|
1613
1629
|
outerSize: n,
|
|
1614
|
-
scrollOffset:
|
|
1615
|
-
lanes:
|
|
1630
|
+
scrollOffset: s,
|
|
1631
|
+
lanes: i
|
|
1616
1632
|
}) : null,
|
|
1617
1633
|
{
|
|
1618
1634
|
key: process.env.NODE_ENV !== "production" && "calculateRange",
|
|
1619
1635
|
debug: () => this.options.debug
|
|
1620
1636
|
}
|
|
1621
|
-
), this.getVirtualIndexes =
|
|
1637
|
+
), this.getVirtualIndexes = G(
|
|
1622
1638
|
() => {
|
|
1623
1639
|
let t = null, n = null;
|
|
1624
|
-
const
|
|
1625
|
-
return
|
|
1640
|
+
const s = this.calculateRange();
|
|
1641
|
+
return s && (t = s.startIndex, n = s.endIndex), this.maybeNotify.updateDeps([this.isScrolling, t, n]), [
|
|
1626
1642
|
this.options.rangeExtractor,
|
|
1627
1643
|
this.options.overscan,
|
|
1628
1644
|
this.options.count,
|
|
@@ -1630,53 +1646,53 @@ class ln {
|
|
|
1630
1646
|
n
|
|
1631
1647
|
];
|
|
1632
1648
|
},
|
|
1633
|
-
(t, n,
|
|
1634
|
-
startIndex:
|
|
1649
|
+
(t, n, s, i, r) => i === null || r === null ? [] : t({
|
|
1650
|
+
startIndex: i,
|
|
1635
1651
|
endIndex: r,
|
|
1636
1652
|
overscan: n,
|
|
1637
|
-
count:
|
|
1653
|
+
count: s
|
|
1638
1654
|
}),
|
|
1639
1655
|
{
|
|
1640
1656
|
key: process.env.NODE_ENV !== "production" && "getVirtualIndexes",
|
|
1641
1657
|
debug: () => this.options.debug
|
|
1642
1658
|
}
|
|
1643
1659
|
), this.indexFromElement = (t) => {
|
|
1644
|
-
const n = this.options.indexAttribute,
|
|
1645
|
-
return
|
|
1660
|
+
const n = this.options.indexAttribute, s = t.getAttribute(n);
|
|
1661
|
+
return s ? parseInt(s, 10) : (console.warn(
|
|
1646
1662
|
`Missing attribute name '${n}={index}' on measured element.`
|
|
1647
1663
|
), -1);
|
|
1648
1664
|
}, this._measureElement = (t, n) => {
|
|
1649
|
-
const
|
|
1650
|
-
if (!
|
|
1665
|
+
const s = this.indexFromElement(t), i = this.measurementsCache[s];
|
|
1666
|
+
if (!i)
|
|
1651
1667
|
return;
|
|
1652
|
-
const r =
|
|
1653
|
-
l !== t && (l && this.observer.unobserve(l), this.observer.observe(t), this.elementsCache.set(r, t)), t.isConnected && this.resizeItem(
|
|
1668
|
+
const r = i.key, l = this.elementsCache.get(r);
|
|
1669
|
+
l !== t && (l && this.observer.unobserve(l), this.observer.observe(t), this.elementsCache.set(r, t)), t.isConnected && this.resizeItem(s, this.options.measureElement(t, n, this));
|
|
1654
1670
|
}, this.resizeItem = (t, n) => {
|
|
1655
|
-
const
|
|
1656
|
-
if (!
|
|
1671
|
+
const s = this.measurementsCache[t];
|
|
1672
|
+
if (!s)
|
|
1657
1673
|
return;
|
|
1658
|
-
const
|
|
1659
|
-
r !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(
|
|
1674
|
+
const i = this.itemSizeCache.get(s.key) ?? s.size, r = n - i;
|
|
1675
|
+
r !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(s, r, this) : s.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", r), this._scrollToOffset(this.getScrollOffset(), {
|
|
1660
1676
|
adjustments: this.scrollAdjustments += r,
|
|
1661
1677
|
behavior: void 0
|
|
1662
|
-
})), this.pendingMeasuredCacheIndexes.push(
|
|
1678
|
+
})), this.pendingMeasuredCacheIndexes.push(s.index), this.itemSizeCache = new Map(this.itemSizeCache.set(s.key, n)), this.notify(!1));
|
|
1663
1679
|
}, this.measureElement = (t) => {
|
|
1664
1680
|
if (!t) {
|
|
1665
|
-
this.elementsCache.forEach((n,
|
|
1666
|
-
n.isConnected || (this.observer.unobserve(n), this.elementsCache.delete(
|
|
1681
|
+
this.elementsCache.forEach((n, s) => {
|
|
1682
|
+
n.isConnected || (this.observer.unobserve(n), this.elementsCache.delete(s));
|
|
1667
1683
|
});
|
|
1668
1684
|
return;
|
|
1669
1685
|
}
|
|
1670
1686
|
this._measureElement(t, void 0);
|
|
1671
|
-
}, this.getVirtualItems =
|
|
1687
|
+
}, this.getVirtualItems = G(
|
|
1672
1688
|
() => [this.getVirtualIndexes(), this.getMeasurements()],
|
|
1673
1689
|
(t, n) => {
|
|
1674
|
-
const
|
|
1675
|
-
for (let
|
|
1676
|
-
const l = t[
|
|
1677
|
-
|
|
1690
|
+
const s = [];
|
|
1691
|
+
for (let i = 0, r = t.length; i < r; i++) {
|
|
1692
|
+
const l = t[i], c = n[l];
|
|
1693
|
+
s.push(c);
|
|
1678
1694
|
}
|
|
1679
|
-
return
|
|
1695
|
+
return s;
|
|
1680
1696
|
},
|
|
1681
1697
|
{
|
|
1682
1698
|
key: process.env.NODE_ENV !== "production" && "getVirtualItems",
|
|
@@ -1685,66 +1701,73 @@ class ln {
|
|
|
1685
1701
|
), this.getVirtualItemForOffset = (t) => {
|
|
1686
1702
|
const n = this.getMeasurements();
|
|
1687
1703
|
if (n.length !== 0)
|
|
1688
|
-
return
|
|
1689
|
-
n[
|
|
1704
|
+
return Fe(
|
|
1705
|
+
n[it(
|
|
1690
1706
|
0,
|
|
1691
1707
|
n.length - 1,
|
|
1692
|
-
(
|
|
1708
|
+
(s) => Fe(n[s]).start,
|
|
1693
1709
|
t
|
|
1694
1710
|
)]
|
|
1695
1711
|
);
|
|
1696
|
-
}, this.getOffsetForAlignment = (t, n,
|
|
1697
|
-
const
|
|
1698
|
-
n === "auto" && (n = t >= r +
|
|
1699
|
-
const l = this.
|
|
1700
|
-
return Math.max(Math.min(
|
|
1712
|
+
}, this.getOffsetForAlignment = (t, n, s = 0) => {
|
|
1713
|
+
const i = this.getSize(), r = this.getScrollOffset();
|
|
1714
|
+
n === "auto" && (n = t >= r + i ? "end" : "start"), n === "center" ? t += (s - i) / 2 : n === "end" && (t -= i);
|
|
1715
|
+
const l = this.getTotalSize() + this.options.scrollMargin - i;
|
|
1716
|
+
return Math.max(Math.min(l, t), 0);
|
|
1701
1717
|
}, this.getOffsetForIndex = (t, n = "auto") => {
|
|
1702
1718
|
t = Math.max(0, Math.min(t, this.options.count - 1));
|
|
1703
|
-
const
|
|
1704
|
-
if (!
|
|
1719
|
+
const s = this.measurementsCache[t];
|
|
1720
|
+
if (!s)
|
|
1705
1721
|
return;
|
|
1706
|
-
const
|
|
1722
|
+
const i = this.getSize(), r = this.getScrollOffset();
|
|
1707
1723
|
if (n === "auto")
|
|
1708
|
-
if (
|
|
1724
|
+
if (s.end >= r + i - this.options.scrollPaddingEnd)
|
|
1709
1725
|
n = "end";
|
|
1710
|
-
else if (
|
|
1726
|
+
else if (s.start <= r + this.options.scrollPaddingStart)
|
|
1711
1727
|
n = "start";
|
|
1712
1728
|
else
|
|
1713
1729
|
return [r, n];
|
|
1714
|
-
const l = n === "end" ?
|
|
1730
|
+
const l = n === "end" ? s.end + this.options.scrollPaddingEnd : s.start - this.options.scrollPaddingStart;
|
|
1715
1731
|
return [
|
|
1716
|
-
this.getOffsetForAlignment(l, n,
|
|
1732
|
+
this.getOffsetForAlignment(l, n, s.size),
|
|
1717
1733
|
n
|
|
1718
1734
|
];
|
|
1719
|
-
}, this.isDynamicMode = () => this.elementsCache.size > 0, this.
|
|
1720
|
-
|
|
1721
|
-
}, this.scrollToOffset = (t, { align: n = "start", behavior: i } = {}) => {
|
|
1722
|
-
this.cancelScrollToIndex(), i === "smooth" && this.isDynamicMode() && console.warn(
|
|
1735
|
+
}, this.isDynamicMode = () => this.elementsCache.size > 0, this.scrollToOffset = (t, { align: n = "start", behavior: s } = {}) => {
|
|
1736
|
+
s === "smooth" && this.isDynamicMode() && console.warn(
|
|
1723
1737
|
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
1724
1738
|
), this._scrollToOffset(this.getOffsetForAlignment(t, n), {
|
|
1725
1739
|
adjustments: void 0,
|
|
1726
|
-
behavior:
|
|
1740
|
+
behavior: s
|
|
1727
1741
|
});
|
|
1728
|
-
}, this.scrollToIndex = (t, { align: n = "auto", behavior:
|
|
1729
|
-
|
|
1742
|
+
}, this.scrollToIndex = (t, { align: n = "auto", behavior: s } = {}) => {
|
|
1743
|
+
s === "smooth" && this.isDynamicMode() && console.warn(
|
|
1730
1744
|
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
1731
|
-
);
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
if (
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1745
|
+
), t = Math.max(0, Math.min(t, this.options.count - 1));
|
|
1746
|
+
let i = 0;
|
|
1747
|
+
const r = 10, l = (u) => {
|
|
1748
|
+
if (!this.targetWindow) return;
|
|
1749
|
+
const a = this.getOffsetForIndex(t, u);
|
|
1750
|
+
if (!a) {
|
|
1751
|
+
console.warn("Failed to get offset for index:", t);
|
|
1752
|
+
return;
|
|
1753
|
+
}
|
|
1754
|
+
const [d, h] = a;
|
|
1755
|
+
this._scrollToOffset(d, { adjustments: void 0, behavior: s }), this.targetWindow.requestAnimationFrame(() => {
|
|
1756
|
+
const f = this.getScrollOffset(), g = this.getOffsetForIndex(t, h);
|
|
1757
|
+
if (!g) {
|
|
1758
|
+
console.warn("Failed to get offset for index:", t);
|
|
1759
|
+
return;
|
|
1760
|
+
}
|
|
1761
|
+
pn(g[0], f) || c(h);
|
|
1762
|
+
});
|
|
1763
|
+
}, c = (u) => {
|
|
1764
|
+
this.targetWindow && (i++, i < r ? (process.env.NODE_ENV !== "production" && this.options.debug && console.info("Schedule retry", i, r), this.targetWindow.requestAnimationFrame(() => l(u))) : console.warn(
|
|
1765
|
+
`Failed to scroll to index ${t} after ${r} attempts.`
|
|
1766
|
+
));
|
|
1767
|
+
};
|
|
1768
|
+
l(n);
|
|
1746
1769
|
}, this.scrollBy = (t, { behavior: n } = {}) => {
|
|
1747
|
-
|
|
1770
|
+
n === "smooth" && this.isDynamicMode() && console.warn(
|
|
1748
1771
|
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
1749
1772
|
), this._scrollToOffset(this.getScrollOffset() + t, {
|
|
1750
1773
|
adjustments: void 0,
|
|
@@ -1753,74 +1776,104 @@ class ln {
|
|
|
1753
1776
|
}, this.getTotalSize = () => {
|
|
1754
1777
|
var t;
|
|
1755
1778
|
const n = this.getMeasurements();
|
|
1756
|
-
let
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1779
|
+
let s;
|
|
1780
|
+
if (n.length === 0)
|
|
1781
|
+
s = this.options.paddingStart;
|
|
1782
|
+
else if (this.options.lanes === 1)
|
|
1783
|
+
s = ((t = n[n.length - 1]) == null ? void 0 : t.end) ?? 0;
|
|
1784
|
+
else {
|
|
1785
|
+
const i = Array(this.options.lanes).fill(null);
|
|
1786
|
+
let r = n.length - 1;
|
|
1787
|
+
for (; r >= 0 && i.some((l) => l === null); ) {
|
|
1788
|
+
const l = n[r];
|
|
1789
|
+
i[l.lane] === null && (i[l.lane] = l.end), r--;
|
|
1790
|
+
}
|
|
1791
|
+
s = Math.max(...i.filter((l) => l !== null));
|
|
1792
|
+
}
|
|
1793
|
+
return Math.max(
|
|
1794
|
+
s - this.options.scrollMargin + this.options.paddingEnd,
|
|
1761
1795
|
0
|
|
1762
1796
|
);
|
|
1763
1797
|
}, this._scrollToOffset = (t, {
|
|
1764
1798
|
adjustments: n,
|
|
1765
|
-
behavior:
|
|
1799
|
+
behavior: s
|
|
1766
1800
|
}) => {
|
|
1767
|
-
this.options.scrollToFn(t, { behavior:
|
|
1801
|
+
this.options.scrollToFn(t, { behavior: s, adjustments: n }, this);
|
|
1768
1802
|
}, this.measure = () => {
|
|
1769
1803
|
this.itemSizeCache = /* @__PURE__ */ new Map(), this.notify(!1);
|
|
1770
1804
|
}, this.setOptions(o);
|
|
1771
1805
|
}
|
|
1772
1806
|
}
|
|
1773
|
-
const
|
|
1807
|
+
const it = (e, o, t, n) => {
|
|
1774
1808
|
for (; e <= o; ) {
|
|
1775
|
-
const
|
|
1776
|
-
if (
|
|
1777
|
-
e =
|
|
1778
|
-
else if (
|
|
1779
|
-
o =
|
|
1809
|
+
const s = (e + o) / 2 | 0, i = t(s);
|
|
1810
|
+
if (i < n)
|
|
1811
|
+
e = s + 1;
|
|
1812
|
+
else if (i > n)
|
|
1813
|
+
o = s - 1;
|
|
1780
1814
|
else
|
|
1781
|
-
return
|
|
1815
|
+
return s;
|
|
1782
1816
|
}
|
|
1783
1817
|
return e > 0 ? e - 1 : 0;
|
|
1784
1818
|
};
|
|
1785
|
-
function
|
|
1819
|
+
function En({
|
|
1786
1820
|
measurements: e,
|
|
1787
1821
|
outerSize: o,
|
|
1788
1822
|
scrollOffset: t,
|
|
1789
1823
|
lanes: n
|
|
1790
1824
|
}) {
|
|
1791
|
-
const
|
|
1792
|
-
|
|
1825
|
+
const s = e.length - 1, i = (c) => e[c].start;
|
|
1826
|
+
if (e.length <= n)
|
|
1827
|
+
return {
|
|
1828
|
+
startIndex: 0,
|
|
1829
|
+
endIndex: s
|
|
1830
|
+
};
|
|
1831
|
+
let r = it(
|
|
1793
1832
|
0,
|
|
1833
|
+
s,
|
|
1794
1834
|
i,
|
|
1795
|
-
(a) => e[a].start,
|
|
1796
1835
|
t
|
|
1797
1836
|
), l = r;
|
|
1798
|
-
|
|
1799
|
-
l
|
|
1800
|
-
|
|
1837
|
+
if (n === 1)
|
|
1838
|
+
for (; l < s && e[l].end < t + o; )
|
|
1839
|
+
l++;
|
|
1840
|
+
else if (n > 1) {
|
|
1841
|
+
const c = Array(n).fill(0);
|
|
1842
|
+
for (; l < s && c.some((a) => a < t + o); ) {
|
|
1843
|
+
const a = e[l];
|
|
1844
|
+
c[a.lane] = a.end, l++;
|
|
1845
|
+
}
|
|
1846
|
+
const u = Array(n).fill(t + o);
|
|
1847
|
+
for (; r >= 0 && u.some((a) => a >= t); ) {
|
|
1848
|
+
const a = e[r];
|
|
1849
|
+
u[a.lane] = a.start, r--;
|
|
1850
|
+
}
|
|
1851
|
+
r = Math.max(0, r - r % n), l = Math.min(s, l + (n - 1 - l % n));
|
|
1852
|
+
}
|
|
1853
|
+
return { startIndex: r, endIndex: l };
|
|
1801
1854
|
}
|
|
1802
|
-
const
|
|
1803
|
-
function
|
|
1804
|
-
const o =
|
|
1855
|
+
const Be = typeof document < "u" ? O.useLayoutEffect : O.useEffect;
|
|
1856
|
+
function Rn(e) {
|
|
1857
|
+
const o = O.useReducer(() => ({}), {})[1], t = {
|
|
1805
1858
|
...e,
|
|
1806
|
-
onChange: (
|
|
1859
|
+
onChange: (s, i) => {
|
|
1807
1860
|
var r;
|
|
1808
|
-
|
|
1861
|
+
i ? ut(o) : o(), (r = e.onChange) == null || r.call(e, s, i);
|
|
1809
1862
|
}
|
|
1810
|
-
}, [n] =
|
|
1811
|
-
() => new
|
|
1863
|
+
}, [n] = O.useState(
|
|
1864
|
+
() => new On(t)
|
|
1812
1865
|
);
|
|
1813
|
-
return n.setOptions(t),
|
|
1866
|
+
return n.setOptions(t), Be(() => n._didMount(), []), Be(() => n._willUpdate()), n;
|
|
1814
1867
|
}
|
|
1815
|
-
function
|
|
1816
|
-
return
|
|
1817
|
-
observeElementRect:
|
|
1818
|
-
observeElementOffset:
|
|
1819
|
-
scrollToFn:
|
|
1868
|
+
function kn(e) {
|
|
1869
|
+
return Rn({
|
|
1870
|
+
observeElementRect: yn,
|
|
1871
|
+
observeElementOffset: vn,
|
|
1872
|
+
scrollToFn: Cn,
|
|
1820
1873
|
...e
|
|
1821
1874
|
});
|
|
1822
1875
|
}
|
|
1823
|
-
function
|
|
1876
|
+
function An(e) {
|
|
1824
1877
|
return /* @__PURE__ */ y(
|
|
1825
1878
|
"svg",
|
|
1826
1879
|
{
|
|
@@ -1835,7 +1888,7 @@ function fn(e) {
|
|
|
1835
1888
|
}
|
|
1836
1889
|
);
|
|
1837
1890
|
}
|
|
1838
|
-
function
|
|
1891
|
+
function Mn(e) {
|
|
1839
1892
|
return /* @__PURE__ */ y(
|
|
1840
1893
|
"svg",
|
|
1841
1894
|
{
|
|
@@ -1857,7 +1910,7 @@ function dn(e) {
|
|
|
1857
1910
|
}
|
|
1858
1911
|
);
|
|
1859
1912
|
}
|
|
1860
|
-
function
|
|
1913
|
+
function zn(e) {
|
|
1861
1914
|
return /* @__PURE__ */ y(
|
|
1862
1915
|
"svg",
|
|
1863
1916
|
{
|
|
@@ -1872,44 +1925,43 @@ function hn(e) {
|
|
|
1872
1925
|
}
|
|
1873
1926
|
);
|
|
1874
1927
|
}
|
|
1875
|
-
function
|
|
1876
|
-
var g;
|
|
1928
|
+
function Dn(e) {
|
|
1877
1929
|
const {
|
|
1878
1930
|
items: o,
|
|
1879
1931
|
selected: t,
|
|
1880
1932
|
className: n,
|
|
1881
|
-
onChange:
|
|
1882
|
-
disabled:
|
|
1933
|
+
onChange: s,
|
|
1934
|
+
disabled: i,
|
|
1883
1935
|
placeholder: r = "Select an Item",
|
|
1884
1936
|
multiple: l,
|
|
1885
|
-
mutable:
|
|
1886
|
-
onAdd:
|
|
1887
|
-
} = e,
|
|
1937
|
+
mutable: c,
|
|
1938
|
+
onAdd: u
|
|
1939
|
+
} = e, a = ve(null), [d, h] = fe(!1), f = ve(null);
|
|
1888
1940
|
return /* @__PURE__ */ y(
|
|
1889
|
-
|
|
1941
|
+
st,
|
|
1890
1942
|
{
|
|
1891
1943
|
placement: "bottom",
|
|
1892
1944
|
trigger: "click",
|
|
1893
1945
|
show: d,
|
|
1894
1946
|
setShow: h,
|
|
1895
1947
|
role: "combobox",
|
|
1896
|
-
disabled:
|
|
1948
|
+
disabled: i,
|
|
1897
1949
|
style: {
|
|
1898
|
-
"--input-width": `${
|
|
1950
|
+
"--input-width": `${f.current?.offsetWidth}px`
|
|
1899
1951
|
},
|
|
1900
1952
|
content: /* @__PURE__ */ y(
|
|
1901
|
-
|
|
1953
|
+
Nn,
|
|
1902
1954
|
{
|
|
1903
|
-
...
|
|
1904
|
-
...l ? { multiple: l, items: o, onChange:
|
|
1955
|
+
...c ? { mutable: c, onAdd: u } : { mutable: c },
|
|
1956
|
+
...l ? { multiple: l, items: o, onChange: s, selected: t } : { items: o, onChange: s, selected: t }
|
|
1905
1957
|
}
|
|
1906
1958
|
),
|
|
1907
|
-
children: /* @__PURE__ */
|
|
1959
|
+
children: /* @__PURE__ */ V(
|
|
1908
1960
|
"div",
|
|
1909
1961
|
{
|
|
1910
|
-
className:
|
|
1962
|
+
className: k(
|
|
1911
1963
|
"inline-flex h-10 w-56 grow items-center justify-between rounded border-2 border-input bg-background p-2 transition",
|
|
1912
|
-
|
|
1964
|
+
i ? "cursor-not-allowed bg-muted text-muted" : "cursor-pointer",
|
|
1913
1965
|
d && "border-primary shadow-xs shadow-ring",
|
|
1914
1966
|
n
|
|
1915
1967
|
),
|
|
@@ -1918,54 +1970,54 @@ function wn(e) {
|
|
|
1918
1970
|
/* @__PURE__ */ y(
|
|
1919
1971
|
"div",
|
|
1920
1972
|
{
|
|
1921
|
-
className:
|
|
1973
|
+
className: k(
|
|
1922
1974
|
"flex max-w-[calc(100%-30px)] flex-none grow items-center gap-1 text-sm",
|
|
1923
|
-
|
|
1975
|
+
i ? "text-muted-foreground" : "text-foreground"
|
|
1924
1976
|
),
|
|
1925
|
-
ref:
|
|
1977
|
+
ref: a,
|
|
1926
1978
|
children: l ? /* @__PURE__ */ y(
|
|
1927
|
-
|
|
1979
|
+
gn,
|
|
1928
1980
|
{
|
|
1929
|
-
items: t.map((
|
|
1981
|
+
items: t.map((g) => g.text),
|
|
1930
1982
|
data: t,
|
|
1931
|
-
parentRef:
|
|
1932
|
-
estimator: (
|
|
1983
|
+
parentRef: a,
|
|
1984
|
+
estimator: (g, m) => m + 40,
|
|
1933
1985
|
badgeVariant: "secondary",
|
|
1934
1986
|
badgeStyles: "bg-input! h-6 min-w-min gap-2 bg-input!",
|
|
1935
|
-
children: (
|
|
1936
|
-
|
|
1987
|
+
children: (g, m, p) => /* @__PURE__ */ V(
|
|
1988
|
+
He,
|
|
1937
1989
|
{
|
|
1938
1990
|
className: "flex h-6 min-w-min gap-2 bg-input! pr-1",
|
|
1939
1991
|
variant: "secondary",
|
|
1940
1992
|
children: [
|
|
1941
|
-
|
|
1993
|
+
g,
|
|
1942
1994
|
/* @__PURE__ */ y(
|
|
1943
|
-
|
|
1995
|
+
dt,
|
|
1944
1996
|
{
|
|
1945
1997
|
onClick: () => {
|
|
1946
|
-
|
|
1998
|
+
s(t.filter((w) => w.key !== p?.key));
|
|
1947
1999
|
},
|
|
1948
2000
|
variant: "icon",
|
|
1949
2001
|
size: "icon",
|
|
1950
2002
|
className: "group bg-muted p-0.5 hover:bg-muted-foreground",
|
|
1951
|
-
children: /* @__PURE__ */ y(
|
|
2003
|
+
children: /* @__PURE__ */ y(zn, { className: "size-3 transition duration-300 group-hover:rotate-90 group-hover:text-muted" })
|
|
1952
2004
|
}
|
|
1953
2005
|
)
|
|
1954
2006
|
]
|
|
1955
2007
|
},
|
|
1956
|
-
`collapsed_item_${
|
|
2008
|
+
`collapsed_item_${m}`
|
|
1957
2009
|
)
|
|
1958
2010
|
}
|
|
1959
2011
|
) : t.text ?? r
|
|
1960
2012
|
}
|
|
1961
2013
|
),
|
|
1962
2014
|
/* @__PURE__ */ y(
|
|
1963
|
-
|
|
2015
|
+
An,
|
|
1964
2016
|
{
|
|
1965
|
-
className:
|
|
2017
|
+
className: k(
|
|
1966
2018
|
"size-4 rounded-full bg-input p-0.5 transition duration-300 ease-in-out",
|
|
1967
2019
|
d ? "rotate-180" : "rotate-0",
|
|
1968
|
-
|
|
2020
|
+
i ? "text-muted-foreground" : "text-foreground"
|
|
1969
2021
|
)
|
|
1970
2022
|
}
|
|
1971
2023
|
)
|
|
@@ -1975,33 +2027,33 @@ function wn(e) {
|
|
|
1975
2027
|
}
|
|
1976
2028
|
);
|
|
1977
2029
|
}
|
|
1978
|
-
function
|
|
1979
|
-
const { items: o, multiple: t, selected: n, onChange:
|
|
2030
|
+
function Nn(e) {
|
|
2031
|
+
const { items: o, multiple: t, selected: n, onChange: s, mutable: i, onAdd: r } = e, [l, c] = fe(""), u = ve(null), a = ye(
|
|
1980
2032
|
() => o.reduce((f, g) => ((!l.length || g.text.toLowerCase().includes(l.toLowerCase())) && f.push(g), f), []),
|
|
1981
2033
|
[o, l]
|
|
1982
|
-
), d =
|
|
1983
|
-
count:
|
|
1984
|
-
getScrollElement: () =>
|
|
2034
|
+
), d = kn({
|
|
2035
|
+
count: a.length,
|
|
2036
|
+
getScrollElement: () => u.current,
|
|
1985
2037
|
estimateSize: () => 35
|
|
1986
2038
|
}), h = n instanceof Array ? n.map((f) => f.key) : [n.key];
|
|
1987
|
-
return /* @__PURE__ */
|
|
1988
|
-
/* @__PURE__ */
|
|
1989
|
-
/* @__PURE__ */ y(
|
|
2039
|
+
return /* @__PURE__ */ V("div", { className: "flex min-w-[var(--input-width)] flex-col divide-y-2 divide-border overflow-hidden rounded border border-input bg-background", children: [
|
|
2040
|
+
/* @__PURE__ */ V("div", { className: k("inline-flex grow items-center rounded px-3 py-2"), children: [
|
|
2041
|
+
/* @__PURE__ */ y(Mn, { className: "left-3 top-3 mr-2 size-4 text-muted-foreground" }),
|
|
1990
2042
|
/* @__PURE__ */ y(
|
|
1991
2043
|
"input",
|
|
1992
2044
|
{
|
|
1993
2045
|
className: "inline-flex grow bg-transparent text-sm text-foreground outline-hidden",
|
|
1994
2046
|
placeholder: "Search",
|
|
1995
2047
|
value: l,
|
|
1996
|
-
onChange: (f) =>
|
|
2048
|
+
onChange: (f) => c(f.target.value)
|
|
1997
2049
|
}
|
|
1998
2050
|
)
|
|
1999
2051
|
] }),
|
|
2000
|
-
/* @__PURE__ */
|
|
2052
|
+
/* @__PURE__ */ V(
|
|
2001
2053
|
"ul",
|
|
2002
2054
|
{
|
|
2003
|
-
className:
|
|
2004
|
-
ref:
|
|
2055
|
+
className: k("max-h-60 grow overflow-auto shadow-sm", "focus:outline-hidden focus:ring-0"),
|
|
2056
|
+
ref: u,
|
|
2005
2057
|
children: [
|
|
2006
2058
|
/* @__PURE__ */ y(
|
|
2007
2059
|
"div",
|
|
@@ -2018,44 +2070,44 @@ function mn(e) {
|
|
|
2018
2070
|
height: `${f.size}px`,
|
|
2019
2071
|
transform: `translateY(${f.start}px)`
|
|
2020
2072
|
},
|
|
2021
|
-
className:
|
|
2073
|
+
className: k(
|
|
2022
2074
|
"absolute left-0 top-0 w-full cursor-pointer px-3 py-2 text-sm text-foreground",
|
|
2023
|
-
h.includes(
|
|
2075
|
+
h.includes(a[f.index].key) ? "bg-primary/90 text-primary-foreground" : "transition hover:bg-primary/60"
|
|
2024
2076
|
),
|
|
2025
2077
|
onClick: () => {
|
|
2026
|
-
t ? h.includes(
|
|
2078
|
+
t ? h.includes(a[f.index].key) ? s(
|
|
2027
2079
|
structuredClone(
|
|
2028
2080
|
n.filter(
|
|
2029
|
-
(g) => g.key !==
|
|
2081
|
+
(g) => g.key !== a[f.index].key
|
|
2030
2082
|
)
|
|
2031
2083
|
)
|
|
2032
|
-
) :
|
|
2084
|
+
) : s(structuredClone([...n, a[f.index]])) : s(a[f.index]);
|
|
2033
2085
|
},
|
|
2034
|
-
children:
|
|
2086
|
+
children: a[f.index].text
|
|
2035
2087
|
},
|
|
2036
2088
|
f.key
|
|
2037
2089
|
))
|
|
2038
2090
|
}
|
|
2039
2091
|
),
|
|
2040
|
-
l.length > 0 &&
|
|
2092
|
+
l.length > 0 && a.length === 0 && (i ? /* @__PURE__ */ V(
|
|
2041
2093
|
"li",
|
|
2042
2094
|
{
|
|
2043
|
-
className:
|
|
2095
|
+
className: k("px-3 py-2 text-sm text-foreground"),
|
|
2044
2096
|
onClick: () => {
|
|
2045
|
-
r({ text: l, key: l }),
|
|
2097
|
+
r({ text: l, key: l }), c("");
|
|
2046
2098
|
},
|
|
2047
2099
|
children: [
|
|
2048
2100
|
"Add ",
|
|
2049
2101
|
l
|
|
2050
2102
|
]
|
|
2051
2103
|
}
|
|
2052
|
-
) : /* @__PURE__ */ y("li", { className:
|
|
2104
|
+
) : /* @__PURE__ */ y("li", { className: k("cursor-not-allowed px-3 py-2 text-sm text-foreground"), children: "No results found" }))
|
|
2053
2105
|
]
|
|
2054
2106
|
}
|
|
2055
2107
|
)
|
|
2056
2108
|
] });
|
|
2057
2109
|
}
|
|
2058
|
-
function
|
|
2110
|
+
function In(e) {
|
|
2059
2111
|
return /* @__PURE__ */ y(
|
|
2060
2112
|
"svg",
|
|
2061
2113
|
{
|
|
@@ -2070,12 +2122,12 @@ function bn(e) {
|
|
|
2070
2122
|
}
|
|
2071
2123
|
);
|
|
2072
2124
|
}
|
|
2073
|
-
function
|
|
2125
|
+
function Fn(e) {
|
|
2074
2126
|
const { className: o, ...t } = e;
|
|
2075
2127
|
return /* @__PURE__ */ y(
|
|
2076
2128
|
"input",
|
|
2077
2129
|
{
|
|
2078
|
-
className:
|
|
2130
|
+
className: k(
|
|
2079
2131
|
"h-10 w-full rounded border-2 border-input bg-background px-3 py-2 text-sm text-foreground transition",
|
|
2080
2132
|
"focus-visible:border-primary focus-visible:shadow-xs focus-visible:shadow-ring focus-visible:outline-hidden",
|
|
2081
2133
|
"read-only:cursor-pointer read-only:border-none! read-only:bg-transparent read-only:text-foreground read-only:shadow-none! read-only:outline-hidden!",
|
|
@@ -2087,27 +2139,27 @@ function yn(e) {
|
|
|
2087
2139
|
}
|
|
2088
2140
|
);
|
|
2089
2141
|
}
|
|
2090
|
-
function
|
|
2091
|
-
const { className: o, checked: t, onChange: n, defaultChecked:
|
|
2092
|
-
return /* @__PURE__ */
|
|
2142
|
+
function Pn(e) {
|
|
2143
|
+
const { className: o, checked: t, onChange: n, defaultChecked: s, ...i } = e;
|
|
2144
|
+
return /* @__PURE__ */ V(
|
|
2093
2145
|
"div",
|
|
2094
2146
|
{
|
|
2095
|
-
className:
|
|
2147
|
+
className: k(
|
|
2096
2148
|
"rounded-full",
|
|
2097
2149
|
"h-5 w-10",
|
|
2098
|
-
"border
|
|
2150
|
+
"border-muted bg-secondary border",
|
|
2099
2151
|
"flex items-center",
|
|
2100
2152
|
o
|
|
2101
2153
|
),
|
|
2102
|
-
onClick: () => n
|
|
2154
|
+
onClick: () => n?.(!t),
|
|
2103
2155
|
children: [
|
|
2104
|
-
/* @__PURE__ */ y("input", { type: "hidden", readOnly: !0, ...
|
|
2156
|
+
/* @__PURE__ */ y("input", { type: "hidden", readOnly: !0, ...i, defaultChecked: s, checked: t }),
|
|
2105
2157
|
/* @__PURE__ */ y(
|
|
2106
2158
|
"div",
|
|
2107
2159
|
{
|
|
2108
|
-
className:
|
|
2109
|
-
"[animation-timing-function:cubic-bezier(1, 0, 0, 1)]
|
|
2110
|
-
t ? "translate-x-5" : "translate-x-
|
|
2160
|
+
className: k(
|
|
2161
|
+
"[animation-timing-function:cubic-bezier(1, 0, 0, 1)] bg-primary size-4 rounded-full transition-all duration-250",
|
|
2162
|
+
t ? "translate-x-5" : "translate-x-0"
|
|
2111
2163
|
)
|
|
2112
2164
|
}
|
|
2113
2165
|
)
|
|
@@ -2115,12 +2167,12 @@ function vn(e) {
|
|
|
2115
2167
|
}
|
|
2116
2168
|
);
|
|
2117
2169
|
}
|
|
2118
|
-
function
|
|
2170
|
+
function Vn(e) {
|
|
2119
2171
|
const { className: o, ...t } = e;
|
|
2120
2172
|
return /* @__PURE__ */ y(
|
|
2121
2173
|
"textarea",
|
|
2122
2174
|
{
|
|
2123
|
-
className:
|
|
2175
|
+
className: k(
|
|
2124
2176
|
"border-input bg-background text-foreground h-10 w-full rounded border-2 px-3 py-2 text-sm transition",
|
|
2125
2177
|
"focus-visible:border-primary focus-visible:shadow-ring focus-visible:shadow-xs focus-visible:outline-hidden",
|
|
2126
2178
|
"read-only:text-foreground read-only:cursor-pointer read-only:border-none! read-only:bg-transparent read-only:shadow-none! read-only:outline-hidden!",
|
|
@@ -2133,17 +2185,17 @@ function En(e) {
|
|
|
2133
2185
|
);
|
|
2134
2186
|
}
|
|
2135
2187
|
export {
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2188
|
+
He as Badge,
|
|
2189
|
+
dt as Button,
|
|
2190
|
+
In as ChevronDown,
|
|
2191
|
+
An as ChevronUp,
|
|
2192
|
+
gn as Collapse,
|
|
2193
|
+
Dn as Dropdown,
|
|
2194
|
+
Fn as Input,
|
|
2195
|
+
st as Popover,
|
|
2196
|
+
Mn as Search,
|
|
2197
|
+
Vn as TextArea,
|
|
2198
|
+
Pn as Toggle,
|
|
2199
|
+
$e as cva,
|
|
2200
|
+
k as cx
|
|
2149
2201
|
};
|