@leaflink/stash 53.4.6 → 53.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/AppSidebar.js +56 -52
  2. package/dist/AppSidebar.js.map +1 -1
  3. package/dist/AppTopbar.js +1 -1
  4. package/dist/Copy.js +1 -1
  5. package/dist/DataViewFilters.js +1 -1
  6. package/dist/DataViewFilters.js.map +1 -1
  7. package/dist/DataViewToolbar.js +139 -125
  8. package/dist/DataViewToolbar.js.map +1 -1
  9. package/dist/DatePicker.js +1114 -1113
  10. package/dist/DatePicker.js.map +1 -1
  11. package/dist/Modal.js +105 -89
  12. package/dist/Modal.js.map +1 -1
  13. package/dist/Modals.js +30 -26
  14. package/dist/Modals.js.map +1 -1
  15. package/dist/MoreActions.js +294 -288
  16. package/dist/MoreActions.js.map +1 -1
  17. package/dist/PageNavigation.js +1 -1
  18. package/dist/RadioGroup.js +69 -62
  19. package/dist/RadioGroup.js.map +1 -1
  20. package/dist/SearchBar.js +27 -25
  21. package/dist/SearchBar.js.map +1 -1
  22. package/dist/Select.js +103 -101
  23. package/dist/Select.js.map +1 -1
  24. package/dist/Stepper.js +1 -1
  25. package/dist/Tab.js +1 -1
  26. package/dist/Table.js +1 -1
  27. package/dist/Tabs.js +2 -2
  28. package/dist/Tabs.vue_vue_type_script_setup_true_lang-DEopbeSY.js +131 -0
  29. package/dist/Tabs.vue_vue_type_script_setup_true_lang-DEopbeSY.js.map +1 -0
  30. package/dist/Thumbnail.js +42 -42
  31. package/dist/Thumbnail.js.map +1 -1
  32. package/dist/ThumbnailGroup.js +24 -22
  33. package/dist/ThumbnailGroup.js.map +1 -1
  34. package/dist/Timeline.js +15 -13
  35. package/dist/Timeline.js.map +1 -1
  36. package/dist/Toast.vue.d.ts +1 -1
  37. package/dist/Tooltip.js +1 -1
  38. package/dist/{Tooltip.vue_vue_type_script_setup_true_lang-CFpM7Ldj.js → Tooltip.vue_vue_type_script_setup_true_lang-UUjw5O1x.js} +2 -2
  39. package/dist/{Tooltip.vue_vue_type_script_setup_true_lang-CFpM7Ldj.js.map → Tooltip.vue_vue_type_script_setup_true_lang-UUjw5O1x.js.map} +1 -1
  40. package/dist/components.css +1 -1
  41. package/dist/getContrastingTextColor.d.ts +8 -0
  42. package/dist/index-t9tXBnql.js +469 -0
  43. package/dist/{index-DA70nQCT.js.map → index-t9tXBnql.js.map} +1 -1
  44. package/dist/templateRefNarrowing-CeANDylX.js +22 -0
  45. package/dist/templateRefNarrowing-CeANDylX.js.map +1 -0
  46. package/dist/useMediaQuery.d.ts +12 -10
  47. package/dist/useMediaQuery.js +7 -29
  48. package/dist/useMediaQuery.js.map +1 -1
  49. package/dist/useSortable.js +1 -1
  50. package/dist/useValidation.d.ts +11 -1
  51. package/dist/useValidation.js +240 -198
  52. package/dist/useValidation.js.map +1 -1
  53. package/dist/utils/getContrastingTextColor.js +36 -24
  54. package/dist/utils/getContrastingTextColor.js.map +1 -1
  55. package/package.json +1 -2
  56. package/dist/Tabs.vue_vue_type_script_setup_true_lang-B3FBaVP5.js +0 -130
  57. package/dist/Tabs.vue_vue_type_script_setup_true_lang-B3FBaVP5.js.map +0 -1
  58. package/dist/index-DA70nQCT.js +0 -424
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Returns a contrasting text color (light or dark) for a given background color.
3
+ * Accepts hex values or Stash color names (resolved via CSS variables in the browser).
4
+ * In SSR or when the color is invalid, returns the default contrast color (ice-900).
5
+ *
6
+ * @param color - Hex string (e.g. #fff or abc123) or Stash color name (e.g. blue-500)
7
+ * @returns Hex string for the contrasting text color
8
+ */
1
9
  declare function getContrastingTextColor(color: string): "#27282A" | "#FFFFFF";
2
10
  export default getContrastingTextColor;
3
11
 
@@ -0,0 +1,469 @@
1
+ import { getCurrentInstance as k, getCurrentScope as G, hasInjectionContext as le, inject as ae, watch as A, isRef as re, shallowRef as h, toValue as S, onMounted as se, nextTick as fe, onScopeDispose as de, provide as ve, watchEffect as pe, computed as P, reactive as te, unref as me } from "vue";
2
+ function Q(e, o) {
3
+ return G() ? (de(e, o), !0) : !1;
4
+ }
5
+ const z = /* @__PURE__ */ new WeakMap(), he = /* @__NO_SIDE_EFFECTS__ */ (...e) => {
6
+ var o;
7
+ const l = e[0], n = (o = k()) === null || o === void 0 ? void 0 : o.proxy, r = n ?? G();
8
+ if (r == null && !le()) throw new Error("injectLocal must be called in setup");
9
+ return r && z.has(r) && l in z.get(r) ? z.get(r)[l] : ae(...e);
10
+ };
11
+ function be(e, o) {
12
+ var l;
13
+ const n = (l = k()) === null || l === void 0 ? void 0 : l.proxy, r = n ?? G();
14
+ if (r == null) throw new Error("provideLocal must be called in setup");
15
+ z.has(r) || z.set(r, /* @__PURE__ */ Object.create(null));
16
+ const t = z.get(r);
17
+ return t[e] = o, ve(e, o);
18
+ }
19
+ const we = typeof window < "u" && typeof document < "u";
20
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
21
+ const ue = (e) => e != null, ye = Object.prototype.toString, ge = (e) => ye.call(e) === "[object Object]", D = () => {
22
+ };
23
+ function ie(e, o) {
24
+ function l(...n) {
25
+ return new Promise((r, t) => {
26
+ Promise.resolve(e(() => o.apply(this, n), {
27
+ fn: o,
28
+ thisArg: this,
29
+ args: n
30
+ })).then(r).catch(t);
31
+ });
32
+ }
33
+ return l;
34
+ }
35
+ function Se(e, o = {}) {
36
+ let l, n, r = D;
37
+ const t = (i) => {
38
+ clearTimeout(i), r(), r = D;
39
+ };
40
+ let u;
41
+ return (i) => {
42
+ const v = S(e), s = S(o.maxWait);
43
+ return l && t(l), v <= 0 || s !== void 0 && s <= 0 ? (n && (t(n), n = void 0), Promise.resolve(i())) : new Promise((c, m) => {
44
+ r = o.rejectOnCancel ? m : c, u = i, s && !n && (n = setTimeout(() => {
45
+ l && t(l), n = void 0, c(u());
46
+ }, s)), l = setTimeout(() => {
47
+ n && t(n), n = void 0, c(i());
48
+ }, v);
49
+ });
50
+ };
51
+ }
52
+ function Ee(...e) {
53
+ let o = 0, l, n = !0, r = D, t, u, d, i, v;
54
+ !re(e[0]) && typeof e[0] == "object" ? { delay: u, trailing: d = !0, leading: i = !0, rejectOnCancel: v = !1 } = e[0] : [u, d = !0, i = !0, v = !1] = e;
55
+ const s = () => {
56
+ l && (clearTimeout(l), l = void 0, r(), r = D);
57
+ };
58
+ return (m) => {
59
+ const f = S(u), b = Date.now() - o, E = () => t = m();
60
+ return s(), f <= 0 ? (o = Date.now(), E()) : (b > f ? (o = Date.now(), (i || !n) && E()) : d && (t = new Promise((w, g) => {
61
+ r = v ? g : w, l = setTimeout(() => {
62
+ o = Date.now(), n = !0, w(E()), s();
63
+ }, Math.max(0, f - b));
64
+ })), !i && !l && (l = setTimeout(() => n = !0, f)), n = !1, t);
65
+ };
66
+ }
67
+ function oe(e) {
68
+ return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
69
+ }
70
+ function V(e) {
71
+ return Array.isArray(e) ? e : [e];
72
+ }
73
+ function Me(e) {
74
+ return k();
75
+ }
76
+ // @__NO_SIDE_EFFECTS__
77
+ function Oe(e, o = 200, l = {}) {
78
+ return ie(Se(o, l), e);
79
+ }
80
+ // @__NO_SIDE_EFFECTS__
81
+ function Te(e, o = 200, l = !1, n = !0, r = !1) {
82
+ return ie(Ee(o, l, n, r), e);
83
+ }
84
+ function U(e, o = !0, l) {
85
+ Me() ? se(e, l) : o ? e() : fe(e);
86
+ }
87
+ // @__NO_SIDE_EFFECTS__
88
+ function Ce(e = !1, o = {}) {
89
+ const { truthyValue: l = !0, falsyValue: n = !1 } = o, r = re(e), t = h(e);
90
+ function u(d) {
91
+ if (arguments.length)
92
+ return t.value = d, t.value;
93
+ {
94
+ const i = S(l);
95
+ return t.value = t.value === i ? S(n) : i, t.value;
96
+ }
97
+ }
98
+ return r ? u : [t, u];
99
+ }
100
+ function xe(e, o, l) {
101
+ return A(e, o, {
102
+ ...l,
103
+ immediate: !0
104
+ });
105
+ }
106
+ const X = we ? window : void 0;
107
+ function _(e) {
108
+ var o;
109
+ const l = S(e);
110
+ return (o = l == null ? void 0 : l.$el) !== null && o !== void 0 ? o : l;
111
+ }
112
+ function L(...e) {
113
+ const o = (n, r, t, u) => (n.addEventListener(r, t, u), () => n.removeEventListener(r, t, u)), l = P(() => {
114
+ const n = V(S(e[0])).filter((r) => r != null);
115
+ return n.every((r) => typeof r != "string") ? n : void 0;
116
+ });
117
+ return xe(() => {
118
+ var n, r;
119
+ return [
120
+ (n = (r = l.value) === null || r === void 0 ? void 0 : r.map((t) => _(t))) !== null && n !== void 0 ? n : [X].filter((t) => t != null),
121
+ V(S(l.value ? e[1] : e[0])),
122
+ V(me(l.value ? e[2] : e[1])),
123
+ S(l.value ? e[3] : e[2])
124
+ ];
125
+ }, ([n, r, t, u], d, i) => {
126
+ if (!(n != null && n.length) || !(r != null && r.length) || !(t != null && t.length)) return;
127
+ const v = ge(u) ? { ...u } : u, s = n.flatMap((c) => r.flatMap((m) => t.map((f) => o(c, m, f, v))));
128
+ i(() => {
129
+ s.forEach((c) => c());
130
+ });
131
+ }, { flush: "post" });
132
+ }
133
+ // @__NO_SIDE_EFFECTS__
134
+ function We() {
135
+ const e = h(!1), o = k();
136
+ return o && se(() => {
137
+ e.value = !0;
138
+ }, o), e;
139
+ }
140
+ // @__NO_SIDE_EFFECTS__
141
+ function B(e) {
142
+ const o = /* @__PURE__ */ We();
143
+ return P(() => (o.value, !!e()));
144
+ }
145
+ function J(e, o, l = {}) {
146
+ const { window: n = X, ...r } = l;
147
+ let t;
148
+ const u = /* @__PURE__ */ B(() => n && "MutationObserver" in n), d = () => {
149
+ t && (t.disconnect(), t = void 0);
150
+ }, i = A(P(() => {
151
+ const c = V(S(e)).map(_).filter(ue);
152
+ return new Set(c);
153
+ }), (c) => {
154
+ d(), u.value && c.size && (t = new MutationObserver(o), c.forEach((m) => t.observe(m, r)));
155
+ }, {
156
+ immediate: !0,
157
+ flush: "post"
158
+ }), v = () => t == null ? void 0 : t.takeRecords(), s = () => {
159
+ i(), d();
160
+ };
161
+ return Q(s), {
162
+ isSupported: u,
163
+ stop: s,
164
+ takeRecords: v
165
+ };
166
+ }
167
+ const N = Symbol("vueuse-ssr-width");
168
+ // @__NO_SIDE_EFFECTS__
169
+ function Re() {
170
+ const e = le() ? /* @__PURE__ */ he(N, null) : null;
171
+ return typeof e == "number" ? e : void 0;
172
+ }
173
+ function De(e, o) {
174
+ o !== void 0 ? o.provide(N, e) : be(N, e);
175
+ }
176
+ function Ie(e, o = {}) {
177
+ const { window: l = X, ssrWidth: n = /* @__PURE__ */ Re() } = o, r = /* @__PURE__ */ B(() => l && "matchMedia" in l && typeof l.matchMedia == "function"), t = h(typeof n == "number"), u = h(), d = h(!1), i = (v) => {
178
+ d.value = v.matches;
179
+ };
180
+ return pe(() => {
181
+ if (t.value) {
182
+ t.value = !r.value, d.value = S(e).split(",").some((v) => {
183
+ const s = v.includes("not all"), c = v.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), m = v.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
184
+ let f = !!(c || m);
185
+ return c && f && (f = n >= oe(c[1])), m && f && (f = n <= oe(m[1])), s ? !f : f;
186
+ });
187
+ return;
188
+ }
189
+ r.value && (u.value = l.matchMedia(S(e)), d.value = u.value.matches);
190
+ }), L(u, "change", i, { passive: !0 }), P(() => d.value);
191
+ }
192
+ function ce(e, o, l = {}) {
193
+ const { window: n = X, ...r } = l;
194
+ let t;
195
+ const u = /* @__PURE__ */ B(() => n && "ResizeObserver" in n), d = () => {
196
+ t && (t.disconnect(), t = void 0);
197
+ }, i = A(P(() => {
198
+ const s = S(e);
199
+ return Array.isArray(s) ? s.map((c) => _(c)) : [_(s)];
200
+ }), (s) => {
201
+ if (d(), u.value && n) {
202
+ t = new ResizeObserver(o);
203
+ for (const c of s) c && t.observe(c, r);
204
+ }
205
+ }, {
206
+ immediate: !0,
207
+ flush: "post"
208
+ }), v = () => {
209
+ d(), i();
210
+ };
211
+ return Q(v), {
212
+ isSupported: u,
213
+ stop: v
214
+ };
215
+ }
216
+ function Pe(e, o = {}) {
217
+ const { reset: l = !0, windowResize: n = !0, windowScroll: r = !0, immediate: t = !0, updateTiming: u = "sync" } = o, d = h(0), i = h(0), v = h(0), s = h(0), c = h(0), m = h(0), f = h(0), b = h(0);
218
+ function E() {
219
+ const g = _(e);
220
+ if (!g) {
221
+ l && (d.value = 0, i.value = 0, v.value = 0, s.value = 0, c.value = 0, m.value = 0, f.value = 0, b.value = 0);
222
+ return;
223
+ }
224
+ const y = g.getBoundingClientRect();
225
+ d.value = y.height, i.value = y.bottom, v.value = y.left, s.value = y.right, c.value = y.top, m.value = y.width, f.value = y.x, b.value = y.y;
226
+ }
227
+ function w() {
228
+ u === "sync" ? E() : u === "next-frame" && requestAnimationFrame(() => E());
229
+ }
230
+ return ce(e, w), A(() => _(e), (g) => !g && w()), J(e, w, { attributeFilter: ["style", "class"] }), r && L("scroll", w, {
231
+ capture: !0,
232
+ passive: !0
233
+ }), n && L("resize", w, { passive: !0 }), U(() => {
234
+ t && w();
235
+ }), {
236
+ height: d,
237
+ bottom: i,
238
+ left: v,
239
+ right: s,
240
+ top: c,
241
+ width: m,
242
+ x: f,
243
+ y: b,
244
+ update: w
245
+ };
246
+ }
247
+ function Xe(e, o, l = {}) {
248
+ const { root: n, rootMargin: r = "0px", threshold: t = 0, window: u = X, immediate: d = !0 } = l, i = /* @__PURE__ */ B(() => u && "IntersectionObserver" in u), v = P(() => V(S(e)).map(_).filter(ue));
249
+ let s = D;
250
+ const c = h(d), m = i.value ? A(() => [
251
+ v.value,
252
+ _(n),
253
+ c.value
254
+ ], ([b, E]) => {
255
+ if (s(), !c.value || !b.length) return;
256
+ const w = new IntersectionObserver(o, {
257
+ root: _(E),
258
+ rootMargin: r,
259
+ threshold: t
260
+ });
261
+ b.forEach((g) => g && w.observe(g)), s = () => {
262
+ w.disconnect(), s = D;
263
+ };
264
+ }, {
265
+ immediate: d,
266
+ flush: "post"
267
+ }) : D, f = () => {
268
+ s(), m(), c.value = !1;
269
+ };
270
+ return Q(f), {
271
+ isSupported: i,
272
+ isActive: c,
273
+ pause() {
274
+ s(), c.value = !1;
275
+ },
276
+ resume() {
277
+ c.value = !0;
278
+ },
279
+ stop: f
280
+ };
281
+ }
282
+ const ne = 1;
283
+ function Fe(e, o = {}) {
284
+ const { throttle: l = 0, idle: n = 200, onStop: r = D, onScroll: t = D, offset: u = {
285
+ left: 0,
286
+ right: 0,
287
+ top: 0,
288
+ bottom: 0
289
+ }, observe: d = { mutation: !1 }, eventListenerOptions: i = {
290
+ capture: !1,
291
+ passive: !0
292
+ }, behavior: v = "auto", window: s = X, onError: c = (a) => {
293
+ console.error(a);
294
+ } } = o, m = typeof d == "boolean" ? { mutation: d } : d, f = h(0), b = h(0), E = P({
295
+ get() {
296
+ return f.value;
297
+ },
298
+ set(a) {
299
+ g(a, void 0);
300
+ }
301
+ }), w = P({
302
+ get() {
303
+ return b.value;
304
+ },
305
+ set(a) {
306
+ g(void 0, a);
307
+ }
308
+ });
309
+ function g(a, x) {
310
+ var O, C, Y, $;
311
+ if (!s) return;
312
+ const W = S(e);
313
+ if (!W) return;
314
+ (O = W instanceof Document ? s.document.body : W) === null || O === void 0 || O.scrollTo({
315
+ top: (C = S(x)) !== null && C !== void 0 ? C : w.value,
316
+ left: (Y = S(a)) !== null && Y !== void 0 ? Y : E.value,
317
+ behavior: S(v)
318
+ });
319
+ const I = (W == null || ($ = W.document) === null || $ === void 0 ? void 0 : $.documentElement) || (W == null ? void 0 : W.documentElement) || W;
320
+ E != null && (f.value = I.scrollLeft), w != null && (b.value = I.scrollTop);
321
+ }
322
+ const y = h(!1), M = te({
323
+ left: !0,
324
+ right: !1,
325
+ top: !0,
326
+ bottom: !1
327
+ }), T = te({
328
+ left: !1,
329
+ right: !1,
330
+ top: !1,
331
+ bottom: !1
332
+ }), R = (a) => {
333
+ y.value && (y.value = !1, T.left = !1, T.right = !1, T.top = !1, T.bottom = !1, r(a));
334
+ }, F = /* @__PURE__ */ Oe(R, l + n), p = (a) => {
335
+ var x;
336
+ if (!s) return;
337
+ const O = (a == null || (x = a.document) === null || x === void 0 ? void 0 : x.documentElement) || (a == null ? void 0 : a.documentElement) || _(a), { display: C, flexDirection: Y, direction: $ } = s.getComputedStyle(O), W = $ === "rtl" ? -1 : 1, I = O.scrollLeft;
338
+ T.left = I < f.value, T.right = I > f.value;
339
+ const K = Math.abs(I * W) <= (u.left || 0), Z = Math.abs(I * W) + O.clientWidth >= O.scrollWidth - (u.right || 0) - ne;
340
+ C === "flex" && Y === "row-reverse" ? (M.left = Z, M.right = K) : (M.left = K, M.right = Z), f.value = I;
341
+ let H = O.scrollTop;
342
+ a === s.document && !H && (H = s.document.body.scrollTop), T.top = H < b.value, T.bottom = H > b.value;
343
+ const q = Math.abs(H) <= (u.top || 0), ee = Math.abs(H) + O.clientHeight >= O.scrollHeight - (u.bottom || 0) - ne;
344
+ C === "flex" && Y === "column-reverse" ? (M.top = ee, M.bottom = q) : (M.top = q, M.bottom = ee), b.value = H;
345
+ }, j = (a) => {
346
+ var x;
347
+ s && (p((x = a.target.documentElement) !== null && x !== void 0 ? x : a.target), y.value = !0, F(a), t(a));
348
+ };
349
+ return L(e, "scroll", l ? /* @__PURE__ */ Te(j, l, !0, !1) : j, i), U(() => {
350
+ try {
351
+ const a = S(e);
352
+ if (!a) return;
353
+ p(a);
354
+ } catch (a) {
355
+ c(a);
356
+ }
357
+ }), m != null && m.mutation && e != null && e !== s && e !== document && J(e, () => {
358
+ const a = S(e);
359
+ a && p(a);
360
+ }, {
361
+ attributes: !0,
362
+ childList: !0,
363
+ subtree: !0
364
+ }), L(e, "scrollend", R, i), {
365
+ x: E,
366
+ y: w,
367
+ isScrolling: y,
368
+ arrivedState: M,
369
+ directions: T,
370
+ measure() {
371
+ const a = S(e);
372
+ s && a && p(a);
373
+ }
374
+ };
375
+ }
376
+ const Le = {
377
+ page: (e) => [e.pageX, e.pageY],
378
+ client: (e) => [e.clientX, e.clientY],
379
+ screen: (e) => [e.screenX, e.screenY],
380
+ movement: (e) => e instanceof MouseEvent ? [e.movementX, e.movementY] : null
381
+ };
382
+ function _e(e = {}) {
383
+ const { type: o = "page", touch: l = !0, resetOnTouchEnds: n = !1, initialValue: r = {
384
+ x: 0,
385
+ y: 0
386
+ }, window: t = X, target: u = t, scroll: d = !0, eventFilter: i } = e;
387
+ let v = null, s = 0, c = 0;
388
+ const m = h(r.x), f = h(r.y), b = h(null), E = typeof o == "function" ? o : Le[o], w = (p) => {
389
+ const j = E(p);
390
+ v = p, j && ([m.value, f.value] = j, b.value = "mouse"), t && (s = t.scrollX, c = t.scrollY);
391
+ }, g = (p) => {
392
+ if (p.touches.length > 0) {
393
+ const j = E(p.touches[0]);
394
+ j && ([m.value, f.value] = j, b.value = "touch");
395
+ }
396
+ }, y = () => {
397
+ if (!v || !t) return;
398
+ const p = E(v);
399
+ v instanceof MouseEvent && p && (m.value = p[0] + t.scrollX - s, f.value = p[1] + t.scrollY - c);
400
+ }, M = () => {
401
+ m.value = r.x, f.value = r.y;
402
+ }, T = i ? (p) => i(() => w(p), {}) : (p) => w(p), R = i ? (p) => i(() => g(p), {}) : (p) => g(p), F = i ? () => i(() => y(), {}) : () => y();
403
+ if (u) {
404
+ const p = { passive: !0 };
405
+ L(u, ["mousemove", "dragover"], T, p), l && o !== "movement" && (L(u, ["touchstart", "touchmove"], R, p), n && L(u, "touchend", M, p)), d && o === "page" && L(t, "scroll", F, p);
406
+ }
407
+ return {
408
+ x: m,
409
+ y: f,
410
+ sourceType: b
411
+ };
412
+ }
413
+ function He(e, o = {}) {
414
+ const { windowResize: l = !0, windowScroll: n = !0, handleOutside: r = !0, window: t = X } = o, u = o.type || "page", { x: d, y: i, sourceType: v } = _e(o), s = h(e ?? (t == null ? void 0 : t.document.body)), c = h(0), m = h(0), f = h(0), b = h(0), E = h(0), w = h(0), g = h(!0);
415
+ function y() {
416
+ if (!t) return;
417
+ const R = _(s);
418
+ if (!(!R || !(R instanceof Element)))
419
+ for (const F of R.getClientRects()) {
420
+ const { left: p, top: j, width: a, height: x } = F;
421
+ f.value = p + (u === "page" ? t.pageXOffset : 0), b.value = j + (u === "page" ? t.pageYOffset : 0), E.value = x, w.value = a;
422
+ const O = d.value - f.value, C = i.value - b.value;
423
+ if (g.value = a === 0 || x === 0 || O < 0 || C < 0 || O > a || C > x, (r || !g.value) && (c.value = O, m.value = C), !g.value) break;
424
+ }
425
+ }
426
+ const M = [];
427
+ function T() {
428
+ M.forEach((R) => R()), M.length = 0;
429
+ }
430
+ if (U(() => {
431
+ y();
432
+ }), t) {
433
+ const { stop: R } = ce(s, y), { stop: F } = J(s, y, { attributeFilter: ["style", "class"] }), p = A([
434
+ s,
435
+ d,
436
+ i
437
+ ], y);
438
+ M.push(R, F, p), L(document, "mouseleave", () => g.value = !0, { passive: !0 }), n && M.push(L("scroll", y, {
439
+ capture: !0,
440
+ passive: !0
441
+ })), l && M.push(L("resize", y, { passive: !0 }));
442
+ }
443
+ return {
444
+ x: d,
445
+ y: i,
446
+ sourceType: v,
447
+ elementX: c,
448
+ elementY: m,
449
+ elementPositionX: f,
450
+ elementPositionY: b,
451
+ elementHeight: E,
452
+ elementWidth: w,
453
+ isOutside: g,
454
+ stop: T
455
+ };
456
+ }
457
+ export {
458
+ Ie as a,
459
+ Re as b,
460
+ _ as c,
461
+ Fe as d,
462
+ ce as e,
463
+ Xe as f,
464
+ Ce as g,
465
+ Pe as h,
466
+ De as p,
467
+ He as u
468
+ };
469
+ //# sourceMappingURL=index-t9tXBnql.js.map