@folkehelseinstituttet/designsystem 0.30.0 → 0.32.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.
- package/custom-elements.json +621 -571
- package/fhi-body.js +10 -10
- package/fhi-body.js.map +1 -1
- package/fhi-button.js +12 -8
- package/fhi-button.js.map +1 -1
- package/fhi-date-input.js +62 -24
- package/fhi-date-input.js.map +1 -1
- package/fhi-display.js +13 -9
- package/fhi-display.js.map +1 -1
- package/fhi-headline.js +13 -9
- package/fhi-headline.js.map +1 -1
- package/fhi-label.js +10 -10
- package/fhi-label.js.map +1 -1
- package/fhi-modal-dialog.js +2 -2
- package/fhi-modal-dialog.js.map +1 -1
- package/fhi-tag.js +1 -1
- package/fhi-tag.js.map +1 -1
- package/fhi-text-input.js +88 -52
- package/fhi-text-input.js.map +1 -1
- package/fhi-title.js +13 -9
- package/fhi-title.js.map +1 -1
- package/fhi-tooltip.js +397 -395
- package/fhi-tooltip.js.map +1 -1
- package/index.js +354 -354
- package/package.json +12 -47
- package/web-types.json +280 -260
package/fhi-tooltip.js
CHANGED
|
@@ -1,69 +1,66 @@
|
|
|
1
|
-
import { n as j, i as
|
|
2
|
-
import { e as
|
|
1
|
+
import { n as j, i as Ht, a as It, b as Xt, t as jt } from "./property-DGdAXcEz.js";
|
|
2
|
+
import { e as Lt } from "./query-NJDNu0-P.js";
|
|
3
3
|
/**
|
|
4
4
|
* @license
|
|
5
5
|
* Copyright 2017 Google LLC
|
|
6
6
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
7
7
|
*/
|
|
8
|
-
function
|
|
8
|
+
function pt(t) {
|
|
9
9
|
return j({ ...t, state: !0, attribute: !1 });
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const Q = Math.min, W = Math.max, Z = Math.round, J = Math.floor, L = (t) => ({
|
|
12
12
|
x: t,
|
|
13
13
|
y: t
|
|
14
|
-
}),
|
|
14
|
+
}), Kt = {
|
|
15
15
|
left: "right",
|
|
16
16
|
right: "left",
|
|
17
17
|
bottom: "top",
|
|
18
18
|
top: "bottom"
|
|
19
|
-
}, Xt = {
|
|
20
|
-
start: "end",
|
|
21
|
-
end: "start"
|
|
22
19
|
};
|
|
23
|
-
function
|
|
24
|
-
return
|
|
20
|
+
function bt(t, e, n) {
|
|
21
|
+
return W(t, Q(e, n));
|
|
25
22
|
}
|
|
26
|
-
function
|
|
23
|
+
function it(t, e) {
|
|
27
24
|
return typeof t == "function" ? t(e) : t;
|
|
28
25
|
}
|
|
29
|
-
function
|
|
26
|
+
function N(t) {
|
|
30
27
|
return t.split("-")[0];
|
|
31
28
|
}
|
|
32
29
|
function nt(t) {
|
|
33
30
|
return t.split("-")[1];
|
|
34
31
|
}
|
|
35
|
-
function
|
|
32
|
+
function St(t) {
|
|
36
33
|
return t === "x" ? "y" : "x";
|
|
37
34
|
}
|
|
38
|
-
function
|
|
35
|
+
function Pt(t) {
|
|
39
36
|
return t === "y" ? "height" : "width";
|
|
40
37
|
}
|
|
41
|
-
const Kt = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
42
38
|
function F(t) {
|
|
43
|
-
|
|
39
|
+
const e = t[0];
|
|
40
|
+
return e === "t" || e === "b" ? "y" : "x";
|
|
44
41
|
}
|
|
45
|
-
function
|
|
46
|
-
return
|
|
42
|
+
function kt(t) {
|
|
43
|
+
return St(F(t));
|
|
47
44
|
}
|
|
48
45
|
function Yt(t, e, n) {
|
|
49
46
|
n === void 0 && (n = !1);
|
|
50
|
-
const i = nt(t), o =
|
|
47
|
+
const i = nt(t), o = kt(t), r = Pt(o);
|
|
51
48
|
let s = o === "x" ? i === (n ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
|
|
52
|
-
return e.reference[r] > e.floating[r] && (s =
|
|
49
|
+
return e.reference[r] > e.floating[r] && (s = tt(s)), [s, tt(s)];
|
|
53
50
|
}
|
|
54
51
|
function qt(t) {
|
|
55
|
-
const e =
|
|
56
|
-
return [
|
|
52
|
+
const e = tt(t);
|
|
53
|
+
return [ht(t), e, ht(e)];
|
|
57
54
|
}
|
|
58
|
-
function
|
|
59
|
-
return t.replace(
|
|
55
|
+
function ht(t) {
|
|
56
|
+
return t.includes("start") ? t.replace("start", "end") : t.replace("end", "start");
|
|
60
57
|
}
|
|
61
|
-
const
|
|
58
|
+
const _t = ["left", "right"], Rt = ["right", "left"], Ut = ["top", "bottom"], Gt = ["bottom", "top"];
|
|
62
59
|
function Jt(t, e, n) {
|
|
63
60
|
switch (t) {
|
|
64
61
|
case "top":
|
|
65
62
|
case "bottom":
|
|
66
|
-
return n ? e ?
|
|
63
|
+
return n ? e ? Rt : _t : e ? _t : Rt;
|
|
67
64
|
case "left":
|
|
68
65
|
case "right":
|
|
69
66
|
return e ? Ut : Gt;
|
|
@@ -73,11 +70,12 @@ function Jt(t, e, n) {
|
|
|
73
70
|
}
|
|
74
71
|
function Qt(t, e, n, i) {
|
|
75
72
|
const o = nt(t);
|
|
76
|
-
let r = Jt(
|
|
77
|
-
return o && (r = r.map((s) => s + "-" + o), e && (r = r.concat(r.map(
|
|
73
|
+
let r = Jt(N(t), n === "start", i);
|
|
74
|
+
return o && (r = r.map((s) => s + "-" + o), e && (r = r.concat(r.map(ht)))), r;
|
|
78
75
|
}
|
|
79
|
-
function
|
|
80
|
-
|
|
76
|
+
function tt(t) {
|
|
77
|
+
const e = N(t);
|
|
78
|
+
return Kt[e] + t.slice(e.length);
|
|
81
79
|
}
|
|
82
80
|
function Zt(t) {
|
|
83
81
|
return {
|
|
@@ -96,7 +94,7 @@ function te(t) {
|
|
|
96
94
|
left: t
|
|
97
95
|
};
|
|
98
96
|
}
|
|
99
|
-
function
|
|
97
|
+
function et(t) {
|
|
100
98
|
const {
|
|
101
99
|
x: e,
|
|
102
100
|
y: n,
|
|
@@ -114,14 +112,14 @@ function tt(t) {
|
|
|
114
112
|
y: n
|
|
115
113
|
};
|
|
116
114
|
}
|
|
117
|
-
function
|
|
115
|
+
function Ot(t, e, n) {
|
|
118
116
|
let {
|
|
119
117
|
reference: i,
|
|
120
118
|
floating: o
|
|
121
119
|
} = t;
|
|
122
|
-
const r = F(e), s =
|
|
120
|
+
const r = F(e), s = kt(e), c = Pt(s), l = N(e), a = r === "y", h = i.x + i.width / 2 - o.width / 2, u = i.y + i.height / 2 - o.height / 2, d = i[c] / 2 - o[c] / 2;
|
|
123
121
|
let f;
|
|
124
|
-
switch (
|
|
122
|
+
switch (l) {
|
|
125
123
|
case "top":
|
|
126
124
|
f = {
|
|
127
125
|
x: h,
|
|
@@ -170,50 +168,53 @@ async function ee(t, e) {
|
|
|
170
168
|
y: o,
|
|
171
169
|
platform: r,
|
|
172
170
|
rects: s,
|
|
173
|
-
elements:
|
|
174
|
-
strategy:
|
|
171
|
+
elements: c,
|
|
172
|
+
strategy: l
|
|
175
173
|
} = t, {
|
|
176
174
|
boundary: a = "clippingAncestors",
|
|
177
175
|
rootBoundary: h = "viewport",
|
|
178
176
|
elementContext: u = "floating",
|
|
179
177
|
altBoundary: d = !1,
|
|
180
178
|
padding: f = 0
|
|
181
|
-
} =
|
|
182
|
-
element: (n = await (r.isElement == null ? void 0 : r.isElement(y))) == null || n ? y : y.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(
|
|
179
|
+
} = it(e, t), p = te(f), y = c[d ? u === "floating" ? "reference" : "floating" : u], g = et(await r.getClippingRect({
|
|
180
|
+
element: (n = await (r.isElement == null ? void 0 : r.isElement(y))) == null || n ? y : y.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(c.floating)),
|
|
183
181
|
boundary: a,
|
|
184
182
|
rootBoundary: h,
|
|
185
|
-
strategy:
|
|
183
|
+
strategy: l
|
|
186
184
|
})), w = u === "floating" ? {
|
|
187
185
|
x: i,
|
|
188
186
|
y: o,
|
|
189
187
|
width: s.floating.width,
|
|
190
188
|
height: s.floating.height
|
|
191
|
-
} : s.reference, x = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(
|
|
189
|
+
} : s.reference, x = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c.floating)), v = await (r.isElement == null ? void 0 : r.isElement(x)) ? await (r.getScale == null ? void 0 : r.getScale(x)) || {
|
|
192
190
|
x: 1,
|
|
193
191
|
y: 1
|
|
194
192
|
} : {
|
|
195
193
|
x: 1,
|
|
196
194
|
y: 1
|
|
197
|
-
},
|
|
198
|
-
elements:
|
|
195
|
+
}, O = et(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
196
|
+
elements: c,
|
|
199
197
|
rect: w,
|
|
200
198
|
offsetParent: x,
|
|
201
|
-
strategy:
|
|
199
|
+
strategy: l
|
|
202
200
|
}) : w);
|
|
203
201
|
return {
|
|
204
|
-
top: (
|
|
205
|
-
bottom: (
|
|
206
|
-
left: (
|
|
207
|
-
right: (
|
|
202
|
+
top: (g.top - O.top + p.top) / v.y,
|
|
203
|
+
bottom: (O.bottom - g.bottom + p.bottom) / v.y,
|
|
204
|
+
left: (g.left - O.left + p.left) / v.x,
|
|
205
|
+
right: (O.right - g.right + p.right) / v.x
|
|
208
206
|
};
|
|
209
207
|
}
|
|
210
|
-
const ne = async (t, e, n) => {
|
|
208
|
+
const ie = 50, ne = async (t, e, n) => {
|
|
211
209
|
const {
|
|
212
210
|
placement: i = "bottom",
|
|
213
211
|
strategy: o = "absolute",
|
|
214
212
|
middleware: r = [],
|
|
215
213
|
platform: s
|
|
216
|
-
} = n,
|
|
214
|
+
} = n, c = s.detectOverflow ? s : {
|
|
215
|
+
...s,
|
|
216
|
+
detectOverflow: ee
|
|
217
|
+
}, l = await (s.isRTL == null ? void 0 : s.isRTL(e));
|
|
217
218
|
let a = await s.getElementRects({
|
|
218
219
|
reference: t,
|
|
219
220
|
floating: e,
|
|
@@ -221,16 +222,19 @@ const ne = async (t, e, n) => {
|
|
|
221
222
|
}), {
|
|
222
223
|
x: h,
|
|
223
224
|
y: u
|
|
224
|
-
} =
|
|
225
|
-
|
|
226
|
-
|
|
225
|
+
} = Ot(a, i, l), d = i, f = 0;
|
|
226
|
+
const p = {};
|
|
227
|
+
for (let m = 0; m < r.length; m++) {
|
|
228
|
+
const y = r[m];
|
|
229
|
+
if (!y)
|
|
230
|
+
continue;
|
|
227
231
|
const {
|
|
228
|
-
name:
|
|
232
|
+
name: g,
|
|
229
233
|
fn: w
|
|
230
|
-
} =
|
|
234
|
+
} = y, {
|
|
231
235
|
x,
|
|
232
236
|
y: v,
|
|
233
|
-
data:
|
|
237
|
+
data: O,
|
|
234
238
|
reset: b
|
|
235
239
|
} = await w({
|
|
236
240
|
x: h,
|
|
@@ -238,40 +242,34 @@ const ne = async (t, e, n) => {
|
|
|
238
242
|
initialPlacement: i,
|
|
239
243
|
placement: d,
|
|
240
244
|
strategy: o,
|
|
241
|
-
middlewareData:
|
|
245
|
+
middlewareData: p,
|
|
242
246
|
rects: a,
|
|
243
|
-
platform:
|
|
244
|
-
...s,
|
|
245
|
-
detectOverflow: (g = s.detectOverflow) != null ? g : ee
|
|
246
|
-
},
|
|
247
|
+
platform: c,
|
|
247
248
|
elements: {
|
|
248
249
|
reference: t,
|
|
249
250
|
floating: e
|
|
250
251
|
}
|
|
251
252
|
});
|
|
252
|
-
h = x ?? h, u = v ?? u,
|
|
253
|
-
...
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
...A
|
|
257
|
-
}
|
|
258
|
-
}, b && p <= 50 && (p++, typeof b == "object" && (b.placement && (d = b.placement), b.rects && (a = b.rects === !0 ? await s.getElementRects({
|
|
253
|
+
h = x ?? h, u = v ?? u, p[g] = {
|
|
254
|
+
...p[g],
|
|
255
|
+
...O
|
|
256
|
+
}, b && f < ie && (f++, typeof b == "object" && (b.placement && (d = b.placement), b.rects && (a = b.rects === !0 ? await s.getElementRects({
|
|
259
257
|
reference: t,
|
|
260
258
|
floating: e,
|
|
261
259
|
strategy: o
|
|
262
260
|
}) : b.rects), {
|
|
263
261
|
x: h,
|
|
264
262
|
y: u
|
|
265
|
-
} =
|
|
263
|
+
} = Ot(a, d, l)), m = -1);
|
|
266
264
|
}
|
|
267
265
|
return {
|
|
268
266
|
x: h,
|
|
269
267
|
y: u,
|
|
270
268
|
placement: d,
|
|
271
269
|
strategy: o,
|
|
272
|
-
middlewareData:
|
|
270
|
+
middlewareData: p
|
|
273
271
|
};
|
|
274
|
-
},
|
|
272
|
+
}, oe = function(t) {
|
|
275
273
|
return t === void 0 && (t = {}), {
|
|
276
274
|
name: "flip",
|
|
277
275
|
options: t,
|
|
@@ -281,8 +279,8 @@ const ne = async (t, e, n) => {
|
|
|
281
279
|
placement: o,
|
|
282
280
|
middlewareData: r,
|
|
283
281
|
rects: s,
|
|
284
|
-
initialPlacement:
|
|
285
|
-
platform:
|
|
282
|
+
initialPlacement: c,
|
|
283
|
+
platform: l,
|
|
286
284
|
elements: a
|
|
287
285
|
} = e, {
|
|
288
286
|
mainAxis: h = !0,
|
|
@@ -290,43 +288,43 @@ const ne = async (t, e, n) => {
|
|
|
290
288
|
fallbackPlacements: d,
|
|
291
289
|
fallbackStrategy: f = "bestFit",
|
|
292
290
|
fallbackAxisSideDirection: p = "none",
|
|
293
|
-
flipAlignment:
|
|
291
|
+
flipAlignment: m = !0,
|
|
294
292
|
...y
|
|
295
|
-
} =
|
|
293
|
+
} = it(t, e);
|
|
296
294
|
if ((n = r.arrow) != null && n.alignmentOffset)
|
|
297
295
|
return {};
|
|
298
|
-
const
|
|
299
|
-
!d && b &&
|
|
300
|
-
const
|
|
301
|
-
let
|
|
302
|
-
if (h &&
|
|
296
|
+
const g = N(o), w = F(c), x = N(c) === c, v = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), O = d || (x || !m ? [tt(c)] : qt(c)), b = p !== "none";
|
|
297
|
+
!d && b && O.push(...Qt(c, m, p, v));
|
|
298
|
+
const z = [c, ...O], lt = await l.detectOverflow(e, y), G = [];
|
|
299
|
+
let H = ((i = r.flip) == null ? void 0 : i.overflows) || [];
|
|
300
|
+
if (h && G.push(lt[g]), u) {
|
|
303
301
|
const M = Yt(o, s, v);
|
|
304
|
-
|
|
302
|
+
G.push(lt[M[0]], lt[M[1]]);
|
|
305
303
|
}
|
|
306
|
-
if (
|
|
304
|
+
if (H = [...H, {
|
|
307
305
|
placement: o,
|
|
308
|
-
overflows:
|
|
309
|
-
}], !
|
|
310
|
-
var
|
|
311
|
-
const M = (((
|
|
312
|
-
if (
|
|
306
|
+
overflows: G
|
|
307
|
+
}], !G.every((M) => M <= 0)) {
|
|
308
|
+
var wt, xt;
|
|
309
|
+
const M = (((wt = r.flip) == null ? void 0 : wt.index) || 0) + 1, at = z[M];
|
|
310
|
+
if (at && (!(u === "alignment" ? w !== F(at) : !1) || // We leave the current main axis only if every placement on that axis
|
|
313
311
|
// overflows the main axis.
|
|
314
|
-
|
|
312
|
+
H.every((C) => F(C.placement) === w ? C.overflows[0] > 0 : !0)))
|
|
315
313
|
return {
|
|
316
314
|
data: {
|
|
317
315
|
index: M,
|
|
318
|
-
overflows:
|
|
316
|
+
overflows: H
|
|
319
317
|
},
|
|
320
318
|
reset: {
|
|
321
|
-
placement:
|
|
319
|
+
placement: at
|
|
322
320
|
}
|
|
323
321
|
};
|
|
324
|
-
let
|
|
325
|
-
if (!
|
|
322
|
+
let Y = (xt = H.filter(($) => $.overflows[0] <= 0).sort(($, C) => $.overflows[1] - C.overflows[1])[0]) == null ? void 0 : xt.placement;
|
|
323
|
+
if (!Y)
|
|
326
324
|
switch (f) {
|
|
327
325
|
case "bestFit": {
|
|
328
|
-
var
|
|
329
|
-
const
|
|
326
|
+
var vt;
|
|
327
|
+
const $ = (vt = H.filter((C) => {
|
|
330
328
|
if (b) {
|
|
331
329
|
const k = F(C.placement);
|
|
332
330
|
return k === w || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -334,31 +332,31 @@ const ne = async (t, e, n) => {
|
|
|
334
332
|
k === "y";
|
|
335
333
|
}
|
|
336
334
|
return !0;
|
|
337
|
-
}).map((C) => [C.placement, C.overflows.filter((k) => k > 0).reduce((k,
|
|
338
|
-
|
|
335
|
+
}).map((C) => [C.placement, C.overflows.filter((k) => k > 0).reduce((k, zt) => k + zt, 0)]).sort((C, k) => C[1] - k[1])[0]) == null ? void 0 : vt[0];
|
|
336
|
+
$ && (Y = $);
|
|
339
337
|
break;
|
|
340
338
|
}
|
|
341
339
|
case "initialPlacement":
|
|
342
|
-
|
|
340
|
+
Y = c;
|
|
343
341
|
break;
|
|
344
342
|
}
|
|
345
|
-
if (o !==
|
|
343
|
+
if (o !== Y)
|
|
346
344
|
return {
|
|
347
345
|
reset: {
|
|
348
|
-
placement:
|
|
346
|
+
placement: Y
|
|
349
347
|
}
|
|
350
348
|
};
|
|
351
349
|
}
|
|
352
350
|
return {};
|
|
353
351
|
}
|
|
354
352
|
};
|
|
355
|
-
},
|
|
356
|
-
async function
|
|
353
|
+
}, se = /* @__PURE__ */ new Set(["left", "top"]);
|
|
354
|
+
async function re(t, e) {
|
|
357
355
|
const {
|
|
358
356
|
placement: n,
|
|
359
357
|
platform: i,
|
|
360
358
|
elements: o
|
|
361
|
-
} = t, r = await (i.isRTL == null ? void 0 : i.isRTL(o.floating)), s =
|
|
359
|
+
} = t, r = await (i.isRTL == null ? void 0 : i.isRTL(o.floating)), s = N(n), c = nt(n), l = F(n) === "y", a = se.has(s) ? -1 : 1, h = r && l ? -1 : 1, u = it(e, t);
|
|
362
360
|
let {
|
|
363
361
|
mainAxis: d,
|
|
364
362
|
crossAxis: f,
|
|
@@ -372,7 +370,7 @@ async function se(t, e) {
|
|
|
372
370
|
crossAxis: u.crossAxis || 0,
|
|
373
371
|
alignmentAxis: u.alignmentAxis
|
|
374
372
|
};
|
|
375
|
-
return
|
|
373
|
+
return c && typeof p == "number" && (f = c === "end" ? p * -1 : p), l ? {
|
|
376
374
|
x: f * h,
|
|
377
375
|
y: d * a
|
|
378
376
|
} : {
|
|
@@ -380,7 +378,7 @@ async function se(t, e) {
|
|
|
380
378
|
y: f * h
|
|
381
379
|
};
|
|
382
380
|
}
|
|
383
|
-
const
|
|
381
|
+
const ce = function(t) {
|
|
384
382
|
return t === void 0 && (t = 0), {
|
|
385
383
|
name: "offset",
|
|
386
384
|
options: t,
|
|
@@ -390,13 +388,13 @@ const re = function(t) {
|
|
|
390
388
|
x: o,
|
|
391
389
|
y: r,
|
|
392
390
|
placement: s,
|
|
393
|
-
middlewareData:
|
|
394
|
-
} = e,
|
|
395
|
-
return s === ((n =
|
|
396
|
-
x: o +
|
|
397
|
-
y: r +
|
|
391
|
+
middlewareData: c
|
|
392
|
+
} = e, l = await re(e, t);
|
|
393
|
+
return s === ((n = c.offset) == null ? void 0 : n.placement) && (i = c.arrow) != null && i.alignmentOffset ? {} : {
|
|
394
|
+
x: o + l.x,
|
|
395
|
+
y: r + l.y,
|
|
398
396
|
data: {
|
|
399
|
-
...
|
|
397
|
+
...l,
|
|
400
398
|
placement: s
|
|
401
399
|
}
|
|
402
400
|
};
|
|
@@ -414,13 +412,13 @@ const re = function(t) {
|
|
|
414
412
|
platform: r
|
|
415
413
|
} = e, {
|
|
416
414
|
mainAxis: s = !0,
|
|
417
|
-
crossAxis:
|
|
418
|
-
limiter:
|
|
419
|
-
fn: (
|
|
415
|
+
crossAxis: c = !1,
|
|
416
|
+
limiter: l = {
|
|
417
|
+
fn: (g) => {
|
|
420
418
|
let {
|
|
421
419
|
x: w,
|
|
422
420
|
y: x
|
|
423
|
-
} =
|
|
421
|
+
} = g;
|
|
424
422
|
return {
|
|
425
423
|
x: w,
|
|
426
424
|
y: x
|
|
@@ -428,23 +426,23 @@ const re = function(t) {
|
|
|
428
426
|
}
|
|
429
427
|
},
|
|
430
428
|
...a
|
|
431
|
-
} =
|
|
429
|
+
} = it(t, e), h = {
|
|
432
430
|
x: n,
|
|
433
431
|
y: i
|
|
434
|
-
}, u = await r.detectOverflow(e, a), d = F(
|
|
435
|
-
let p = h[f],
|
|
432
|
+
}, u = await r.detectOverflow(e, a), d = F(N(o)), f = St(d);
|
|
433
|
+
let p = h[f], m = h[d];
|
|
436
434
|
if (s) {
|
|
437
|
-
const
|
|
438
|
-
p =
|
|
435
|
+
const g = f === "y" ? "top" : "left", w = f === "y" ? "bottom" : "right", x = p + u[g], v = p - u[w];
|
|
436
|
+
p = bt(x, p, v);
|
|
439
437
|
}
|
|
440
|
-
if (
|
|
441
|
-
const
|
|
442
|
-
|
|
438
|
+
if (c) {
|
|
439
|
+
const g = d === "y" ? "top" : "left", w = d === "y" ? "bottom" : "right", x = m + u[g], v = m - u[w];
|
|
440
|
+
m = bt(x, m, v);
|
|
443
441
|
}
|
|
444
|
-
const y =
|
|
442
|
+
const y = l.fn({
|
|
445
443
|
...e,
|
|
446
444
|
[f]: p,
|
|
447
|
-
[d]:
|
|
445
|
+
[d]: m
|
|
448
446
|
});
|
|
449
447
|
return {
|
|
450
448
|
...y,
|
|
@@ -453,91 +451,91 @@ const re = function(t) {
|
|
|
453
451
|
y: y.y - i,
|
|
454
452
|
enabled: {
|
|
455
453
|
[f]: s,
|
|
456
|
-
[d]:
|
|
454
|
+
[d]: c
|
|
457
455
|
}
|
|
458
456
|
}
|
|
459
457
|
};
|
|
460
458
|
}
|
|
461
459
|
};
|
|
462
460
|
};
|
|
463
|
-
function
|
|
461
|
+
function ot() {
|
|
464
462
|
return typeof window < "u";
|
|
465
463
|
}
|
|
466
|
-
function
|
|
467
|
-
return
|
|
464
|
+
function K(t) {
|
|
465
|
+
return Ft(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
468
466
|
}
|
|
469
467
|
function _(t) {
|
|
470
468
|
var e;
|
|
471
469
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
472
470
|
}
|
|
473
|
-
function
|
|
471
|
+
function S(t) {
|
|
474
472
|
var e;
|
|
475
|
-
return (e = (
|
|
473
|
+
return (e = (Ft(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
476
474
|
}
|
|
477
|
-
function
|
|
478
|
-
return
|
|
475
|
+
function Ft(t) {
|
|
476
|
+
return ot() ? t instanceof Node || t instanceof _(t).Node : !1;
|
|
479
477
|
}
|
|
480
|
-
function
|
|
481
|
-
return
|
|
478
|
+
function A(t) {
|
|
479
|
+
return ot() ? t instanceof Element || t instanceof _(t).Element : !1;
|
|
482
480
|
}
|
|
483
|
-
function
|
|
484
|
-
return
|
|
481
|
+
function P(t) {
|
|
482
|
+
return ot() ? t instanceof HTMLElement || t instanceof _(t).HTMLElement : !1;
|
|
485
483
|
}
|
|
486
|
-
function
|
|
487
|
-
return !
|
|
484
|
+
function Ct(t) {
|
|
485
|
+
return !ot() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof _(t).ShadowRoot;
|
|
488
486
|
}
|
|
489
|
-
|
|
490
|
-
function q(t) {
|
|
487
|
+
function U(t) {
|
|
491
488
|
const {
|
|
492
489
|
overflow: e,
|
|
493
490
|
overflowX: n,
|
|
494
491
|
overflowY: i,
|
|
495
492
|
display: o
|
|
496
|
-
} =
|
|
497
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + i + n) &&
|
|
493
|
+
} = T(t);
|
|
494
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + i + n) && o !== "inline" && o !== "contents";
|
|
498
495
|
}
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
return ae.has(X(t));
|
|
496
|
+
function ae(t) {
|
|
497
|
+
return /^(table|td|th)$/.test(K(t));
|
|
502
498
|
}
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
}
|
|
499
|
+
function st(t) {
|
|
500
|
+
try {
|
|
501
|
+
if (t.matches(":popover-open"))
|
|
502
|
+
return !0;
|
|
503
|
+
} catch {
|
|
504
|
+
}
|
|
505
|
+
try {
|
|
506
|
+
return t.matches(":modal");
|
|
507
|
+
} catch {
|
|
508
|
+
return !1;
|
|
509
|
+
}
|
|
512
510
|
}
|
|
513
|
-
const
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
511
|
+
const fe = /transform|translate|scale|rotate|perspective|filter/, ue = /paint|layout|strict|content/, V = (t) => !!t && t !== "none";
|
|
512
|
+
let ft;
|
|
513
|
+
function gt(t) {
|
|
514
|
+
const e = A(t) ? T(t) : t;
|
|
515
|
+
return V(e.transform) || V(e.translate) || V(e.scale) || V(e.rotate) || V(e.perspective) || !mt() && (V(e.backdropFilter) || V(e.filter)) || fe.test(e.willChange || "") || ue.test(e.contain || "");
|
|
517
516
|
}
|
|
518
|
-
function
|
|
517
|
+
function he(t) {
|
|
519
518
|
let e = D(t);
|
|
520
|
-
for (;
|
|
521
|
-
if (
|
|
519
|
+
for (; P(e) && !X(e); ) {
|
|
520
|
+
if (gt(e))
|
|
522
521
|
return e;
|
|
523
|
-
if (
|
|
522
|
+
if (st(e))
|
|
524
523
|
return null;
|
|
525
524
|
e = D(e);
|
|
526
525
|
}
|
|
527
526
|
return null;
|
|
528
527
|
}
|
|
529
|
-
function
|
|
530
|
-
return typeof CSS
|
|
528
|
+
function mt() {
|
|
529
|
+
return ft == null && (ft = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), ft;
|
|
531
530
|
}
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
return ge.has(X(t));
|
|
531
|
+
function X(t) {
|
|
532
|
+
return /^(html|body|#document)$/.test(K(t));
|
|
535
533
|
}
|
|
536
|
-
function
|
|
534
|
+
function T(t) {
|
|
537
535
|
return _(t).getComputedStyle(t);
|
|
538
536
|
}
|
|
539
|
-
function
|
|
540
|
-
return
|
|
537
|
+
function rt(t) {
|
|
538
|
+
return A(t) ? {
|
|
541
539
|
scrollLeft: t.scrollLeft,
|
|
542
540
|
scrollTop: t.scrollTop
|
|
543
541
|
} : {
|
|
@@ -546,157 +544,157 @@ function st(t) {
|
|
|
546
544
|
};
|
|
547
545
|
}
|
|
548
546
|
function D(t) {
|
|
549
|
-
if (
|
|
547
|
+
if (K(t) === "html")
|
|
550
548
|
return t;
|
|
551
549
|
const e = (
|
|
552
550
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
553
551
|
t.assignedSlot || // DOM Element detected.
|
|
554
552
|
t.parentNode || // ShadowRoot detected.
|
|
555
|
-
|
|
556
|
-
|
|
553
|
+
Ct(t) && t.host || // Fallback.
|
|
554
|
+
S(t)
|
|
557
555
|
);
|
|
558
|
-
return
|
|
556
|
+
return Ct(e) ? e.host : e;
|
|
559
557
|
}
|
|
560
|
-
function
|
|
558
|
+
function Dt(t) {
|
|
561
559
|
const e = D(t);
|
|
562
|
-
return
|
|
560
|
+
return X(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : P(e) && U(e) ? e : Dt(e);
|
|
563
561
|
}
|
|
564
|
-
function
|
|
562
|
+
function q(t, e, n) {
|
|
565
563
|
var i;
|
|
566
564
|
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
567
|
-
const o =
|
|
565
|
+
const o = Dt(t), r = o === ((i = t.ownerDocument) == null ? void 0 : i.body), s = _(o);
|
|
568
566
|
if (r) {
|
|
569
|
-
const
|
|
570
|
-
return e.concat(s, s.visualViewport || [],
|
|
571
|
-
}
|
|
572
|
-
|
|
567
|
+
const c = dt(s);
|
|
568
|
+
return e.concat(s, s.visualViewport || [], U(o) ? o : [], c && n ? q(c) : []);
|
|
569
|
+
} else
|
|
570
|
+
return e.concat(o, q(o, [], n));
|
|
573
571
|
}
|
|
574
|
-
function
|
|
572
|
+
function dt(t) {
|
|
575
573
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
576
574
|
}
|
|
577
|
-
function
|
|
578
|
-
const e =
|
|
575
|
+
function Mt(t) {
|
|
576
|
+
const e = T(t);
|
|
579
577
|
let n = parseFloat(e.width) || 0, i = parseFloat(e.height) || 0;
|
|
580
|
-
const o =
|
|
581
|
-
return
|
|
578
|
+
const o = P(t), r = o ? t.offsetWidth : n, s = o ? t.offsetHeight : i, c = Z(n) !== r || Z(i) !== s;
|
|
579
|
+
return c && (n = r, i = s), {
|
|
582
580
|
width: n,
|
|
583
581
|
height: i,
|
|
584
|
-
$:
|
|
582
|
+
$: c
|
|
585
583
|
};
|
|
586
584
|
}
|
|
587
|
-
function
|
|
588
|
-
return
|
|
585
|
+
function yt(t) {
|
|
586
|
+
return A(t) ? t : t.contextElement;
|
|
589
587
|
}
|
|
590
|
-
function
|
|
591
|
-
const e =
|
|
592
|
-
if (!
|
|
588
|
+
function I(t) {
|
|
589
|
+
const e = yt(t);
|
|
590
|
+
if (!P(e))
|
|
593
591
|
return L(1);
|
|
594
592
|
const n = e.getBoundingClientRect(), {
|
|
595
593
|
width: i,
|
|
596
594
|
height: o,
|
|
597
595
|
$: r
|
|
598
|
-
} =
|
|
599
|
-
let s = (r ?
|
|
600
|
-
return (!s || !Number.isFinite(s)) && (s = 1), (!
|
|
596
|
+
} = Mt(e);
|
|
597
|
+
let s = (r ? Z(n.width) : n.width) / i, c = (r ? Z(n.height) : n.height) / o;
|
|
598
|
+
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
601
599
|
x: s,
|
|
602
|
-
y:
|
|
600
|
+
y: c
|
|
603
601
|
};
|
|
604
602
|
}
|
|
605
|
-
const
|
|
606
|
-
function
|
|
603
|
+
const de = /* @__PURE__ */ L(0);
|
|
604
|
+
function $t(t) {
|
|
607
605
|
const e = _(t);
|
|
608
|
-
return !
|
|
606
|
+
return !mt() || !e.visualViewport ? de : {
|
|
609
607
|
x: e.visualViewport.offsetLeft,
|
|
610
608
|
y: e.visualViewport.offsetTop
|
|
611
609
|
};
|
|
612
610
|
}
|
|
613
|
-
function
|
|
611
|
+
function pe(t, e, n) {
|
|
614
612
|
return e === void 0 && (e = !1), !n || e && n !== _(t) ? !1 : e;
|
|
615
613
|
}
|
|
616
|
-
function
|
|
614
|
+
function B(t, e, n, i) {
|
|
617
615
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
618
|
-
const o = t.getBoundingClientRect(), r =
|
|
616
|
+
const o = t.getBoundingClientRect(), r = yt(t);
|
|
619
617
|
let s = L(1);
|
|
620
|
-
e && (i ?
|
|
621
|
-
const
|
|
622
|
-
let
|
|
618
|
+
e && (i ? A(i) && (s = I(i)) : s = I(t));
|
|
619
|
+
const c = pe(r, n, i) ? $t(r) : L(0);
|
|
620
|
+
let l = (o.left + c.x) / s.x, a = (o.top + c.y) / s.y, h = o.width / s.x, u = o.height / s.y;
|
|
623
621
|
if (r) {
|
|
624
|
-
const d = _(r), f = i &&
|
|
625
|
-
let p = d,
|
|
626
|
-
for (;
|
|
627
|
-
const y =
|
|
628
|
-
|
|
622
|
+
const d = _(r), f = i && A(i) ? _(i) : i;
|
|
623
|
+
let p = d, m = dt(p);
|
|
624
|
+
for (; m && i && f !== p; ) {
|
|
625
|
+
const y = I(m), g = m.getBoundingClientRect(), w = T(m), x = g.left + (m.clientLeft + parseFloat(w.paddingLeft)) * y.x, v = g.top + (m.clientTop + parseFloat(w.paddingTop)) * y.y;
|
|
626
|
+
l *= y.x, a *= y.y, h *= y.x, u *= y.y, l += x, a += v, p = _(m), m = dt(p);
|
|
629
627
|
}
|
|
630
628
|
}
|
|
631
|
-
return
|
|
629
|
+
return et({
|
|
632
630
|
width: h,
|
|
633
631
|
height: u,
|
|
634
|
-
x:
|
|
632
|
+
x: l,
|
|
635
633
|
y: a
|
|
636
634
|
});
|
|
637
635
|
}
|
|
638
|
-
function
|
|
639
|
-
const n =
|
|
640
|
-
return e ? e.left + n :
|
|
636
|
+
function ct(t, e) {
|
|
637
|
+
const n = rt(t).scrollLeft;
|
|
638
|
+
return e ? e.left + n : B(S(t)).left + n;
|
|
641
639
|
}
|
|
642
|
-
function
|
|
643
|
-
const n = t.getBoundingClientRect(), i = n.left + e.scrollLeft -
|
|
640
|
+
function Vt(t, e) {
|
|
641
|
+
const n = t.getBoundingClientRect(), i = n.left + e.scrollLeft - ct(t, n), o = n.top + e.scrollTop;
|
|
644
642
|
return {
|
|
645
643
|
x: i,
|
|
646
644
|
y: o
|
|
647
645
|
};
|
|
648
646
|
}
|
|
649
|
-
function
|
|
647
|
+
function ge(t) {
|
|
650
648
|
let {
|
|
651
649
|
elements: e,
|
|
652
650
|
rect: n,
|
|
653
651
|
offsetParent: i,
|
|
654
652
|
strategy: o
|
|
655
653
|
} = t;
|
|
656
|
-
const r = o === "fixed", s =
|
|
657
|
-
if (i === s ||
|
|
654
|
+
const r = o === "fixed", s = S(i), c = e ? st(e.floating) : !1;
|
|
655
|
+
if (i === s || c && r)
|
|
658
656
|
return n;
|
|
659
|
-
let
|
|
657
|
+
let l = {
|
|
660
658
|
scrollLeft: 0,
|
|
661
659
|
scrollTop: 0
|
|
662
660
|
}, a = L(1);
|
|
663
|
-
const h = L(0), u =
|
|
664
|
-
if ((u || !u && !r) && ((
|
|
665
|
-
const f =
|
|
666
|
-
a =
|
|
661
|
+
const h = L(0), u = P(i);
|
|
662
|
+
if ((u || !u && !r) && ((K(i) !== "body" || U(s)) && (l = rt(i)), u)) {
|
|
663
|
+
const f = B(i);
|
|
664
|
+
a = I(i), h.x = f.x + i.clientLeft, h.y = f.y + i.clientTop;
|
|
667
665
|
}
|
|
668
|
-
const d = s && !u && !r ?
|
|
666
|
+
const d = s && !u && !r ? Vt(s, l) : L(0);
|
|
669
667
|
return {
|
|
670
668
|
width: n.width * a.x,
|
|
671
669
|
height: n.height * a.y,
|
|
672
|
-
x: n.x * a.x -
|
|
673
|
-
y: n.y * a.y -
|
|
670
|
+
x: n.x * a.x - l.scrollLeft * a.x + h.x + d.x,
|
|
671
|
+
y: n.y * a.y - l.scrollTop * a.y + h.y + d.y
|
|
674
672
|
};
|
|
675
673
|
}
|
|
676
|
-
function
|
|
674
|
+
function me(t) {
|
|
677
675
|
return Array.from(t.getClientRects());
|
|
678
676
|
}
|
|
679
|
-
function
|
|
680
|
-
const e =
|
|
681
|
-
let s = -n.scrollLeft +
|
|
682
|
-
const
|
|
683
|
-
return
|
|
677
|
+
function ye(t) {
|
|
678
|
+
const e = S(t), n = rt(t), i = t.ownerDocument.body, o = W(e.scrollWidth, e.clientWidth, i.scrollWidth, i.clientWidth), r = W(e.scrollHeight, e.clientHeight, i.scrollHeight, i.clientHeight);
|
|
679
|
+
let s = -n.scrollLeft + ct(t);
|
|
680
|
+
const c = -n.scrollTop;
|
|
681
|
+
return T(i).direction === "rtl" && (s += W(e.clientWidth, i.clientWidth) - o), {
|
|
684
682
|
width: o,
|
|
685
683
|
height: r,
|
|
686
684
|
x: s,
|
|
687
|
-
y:
|
|
685
|
+
y: c
|
|
688
686
|
};
|
|
689
687
|
}
|
|
690
688
|
const At = 25;
|
|
691
|
-
function
|
|
692
|
-
const n = _(t), i =
|
|
693
|
-
let r = i.clientWidth, s = i.clientHeight,
|
|
689
|
+
function we(t, e) {
|
|
690
|
+
const n = _(t), i = S(t), o = n.visualViewport;
|
|
691
|
+
let r = i.clientWidth, s = i.clientHeight, c = 0, l = 0;
|
|
694
692
|
if (o) {
|
|
695
693
|
r = o.width, s = o.height;
|
|
696
|
-
const h =
|
|
697
|
-
(!h || h && e === "fixed") && (
|
|
694
|
+
const h = mt();
|
|
695
|
+
(!h || h && e === "fixed") && (c = o.offsetLeft, l = o.offsetTop);
|
|
698
696
|
}
|
|
699
|
-
const a =
|
|
697
|
+
const a = ct(i);
|
|
700
698
|
if (a <= 0) {
|
|
701
699
|
const h = i.ownerDocument, u = h.body, d = getComputedStyle(u), f = h.compatMode === "CSS1Compat" && parseFloat(d.marginLeft) + parseFloat(d.marginRight) || 0, p = Math.abs(i.clientWidth - u.clientWidth - f);
|
|
702
700
|
p <= At && (r -= p);
|
|
@@ -704,30 +702,29 @@ function _e(t, e) {
|
|
|
704
702
|
return {
|
|
705
703
|
width: r,
|
|
706
704
|
height: s,
|
|
707
|
-
x:
|
|
708
|
-
y:
|
|
705
|
+
x: c,
|
|
706
|
+
y: l
|
|
709
707
|
};
|
|
710
708
|
}
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
const n = N(t, !0, e === "fixed"), i = n.top + t.clientTop, o = n.left + t.clientLeft, r = E(t) ? H(t) : L(1), s = t.clientWidth * r.x, l = t.clientHeight * r.y, c = o * r.x, a = i * r.y;
|
|
709
|
+
function xe(t, e) {
|
|
710
|
+
const n = B(t, !0, e === "fixed"), i = n.top + t.clientTop, o = n.left + t.clientLeft, r = P(t) ? I(t) : L(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, l = o * r.x, a = i * r.y;
|
|
714
711
|
return {
|
|
715
712
|
width: s,
|
|
716
|
-
height:
|
|
717
|
-
x:
|
|
713
|
+
height: c,
|
|
714
|
+
x: l,
|
|
718
715
|
y: a
|
|
719
716
|
};
|
|
720
717
|
}
|
|
721
|
-
function
|
|
718
|
+
function Tt(t, e, n) {
|
|
722
719
|
let i;
|
|
723
720
|
if (e === "viewport")
|
|
724
|
-
i =
|
|
721
|
+
i = we(t, n);
|
|
725
722
|
else if (e === "document")
|
|
726
|
-
i =
|
|
727
|
-
else if (
|
|
728
|
-
i =
|
|
723
|
+
i = ye(S(t));
|
|
724
|
+
else if (A(e))
|
|
725
|
+
i = xe(e, n);
|
|
729
726
|
else {
|
|
730
|
-
const o =
|
|
727
|
+
const o = $t(t);
|
|
731
728
|
i = {
|
|
732
729
|
x: e.x - o.x,
|
|
733
730
|
y: e.y - o.y,
|
|
@@ -735,70 +732,72 @@ function Ct(t, e, n) {
|
|
|
735
732
|
height: e.height
|
|
736
733
|
};
|
|
737
734
|
}
|
|
738
|
-
return
|
|
735
|
+
return et(i);
|
|
739
736
|
}
|
|
740
|
-
function
|
|
737
|
+
function Wt(t, e) {
|
|
741
738
|
const n = D(t);
|
|
742
|
-
return n === e || !
|
|
739
|
+
return n === e || !A(n) || X(n) ? !1 : T(n).position === "fixed" || Wt(n, e);
|
|
743
740
|
}
|
|
744
|
-
function
|
|
741
|
+
function ve(t, e) {
|
|
745
742
|
const n = e.get(t);
|
|
746
743
|
if (n)
|
|
747
744
|
return n;
|
|
748
|
-
let i =
|
|
749
|
-
const r =
|
|
745
|
+
let i = q(t, [], !1).filter((c) => A(c) && K(c) !== "body"), o = null;
|
|
746
|
+
const r = T(t).position === "fixed";
|
|
750
747
|
let s = r ? D(t) : t;
|
|
751
|
-
for (;
|
|
752
|
-
const
|
|
753
|
-
!
|
|
748
|
+
for (; A(s) && !X(s); ) {
|
|
749
|
+
const c = T(s), l = gt(s);
|
|
750
|
+
!l && c.position === "fixed" && (o = null), (r ? !l && !o : !l && c.position === "static" && !!o && (o.position === "absolute" || o.position === "fixed") || U(s) && !l && Wt(t, s)) ? i = i.filter((h) => h !== s) : o = c, s = D(s);
|
|
754
751
|
}
|
|
755
752
|
return e.set(t, i), i;
|
|
756
753
|
}
|
|
757
|
-
function
|
|
754
|
+
function be(t) {
|
|
758
755
|
let {
|
|
759
756
|
element: e,
|
|
760
757
|
boundary: n,
|
|
761
758
|
rootBoundary: i,
|
|
762
759
|
strategy: o
|
|
763
760
|
} = t;
|
|
764
|
-
const s = [...n === "clippingAncestors" ?
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
761
|
+
const s = [...n === "clippingAncestors" ? st(e) ? [] : ve(e, this._c) : [].concat(n), i], c = Tt(e, s[0], o);
|
|
762
|
+
let l = c.top, a = c.right, h = c.bottom, u = c.left;
|
|
763
|
+
for (let d = 1; d < s.length; d++) {
|
|
764
|
+
const f = Tt(e, s[d], o);
|
|
765
|
+
l = W(f.top, l), a = Q(f.right, a), h = Q(f.bottom, h), u = W(f.left, u);
|
|
766
|
+
}
|
|
768
767
|
return {
|
|
769
|
-
width:
|
|
770
|
-
height:
|
|
771
|
-
x:
|
|
772
|
-
y:
|
|
768
|
+
width: a - u,
|
|
769
|
+
height: h - l,
|
|
770
|
+
x: u,
|
|
771
|
+
y: l
|
|
773
772
|
};
|
|
774
773
|
}
|
|
775
|
-
function
|
|
774
|
+
function _e(t) {
|
|
776
775
|
const {
|
|
777
776
|
width: e,
|
|
778
777
|
height: n
|
|
779
|
-
} =
|
|
778
|
+
} = Mt(t);
|
|
780
779
|
return {
|
|
781
780
|
width: e,
|
|
782
781
|
height: n
|
|
783
782
|
};
|
|
784
783
|
}
|
|
785
|
-
function
|
|
786
|
-
const i =
|
|
787
|
-
let
|
|
784
|
+
function Re(t, e, n) {
|
|
785
|
+
const i = P(e), o = S(e), r = n === "fixed", s = B(t, !0, r, e);
|
|
786
|
+
let c = {
|
|
788
787
|
scrollLeft: 0,
|
|
789
788
|
scrollTop: 0
|
|
790
789
|
};
|
|
791
|
-
const
|
|
790
|
+
const l = L(0);
|
|
792
791
|
function a() {
|
|
793
|
-
|
|
792
|
+
l.x = ct(o);
|
|
794
793
|
}
|
|
795
794
|
if (i || !i && !r)
|
|
796
|
-
if ((
|
|
797
|
-
const f =
|
|
798
|
-
|
|
795
|
+
if ((K(e) !== "body" || U(o)) && (c = rt(e)), i) {
|
|
796
|
+
const f = B(e, !0, r, e);
|
|
797
|
+
l.x = f.x + e.clientLeft, l.y = f.y + e.clientTop;
|
|
799
798
|
} else o && a();
|
|
800
799
|
r && !i && o && a();
|
|
801
|
-
const h = o && !i && !r ?
|
|
800
|
+
const h = o && !i && !r ? Vt(o, c) : L(0), u = s.left + c.scrollLeft - l.x - h.x, d = s.top + c.scrollTop - l.y - h.y;
|
|
802
801
|
return {
|
|
803
802
|
x: u,
|
|
804
803
|
y: d,
|
|
@@ -806,39 +805,39 @@ function Te(t, e, n) {
|
|
|
806
805
|
height: s.height
|
|
807
806
|
};
|
|
808
807
|
}
|
|
809
|
-
function
|
|
810
|
-
return
|
|
808
|
+
function ut(t) {
|
|
809
|
+
return T(t).position === "static";
|
|
811
810
|
}
|
|
812
|
-
function
|
|
813
|
-
if (!
|
|
811
|
+
function Et(t, e) {
|
|
812
|
+
if (!P(t) || T(t).position === "fixed")
|
|
814
813
|
return null;
|
|
815
814
|
if (e)
|
|
816
815
|
return e(t);
|
|
817
816
|
let n = t.offsetParent;
|
|
818
|
-
return
|
|
817
|
+
return S(t) === n && (n = n.ownerDocument.body), n;
|
|
819
818
|
}
|
|
820
|
-
function
|
|
819
|
+
function Nt(t, e) {
|
|
821
820
|
const n = _(t);
|
|
822
|
-
if (
|
|
821
|
+
if (st(t))
|
|
823
822
|
return n;
|
|
824
|
-
if (!
|
|
823
|
+
if (!P(t)) {
|
|
825
824
|
let o = D(t);
|
|
826
|
-
for (; o && !
|
|
827
|
-
if (
|
|
825
|
+
for (; o && !X(o); ) {
|
|
826
|
+
if (A(o) && !ut(o))
|
|
828
827
|
return o;
|
|
829
828
|
o = D(o);
|
|
830
829
|
}
|
|
831
830
|
return n;
|
|
832
831
|
}
|
|
833
|
-
let i =
|
|
834
|
-
for (; i &&
|
|
835
|
-
i =
|
|
836
|
-
return i &&
|
|
832
|
+
let i = Et(t, e);
|
|
833
|
+
for (; i && ae(i) && ut(i); )
|
|
834
|
+
i = Et(i, e);
|
|
835
|
+
return i && X(i) && ut(i) && !gt(i) ? n : i || he(t) || n;
|
|
837
836
|
}
|
|
838
|
-
const
|
|
839
|
-
const e = this.getOffsetParent ||
|
|
837
|
+
const Oe = async function(t) {
|
|
838
|
+
const e = this.getOffsetParent || Nt, n = this.getDimensions, i = await n(t.floating);
|
|
840
839
|
return {
|
|
841
|
-
reference:
|
|
840
|
+
reference: Re(t.reference, await e(t.floating), t.strategy),
|
|
842
841
|
floating: {
|
|
843
842
|
x: 0,
|
|
844
843
|
y: 0,
|
|
@@ -847,109 +846,109 @@ const Le = async function(t) {
|
|
|
847
846
|
}
|
|
848
847
|
};
|
|
849
848
|
};
|
|
850
|
-
function
|
|
851
|
-
return
|
|
852
|
-
}
|
|
853
|
-
const
|
|
854
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
855
|
-
getDocumentElement:
|
|
856
|
-
getClippingRect:
|
|
857
|
-
getOffsetParent:
|
|
858
|
-
getElementRects:
|
|
859
|
-
getClientRects:
|
|
860
|
-
getDimensions:
|
|
861
|
-
getScale:
|
|
862
|
-
isElement:
|
|
863
|
-
isRTL:
|
|
849
|
+
function Ce(t) {
|
|
850
|
+
return T(t).direction === "rtl";
|
|
851
|
+
}
|
|
852
|
+
const Ae = {
|
|
853
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: ge,
|
|
854
|
+
getDocumentElement: S,
|
|
855
|
+
getClippingRect: be,
|
|
856
|
+
getOffsetParent: Nt,
|
|
857
|
+
getElementRects: Oe,
|
|
858
|
+
getClientRects: me,
|
|
859
|
+
getDimensions: _e,
|
|
860
|
+
getScale: I,
|
|
861
|
+
isElement: A,
|
|
862
|
+
isRTL: Ce
|
|
864
863
|
};
|
|
865
|
-
function
|
|
864
|
+
function Bt(t, e) {
|
|
866
865
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
867
866
|
}
|
|
868
|
-
function
|
|
867
|
+
function Te(t, e) {
|
|
869
868
|
let n = null, i;
|
|
870
|
-
const o =
|
|
869
|
+
const o = S(t);
|
|
871
870
|
function r() {
|
|
872
|
-
var
|
|
873
|
-
clearTimeout(i), (
|
|
871
|
+
var c;
|
|
872
|
+
clearTimeout(i), (c = n) == null || c.disconnect(), n = null;
|
|
874
873
|
}
|
|
875
|
-
function s(
|
|
876
|
-
|
|
874
|
+
function s(c, l) {
|
|
875
|
+
c === void 0 && (c = !1), l === void 0 && (l = 1), r();
|
|
877
876
|
const a = t.getBoundingClientRect(), {
|
|
878
877
|
left: h,
|
|
879
878
|
top: u,
|
|
880
879
|
width: d,
|
|
881
880
|
height: f
|
|
882
881
|
} = a;
|
|
883
|
-
if (
|
|
882
|
+
if (c || e(), !d || !f)
|
|
884
883
|
return;
|
|
885
|
-
const p =
|
|
886
|
-
rootMargin: -p + "px " + -
|
|
887
|
-
threshold:
|
|
884
|
+
const p = J(u), m = J(o.clientWidth - (h + d)), y = J(o.clientHeight - (u + f)), g = J(h), x = {
|
|
885
|
+
rootMargin: -p + "px " + -m + "px " + -y + "px " + -g + "px",
|
|
886
|
+
threshold: W(0, Q(1, l)) || 1
|
|
888
887
|
};
|
|
889
888
|
let v = !0;
|
|
890
|
-
function
|
|
891
|
-
const
|
|
892
|
-
if (
|
|
889
|
+
function O(b) {
|
|
890
|
+
const z = b[0].intersectionRatio;
|
|
891
|
+
if (z !== l) {
|
|
893
892
|
if (!v)
|
|
894
893
|
return s();
|
|
895
|
-
|
|
894
|
+
z ? s(!1, z) : i = setTimeout(() => {
|
|
896
895
|
s(!1, 1e-7);
|
|
897
896
|
}, 1e3);
|
|
898
897
|
}
|
|
899
|
-
|
|
898
|
+
z === 1 && !Bt(a, t.getBoundingClientRect()) && s(), v = !1;
|
|
900
899
|
}
|
|
901
900
|
try {
|
|
902
|
-
n = new IntersectionObserver(
|
|
901
|
+
n = new IntersectionObserver(O, {
|
|
903
902
|
...x,
|
|
904
903
|
// Handle <iframe>s
|
|
905
904
|
root: o.ownerDocument
|
|
906
905
|
});
|
|
907
906
|
} catch {
|
|
908
|
-
n = new IntersectionObserver(
|
|
907
|
+
n = new IntersectionObserver(O, x);
|
|
909
908
|
}
|
|
910
909
|
n.observe(t);
|
|
911
910
|
}
|
|
912
911
|
return s(!0), r;
|
|
913
912
|
}
|
|
914
|
-
function
|
|
913
|
+
function Ee(t, e, n, i) {
|
|
915
914
|
i === void 0 && (i = {});
|
|
916
915
|
const {
|
|
917
916
|
ancestorScroll: o = !0,
|
|
918
917
|
ancestorResize: r = !0,
|
|
919
918
|
elementResize: s = typeof ResizeObserver == "function",
|
|
920
|
-
layoutShift:
|
|
921
|
-
animationFrame:
|
|
922
|
-
} = i, a =
|
|
923
|
-
h.forEach((
|
|
924
|
-
o &&
|
|
919
|
+
layoutShift: c = typeof IntersectionObserver == "function",
|
|
920
|
+
animationFrame: l = !1
|
|
921
|
+
} = i, a = yt(t), h = o || r ? [...a ? q(a) : [], ...e ? q(e) : []] : [];
|
|
922
|
+
h.forEach((g) => {
|
|
923
|
+
o && g.addEventListener("scroll", n, {
|
|
925
924
|
passive: !0
|
|
926
|
-
}), r &&
|
|
925
|
+
}), r && g.addEventListener("resize", n);
|
|
927
926
|
});
|
|
928
|
-
const u = a &&
|
|
927
|
+
const u = a && c ? Te(a, n) : null;
|
|
929
928
|
let d = -1, f = null;
|
|
930
|
-
s && (f = new ResizeObserver((
|
|
931
|
-
let [w] =
|
|
932
|
-
w && w.target === a && f && (f.unobserve(e), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
929
|
+
s && (f = new ResizeObserver((g) => {
|
|
930
|
+
let [w] = g;
|
|
931
|
+
w && w.target === a && f && e && (f.unobserve(e), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
933
932
|
var x;
|
|
934
933
|
(x = f) == null || x.observe(e);
|
|
935
934
|
})), n();
|
|
936
|
-
}), a && !
|
|
937
|
-
let p,
|
|
938
|
-
|
|
935
|
+
}), a && !l && f.observe(a), e && f.observe(e));
|
|
936
|
+
let p, m = l ? B(t) : null;
|
|
937
|
+
l && y();
|
|
939
938
|
function y() {
|
|
940
|
-
const
|
|
941
|
-
|
|
939
|
+
const g = B(t);
|
|
940
|
+
m && !Bt(m, g) && n(), m = g, p = requestAnimationFrame(y);
|
|
942
941
|
}
|
|
943
942
|
return n(), () => {
|
|
944
|
-
var
|
|
943
|
+
var g;
|
|
945
944
|
h.forEach((w) => {
|
|
946
945
|
o && w.removeEventListener("scroll", n), r && w.removeEventListener("resize", n);
|
|
947
|
-
}), u == null || u(), (
|
|
946
|
+
}), u == null || u(), (g = f) == null || g.disconnect(), f = null, l && cancelAnimationFrame(p);
|
|
948
947
|
};
|
|
949
948
|
}
|
|
950
|
-
const
|
|
949
|
+
const Le = ce, Se = le, Pe = oe, ke = (t, e, n) => {
|
|
951
950
|
const i = /* @__PURE__ */ new Map(), o = {
|
|
952
|
-
platform:
|
|
951
|
+
platform: Ae,
|
|
953
952
|
...n
|
|
954
953
|
}, r = {
|
|
955
954
|
...o.platform,
|
|
@@ -960,13 +959,13 @@ const De = re, Me = le, Ve = ie, $e = (t, e, n) => {
|
|
|
960
959
|
platform: r
|
|
961
960
|
});
|
|
962
961
|
};
|
|
963
|
-
var
|
|
964
|
-
for (var o = i > 1 ? void 0 : i ?
|
|
962
|
+
var Fe = Object.defineProperty, De = Object.getOwnPropertyDescriptor, E = (t, e, n, i) => {
|
|
963
|
+
for (var o = i > 1 ? void 0 : i ? De(e, n) : e, r = t.length - 1, s; r >= 0; r--)
|
|
965
964
|
(s = t[r]) && (o = (i ? s(e, n, o) : s(o)) || o);
|
|
966
|
-
return i && o &&
|
|
965
|
+
return i && o && Fe(e, n, o), o;
|
|
967
966
|
};
|
|
968
|
-
const
|
|
969
|
-
let
|
|
967
|
+
const Me = "fhi-tooltip";
|
|
968
|
+
let R = class extends It {
|
|
970
969
|
constructor() {
|
|
971
970
|
super(...arguments), this.message = "", this.placement = "top", this.delay = 500, this.trigger = "hover", this.maxWidth = "18.75rem", this._timeoutId = void 0, this._autoPositioningCleanup = () => {
|
|
972
971
|
}, this._isVisible = !1, this._isFadingOut = !1, this._position = {
|
|
@@ -978,6 +977,9 @@ let O = class extends zt {
|
|
|
978
977
|
t.key === "Escape" && this._isVisible && this._hideTooltip();
|
|
979
978
|
};
|
|
980
979
|
}
|
|
980
|
+
update(t) {
|
|
981
|
+
t.has("trigger") && this.trigger !== "click" && this.trigger !== "hover" && (this.trigger = "hover"), super.update(t);
|
|
982
|
+
}
|
|
981
983
|
_showTooltip() {
|
|
982
984
|
this._isVisible || this.message && (this._positionTooltip(this.placement), this._isVisible = !0, window.addEventListener("click", this._handlePotentialClickOutside), window.addEventListener("keydown", this.__handlePotentialEscapeKeyPress));
|
|
983
985
|
}
|
|
@@ -990,17 +992,17 @@ let O = class extends zt {
|
|
|
990
992
|
}, 150));
|
|
991
993
|
}
|
|
992
994
|
_positionTooltip(t) {
|
|
993
|
-
this._autoPositioningCleanup =
|
|
995
|
+
this._autoPositioningCleanup = Ee(
|
|
994
996
|
this._anchor,
|
|
995
997
|
this._tooltip,
|
|
996
998
|
() => {
|
|
997
|
-
|
|
998
|
-
placement: t,
|
|
999
|
+
ke(this._anchor, this._tooltip, {
|
|
1000
|
+
placement: t || "top",
|
|
999
1001
|
strategy: "fixed",
|
|
1000
1002
|
middleware: [
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1003
|
+
Pe({ fallbackAxisSideDirection: "start" }),
|
|
1004
|
+
Se(),
|
|
1005
|
+
Le(4)
|
|
1004
1006
|
]
|
|
1005
1007
|
}).then(({ x: e, y: n }) => {
|
|
1006
1008
|
this._position = {
|
|
@@ -1023,7 +1025,7 @@ let O = class extends zt {
|
|
|
1023
1025
|
this.trigger === "click" && (this._isVisible ? this._hideTooltip() : this._showTooltip());
|
|
1024
1026
|
}
|
|
1025
1027
|
render() {
|
|
1026
|
-
return
|
|
1028
|
+
return Xt`
|
|
1027
1029
|
<div
|
|
1028
1030
|
id="tooltip-anchor"
|
|
1029
1031
|
@mouseenter=${this._handleMouseEnter}
|
|
@@ -1052,7 +1054,7 @@ let O = class extends zt {
|
|
|
1052
1054
|
`;
|
|
1053
1055
|
}
|
|
1054
1056
|
};
|
|
1055
|
-
|
|
1057
|
+
R.styles = Ht`
|
|
1056
1058
|
:host {
|
|
1057
1059
|
--color-background: var(--fhi-color-neutral-base-active);
|
|
1058
1060
|
--color-text: var(--fhi-color-neutral-text-inverted);
|
|
@@ -1120,41 +1122,41 @@ O.styles = Bt`
|
|
|
1120
1122
|
}
|
|
1121
1123
|
}
|
|
1122
1124
|
`;
|
|
1123
|
-
|
|
1125
|
+
E([
|
|
1124
1126
|
j({ type: String })
|
|
1125
|
-
],
|
|
1126
|
-
|
|
1127
|
+
], R.prototype, "message", 2);
|
|
1128
|
+
E([
|
|
1127
1129
|
j({ type: String })
|
|
1128
|
-
],
|
|
1129
|
-
|
|
1130
|
+
], R.prototype, "placement", 2);
|
|
1131
|
+
E([
|
|
1130
1132
|
j({ type: Number })
|
|
1131
|
-
],
|
|
1132
|
-
|
|
1133
|
+
], R.prototype, "delay", 2);
|
|
1134
|
+
E([
|
|
1133
1135
|
j({ type: String })
|
|
1134
|
-
],
|
|
1135
|
-
|
|
1136
|
+
], R.prototype, "trigger", 2);
|
|
1137
|
+
E([
|
|
1136
1138
|
j({ type: String, attribute: "max-width" })
|
|
1137
|
-
],
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
],
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
],
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
],
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
],
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
],
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
],
|
|
1139
|
+
], R.prototype, "maxWidth", 2);
|
|
1140
|
+
E([
|
|
1141
|
+
Lt("#tooltip-anchor")
|
|
1142
|
+
], R.prototype, "_anchor", 2);
|
|
1143
|
+
E([
|
|
1144
|
+
Lt("#tooltip")
|
|
1145
|
+
], R.prototype, "_tooltip", 2);
|
|
1146
|
+
E([
|
|
1147
|
+
pt()
|
|
1148
|
+
], R.prototype, "_isVisible", 2);
|
|
1149
|
+
E([
|
|
1150
|
+
pt()
|
|
1151
|
+
], R.prototype, "_isFadingOut", 2);
|
|
1152
|
+
E([
|
|
1153
|
+
pt()
|
|
1154
|
+
], R.prototype, "_position", 2);
|
|
1155
|
+
R = E([
|
|
1156
|
+
jt(Me)
|
|
1157
|
+
], R);
|
|
1156
1158
|
export {
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
+
R as FhiTooltip,
|
|
1160
|
+
Me as FhiTooltipSelector
|
|
1159
1161
|
};
|
|
1160
1162
|
//# sourceMappingURL=fhi-tooltip.js.map
|