@leaflink/stash 48.21.2 → 49.0.0

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.
Files changed (48) hide show
  1. package/dist/ActionsDropdown.js +1 -1
  2. package/dist/AddressSelect.js +15 -14
  3. package/dist/AddressSelect.js.map +1 -1
  4. package/dist/Alert.js +1 -1
  5. package/dist/Copy.js +1 -1
  6. package/dist/DataViewSortButton.js +1 -1
  7. package/dist/Dropdown.js +1 -1
  8. package/dist/FilterDropdown.js +1 -1
  9. package/dist/Filters.js +4 -3
  10. package/dist/Filters.js.map +1 -1
  11. package/dist/InputOptions.js +4 -3
  12. package/dist/InputOptions.js.map +1 -1
  13. package/dist/ListView.js +9 -8
  14. package/dist/ListView.js.map +1 -1
  15. package/dist/PageNavigation.js +1 -1
  16. package/dist/Select.js +272 -1277
  17. package/dist/Select.js.map +1 -1
  18. package/dist/SelectStatus.js +10 -9
  19. package/dist/SelectStatus.js.map +1 -1
  20. package/dist/Tab.js +1 -1
  21. package/dist/Tabs.js +1 -1
  22. package/dist/Tooltip.js +199 -0
  23. package/dist/Tooltip.js.map +1 -0
  24. package/dist/Tooltip.vue.d.ts +106 -0
  25. package/dist/components.css +1 -1
  26. package/dist/directives/autofocus.js.map +1 -0
  27. package/dist/directives/clickoutside.js.map +1 -0
  28. package/dist/directives/observe.js.map +1 -0
  29. package/dist/directives/sticky.js.map +1 -0
  30. package/dist/{tooltip.js → directives/tooltip.js} +3 -3
  31. package/dist/directives/tooltip.js.map +1 -0
  32. package/dist/directives/viewable.js.map +1 -0
  33. package/dist/floating-ui.vue-8d7f7932.js +1069 -0
  34. package/dist/floating-ui.vue-8d7f7932.js.map +1 -0
  35. package/dist/tooltip.d.ts +1 -0
  36. package/package.json +6 -1
  37. package/styles/base.css +2 -2
  38. package/dist/autofocus.js.map +0 -1
  39. package/dist/clickoutside.js.map +0 -1
  40. package/dist/observe.js.map +0 -1
  41. package/dist/sticky.js.map +0 -1
  42. package/dist/tooltip.js.map +0 -1
  43. package/dist/viewable.js.map +0 -1
  44. /package/dist/{autofocus.js → directives/autofocus.js} +0 -0
  45. /package/dist/{clickoutside.js → directives/clickoutside.js} +0 -0
  46. /package/dist/{observe.js → directives/observe.js} +0 -0
  47. /package/dist/{sticky.js → directives/sticky.js} +0 -0
  48. /package/dist/{viewable.js → directives/viewable.js} +0 -0
@@ -0,0 +1,1069 @@
1
+ import { computed as _, ref as et, shallowRef as Nt, watch as dt, getCurrentScope as $t, onScopeDispose as Ht, shallowReadonly as K, unref as _t } from "vue";
2
+ const z = Math.min, D = Math.max, st = Math.round, rt = Math.floor, I = (t) => ({
3
+ x: t,
4
+ y: t
5
+ }), zt = {
6
+ left: "right",
7
+ right: "left",
8
+ bottom: "top",
9
+ top: "bottom"
10
+ }, It = {
11
+ start: "end",
12
+ end: "start"
13
+ };
14
+ function jt(t, e, n) {
15
+ return D(t, z(e, n));
16
+ }
17
+ function ot(t, e) {
18
+ return typeof t == "function" ? t(e) : t;
19
+ }
20
+ function Y(t) {
21
+ return t.split("-")[0];
22
+ }
23
+ function tt(t) {
24
+ return t.split("-")[1];
25
+ }
26
+ function Yt(t) {
27
+ return t === "x" ? "y" : "x";
28
+ }
29
+ function vt(t) {
30
+ return t === "y" ? "height" : "width";
31
+ }
32
+ function Q(t) {
33
+ return ["top", "bottom"].includes(Y(t)) ? "y" : "x";
34
+ }
35
+ function xt(t) {
36
+ return Yt(Q(t));
37
+ }
38
+ function Xt(t, e, n) {
39
+ n === void 0 && (n = !1);
40
+ const o = tt(t), i = xt(t), s = vt(i);
41
+ let r = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
42
+ return e.reference[s] > e.floating[s] && (r = lt(r)), [r, lt(r)];
43
+ }
44
+ function qt(t) {
45
+ const e = lt(t);
46
+ return [gt(t), e, gt(e)];
47
+ }
48
+ function gt(t) {
49
+ return t.replace(/start|end/g, (e) => It[e]);
50
+ }
51
+ function Ut(t, e, n) {
52
+ const o = ["left", "right"], i = ["right", "left"], s = ["top", "bottom"], r = ["bottom", "top"];
53
+ switch (t) {
54
+ case "top":
55
+ case "bottom":
56
+ return n ? e ? i : o : e ? o : i;
57
+ case "left":
58
+ case "right":
59
+ return e ? s : r;
60
+ default:
61
+ return [];
62
+ }
63
+ }
64
+ function Kt(t, e, n, o) {
65
+ const i = tt(t);
66
+ let s = Ut(Y(t), n === "start", o);
67
+ return i && (s = s.map((r) => r + "-" + i), e && (s = s.concat(s.map(gt)))), s;
68
+ }
69
+ function lt(t) {
70
+ return t.replace(/left|right|bottom|top/g, (e) => zt[e]);
71
+ }
72
+ function Gt(t) {
73
+ return {
74
+ top: 0,
75
+ right: 0,
76
+ bottom: 0,
77
+ left: 0,
78
+ ...t
79
+ };
80
+ }
81
+ function Lt(t) {
82
+ return typeof t != "number" ? Gt(t) : {
83
+ top: t,
84
+ right: t,
85
+ bottom: t,
86
+ left: t
87
+ };
88
+ }
89
+ function ct(t) {
90
+ const {
91
+ x: e,
92
+ y: n,
93
+ width: o,
94
+ height: i
95
+ } = t;
96
+ return {
97
+ width: o,
98
+ height: i,
99
+ top: n,
100
+ left: e,
101
+ right: e + o,
102
+ bottom: n + i,
103
+ x: e,
104
+ y: n
105
+ };
106
+ }
107
+ function At(t, e, n) {
108
+ let {
109
+ reference: o,
110
+ floating: i
111
+ } = t;
112
+ const s = Q(e), r = xt(e), l = vt(r), a = Y(e), c = s === "y", f = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, g = o[l] / 2 - i[l] / 2;
113
+ let u;
114
+ switch (a) {
115
+ case "top":
116
+ u = {
117
+ x: f,
118
+ y: o.y - i.height
119
+ };
120
+ break;
121
+ case "bottom":
122
+ u = {
123
+ x: f,
124
+ y: o.y + o.height
125
+ };
126
+ break;
127
+ case "right":
128
+ u = {
129
+ x: o.x + o.width,
130
+ y: d
131
+ };
132
+ break;
133
+ case "left":
134
+ u = {
135
+ x: o.x - i.width,
136
+ y: d
137
+ };
138
+ break;
139
+ default:
140
+ u = {
141
+ x: o.x,
142
+ y: o.y
143
+ };
144
+ }
145
+ switch (tt(e)) {
146
+ case "start":
147
+ u[r] -= g * (n && c ? -1 : 1);
148
+ break;
149
+ case "end":
150
+ u[r] += g * (n && c ? -1 : 1);
151
+ break;
152
+ }
153
+ return u;
154
+ }
155
+ const Jt = async (t, e, n) => {
156
+ const {
157
+ placement: o = "bottom",
158
+ strategy: i = "absolute",
159
+ middleware: s = [],
160
+ platform: r
161
+ } = n, l = s.filter(Boolean), a = await (r.isRTL == null ? void 0 : r.isRTL(e));
162
+ let c = await r.getElementRects({
163
+ reference: t,
164
+ floating: e,
165
+ strategy: i
166
+ }), {
167
+ x: f,
168
+ y: d
169
+ } = At(c, o, a), g = o, u = {}, m = 0;
170
+ for (let h = 0; h < l.length; h++) {
171
+ const {
172
+ name: w,
173
+ fn: p
174
+ } = l[h], {
175
+ x: v,
176
+ y,
177
+ data: R,
178
+ reset: b
179
+ } = await p({
180
+ x: f,
181
+ y: d,
182
+ initialPlacement: o,
183
+ placement: g,
184
+ strategy: i,
185
+ middlewareData: u,
186
+ rects: c,
187
+ platform: r,
188
+ elements: {
189
+ reference: t,
190
+ floating: e
191
+ }
192
+ });
193
+ f = v ?? f, d = y ?? d, u = {
194
+ ...u,
195
+ [w]: {
196
+ ...u[w],
197
+ ...R
198
+ }
199
+ }, b && m <= 50 && (m++, typeof b == "object" && (b.placement && (g = b.placement), b.rects && (c = b.rects === !0 ? await r.getElementRects({
200
+ reference: t,
201
+ floating: e,
202
+ strategy: i
203
+ }) : b.rects), {
204
+ x: f,
205
+ y: d
206
+ } = At(c, g, a)), h = -1);
207
+ }
208
+ return {
209
+ x: f,
210
+ y: d,
211
+ placement: g,
212
+ strategy: i,
213
+ middlewareData: u
214
+ };
215
+ };
216
+ async function Pt(t, e) {
217
+ var n;
218
+ e === void 0 && (e = {});
219
+ const {
220
+ x: o,
221
+ y: i,
222
+ platform: s,
223
+ rects: r,
224
+ elements: l,
225
+ strategy: a
226
+ } = t, {
227
+ boundary: c = "clippingAncestors",
228
+ rootBoundary: f = "viewport",
229
+ elementContext: d = "floating",
230
+ altBoundary: g = !1,
231
+ padding: u = 0
232
+ } = ot(e, t), m = Lt(u), w = l[g ? d === "floating" ? "reference" : "floating" : d], p = ct(await s.getClippingRect({
233
+ element: (n = await (s.isElement == null ? void 0 : s.isElement(w))) == null || n ? w : w.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(l.floating)),
234
+ boundary: c,
235
+ rootBoundary: f,
236
+ strategy: a
237
+ })), v = d === "floating" ? {
238
+ x: o,
239
+ y: i,
240
+ width: r.floating.width,
241
+ height: r.floating.height
242
+ } : r.reference, y = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l.floating)), R = await (s.isElement == null ? void 0 : s.isElement(y)) ? await (s.getScale == null ? void 0 : s.getScale(y)) || {
243
+ x: 1,
244
+ y: 1
245
+ } : {
246
+ x: 1,
247
+ y: 1
248
+ }, b = ct(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
249
+ elements: l,
250
+ rect: v,
251
+ offsetParent: y,
252
+ strategy: a
253
+ }) : v);
254
+ return {
255
+ top: (p.top - b.top + m.top) / R.y,
256
+ bottom: (b.bottom - p.bottom + m.bottom) / R.y,
257
+ left: (p.left - b.left + m.left) / R.x,
258
+ right: (b.right - p.right + m.right) / R.x
259
+ };
260
+ }
261
+ const Qt = (t) => ({
262
+ name: "arrow",
263
+ options: t,
264
+ async fn(e) {
265
+ const {
266
+ x: n,
267
+ y: o,
268
+ placement: i,
269
+ rects: s,
270
+ platform: r,
271
+ elements: l,
272
+ middlewareData: a
273
+ } = e, {
274
+ element: c,
275
+ padding: f = 0
276
+ } = ot(t, e) || {};
277
+ if (c == null)
278
+ return {};
279
+ const d = Lt(f), g = {
280
+ x: n,
281
+ y: o
282
+ }, u = xt(i), m = vt(u), h = await r.getDimensions(c), w = u === "y", p = w ? "top" : "left", v = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", R = s.reference[m] + s.reference[u] - g[u] - s.floating[m], b = g[u] - s.reference[u], E = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c));
283
+ let x = E ? E[y] : 0;
284
+ (!x || !await (r.isElement == null ? void 0 : r.isElement(E))) && (x = l.floating[y] || s.floating[m]);
285
+ const O = R / 2 - b / 2, C = x / 2 - h[m] / 2 - 1, L = z(d[p], C), B = z(d[v], C), F = L, N = x - h[m] - B, A = x / 2 - h[m] / 2 + O, U = jt(F, A, N), W = !a.arrow && tt(i) != null && A !== U && s.reference[m] / 2 - (A < F ? L : B) - h[m] / 2 < 0, V = W ? A < F ? A - F : A - N : 0;
286
+ return {
287
+ [u]: g[u] + V,
288
+ data: {
289
+ [u]: U,
290
+ centerOffset: A - U - V,
291
+ ...W && {
292
+ alignmentOffset: V
293
+ }
294
+ },
295
+ reset: W
296
+ };
297
+ }
298
+ }), Zt = function(t) {
299
+ return t === void 0 && (t = {}), {
300
+ name: "flip",
301
+ options: t,
302
+ async fn(e) {
303
+ var n, o;
304
+ const {
305
+ placement: i,
306
+ middlewareData: s,
307
+ rects: r,
308
+ initialPlacement: l,
309
+ platform: a,
310
+ elements: c
311
+ } = e, {
312
+ mainAxis: f = !0,
313
+ crossAxis: d = !0,
314
+ fallbackPlacements: g,
315
+ fallbackStrategy: u = "bestFit",
316
+ fallbackAxisSideDirection: m = "none",
317
+ flipAlignment: h = !0,
318
+ ...w
319
+ } = ot(t, e);
320
+ if ((n = s.arrow) != null && n.alignmentOffset)
321
+ return {};
322
+ const p = Y(i), v = Q(l), y = Y(l) === l, R = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), b = g || (y || !h ? [lt(l)] : qt(l)), E = m !== "none";
323
+ !g && E && b.push(...Kt(l, h, m, R));
324
+ const x = [l, ...b], O = await Pt(e, w), C = [];
325
+ let L = ((o = s.flip) == null ? void 0 : o.overflows) || [];
326
+ if (f && C.push(O[p]), d) {
327
+ const A = Xt(i, r, R);
328
+ C.push(O[A[0]], O[A[1]]);
329
+ }
330
+ if (L = [...L, {
331
+ placement: i,
332
+ overflows: C
333
+ }], !C.every((A) => A <= 0)) {
334
+ var B, F;
335
+ const A = (((B = s.flip) == null ? void 0 : B.index) || 0) + 1, U = x[A];
336
+ if (U)
337
+ return {
338
+ data: {
339
+ index: A,
340
+ overflows: L
341
+ },
342
+ reset: {
343
+ placement: U
344
+ }
345
+ };
346
+ let W = (F = L.filter((V) => V.overflows[0] <= 0).sort((V, $) => V.overflows[1] - $.overflows[1])[0]) == null ? void 0 : F.placement;
347
+ if (!W)
348
+ switch (u) {
349
+ case "bestFit": {
350
+ var N;
351
+ const V = (N = L.filter(($) => {
352
+ if (E) {
353
+ const H = Q($.placement);
354
+ return H === v || // Create a bias to the `y` side axis due to horizontal
355
+ // reading directions favoring greater width.
356
+ H === "y";
357
+ }
358
+ return !0;
359
+ }).map(($) => [$.placement, $.overflows.filter((H) => H > 0).reduce((H, Bt) => H + Bt, 0)]).sort(($, H) => $[1] - H[1])[0]) == null ? void 0 : N[0];
360
+ V && (W = V);
361
+ break;
362
+ }
363
+ case "initialPlacement":
364
+ W = l;
365
+ break;
366
+ }
367
+ if (i !== W)
368
+ return {
369
+ reset: {
370
+ placement: W
371
+ }
372
+ };
373
+ }
374
+ return {};
375
+ }
376
+ };
377
+ };
378
+ async function te(t, e) {
379
+ const {
380
+ placement: n,
381
+ platform: o,
382
+ elements: i
383
+ } = t, s = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = Y(n), l = tt(n), a = Q(n) === "y", c = ["left", "top"].includes(r) ? -1 : 1, f = s && a ? -1 : 1, d = ot(e, t);
384
+ let {
385
+ mainAxis: g,
386
+ crossAxis: u,
387
+ alignmentAxis: m
388
+ } = typeof d == "number" ? {
389
+ mainAxis: d,
390
+ crossAxis: 0,
391
+ alignmentAxis: null
392
+ } : {
393
+ mainAxis: d.mainAxis || 0,
394
+ crossAxis: d.crossAxis || 0,
395
+ alignmentAxis: d.alignmentAxis
396
+ };
397
+ return l && typeof m == "number" && (u = l === "end" ? m * -1 : m), a ? {
398
+ x: u * f,
399
+ y: g * c
400
+ } : {
401
+ x: g * c,
402
+ y: u * f
403
+ };
404
+ }
405
+ const ee = function(t) {
406
+ return t === void 0 && (t = 0), {
407
+ name: "offset",
408
+ options: t,
409
+ async fn(e) {
410
+ var n, o;
411
+ const {
412
+ x: i,
413
+ y: s,
414
+ placement: r,
415
+ middlewareData: l
416
+ } = e, a = await te(e, t);
417
+ return r === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
418
+ x: i + a.x,
419
+ y: s + a.y,
420
+ data: {
421
+ ...a,
422
+ placement: r
423
+ }
424
+ };
425
+ }
426
+ };
427
+ }, ne = function(t) {
428
+ return t === void 0 && (t = {}), {
429
+ name: "size",
430
+ options: t,
431
+ async fn(e) {
432
+ var n, o;
433
+ const {
434
+ placement: i,
435
+ rects: s,
436
+ platform: r,
437
+ elements: l
438
+ } = e, {
439
+ apply: a = () => {
440
+ },
441
+ ...c
442
+ } = ot(t, e), f = await Pt(e, c), d = Y(i), g = tt(i), u = Q(i) === "y", {
443
+ width: m,
444
+ height: h
445
+ } = s.floating;
446
+ let w, p;
447
+ d === "top" || d === "bottom" ? (w = d, p = g === (await (r.isRTL == null ? void 0 : r.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (p = d, w = g === "end" ? "top" : "bottom");
448
+ const v = h - f.top - f.bottom, y = m - f.left - f.right, R = z(h - f[w], v), b = z(m - f[p], y), E = !e.middlewareData.shift;
449
+ let x = R, O = b;
450
+ if ((n = e.middlewareData.shift) != null && n.enabled.x && (O = y), (o = e.middlewareData.shift) != null && o.enabled.y && (x = v), E && !g) {
451
+ const L = D(f.left, 0), B = D(f.right, 0), F = D(f.top, 0), N = D(f.bottom, 0);
452
+ u ? O = m - 2 * (L !== 0 || B !== 0 ? L + B : D(f.left, f.right)) : x = h - 2 * (F !== 0 || N !== 0 ? F + N : D(f.top, f.bottom));
453
+ }
454
+ await a({
455
+ ...e,
456
+ availableWidth: O,
457
+ availableHeight: x
458
+ });
459
+ const C = await r.getDimensions(l.floating);
460
+ return m !== C.width || h !== C.height ? {
461
+ reset: {
462
+ rects: !0
463
+ }
464
+ } : {};
465
+ }
466
+ };
467
+ };
468
+ function at() {
469
+ return typeof window < "u";
470
+ }
471
+ function q(t) {
472
+ return yt(t) ? (t.nodeName || "").toLowerCase() : "#document";
473
+ }
474
+ function T(t) {
475
+ var e;
476
+ return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
477
+ }
478
+ function k(t) {
479
+ var e;
480
+ return (e = (yt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
481
+ }
482
+ function yt(t) {
483
+ return at() ? t instanceof Node || t instanceof T(t).Node : !1;
484
+ }
485
+ function P(t) {
486
+ return at() ? t instanceof Element || t instanceof T(t).Element : !1;
487
+ }
488
+ function M(t) {
489
+ return at() ? t instanceof HTMLElement || t instanceof T(t).HTMLElement : !1;
490
+ }
491
+ function Et(t) {
492
+ return !at() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof T(t).ShadowRoot;
493
+ }
494
+ function it(t) {
495
+ const {
496
+ overflow: e,
497
+ overflowX: n,
498
+ overflowY: o,
499
+ display: i
500
+ } = S(t);
501
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(i);
502
+ }
503
+ function oe(t) {
504
+ return ["table", "td", "th"].includes(q(t));
505
+ }
506
+ function ft(t) {
507
+ return [":popover-open", ":modal"].some((e) => {
508
+ try {
509
+ return t.matches(e);
510
+ } catch {
511
+ return !1;
512
+ }
513
+ });
514
+ }
515
+ function bt(t) {
516
+ const e = Rt(), n = P(t) ? S(t) : t;
517
+ return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
518
+ }
519
+ function ie(t) {
520
+ let e = j(t);
521
+ for (; M(e) && !Z(e); ) {
522
+ if (bt(e))
523
+ return e;
524
+ if (ft(e))
525
+ return null;
526
+ e = j(e);
527
+ }
528
+ return null;
529
+ }
530
+ function Rt() {
531
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
532
+ }
533
+ function Z(t) {
534
+ return ["html", "body", "#document"].includes(q(t));
535
+ }
536
+ function S(t) {
537
+ return T(t).getComputedStyle(t);
538
+ }
539
+ function ut(t) {
540
+ return P(t) ? {
541
+ scrollLeft: t.scrollLeft,
542
+ scrollTop: t.scrollTop
543
+ } : {
544
+ scrollLeft: t.scrollX,
545
+ scrollTop: t.scrollY
546
+ };
547
+ }
548
+ function j(t) {
549
+ if (q(t) === "html")
550
+ return t;
551
+ const e = (
552
+ // Step into the shadow DOM of the parent of a slotted node.
553
+ t.assignedSlot || // DOM Element detected.
554
+ t.parentNode || // ShadowRoot detected.
555
+ Et(t) && t.host || // Fallback.
556
+ k(t)
557
+ );
558
+ return Et(e) ? e.host : e;
559
+ }
560
+ function St(t) {
561
+ const e = j(t);
562
+ return Z(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : M(e) && it(e) ? e : St(e);
563
+ }
564
+ function nt(t, e, n) {
565
+ var o;
566
+ e === void 0 && (e = []), n === void 0 && (n = !0);
567
+ const i = St(t), s = i === ((o = t.ownerDocument) == null ? void 0 : o.body), r = T(i);
568
+ if (s) {
569
+ const l = ht(r);
570
+ return e.concat(r, r.visualViewport || [], it(i) ? i : [], l && n ? nt(l) : []);
571
+ }
572
+ return e.concat(i, nt(i, [], n));
573
+ }
574
+ function ht(t) {
575
+ return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
576
+ }
577
+ function Ft(t) {
578
+ const e = S(t);
579
+ let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
580
+ const i = M(t), s = i ? t.offsetWidth : n, r = i ? t.offsetHeight : o, l = st(n) !== s || st(o) !== r;
581
+ return l && (n = s, o = r), {
582
+ width: n,
583
+ height: o,
584
+ $: l
585
+ };
586
+ }
587
+ function Ot(t) {
588
+ return P(t) ? t : t.contextElement;
589
+ }
590
+ function J(t) {
591
+ const e = Ot(t);
592
+ if (!M(e))
593
+ return I(1);
594
+ const n = e.getBoundingClientRect(), {
595
+ width: o,
596
+ height: i,
597
+ $: s
598
+ } = Ft(e);
599
+ let r = (s ? st(n.width) : n.width) / o, l = (s ? st(n.height) : n.height) / i;
600
+ return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
601
+ x: r,
602
+ y: l
603
+ };
604
+ }
605
+ const re = /* @__PURE__ */ I(0);
606
+ function Vt(t) {
607
+ const e = T(t);
608
+ return !Rt() || !e.visualViewport ? re : {
609
+ x: e.visualViewport.offsetLeft,
610
+ y: e.visualViewport.offsetTop
611
+ };
612
+ }
613
+ function se(t, e, n) {
614
+ return e === void 0 && (e = !1), !n || e && n !== T(t) ? !1 : e;
615
+ }
616
+ function X(t, e, n, o) {
617
+ e === void 0 && (e = !1), n === void 0 && (n = !1);
618
+ const i = t.getBoundingClientRect(), s = Ot(t);
619
+ let r = I(1);
620
+ e && (o ? P(o) && (r = J(o)) : r = J(t));
621
+ const l = se(s, n, o) ? Vt(s) : I(0);
622
+ let a = (i.left + l.x) / r.x, c = (i.top + l.y) / r.y, f = i.width / r.x, d = i.height / r.y;
623
+ if (s) {
624
+ const g = T(s), u = o && P(o) ? T(o) : o;
625
+ let m = g, h = ht(m);
626
+ for (; h && o && u !== m; ) {
627
+ const w = J(h), p = h.getBoundingClientRect(), v = S(h), y = p.left + (h.clientLeft + parseFloat(v.paddingLeft)) * w.x, R = p.top + (h.clientTop + parseFloat(v.paddingTop)) * w.y;
628
+ a *= w.x, c *= w.y, f *= w.x, d *= w.y, a += y, c += R, m = T(h), h = ht(m);
629
+ }
630
+ }
631
+ return ct({
632
+ width: f,
633
+ height: d,
634
+ x: a,
635
+ y: c
636
+ });
637
+ }
638
+ function le(t) {
639
+ let {
640
+ elements: e,
641
+ rect: n,
642
+ offsetParent: o,
643
+ strategy: i
644
+ } = t;
645
+ const s = i === "fixed", r = k(o), l = e ? ft(e.floating) : !1;
646
+ if (o === r || l && s)
647
+ return n;
648
+ let a = {
649
+ scrollLeft: 0,
650
+ scrollTop: 0
651
+ }, c = I(1);
652
+ const f = I(0), d = M(o);
653
+ if ((d || !d && !s) && ((q(o) !== "body" || it(r)) && (a = ut(o)), M(o))) {
654
+ const g = X(o);
655
+ c = J(o), f.x = g.x + o.clientLeft, f.y = g.y + o.clientTop;
656
+ }
657
+ return {
658
+ width: n.width * c.x,
659
+ height: n.height * c.y,
660
+ x: n.x * c.x - a.scrollLeft * c.x + f.x,
661
+ y: n.y * c.y - a.scrollTop * c.y + f.y
662
+ };
663
+ }
664
+ function ce(t) {
665
+ return Array.from(t.getClientRects());
666
+ }
667
+ function pt(t, e) {
668
+ const n = ut(t).scrollLeft;
669
+ return e ? e.left + n : X(k(t)).left + n;
670
+ }
671
+ function ae(t) {
672
+ const e = k(t), n = ut(t), o = t.ownerDocument.body, i = D(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), s = D(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
673
+ let r = -n.scrollLeft + pt(t);
674
+ const l = -n.scrollTop;
675
+ return S(o).direction === "rtl" && (r += D(e.clientWidth, o.clientWidth) - i), {
676
+ width: i,
677
+ height: s,
678
+ x: r,
679
+ y: l
680
+ };
681
+ }
682
+ function fe(t, e) {
683
+ const n = T(t), o = k(t), i = n.visualViewport;
684
+ let s = o.clientWidth, r = o.clientHeight, l = 0, a = 0;
685
+ if (i) {
686
+ s = i.width, r = i.height;
687
+ const c = Rt();
688
+ (!c || c && e === "fixed") && (l = i.offsetLeft, a = i.offsetTop);
689
+ }
690
+ return {
691
+ width: s,
692
+ height: r,
693
+ x: l,
694
+ y: a
695
+ };
696
+ }
697
+ function ue(t, e) {
698
+ const n = X(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, s = M(t) ? J(t) : I(1), r = t.clientWidth * s.x, l = t.clientHeight * s.y, a = i * s.x, c = o * s.y;
699
+ return {
700
+ width: r,
701
+ height: l,
702
+ x: a,
703
+ y: c
704
+ };
705
+ }
706
+ function Ct(t, e, n) {
707
+ let o;
708
+ if (e === "viewport")
709
+ o = fe(t, n);
710
+ else if (e === "document")
711
+ o = ae(k(t));
712
+ else if (P(e))
713
+ o = ue(e, n);
714
+ else {
715
+ const i = Vt(t);
716
+ o = {
717
+ ...e,
718
+ x: e.x - i.x,
719
+ y: e.y - i.y
720
+ };
721
+ }
722
+ return ct(o);
723
+ }
724
+ function Mt(t, e) {
725
+ const n = j(t);
726
+ return n === e || !P(n) || Z(n) ? !1 : S(n).position === "fixed" || Mt(n, e);
727
+ }
728
+ function de(t, e) {
729
+ const n = e.get(t);
730
+ if (n)
731
+ return n;
732
+ let o = nt(t, [], !1).filter((l) => P(l) && q(l) !== "body"), i = null;
733
+ const s = S(t).position === "fixed";
734
+ let r = s ? j(t) : t;
735
+ for (; P(r) && !Z(r); ) {
736
+ const l = S(r), a = bt(r);
737
+ !a && l.position === "fixed" && (i = null), (s ? !a && !i : !a && l.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || it(r) && !a && Mt(t, r)) ? o = o.filter((f) => f !== r) : i = l, r = j(r);
738
+ }
739
+ return e.set(t, o), o;
740
+ }
741
+ function me(t) {
742
+ let {
743
+ element: e,
744
+ boundary: n,
745
+ rootBoundary: o,
746
+ strategy: i
747
+ } = t;
748
+ const r = [...n === "clippingAncestors" ? ft(e) ? [] : de(e, this._c) : [].concat(n), o], l = r[0], a = r.reduce((c, f) => {
749
+ const d = Ct(e, f, i);
750
+ return c.top = D(d.top, c.top), c.right = z(d.right, c.right), c.bottom = z(d.bottom, c.bottom), c.left = D(d.left, c.left), c;
751
+ }, Ct(e, l, i));
752
+ return {
753
+ width: a.right - a.left,
754
+ height: a.bottom - a.top,
755
+ x: a.left,
756
+ y: a.top
757
+ };
758
+ }
759
+ function ge(t) {
760
+ const {
761
+ width: e,
762
+ height: n
763
+ } = Ft(t);
764
+ return {
765
+ width: e,
766
+ height: n
767
+ };
768
+ }
769
+ function he(t, e, n) {
770
+ const o = M(e), i = k(e), s = n === "fixed", r = X(t, !0, s, e);
771
+ let l = {
772
+ scrollLeft: 0,
773
+ scrollTop: 0
774
+ };
775
+ const a = I(0);
776
+ if (o || !o && !s)
777
+ if ((q(e) !== "body" || it(i)) && (l = ut(e)), o) {
778
+ const u = X(e, !0, s, e);
779
+ a.x = u.x + e.clientLeft, a.y = u.y + e.clientTop;
780
+ } else
781
+ i && (a.x = pt(i));
782
+ let c = 0, f = 0;
783
+ if (i && !o && !s) {
784
+ const u = i.getBoundingClientRect();
785
+ f = u.top + l.scrollTop, c = u.left + l.scrollLeft - // RTL <body> scrollbar.
786
+ pt(i, u);
787
+ }
788
+ const d = r.left + l.scrollLeft - a.x - c, g = r.top + l.scrollTop - a.y - f;
789
+ return {
790
+ x: d,
791
+ y: g,
792
+ width: r.width,
793
+ height: r.height
794
+ };
795
+ }
796
+ function mt(t) {
797
+ return S(t).position === "static";
798
+ }
799
+ function Dt(t, e) {
800
+ if (!M(t) || S(t).position === "fixed")
801
+ return null;
802
+ if (e)
803
+ return e(t);
804
+ let n = t.offsetParent;
805
+ return k(t) === n && (n = n.ownerDocument.body), n;
806
+ }
807
+ function kt(t, e) {
808
+ const n = T(t);
809
+ if (ft(t))
810
+ return n;
811
+ if (!M(t)) {
812
+ let i = j(t);
813
+ for (; i && !Z(i); ) {
814
+ if (P(i) && !mt(i))
815
+ return i;
816
+ i = j(i);
817
+ }
818
+ return n;
819
+ }
820
+ let o = Dt(t, e);
821
+ for (; o && oe(o) && mt(o); )
822
+ o = Dt(o, e);
823
+ return o && Z(o) && mt(o) && !bt(o) ? n : o || ie(t) || n;
824
+ }
825
+ const pe = async function(t) {
826
+ const e = this.getOffsetParent || kt, n = this.getDimensions, o = await n(t.floating);
827
+ return {
828
+ reference: he(t.reference, await e(t.floating), t.strategy),
829
+ floating: {
830
+ x: 0,
831
+ y: 0,
832
+ width: o.width,
833
+ height: o.height
834
+ }
835
+ };
836
+ };
837
+ function we(t) {
838
+ return S(t).direction === "rtl";
839
+ }
840
+ const ve = {
841
+ convertOffsetParentRelativeRectToViewportRelativeRect: le,
842
+ getDocumentElement: k,
843
+ getClippingRect: me,
844
+ getOffsetParent: kt,
845
+ getElementRects: pe,
846
+ getClientRects: ce,
847
+ getDimensions: ge,
848
+ getScale: J,
849
+ isElement: P,
850
+ isRTL: we
851
+ };
852
+ function xe(t, e) {
853
+ let n = null, o;
854
+ const i = k(t);
855
+ function s() {
856
+ var l;
857
+ clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
858
+ }
859
+ function r(l, a) {
860
+ l === void 0 && (l = !1), a === void 0 && (a = 1), s();
861
+ const {
862
+ left: c,
863
+ top: f,
864
+ width: d,
865
+ height: g
866
+ } = t.getBoundingClientRect();
867
+ if (l || e(), !d || !g)
868
+ return;
869
+ const u = rt(f), m = rt(i.clientWidth - (c + d)), h = rt(i.clientHeight - (f + g)), w = rt(c), v = {
870
+ rootMargin: -u + "px " + -m + "px " + -h + "px " + -w + "px",
871
+ threshold: D(0, z(1, a)) || 1
872
+ };
873
+ let y = !0;
874
+ function R(b) {
875
+ const E = b[0].intersectionRatio;
876
+ if (E !== a) {
877
+ if (!y)
878
+ return r();
879
+ E ? r(!1, E) : o = setTimeout(() => {
880
+ r(!1, 1e-7);
881
+ }, 1e3);
882
+ }
883
+ y = !1;
884
+ }
885
+ try {
886
+ n = new IntersectionObserver(R, {
887
+ ...v,
888
+ // Handle <iframe>s
889
+ root: i.ownerDocument
890
+ });
891
+ } catch {
892
+ n = new IntersectionObserver(R, v);
893
+ }
894
+ n.observe(t);
895
+ }
896
+ return r(!0), s;
897
+ }
898
+ function Ae(t, e, n, o) {
899
+ o === void 0 && (o = {});
900
+ const {
901
+ ancestorScroll: i = !0,
902
+ ancestorResize: s = !0,
903
+ elementResize: r = typeof ResizeObserver == "function",
904
+ layoutShift: l = typeof IntersectionObserver == "function",
905
+ animationFrame: a = !1
906
+ } = o, c = Ot(t), f = i || s ? [...c ? nt(c) : [], ...nt(e)] : [];
907
+ f.forEach((p) => {
908
+ i && p.addEventListener("scroll", n, {
909
+ passive: !0
910
+ }), s && p.addEventListener("resize", n);
911
+ });
912
+ const d = c && l ? xe(c, n) : null;
913
+ let g = -1, u = null;
914
+ r && (u = new ResizeObserver((p) => {
915
+ let [v] = p;
916
+ v && v.target === c && u && (u.unobserve(e), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
917
+ var y;
918
+ (y = u) == null || y.observe(e);
919
+ })), n();
920
+ }), c && !a && u.observe(c), u.observe(e));
921
+ let m, h = a ? X(t) : null;
922
+ a && w();
923
+ function w() {
924
+ const p = X(t);
925
+ h && (p.x !== h.x || p.y !== h.y || p.width !== h.width || p.height !== h.height) && n(), h = p, m = requestAnimationFrame(w);
926
+ }
927
+ return n(), () => {
928
+ var p;
929
+ f.forEach((v) => {
930
+ i && v.removeEventListener("scroll", n), s && v.removeEventListener("resize", n);
931
+ }), d == null || d(), (p = u) == null || p.disconnect(), u = null, a && cancelAnimationFrame(m);
932
+ };
933
+ }
934
+ const Ee = ee, Ce = Zt, De = ne, ye = Qt, be = (t, e, n) => {
935
+ const o = /* @__PURE__ */ new Map(), i = {
936
+ platform: ve,
937
+ ...n
938
+ }, s = {
939
+ ...i.platform,
940
+ _c: o
941
+ };
942
+ return Jt(t, e, {
943
+ ...i,
944
+ platform: s
945
+ });
946
+ };
947
+ function Re(t) {
948
+ return t != null && typeof t == "object" && "$el" in t;
949
+ }
950
+ function wt(t) {
951
+ if (Re(t)) {
952
+ const e = t.$el;
953
+ return yt(e) && q(e) === "#comment" ? null : e;
954
+ }
955
+ return t;
956
+ }
957
+ function G(t) {
958
+ return typeof t == "function" ? t() : _t(t);
959
+ }
960
+ function Te(t) {
961
+ return {
962
+ name: "arrow",
963
+ options: t,
964
+ fn(e) {
965
+ const n = wt(G(t.element));
966
+ return n == null ? {} : ye({
967
+ element: n,
968
+ padding: t.padding
969
+ }).fn(e);
970
+ }
971
+ };
972
+ }
973
+ function Wt(t) {
974
+ return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
975
+ }
976
+ function Tt(t, e) {
977
+ const n = Wt(t);
978
+ return Math.round(e * n) / n;
979
+ }
980
+ function Le(t, e, n) {
981
+ n === void 0 && (n = {});
982
+ const o = n.whileElementsMounted, i = _(() => {
983
+ var x;
984
+ return (x = G(n.open)) != null ? x : !0;
985
+ }), s = _(() => G(n.middleware)), r = _(() => {
986
+ var x;
987
+ return (x = G(n.placement)) != null ? x : "bottom";
988
+ }), l = _(() => {
989
+ var x;
990
+ return (x = G(n.strategy)) != null ? x : "absolute";
991
+ }), a = _(() => {
992
+ var x;
993
+ return (x = G(n.transform)) != null ? x : !0;
994
+ }), c = _(() => wt(t.value)), f = _(() => wt(e.value)), d = et(0), g = et(0), u = et(l.value), m = et(r.value), h = Nt({}), w = et(!1), p = _(() => {
995
+ const x = {
996
+ position: u.value,
997
+ left: "0",
998
+ top: "0"
999
+ };
1000
+ if (!f.value)
1001
+ return x;
1002
+ const O = Tt(f.value, d.value), C = Tt(f.value, g.value);
1003
+ return a.value ? {
1004
+ ...x,
1005
+ transform: "translate(" + O + "px, " + C + "px)",
1006
+ ...Wt(f.value) >= 1.5 && {
1007
+ willChange: "transform"
1008
+ }
1009
+ } : {
1010
+ position: u.value,
1011
+ left: O + "px",
1012
+ top: C + "px"
1013
+ };
1014
+ });
1015
+ let v;
1016
+ function y() {
1017
+ if (c.value == null || f.value == null)
1018
+ return;
1019
+ const x = i.value;
1020
+ be(c.value, f.value, {
1021
+ middleware: s.value,
1022
+ placement: r.value,
1023
+ strategy: l.value
1024
+ }).then((O) => {
1025
+ d.value = O.x, g.value = O.y, u.value = O.strategy, m.value = O.placement, h.value = O.middlewareData, w.value = x !== !1;
1026
+ });
1027
+ }
1028
+ function R() {
1029
+ typeof v == "function" && (v(), v = void 0);
1030
+ }
1031
+ function b() {
1032
+ if (R(), o === void 0) {
1033
+ y();
1034
+ return;
1035
+ }
1036
+ if (c.value != null && f.value != null) {
1037
+ v = o(c.value, f.value, y);
1038
+ return;
1039
+ }
1040
+ }
1041
+ function E() {
1042
+ i.value || (w.value = !1);
1043
+ }
1044
+ return dt([s, r, l, i], y, {
1045
+ flush: "sync"
1046
+ }), dt([c, f], b, {
1047
+ flush: "sync"
1048
+ }), dt(i, E, {
1049
+ flush: "sync"
1050
+ }), $t() && Ht(R), {
1051
+ x: K(d),
1052
+ y: K(g),
1053
+ strategy: K(u),
1054
+ placement: K(m),
1055
+ middlewareData: K(h),
1056
+ isPositioned: K(w),
1057
+ floatingStyles: p,
1058
+ update: y
1059
+ };
1060
+ }
1061
+ export {
1062
+ Ae as a,
1063
+ Te as b,
1064
+ Ce as f,
1065
+ Ee as o,
1066
+ De as s,
1067
+ Le as u
1068
+ };
1069
+ //# sourceMappingURL=floating-ui.vue-8d7f7932.js.map