@openfeed-ink/widget 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/README.md +141 -0
- package/dist/npm/AnnouncementBanner-BPo8Jmax.js +75 -0
- package/dist/npm/App.d.ts +5 -0
- package/dist/npm/ChangelogTab-DBQ5Ip6K.js +18 -0
- package/dist/npm/DrawerType-D9YHimv7.js +1184 -0
- package/dist/npm/FeatureDialog-BU1c2n3F.js +31 -0
- package/dist/npm/FeedbackTab-V7VCrze1.js +71 -0
- package/dist/npm/Main.d.ts +5 -0
- package/dist/npm/PopoverType-DlyRog2q.js +1863 -0
- package/dist/npm/RoadmapTab-DOYJBpgd.js +18 -0
- package/dist/npm/WidgetContent-Bs4eY5OF.js +507 -0
- package/dist/npm/button-Q2Dh1yK6.js +3086 -0
- package/dist/npm/components/AnnouncementBanner.d.ts +4 -0
- package/dist/npm/components/ChangelogTab.d.ts +6 -0
- package/dist/npm/components/FeatureDialog.d.ts +5 -0
- package/dist/npm/components/FeedbackTab.d.ts +8 -0
- package/dist/npm/components/NewFeedback.d.ts +9 -0
- package/dist/npm/components/RoadmapTab.d.ts +6 -0
- package/dist/npm/components/WidgetContent.d.ts +8 -0
- package/dist/npm/components/theme-provider.d.ts +8 -0
- package/dist/npm/components/triggerType/DrawerType.d.ts +11 -0
- package/dist/npm/components/triggerType/PopoverType.d.ts +11 -0
- package/dist/npm/components/ui/button.d.ts +10 -0
- package/dist/npm/components/ui/dialog.d.ts +11 -0
- package/dist/npm/components/ui/drawer.d.ts +10 -0
- package/dist/npm/components/ui/popover.d.ts +7 -0
- package/dist/npm/components/ui/tabs.d.ts +11 -0
- package/dist/npm/context/outsideEvent.d.ts +17 -0
- package/dist/npm/context/shadow-root.d.ts +5 -0
- package/dist/npm/dialog-5J_RZfbt.js +107 -0
- package/dist/npm/hooks/use-local-storage.d.ts +1 -0
- package/dist/npm/index-BaBFRQOq.js +1043 -0
- package/dist/npm/index-BkmaVINv.js +334 -0
- package/dist/npm/index-MTTUickr.js +237 -0
- package/dist/npm/index.d.ts +2 -0
- package/dist/npm/index.js +6 -0
- package/dist/npm/lib/utils.d.ts +2 -0
- package/dist/npm/mount.d.ts +7 -0
- package/dist/npm/react/OpenFeed.d.ts +7 -0
- package/dist/npm/types/index.d.ts +31 -0
- package/dist/npm/x-BkA0RvhX.js +9 -0
- package/package.json +95 -0
|
@@ -0,0 +1,1863 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as y, jsxs as pt } from "react/jsx-runtime";
|
|
3
|
+
import { u as xt, a as Xe, c as je, B as Ye } from "./button-Q2Dh1yK6.js";
|
|
4
|
+
import { a as qe } from "./index-BkmaVINv.js";
|
|
5
|
+
import * as g from "react";
|
|
6
|
+
import { useLayoutEffect as Ke, Suspense as Ue } from "react";
|
|
7
|
+
import { u as Et, P as at, c as te, a as Ge, b as Ze, d as Je, e as st, f as ee, g as Qe, h as tn, R as en, i as nn, F as on, D as rn } from "./index-BaBFRQOq.js";
|
|
8
|
+
import * as sn from "react-dom";
|
|
9
|
+
import { W as cn } from "./WidgetContent-Bs4eY5OF.js";
|
|
10
|
+
function an(t) {
|
|
11
|
+
const [e, n] = g.useState(void 0);
|
|
12
|
+
return Et(() => {
|
|
13
|
+
if (t) {
|
|
14
|
+
n({ width: t.offsetWidth, height: t.offsetHeight });
|
|
15
|
+
const o = new ResizeObserver((r) => {
|
|
16
|
+
if (!Array.isArray(r) || !r.length)
|
|
17
|
+
return;
|
|
18
|
+
const i = r[0];
|
|
19
|
+
let s, c;
|
|
20
|
+
if ("borderBoxSize" in i) {
|
|
21
|
+
const a = i.borderBoxSize, f = Array.isArray(a) ? a[0] : a;
|
|
22
|
+
s = f.inlineSize, c = f.blockSize;
|
|
23
|
+
} else
|
|
24
|
+
s = t.offsetWidth, c = t.offsetHeight;
|
|
25
|
+
n({ width: s, height: c });
|
|
26
|
+
});
|
|
27
|
+
return o.observe(t, { box: "border-box" }), () => o.unobserve(t);
|
|
28
|
+
} else
|
|
29
|
+
n(void 0);
|
|
30
|
+
}, [t]), e;
|
|
31
|
+
}
|
|
32
|
+
const ln = ["top", "right", "bottom", "left"], U = Math.min, W = Math.max, mt = Math.round, dt = Math.floor, X = (t) => ({
|
|
33
|
+
x: t,
|
|
34
|
+
y: t
|
|
35
|
+
}), fn = {
|
|
36
|
+
left: "right",
|
|
37
|
+
right: "left",
|
|
38
|
+
bottom: "top",
|
|
39
|
+
top: "bottom"
|
|
40
|
+
};
|
|
41
|
+
function Dt(t, e, n) {
|
|
42
|
+
return W(t, U(e, n));
|
|
43
|
+
}
|
|
44
|
+
function Y(t, e) {
|
|
45
|
+
return typeof t == "function" ? t(e) : t;
|
|
46
|
+
}
|
|
47
|
+
function q(t) {
|
|
48
|
+
return t.split("-")[0];
|
|
49
|
+
}
|
|
50
|
+
function ot(t) {
|
|
51
|
+
return t.split("-")[1];
|
|
52
|
+
}
|
|
53
|
+
function Tt(t) {
|
|
54
|
+
return t === "x" ? "y" : "x";
|
|
55
|
+
}
|
|
56
|
+
function _t(t) {
|
|
57
|
+
return t === "y" ? "height" : "width";
|
|
58
|
+
}
|
|
59
|
+
function V(t) {
|
|
60
|
+
const e = t[0];
|
|
61
|
+
return e === "t" || e === "b" ? "y" : "x";
|
|
62
|
+
}
|
|
63
|
+
function Ft(t) {
|
|
64
|
+
return Tt(V(t));
|
|
65
|
+
}
|
|
66
|
+
function un(t, e, n) {
|
|
67
|
+
n === void 0 && (n = !1);
|
|
68
|
+
const o = ot(t), r = Ft(t), i = _t(r);
|
|
69
|
+
let s = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
70
|
+
return e.reference[i] > e.floating[i] && (s = gt(s)), [s, gt(s)];
|
|
71
|
+
}
|
|
72
|
+
function dn(t) {
|
|
73
|
+
const e = gt(t);
|
|
74
|
+
return [Mt(t), e, Mt(e)];
|
|
75
|
+
}
|
|
76
|
+
function Mt(t) {
|
|
77
|
+
return t.includes("start") ? t.replace("start", "end") : t.replace("end", "start");
|
|
78
|
+
}
|
|
79
|
+
const Vt = ["left", "right"], Xt = ["right", "left"], pn = ["top", "bottom"], hn = ["bottom", "top"];
|
|
80
|
+
function mn(t, e, n) {
|
|
81
|
+
switch (t) {
|
|
82
|
+
case "top":
|
|
83
|
+
case "bottom":
|
|
84
|
+
return n ? e ? Xt : Vt : e ? Vt : Xt;
|
|
85
|
+
case "left":
|
|
86
|
+
case "right":
|
|
87
|
+
return e ? pn : hn;
|
|
88
|
+
default:
|
|
89
|
+
return [];
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function gn(t, e, n, o) {
|
|
93
|
+
const r = ot(t);
|
|
94
|
+
let i = mn(q(t), n === "start", o);
|
|
95
|
+
return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(Mt)))), i;
|
|
96
|
+
}
|
|
97
|
+
function gt(t) {
|
|
98
|
+
const e = q(t);
|
|
99
|
+
return fn[e] + t.slice(e.length);
|
|
100
|
+
}
|
|
101
|
+
function wn(t) {
|
|
102
|
+
return {
|
|
103
|
+
top: 0,
|
|
104
|
+
right: 0,
|
|
105
|
+
bottom: 0,
|
|
106
|
+
left: 0,
|
|
107
|
+
...t
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function ne(t) {
|
|
111
|
+
return typeof t != "number" ? wn(t) : {
|
|
112
|
+
top: t,
|
|
113
|
+
right: t,
|
|
114
|
+
bottom: t,
|
|
115
|
+
left: t
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function wt(t) {
|
|
119
|
+
const {
|
|
120
|
+
x: e,
|
|
121
|
+
y: n,
|
|
122
|
+
width: o,
|
|
123
|
+
height: r
|
|
124
|
+
} = t;
|
|
125
|
+
return {
|
|
126
|
+
width: o,
|
|
127
|
+
height: r,
|
|
128
|
+
top: n,
|
|
129
|
+
left: e,
|
|
130
|
+
right: e + o,
|
|
131
|
+
bottom: n + r,
|
|
132
|
+
x: e,
|
|
133
|
+
y: n
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
function jt(t, e, n) {
|
|
137
|
+
let {
|
|
138
|
+
reference: o,
|
|
139
|
+
floating: r
|
|
140
|
+
} = t;
|
|
141
|
+
const i = V(e), s = Ft(e), c = _t(s), a = q(e), f = i === "y", l = o.x + o.width / 2 - r.width / 2, u = o.y + o.height / 2 - r.height / 2, p = o[c] / 2 - r[c] / 2;
|
|
142
|
+
let d;
|
|
143
|
+
switch (a) {
|
|
144
|
+
case "top":
|
|
145
|
+
d = {
|
|
146
|
+
x: l,
|
|
147
|
+
y: o.y - r.height
|
|
148
|
+
};
|
|
149
|
+
break;
|
|
150
|
+
case "bottom":
|
|
151
|
+
d = {
|
|
152
|
+
x: l,
|
|
153
|
+
y: o.y + o.height
|
|
154
|
+
};
|
|
155
|
+
break;
|
|
156
|
+
case "right":
|
|
157
|
+
d = {
|
|
158
|
+
x: o.x + o.width,
|
|
159
|
+
y: u
|
|
160
|
+
};
|
|
161
|
+
break;
|
|
162
|
+
case "left":
|
|
163
|
+
d = {
|
|
164
|
+
x: o.x - r.width,
|
|
165
|
+
y: u
|
|
166
|
+
};
|
|
167
|
+
break;
|
|
168
|
+
default:
|
|
169
|
+
d = {
|
|
170
|
+
x: o.x,
|
|
171
|
+
y: o.y
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
switch (ot(e)) {
|
|
175
|
+
case "start":
|
|
176
|
+
d[s] -= p * (n && f ? -1 : 1);
|
|
177
|
+
break;
|
|
178
|
+
case "end":
|
|
179
|
+
d[s] += p * (n && f ? -1 : 1);
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
return d;
|
|
183
|
+
}
|
|
184
|
+
async function vn(t, e) {
|
|
185
|
+
var n;
|
|
186
|
+
e === void 0 && (e = {});
|
|
187
|
+
const {
|
|
188
|
+
x: o,
|
|
189
|
+
y: r,
|
|
190
|
+
platform: i,
|
|
191
|
+
rects: s,
|
|
192
|
+
elements: c,
|
|
193
|
+
strategy: a
|
|
194
|
+
} = t, {
|
|
195
|
+
boundary: f = "clippingAncestors",
|
|
196
|
+
rootBoundary: l = "viewport",
|
|
197
|
+
elementContext: u = "floating",
|
|
198
|
+
altBoundary: p = !1,
|
|
199
|
+
padding: d = 0
|
|
200
|
+
} = Y(e, t), h = ne(d), x = c[p ? u === "floating" ? "reference" : "floating" : u], w = wt(await i.getClippingRect({
|
|
201
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(x))) == null || n ? x : x.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
|
|
202
|
+
boundary: f,
|
|
203
|
+
rootBoundary: l,
|
|
204
|
+
strategy: a
|
|
205
|
+
})), P = u === "floating" ? {
|
|
206
|
+
x: o,
|
|
207
|
+
y: r,
|
|
208
|
+
width: s.floating.width,
|
|
209
|
+
height: s.floating.height
|
|
210
|
+
} : s.reference, b = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), v = await (i.isElement == null ? void 0 : i.isElement(b)) ? await (i.getScale == null ? void 0 : i.getScale(b)) || {
|
|
211
|
+
x: 1,
|
|
212
|
+
y: 1
|
|
213
|
+
} : {
|
|
214
|
+
x: 1,
|
|
215
|
+
y: 1
|
|
216
|
+
}, R = wt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
217
|
+
elements: c,
|
|
218
|
+
rect: P,
|
|
219
|
+
offsetParent: b,
|
|
220
|
+
strategy: a
|
|
221
|
+
}) : P);
|
|
222
|
+
return {
|
|
223
|
+
top: (w.top - R.top + h.top) / v.y,
|
|
224
|
+
bottom: (R.bottom - w.bottom + h.bottom) / v.y,
|
|
225
|
+
left: (w.left - R.left + h.left) / v.x,
|
|
226
|
+
right: (R.right - w.right + h.right) / v.x
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
const xn = 50, yn = async (t, e, n) => {
|
|
230
|
+
const {
|
|
231
|
+
placement: o = "bottom",
|
|
232
|
+
strategy: r = "absolute",
|
|
233
|
+
middleware: i = [],
|
|
234
|
+
platform: s
|
|
235
|
+
} = n, c = s.detectOverflow ? s : {
|
|
236
|
+
...s,
|
|
237
|
+
detectOverflow: vn
|
|
238
|
+
}, a = await (s.isRTL == null ? void 0 : s.isRTL(e));
|
|
239
|
+
let f = await s.getElementRects({
|
|
240
|
+
reference: t,
|
|
241
|
+
floating: e,
|
|
242
|
+
strategy: r
|
|
243
|
+
}), {
|
|
244
|
+
x: l,
|
|
245
|
+
y: u
|
|
246
|
+
} = jt(f, o, a), p = o, d = 0;
|
|
247
|
+
const h = {};
|
|
248
|
+
for (let m = 0; m < i.length; m++) {
|
|
249
|
+
const x = i[m];
|
|
250
|
+
if (!x)
|
|
251
|
+
continue;
|
|
252
|
+
const {
|
|
253
|
+
name: w,
|
|
254
|
+
fn: P
|
|
255
|
+
} = x, {
|
|
256
|
+
x: b,
|
|
257
|
+
y: v,
|
|
258
|
+
data: R,
|
|
259
|
+
reset: C
|
|
260
|
+
} = await P({
|
|
261
|
+
x: l,
|
|
262
|
+
y: u,
|
|
263
|
+
initialPlacement: o,
|
|
264
|
+
placement: p,
|
|
265
|
+
strategy: r,
|
|
266
|
+
middlewareData: h,
|
|
267
|
+
rects: f,
|
|
268
|
+
platform: c,
|
|
269
|
+
elements: {
|
|
270
|
+
reference: t,
|
|
271
|
+
floating: e
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
l = b ?? l, u = v ?? u, h[w] = {
|
|
275
|
+
...h[w],
|
|
276
|
+
...R
|
|
277
|
+
}, C && d < xn && (d++, typeof C == "object" && (C.placement && (p = C.placement), C.rects && (f = C.rects === !0 ? await s.getElementRects({
|
|
278
|
+
reference: t,
|
|
279
|
+
floating: e,
|
|
280
|
+
strategy: r
|
|
281
|
+
}) : C.rects), {
|
|
282
|
+
x: l,
|
|
283
|
+
y: u
|
|
284
|
+
} = jt(f, p, a)), m = -1);
|
|
285
|
+
}
|
|
286
|
+
return {
|
|
287
|
+
x: l,
|
|
288
|
+
y: u,
|
|
289
|
+
placement: p,
|
|
290
|
+
strategy: r,
|
|
291
|
+
middlewareData: h
|
|
292
|
+
};
|
|
293
|
+
}, bn = (t) => ({
|
|
294
|
+
name: "arrow",
|
|
295
|
+
options: t,
|
|
296
|
+
async fn(e) {
|
|
297
|
+
const {
|
|
298
|
+
x: n,
|
|
299
|
+
y: o,
|
|
300
|
+
placement: r,
|
|
301
|
+
rects: i,
|
|
302
|
+
platform: s,
|
|
303
|
+
elements: c,
|
|
304
|
+
middlewareData: a
|
|
305
|
+
} = e, {
|
|
306
|
+
element: f,
|
|
307
|
+
padding: l = 0
|
|
308
|
+
} = Y(t, e) || {};
|
|
309
|
+
if (f == null)
|
|
310
|
+
return {};
|
|
311
|
+
const u = ne(l), p = {
|
|
312
|
+
x: n,
|
|
313
|
+
y: o
|
|
314
|
+
}, d = Ft(r), h = _t(d), m = await s.getDimensions(f), x = d === "y", w = x ? "top" : "left", P = x ? "bottom" : "right", b = x ? "clientHeight" : "clientWidth", v = i.reference[h] + i.reference[d] - p[d] - i.floating[h], R = p[d] - i.reference[d], C = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(f));
|
|
315
|
+
let O = C ? C[b] : 0;
|
|
316
|
+
(!O || !await (s.isElement == null ? void 0 : s.isElement(C))) && (O = c.floating[b] || i.floating[h]);
|
|
317
|
+
const T = v / 2 - R / 2, $ = O / 2 - m[h] / 2 - 1, N = U(u[w], $), F = U(u[P], $), L = N, E = O - m[h] - F, S = O / 2 - m[h] / 2 + T, k = Dt(L, S, E), D = !a.arrow && ot(r) != null && S !== k && i.reference[h] / 2 - (S < L ? N : F) - m[h] / 2 < 0, M = D ? S < L ? S - L : S - E : 0;
|
|
318
|
+
return {
|
|
319
|
+
[d]: p[d] + M,
|
|
320
|
+
data: {
|
|
321
|
+
[d]: k,
|
|
322
|
+
centerOffset: S - k - M,
|
|
323
|
+
...D && {
|
|
324
|
+
alignmentOffset: M
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
reset: D
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
}), Pn = function(t) {
|
|
331
|
+
return t === void 0 && (t = {}), {
|
|
332
|
+
name: "flip",
|
|
333
|
+
options: t,
|
|
334
|
+
async fn(e) {
|
|
335
|
+
var n, o;
|
|
336
|
+
const {
|
|
337
|
+
placement: r,
|
|
338
|
+
middlewareData: i,
|
|
339
|
+
rects: s,
|
|
340
|
+
initialPlacement: c,
|
|
341
|
+
platform: a,
|
|
342
|
+
elements: f
|
|
343
|
+
} = e, {
|
|
344
|
+
mainAxis: l = !0,
|
|
345
|
+
crossAxis: u = !0,
|
|
346
|
+
fallbackPlacements: p,
|
|
347
|
+
fallbackStrategy: d = "bestFit",
|
|
348
|
+
fallbackAxisSideDirection: h = "none",
|
|
349
|
+
flipAlignment: m = !0,
|
|
350
|
+
...x
|
|
351
|
+
} = Y(t, e);
|
|
352
|
+
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
353
|
+
return {};
|
|
354
|
+
const w = q(r), P = V(c), b = q(c) === c, v = await (a.isRTL == null ? void 0 : a.isRTL(f.floating)), R = p || (b || !m ? [gt(c)] : dn(c)), C = h !== "none";
|
|
355
|
+
!p && C && R.push(...gn(c, m, h, v));
|
|
356
|
+
const O = [c, ...R], T = await a.detectOverflow(e, x), $ = [];
|
|
357
|
+
let N = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
358
|
+
if (l && $.push(T[w]), u) {
|
|
359
|
+
const S = un(r, s, v);
|
|
360
|
+
$.push(T[S[0]], T[S[1]]);
|
|
361
|
+
}
|
|
362
|
+
if (N = [...N, {
|
|
363
|
+
placement: r,
|
|
364
|
+
overflows: $
|
|
365
|
+
}], !$.every((S) => S <= 0)) {
|
|
366
|
+
var F, L;
|
|
367
|
+
const S = (((F = i.flip) == null ? void 0 : F.index) || 0) + 1, k = O[S];
|
|
368
|
+
if (k && (!(u === "alignment" ? P !== V(k) : !1) || // We leave the current main axis only if every placement on that axis
|
|
369
|
+
// overflows the main axis.
|
|
370
|
+
N.every((A) => V(A.placement) === P ? A.overflows[0] > 0 : !0)))
|
|
371
|
+
return {
|
|
372
|
+
data: {
|
|
373
|
+
index: S,
|
|
374
|
+
overflows: N
|
|
375
|
+
},
|
|
376
|
+
reset: {
|
|
377
|
+
placement: k
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
let D = (L = N.filter((M) => M.overflows[0] <= 0).sort((M, A) => M.overflows[1] - A.overflows[1])[0]) == null ? void 0 : L.placement;
|
|
381
|
+
if (!D)
|
|
382
|
+
switch (d) {
|
|
383
|
+
case "bestFit": {
|
|
384
|
+
var E;
|
|
385
|
+
const M = (E = N.filter((A) => {
|
|
386
|
+
if (C) {
|
|
387
|
+
const _ = V(A.placement);
|
|
388
|
+
return _ === P || // Create a bias to the `y` side axis due to horizontal
|
|
389
|
+
// reading directions favoring greater width.
|
|
390
|
+
_ === "y";
|
|
391
|
+
}
|
|
392
|
+
return !0;
|
|
393
|
+
}).map((A) => [A.placement, A.overflows.filter((_) => _ > 0).reduce((_, I) => _ + I, 0)]).sort((A, _) => A[1] - _[1])[0]) == null ? void 0 : E[0];
|
|
394
|
+
M && (D = M);
|
|
395
|
+
break;
|
|
396
|
+
}
|
|
397
|
+
case "initialPlacement":
|
|
398
|
+
D = c;
|
|
399
|
+
break;
|
|
400
|
+
}
|
|
401
|
+
if (r !== D)
|
|
402
|
+
return {
|
|
403
|
+
reset: {
|
|
404
|
+
placement: D
|
|
405
|
+
}
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
return {};
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
};
|
|
412
|
+
function Yt(t, e) {
|
|
413
|
+
return {
|
|
414
|
+
top: t.top - e.height,
|
|
415
|
+
right: t.right - e.width,
|
|
416
|
+
bottom: t.bottom - e.height,
|
|
417
|
+
left: t.left - e.width
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
function qt(t) {
|
|
421
|
+
return ln.some((e) => t[e] >= 0);
|
|
422
|
+
}
|
|
423
|
+
const An = function(t) {
|
|
424
|
+
return t === void 0 && (t = {}), {
|
|
425
|
+
name: "hide",
|
|
426
|
+
options: t,
|
|
427
|
+
async fn(e) {
|
|
428
|
+
const {
|
|
429
|
+
rects: n,
|
|
430
|
+
platform: o
|
|
431
|
+
} = e, {
|
|
432
|
+
strategy: r = "referenceHidden",
|
|
433
|
+
...i
|
|
434
|
+
} = Y(t, e);
|
|
435
|
+
switch (r) {
|
|
436
|
+
case "referenceHidden": {
|
|
437
|
+
const s = await o.detectOverflow(e, {
|
|
438
|
+
...i,
|
|
439
|
+
elementContext: "reference"
|
|
440
|
+
}), c = Yt(s, n.reference);
|
|
441
|
+
return {
|
|
442
|
+
data: {
|
|
443
|
+
referenceHiddenOffsets: c,
|
|
444
|
+
referenceHidden: qt(c)
|
|
445
|
+
}
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
case "escaped": {
|
|
449
|
+
const s = await o.detectOverflow(e, {
|
|
450
|
+
...i,
|
|
451
|
+
altBoundary: !0
|
|
452
|
+
}), c = Yt(s, n.floating);
|
|
453
|
+
return {
|
|
454
|
+
data: {
|
|
455
|
+
escapedOffsets: c,
|
|
456
|
+
escaped: qt(c)
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
default:
|
|
461
|
+
return {};
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
};
|
|
465
|
+
}, oe = /* @__PURE__ */ new Set(["left", "top"]);
|
|
466
|
+
async function Rn(t, e) {
|
|
467
|
+
const {
|
|
468
|
+
placement: n,
|
|
469
|
+
platform: o,
|
|
470
|
+
elements: r
|
|
471
|
+
} = t, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = q(n), c = ot(n), a = V(n) === "y", f = oe.has(s) ? -1 : 1, l = i && a ? -1 : 1, u = Y(e, t);
|
|
472
|
+
let {
|
|
473
|
+
mainAxis: p,
|
|
474
|
+
crossAxis: d,
|
|
475
|
+
alignmentAxis: h
|
|
476
|
+
} = typeof u == "number" ? {
|
|
477
|
+
mainAxis: u,
|
|
478
|
+
crossAxis: 0,
|
|
479
|
+
alignmentAxis: null
|
|
480
|
+
} : {
|
|
481
|
+
mainAxis: u.mainAxis || 0,
|
|
482
|
+
crossAxis: u.crossAxis || 0,
|
|
483
|
+
alignmentAxis: u.alignmentAxis
|
|
484
|
+
};
|
|
485
|
+
return c && typeof h == "number" && (d = c === "end" ? h * -1 : h), a ? {
|
|
486
|
+
x: d * l,
|
|
487
|
+
y: p * f
|
|
488
|
+
} : {
|
|
489
|
+
x: p * f,
|
|
490
|
+
y: d * l
|
|
491
|
+
};
|
|
492
|
+
}
|
|
493
|
+
const Cn = function(t) {
|
|
494
|
+
return t === void 0 && (t = 0), {
|
|
495
|
+
name: "offset",
|
|
496
|
+
options: t,
|
|
497
|
+
async fn(e) {
|
|
498
|
+
var n, o;
|
|
499
|
+
const {
|
|
500
|
+
x: r,
|
|
501
|
+
y: i,
|
|
502
|
+
placement: s,
|
|
503
|
+
middlewareData: c
|
|
504
|
+
} = e, a = await Rn(e, t);
|
|
505
|
+
return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
|
|
506
|
+
x: r + a.x,
|
|
507
|
+
y: i + a.y,
|
|
508
|
+
data: {
|
|
509
|
+
...a,
|
|
510
|
+
placement: s
|
|
511
|
+
}
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
};
|
|
515
|
+
}, On = function(t) {
|
|
516
|
+
return t === void 0 && (t = {}), {
|
|
517
|
+
name: "shift",
|
|
518
|
+
options: t,
|
|
519
|
+
async fn(e) {
|
|
520
|
+
const {
|
|
521
|
+
x: n,
|
|
522
|
+
y: o,
|
|
523
|
+
placement: r,
|
|
524
|
+
platform: i
|
|
525
|
+
} = e, {
|
|
526
|
+
mainAxis: s = !0,
|
|
527
|
+
crossAxis: c = !1,
|
|
528
|
+
limiter: a = {
|
|
529
|
+
fn: (w) => {
|
|
530
|
+
let {
|
|
531
|
+
x: P,
|
|
532
|
+
y: b
|
|
533
|
+
} = w;
|
|
534
|
+
return {
|
|
535
|
+
x: P,
|
|
536
|
+
y: b
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
...f
|
|
541
|
+
} = Y(t, e), l = {
|
|
542
|
+
x: n,
|
|
543
|
+
y: o
|
|
544
|
+
}, u = await i.detectOverflow(e, f), p = V(q(r)), d = Tt(p);
|
|
545
|
+
let h = l[d], m = l[p];
|
|
546
|
+
if (s) {
|
|
547
|
+
const w = d === "y" ? "top" : "left", P = d === "y" ? "bottom" : "right", b = h + u[w], v = h - u[P];
|
|
548
|
+
h = Dt(b, h, v);
|
|
549
|
+
}
|
|
550
|
+
if (c) {
|
|
551
|
+
const w = p === "y" ? "top" : "left", P = p === "y" ? "bottom" : "right", b = m + u[w], v = m - u[P];
|
|
552
|
+
m = Dt(b, m, v);
|
|
553
|
+
}
|
|
554
|
+
const x = a.fn({
|
|
555
|
+
...e,
|
|
556
|
+
[d]: h,
|
|
557
|
+
[p]: m
|
|
558
|
+
});
|
|
559
|
+
return {
|
|
560
|
+
...x,
|
|
561
|
+
data: {
|
|
562
|
+
x: x.x - n,
|
|
563
|
+
y: x.y - o,
|
|
564
|
+
enabled: {
|
|
565
|
+
[d]: s,
|
|
566
|
+
[p]: c
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
};
|
|
572
|
+
}, Sn = function(t) {
|
|
573
|
+
return t === void 0 && (t = {}), {
|
|
574
|
+
options: t,
|
|
575
|
+
fn(e) {
|
|
576
|
+
const {
|
|
577
|
+
x: n,
|
|
578
|
+
y: o,
|
|
579
|
+
placement: r,
|
|
580
|
+
rects: i,
|
|
581
|
+
middlewareData: s
|
|
582
|
+
} = e, {
|
|
583
|
+
offset: c = 0,
|
|
584
|
+
mainAxis: a = !0,
|
|
585
|
+
crossAxis: f = !0
|
|
586
|
+
} = Y(t, e), l = {
|
|
587
|
+
x: n,
|
|
588
|
+
y: o
|
|
589
|
+
}, u = V(r), p = Tt(u);
|
|
590
|
+
let d = l[p], h = l[u];
|
|
591
|
+
const m = Y(c, e), x = typeof m == "number" ? {
|
|
592
|
+
mainAxis: m,
|
|
593
|
+
crossAxis: 0
|
|
594
|
+
} : {
|
|
595
|
+
mainAxis: 0,
|
|
596
|
+
crossAxis: 0,
|
|
597
|
+
...m
|
|
598
|
+
};
|
|
599
|
+
if (a) {
|
|
600
|
+
const b = p === "y" ? "height" : "width", v = i.reference[p] - i.floating[b] + x.mainAxis, R = i.reference[p] + i.reference[b] - x.mainAxis;
|
|
601
|
+
d < v ? d = v : d > R && (d = R);
|
|
602
|
+
}
|
|
603
|
+
if (f) {
|
|
604
|
+
var w, P;
|
|
605
|
+
const b = p === "y" ? "width" : "height", v = oe.has(q(r)), R = i.reference[u] - i.floating[b] + (v && ((w = s.offset) == null ? void 0 : w[u]) || 0) + (v ? 0 : x.crossAxis), C = i.reference[u] + i.reference[b] + (v ? 0 : ((P = s.offset) == null ? void 0 : P[u]) || 0) - (v ? x.crossAxis : 0);
|
|
606
|
+
h < R ? h = R : h > C && (h = C);
|
|
607
|
+
}
|
|
608
|
+
return {
|
|
609
|
+
[p]: d,
|
|
610
|
+
[u]: h
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
};
|
|
614
|
+
}, En = function(t) {
|
|
615
|
+
return t === void 0 && (t = {}), {
|
|
616
|
+
name: "size",
|
|
617
|
+
options: t,
|
|
618
|
+
async fn(e) {
|
|
619
|
+
var n, o;
|
|
620
|
+
const {
|
|
621
|
+
placement: r,
|
|
622
|
+
rects: i,
|
|
623
|
+
platform: s,
|
|
624
|
+
elements: c
|
|
625
|
+
} = e, {
|
|
626
|
+
apply: a = () => {
|
|
627
|
+
},
|
|
628
|
+
...f
|
|
629
|
+
} = Y(t, e), l = await s.detectOverflow(e, f), u = q(r), p = ot(r), d = V(r) === "y", {
|
|
630
|
+
width: h,
|
|
631
|
+
height: m
|
|
632
|
+
} = i.floating;
|
|
633
|
+
let x, w;
|
|
634
|
+
u === "top" || u === "bottom" ? (x = u, w = p === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (w = u, x = p === "end" ? "top" : "bottom");
|
|
635
|
+
const P = m - l.top - l.bottom, b = h - l.left - l.right, v = U(m - l[x], P), R = U(h - l[w], b), C = !e.middlewareData.shift;
|
|
636
|
+
let O = v, T = R;
|
|
637
|
+
if ((n = e.middlewareData.shift) != null && n.enabled.x && (T = b), (o = e.middlewareData.shift) != null && o.enabled.y && (O = P), C && !p) {
|
|
638
|
+
const N = W(l.left, 0), F = W(l.right, 0), L = W(l.top, 0), E = W(l.bottom, 0);
|
|
639
|
+
d ? T = h - 2 * (N !== 0 || F !== 0 ? N + F : W(l.left, l.right)) : O = m - 2 * (L !== 0 || E !== 0 ? L + E : W(l.top, l.bottom));
|
|
640
|
+
}
|
|
641
|
+
await a({
|
|
642
|
+
...e,
|
|
643
|
+
availableWidth: T,
|
|
644
|
+
availableHeight: O
|
|
645
|
+
});
|
|
646
|
+
const $ = await s.getDimensions(c.floating);
|
|
647
|
+
return h !== $.width || m !== $.height ? {
|
|
648
|
+
reset: {
|
|
649
|
+
rects: !0
|
|
650
|
+
}
|
|
651
|
+
} : {};
|
|
652
|
+
}
|
|
653
|
+
};
|
|
654
|
+
};
|
|
655
|
+
function yt() {
|
|
656
|
+
return typeof window < "u";
|
|
657
|
+
}
|
|
658
|
+
function rt(t) {
|
|
659
|
+
return re(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
660
|
+
}
|
|
661
|
+
function B(t) {
|
|
662
|
+
var e;
|
|
663
|
+
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
664
|
+
}
|
|
665
|
+
function j(t) {
|
|
666
|
+
var e;
|
|
667
|
+
return (e = (re(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
668
|
+
}
|
|
669
|
+
function re(t) {
|
|
670
|
+
return yt() ? t instanceof Node || t instanceof B(t).Node : !1;
|
|
671
|
+
}
|
|
672
|
+
function z(t) {
|
|
673
|
+
return yt() ? t instanceof Element || t instanceof B(t).Element : !1;
|
|
674
|
+
}
|
|
675
|
+
function K(t) {
|
|
676
|
+
return yt() ? t instanceof HTMLElement || t instanceof B(t).HTMLElement : !1;
|
|
677
|
+
}
|
|
678
|
+
function Kt(t) {
|
|
679
|
+
return !yt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof B(t).ShadowRoot;
|
|
680
|
+
}
|
|
681
|
+
function lt(t) {
|
|
682
|
+
const {
|
|
683
|
+
overflow: e,
|
|
684
|
+
overflowX: n,
|
|
685
|
+
overflowY: o,
|
|
686
|
+
display: r
|
|
687
|
+
} = H(t);
|
|
688
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && r !== "inline" && r !== "contents";
|
|
689
|
+
}
|
|
690
|
+
function Dn(t) {
|
|
691
|
+
return /^(table|td|th)$/.test(rt(t));
|
|
692
|
+
}
|
|
693
|
+
function bt(t) {
|
|
694
|
+
try {
|
|
695
|
+
if (t.matches(":popover-open"))
|
|
696
|
+
return !0;
|
|
697
|
+
} catch {
|
|
698
|
+
}
|
|
699
|
+
try {
|
|
700
|
+
return t.matches(":modal");
|
|
701
|
+
} catch {
|
|
702
|
+
return !1;
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
const Mn = /transform|translate|scale|rotate|perspective|filter/, Nn = /paint|layout|strict|content/, J = (t) => !!t && t !== "none";
|
|
706
|
+
let Ct;
|
|
707
|
+
function Lt(t) {
|
|
708
|
+
const e = z(t) ? H(t) : t;
|
|
709
|
+
return J(e.transform) || J(e.translate) || J(e.scale) || J(e.rotate) || J(e.perspective) || !$t() && (J(e.backdropFilter) || J(e.filter)) || Mn.test(e.willChange || "") || Nn.test(e.contain || "");
|
|
710
|
+
}
|
|
711
|
+
function Tn(t) {
|
|
712
|
+
let e = G(t);
|
|
713
|
+
for (; K(e) && !et(e); ) {
|
|
714
|
+
if (Lt(e))
|
|
715
|
+
return e;
|
|
716
|
+
if (bt(e))
|
|
717
|
+
return null;
|
|
718
|
+
e = G(e);
|
|
719
|
+
}
|
|
720
|
+
return null;
|
|
721
|
+
}
|
|
722
|
+
function $t() {
|
|
723
|
+
return Ct == null && (Ct = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), Ct;
|
|
724
|
+
}
|
|
725
|
+
function et(t) {
|
|
726
|
+
return /^(html|body|#document)$/.test(rt(t));
|
|
727
|
+
}
|
|
728
|
+
function H(t) {
|
|
729
|
+
return B(t).getComputedStyle(t);
|
|
730
|
+
}
|
|
731
|
+
function Pt(t) {
|
|
732
|
+
return z(t) ? {
|
|
733
|
+
scrollLeft: t.scrollLeft,
|
|
734
|
+
scrollTop: t.scrollTop
|
|
735
|
+
} : {
|
|
736
|
+
scrollLeft: t.scrollX,
|
|
737
|
+
scrollTop: t.scrollY
|
|
738
|
+
};
|
|
739
|
+
}
|
|
740
|
+
function G(t) {
|
|
741
|
+
if (rt(t) === "html")
|
|
742
|
+
return t;
|
|
743
|
+
const e = (
|
|
744
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
745
|
+
t.assignedSlot || // DOM Element detected.
|
|
746
|
+
t.parentNode || // ShadowRoot detected.
|
|
747
|
+
Kt(t) && t.host || // Fallback.
|
|
748
|
+
j(t)
|
|
749
|
+
);
|
|
750
|
+
return Kt(e) ? e.host : e;
|
|
751
|
+
}
|
|
752
|
+
function ie(t) {
|
|
753
|
+
const e = G(t);
|
|
754
|
+
return et(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : K(e) && lt(e) ? e : ie(e);
|
|
755
|
+
}
|
|
756
|
+
function ct(t, e, n) {
|
|
757
|
+
var o;
|
|
758
|
+
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
759
|
+
const r = ie(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = B(r);
|
|
760
|
+
if (i) {
|
|
761
|
+
const c = Nt(s);
|
|
762
|
+
return e.concat(s, s.visualViewport || [], lt(r) ? r : [], c && n ? ct(c) : []);
|
|
763
|
+
} else
|
|
764
|
+
return e.concat(r, ct(r, [], n));
|
|
765
|
+
}
|
|
766
|
+
function Nt(t) {
|
|
767
|
+
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
768
|
+
}
|
|
769
|
+
function se(t) {
|
|
770
|
+
const e = H(t);
|
|
771
|
+
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
772
|
+
const r = K(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c = mt(n) !== i || mt(o) !== s;
|
|
773
|
+
return c && (n = i, o = s), {
|
|
774
|
+
width: n,
|
|
775
|
+
height: o,
|
|
776
|
+
$: c
|
|
777
|
+
};
|
|
778
|
+
}
|
|
779
|
+
function kt(t) {
|
|
780
|
+
return z(t) ? t : t.contextElement;
|
|
781
|
+
}
|
|
782
|
+
function tt(t) {
|
|
783
|
+
const e = kt(t);
|
|
784
|
+
if (!K(e))
|
|
785
|
+
return X(1);
|
|
786
|
+
const n = e.getBoundingClientRect(), {
|
|
787
|
+
width: o,
|
|
788
|
+
height: r,
|
|
789
|
+
$: i
|
|
790
|
+
} = se(e);
|
|
791
|
+
let s = (i ? mt(n.width) : n.width) / o, c = (i ? mt(n.height) : n.height) / r;
|
|
792
|
+
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
793
|
+
x: s,
|
|
794
|
+
y: c
|
|
795
|
+
};
|
|
796
|
+
}
|
|
797
|
+
const _n = /* @__PURE__ */ X(0);
|
|
798
|
+
function ce(t) {
|
|
799
|
+
const e = B(t);
|
|
800
|
+
return !$t() || !e.visualViewport ? _n : {
|
|
801
|
+
x: e.visualViewport.offsetLeft,
|
|
802
|
+
y: e.visualViewport.offsetTop
|
|
803
|
+
};
|
|
804
|
+
}
|
|
805
|
+
function Fn(t, e, n) {
|
|
806
|
+
return e === void 0 && (e = !1), !n || e && n !== B(t) ? !1 : e;
|
|
807
|
+
}
|
|
808
|
+
function Q(t, e, n, o) {
|
|
809
|
+
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
810
|
+
const r = t.getBoundingClientRect(), i = kt(t);
|
|
811
|
+
let s = X(1);
|
|
812
|
+
e && (o ? z(o) && (s = tt(o)) : s = tt(t));
|
|
813
|
+
const c = Fn(i, n, o) ? ce(i) : X(0);
|
|
814
|
+
let a = (r.left + c.x) / s.x, f = (r.top + c.y) / s.y, l = r.width / s.x, u = r.height / s.y;
|
|
815
|
+
if (i) {
|
|
816
|
+
const p = B(i), d = o && z(o) ? B(o) : o;
|
|
817
|
+
let h = p, m = Nt(h);
|
|
818
|
+
for (; m && o && d !== h; ) {
|
|
819
|
+
const x = tt(m), w = m.getBoundingClientRect(), P = H(m), b = w.left + (m.clientLeft + parseFloat(P.paddingLeft)) * x.x, v = w.top + (m.clientTop + parseFloat(P.paddingTop)) * x.y;
|
|
820
|
+
a *= x.x, f *= x.y, l *= x.x, u *= x.y, a += b, f += v, h = B(m), m = Nt(h);
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
return wt({
|
|
824
|
+
width: l,
|
|
825
|
+
height: u,
|
|
826
|
+
x: a,
|
|
827
|
+
y: f
|
|
828
|
+
});
|
|
829
|
+
}
|
|
830
|
+
function At(t, e) {
|
|
831
|
+
const n = Pt(t).scrollLeft;
|
|
832
|
+
return e ? e.left + n : Q(j(t)).left + n;
|
|
833
|
+
}
|
|
834
|
+
function ae(t, e) {
|
|
835
|
+
const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - At(t, n), r = n.top + e.scrollTop;
|
|
836
|
+
return {
|
|
837
|
+
x: o,
|
|
838
|
+
y: r
|
|
839
|
+
};
|
|
840
|
+
}
|
|
841
|
+
function Ln(t) {
|
|
842
|
+
let {
|
|
843
|
+
elements: e,
|
|
844
|
+
rect: n,
|
|
845
|
+
offsetParent: o,
|
|
846
|
+
strategy: r
|
|
847
|
+
} = t;
|
|
848
|
+
const i = r === "fixed", s = j(o), c = e ? bt(e.floating) : !1;
|
|
849
|
+
if (o === s || c && i)
|
|
850
|
+
return n;
|
|
851
|
+
let a = {
|
|
852
|
+
scrollLeft: 0,
|
|
853
|
+
scrollTop: 0
|
|
854
|
+
}, f = X(1);
|
|
855
|
+
const l = X(0), u = K(o);
|
|
856
|
+
if ((u || !u && !i) && ((rt(o) !== "body" || lt(s)) && (a = Pt(o)), u)) {
|
|
857
|
+
const d = Q(o);
|
|
858
|
+
f = tt(o), l.x = d.x + o.clientLeft, l.y = d.y + o.clientTop;
|
|
859
|
+
}
|
|
860
|
+
const p = s && !u && !i ? ae(s, a) : X(0);
|
|
861
|
+
return {
|
|
862
|
+
width: n.width * f.x,
|
|
863
|
+
height: n.height * f.y,
|
|
864
|
+
x: n.x * f.x - a.scrollLeft * f.x + l.x + p.x,
|
|
865
|
+
y: n.y * f.y - a.scrollTop * f.y + l.y + p.y
|
|
866
|
+
};
|
|
867
|
+
}
|
|
868
|
+
function $n(t) {
|
|
869
|
+
return Array.from(t.getClientRects());
|
|
870
|
+
}
|
|
871
|
+
function kn(t) {
|
|
872
|
+
const e = j(t), n = Pt(t), o = t.ownerDocument.body, r = W(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = W(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
873
|
+
let s = -n.scrollLeft + At(t);
|
|
874
|
+
const c = -n.scrollTop;
|
|
875
|
+
return H(o).direction === "rtl" && (s += W(e.clientWidth, o.clientWidth) - r), {
|
|
876
|
+
width: r,
|
|
877
|
+
height: i,
|
|
878
|
+
x: s,
|
|
879
|
+
y: c
|
|
880
|
+
};
|
|
881
|
+
}
|
|
882
|
+
const Ut = 25;
|
|
883
|
+
function Wn(t, e) {
|
|
884
|
+
const n = B(t), o = j(t), r = n.visualViewport;
|
|
885
|
+
let i = o.clientWidth, s = o.clientHeight, c = 0, a = 0;
|
|
886
|
+
if (r) {
|
|
887
|
+
i = r.width, s = r.height;
|
|
888
|
+
const l = $t();
|
|
889
|
+
(!l || l && e === "fixed") && (c = r.offsetLeft, a = r.offsetTop);
|
|
890
|
+
}
|
|
891
|
+
const f = At(o);
|
|
892
|
+
if (f <= 0) {
|
|
893
|
+
const l = o.ownerDocument, u = l.body, p = getComputedStyle(u), d = l.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, h = Math.abs(o.clientWidth - u.clientWidth - d);
|
|
894
|
+
h <= Ut && (i -= h);
|
|
895
|
+
} else f <= Ut && (i += f);
|
|
896
|
+
return {
|
|
897
|
+
width: i,
|
|
898
|
+
height: s,
|
|
899
|
+
x: c,
|
|
900
|
+
y: a
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
function Bn(t, e) {
|
|
904
|
+
const n = Q(t, !0, e === "fixed"), o = n.top + t.clientTop, r = n.left + t.clientLeft, i = K(t) ? tt(t) : X(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, a = r * i.x, f = o * i.y;
|
|
905
|
+
return {
|
|
906
|
+
width: s,
|
|
907
|
+
height: c,
|
|
908
|
+
x: a,
|
|
909
|
+
y: f
|
|
910
|
+
};
|
|
911
|
+
}
|
|
912
|
+
function Gt(t, e, n) {
|
|
913
|
+
let o;
|
|
914
|
+
if (e === "viewport")
|
|
915
|
+
o = Wn(t, n);
|
|
916
|
+
else if (e === "document")
|
|
917
|
+
o = kn(j(t));
|
|
918
|
+
else if (z(e))
|
|
919
|
+
o = Bn(e, n);
|
|
920
|
+
else {
|
|
921
|
+
const r = ce(t);
|
|
922
|
+
o = {
|
|
923
|
+
x: e.x - r.x,
|
|
924
|
+
y: e.y - r.y,
|
|
925
|
+
width: e.width,
|
|
926
|
+
height: e.height
|
|
927
|
+
};
|
|
928
|
+
}
|
|
929
|
+
return wt(o);
|
|
930
|
+
}
|
|
931
|
+
function le(t, e) {
|
|
932
|
+
const n = G(t);
|
|
933
|
+
return n === e || !z(n) || et(n) ? !1 : H(n).position === "fixed" || le(n, e);
|
|
934
|
+
}
|
|
935
|
+
function zn(t, e) {
|
|
936
|
+
const n = e.get(t);
|
|
937
|
+
if (n)
|
|
938
|
+
return n;
|
|
939
|
+
let o = ct(t, [], !1).filter((c) => z(c) && rt(c) !== "body"), r = null;
|
|
940
|
+
const i = H(t).position === "fixed";
|
|
941
|
+
let s = i ? G(t) : t;
|
|
942
|
+
for (; z(s) && !et(s); ) {
|
|
943
|
+
const c = H(s), a = Lt(s);
|
|
944
|
+
!a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && (r.position === "absolute" || r.position === "fixed") || lt(s) && !a && le(t, s)) ? o = o.filter((l) => l !== s) : r = c, s = G(s);
|
|
945
|
+
}
|
|
946
|
+
return e.set(t, o), o;
|
|
947
|
+
}
|
|
948
|
+
function Hn(t) {
|
|
949
|
+
let {
|
|
950
|
+
element: e,
|
|
951
|
+
boundary: n,
|
|
952
|
+
rootBoundary: o,
|
|
953
|
+
strategy: r
|
|
954
|
+
} = t;
|
|
955
|
+
const s = [...n === "clippingAncestors" ? bt(e) ? [] : zn(e, this._c) : [].concat(n), o], c = Gt(e, s[0], r);
|
|
956
|
+
let a = c.top, f = c.right, l = c.bottom, u = c.left;
|
|
957
|
+
for (let p = 1; p < s.length; p++) {
|
|
958
|
+
const d = Gt(e, s[p], r);
|
|
959
|
+
a = W(d.top, a), f = U(d.right, f), l = U(d.bottom, l), u = W(d.left, u);
|
|
960
|
+
}
|
|
961
|
+
return {
|
|
962
|
+
width: f - u,
|
|
963
|
+
height: l - a,
|
|
964
|
+
x: u,
|
|
965
|
+
y: a
|
|
966
|
+
};
|
|
967
|
+
}
|
|
968
|
+
function In(t) {
|
|
969
|
+
const {
|
|
970
|
+
width: e,
|
|
971
|
+
height: n
|
|
972
|
+
} = se(t);
|
|
973
|
+
return {
|
|
974
|
+
width: e,
|
|
975
|
+
height: n
|
|
976
|
+
};
|
|
977
|
+
}
|
|
978
|
+
function Vn(t, e, n) {
|
|
979
|
+
const o = K(e), r = j(e), i = n === "fixed", s = Q(t, !0, i, e);
|
|
980
|
+
let c = {
|
|
981
|
+
scrollLeft: 0,
|
|
982
|
+
scrollTop: 0
|
|
983
|
+
};
|
|
984
|
+
const a = X(0);
|
|
985
|
+
function f() {
|
|
986
|
+
a.x = At(r);
|
|
987
|
+
}
|
|
988
|
+
if (o || !o && !i)
|
|
989
|
+
if ((rt(e) !== "body" || lt(r)) && (c = Pt(e)), o) {
|
|
990
|
+
const d = Q(e, !0, i, e);
|
|
991
|
+
a.x = d.x + e.clientLeft, a.y = d.y + e.clientTop;
|
|
992
|
+
} else r && f();
|
|
993
|
+
i && !o && r && f();
|
|
994
|
+
const l = r && !o && !i ? ae(r, c) : X(0), u = s.left + c.scrollLeft - a.x - l.x, p = s.top + c.scrollTop - a.y - l.y;
|
|
995
|
+
return {
|
|
996
|
+
x: u,
|
|
997
|
+
y: p,
|
|
998
|
+
width: s.width,
|
|
999
|
+
height: s.height
|
|
1000
|
+
};
|
|
1001
|
+
}
|
|
1002
|
+
function Ot(t) {
|
|
1003
|
+
return H(t).position === "static";
|
|
1004
|
+
}
|
|
1005
|
+
function Zt(t, e) {
|
|
1006
|
+
if (!K(t) || H(t).position === "fixed")
|
|
1007
|
+
return null;
|
|
1008
|
+
if (e)
|
|
1009
|
+
return e(t);
|
|
1010
|
+
let n = t.offsetParent;
|
|
1011
|
+
return j(t) === n && (n = n.ownerDocument.body), n;
|
|
1012
|
+
}
|
|
1013
|
+
function fe(t, e) {
|
|
1014
|
+
const n = B(t);
|
|
1015
|
+
if (bt(t))
|
|
1016
|
+
return n;
|
|
1017
|
+
if (!K(t)) {
|
|
1018
|
+
let r = G(t);
|
|
1019
|
+
for (; r && !et(r); ) {
|
|
1020
|
+
if (z(r) && !Ot(r))
|
|
1021
|
+
return r;
|
|
1022
|
+
r = G(r);
|
|
1023
|
+
}
|
|
1024
|
+
return n;
|
|
1025
|
+
}
|
|
1026
|
+
let o = Zt(t, e);
|
|
1027
|
+
for (; o && Dn(o) && Ot(o); )
|
|
1028
|
+
o = Zt(o, e);
|
|
1029
|
+
return o && et(o) && Ot(o) && !Lt(o) ? n : o || Tn(t) || n;
|
|
1030
|
+
}
|
|
1031
|
+
const Xn = async function(t) {
|
|
1032
|
+
const e = this.getOffsetParent || fe, n = this.getDimensions, o = await n(t.floating);
|
|
1033
|
+
return {
|
|
1034
|
+
reference: Vn(t.reference, await e(t.floating), t.strategy),
|
|
1035
|
+
floating: {
|
|
1036
|
+
x: 0,
|
|
1037
|
+
y: 0,
|
|
1038
|
+
width: o.width,
|
|
1039
|
+
height: o.height
|
|
1040
|
+
}
|
|
1041
|
+
};
|
|
1042
|
+
};
|
|
1043
|
+
function jn(t) {
|
|
1044
|
+
return H(t).direction === "rtl";
|
|
1045
|
+
}
|
|
1046
|
+
const Yn = {
|
|
1047
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Ln,
|
|
1048
|
+
getDocumentElement: j,
|
|
1049
|
+
getClippingRect: Hn,
|
|
1050
|
+
getOffsetParent: fe,
|
|
1051
|
+
getElementRects: Xn,
|
|
1052
|
+
getClientRects: $n,
|
|
1053
|
+
getDimensions: In,
|
|
1054
|
+
getScale: tt,
|
|
1055
|
+
isElement: z,
|
|
1056
|
+
isRTL: jn
|
|
1057
|
+
};
|
|
1058
|
+
function ue(t, e) {
|
|
1059
|
+
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1060
|
+
}
|
|
1061
|
+
function qn(t, e) {
|
|
1062
|
+
let n = null, o;
|
|
1063
|
+
const r = j(t);
|
|
1064
|
+
function i() {
|
|
1065
|
+
var c;
|
|
1066
|
+
clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
|
|
1067
|
+
}
|
|
1068
|
+
function s(c, a) {
|
|
1069
|
+
c === void 0 && (c = !1), a === void 0 && (a = 1), i();
|
|
1070
|
+
const f = t.getBoundingClientRect(), {
|
|
1071
|
+
left: l,
|
|
1072
|
+
top: u,
|
|
1073
|
+
width: p,
|
|
1074
|
+
height: d
|
|
1075
|
+
} = f;
|
|
1076
|
+
if (c || e(), !p || !d)
|
|
1077
|
+
return;
|
|
1078
|
+
const h = dt(u), m = dt(r.clientWidth - (l + p)), x = dt(r.clientHeight - (u + d)), w = dt(l), b = {
|
|
1079
|
+
rootMargin: -h + "px " + -m + "px " + -x + "px " + -w + "px",
|
|
1080
|
+
threshold: W(0, U(1, a)) || 1
|
|
1081
|
+
};
|
|
1082
|
+
let v = !0;
|
|
1083
|
+
function R(C) {
|
|
1084
|
+
const O = C[0].intersectionRatio;
|
|
1085
|
+
if (O !== a) {
|
|
1086
|
+
if (!v)
|
|
1087
|
+
return s();
|
|
1088
|
+
O ? s(!1, O) : o = setTimeout(() => {
|
|
1089
|
+
s(!1, 1e-7);
|
|
1090
|
+
}, 1e3);
|
|
1091
|
+
}
|
|
1092
|
+
O === 1 && !ue(f, t.getBoundingClientRect()) && s(), v = !1;
|
|
1093
|
+
}
|
|
1094
|
+
try {
|
|
1095
|
+
n = new IntersectionObserver(R, {
|
|
1096
|
+
...b,
|
|
1097
|
+
// Handle <iframe>s
|
|
1098
|
+
root: r.ownerDocument
|
|
1099
|
+
});
|
|
1100
|
+
} catch {
|
|
1101
|
+
n = new IntersectionObserver(R, b);
|
|
1102
|
+
}
|
|
1103
|
+
n.observe(t);
|
|
1104
|
+
}
|
|
1105
|
+
return s(!0), i;
|
|
1106
|
+
}
|
|
1107
|
+
function Kn(t, e, n, o) {
|
|
1108
|
+
o === void 0 && (o = {});
|
|
1109
|
+
const {
|
|
1110
|
+
ancestorScroll: r = !0,
|
|
1111
|
+
ancestorResize: i = !0,
|
|
1112
|
+
elementResize: s = typeof ResizeObserver == "function",
|
|
1113
|
+
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1114
|
+
animationFrame: a = !1
|
|
1115
|
+
} = o, f = kt(t), l = r || i ? [...f ? ct(f) : [], ...e ? ct(e) : []] : [];
|
|
1116
|
+
l.forEach((w) => {
|
|
1117
|
+
r && w.addEventListener("scroll", n, {
|
|
1118
|
+
passive: !0
|
|
1119
|
+
}), i && w.addEventListener("resize", n);
|
|
1120
|
+
});
|
|
1121
|
+
const u = f && c ? qn(f, n) : null;
|
|
1122
|
+
let p = -1, d = null;
|
|
1123
|
+
s && (d = new ResizeObserver((w) => {
|
|
1124
|
+
let [P] = w;
|
|
1125
|
+
P && P.target === f && d && e && (d.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1126
|
+
var b;
|
|
1127
|
+
(b = d) == null || b.observe(e);
|
|
1128
|
+
})), n();
|
|
1129
|
+
}), f && !a && d.observe(f), e && d.observe(e));
|
|
1130
|
+
let h, m = a ? Q(t) : null;
|
|
1131
|
+
a && x();
|
|
1132
|
+
function x() {
|
|
1133
|
+
const w = Q(t);
|
|
1134
|
+
m && !ue(m, w) && n(), m = w, h = requestAnimationFrame(x);
|
|
1135
|
+
}
|
|
1136
|
+
return n(), () => {
|
|
1137
|
+
var w;
|
|
1138
|
+
l.forEach((P) => {
|
|
1139
|
+
r && P.removeEventListener("scroll", n), i && P.removeEventListener("resize", n);
|
|
1140
|
+
}), u?.(), (w = d) == null || w.disconnect(), d = null, a && cancelAnimationFrame(h);
|
|
1141
|
+
};
|
|
1142
|
+
}
|
|
1143
|
+
const Un = Cn, Gn = On, Zn = Pn, Jn = En, Qn = An, Jt = bn, to = Sn, eo = (t, e, n) => {
|
|
1144
|
+
const o = /* @__PURE__ */ new Map(), r = {
|
|
1145
|
+
platform: Yn,
|
|
1146
|
+
...n
|
|
1147
|
+
}, i = {
|
|
1148
|
+
...r.platform,
|
|
1149
|
+
_c: o
|
|
1150
|
+
};
|
|
1151
|
+
return yn(t, e, {
|
|
1152
|
+
...r,
|
|
1153
|
+
platform: i
|
|
1154
|
+
});
|
|
1155
|
+
};
|
|
1156
|
+
var no = typeof document < "u", oo = function() {
|
|
1157
|
+
}, ht = no ? Ke : oo;
|
|
1158
|
+
function vt(t, e) {
|
|
1159
|
+
if (t === e)
|
|
1160
|
+
return !0;
|
|
1161
|
+
if (typeof t != typeof e)
|
|
1162
|
+
return !1;
|
|
1163
|
+
if (typeof t == "function" && t.toString() === e.toString())
|
|
1164
|
+
return !0;
|
|
1165
|
+
let n, o, r;
|
|
1166
|
+
if (t && e && typeof t == "object") {
|
|
1167
|
+
if (Array.isArray(t)) {
|
|
1168
|
+
if (n = t.length, n !== e.length) return !1;
|
|
1169
|
+
for (o = n; o-- !== 0; )
|
|
1170
|
+
if (!vt(t[o], e[o]))
|
|
1171
|
+
return !1;
|
|
1172
|
+
return !0;
|
|
1173
|
+
}
|
|
1174
|
+
if (r = Object.keys(t), n = r.length, n !== Object.keys(e).length)
|
|
1175
|
+
return !1;
|
|
1176
|
+
for (o = n; o-- !== 0; )
|
|
1177
|
+
if (!{}.hasOwnProperty.call(e, r[o]))
|
|
1178
|
+
return !1;
|
|
1179
|
+
for (o = n; o-- !== 0; ) {
|
|
1180
|
+
const i = r[o];
|
|
1181
|
+
if (!(i === "_owner" && t.$$typeof) && !vt(t[i], e[i]))
|
|
1182
|
+
return !1;
|
|
1183
|
+
}
|
|
1184
|
+
return !0;
|
|
1185
|
+
}
|
|
1186
|
+
return t !== t && e !== e;
|
|
1187
|
+
}
|
|
1188
|
+
function de(t) {
|
|
1189
|
+
return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1190
|
+
}
|
|
1191
|
+
function Qt(t, e) {
|
|
1192
|
+
const n = de(t);
|
|
1193
|
+
return Math.round(e * n) / n;
|
|
1194
|
+
}
|
|
1195
|
+
function St(t) {
|
|
1196
|
+
const e = g.useRef(t);
|
|
1197
|
+
return ht(() => {
|
|
1198
|
+
e.current = t;
|
|
1199
|
+
}), e;
|
|
1200
|
+
}
|
|
1201
|
+
function ro(t) {
|
|
1202
|
+
t === void 0 && (t = {});
|
|
1203
|
+
const {
|
|
1204
|
+
placement: e = "bottom",
|
|
1205
|
+
strategy: n = "absolute",
|
|
1206
|
+
middleware: o = [],
|
|
1207
|
+
platform: r,
|
|
1208
|
+
elements: {
|
|
1209
|
+
reference: i,
|
|
1210
|
+
floating: s
|
|
1211
|
+
} = {},
|
|
1212
|
+
transform: c = !0,
|
|
1213
|
+
whileElementsMounted: a,
|
|
1214
|
+
open: f
|
|
1215
|
+
} = t, [l, u] = g.useState({
|
|
1216
|
+
x: 0,
|
|
1217
|
+
y: 0,
|
|
1218
|
+
strategy: n,
|
|
1219
|
+
placement: e,
|
|
1220
|
+
middlewareData: {},
|
|
1221
|
+
isPositioned: !1
|
|
1222
|
+
}), [p, d] = g.useState(o);
|
|
1223
|
+
vt(p, o) || d(o);
|
|
1224
|
+
const [h, m] = g.useState(null), [x, w] = g.useState(null), P = g.useCallback((A) => {
|
|
1225
|
+
A !== C.current && (C.current = A, m(A));
|
|
1226
|
+
}, []), b = g.useCallback((A) => {
|
|
1227
|
+
A !== O.current && (O.current = A, w(A));
|
|
1228
|
+
}, []), v = i || h, R = s || x, C = g.useRef(null), O = g.useRef(null), T = g.useRef(l), $ = a != null, N = St(a), F = St(r), L = St(f), E = g.useCallback(() => {
|
|
1229
|
+
if (!C.current || !O.current)
|
|
1230
|
+
return;
|
|
1231
|
+
const A = {
|
|
1232
|
+
placement: e,
|
|
1233
|
+
strategy: n,
|
|
1234
|
+
middleware: p
|
|
1235
|
+
};
|
|
1236
|
+
F.current && (A.platform = F.current), eo(C.current, O.current, A).then((_) => {
|
|
1237
|
+
const I = {
|
|
1238
|
+
..._,
|
|
1239
|
+
// The floating element's position may be recomputed while it's closed
|
|
1240
|
+
// but still mounted (such as when transitioning out). To ensure
|
|
1241
|
+
// `isPositioned` will be `false` initially on the next open, avoid
|
|
1242
|
+
// setting it to `true` when `open === false` (must be specified).
|
|
1243
|
+
isPositioned: L.current !== !1
|
|
1244
|
+
};
|
|
1245
|
+
S.current && !vt(T.current, I) && (T.current = I, sn.flushSync(() => {
|
|
1246
|
+
u(I);
|
|
1247
|
+
}));
|
|
1248
|
+
});
|
|
1249
|
+
}, [p, e, n, F, L]);
|
|
1250
|
+
ht(() => {
|
|
1251
|
+
f === !1 && T.current.isPositioned && (T.current.isPositioned = !1, u((A) => ({
|
|
1252
|
+
...A,
|
|
1253
|
+
isPositioned: !1
|
|
1254
|
+
})));
|
|
1255
|
+
}, [f]);
|
|
1256
|
+
const S = g.useRef(!1);
|
|
1257
|
+
ht(() => (S.current = !0, () => {
|
|
1258
|
+
S.current = !1;
|
|
1259
|
+
}), []), ht(() => {
|
|
1260
|
+
if (v && (C.current = v), R && (O.current = R), v && R) {
|
|
1261
|
+
if (N.current)
|
|
1262
|
+
return N.current(v, R, E);
|
|
1263
|
+
E();
|
|
1264
|
+
}
|
|
1265
|
+
}, [v, R, E, N, $]);
|
|
1266
|
+
const k = g.useMemo(() => ({
|
|
1267
|
+
reference: C,
|
|
1268
|
+
floating: O,
|
|
1269
|
+
setReference: P,
|
|
1270
|
+
setFloating: b
|
|
1271
|
+
}), [P, b]), D = g.useMemo(() => ({
|
|
1272
|
+
reference: v,
|
|
1273
|
+
floating: R
|
|
1274
|
+
}), [v, R]), M = g.useMemo(() => {
|
|
1275
|
+
const A = {
|
|
1276
|
+
position: n,
|
|
1277
|
+
left: 0,
|
|
1278
|
+
top: 0
|
|
1279
|
+
};
|
|
1280
|
+
if (!D.floating)
|
|
1281
|
+
return A;
|
|
1282
|
+
const _ = Qt(D.floating, l.x), I = Qt(D.floating, l.y);
|
|
1283
|
+
return c ? {
|
|
1284
|
+
...A,
|
|
1285
|
+
transform: "translate(" + _ + "px, " + I + "px)",
|
|
1286
|
+
...de(D.floating) >= 1.5 && {
|
|
1287
|
+
willChange: "transform"
|
|
1288
|
+
}
|
|
1289
|
+
} : {
|
|
1290
|
+
position: n,
|
|
1291
|
+
left: _,
|
|
1292
|
+
top: I
|
|
1293
|
+
};
|
|
1294
|
+
}, [n, c, D.floating, l.x, l.y]);
|
|
1295
|
+
return g.useMemo(() => ({
|
|
1296
|
+
...l,
|
|
1297
|
+
update: E,
|
|
1298
|
+
refs: k,
|
|
1299
|
+
elements: D,
|
|
1300
|
+
floatingStyles: M
|
|
1301
|
+
}), [l, E, k, D, M]);
|
|
1302
|
+
}
|
|
1303
|
+
const io = (t) => {
|
|
1304
|
+
function e(n) {
|
|
1305
|
+
return {}.hasOwnProperty.call(n, "current");
|
|
1306
|
+
}
|
|
1307
|
+
return {
|
|
1308
|
+
name: "arrow",
|
|
1309
|
+
options: t,
|
|
1310
|
+
fn(n) {
|
|
1311
|
+
const {
|
|
1312
|
+
element: o,
|
|
1313
|
+
padding: r
|
|
1314
|
+
} = typeof t == "function" ? t(n) : t;
|
|
1315
|
+
return o && e(o) ? o.current != null ? Jt({
|
|
1316
|
+
element: o.current,
|
|
1317
|
+
padding: r
|
|
1318
|
+
}).fn(n) : {} : o ? Jt({
|
|
1319
|
+
element: o,
|
|
1320
|
+
padding: r
|
|
1321
|
+
}).fn(n) : {};
|
|
1322
|
+
}
|
|
1323
|
+
};
|
|
1324
|
+
}, so = (t, e) => {
|
|
1325
|
+
const n = Un(t);
|
|
1326
|
+
return {
|
|
1327
|
+
name: n.name,
|
|
1328
|
+
fn: n.fn,
|
|
1329
|
+
options: [t, e]
|
|
1330
|
+
};
|
|
1331
|
+
}, co = (t, e) => {
|
|
1332
|
+
const n = Gn(t);
|
|
1333
|
+
return {
|
|
1334
|
+
name: n.name,
|
|
1335
|
+
fn: n.fn,
|
|
1336
|
+
options: [t, e]
|
|
1337
|
+
};
|
|
1338
|
+
}, ao = (t, e) => ({
|
|
1339
|
+
fn: to(t).fn,
|
|
1340
|
+
options: [t, e]
|
|
1341
|
+
}), lo = (t, e) => {
|
|
1342
|
+
const n = Zn(t);
|
|
1343
|
+
return {
|
|
1344
|
+
name: n.name,
|
|
1345
|
+
fn: n.fn,
|
|
1346
|
+
options: [t, e]
|
|
1347
|
+
};
|
|
1348
|
+
}, fo = (t, e) => {
|
|
1349
|
+
const n = Jn(t);
|
|
1350
|
+
return {
|
|
1351
|
+
name: n.name,
|
|
1352
|
+
fn: n.fn,
|
|
1353
|
+
options: [t, e]
|
|
1354
|
+
};
|
|
1355
|
+
}, uo = (t, e) => {
|
|
1356
|
+
const n = Qn(t);
|
|
1357
|
+
return {
|
|
1358
|
+
name: n.name,
|
|
1359
|
+
fn: n.fn,
|
|
1360
|
+
options: [t, e]
|
|
1361
|
+
};
|
|
1362
|
+
}, po = (t, e) => {
|
|
1363
|
+
const n = io(t);
|
|
1364
|
+
return {
|
|
1365
|
+
name: n.name,
|
|
1366
|
+
fn: n.fn,
|
|
1367
|
+
options: [t, e]
|
|
1368
|
+
};
|
|
1369
|
+
};
|
|
1370
|
+
var ho = "Arrow", pe = g.forwardRef((t, e) => {
|
|
1371
|
+
const { children: n, width: o = 10, height: r = 5, ...i } = t;
|
|
1372
|
+
return /* @__PURE__ */ y(
|
|
1373
|
+
at.svg,
|
|
1374
|
+
{
|
|
1375
|
+
...i,
|
|
1376
|
+
ref: e,
|
|
1377
|
+
width: o,
|
|
1378
|
+
height: r,
|
|
1379
|
+
viewBox: "0 0 30 10",
|
|
1380
|
+
preserveAspectRatio: "none",
|
|
1381
|
+
children: t.asChild ? n : /* @__PURE__ */ y("polygon", { points: "0,0 30,0 15,10" })
|
|
1382
|
+
}
|
|
1383
|
+
);
|
|
1384
|
+
});
|
|
1385
|
+
pe.displayName = ho;
|
|
1386
|
+
var mo = pe, Wt = "Popper", [he, me] = te(Wt), [go, ge] = he(Wt), we = (t) => {
|
|
1387
|
+
const { __scopePopper: e, children: n } = t, [o, r] = g.useState(null);
|
|
1388
|
+
return /* @__PURE__ */ y(go, { scope: e, anchor: o, onAnchorChange: r, children: n });
|
|
1389
|
+
};
|
|
1390
|
+
we.displayName = Wt;
|
|
1391
|
+
var ve = "PopperAnchor", xe = g.forwardRef(
|
|
1392
|
+
(t, e) => {
|
|
1393
|
+
const { __scopePopper: n, virtualRef: o, ...r } = t, i = ge(ve, n), s = g.useRef(null), c = xt(e, s), a = g.useRef(null);
|
|
1394
|
+
return g.useEffect(() => {
|
|
1395
|
+
const f = a.current;
|
|
1396
|
+
a.current = o?.current || s.current, f !== a.current && i.onAnchorChange(a.current);
|
|
1397
|
+
}), o ? null : /* @__PURE__ */ y(at.div, { ...r, ref: c });
|
|
1398
|
+
}
|
|
1399
|
+
);
|
|
1400
|
+
xe.displayName = ve;
|
|
1401
|
+
var Bt = "PopperContent", [wo, vo] = he(Bt), ye = g.forwardRef(
|
|
1402
|
+
(t, e) => {
|
|
1403
|
+
const {
|
|
1404
|
+
__scopePopper: n,
|
|
1405
|
+
side: o = "bottom",
|
|
1406
|
+
sideOffset: r = 0,
|
|
1407
|
+
align: i = "center",
|
|
1408
|
+
alignOffset: s = 0,
|
|
1409
|
+
arrowPadding: c = 0,
|
|
1410
|
+
avoidCollisions: a = !0,
|
|
1411
|
+
collisionBoundary: f = [],
|
|
1412
|
+
collisionPadding: l = 0,
|
|
1413
|
+
sticky: u = "partial",
|
|
1414
|
+
hideWhenDetached: p = !1,
|
|
1415
|
+
updatePositionStrategy: d = "optimized",
|
|
1416
|
+
onPlaced: h,
|
|
1417
|
+
...m
|
|
1418
|
+
} = t, x = ge(Bt, n), [w, P] = g.useState(null), b = xt(e, (it) => P(it)), [v, R] = g.useState(null), C = an(v), O = C?.width ?? 0, T = C?.height ?? 0, $ = o + (i !== "center" ? "-" + i : ""), N = typeof l == "number" ? l : { top: 0, right: 0, bottom: 0, left: 0, ...l }, F = Array.isArray(f) ? f : [f], L = F.length > 0, E = {
|
|
1419
|
+
padding: N,
|
|
1420
|
+
boundary: F.filter(yo),
|
|
1421
|
+
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
1422
|
+
altBoundary: L
|
|
1423
|
+
}, { refs: S, floatingStyles: k, placement: D, isPositioned: M, middlewareData: A } = ro({
|
|
1424
|
+
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
1425
|
+
strategy: "fixed",
|
|
1426
|
+
placement: $,
|
|
1427
|
+
whileElementsMounted: (...it) => Kn(...it, {
|
|
1428
|
+
animationFrame: d === "always"
|
|
1429
|
+
}),
|
|
1430
|
+
elements: {
|
|
1431
|
+
reference: x.anchor
|
|
1432
|
+
},
|
|
1433
|
+
middleware: [
|
|
1434
|
+
so({ mainAxis: r + T, alignmentAxis: s }),
|
|
1435
|
+
a && co({
|
|
1436
|
+
mainAxis: !0,
|
|
1437
|
+
crossAxis: !1,
|
|
1438
|
+
limiter: u === "partial" ? ao() : void 0,
|
|
1439
|
+
...E
|
|
1440
|
+
}),
|
|
1441
|
+
a && lo({ ...E }),
|
|
1442
|
+
fo({
|
|
1443
|
+
...E,
|
|
1444
|
+
apply: ({ elements: it, rects: It, availableWidth: ze, availableHeight: He }) => {
|
|
1445
|
+
const { width: Ie, height: Ve } = It.reference, ut = it.floating.style;
|
|
1446
|
+
ut.setProperty("--radix-popper-available-width", `${ze}px`), ut.setProperty("--radix-popper-available-height", `${He}px`), ut.setProperty("--radix-popper-anchor-width", `${Ie}px`), ut.setProperty("--radix-popper-anchor-height", `${Ve}px`);
|
|
1447
|
+
}
|
|
1448
|
+
}),
|
|
1449
|
+
v && po({ element: v, padding: c }),
|
|
1450
|
+
bo({ arrowWidth: O, arrowHeight: T }),
|
|
1451
|
+
p && uo({ strategy: "referenceHidden", ...E })
|
|
1452
|
+
]
|
|
1453
|
+
}), [_, I] = Ae(D), Ht = Ge(h);
|
|
1454
|
+
Et(() => {
|
|
1455
|
+
M && Ht?.();
|
|
1456
|
+
}, [M, Ht]);
|
|
1457
|
+
const Le = A.arrow?.x, $e = A.arrow?.y, ke = A.arrow?.centerOffset !== 0, [We, Be] = g.useState();
|
|
1458
|
+
return Et(() => {
|
|
1459
|
+
w && Be(window.getComputedStyle(w).zIndex);
|
|
1460
|
+
}, [w]), /* @__PURE__ */ y(
|
|
1461
|
+
"div",
|
|
1462
|
+
{
|
|
1463
|
+
ref: S.setFloating,
|
|
1464
|
+
"data-radix-popper-content-wrapper": "",
|
|
1465
|
+
style: {
|
|
1466
|
+
...k,
|
|
1467
|
+
transform: M ? k.transform : "translate(0, -200%)",
|
|
1468
|
+
// keep off the page when measuring
|
|
1469
|
+
minWidth: "max-content",
|
|
1470
|
+
zIndex: We,
|
|
1471
|
+
"--radix-popper-transform-origin": [
|
|
1472
|
+
A.transformOrigin?.x,
|
|
1473
|
+
A.transformOrigin?.y
|
|
1474
|
+
].join(" "),
|
|
1475
|
+
// hide the content if using the hide middleware and should be hidden
|
|
1476
|
+
// set visibility to hidden and disable pointer events so the UI behaves
|
|
1477
|
+
// as if the PopperContent isn't there at all
|
|
1478
|
+
...A.hide?.referenceHidden && {
|
|
1479
|
+
visibility: "hidden",
|
|
1480
|
+
pointerEvents: "none"
|
|
1481
|
+
}
|
|
1482
|
+
},
|
|
1483
|
+
dir: t.dir,
|
|
1484
|
+
children: /* @__PURE__ */ y(
|
|
1485
|
+
wo,
|
|
1486
|
+
{
|
|
1487
|
+
scope: n,
|
|
1488
|
+
placedSide: _,
|
|
1489
|
+
onArrowChange: R,
|
|
1490
|
+
arrowX: Le,
|
|
1491
|
+
arrowY: $e,
|
|
1492
|
+
shouldHideArrow: ke,
|
|
1493
|
+
children: /* @__PURE__ */ y(
|
|
1494
|
+
at.div,
|
|
1495
|
+
{
|
|
1496
|
+
"data-side": _,
|
|
1497
|
+
"data-align": I,
|
|
1498
|
+
...m,
|
|
1499
|
+
ref: b,
|
|
1500
|
+
style: {
|
|
1501
|
+
...m.style,
|
|
1502
|
+
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
1503
|
+
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
1504
|
+
animation: M ? void 0 : "none"
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
)
|
|
1508
|
+
}
|
|
1509
|
+
)
|
|
1510
|
+
}
|
|
1511
|
+
);
|
|
1512
|
+
}
|
|
1513
|
+
);
|
|
1514
|
+
ye.displayName = Bt;
|
|
1515
|
+
var be = "PopperArrow", xo = {
|
|
1516
|
+
top: "bottom",
|
|
1517
|
+
right: "left",
|
|
1518
|
+
bottom: "top",
|
|
1519
|
+
left: "right"
|
|
1520
|
+
}, Pe = g.forwardRef(function(e, n) {
|
|
1521
|
+
const { __scopePopper: o, ...r } = e, i = vo(be, o), s = xo[i.placedSide];
|
|
1522
|
+
return (
|
|
1523
|
+
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
1524
|
+
// doesn't report size as we'd expect on SVG elements.
|
|
1525
|
+
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
1526
|
+
/* @__PURE__ */ y(
|
|
1527
|
+
"span",
|
|
1528
|
+
{
|
|
1529
|
+
ref: i.onArrowChange,
|
|
1530
|
+
style: {
|
|
1531
|
+
position: "absolute",
|
|
1532
|
+
left: i.arrowX,
|
|
1533
|
+
top: i.arrowY,
|
|
1534
|
+
[s]: 0,
|
|
1535
|
+
transformOrigin: {
|
|
1536
|
+
top: "",
|
|
1537
|
+
right: "0 0",
|
|
1538
|
+
bottom: "center 0",
|
|
1539
|
+
left: "100% 0"
|
|
1540
|
+
}[i.placedSide],
|
|
1541
|
+
transform: {
|
|
1542
|
+
top: "translateY(100%)",
|
|
1543
|
+
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
1544
|
+
bottom: "rotate(180deg)",
|
|
1545
|
+
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
1546
|
+
}[i.placedSide],
|
|
1547
|
+
visibility: i.shouldHideArrow ? "hidden" : void 0
|
|
1548
|
+
},
|
|
1549
|
+
children: /* @__PURE__ */ y(
|
|
1550
|
+
mo,
|
|
1551
|
+
{
|
|
1552
|
+
...r,
|
|
1553
|
+
ref: n,
|
|
1554
|
+
style: {
|
|
1555
|
+
...r.style,
|
|
1556
|
+
// ensures the element can be measured correctly (mostly for if SVG)
|
|
1557
|
+
display: "block"
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
)
|
|
1561
|
+
}
|
|
1562
|
+
)
|
|
1563
|
+
);
|
|
1564
|
+
});
|
|
1565
|
+
Pe.displayName = be;
|
|
1566
|
+
function yo(t) {
|
|
1567
|
+
return t !== null;
|
|
1568
|
+
}
|
|
1569
|
+
var bo = (t) => ({
|
|
1570
|
+
name: "transformOrigin",
|
|
1571
|
+
options: t,
|
|
1572
|
+
fn(e) {
|
|
1573
|
+
const { placement: n, rects: o, middlewareData: r } = e, s = r.arrow?.centerOffset !== 0, c = s ? 0 : t.arrowWidth, a = s ? 0 : t.arrowHeight, [f, l] = Ae(n), u = { start: "0%", center: "50%", end: "100%" }[l], p = (r.arrow?.x ?? 0) + c / 2, d = (r.arrow?.y ?? 0) + a / 2;
|
|
1574
|
+
let h = "", m = "";
|
|
1575
|
+
return f === "bottom" ? (h = s ? u : `${p}px`, m = `${-a}px`) : f === "top" ? (h = s ? u : `${p}px`, m = `${o.floating.height + a}px`) : f === "right" ? (h = `${-a}px`, m = s ? u : `${d}px`) : f === "left" && (h = `${o.floating.width + a}px`, m = s ? u : `${d}px`), { data: { x: h, y: m } };
|
|
1576
|
+
}
|
|
1577
|
+
});
|
|
1578
|
+
function Ae(t) {
|
|
1579
|
+
const [e, n = "center"] = t.split("-");
|
|
1580
|
+
return [e, n];
|
|
1581
|
+
}
|
|
1582
|
+
var Po = we, Re = xe, Ao = ye, Ro = Pe, Rt = "Popover", [Ce] = te(Rt, [
|
|
1583
|
+
me
|
|
1584
|
+
]), ft = me(), [Co, Z] = Ce(Rt), Oe = (t) => {
|
|
1585
|
+
const {
|
|
1586
|
+
__scopePopover: e,
|
|
1587
|
+
children: n,
|
|
1588
|
+
open: o,
|
|
1589
|
+
defaultOpen: r,
|
|
1590
|
+
onOpenChange: i,
|
|
1591
|
+
modal: s = !1
|
|
1592
|
+
} = t, c = ft(e), a = g.useRef(null), [f, l] = g.useState(!1), [u, p] = Ze({
|
|
1593
|
+
prop: o,
|
|
1594
|
+
defaultProp: r ?? !1,
|
|
1595
|
+
onChange: i,
|
|
1596
|
+
caller: Rt
|
|
1597
|
+
});
|
|
1598
|
+
return /* @__PURE__ */ y(Po, { ...c, children: /* @__PURE__ */ y(
|
|
1599
|
+
Co,
|
|
1600
|
+
{
|
|
1601
|
+
scope: e,
|
|
1602
|
+
contentId: Je(),
|
|
1603
|
+
triggerRef: a,
|
|
1604
|
+
open: u,
|
|
1605
|
+
onOpenChange: p,
|
|
1606
|
+
onOpenToggle: g.useCallback(() => p((d) => !d), [p]),
|
|
1607
|
+
hasCustomAnchor: f,
|
|
1608
|
+
onCustomAnchorAdd: g.useCallback(() => l(!0), []),
|
|
1609
|
+
onCustomAnchorRemove: g.useCallback(() => l(!1), []),
|
|
1610
|
+
modal: s,
|
|
1611
|
+
children: n
|
|
1612
|
+
}
|
|
1613
|
+
) });
|
|
1614
|
+
};
|
|
1615
|
+
Oe.displayName = Rt;
|
|
1616
|
+
var Se = "PopoverAnchor", Oo = g.forwardRef(
|
|
1617
|
+
(t, e) => {
|
|
1618
|
+
const { __scopePopover: n, ...o } = t, r = Z(Se, n), i = ft(n), { onCustomAnchorAdd: s, onCustomAnchorRemove: c } = r;
|
|
1619
|
+
return g.useEffect(() => (s(), () => c()), [s, c]), /* @__PURE__ */ y(Re, { ...i, ...o, ref: e });
|
|
1620
|
+
}
|
|
1621
|
+
);
|
|
1622
|
+
Oo.displayName = Se;
|
|
1623
|
+
var Ee = "PopoverTrigger", De = g.forwardRef(
|
|
1624
|
+
(t, e) => {
|
|
1625
|
+
const { __scopePopover: n, ...o } = t, r = Z(Ee, n), i = ft(n), s = xt(e, r.triggerRef), c = /* @__PURE__ */ y(
|
|
1626
|
+
at.button,
|
|
1627
|
+
{
|
|
1628
|
+
type: "button",
|
|
1629
|
+
"aria-haspopup": "dialog",
|
|
1630
|
+
"aria-expanded": r.open,
|
|
1631
|
+
"aria-controls": r.contentId,
|
|
1632
|
+
"data-state": Fe(r.open),
|
|
1633
|
+
...o,
|
|
1634
|
+
ref: s,
|
|
1635
|
+
onClick: st(t.onClick, r.onOpenToggle)
|
|
1636
|
+
}
|
|
1637
|
+
);
|
|
1638
|
+
return r.hasCustomAnchor ? c : /* @__PURE__ */ y(Re, { asChild: !0, ...i, children: c });
|
|
1639
|
+
}
|
|
1640
|
+
);
|
|
1641
|
+
De.displayName = Ee;
|
|
1642
|
+
var zt = "PopoverPortal", [So, Eo] = Ce(zt, {
|
|
1643
|
+
forceMount: void 0
|
|
1644
|
+
}), Me = (t) => {
|
|
1645
|
+
const { __scopePopover: e, forceMount: n, children: o, container: r } = t, i = Z(zt, e);
|
|
1646
|
+
return /* @__PURE__ */ y(So, { scope: e, forceMount: n, children: /* @__PURE__ */ y(ee, { present: n || i.open, children: /* @__PURE__ */ y(Qe, { asChild: !0, container: r, children: o }) }) });
|
|
1647
|
+
};
|
|
1648
|
+
Me.displayName = zt;
|
|
1649
|
+
var nt = "PopoverContent", Ne = g.forwardRef(
|
|
1650
|
+
(t, e) => {
|
|
1651
|
+
const n = Eo(nt, t.__scopePopover), { forceMount: o = n.forceMount, ...r } = t, i = Z(nt, t.__scopePopover);
|
|
1652
|
+
return /* @__PURE__ */ y(ee, { present: o || i.open, children: i.modal ? /* @__PURE__ */ y(Mo, { ...r, ref: e }) : /* @__PURE__ */ y(No, { ...r, ref: e }) });
|
|
1653
|
+
}
|
|
1654
|
+
);
|
|
1655
|
+
Ne.displayName = nt;
|
|
1656
|
+
var Do = Xe("PopoverContent.RemoveScroll"), Mo = g.forwardRef(
|
|
1657
|
+
(t, e) => {
|
|
1658
|
+
const n = Z(nt, t.__scopePopover), o = g.useRef(null), r = xt(e, o), i = g.useRef(!1);
|
|
1659
|
+
return g.useEffect(() => {
|
|
1660
|
+
const s = o.current;
|
|
1661
|
+
if (s) return tn(s);
|
|
1662
|
+
}, []), /* @__PURE__ */ y(en, { as: Do, allowPinchZoom: !0, children: /* @__PURE__ */ y(
|
|
1663
|
+
Te,
|
|
1664
|
+
{
|
|
1665
|
+
...t,
|
|
1666
|
+
ref: r,
|
|
1667
|
+
trapFocus: n.open,
|
|
1668
|
+
disableOutsidePointerEvents: !0,
|
|
1669
|
+
onCloseAutoFocus: st(t.onCloseAutoFocus, (s) => {
|
|
1670
|
+
s.preventDefault(), i.current || n.triggerRef.current?.focus();
|
|
1671
|
+
}),
|
|
1672
|
+
onPointerDownOutside: st(
|
|
1673
|
+
t.onPointerDownOutside,
|
|
1674
|
+
(s) => {
|
|
1675
|
+
const c = s.detail.originalEvent, a = c.button === 0 && c.ctrlKey === !0, f = c.button === 2 || a;
|
|
1676
|
+
i.current = f;
|
|
1677
|
+
},
|
|
1678
|
+
{ checkForDefaultPrevented: !1 }
|
|
1679
|
+
),
|
|
1680
|
+
onFocusOutside: st(
|
|
1681
|
+
t.onFocusOutside,
|
|
1682
|
+
(s) => s.preventDefault(),
|
|
1683
|
+
{ checkForDefaultPrevented: !1 }
|
|
1684
|
+
)
|
|
1685
|
+
}
|
|
1686
|
+
) });
|
|
1687
|
+
}
|
|
1688
|
+
), No = g.forwardRef(
|
|
1689
|
+
(t, e) => {
|
|
1690
|
+
const n = Z(nt, t.__scopePopover), o = g.useRef(!1), r = g.useRef(!1);
|
|
1691
|
+
return /* @__PURE__ */ y(
|
|
1692
|
+
Te,
|
|
1693
|
+
{
|
|
1694
|
+
...t,
|
|
1695
|
+
ref: e,
|
|
1696
|
+
trapFocus: !1,
|
|
1697
|
+
disableOutsidePointerEvents: !1,
|
|
1698
|
+
onCloseAutoFocus: (i) => {
|
|
1699
|
+
t.onCloseAutoFocus?.(i), i.defaultPrevented || (o.current || n.triggerRef.current?.focus(), i.preventDefault()), o.current = !1, r.current = !1;
|
|
1700
|
+
},
|
|
1701
|
+
onInteractOutside: (i) => {
|
|
1702
|
+
t.onInteractOutside?.(i), i.defaultPrevented || (o.current = !0, i.detail.originalEvent.type === "pointerdown" && (r.current = !0));
|
|
1703
|
+
const s = i.target;
|
|
1704
|
+
n.triggerRef.current?.contains(s) && i.preventDefault(), i.detail.originalEvent.type === "focusin" && r.current && i.preventDefault();
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
);
|
|
1708
|
+
}
|
|
1709
|
+
), Te = g.forwardRef(
|
|
1710
|
+
(t, e) => {
|
|
1711
|
+
const {
|
|
1712
|
+
__scopePopover: n,
|
|
1713
|
+
trapFocus: o,
|
|
1714
|
+
onOpenAutoFocus: r,
|
|
1715
|
+
onCloseAutoFocus: i,
|
|
1716
|
+
disableOutsidePointerEvents: s,
|
|
1717
|
+
onEscapeKeyDown: c,
|
|
1718
|
+
onPointerDownOutside: a,
|
|
1719
|
+
onFocusOutside: f,
|
|
1720
|
+
onInteractOutside: l,
|
|
1721
|
+
...u
|
|
1722
|
+
} = t, p = Z(nt, n), d = ft(n);
|
|
1723
|
+
return nn(), /* @__PURE__ */ y(
|
|
1724
|
+
on,
|
|
1725
|
+
{
|
|
1726
|
+
asChild: !0,
|
|
1727
|
+
loop: !0,
|
|
1728
|
+
trapped: o,
|
|
1729
|
+
onMountAutoFocus: r,
|
|
1730
|
+
onUnmountAutoFocus: i,
|
|
1731
|
+
children: /* @__PURE__ */ y(
|
|
1732
|
+
rn,
|
|
1733
|
+
{
|
|
1734
|
+
asChild: !0,
|
|
1735
|
+
disableOutsidePointerEvents: s,
|
|
1736
|
+
onInteractOutside: l,
|
|
1737
|
+
onEscapeKeyDown: c,
|
|
1738
|
+
onPointerDownOutside: a,
|
|
1739
|
+
onFocusOutside: f,
|
|
1740
|
+
onDismiss: () => p.onOpenChange(!1),
|
|
1741
|
+
children: /* @__PURE__ */ y(
|
|
1742
|
+
Ao,
|
|
1743
|
+
{
|
|
1744
|
+
"data-state": Fe(p.open),
|
|
1745
|
+
role: "dialog",
|
|
1746
|
+
id: p.contentId,
|
|
1747
|
+
...d,
|
|
1748
|
+
...u,
|
|
1749
|
+
ref: e,
|
|
1750
|
+
style: {
|
|
1751
|
+
...u.style,
|
|
1752
|
+
"--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
1753
|
+
"--radix-popover-content-available-width": "var(--radix-popper-available-width)",
|
|
1754
|
+
"--radix-popover-content-available-height": "var(--radix-popper-available-height)",
|
|
1755
|
+
"--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
|
|
1756
|
+
"--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
)
|
|
1760
|
+
}
|
|
1761
|
+
)
|
|
1762
|
+
}
|
|
1763
|
+
);
|
|
1764
|
+
}
|
|
1765
|
+
), _e = "PopoverClose", To = g.forwardRef(
|
|
1766
|
+
(t, e) => {
|
|
1767
|
+
const { __scopePopover: n, ...o } = t, r = Z(_e, n);
|
|
1768
|
+
return /* @__PURE__ */ y(
|
|
1769
|
+
at.button,
|
|
1770
|
+
{
|
|
1771
|
+
type: "button",
|
|
1772
|
+
...o,
|
|
1773
|
+
ref: e,
|
|
1774
|
+
onClick: st(t.onClick, () => r.onOpenChange(!1))
|
|
1775
|
+
}
|
|
1776
|
+
);
|
|
1777
|
+
}
|
|
1778
|
+
);
|
|
1779
|
+
To.displayName = _e;
|
|
1780
|
+
var _o = "PopoverArrow", Fo = g.forwardRef(
|
|
1781
|
+
(t, e) => {
|
|
1782
|
+
const { __scopePopover: n, ...o } = t, r = ft(n);
|
|
1783
|
+
return /* @__PURE__ */ y(Ro, { ...r, ...o, ref: e });
|
|
1784
|
+
}
|
|
1785
|
+
);
|
|
1786
|
+
Fo.displayName = _o;
|
|
1787
|
+
function Fe(t) {
|
|
1788
|
+
return t ? "open" : "closed";
|
|
1789
|
+
}
|
|
1790
|
+
var Lo = Oe, $o = De, ko = Me, Wo = Ne;
|
|
1791
|
+
function Bo({
|
|
1792
|
+
...t
|
|
1793
|
+
}) {
|
|
1794
|
+
return /* @__PURE__ */ y(Lo, { "data-slot": "popover", ...t });
|
|
1795
|
+
}
|
|
1796
|
+
function zo({
|
|
1797
|
+
...t
|
|
1798
|
+
}) {
|
|
1799
|
+
return /* @__PURE__ */ y($o, { "data-slot": "popover-trigger", ...t });
|
|
1800
|
+
}
|
|
1801
|
+
function Ho({
|
|
1802
|
+
className: t,
|
|
1803
|
+
align: e = "center",
|
|
1804
|
+
sideOffset: n = 4,
|
|
1805
|
+
...o
|
|
1806
|
+
}) {
|
|
1807
|
+
const r = qe();
|
|
1808
|
+
return /* @__PURE__ */ y(ko, { container: r, children: /* @__PURE__ */ y(
|
|
1809
|
+
Wo,
|
|
1810
|
+
{
|
|
1811
|
+
"data-slot": "popover-content",
|
|
1812
|
+
align: e,
|
|
1813
|
+
sideOffset: n,
|
|
1814
|
+
className: je(
|
|
1815
|
+
"z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
1816
|
+
t
|
|
1817
|
+
),
|
|
1818
|
+
...o
|
|
1819
|
+
}
|
|
1820
|
+
) });
|
|
1821
|
+
}
|
|
1822
|
+
const Io = (t) => {
|
|
1823
|
+
switch (t) {
|
|
1824
|
+
case "float-bottom-right":
|
|
1825
|
+
return "bottom-6 right-6";
|
|
1826
|
+
case "float-bottom-left":
|
|
1827
|
+
return "bottom-6 left-6";
|
|
1828
|
+
case "float-up-right":
|
|
1829
|
+
return "top-6 right-6";
|
|
1830
|
+
case "float-up-left":
|
|
1831
|
+
return "top-6 left-6";
|
|
1832
|
+
default:
|
|
1833
|
+
return "bottom-6 right-6";
|
|
1834
|
+
}
|
|
1835
|
+
}, Vo = ({ config: t, IconComponent: e }) => /* @__PURE__ */ pt(
|
|
1836
|
+
Ye,
|
|
1837
|
+
{
|
|
1838
|
+
style: {
|
|
1839
|
+
backgroundColor: t.triggerBtn.color,
|
|
1840
|
+
color: t.triggerBtn.textColor
|
|
1841
|
+
},
|
|
1842
|
+
size: t.triggerBtn.size,
|
|
1843
|
+
children: [
|
|
1844
|
+
e && /* @__PURE__ */ y(e, { className: "h-4 w-4" }),
|
|
1845
|
+
!t.triggerBtn.size.startsWith("icon") && t.triggerBtn.text && t.triggerBtn.text
|
|
1846
|
+
]
|
|
1847
|
+
}
|
|
1848
|
+
);
|
|
1849
|
+
function Go({ config: t, widgetConfig: e, IconComponent: n }) {
|
|
1850
|
+
return /* @__PURE__ */ y("div", { className: `fixed ${Io(t.triggerBtn.position)} z-50`, children: /* @__PURE__ */ pt(Bo, { children: [
|
|
1851
|
+
/* @__PURE__ */ y(zo, { asChild: !0, children: Vo({ config: t, IconComponent: n }) }),
|
|
1852
|
+
/* @__PURE__ */ pt(Ho, { className: "w-80 md:w-100 h-[60vh] bg-muted p-0 flex flex-col min-h-0", children: [
|
|
1853
|
+
/* @__PURE__ */ pt("div", { className: "p-4 border-b", children: [
|
|
1854
|
+
/* @__PURE__ */ y("h2", { className: "font-semibold text-lg", children: t.widgetName }),
|
|
1855
|
+
t.info && /* @__PURE__ */ y("p", { className: "text-sm opacity-90", children: t.info })
|
|
1856
|
+
] }),
|
|
1857
|
+
/* @__PURE__ */ y("div", { className: "flex-1 min-h-0", children: /* @__PURE__ */ y(Ue, { fallback: null, children: /* @__PURE__ */ y(cn, { config: t, widgetConfig: e, isDrawer: !1 }) }) })
|
|
1858
|
+
] })
|
|
1859
|
+
] }) });
|
|
1860
|
+
}
|
|
1861
|
+
export {
|
|
1862
|
+
Go as default
|
|
1863
|
+
};
|