@tempots/ui 0.12.0 → 0.13.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/index.cjs +1 -1
- package/index.js +955 -953
- package/package.json +2 -2
- package/renderables/anchor.d.ts +10 -1
- package/renderables/appearance.d.ts +5 -1
- package/renderables/async-result-view.d.ts +44 -3
- package/renderables/autofocus.d.ts +7 -0
- package/renderables/autoselect.d.ts +6 -0
- package/renderables/hidden-when-empty.d.ts +7 -0
- package/renderables/html-title.d.ts +8 -1
- package/renderables/inviewport.d.ts +27 -1
- package/renderables/pop-over.d.ts +47 -9
- package/renderables/result-view.d.ts +31 -3
- package/renderables/router/location.d.ts +83 -13
- package/renderables/router/match.d.ts +35 -3
- package/renderables/router/route-info.d.ts +92 -7
- package/renderables/router/router.d.ts +9 -3
- package/renderables/select-on-focus.d.ts +7 -1
- package/renderables/size.d.ts +15 -4
package/index.js
CHANGED
|
@@ -1,196 +1,245 @@
|
|
|
1
|
-
var
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var _e = Object.defineProperty, Ae = (t, e, n) => e in t ? _e(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, h = (t, e, n) => Ae(t, typeof e != "symbol" ? e + "" : e, n);
|
|
2
|
+
const E = class {
|
|
3
|
+
/**
|
|
4
|
+
* Represents a signal with a value of type T.
|
|
5
|
+
*
|
|
6
|
+
* @param value - The initial value of the signal.
|
|
7
|
+
* @param equals - A function that determines whether two values of type T are equal.
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
6
10
|
constructor(e, n) {
|
|
7
|
-
|
|
8
|
-
this._onValueListeners.splice(this._onValueListeners.indexOf(
|
|
9
|
-
})),
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
}),
|
|
13
|
-
this._onDisposeListeners.push(
|
|
14
|
-
}),
|
|
15
|
-
this._disposed || (this._disposed = !0, this._onDisposeListeners.forEach((
|
|
16
|
-
}),
|
|
17
|
-
const
|
|
11
|
+
h(this, "$__signal__", !0), h(this, "_value"), h(this, "_derivatives", []), h(this, "_onValueListeners", []), h(this, "_onDisposeListeners", []), h(this, "get", () => this._value), h(this, "hasListeners", () => this._onValueListeners.length > 0), h(this, "on", (s) => (s(this.get()), this._onValueListeners.push(s), () => {
|
|
12
|
+
this._onValueListeners.splice(this._onValueListeners.indexOf(s), 1);
|
|
13
|
+
})), h(this, "_setAndNotify", (s, o) => {
|
|
14
|
+
const i = this.equals(this._value, s);
|
|
15
|
+
i || (this._value = s), (o || !i) && this._onValueListeners.forEach((r) => r(s));
|
|
16
|
+
}), h(this, "_disposed", !1), h(this, "isDisposed", () => this._disposed), h(this, "onDispose", (s) => {
|
|
17
|
+
this._onDisposeListeners.push(s);
|
|
18
|
+
}), h(this, "dispose", () => {
|
|
19
|
+
this._disposed || (this._disposed = !0, this._onDisposeListeners.forEach((s) => s()), this._onDisposeListeners.length = 0, this._derivatives.length = 0);
|
|
20
|
+
}), h(this, "map", (s, o = (i, r) => i === r) => {
|
|
21
|
+
const i = new rt(() => {
|
|
18
22
|
try {
|
|
19
|
-
return
|
|
23
|
+
return s(this.get());
|
|
20
24
|
} catch (r) {
|
|
21
25
|
throw console.error("Error in Signal.map:", r), r;
|
|
22
26
|
}
|
|
23
27
|
}, o);
|
|
24
|
-
return this.setDerivative(
|
|
25
|
-
}),
|
|
26
|
-
const
|
|
28
|
+
return this.setDerivative(i), i;
|
|
29
|
+
}), h(this, "flatMap", (s, o = (i, r) => i === r) => {
|
|
30
|
+
const i = new rt(() => {
|
|
27
31
|
try {
|
|
28
|
-
return
|
|
32
|
+
return s(this.get()).get();
|
|
29
33
|
} catch (r) {
|
|
30
34
|
throw console.error("Error in Signal.flatMap:", r), r;
|
|
31
35
|
}
|
|
32
36
|
}, o);
|
|
33
|
-
return this.setDerivative(
|
|
34
|
-
}),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
return this.setDerivative(i), i;
|
|
38
|
+
}), h(this, "tap", (s) => this.map((o) => (s(o), o))), h(this, "at", (s) => this.map((o) => o[s])), h(this, "$", new Proxy(this, {
|
|
39
|
+
/**
|
|
40
|
+
* Retrieves the signal with the specified key.
|
|
41
|
+
* @param _ - The target object.
|
|
42
|
+
* @param key - The key of the signal.
|
|
43
|
+
* @returns The signal associated with the key.
|
|
44
|
+
*/
|
|
45
|
+
get: (s, o) => this.at(o)
|
|
46
|
+
})), h(this, "filter", (s, o) => {
|
|
47
|
+
let i = o ?? this.get();
|
|
48
|
+
const r = new rt(() => {
|
|
39
49
|
try {
|
|
40
50
|
const c = this.get();
|
|
41
|
-
return
|
|
51
|
+
return i = s(c) ? c : i;
|
|
42
52
|
} catch (c) {
|
|
43
53
|
throw console.error("Error in Signal.filter:", c), c;
|
|
44
54
|
}
|
|
45
55
|
}, this.equals);
|
|
46
56
|
return this.setDerivative(r), r;
|
|
47
|
-
}),
|
|
57
|
+
}), h(this, "filterMap", (s, o, i = (r, c) => r === c) => {
|
|
48
58
|
let r = o;
|
|
49
|
-
const c = new
|
|
59
|
+
const c = new rt(() => {
|
|
50
60
|
try {
|
|
51
61
|
const l = this.get();
|
|
52
|
-
return r =
|
|
62
|
+
return r = s(l) ?? r;
|
|
53
63
|
} catch (l) {
|
|
54
64
|
throw console.error("Error in Signal.filterMap:", l), l;
|
|
55
65
|
}
|
|
56
|
-
},
|
|
66
|
+
}, i);
|
|
57
67
|
return this.setDerivative(c), c;
|
|
58
|
-
}),
|
|
59
|
-
const c =
|
|
60
|
-
let l = 0;
|
|
68
|
+
}), h(this, "mapAsync", (s, o, i, r = (c, l) => c === l) => {
|
|
69
|
+
const c = D(o, r);
|
|
70
|
+
let l = 0, a = new AbortController();
|
|
61
71
|
return c.onDispose(
|
|
62
|
-
this.on((
|
|
63
|
-
const
|
|
72
|
+
this.on(async (f) => {
|
|
73
|
+
const u = ++l;
|
|
74
|
+
a.abort(), a = new AbortController();
|
|
64
75
|
try {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
} catch (u) {
|
|
74
|
-
throw console.error("Error in Signal.mapAsync:", u), u;
|
|
76
|
+
const p = await s(f, { abortSignal: a.signal });
|
|
77
|
+
u === l && c.set(p);
|
|
78
|
+
} catch (p) {
|
|
79
|
+
if (u === l)
|
|
80
|
+
if (i != null)
|
|
81
|
+
c.set(i(p));
|
|
82
|
+
else
|
|
83
|
+
throw p;
|
|
75
84
|
}
|
|
76
85
|
})
|
|
77
86
|
), c;
|
|
78
|
-
}),
|
|
79
|
-
const
|
|
80
|
-
return
|
|
81
|
-
}),
|
|
82
|
-
let
|
|
83
|
-
return this.map(() => ++
|
|
84
|
-
}),
|
|
85
|
-
this._derivatives.push(
|
|
87
|
+
}), h(this, "mapMaybe", (s, o) => this.map((i) => s(i) ?? o)), h(this, "feedProp", (s, o = !1) => {
|
|
88
|
+
const i = this.on(s.set);
|
|
89
|
+
return s.onDispose(i), o ? this.onDispose(s.dispose) : this.onDispose(i), s;
|
|
90
|
+
}), h(this, "deriveProp", (s = !0) => this.feedProp(D(this.get()), s)), h(this, "count", () => {
|
|
91
|
+
let s = 0;
|
|
92
|
+
return this.map(() => ++s);
|
|
93
|
+
}), h(this, "setDerivative", (s) => {
|
|
94
|
+
this._derivatives.push(s), s.onDispose(() => {
|
|
86
95
|
this._derivatives.splice(
|
|
87
|
-
this._derivatives.indexOf(
|
|
96
|
+
this._derivatives.indexOf(s),
|
|
88
97
|
1
|
|
89
98
|
);
|
|
90
|
-
}),
|
|
99
|
+
}), s.onDispose(this.on(s.setDirty)), this.onDispose(s.dispose);
|
|
91
100
|
}), this.equals = n, this._value = e;
|
|
92
101
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"Unhandled promise rejection in Signal.ofPromise:",
|
|
98
|
-
r
|
|
99
|
-
);
|
|
100
|
-
}), s;
|
|
101
|
-
}
|
|
102
|
-
static is(e) {
|
|
103
|
-
return e != null && e[jt] === !0;
|
|
104
|
-
}
|
|
105
|
-
static wrap(e, n = (i, o) => i === o) {
|
|
106
|
-
return F.is(e) ? e : new F(e, n);
|
|
107
|
-
}
|
|
108
|
-
static maybeWrap(e) {
|
|
109
|
-
return e == null ? e : F.wrap(e);
|
|
110
|
-
}
|
|
111
|
-
static unwrap(e) {
|
|
112
|
-
return F.is(e) ? e.get() : e;
|
|
113
|
-
}
|
|
114
|
-
static map(e, n) {
|
|
115
|
-
return F.is(e) ? e.map(n) : n(e);
|
|
116
|
-
}
|
|
102
|
+
/**
|
|
103
|
+
* Gets the value of the signal.
|
|
104
|
+
* @returns The current value of the signal.
|
|
105
|
+
*/
|
|
117
106
|
get value() {
|
|
118
107
|
return this._value;
|
|
119
108
|
}
|
|
120
109
|
};
|
|
121
|
-
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
|
|
110
|
+
h(E, "ofPromise", (t, e, n, s = (o, i) => o === i) => {
|
|
111
|
+
const o = new E(e, s);
|
|
112
|
+
return t.then((i) => o._setAndNotify(i, !1)).catch((i) => {
|
|
113
|
+
n != null ? o._setAndNotify(n(i), !1) : console.error(
|
|
114
|
+
"Unhandled promise rejection in Signal.ofPromise:",
|
|
115
|
+
i
|
|
116
|
+
);
|
|
117
|
+
}), o;
|
|
118
|
+
}), /**
|
|
119
|
+
* Checks if a value is a Signal.
|
|
120
|
+
*
|
|
121
|
+
* @param value - The value to check.
|
|
122
|
+
* @returns `true` if the value is a Signal, `false` otherwise.
|
|
123
|
+
*/
|
|
124
|
+
h(E, "is", (t) => (
|
|
125
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
126
|
+
t != null && t.$__signal__ === !0
|
|
127
|
+
)), /**
|
|
128
|
+
* Wraps a value or a Signal instance into a Signal.
|
|
129
|
+
* If the value is already a Signal, it returns the value itself.
|
|
130
|
+
* If the value is not a Signal, it creates a new Signal instance with the given value.
|
|
131
|
+
*
|
|
132
|
+
* @typeParam O - The type of the value.
|
|
133
|
+
* @param value - The value or Signal instance to wrap.
|
|
134
|
+
* @param equals - A function that determines if two values are equal. Defaults to strict equality (===).
|
|
135
|
+
* @returns A Signal instance.
|
|
136
|
+
*/
|
|
137
|
+
h(E, "wrap", (t, e = (n, s) => n === s) => E.is(t) ? t : new E(t, e)), /**
|
|
138
|
+
* Wraps a value in a `Signal` if it is not already a `Signal`.
|
|
139
|
+
* If the value is `null` or `undefined`, it returns `null` or `undefined` respectively.
|
|
140
|
+
* @param value - The value to wrap or check.
|
|
141
|
+
* @returns The wrapped value if it is not `null` or `undefined`, otherwise `null` or `undefined`.
|
|
142
|
+
*/
|
|
143
|
+
h(E, "maybeWrap", (t) => t == null ? t : E.wrap(t)), /**
|
|
144
|
+
* Unwraps a value from a `Signal` if it is a `Signal`, otherwise returns the value as is.
|
|
145
|
+
*
|
|
146
|
+
* @param value - The value to unwrap.
|
|
147
|
+
* @returns The unwrapped value.
|
|
148
|
+
*/
|
|
149
|
+
h(E, "unwrap", (t) => E.is(t) ? t.get() : t), /**
|
|
150
|
+
* Maps the value of a `Signal` or a regular value using the provided mapping function.
|
|
151
|
+
* If the input value is a `Signal`, the mapping function is applied to its value.
|
|
152
|
+
* If the input value is not a `Signal`, the mapping function is directly applied to the value.
|
|
153
|
+
*
|
|
154
|
+
* @param value - The input value to be mapped.
|
|
155
|
+
* @param fn - The mapping function to be applied to the value.
|
|
156
|
+
* @returns A new `Signal` with the mapped value if the input value is a `Signal`,
|
|
157
|
+
* otherwise, the result of applying the mapping function to the value.
|
|
158
|
+
*
|
|
159
|
+
* @typeParam N - The type of the input value.
|
|
160
|
+
* @typeParam O - The type of the mapped value.
|
|
161
|
+
*/
|
|
162
|
+
h(E, "map", (t, e) => E.is(t) ? t.map(e) : e(t));
|
|
163
|
+
let A = E;
|
|
164
|
+
const Le = typeof queueMicrotask == "function" ? queueMicrotask : (t) => Promise.resolve().then(t);
|
|
165
|
+
class rt extends A {
|
|
166
|
+
/**
|
|
167
|
+
* Represents a Signal object.
|
|
168
|
+
* @param _fn - The function that returns the value of the signal.
|
|
169
|
+
* @param equals - The function used to compare two values of type T for equality.
|
|
170
|
+
*/
|
|
125
171
|
constructor(e, n) {
|
|
126
|
-
super(void 0, n),
|
|
127
|
-
this._isDirty || this._disposed || (this._isDirty = !0, this._derivatives.forEach((
|
|
128
|
-
}),
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
this._scheduleCount !==
|
|
172
|
+
super(void 0, n), h(this, "$__computed__", !0), h(this, "_isDirty", !1), h(this, "setDirty", () => {
|
|
173
|
+
this._isDirty || this._disposed || (this._isDirty = !0, this._derivatives.forEach((s) => s.setDirty()), this._scheduleNotify());
|
|
174
|
+
}), h(this, "_scheduleCount", 0), h(this, "_scheduleNotify", () => {
|
|
175
|
+
const s = ++this._scheduleCount;
|
|
176
|
+
Le(() => {
|
|
177
|
+
this._scheduleCount !== s || this._disposed !== !1 || this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn(), !1));
|
|
132
178
|
});
|
|
133
|
-
}),
|
|
179
|
+
}), h(this, "get", () => (this._isDirty && (this._isDirty = !1, this._value = this._fn(), this._setAndNotify(this._value, !0)), this._value)), this._fn = e, this.setDirty();
|
|
134
180
|
}
|
|
181
|
+
/**
|
|
182
|
+
* Checks if a value is an instance of `Computed`.
|
|
183
|
+
*
|
|
184
|
+
* @param value - The value to check.
|
|
185
|
+
* @returns `true` if the value is an instance of `Computed`, `false` otherwise.
|
|
186
|
+
*/
|
|
135
187
|
static is(e) {
|
|
136
|
-
return e != null && e
|
|
188
|
+
return e != null && e.$__computed__ === !0;
|
|
137
189
|
}
|
|
138
190
|
/** {@inheritDoc Signal.value} */
|
|
139
191
|
get value() {
|
|
140
192
|
return this.get();
|
|
141
193
|
}
|
|
142
194
|
}
|
|
143
|
-
|
|
144
|
-
class St extends ($t = S, Ft = Tt, $t) {
|
|
195
|
+
const $t = class Ft extends A {
|
|
145
196
|
constructor() {
|
|
146
|
-
super(...arguments),
|
|
197
|
+
super(...arguments), h(this, "$__prop__", !0), h(this, "set", (e) => {
|
|
147
198
|
this._setAndNotify(e, !1);
|
|
148
|
-
}),
|
|
199
|
+
}), h(this, "update", (e) => {
|
|
149
200
|
this._setAndNotify(e(this.get()), !1);
|
|
150
|
-
}),
|
|
151
|
-
const
|
|
152
|
-
return function o(
|
|
153
|
-
const r =
|
|
154
|
-
|
|
201
|
+
}), h(this, "reducer", (e, ...n) => {
|
|
202
|
+
const s = this;
|
|
203
|
+
return function o(i) {
|
|
204
|
+
const r = s.value;
|
|
205
|
+
s.update((c) => e(c, i)), !s.equals(r, s.value) && n.forEach(
|
|
155
206
|
(c) => c({
|
|
156
207
|
previousState: r,
|
|
157
|
-
state:
|
|
158
|
-
action:
|
|
208
|
+
state: s.value,
|
|
209
|
+
action: i,
|
|
159
210
|
dispatch: o
|
|
160
211
|
})
|
|
161
212
|
);
|
|
162
213
|
};
|
|
163
|
-
}),
|
|
164
|
-
const o = new
|
|
165
|
-
return o.onDispose(this.on((
|
|
166
|
-
}),
|
|
214
|
+
}), h(this, "iso", (e, n, s = (o, i) => o === i) => {
|
|
215
|
+
const o = new Ft(e(this.get()), s);
|
|
216
|
+
return o.onDispose(this.on((i) => o.set(e(i)))), o.on((i) => this._setAndNotify(n(i), !1)), o;
|
|
217
|
+
}), h(this, "atProp", (e) => this.iso(
|
|
167
218
|
(n) => n[e],
|
|
168
219
|
(n) => ({ ...this.value, [e]: n })
|
|
169
220
|
));
|
|
170
221
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
/** {@inheritDoc Signal.get} */
|
|
222
|
+
/**
|
|
223
|
+
* Access for the current value of the property.
|
|
224
|
+
*/
|
|
175
225
|
get value() {
|
|
176
226
|
return this.get();
|
|
177
227
|
}
|
|
178
228
|
set value(e) {
|
|
179
229
|
this._setAndNotify(e, !1);
|
|
180
230
|
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
const Jt = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]), Xt = /* @__PURE__ */ new Set([
|
|
231
|
+
};
|
|
232
|
+
h($t, "is", (t) => (
|
|
233
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
234
|
+
t != null && t.$__prop__ === !0
|
|
235
|
+
));
|
|
236
|
+
let Ee = $t;
|
|
237
|
+
const D = (t, e = (n, s) => n === s) => new Ee(t, e), Se = (t, e = (n, s) => n === s) => new A(t, e), Vt = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]), Wt = /* @__PURE__ */ new Set([
|
|
189
238
|
"rowSpan",
|
|
190
239
|
"colSpan",
|
|
191
240
|
"tabIndex",
|
|
192
241
|
"valueAsNumber"
|
|
193
|
-
]),
|
|
242
|
+
]), Ht = /* @__PURE__ */ new Set(["valueAsDate"]), zt = /* @__PURE__ */ new Set([
|
|
194
243
|
"value",
|
|
195
244
|
"textContent",
|
|
196
245
|
"innerText",
|
|
@@ -198,134 +247,117 @@ const Jt = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]
|
|
|
198
247
|
"outerHTML",
|
|
199
248
|
"className",
|
|
200
249
|
"classList"
|
|
201
|
-
]),
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
return xt.get(t);
|
|
250
|
+
]), yt = /* @__PURE__ */ new Map(), G = (t, e) => {
|
|
251
|
+
if (yt.has(t))
|
|
252
|
+
return yt.get(t);
|
|
205
253
|
{
|
|
206
254
|
const n = e(t);
|
|
207
|
-
return
|
|
255
|
+
return yt.set(t, n), n;
|
|
208
256
|
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}
|
|
220
|
-
function We(t) {
|
|
221
|
-
return (e, n) => {
|
|
222
|
-
n == null ? e[t] = null : e[t] = n;
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
function He(t) {
|
|
226
|
-
return (e, n) => {
|
|
227
|
-
n == null ? e[t] = null : e[t] = String(n);
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
function ze(t) {
|
|
231
|
-
return (e, n) => {
|
|
232
|
-
n == null ? e.removeAttribute(t) : e.setAttribute(t, n);
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
function Qt(t) {
|
|
236
|
-
return Jt.has(t) ? Z(t, $e) : Xt.has(t) ? Z(t, Ve) : Yt.has(t) ? Z(t, We) : Kt.has(t) ? Z(t, He) : Z(t, ze);
|
|
237
|
-
}
|
|
238
|
-
function Zt(t) {
|
|
239
|
-
return (e) => Jt.has(t) ? !!e[t] : Xt.has(t) ? Number(e[t]) : Yt.has(t) ? e[t] : Kt.has(t) ? String(e[t]) : e.getAttribute(t);
|
|
240
|
-
}
|
|
241
|
-
function q(t) {
|
|
257
|
+
}, Re = (t) => (e, n) => {
|
|
258
|
+
n == null ? e[t] = null : e[t] = !!n;
|
|
259
|
+
}, Oe = (t) => (e, n) => {
|
|
260
|
+
n == null ? e[t] = null : e[t] = Number(n);
|
|
261
|
+
}, Pe = (t) => (e, n) => {
|
|
262
|
+
n == null ? e[t] = null : e[t] = n;
|
|
263
|
+
}, De = (t) => (e, n) => {
|
|
264
|
+
n == null ? e[t] = null : e[t] = String(n);
|
|
265
|
+
}, Ce = (t) => (e, n) => {
|
|
266
|
+
n == null ? e.removeAttribute(t) : e.setAttribute(t, n);
|
|
267
|
+
}, Bt = (t) => Vt.has(t) ? G(t, Re) : Wt.has(t) ? G(t, Oe) : Ht.has(t) ? G(t, Pe) : zt.has(t) ? G(t, De) : G(t, Ce), It = (t) => (e) => Vt.has(t) ? !!e[t] : Wt.has(t) ? Number(e[t]) : Ht.has(t) ? e[t] : zt.has(t) ? String(e[t]) : e.getAttribute(t), j = (t) => {
|
|
242
268
|
const e = t;
|
|
243
269
|
e && e.onblur && (e.onblur = null), !(!t || t.ownerDocument === void 0) && t.parentElement && t.parentElement.removeChild(t);
|
|
244
|
-
}
|
|
245
|
-
function
|
|
246
|
-
let
|
|
247
|
-
for (;
|
|
248
|
-
|
|
249
|
-
if (
|
|
250
|
-
const o =
|
|
270
|
+
};
|
|
271
|
+
function Te(t, e, n) {
|
|
272
|
+
let s = t.target;
|
|
273
|
+
for (; s != null && !(s instanceof HTMLAnchorElement); )
|
|
274
|
+
s = s.parentElement;
|
|
275
|
+
if (s == null) return !0;
|
|
276
|
+
const o = s;
|
|
251
277
|
if (t.button !== 0 || t.ctrlKey || t.metaKey || o.target !== "_self" && o.target !== "" || o.getAttribute("download") != null)
|
|
252
278
|
return !0;
|
|
253
279
|
if (n) {
|
|
254
|
-
const { pathname:
|
|
255
|
-
if (o.getAttribute("href") !== l || e && !/\/[^/.]*$/.test(
|
|
280
|
+
const { pathname: i, search: r, hash: c } = o, l = i + r + c;
|
|
281
|
+
if (o.getAttribute("href") !== l || e === !0 && !/\/[^/.]*$/.test(i) || Array.isArray(e) && !e.some((a) => i.endsWith(a)))
|
|
256
282
|
return !0;
|
|
257
283
|
}
|
|
258
284
|
return !1;
|
|
259
285
|
}
|
|
260
|
-
const
|
|
261
|
-
checkExtension:
|
|
262
|
-
checkExternalUrl: !0
|
|
263
|
-
}) => (
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
i === !0,
|
|
268
|
-
o === !0
|
|
269
|
-
) || t() && n.preventDefault();
|
|
270
|
-
}, Ue = (t) => (e) => {
|
|
271
|
-
se(e);
|
|
286
|
+
const ke = (t, {
|
|
287
|
+
checkExtension: e = [".html"],
|
|
288
|
+
checkExternalUrl: n = !0
|
|
289
|
+
} = {}) => (s) => {
|
|
290
|
+
Te(s, e, n) || t() && s.preventDefault();
|
|
291
|
+
}, Me = (t) => (e) => {
|
|
292
|
+
Yt(e);
|
|
272
293
|
const n = e.createText(t);
|
|
273
|
-
return e.appendOrInsert(n), (
|
|
274
|
-
|
|
294
|
+
return e.appendOrInsert(n), (s) => {
|
|
295
|
+
s && j(n);
|
|
275
296
|
};
|
|
276
|
-
},
|
|
277
|
-
|
|
297
|
+
}, Ne = (t) => (e) => {
|
|
298
|
+
Yt(e);
|
|
278
299
|
const n = e.createText(t.value);
|
|
279
300
|
e.appendOrInsert(n);
|
|
280
|
-
const
|
|
301
|
+
const s = t.on((o) => n.data = o);
|
|
281
302
|
return (o) => {
|
|
282
|
-
|
|
303
|
+
s(), o && j(n);
|
|
283
304
|
};
|
|
284
|
-
},
|
|
285
|
-
const n = t.map((
|
|
286
|
-
return (
|
|
287
|
-
n.forEach((o) => o(
|
|
305
|
+
}, U = (...t) => (e) => {
|
|
306
|
+
const n = t.map((s) => b(s)(e));
|
|
307
|
+
return (s) => {
|
|
308
|
+
n.forEach((o) => o(s));
|
|
288
309
|
};
|
|
289
|
-
},
|
|
290
|
-
},
|
|
310
|
+
}, Q = () => () => {
|
|
311
|
+
}, $e = (t) => (e) => (Kt(e), e.element.classList.add(...t), (n) => {
|
|
291
312
|
n && e.element.classList.remove(...t);
|
|
292
|
-
}),
|
|
293
|
-
|
|
313
|
+
}), Fe = (t) => (e) => {
|
|
314
|
+
Kt(e);
|
|
294
315
|
const n = e.element;
|
|
295
|
-
let
|
|
296
|
-
const o = t.on((
|
|
297
|
-
|
|
316
|
+
let s = [];
|
|
317
|
+
const o = t.on((i) => {
|
|
318
|
+
s.forEach((r) => n.classList.remove(r)), s = (i ?? "").split(" ").filter((r) => r.length > 0), n.classList.add(...s);
|
|
298
319
|
});
|
|
299
|
-
return (
|
|
300
|
-
o(),
|
|
320
|
+
return (i) => {
|
|
321
|
+
o(), i && s.forEach((r) => n.classList.remove(r)), s.length = 0;
|
|
301
322
|
};
|
|
302
|
-
},
|
|
303
|
-
const n =
|
|
323
|
+
}, et = (t, e) => {
|
|
324
|
+
const n = Bt(t), s = It(t);
|
|
304
325
|
return (o) => {
|
|
305
|
-
|
|
306
|
-
const
|
|
326
|
+
Jt(o, t);
|
|
327
|
+
const i = s(o.element);
|
|
307
328
|
return n(o.element, e), (r) => {
|
|
308
|
-
r && n(o.element,
|
|
329
|
+
r && n(o.element, i);
|
|
309
330
|
};
|
|
310
331
|
};
|
|
311
|
-
},
|
|
312
|
-
const n =
|
|
332
|
+
}, nt = (t, e) => {
|
|
333
|
+
const n = Bt(t), s = It(t);
|
|
313
334
|
return (o) => {
|
|
314
|
-
|
|
315
|
-
const s =
|
|
316
|
-
return
|
|
317
|
-
r && n(o.element,
|
|
335
|
+
Jt(o, t);
|
|
336
|
+
const i = s(o.element), r = e.on((c) => n(o.element, c));
|
|
337
|
+
return (c) => {
|
|
338
|
+
r(), c && n(o.element, i);
|
|
318
339
|
};
|
|
319
340
|
};
|
|
320
|
-
},
|
|
341
|
+
}, bt = new Proxy(
|
|
321
342
|
{},
|
|
322
343
|
{
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
344
|
+
/**
|
|
345
|
+
* Creates a renderable component for the specified attribute.
|
|
346
|
+
*
|
|
347
|
+
* Generally using multiple attributes with the same name is not recommended.
|
|
348
|
+
* `class` is the exception and can be used multiple times.
|
|
349
|
+
*
|
|
350
|
+
* @param _ - The target object.
|
|
351
|
+
* @param name - The name of the attribute.
|
|
352
|
+
* @returns The renderable component for the specified attribute.
|
|
353
|
+
*
|
|
354
|
+
*/
|
|
355
|
+
get: (t, e) => e === "class" ? (n) => A.is(n) ? Fe(n) : $e(
|
|
356
|
+
(n ?? "").split(" ").filter((s) => s.length > 0)
|
|
357
|
+
) : (n) => A.is(n) ? nt(
|
|
326
358
|
e,
|
|
327
359
|
n
|
|
328
|
-
) :
|
|
360
|
+
) : et(
|
|
329
361
|
e,
|
|
330
362
|
n
|
|
331
363
|
)
|
|
@@ -334,19 +366,35 @@ const Ie = (t, e = {
|
|
|
334
366
|
new Proxy(
|
|
335
367
|
{},
|
|
336
368
|
{
|
|
337
|
-
|
|
369
|
+
/**
|
|
370
|
+
* Creates a renderable component for the specified `data-?` attribute.
|
|
371
|
+
*
|
|
372
|
+
* @param _ - The target object.
|
|
373
|
+
* @param name - The name of the data attribute.
|
|
374
|
+
* @returns The renderable component for the specified attribute.
|
|
375
|
+
*
|
|
376
|
+
*/
|
|
377
|
+
get: (t, e) => (n) => A.is(n) ? nt(
|
|
338
378
|
`data-${e}`,
|
|
339
379
|
n
|
|
340
|
-
) :
|
|
380
|
+
) : et(`data-${e}`, n)
|
|
341
381
|
}
|
|
342
382
|
);
|
|
343
383
|
new Proxy(
|
|
344
384
|
{},
|
|
345
385
|
{
|
|
346
|
-
|
|
386
|
+
/**
|
|
387
|
+
* Creates a renderable component for the specified `aria-?` attribute.
|
|
388
|
+
*
|
|
389
|
+
* @param _ - The target object.
|
|
390
|
+
* @param name - The name of the aria attribute.
|
|
391
|
+
* @returns The renderable component for the specified attribute.
|
|
392
|
+
*
|
|
393
|
+
*/
|
|
394
|
+
get: (t, e) => (n) => A.is(n) ? nt(
|
|
347
395
|
`aria-${e}`,
|
|
348
396
|
n
|
|
349
|
-
) :
|
|
397
|
+
) : et(
|
|
350
398
|
`aria-${e}`,
|
|
351
399
|
n
|
|
352
400
|
)
|
|
@@ -355,10 +403,18 @@ new Proxy(
|
|
|
355
403
|
new Proxy(
|
|
356
404
|
{},
|
|
357
405
|
{
|
|
358
|
-
|
|
406
|
+
/**
|
|
407
|
+
* Creates a renderable component for the specified `svg` attribute.
|
|
408
|
+
*
|
|
409
|
+
* @param _ - The target object.
|
|
410
|
+
* @param name - The name of the SVG attribute.
|
|
411
|
+
* @returns The renderable component for the specified attribute.
|
|
412
|
+
*
|
|
413
|
+
*/
|
|
414
|
+
get: (t, e) => (n) => A.is(n) ? nt(
|
|
359
415
|
e,
|
|
360
416
|
n
|
|
361
|
-
) :
|
|
417
|
+
) : et(
|
|
362
418
|
e,
|
|
363
419
|
n
|
|
364
420
|
)
|
|
@@ -367,122 +423,114 @@ new Proxy(
|
|
|
367
423
|
new Proxy(
|
|
368
424
|
{},
|
|
369
425
|
{
|
|
370
|
-
|
|
426
|
+
/**
|
|
427
|
+
* Creates a renderable component for the specified `math` attribute.
|
|
428
|
+
*
|
|
429
|
+
* @param name - The name of the Math attribute.
|
|
430
|
+
* @returns The renderable component for the specified attribute.
|
|
431
|
+
*
|
|
432
|
+
*/
|
|
433
|
+
get: (t, e) => (n) => A.is(n) ? nt(
|
|
371
434
|
e,
|
|
372
435
|
n
|
|
373
|
-
) :
|
|
436
|
+
) : et(
|
|
374
437
|
e,
|
|
375
438
|
n
|
|
376
439
|
)
|
|
377
440
|
}
|
|
378
441
|
);
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
return (n) => {
|
|
384
|
-
const i = n.createElement(t, void 0);
|
|
385
|
-
n.isFirstLevel && X.isSSR() && oe(i), n.appendOrInsert(i), n = n.withElement(i);
|
|
386
|
-
const o = e.map((s) => b(s)(n));
|
|
387
|
-
return (s) => {
|
|
388
|
-
o.forEach((r) => r(!1)), s && q(i);
|
|
389
|
-
};
|
|
390
|
-
};
|
|
391
|
-
}
|
|
392
|
-
function te(t, e, ...n) {
|
|
442
|
+
const b = (t) => t == null ? Q : Array.isArray(t) ? U(...t.map(b)) : typeof t == "string" ? Me(t) : A.is(t) ? Ne(t) : t, qt = (t, ...e) => (n) => {
|
|
443
|
+
const s = n.createElement(t, void 0);
|
|
444
|
+
n.isFirstLevel && J() && Xt(s), n.appendOrInsert(s), n = n.withElement(s);
|
|
445
|
+
const o = e.map((i) => b(i)(n));
|
|
393
446
|
return (i) => {
|
|
394
|
-
|
|
395
|
-
i.isFirstLevel && X.isSSR() && oe(o), i.appendOrInsert(o), i = i.withElement(o);
|
|
396
|
-
const s = n.map((r) => b(r)(i));
|
|
397
|
-
return (r) => {
|
|
398
|
-
s.forEach((c) => c(!1)), r && q(o);
|
|
399
|
-
};
|
|
447
|
+
o.forEach((r) => r(!1)), i && j(s);
|
|
400
448
|
};
|
|
401
|
-
}
|
|
402
|
-
const
|
|
449
|
+
}, jt = (t, e, ...n) => (s) => {
|
|
450
|
+
const o = s.createElement(t, e);
|
|
451
|
+
s.isFirstLevel && J() && Xt(o), s.appendOrInsert(o), s = s.withElement(o);
|
|
452
|
+
const i = n.map((r) => b(r)(s));
|
|
453
|
+
return (r) => {
|
|
454
|
+
i.forEach((c) => c(!1)), r && j(o);
|
|
455
|
+
};
|
|
456
|
+
}, Ut = new Proxy(
|
|
403
457
|
{},
|
|
404
458
|
{
|
|
405
|
-
|
|
459
|
+
/**
|
|
460
|
+
* Creates a renderable that represents an HTML element.
|
|
461
|
+
* @param tagName - The HTML tag name.
|
|
462
|
+
* @returns A renderable function that creates and appends the HTML element to the DOM.
|
|
463
|
+
*/
|
|
464
|
+
get: (t, e) => (...n) => qt(e, n.flatMap(b))
|
|
406
465
|
}
|
|
407
466
|
);
|
|
408
467
|
new Proxy(
|
|
409
468
|
{},
|
|
410
469
|
{
|
|
411
|
-
|
|
470
|
+
/**
|
|
471
|
+
* Creates a renderable that represents an HTMLInput element.
|
|
472
|
+
* @param type - The input type name.
|
|
473
|
+
* @returns A renderable function that creates and appends the HTMLInput element to the DOM.
|
|
474
|
+
*/
|
|
475
|
+
get: (t, e) => (...n) => qt("input", bt.type(e), ...n)
|
|
412
476
|
}
|
|
413
477
|
);
|
|
414
|
-
const
|
|
478
|
+
const Ve = "http://www.w3.org/2000/svg";
|
|
415
479
|
new Proxy(
|
|
416
480
|
{},
|
|
417
481
|
{
|
|
418
|
-
|
|
482
|
+
/**
|
|
483
|
+
* Creates a renderable that represents an SVG element.
|
|
484
|
+
* @param tagName - The SVG tag name.
|
|
485
|
+
* @returns A renderable function that creates and appends the SVG element to the DOM.
|
|
486
|
+
*/
|
|
487
|
+
get: (t, e) => (...n) => jt(e, Ve, n.flatMap(b))
|
|
419
488
|
}
|
|
420
489
|
);
|
|
421
|
-
const
|
|
490
|
+
const We = "http://www.w3.org/1998/Math/MathML";
|
|
422
491
|
new Proxy(
|
|
423
492
|
{},
|
|
424
493
|
{
|
|
425
|
-
|
|
494
|
+
/**
|
|
495
|
+
* Creates a renderable that represents an Math element.
|
|
496
|
+
* @param tagName - The Math tag name.
|
|
497
|
+
* @returns A renderable function that creates and appends the Math element to the DOM.
|
|
498
|
+
*/
|
|
499
|
+
get: (t, e) => (...n) => jt(e, We, n.flatMap(b))
|
|
426
500
|
}
|
|
427
501
|
);
|
|
428
|
-
const
|
|
429
|
-
function Ge(t, e) {
|
|
502
|
+
const Pt = "data-tempo-attr", He = "data-tempo-class", ze = "data-tempo-node", Be = "data-tempo-text", Ie = (t, e) => {
|
|
430
503
|
const n = t.getAttribute(e);
|
|
431
504
|
if (n != null) {
|
|
432
|
-
const
|
|
433
|
-
t.setAttribute(
|
|
505
|
+
const s = t.getAttribute(Pt) ?? "{}", o = { ...JSON.parse(s), name: n };
|
|
506
|
+
t.setAttribute(
|
|
507
|
+
Pt,
|
|
508
|
+
JSON.stringify(o).replace(/"/g, """)
|
|
509
|
+
);
|
|
434
510
|
}
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
t.setAttribute(
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
}
|
|
451
|
-
function se(t) {
|
|
452
|
-
X.isSSR() && t.isFirstLevel && en(t.element);
|
|
453
|
-
}
|
|
454
|
-
function re() {
|
|
511
|
+
}, Jt = (t, e) => {
|
|
512
|
+
J() && t.isFirstLevel && Ie(t.element, e);
|
|
513
|
+
};
|
|
514
|
+
function qe(t) {
|
|
515
|
+
t.setAttribute(He, t.className);
|
|
516
|
+
}
|
|
517
|
+
const Kt = (t) => {
|
|
518
|
+
J() && t.isFirstLevel && qe(t.element);
|
|
519
|
+
}, Xt = (t) => {
|
|
520
|
+
t.setAttribute(ze, "");
|
|
521
|
+
}, je = (t) => {
|
|
522
|
+
t.setAttribute(Be, t.textContent ?? "");
|
|
523
|
+
}, Yt = (t) => {
|
|
524
|
+
J() && t.isFirstLevel && je(t.element);
|
|
525
|
+
}, Ue = () => {
|
|
455
526
|
const t = globalThis;
|
|
456
527
|
return t.__tempoSSR__ == null && (t.__tempoSSR__ = {
|
|
457
528
|
isSSR: !1,
|
|
458
529
|
counter: 0
|
|
459
530
|
}), t.__tempoSSR__;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
n[t] = e;
|
|
464
|
-
}
|
|
465
|
-
function le(t) {
|
|
466
|
-
return re()[t];
|
|
467
|
-
}
|
|
468
|
-
function nn() {
|
|
469
|
-
return le("isSSR");
|
|
470
|
-
}
|
|
471
|
-
function ae() {
|
|
472
|
-
return le("counter");
|
|
473
|
-
}
|
|
474
|
-
function on() {
|
|
475
|
-
ce("counter", (ae() ?? 0) + 1);
|
|
476
|
-
}
|
|
477
|
-
function sn() {
|
|
478
|
-
ce("counter", (ae() ?? 0) - 1);
|
|
479
|
-
}
|
|
480
|
-
const X = {
|
|
481
|
-
useDone: (t) => (on(), b(t(sn))),
|
|
482
|
-
isSSR: nn
|
|
483
|
-
}, rn = (t, e) => (n) => (n.element.addEventListener(t, e), (i) => {
|
|
484
|
-
i && n.element.removeEventListener(t, e);
|
|
485
|
-
}), ue = new Proxy(
|
|
531
|
+
}, Je = (t) => Ue()[t], J = () => Je("isSSR"), Ke = (t, e) => (n) => (n.element.addEventListener(t, e), (s) => {
|
|
532
|
+
s && n.element.removeEventListener(t, e);
|
|
533
|
+
}), Gt = new Proxy(
|
|
486
534
|
{},
|
|
487
535
|
{
|
|
488
536
|
/**
|
|
@@ -490,101 +538,89 @@ const X = {
|
|
|
490
538
|
* @param fn - The function to call when the event is triggered.
|
|
491
539
|
* @returns A `Renderable` function that adds the event listener to the element.
|
|
492
540
|
*/
|
|
493
|
-
get: (t, e) => (n) =>
|
|
541
|
+
get: (t, e) => (n) => Ke(e, n)
|
|
494
542
|
}
|
|
495
|
-
),
|
|
543
|
+
), Zt = (t, e) => (n) => {
|
|
496
544
|
n = n.makeRef();
|
|
497
|
-
let
|
|
498
|
-
const
|
|
545
|
+
let s, o;
|
|
546
|
+
const i = t.map((l) => Object.keys(l)[0]);
|
|
499
547
|
let r;
|
|
500
|
-
const c =
|
|
548
|
+
const c = i.on((l) => {
|
|
501
549
|
if (l !== r) {
|
|
502
|
-
o == null || o.dispose(),
|
|
550
|
+
o == null || o.dispose(), s == null || s(!0), o = t.map((f) => f[l]);
|
|
503
551
|
const a = e[l](o);
|
|
504
|
-
|
|
552
|
+
s = b(a)(n), r = l;
|
|
505
553
|
}
|
|
506
554
|
});
|
|
507
555
|
return (l) => {
|
|
508
|
-
c(), l && n.reference != null &&
|
|
556
|
+
c(), l && n.reference != null && j(n.reference), s == null || s(!0);
|
|
509
557
|
};
|
|
510
|
-
},
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
kind: (t, e) => I.field(t, "kind", e),
|
|
521
|
-
tuple: (t, e) => {
|
|
522
|
-
const n = t.map(([i, o]) => ({ [i]: o }));
|
|
523
|
-
return lt(n, e);
|
|
524
|
-
},
|
|
525
|
-
type: (t, e) => I.field(t, "type", e),
|
|
526
|
-
value: (t, e) => lt(
|
|
527
|
-
t.map((n) => ({ [n]: !0 })),
|
|
528
|
-
e
|
|
529
|
-
)
|
|
530
|
-
}, cn = (t, e) => (n) => {
|
|
531
|
-
const i = Object.values(t).reduce((o, s) => {
|
|
532
|
-
const r = n.getProvider(s);
|
|
558
|
+
}, Xe = (t, e, n) => Zt(
|
|
559
|
+
t.map((s) => ({ [s[e]]: s })),
|
|
560
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
561
|
+
n
|
|
562
|
+
), Ye = (t, e) => {
|
|
563
|
+
const n = t.map(([s, o]) => ({ [s]: o }));
|
|
564
|
+
return Zt(n, e);
|
|
565
|
+
}, Qt = (t, e) => Xe(t, "type", e), Ge = (t, e) => (n) => {
|
|
566
|
+
const s = Object.values(t).reduce((o, i) => {
|
|
567
|
+
const r = n.getProvider(i);
|
|
533
568
|
if (r == null)
|
|
534
|
-
throw new Error(`No provider found for mark: ${
|
|
535
|
-
return o[
|
|
569
|
+
throw new Error(`No provider found for mark: ${i.description}`);
|
|
570
|
+
return o[i] = r, o;
|
|
536
571
|
}, {});
|
|
537
|
-
return b(e(
|
|
538
|
-
},
|
|
539
|
-
|
|
540
|
-
let o = null,
|
|
541
|
-
const r =
|
|
542
|
-
l == null ? (o == null || o(!0), o = b((n == null ? void 0 : n()) ??
|
|
572
|
+
return b(e(s))(n);
|
|
573
|
+
}, te = (t, e) => Ge([t], (n) => b(e(n[t]))), Ze = (t, e, n) => (s) => {
|
|
574
|
+
s = s.makeRef();
|
|
575
|
+
let o = null, i = !1;
|
|
576
|
+
const r = D(null), c = t.on((l) => {
|
|
577
|
+
l == null ? (o == null || o(!0), o = b((n == null ? void 0 : n()) ?? Q)(s), i = !1) : (r.value = l, i || (o == null || o(!0), o = b(e(r))(s), i = !0));
|
|
543
578
|
});
|
|
544
579
|
return (l) => {
|
|
545
|
-
c(), o == null || o(l), l &&
|
|
580
|
+
c(), o == null || o(l), l && s.reference && j(s.reference);
|
|
546
581
|
};
|
|
547
|
-
},
|
|
548
|
-
t.map((
|
|
582
|
+
}, st = (t) => (e) => (n) => t(n, e), ee = (t, e, n) => Ze(
|
|
583
|
+
t.map((s) => s ? !0 : null),
|
|
549
584
|
() => e,
|
|
550
585
|
n != null ? () => n : void 0
|
|
551
|
-
),
|
|
552
|
-
})
|
|
553
|
-
function un(t, e) {
|
|
586
|
+
), ne = (t) => (e) => t(e.element) ?? (() => {
|
|
587
|
+
}), Qe = (t, e) => {
|
|
554
588
|
const n = t(e);
|
|
555
589
|
return () => n(!0);
|
|
556
|
-
}
|
|
557
|
-
const
|
|
558
|
-
|
|
559
|
-
if (i === null)
|
|
590
|
+
}, se = (t, e) => (n) => {
|
|
591
|
+
const s = n.document.querySelector(t);
|
|
592
|
+
if (s === null)
|
|
560
593
|
throw new Error(`Cannot find element by selector for portal: ${t}`);
|
|
561
|
-
return
|
|
594
|
+
return Qe(
|
|
562
595
|
b(e),
|
|
563
|
-
n.withElement(
|
|
596
|
+
n.withElement(s).withFirstLevel()
|
|
564
597
|
);
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
return
|
|
568
|
-
|
|
569
|
-
const fn = (t, e) => (n) => b(e)(n.withProviders(t)), me = (t, e, n) => fn({ [t]: e }, b(n)), hn = (t, e) => (n) => {
|
|
570
|
-
const i = n.element, o = i.style.getPropertyValue(t);
|
|
571
|
-
return i.style.setProperty(t, e), (s) => {
|
|
572
|
-
s && i.style.setProperty(t, o);
|
|
598
|
+
}, oe = (t) => Symbol(t), tn = (t, e) => (n) => b(e)(n.withProviders(t)), ie = (t, e, n) => tn({ [t]: e }, b(n)), en = (t, e) => (n) => {
|
|
599
|
+
const s = n.element, o = s.style.getPropertyValue(t);
|
|
600
|
+
return s.style.setProperty(t, e), (i) => {
|
|
601
|
+
i && s.style.setProperty(t, o);
|
|
573
602
|
};
|
|
574
|
-
},
|
|
575
|
-
const
|
|
576
|
-
return e.on((
|
|
577
|
-
|
|
603
|
+
}, nn = (t, e) => (n) => {
|
|
604
|
+
const s = n.element, o = s.style.getPropertyValue(t);
|
|
605
|
+
return e.on((i) => s.style.setProperty(t, i)), (i) => {
|
|
606
|
+
i && s.style.setProperty(t, o);
|
|
578
607
|
};
|
|
579
608
|
};
|
|
580
609
|
new Proxy(
|
|
581
610
|
{},
|
|
582
611
|
{
|
|
583
|
-
|
|
612
|
+
/**
|
|
613
|
+
* Creates a renderable component for the specified `style` property.
|
|
614
|
+
*
|
|
615
|
+
* @param _ - The target object.
|
|
616
|
+
* @param name - The name of the CSS style property.
|
|
617
|
+
* @returns The renderable component for the specified attribute.
|
|
618
|
+
*
|
|
619
|
+
*/
|
|
620
|
+
get: (t, e) => (n) => A.is(n) ? nn(e, n) : en(e, n)
|
|
584
621
|
}
|
|
585
622
|
);
|
|
586
|
-
const
|
|
587
|
-
function pn() {
|
|
623
|
+
const re = oe("LocationProvider"), sn = () => {
|
|
588
624
|
const t = (window == null ? void 0 : window.location.hash) === "" ? void 0 : (window == null ? void 0 : window.location.hash.substring(1)) ?? void 0;
|
|
589
625
|
return {
|
|
590
626
|
pathname: (window == null ? void 0 : window.location.pathname) ?? "",
|
|
@@ -593,115 +629,98 @@ function pn() {
|
|
|
593
629
|
),
|
|
594
630
|
hash: t
|
|
595
631
|
};
|
|
596
|
-
}
|
|
597
|
-
function mn(t, e) {
|
|
598
|
-
return t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash;
|
|
599
|
-
}
|
|
600
|
-
function gn(t) {
|
|
632
|
+
}, on = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, rn = (t) => {
|
|
601
633
|
const e = new URL(t, (window == null ? void 0 : window.location.toString()) ?? ""), n = Object.fromEntries(e.searchParams.entries());
|
|
602
|
-
let
|
|
603
|
-
return
|
|
634
|
+
let s = e.hash;
|
|
635
|
+
return s.startsWith("#") && (s = s.substring(1)), {
|
|
604
636
|
pathname: e.pathname,
|
|
605
637
|
search: n,
|
|
606
|
-
hash:
|
|
638
|
+
hash: s === "" ? void 0 : s
|
|
607
639
|
};
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
const n = gn(e);
|
|
640
|
+
}, cn = (t, e) => {
|
|
641
|
+
const n = rn(e);
|
|
611
642
|
return t.set(n), t;
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
function vn() {
|
|
618
|
-
const t = P(pn(), mn), e = () => {
|
|
643
|
+
}, ln = (t) => {
|
|
644
|
+
const n = new URLSearchParams(t.search).toString(), s = t.hash;
|
|
645
|
+
return `${t.pathname}${n ? `?${n}` : ""}${s ? `#${s}` : ""}`;
|
|
646
|
+
}, an = () => {
|
|
647
|
+
const t = D(sn(), on), e = () => {
|
|
619
648
|
let n = (window == null ? void 0 : window.location.hash) ?? "";
|
|
620
649
|
n.startsWith("#") && (n = n.substring(1));
|
|
621
|
-
const
|
|
650
|
+
const s = {
|
|
622
651
|
pathname: (window == null ? void 0 : window.location.pathname) ?? "",
|
|
623
652
|
search: Object.fromEntries(
|
|
624
653
|
new URLSearchParams((window == null ? void 0 : window.location.search) ?? "").entries()
|
|
625
654
|
),
|
|
626
655
|
hash: n === "" ? void 0 : n
|
|
627
656
|
};
|
|
628
|
-
t.set(
|
|
657
|
+
t.set(s);
|
|
629
658
|
};
|
|
630
659
|
return window == null || window.addEventListener("popstate", e), t.onDispose(() => {
|
|
631
660
|
window == null || window.removeEventListener("popstate", e);
|
|
632
661
|
}), t.on((n) => {
|
|
633
|
-
window == null || window.history.pushState({}, "",
|
|
662
|
+
window == null || window.history.pushState({}, "", ln(n));
|
|
634
663
|
}), t;
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
me(ge, e, t)
|
|
664
|
+
}, Qn = (t) => {
|
|
665
|
+
const e = an();
|
|
666
|
+
return U(
|
|
667
|
+
st(e.dispose),
|
|
668
|
+
ie(re, e, t)
|
|
641
669
|
);
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
)
|
|
658
|
-
Lt.href(t),
|
|
659
|
-
...e
|
|
660
|
-
));
|
|
661
|
-
}
|
|
662
|
-
const ye = pe("Appearance"), hi = (t) => {
|
|
663
|
-
const e = window.matchMedia != null && window.matchMedia("(prefers-color-scheme: dark)").matches, n = P(e ? "dark" : "light"), i = (s) => {
|
|
664
|
-
n.set(s.matches ? "dark" : "light");
|
|
670
|
+
}, ce = (t) => te(re, (e) => (n) => {
|
|
671
|
+
const s = D(e.value, e.equals);
|
|
672
|
+
e.feedProp(s), s.on(e.set);
|
|
673
|
+
const o = b(t(s))(n);
|
|
674
|
+
return (i) => {
|
|
675
|
+
s.dispose(), o(i);
|
|
676
|
+
};
|
|
677
|
+
}), ts = (t, ...e) => ce((n) => Ut.a(
|
|
678
|
+
Gt.click(
|
|
679
|
+
ke(() => (cn(n, A.unwrap(t)), !0))
|
|
680
|
+
),
|
|
681
|
+
bt.href(t),
|
|
682
|
+
...e
|
|
683
|
+
)), le = oe("Appearance"), es = (t) => {
|
|
684
|
+
const e = window.matchMedia != null && window.matchMedia("(prefers-color-scheme: dark)").matches, n = D(e ? "dark" : "light"), s = (i) => {
|
|
685
|
+
n.set(i.matches ? "dark" : "light");
|
|
665
686
|
}, o = window.matchMedia != null ? window.matchMedia("(prefers-color-scheme: dark)") : void 0;
|
|
666
|
-
return o == null || o.addEventListener("change",
|
|
667
|
-
|
|
668
|
-
|
|
687
|
+
return o == null || o.addEventListener("change", s), U(
|
|
688
|
+
ie(le, n, t),
|
|
689
|
+
st(() => o == null ? void 0 : o.removeEventListener("change", s))
|
|
669
690
|
);
|
|
670
|
-
},
|
|
671
|
-
function xn(t, e) {
|
|
691
|
+
}, ns = (t) => te(le, t), un = (t, e) => {
|
|
672
692
|
if (typeof e == "function")
|
|
673
|
-
return
|
|
674
|
-
const n = e.failure ?? ((r) =>
|
|
675
|
-
|
|
693
|
+
return un(t, { success: e });
|
|
694
|
+
const n = e.failure ?? ((r) => U(
|
|
695
|
+
st(r.on(console.error)),
|
|
676
696
|
r.map((c) => `Error: ${c}`)
|
|
677
|
-
)),
|
|
678
|
-
return
|
|
679
|
-
AsyncSuccess: (r) =>
|
|
697
|
+
)), s = e.success, o = e.loading ?? (() => Q), i = e.notAsked ?? (() => Q);
|
|
698
|
+
return Qt(A.wrap(t), {
|
|
699
|
+
AsyncSuccess: (r) => s(r.$.value),
|
|
680
700
|
AsyncFailure: (r) => n(r.$.error),
|
|
681
|
-
Loading: (r) => o(r.$.previousValue ??
|
|
682
|
-
NotAsked:
|
|
701
|
+
Loading: (r) => o(r.$.previousValue ?? Se(void 0)),
|
|
702
|
+
NotAsked: i
|
|
683
703
|
});
|
|
684
|
-
}
|
|
685
|
-
const pi = (t = 10) => (e) => {
|
|
704
|
+
}, ss = (t = 10) => (e) => {
|
|
686
705
|
const n = setTimeout(() => {
|
|
687
|
-
var
|
|
688
|
-
(
|
|
706
|
+
var s;
|
|
707
|
+
(s = e.element) == null || s.focus();
|
|
689
708
|
}, t);
|
|
690
|
-
return (
|
|
691
|
-
},
|
|
709
|
+
return (s) => clearTimeout(n);
|
|
710
|
+
}, os = (t = 10) => (e) => {
|
|
692
711
|
const n = setTimeout(() => {
|
|
693
|
-
var
|
|
694
|
-
(
|
|
712
|
+
var s;
|
|
713
|
+
(s = e.element) == null || s.select();
|
|
695
714
|
}, t);
|
|
696
|
-
return (
|
|
715
|
+
return (s) => {
|
|
697
716
|
clearTimeout(n);
|
|
698
717
|
};
|
|
699
|
-
},
|
|
718
|
+
}, is = (t) => {
|
|
700
719
|
const e = t.element, n = e.style.getPropertyValue(":empty");
|
|
701
|
-
return e.style.setProperty(":empty", "display:none"), (
|
|
702
|
-
|
|
720
|
+
return e.style.setProperty(":empty", "display:none"), (s) => {
|
|
721
|
+
s && e.style.setProperty(":empty", n);
|
|
703
722
|
};
|
|
704
|
-
},
|
|
723
|
+
}, rs = (t) => se("head > title", bt.innerText(t)), fn = {
|
|
705
724
|
partial: {
|
|
706
725
|
root: null,
|
|
707
726
|
rootMargin: "0px",
|
|
@@ -712,106 +731,105 @@ const pi = (t = 10) => (e) => {
|
|
|
712
731
|
rootMargin: "0px",
|
|
713
732
|
threshold: 1
|
|
714
733
|
}
|
|
715
|
-
},
|
|
734
|
+
}, lt = {
|
|
716
735
|
partial: /* @__PURE__ */ new Map(),
|
|
717
736
|
full: /* @__PURE__ */ new Map()
|
|
718
|
-
},
|
|
737
|
+
}, Z = {
|
|
719
738
|
partial: null,
|
|
720
739
|
full: null
|
|
721
740
|
};
|
|
722
|
-
function
|
|
723
|
-
return
|
|
741
|
+
function hn(t) {
|
|
742
|
+
return Z[t] == null && (Z[t] = new IntersectionObserver((e) => {
|
|
724
743
|
e.forEach((n) => {
|
|
725
|
-
const
|
|
726
|
-
|
|
744
|
+
const s = lt[t].get(n.target);
|
|
745
|
+
s == null || s.set(n.isIntersecting);
|
|
727
746
|
});
|
|
728
|
-
},
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
const n =
|
|
732
|
-
return
|
|
733
|
-
|
|
734
|
-
const o = typeof IntersectionObserver < "u" ?
|
|
735
|
-
return
|
|
736
|
-
var
|
|
737
|
-
o == null || o.unobserve(
|
|
747
|
+
}, fn[t])), Z[t];
|
|
748
|
+
}
|
|
749
|
+
const dn = (t, e) => {
|
|
750
|
+
const n = D(J());
|
|
751
|
+
return U(
|
|
752
|
+
ne((s) => {
|
|
753
|
+
const o = typeof IntersectionObserver < "u" ? hn(t) : null;
|
|
754
|
+
return lt[t].set(s, n), o == null || o.observe(s), () => {
|
|
755
|
+
var i;
|
|
756
|
+
o == null || o.unobserve(s), lt[t].delete(s), lt[t].size === 0 && ((i = Z[t]) == null || i.disconnect(), Z[t] = null);
|
|
738
757
|
};
|
|
739
758
|
}),
|
|
740
|
-
|
|
759
|
+
st(n.dispose),
|
|
741
760
|
b(e(n))
|
|
742
761
|
);
|
|
743
|
-
}
|
|
744
|
-
const yi = (t, e, n) => Sn(t, (i) => an(i, e, n ?? tt)), ft = Math.min, $ = Math.max, ht = Math.round, at = Math.floor, k = (t) => ({
|
|
762
|
+
}, cs = (t, e, n) => dn(t, (s) => ee(s, e, n ?? Q)), at = Math.min, F = Math.max, ut = Math.round, ct = Math.floor, M = (t) => ({
|
|
745
763
|
x: t,
|
|
746
764
|
y: t
|
|
747
|
-
}),
|
|
765
|
+
}), pn = {
|
|
748
766
|
left: "right",
|
|
749
767
|
right: "left",
|
|
750
768
|
bottom: "top",
|
|
751
769
|
top: "bottom"
|
|
752
|
-
},
|
|
770
|
+
}, mn = {
|
|
753
771
|
start: "end",
|
|
754
772
|
end: "start"
|
|
755
773
|
};
|
|
756
|
-
function
|
|
757
|
-
return
|
|
774
|
+
function Dt(t, e, n) {
|
|
775
|
+
return F(t, at(e, n));
|
|
758
776
|
}
|
|
759
|
-
function
|
|
777
|
+
function dt(t, e) {
|
|
760
778
|
return typeof t == "function" ? t(e) : t;
|
|
761
779
|
}
|
|
762
780
|
function V(t) {
|
|
763
781
|
return t.split("-")[0];
|
|
764
782
|
}
|
|
765
|
-
function
|
|
783
|
+
function pt(t) {
|
|
766
784
|
return t.split("-")[1];
|
|
767
785
|
}
|
|
768
|
-
function
|
|
786
|
+
function ae(t) {
|
|
769
787
|
return t === "x" ? "y" : "x";
|
|
770
788
|
}
|
|
771
|
-
function
|
|
789
|
+
function ue(t) {
|
|
772
790
|
return t === "y" ? "height" : "width";
|
|
773
791
|
}
|
|
774
|
-
function
|
|
792
|
+
function I(t) {
|
|
775
793
|
return ["top", "bottom"].includes(V(t)) ? "y" : "x";
|
|
776
794
|
}
|
|
777
|
-
function
|
|
778
|
-
return
|
|
795
|
+
function fe(t) {
|
|
796
|
+
return ae(I(t));
|
|
779
797
|
}
|
|
780
|
-
function
|
|
798
|
+
function gn(t, e, n) {
|
|
781
799
|
n === void 0 && (n = !1);
|
|
782
|
-
const
|
|
783
|
-
let r = o === "x" ?
|
|
784
|
-
return e.reference[
|
|
800
|
+
const s = pt(t), o = fe(t), i = ue(o);
|
|
801
|
+
let r = o === "x" ? s === (n ? "end" : "start") ? "right" : "left" : s === "start" ? "bottom" : "top";
|
|
802
|
+
return e.reference[i] > e.floating[i] && (r = ft(r)), [r, ft(r)];
|
|
785
803
|
}
|
|
786
|
-
function
|
|
787
|
-
const e =
|
|
788
|
-
return [
|
|
804
|
+
function wn(t) {
|
|
805
|
+
const e = ft(t);
|
|
806
|
+
return [xt(t), e, xt(e)];
|
|
789
807
|
}
|
|
790
|
-
function
|
|
791
|
-
return t.replace(/start|end/g, (e) =>
|
|
808
|
+
function xt(t) {
|
|
809
|
+
return t.replace(/start|end/g, (e) => mn[e]);
|
|
792
810
|
}
|
|
793
|
-
function
|
|
794
|
-
const
|
|
811
|
+
function yn(t, e, n) {
|
|
812
|
+
const s = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], r = ["bottom", "top"];
|
|
795
813
|
switch (t) {
|
|
796
814
|
case "top":
|
|
797
815
|
case "bottom":
|
|
798
|
-
return n ? e ? o :
|
|
816
|
+
return n ? e ? o : s : e ? s : o;
|
|
799
817
|
case "left":
|
|
800
818
|
case "right":
|
|
801
|
-
return e ?
|
|
819
|
+
return e ? i : r;
|
|
802
820
|
default:
|
|
803
821
|
return [];
|
|
804
822
|
}
|
|
805
823
|
}
|
|
806
|
-
function
|
|
807
|
-
const o =
|
|
808
|
-
let
|
|
809
|
-
return o && (
|
|
824
|
+
function vn(t, e, n, s) {
|
|
825
|
+
const o = pt(t);
|
|
826
|
+
let i = yn(V(t), n === "start", s);
|
|
827
|
+
return o && (i = i.map((r) => r + "-" + o), e && (i = i.concat(i.map(xt)))), i;
|
|
810
828
|
}
|
|
811
|
-
function
|
|
812
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
829
|
+
function ft(t) {
|
|
830
|
+
return t.replace(/left|right|bottom|top/g, (e) => pn[e]);
|
|
813
831
|
}
|
|
814
|
-
function
|
|
832
|
+
function xn(t) {
|
|
815
833
|
return {
|
|
816
834
|
top: 0,
|
|
817
835
|
right: 0,
|
|
@@ -820,87 +838,87 @@ function Dn(t) {
|
|
|
820
838
|
...t
|
|
821
839
|
};
|
|
822
840
|
}
|
|
823
|
-
function
|
|
824
|
-
return typeof t != "number" ?
|
|
841
|
+
function bn(t) {
|
|
842
|
+
return typeof t != "number" ? xn(t) : {
|
|
825
843
|
top: t,
|
|
826
844
|
right: t,
|
|
827
845
|
bottom: t,
|
|
828
846
|
left: t
|
|
829
847
|
};
|
|
830
848
|
}
|
|
831
|
-
function
|
|
849
|
+
function ht(t) {
|
|
832
850
|
const {
|
|
833
851
|
x: e,
|
|
834
852
|
y: n,
|
|
835
|
-
width:
|
|
853
|
+
width: s,
|
|
836
854
|
height: o
|
|
837
855
|
} = t;
|
|
838
856
|
return {
|
|
839
|
-
width:
|
|
857
|
+
width: s,
|
|
840
858
|
height: o,
|
|
841
859
|
top: n,
|
|
842
860
|
left: e,
|
|
843
|
-
right: e +
|
|
861
|
+
right: e + s,
|
|
844
862
|
bottom: n + o,
|
|
845
863
|
x: e,
|
|
846
864
|
y: n
|
|
847
865
|
};
|
|
848
866
|
}
|
|
849
|
-
function
|
|
867
|
+
function Ct(t, e, n) {
|
|
850
868
|
let {
|
|
851
|
-
reference:
|
|
869
|
+
reference: s,
|
|
852
870
|
floating: o
|
|
853
871
|
} = t;
|
|
854
|
-
const
|
|
855
|
-
let
|
|
872
|
+
const i = I(e), r = fe(e), c = ue(r), l = V(e), a = i === "y", f = s.x + s.width / 2 - o.width / 2, u = s.y + s.height / 2 - o.height / 2, p = s[c] / 2 - o[c] / 2;
|
|
873
|
+
let d;
|
|
856
874
|
switch (l) {
|
|
857
875
|
case "top":
|
|
858
|
-
|
|
876
|
+
d = {
|
|
859
877
|
x: f,
|
|
860
|
-
y:
|
|
878
|
+
y: s.y - o.height
|
|
861
879
|
};
|
|
862
880
|
break;
|
|
863
881
|
case "bottom":
|
|
864
|
-
|
|
882
|
+
d = {
|
|
865
883
|
x: f,
|
|
866
|
-
y:
|
|
884
|
+
y: s.y + s.height
|
|
867
885
|
};
|
|
868
886
|
break;
|
|
869
887
|
case "right":
|
|
870
|
-
|
|
871
|
-
x:
|
|
888
|
+
d = {
|
|
889
|
+
x: s.x + s.width,
|
|
872
890
|
y: u
|
|
873
891
|
};
|
|
874
892
|
break;
|
|
875
893
|
case "left":
|
|
876
|
-
|
|
877
|
-
x:
|
|
894
|
+
d = {
|
|
895
|
+
x: s.x - o.width,
|
|
878
896
|
y: u
|
|
879
897
|
};
|
|
880
898
|
break;
|
|
881
899
|
default:
|
|
882
|
-
|
|
883
|
-
x:
|
|
884
|
-
y:
|
|
900
|
+
d = {
|
|
901
|
+
x: s.x,
|
|
902
|
+
y: s.y
|
|
885
903
|
};
|
|
886
904
|
}
|
|
887
|
-
switch (
|
|
905
|
+
switch (pt(e)) {
|
|
888
906
|
case "start":
|
|
889
|
-
|
|
907
|
+
d[r] -= p * (n && a ? -1 : 1);
|
|
890
908
|
break;
|
|
891
909
|
case "end":
|
|
892
|
-
|
|
910
|
+
d[r] += p * (n && a ? -1 : 1);
|
|
893
911
|
break;
|
|
894
912
|
}
|
|
895
|
-
return
|
|
913
|
+
return d;
|
|
896
914
|
}
|
|
897
|
-
const
|
|
915
|
+
const _n = async (t, e, n) => {
|
|
898
916
|
const {
|
|
899
|
-
placement:
|
|
917
|
+
placement: s = "bottom",
|
|
900
918
|
strategy: o = "absolute",
|
|
901
|
-
middleware:
|
|
919
|
+
middleware: i = [],
|
|
902
920
|
platform: r
|
|
903
|
-
} = n, c =
|
|
921
|
+
} = n, c = i.filter(Boolean), l = await (r.isRTL == null ? void 0 : r.isRTL(e));
|
|
904
922
|
let a = await r.getElementRects({
|
|
905
923
|
reference: t,
|
|
906
924
|
floating: e,
|
|
@@ -908,23 +926,23 @@ const Tn = async (t, e, n) => {
|
|
|
908
926
|
}), {
|
|
909
927
|
x: f,
|
|
910
928
|
y: u
|
|
911
|
-
} =
|
|
929
|
+
} = Ct(a, s, l), p = s, d = {}, g = 0;
|
|
912
930
|
for (let w = 0; w < c.length; w++) {
|
|
913
931
|
const {
|
|
914
932
|
name: y,
|
|
915
|
-
fn:
|
|
933
|
+
fn: m
|
|
916
934
|
} = c[w], {
|
|
917
935
|
x: v,
|
|
918
936
|
y: x,
|
|
919
937
|
data: L,
|
|
920
|
-
reset:
|
|
921
|
-
} = await
|
|
938
|
+
reset: _
|
|
939
|
+
} = await m({
|
|
922
940
|
x: f,
|
|
923
941
|
y: u,
|
|
924
|
-
initialPlacement:
|
|
925
|
-
placement:
|
|
942
|
+
initialPlacement: s,
|
|
943
|
+
placement: p,
|
|
926
944
|
strategy: o,
|
|
927
|
-
middlewareData:
|
|
945
|
+
middlewareData: d,
|
|
928
946
|
rects: a,
|
|
929
947
|
platform: r,
|
|
930
948
|
elements: {
|
|
@@ -932,36 +950,36 @@ const Tn = async (t, e, n) => {
|
|
|
932
950
|
floating: e
|
|
933
951
|
}
|
|
934
952
|
});
|
|
935
|
-
f = v ?? f, u = x ?? u,
|
|
936
|
-
...
|
|
953
|
+
f = v ?? f, u = x ?? u, d = {
|
|
954
|
+
...d,
|
|
937
955
|
[y]: {
|
|
938
|
-
...
|
|
956
|
+
...d[y],
|
|
939
957
|
...L
|
|
940
958
|
}
|
|
941
|
-
},
|
|
959
|
+
}, _ && g <= 50 && (g++, typeof _ == "object" && (_.placement && (p = _.placement), _.rects && (a = _.rects === !0 ? await r.getElementRects({
|
|
942
960
|
reference: t,
|
|
943
961
|
floating: e,
|
|
944
962
|
strategy: o
|
|
945
|
-
}) :
|
|
963
|
+
}) : _.rects), {
|
|
946
964
|
x: f,
|
|
947
965
|
y: u
|
|
948
|
-
} =
|
|
966
|
+
} = Ct(a, p, l)), w = -1);
|
|
949
967
|
}
|
|
950
968
|
return {
|
|
951
969
|
x: f,
|
|
952
970
|
y: u,
|
|
953
|
-
placement:
|
|
971
|
+
placement: p,
|
|
954
972
|
strategy: o,
|
|
955
|
-
middlewareData:
|
|
973
|
+
middlewareData: d
|
|
956
974
|
};
|
|
957
975
|
};
|
|
958
|
-
async function
|
|
976
|
+
async function he(t, e) {
|
|
959
977
|
var n;
|
|
960
978
|
e === void 0 && (e = {});
|
|
961
979
|
const {
|
|
962
|
-
x:
|
|
980
|
+
x: s,
|
|
963
981
|
y: o,
|
|
964
|
-
platform:
|
|
982
|
+
platform: i,
|
|
965
983
|
rects: r,
|
|
966
984
|
elements: c,
|
|
967
985
|
strategy: l
|
|
@@ -969,46 +987,46 @@ async function Ae(t, e) {
|
|
|
969
987
|
boundary: a = "clippingAncestors",
|
|
970
988
|
rootBoundary: f = "viewport",
|
|
971
989
|
elementContext: u = "floating",
|
|
972
|
-
altBoundary:
|
|
973
|
-
padding:
|
|
974
|
-
} =
|
|
975
|
-
element: (n = await (
|
|
990
|
+
altBoundary: p = !1,
|
|
991
|
+
padding: d = 0
|
|
992
|
+
} = dt(e, t), g = bn(d), y = c[p ? u === "floating" ? "reference" : "floating" : u], m = ht(await i.getClippingRect({
|
|
993
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(y))) == null || n ? y : y.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
|
|
976
994
|
boundary: a,
|
|
977
995
|
rootBoundary: f,
|
|
978
996
|
strategy: l
|
|
979
997
|
})), v = u === "floating" ? {
|
|
980
|
-
x:
|
|
998
|
+
x: s,
|
|
981
999
|
y: o,
|
|
982
1000
|
width: r.floating.width,
|
|
983
1001
|
height: r.floating.height
|
|
984
|
-
} : r.reference, x = await (
|
|
1002
|
+
} : r.reference, x = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), L = await (i.isElement == null ? void 0 : i.isElement(x)) ? await (i.getScale == null ? void 0 : i.getScale(x)) || {
|
|
985
1003
|
x: 1,
|
|
986
1004
|
y: 1
|
|
987
1005
|
} : {
|
|
988
1006
|
x: 1,
|
|
989
1007
|
y: 1
|
|
990
|
-
},
|
|
1008
|
+
}, _ = ht(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
991
1009
|
elements: c,
|
|
992
1010
|
rect: v,
|
|
993
1011
|
offsetParent: x,
|
|
994
1012
|
strategy: l
|
|
995
1013
|
}) : v);
|
|
996
1014
|
return {
|
|
997
|
-
top: (
|
|
998
|
-
bottom: (
|
|
999
|
-
left: (
|
|
1000
|
-
right: (
|
|
1015
|
+
top: (m.top - _.top + g.top) / L.y,
|
|
1016
|
+
bottom: (_.bottom - m.bottom + g.bottom) / L.y,
|
|
1017
|
+
left: (m.left - _.left + g.left) / L.x,
|
|
1018
|
+
right: (_.right - m.right + g.right) / L.x
|
|
1001
1019
|
};
|
|
1002
1020
|
}
|
|
1003
|
-
const
|
|
1021
|
+
const An = function(t) {
|
|
1004
1022
|
return t === void 0 && (t = {}), {
|
|
1005
1023
|
name: "flip",
|
|
1006
1024
|
options: t,
|
|
1007
1025
|
async fn(e) {
|
|
1008
|
-
var n,
|
|
1026
|
+
var n, s;
|
|
1009
1027
|
const {
|
|
1010
1028
|
placement: o,
|
|
1011
|
-
middlewareData:
|
|
1029
|
+
middlewareData: i,
|
|
1012
1030
|
rects: r,
|
|
1013
1031
|
initialPlacement: c,
|
|
1014
1032
|
platform: l,
|
|
@@ -1016,63 +1034,63 @@ const kn = function(t) {
|
|
|
1016
1034
|
} = e, {
|
|
1017
1035
|
mainAxis: f = !0,
|
|
1018
1036
|
crossAxis: u = !0,
|
|
1019
|
-
fallbackPlacements:
|
|
1020
|
-
fallbackStrategy:
|
|
1037
|
+
fallbackPlacements: p,
|
|
1038
|
+
fallbackStrategy: d = "bestFit",
|
|
1021
1039
|
fallbackAxisSideDirection: g = "none",
|
|
1022
1040
|
flipAlignment: w = !0,
|
|
1023
1041
|
...y
|
|
1024
|
-
} =
|
|
1025
|
-
if ((n =
|
|
1042
|
+
} = dt(t, e);
|
|
1043
|
+
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
1026
1044
|
return {};
|
|
1027
|
-
const
|
|
1028
|
-
!
|
|
1029
|
-
const
|
|
1030
|
-
let
|
|
1031
|
-
if (f &&
|
|
1032
|
-
const
|
|
1033
|
-
|
|
1045
|
+
const m = V(o), v = I(c), x = V(c) === c, L = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), _ = p || (x || !w ? [ft(c)] : wn(c)), H = g !== "none";
|
|
1046
|
+
!p && H && _.push(...vn(c, w, g, L));
|
|
1047
|
+
const xe = [c, ..._], wt = await he(e, y), it = [];
|
|
1048
|
+
let X = ((s = i.flip) == null ? void 0 : s.overflows) || [];
|
|
1049
|
+
if (f && it.push(wt[m]), u) {
|
|
1050
|
+
const $ = gn(o, r, L);
|
|
1051
|
+
it.push(wt[$[0]], wt[$[1]]);
|
|
1034
1052
|
}
|
|
1035
|
-
if (
|
|
1053
|
+
if (X = [...X, {
|
|
1036
1054
|
placement: o,
|
|
1037
|
-
overflows:
|
|
1038
|
-
}], !
|
|
1039
|
-
var
|
|
1040
|
-
const
|
|
1041
|
-
if (
|
|
1055
|
+
overflows: it
|
|
1056
|
+
}], !it.every(($) => $ <= 0)) {
|
|
1057
|
+
var Et, St;
|
|
1058
|
+
const $ = (((Et = i.flip) == null ? void 0 : Et.index) || 0) + 1, Ot = xe[$];
|
|
1059
|
+
if (Ot)
|
|
1042
1060
|
return {
|
|
1043
1061
|
data: {
|
|
1044
|
-
index:
|
|
1045
|
-
overflows:
|
|
1062
|
+
index: $,
|
|
1063
|
+
overflows: X
|
|
1046
1064
|
},
|
|
1047
1065
|
reset: {
|
|
1048
|
-
placement:
|
|
1066
|
+
placement: Ot
|
|
1049
1067
|
}
|
|
1050
1068
|
};
|
|
1051
|
-
let
|
|
1052
|
-
if (!
|
|
1053
|
-
switch (
|
|
1069
|
+
let Y = (St = X.filter((z) => z.overflows[0] <= 0).sort((z, T) => z.overflows[1] - T.overflows[1])[0]) == null ? void 0 : St.placement;
|
|
1070
|
+
if (!Y)
|
|
1071
|
+
switch (d) {
|
|
1054
1072
|
case "bestFit": {
|
|
1055
|
-
var
|
|
1056
|
-
const z = (
|
|
1073
|
+
var Rt;
|
|
1074
|
+
const z = (Rt = X.filter((T) => {
|
|
1057
1075
|
if (H) {
|
|
1058
|
-
const
|
|
1059
|
-
return
|
|
1076
|
+
const k = I(T.placement);
|
|
1077
|
+
return k === v || // Create a bias to the `y` side axis due to horizontal
|
|
1060
1078
|
// reading directions favoring greater width.
|
|
1061
|
-
|
|
1079
|
+
k === "y";
|
|
1062
1080
|
}
|
|
1063
1081
|
return !0;
|
|
1064
|
-
}).map((
|
|
1065
|
-
z && (
|
|
1082
|
+
}).map((T) => [T.placement, T.overflows.filter((k) => k > 0).reduce((k, be) => k + be, 0)]).sort((T, k) => T[1] - k[1])[0]) == null ? void 0 : Rt[0];
|
|
1083
|
+
z && (Y = z);
|
|
1066
1084
|
break;
|
|
1067
1085
|
}
|
|
1068
1086
|
case "initialPlacement":
|
|
1069
|
-
|
|
1087
|
+
Y = c;
|
|
1070
1088
|
break;
|
|
1071
1089
|
}
|
|
1072
|
-
if (o !==
|
|
1090
|
+
if (o !== Y)
|
|
1073
1091
|
return {
|
|
1074
1092
|
reset: {
|
|
1075
|
-
placement:
|
|
1093
|
+
placement: Y
|
|
1076
1094
|
}
|
|
1077
1095
|
};
|
|
1078
1096
|
}
|
|
@@ -1080,15 +1098,15 @@ const kn = function(t) {
|
|
|
1080
1098
|
}
|
|
1081
1099
|
};
|
|
1082
1100
|
};
|
|
1083
|
-
async function
|
|
1101
|
+
async function Ln(t, e) {
|
|
1084
1102
|
const {
|
|
1085
1103
|
placement: n,
|
|
1086
|
-
platform:
|
|
1104
|
+
platform: s,
|
|
1087
1105
|
elements: o
|
|
1088
|
-
} = t,
|
|
1106
|
+
} = t, i = await (s.isRTL == null ? void 0 : s.isRTL(o.floating)), r = V(n), c = pt(n), l = I(n) === "y", a = ["left", "top"].includes(r) ? -1 : 1, f = i && l ? -1 : 1, u = dt(e, t);
|
|
1089
1107
|
let {
|
|
1090
|
-
mainAxis:
|
|
1091
|
-
crossAxis:
|
|
1108
|
+
mainAxis: p,
|
|
1109
|
+
crossAxis: d,
|
|
1092
1110
|
alignmentAxis: g
|
|
1093
1111
|
} = typeof u == "number" ? {
|
|
1094
1112
|
mainAxis: u,
|
|
@@ -1100,29 +1118,29 @@ async function Mn(t, e) {
|
|
|
1100
1118
|
alignmentAxis: null,
|
|
1101
1119
|
...u
|
|
1102
1120
|
};
|
|
1103
|
-
return c && typeof g == "number" && (
|
|
1104
|
-
x:
|
|
1105
|
-
y:
|
|
1121
|
+
return c && typeof g == "number" && (d = c === "end" ? g * -1 : g), l ? {
|
|
1122
|
+
x: d * f,
|
|
1123
|
+
y: p * a
|
|
1106
1124
|
} : {
|
|
1107
|
-
x:
|
|
1108
|
-
y:
|
|
1125
|
+
x: p * a,
|
|
1126
|
+
y: d * f
|
|
1109
1127
|
};
|
|
1110
1128
|
}
|
|
1111
|
-
const
|
|
1129
|
+
const En = function(t) {
|
|
1112
1130
|
return t === void 0 && (t = 0), {
|
|
1113
1131
|
name: "offset",
|
|
1114
1132
|
options: t,
|
|
1115
1133
|
async fn(e) {
|
|
1116
|
-
var n,
|
|
1134
|
+
var n, s;
|
|
1117
1135
|
const {
|
|
1118
1136
|
x: o,
|
|
1119
|
-
y:
|
|
1137
|
+
y: i,
|
|
1120
1138
|
placement: r,
|
|
1121
1139
|
middlewareData: c
|
|
1122
|
-
} = e, l = await
|
|
1123
|
-
return r === ((n = c.offset) == null ? void 0 : n.placement) && (
|
|
1140
|
+
} = e, l = await Ln(e, t);
|
|
1141
|
+
return r === ((n = c.offset) == null ? void 0 : n.placement) && (s = c.arrow) != null && s.alignmentOffset ? {} : {
|
|
1124
1142
|
x: o + l.x,
|
|
1125
|
-
y:
|
|
1143
|
+
y: i + l.y,
|
|
1126
1144
|
data: {
|
|
1127
1145
|
...l,
|
|
1128
1146
|
placement: r
|
|
@@ -1130,95 +1148,95 @@ const Nn = function(t) {
|
|
|
1130
1148
|
};
|
|
1131
1149
|
}
|
|
1132
1150
|
};
|
|
1133
|
-
},
|
|
1151
|
+
}, Sn = function(t) {
|
|
1134
1152
|
return t === void 0 && (t = {}), {
|
|
1135
1153
|
name: "shift",
|
|
1136
1154
|
options: t,
|
|
1137
1155
|
async fn(e) {
|
|
1138
1156
|
const {
|
|
1139
1157
|
x: n,
|
|
1140
|
-
y:
|
|
1158
|
+
y: s,
|
|
1141
1159
|
placement: o
|
|
1142
1160
|
} = e, {
|
|
1143
|
-
mainAxis:
|
|
1161
|
+
mainAxis: i = !0,
|
|
1144
1162
|
crossAxis: r = !1,
|
|
1145
1163
|
limiter: c = {
|
|
1146
1164
|
fn: (y) => {
|
|
1147
1165
|
let {
|
|
1148
|
-
x:
|
|
1166
|
+
x: m,
|
|
1149
1167
|
y: v
|
|
1150
1168
|
} = y;
|
|
1151
1169
|
return {
|
|
1152
|
-
x:
|
|
1170
|
+
x: m,
|
|
1153
1171
|
y: v
|
|
1154
1172
|
};
|
|
1155
1173
|
}
|
|
1156
1174
|
},
|
|
1157
1175
|
...l
|
|
1158
|
-
} =
|
|
1176
|
+
} = dt(t, e), a = {
|
|
1159
1177
|
x: n,
|
|
1160
|
-
y:
|
|
1161
|
-
}, f = await
|
|
1162
|
-
let
|
|
1163
|
-
if (
|
|
1164
|
-
const y =
|
|
1165
|
-
|
|
1178
|
+
y: s
|
|
1179
|
+
}, f = await he(e, l), u = I(V(o)), p = ae(u);
|
|
1180
|
+
let d = a[p], g = a[u];
|
|
1181
|
+
if (i) {
|
|
1182
|
+
const y = p === "y" ? "top" : "left", m = p === "y" ? "bottom" : "right", v = d + f[y], x = d - f[m];
|
|
1183
|
+
d = Dt(v, d, x);
|
|
1166
1184
|
}
|
|
1167
1185
|
if (r) {
|
|
1168
|
-
const y = u === "y" ? "top" : "left",
|
|
1169
|
-
g =
|
|
1186
|
+
const y = u === "y" ? "top" : "left", m = u === "y" ? "bottom" : "right", v = g + f[y], x = g - f[m];
|
|
1187
|
+
g = Dt(v, g, x);
|
|
1170
1188
|
}
|
|
1171
1189
|
const w = c.fn({
|
|
1172
1190
|
...e,
|
|
1173
|
-
[
|
|
1191
|
+
[p]: d,
|
|
1174
1192
|
[u]: g
|
|
1175
1193
|
});
|
|
1176
1194
|
return {
|
|
1177
1195
|
...w,
|
|
1178
1196
|
data: {
|
|
1179
1197
|
x: w.x - n,
|
|
1180
|
-
y: w.y -
|
|
1198
|
+
y: w.y - s
|
|
1181
1199
|
}
|
|
1182
1200
|
};
|
|
1183
1201
|
}
|
|
1184
1202
|
};
|
|
1185
1203
|
};
|
|
1186
|
-
function
|
|
1187
|
-
return
|
|
1204
|
+
function K(t) {
|
|
1205
|
+
return de(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
1188
1206
|
}
|
|
1189
|
-
function
|
|
1207
|
+
function S(t) {
|
|
1190
1208
|
var e;
|
|
1191
1209
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
1192
1210
|
}
|
|
1193
|
-
function
|
|
1211
|
+
function C(t) {
|
|
1194
1212
|
var e;
|
|
1195
|
-
return (e = (
|
|
1196
|
-
}
|
|
1197
|
-
function Se(t) {
|
|
1198
|
-
return t instanceof Node || t instanceof E(t).Node;
|
|
1213
|
+
return (e = (de(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
1199
1214
|
}
|
|
1200
|
-
function
|
|
1201
|
-
return t instanceof
|
|
1215
|
+
function de(t) {
|
|
1216
|
+
return t instanceof Node || t instanceof S(t).Node;
|
|
1202
1217
|
}
|
|
1203
1218
|
function O(t) {
|
|
1204
|
-
return t instanceof
|
|
1219
|
+
return t instanceof Element || t instanceof S(t).Element;
|
|
1205
1220
|
}
|
|
1206
|
-
function
|
|
1207
|
-
return
|
|
1221
|
+
function P(t) {
|
|
1222
|
+
return t instanceof HTMLElement || t instanceof S(t).HTMLElement;
|
|
1208
1223
|
}
|
|
1209
|
-
function
|
|
1224
|
+
function Tt(t) {
|
|
1225
|
+
return typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof S(t).ShadowRoot;
|
|
1226
|
+
}
|
|
1227
|
+
function ot(t) {
|
|
1210
1228
|
const {
|
|
1211
1229
|
overflow: e,
|
|
1212
1230
|
overflowX: n,
|
|
1213
|
-
overflowY:
|
|
1231
|
+
overflowY: s,
|
|
1214
1232
|
display: o
|
|
1215
1233
|
} = R(t);
|
|
1216
|
-
return /auto|scroll|overlay|hidden|clip/.test(e +
|
|
1234
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + s + n) && !["inline", "contents"].includes(o);
|
|
1217
1235
|
}
|
|
1218
|
-
function
|
|
1219
|
-
return ["table", "td", "th"].includes(
|
|
1236
|
+
function Rn(t) {
|
|
1237
|
+
return ["table", "td", "th"].includes(K(t));
|
|
1220
1238
|
}
|
|
1221
|
-
function
|
|
1239
|
+
function mt(t) {
|
|
1222
1240
|
return [":popover-open", ":modal"].some((e) => {
|
|
1223
1241
|
try {
|
|
1224
1242
|
return t.matches(e);
|
|
@@ -1227,32 +1245,32 @@ function wt(t) {
|
|
|
1227
1245
|
}
|
|
1228
1246
|
});
|
|
1229
1247
|
}
|
|
1230
|
-
function
|
|
1231
|
-
const e =
|
|
1232
|
-
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((
|
|
1248
|
+
function _t(t) {
|
|
1249
|
+
const e = At(), n = R(t);
|
|
1250
|
+
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((s) => (n.willChange || "").includes(s)) || ["paint", "layout", "strict", "content"].some((s) => (n.contain || "").includes(s));
|
|
1233
1251
|
}
|
|
1234
|
-
function
|
|
1235
|
-
let e =
|
|
1236
|
-
for (;
|
|
1237
|
-
if (
|
|
1252
|
+
function On(t) {
|
|
1253
|
+
let e = N(t);
|
|
1254
|
+
for (; P(e) && !q(e); ) {
|
|
1255
|
+
if (mt(e))
|
|
1238
1256
|
return null;
|
|
1239
|
-
if (
|
|
1257
|
+
if (_t(e))
|
|
1240
1258
|
return e;
|
|
1241
|
-
e =
|
|
1259
|
+
e = N(e);
|
|
1242
1260
|
}
|
|
1243
1261
|
return null;
|
|
1244
1262
|
}
|
|
1245
|
-
function
|
|
1263
|
+
function At() {
|
|
1246
1264
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1247
1265
|
}
|
|
1248
|
-
function
|
|
1249
|
-
return ["html", "body", "#document"].includes(
|
|
1266
|
+
function q(t) {
|
|
1267
|
+
return ["html", "body", "#document"].includes(K(t));
|
|
1250
1268
|
}
|
|
1251
1269
|
function R(t) {
|
|
1252
|
-
return
|
|
1270
|
+
return S(t).getComputedStyle(t);
|
|
1253
1271
|
}
|
|
1254
|
-
function
|
|
1255
|
-
return
|
|
1272
|
+
function gt(t) {
|
|
1273
|
+
return O(t) ? {
|
|
1256
1274
|
scrollLeft: t.scrollLeft,
|
|
1257
1275
|
scrollTop: t.scrollTop
|
|
1258
1276
|
} : {
|
|
@@ -1260,107 +1278,107 @@ function yt(t) {
|
|
|
1260
1278
|
scrollTop: t.scrollY
|
|
1261
1279
|
};
|
|
1262
1280
|
}
|
|
1263
|
-
function
|
|
1264
|
-
if (
|
|
1281
|
+
function N(t) {
|
|
1282
|
+
if (K(t) === "html")
|
|
1265
1283
|
return t;
|
|
1266
1284
|
const e = (
|
|
1267
1285
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
1268
1286
|
t.assignedSlot || // DOM Element detected.
|
|
1269
1287
|
t.parentNode || // ShadowRoot detected.
|
|
1270
|
-
|
|
1271
|
-
|
|
1288
|
+
Tt(t) && t.host || // Fallback.
|
|
1289
|
+
C(t)
|
|
1272
1290
|
);
|
|
1273
|
-
return
|
|
1291
|
+
return Tt(e) ? e.host : e;
|
|
1274
1292
|
}
|
|
1275
|
-
function
|
|
1276
|
-
const e =
|
|
1277
|
-
return
|
|
1293
|
+
function pe(t) {
|
|
1294
|
+
const e = N(t);
|
|
1295
|
+
return q(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : P(e) && ot(e) ? e : pe(e);
|
|
1278
1296
|
}
|
|
1279
|
-
function
|
|
1280
|
-
var
|
|
1297
|
+
function tt(t, e, n) {
|
|
1298
|
+
var s;
|
|
1281
1299
|
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
1282
|
-
const o =
|
|
1283
|
-
return
|
|
1300
|
+
const o = pe(t), i = o === ((s = t.ownerDocument) == null ? void 0 : s.body), r = S(o);
|
|
1301
|
+
return i ? e.concat(r, r.visualViewport || [], ot(o) ? o : [], r.frameElement && n ? tt(r.frameElement) : []) : e.concat(o, tt(o, [], n));
|
|
1284
1302
|
}
|
|
1285
|
-
function
|
|
1303
|
+
function me(t) {
|
|
1286
1304
|
const e = R(t);
|
|
1287
|
-
let n = parseFloat(e.width) || 0,
|
|
1288
|
-
const o =
|
|
1289
|
-
return c && (n =
|
|
1305
|
+
let n = parseFloat(e.width) || 0, s = parseFloat(e.height) || 0;
|
|
1306
|
+
const o = P(t), i = o ? t.offsetWidth : n, r = o ? t.offsetHeight : s, c = ut(n) !== i || ut(s) !== r;
|
|
1307
|
+
return c && (n = i, s = r), {
|
|
1290
1308
|
width: n,
|
|
1291
|
-
height:
|
|
1309
|
+
height: s,
|
|
1292
1310
|
$: c
|
|
1293
1311
|
};
|
|
1294
1312
|
}
|
|
1295
|
-
function
|
|
1296
|
-
return
|
|
1313
|
+
function Lt(t) {
|
|
1314
|
+
return O(t) ? t : t.contextElement;
|
|
1297
1315
|
}
|
|
1298
1316
|
function B(t) {
|
|
1299
|
-
const e =
|
|
1300
|
-
if (!
|
|
1301
|
-
return
|
|
1317
|
+
const e = Lt(t);
|
|
1318
|
+
if (!P(e))
|
|
1319
|
+
return M(1);
|
|
1302
1320
|
const n = e.getBoundingClientRect(), {
|
|
1303
|
-
width:
|
|
1321
|
+
width: s,
|
|
1304
1322
|
height: o,
|
|
1305
|
-
$:
|
|
1306
|
-
} =
|
|
1307
|
-
let r = (
|
|
1323
|
+
$: i
|
|
1324
|
+
} = me(e);
|
|
1325
|
+
let r = (i ? ut(n.width) : n.width) / s, c = (i ? ut(n.height) : n.height) / o;
|
|
1308
1326
|
return (!r || !Number.isFinite(r)) && (r = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
1309
1327
|
x: r,
|
|
1310
1328
|
y: c
|
|
1311
1329
|
};
|
|
1312
1330
|
}
|
|
1313
|
-
const
|
|
1314
|
-
function
|
|
1315
|
-
const e =
|
|
1316
|
-
return !
|
|
1331
|
+
const Pn = /* @__PURE__ */ M(0);
|
|
1332
|
+
function ge(t) {
|
|
1333
|
+
const e = S(t);
|
|
1334
|
+
return !At() || !e.visualViewport ? Pn : {
|
|
1317
1335
|
x: e.visualViewport.offsetLeft,
|
|
1318
1336
|
y: e.visualViewport.offsetTop
|
|
1319
1337
|
};
|
|
1320
1338
|
}
|
|
1321
|
-
function
|
|
1322
|
-
return e === void 0 && (e = !1), !n || e && n !==
|
|
1339
|
+
function Dn(t, e, n) {
|
|
1340
|
+
return e === void 0 && (e = !1), !n || e && n !== S(t) ? !1 : e;
|
|
1323
1341
|
}
|
|
1324
|
-
function W(t, e, n,
|
|
1342
|
+
function W(t, e, n, s) {
|
|
1325
1343
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
1326
|
-
const o = t.getBoundingClientRect(),
|
|
1327
|
-
let r =
|
|
1328
|
-
e && (
|
|
1329
|
-
const c =
|
|
1344
|
+
const o = t.getBoundingClientRect(), i = Lt(t);
|
|
1345
|
+
let r = M(1);
|
|
1346
|
+
e && (s ? O(s) && (r = B(s)) : r = B(t));
|
|
1347
|
+
const c = Dn(i, n, s) ? ge(i) : M(0);
|
|
1330
1348
|
let l = (o.left + c.x) / r.x, a = (o.top + c.y) / r.y, f = o.width / r.x, u = o.height / r.y;
|
|
1331
|
-
if (
|
|
1332
|
-
const
|
|
1333
|
-
let g =
|
|
1334
|
-
for (; w &&
|
|
1335
|
-
const y = B(w),
|
|
1336
|
-
l *= y.x, a *= y.y, f *= y.x, u *= y.y, l += x, a += L, g =
|
|
1349
|
+
if (i) {
|
|
1350
|
+
const p = S(i), d = s && O(s) ? S(s) : s;
|
|
1351
|
+
let g = p, w = g.frameElement;
|
|
1352
|
+
for (; w && s && d !== g; ) {
|
|
1353
|
+
const y = B(w), m = w.getBoundingClientRect(), v = R(w), x = m.left + (w.clientLeft + parseFloat(v.paddingLeft)) * y.x, L = m.top + (w.clientTop + parseFloat(v.paddingTop)) * y.y;
|
|
1354
|
+
l *= y.x, a *= y.y, f *= y.x, u *= y.y, l += x, a += L, g = S(w), w = g.frameElement;
|
|
1337
1355
|
}
|
|
1338
1356
|
}
|
|
1339
|
-
return
|
|
1357
|
+
return ht({
|
|
1340
1358
|
width: f,
|
|
1341
1359
|
height: u,
|
|
1342
1360
|
x: l,
|
|
1343
1361
|
y: a
|
|
1344
1362
|
});
|
|
1345
1363
|
}
|
|
1346
|
-
function
|
|
1364
|
+
function Cn(t) {
|
|
1347
1365
|
let {
|
|
1348
1366
|
elements: e,
|
|
1349
1367
|
rect: n,
|
|
1350
|
-
offsetParent:
|
|
1368
|
+
offsetParent: s,
|
|
1351
1369
|
strategy: o
|
|
1352
1370
|
} = t;
|
|
1353
|
-
const
|
|
1354
|
-
if (
|
|
1371
|
+
const i = o === "fixed", r = C(s), c = e ? mt(e.floating) : !1;
|
|
1372
|
+
if (s === r || c && i)
|
|
1355
1373
|
return n;
|
|
1356
1374
|
let l = {
|
|
1357
1375
|
scrollLeft: 0,
|
|
1358
1376
|
scrollTop: 0
|
|
1359
|
-
}, a =
|
|
1360
|
-
const f =
|
|
1361
|
-
if ((u || !u && !
|
|
1362
|
-
const
|
|
1363
|
-
a = B(
|
|
1377
|
+
}, a = M(1);
|
|
1378
|
+
const f = M(0), u = P(s);
|
|
1379
|
+
if ((u || !u && !i) && ((K(s) !== "body" || ot(r)) && (l = gt(s)), P(s))) {
|
|
1380
|
+
const p = W(s);
|
|
1381
|
+
a = B(s), f.x = p.x + s.clientLeft, f.y = p.y + s.clientTop;
|
|
1364
1382
|
}
|
|
1365
1383
|
return {
|
|
1366
1384
|
width: n.width * a.x,
|
|
@@ -1369,40 +1387,40 @@ function zn(t) {
|
|
|
1369
1387
|
y: n.y * a.y - l.scrollTop * a.y + f.y
|
|
1370
1388
|
};
|
|
1371
1389
|
}
|
|
1372
|
-
function
|
|
1390
|
+
function Tn(t) {
|
|
1373
1391
|
return Array.from(t.getClientRects());
|
|
1374
1392
|
}
|
|
1375
|
-
function
|
|
1376
|
-
return W(
|
|
1393
|
+
function we(t) {
|
|
1394
|
+
return W(C(t)).left + gt(t).scrollLeft;
|
|
1377
1395
|
}
|
|
1378
|
-
function
|
|
1379
|
-
const e =
|
|
1380
|
-
let r = -n.scrollLeft +
|
|
1396
|
+
function kn(t) {
|
|
1397
|
+
const e = C(t), n = gt(t), s = t.ownerDocument.body, o = F(e.scrollWidth, e.clientWidth, s.scrollWidth, s.clientWidth), i = F(e.scrollHeight, e.clientHeight, s.scrollHeight, s.clientHeight);
|
|
1398
|
+
let r = -n.scrollLeft + we(t);
|
|
1381
1399
|
const c = -n.scrollTop;
|
|
1382
|
-
return R(
|
|
1400
|
+
return R(s).direction === "rtl" && (r += F(e.clientWidth, s.clientWidth) - o), {
|
|
1383
1401
|
width: o,
|
|
1384
|
-
height:
|
|
1402
|
+
height: i,
|
|
1385
1403
|
x: r,
|
|
1386
1404
|
y: c
|
|
1387
1405
|
};
|
|
1388
1406
|
}
|
|
1389
|
-
function
|
|
1390
|
-
const n =
|
|
1391
|
-
let
|
|
1407
|
+
function Mn(t, e) {
|
|
1408
|
+
const n = S(t), s = C(t), o = n.visualViewport;
|
|
1409
|
+
let i = s.clientWidth, r = s.clientHeight, c = 0, l = 0;
|
|
1392
1410
|
if (o) {
|
|
1393
|
-
|
|
1394
|
-
const a =
|
|
1411
|
+
i = o.width, r = o.height;
|
|
1412
|
+
const a = At();
|
|
1395
1413
|
(!a || a && e === "fixed") && (c = o.offsetLeft, l = o.offsetTop);
|
|
1396
1414
|
}
|
|
1397
1415
|
return {
|
|
1398
|
-
width:
|
|
1416
|
+
width: i,
|
|
1399
1417
|
height: r,
|
|
1400
1418
|
x: c,
|
|
1401
1419
|
y: l
|
|
1402
1420
|
};
|
|
1403
1421
|
}
|
|
1404
|
-
function
|
|
1405
|
-
const n = W(t, !0, e === "fixed"),
|
|
1422
|
+
function Nn(t, e) {
|
|
1423
|
+
const n = W(t, !0, e === "fixed"), s = n.top + t.clientTop, o = n.left + t.clientLeft, i = P(t) ? B(t) : M(1), r = t.clientWidth * i.x, c = t.clientHeight * i.y, l = o * i.x, a = s * i.y;
|
|
1406
1424
|
return {
|
|
1407
1425
|
width: r,
|
|
1408
1426
|
height: c,
|
|
@@ -1410,52 +1428,52 @@ function jn(t, e) {
|
|
|
1410
1428
|
y: a
|
|
1411
1429
|
};
|
|
1412
1430
|
}
|
|
1413
|
-
function
|
|
1414
|
-
let
|
|
1431
|
+
function kt(t, e, n) {
|
|
1432
|
+
let s;
|
|
1415
1433
|
if (e === "viewport")
|
|
1416
|
-
|
|
1434
|
+
s = Mn(t, n);
|
|
1417
1435
|
else if (e === "document")
|
|
1418
|
-
|
|
1419
|
-
else if (
|
|
1420
|
-
|
|
1436
|
+
s = kn(C(t));
|
|
1437
|
+
else if (O(e))
|
|
1438
|
+
s = Nn(e, n);
|
|
1421
1439
|
else {
|
|
1422
|
-
const o =
|
|
1423
|
-
|
|
1440
|
+
const o = ge(t);
|
|
1441
|
+
s = {
|
|
1424
1442
|
...e,
|
|
1425
1443
|
x: e.x - o.x,
|
|
1426
1444
|
y: e.y - o.y
|
|
1427
1445
|
};
|
|
1428
1446
|
}
|
|
1429
|
-
return
|
|
1447
|
+
return ht(s);
|
|
1430
1448
|
}
|
|
1431
|
-
function
|
|
1432
|
-
const n =
|
|
1433
|
-
return n === e || !
|
|
1449
|
+
function ye(t, e) {
|
|
1450
|
+
const n = N(t);
|
|
1451
|
+
return n === e || !O(n) || q(n) ? !1 : R(n).position === "fixed" || ye(n, e);
|
|
1434
1452
|
}
|
|
1435
|
-
function
|
|
1453
|
+
function $n(t, e) {
|
|
1436
1454
|
const n = e.get(t);
|
|
1437
1455
|
if (n)
|
|
1438
1456
|
return n;
|
|
1439
|
-
let
|
|
1440
|
-
const
|
|
1441
|
-
let r =
|
|
1442
|
-
for (;
|
|
1443
|
-
const c = R(r), l =
|
|
1444
|
-
!l && c.position === "fixed" && (o = null), (
|
|
1457
|
+
let s = tt(t, [], !1).filter((c) => O(c) && K(c) !== "body"), o = null;
|
|
1458
|
+
const i = R(t).position === "fixed";
|
|
1459
|
+
let r = i ? N(t) : t;
|
|
1460
|
+
for (; O(r) && !q(r); ) {
|
|
1461
|
+
const c = R(r), l = _t(r);
|
|
1462
|
+
!l && c.position === "fixed" && (o = null), (i ? !l && !o : !l && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || ot(r) && !l && ye(t, r)) ? s = s.filter((f) => f !== r) : o = c, r = N(r);
|
|
1445
1463
|
}
|
|
1446
|
-
return e.set(t,
|
|
1464
|
+
return e.set(t, s), s;
|
|
1447
1465
|
}
|
|
1448
|
-
function
|
|
1466
|
+
function Fn(t) {
|
|
1449
1467
|
let {
|
|
1450
1468
|
element: e,
|
|
1451
1469
|
boundary: n,
|
|
1452
|
-
rootBoundary:
|
|
1470
|
+
rootBoundary: s,
|
|
1453
1471
|
strategy: o
|
|
1454
1472
|
} = t;
|
|
1455
|
-
const r = [...n === "clippingAncestors" ?
|
|
1456
|
-
const u =
|
|
1457
|
-
return a.top =
|
|
1458
|
-
},
|
|
1473
|
+
const r = [...n === "clippingAncestors" ? mt(e) ? [] : $n(e, this._c) : [].concat(n), s], c = r[0], l = r.reduce((a, f) => {
|
|
1474
|
+
const u = kt(e, f, o);
|
|
1475
|
+
return a.top = F(u.top, a.top), a.right = at(u.right, a.right), a.bottom = at(u.bottom, a.bottom), a.left = F(u.left, a.left), a;
|
|
1476
|
+
}, kt(e, c, o));
|
|
1459
1477
|
return {
|
|
1460
1478
|
width: l.right - l.left,
|
|
1461
1479
|
height: l.bottom - l.top,
|
|
@@ -1463,28 +1481,28 @@ function Jn(t) {
|
|
|
1463
1481
|
y: l.top
|
|
1464
1482
|
};
|
|
1465
1483
|
}
|
|
1466
|
-
function
|
|
1484
|
+
function Vn(t) {
|
|
1467
1485
|
const {
|
|
1468
1486
|
width: e,
|
|
1469
1487
|
height: n
|
|
1470
|
-
} =
|
|
1488
|
+
} = me(t);
|
|
1471
1489
|
return {
|
|
1472
1490
|
width: e,
|
|
1473
1491
|
height: n
|
|
1474
1492
|
};
|
|
1475
1493
|
}
|
|
1476
|
-
function
|
|
1477
|
-
const
|
|
1494
|
+
function Wn(t, e, n) {
|
|
1495
|
+
const s = P(e), o = C(e), i = n === "fixed", r = W(t, !0, i, e);
|
|
1478
1496
|
let c = {
|
|
1479
1497
|
scrollLeft: 0,
|
|
1480
1498
|
scrollTop: 0
|
|
1481
1499
|
};
|
|
1482
|
-
const l =
|
|
1483
|
-
if (
|
|
1484
|
-
if ((
|
|
1485
|
-
const u = W(e, !0,
|
|
1500
|
+
const l = M(0);
|
|
1501
|
+
if (s || !s && !i)
|
|
1502
|
+
if ((K(e) !== "body" || ot(o)) && (c = gt(e)), s) {
|
|
1503
|
+
const u = W(e, !0, i, e);
|
|
1486
1504
|
l.x = u.x + e.clientLeft, l.y = u.y + e.clientTop;
|
|
1487
|
-
} else o && (l.x =
|
|
1505
|
+
} else o && (l.x = we(o));
|
|
1488
1506
|
const a = r.left + c.scrollLeft - l.x, f = r.top + c.scrollTop - l.y;
|
|
1489
1507
|
return {
|
|
1490
1508
|
x: a,
|
|
@@ -1493,85 +1511,85 @@ function Yn(t, e, n) {
|
|
|
1493
1511
|
height: r.height
|
|
1494
1512
|
};
|
|
1495
1513
|
}
|
|
1496
|
-
function
|
|
1514
|
+
function vt(t) {
|
|
1497
1515
|
return R(t).position === "static";
|
|
1498
1516
|
}
|
|
1499
|
-
function
|
|
1500
|
-
return !
|
|
1517
|
+
function Mt(t, e) {
|
|
1518
|
+
return !P(t) || R(t).position === "fixed" ? null : e ? e(t) : t.offsetParent;
|
|
1501
1519
|
}
|
|
1502
|
-
function
|
|
1503
|
-
const n =
|
|
1504
|
-
if (
|
|
1520
|
+
function ve(t, e) {
|
|
1521
|
+
const n = S(t);
|
|
1522
|
+
if (mt(t))
|
|
1505
1523
|
return n;
|
|
1506
|
-
if (!
|
|
1507
|
-
let o =
|
|
1508
|
-
for (; o && !
|
|
1509
|
-
if (
|
|
1524
|
+
if (!P(t)) {
|
|
1525
|
+
let o = N(t);
|
|
1526
|
+
for (; o && !q(o); ) {
|
|
1527
|
+
if (O(o) && !vt(o))
|
|
1510
1528
|
return o;
|
|
1511
|
-
o =
|
|
1529
|
+
o = N(o);
|
|
1512
1530
|
}
|
|
1513
1531
|
return n;
|
|
1514
1532
|
}
|
|
1515
|
-
let
|
|
1516
|
-
for (;
|
|
1517
|
-
|
|
1518
|
-
return
|
|
1533
|
+
let s = Mt(t, e);
|
|
1534
|
+
for (; s && Rn(s) && vt(s); )
|
|
1535
|
+
s = Mt(s, e);
|
|
1536
|
+
return s && q(s) && vt(s) && !_t(s) ? n : s || On(t) || n;
|
|
1519
1537
|
}
|
|
1520
|
-
const
|
|
1521
|
-
const e = this.getOffsetParent ||
|
|
1538
|
+
const Hn = async function(t) {
|
|
1539
|
+
const e = this.getOffsetParent || ve, n = this.getDimensions, s = await n(t.floating);
|
|
1522
1540
|
return {
|
|
1523
|
-
reference:
|
|
1541
|
+
reference: Wn(t.reference, await e(t.floating), t.strategy),
|
|
1524
1542
|
floating: {
|
|
1525
1543
|
x: 0,
|
|
1526
1544
|
y: 0,
|
|
1527
|
-
width:
|
|
1528
|
-
height:
|
|
1545
|
+
width: s.width,
|
|
1546
|
+
height: s.height
|
|
1529
1547
|
}
|
|
1530
1548
|
};
|
|
1531
1549
|
};
|
|
1532
|
-
function
|
|
1550
|
+
function zn(t) {
|
|
1533
1551
|
return R(t).direction === "rtl";
|
|
1534
1552
|
}
|
|
1535
|
-
const
|
|
1536
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1537
|
-
getDocumentElement:
|
|
1538
|
-
getClippingRect:
|
|
1539
|
-
getOffsetParent:
|
|
1540
|
-
getElementRects:
|
|
1541
|
-
getClientRects:
|
|
1542
|
-
getDimensions:
|
|
1553
|
+
const Bn = {
|
|
1554
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Cn,
|
|
1555
|
+
getDocumentElement: C,
|
|
1556
|
+
getClippingRect: Fn,
|
|
1557
|
+
getOffsetParent: ve,
|
|
1558
|
+
getElementRects: Hn,
|
|
1559
|
+
getClientRects: Tn,
|
|
1560
|
+
getDimensions: Vn,
|
|
1543
1561
|
getScale: B,
|
|
1544
|
-
isElement:
|
|
1545
|
-
isRTL:
|
|
1562
|
+
isElement: O,
|
|
1563
|
+
isRTL: zn
|
|
1546
1564
|
};
|
|
1547
|
-
function
|
|
1548
|
-
let n = null,
|
|
1549
|
-
const o =
|
|
1550
|
-
function
|
|
1565
|
+
function In(t, e) {
|
|
1566
|
+
let n = null, s;
|
|
1567
|
+
const o = C(t);
|
|
1568
|
+
function i() {
|
|
1551
1569
|
var c;
|
|
1552
|
-
clearTimeout(
|
|
1570
|
+
clearTimeout(s), (c = n) == null || c.disconnect(), n = null;
|
|
1553
1571
|
}
|
|
1554
1572
|
function r(c, l) {
|
|
1555
|
-
c === void 0 && (c = !1), l === void 0 && (l = 1),
|
|
1573
|
+
c === void 0 && (c = !1), l === void 0 && (l = 1), i();
|
|
1556
1574
|
const {
|
|
1557
1575
|
left: a,
|
|
1558
1576
|
top: f,
|
|
1559
1577
|
width: u,
|
|
1560
|
-
height:
|
|
1578
|
+
height: p
|
|
1561
1579
|
} = t.getBoundingClientRect();
|
|
1562
|
-
if (c || e(), !u || !
|
|
1580
|
+
if (c || e(), !u || !p)
|
|
1563
1581
|
return;
|
|
1564
|
-
const
|
|
1565
|
-
rootMargin: -
|
|
1566
|
-
threshold:
|
|
1582
|
+
const d = ct(f), g = ct(o.clientWidth - (a + u)), w = ct(o.clientHeight - (f + p)), y = ct(a), v = {
|
|
1583
|
+
rootMargin: -d + "px " + -g + "px " + -w + "px " + -y + "px",
|
|
1584
|
+
threshold: F(0, at(1, l)) || 1
|
|
1567
1585
|
};
|
|
1568
1586
|
let x = !0;
|
|
1569
|
-
function L(
|
|
1570
|
-
const H =
|
|
1587
|
+
function L(_) {
|
|
1588
|
+
const H = _[0].intersectionRatio;
|
|
1571
1589
|
if (H !== l) {
|
|
1572
1590
|
if (!x)
|
|
1573
1591
|
return r();
|
|
1574
|
-
H ? r(!1, H) :
|
|
1592
|
+
H ? r(!1, H) : s = setTimeout(() => {
|
|
1575
1593
|
r(!1, 1e-7);
|
|
1576
1594
|
}, 1e3);
|
|
1577
1595
|
}
|
|
@@ -1588,218 +1606,202 @@ function Gn(t, e) {
|
|
|
1588
1606
|
}
|
|
1589
1607
|
n.observe(t);
|
|
1590
1608
|
}
|
|
1591
|
-
return r(!0),
|
|
1609
|
+
return r(!0), i;
|
|
1592
1610
|
}
|
|
1593
|
-
function
|
|
1594
|
-
|
|
1611
|
+
function qn(t, e, n, s) {
|
|
1612
|
+
s === void 0 && (s = {});
|
|
1595
1613
|
const {
|
|
1596
1614
|
ancestorScroll: o = !0,
|
|
1597
|
-
ancestorResize:
|
|
1615
|
+
ancestorResize: i = !0,
|
|
1598
1616
|
elementResize: r = typeof ResizeObserver == "function",
|
|
1599
1617
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1600
1618
|
animationFrame: l = !1
|
|
1601
|
-
} =
|
|
1602
|
-
f.forEach((
|
|
1603
|
-
o &&
|
|
1619
|
+
} = s, a = Lt(t), f = o || i ? [...a ? tt(a) : [], ...tt(e)] : [];
|
|
1620
|
+
f.forEach((m) => {
|
|
1621
|
+
o && m.addEventListener("scroll", n, {
|
|
1604
1622
|
passive: !0
|
|
1605
|
-
}),
|
|
1623
|
+
}), i && m.addEventListener("resize", n);
|
|
1606
1624
|
});
|
|
1607
|
-
const u = a && c ?
|
|
1608
|
-
let
|
|
1609
|
-
r && (
|
|
1610
|
-
let [v] =
|
|
1611
|
-
v && v.target === a &&
|
|
1625
|
+
const u = a && c ? In(a, n) : null;
|
|
1626
|
+
let p = -1, d = null;
|
|
1627
|
+
r && (d = new ResizeObserver((m) => {
|
|
1628
|
+
let [v] = m;
|
|
1629
|
+
v && v.target === a && d && (d.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1612
1630
|
var x;
|
|
1613
|
-
(x =
|
|
1631
|
+
(x = d) == null || x.observe(e);
|
|
1614
1632
|
})), n();
|
|
1615
|
-
}), a && !l &&
|
|
1633
|
+
}), a && !l && d.observe(a), d.observe(e));
|
|
1616
1634
|
let g, w = l ? W(t) : null;
|
|
1617
1635
|
l && y();
|
|
1618
1636
|
function y() {
|
|
1619
|
-
const
|
|
1620
|
-
w && (
|
|
1637
|
+
const m = W(t);
|
|
1638
|
+
w && (m.x !== w.x || m.y !== w.y || m.width !== w.width || m.height !== w.height) && n(), w = m, g = requestAnimationFrame(y);
|
|
1621
1639
|
}
|
|
1622
1640
|
return n(), () => {
|
|
1623
|
-
var
|
|
1641
|
+
var m;
|
|
1624
1642
|
f.forEach((v) => {
|
|
1625
|
-
o && v.removeEventListener("scroll", n),
|
|
1626
|
-
}), u == null || u(), (
|
|
1643
|
+
o && v.removeEventListener("scroll", n), i && v.removeEventListener("resize", n);
|
|
1644
|
+
}), u == null || u(), (m = d) == null || m.disconnect(), d = null, l && cancelAnimationFrame(g);
|
|
1627
1645
|
};
|
|
1628
1646
|
}
|
|
1629
|
-
const
|
|
1630
|
-
const
|
|
1631
|
-
platform:
|
|
1647
|
+
const jn = En, Un = Sn, Nt = An, Jn = (t, e, n) => {
|
|
1648
|
+
const s = /* @__PURE__ */ new Map(), o = {
|
|
1649
|
+
platform: Bn,
|
|
1632
1650
|
...n
|
|
1633
|
-
},
|
|
1651
|
+
}, i = {
|
|
1634
1652
|
...o.platform,
|
|
1635
|
-
_c:
|
|
1653
|
+
_c: s
|
|
1636
1654
|
};
|
|
1637
|
-
return
|
|
1655
|
+
return _n(t, e, {
|
|
1638
1656
|
...o,
|
|
1639
|
-
platform:
|
|
1657
|
+
platform: i
|
|
1640
1658
|
});
|
|
1641
|
-
}
|
|
1642
|
-
function vi({
|
|
1659
|
+
}, ls = ({
|
|
1643
1660
|
content: t,
|
|
1644
1661
|
open: e,
|
|
1645
1662
|
placement: n,
|
|
1646
|
-
offset: { mainAxis:
|
|
1647
|
-
}) {
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
});
|
|
1663
|
+
offset: { mainAxis: s, crossAxis: o } = { mainAxis: 0, crossAxis: 0 }
|
|
1664
|
+
}) => (i) => {
|
|
1665
|
+
const r = i.element, c = A.wrap(e);
|
|
1666
|
+
return ee(
|
|
1667
|
+
c,
|
|
1668
|
+
se(
|
|
1669
|
+
"body",
|
|
1670
|
+
Ut.div(
|
|
1671
|
+
ne((l) => {
|
|
1672
|
+
const a = l;
|
|
1673
|
+
return a.style.position = "absolute", qn(r, a, () => {
|
|
1674
|
+
Jn(r, a, {
|
|
1675
|
+
placement: n,
|
|
1676
|
+
strategy: "absolute",
|
|
1677
|
+
middleware: [
|
|
1678
|
+
Nt(),
|
|
1679
|
+
jn({ mainAxis: s, crossAxis: o }),
|
|
1680
|
+
Un(),
|
|
1681
|
+
Nt()
|
|
1682
|
+
]
|
|
1683
|
+
}).then(({ x: f, y: u }) => {
|
|
1684
|
+
a.style.top = `${u}px`, a.style.left = `${f}px`;
|
|
1669
1685
|
});
|
|
1670
|
-
})
|
|
1671
|
-
|
|
1672
|
-
)
|
|
1673
|
-
)
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
}
|
|
1678
|
-
function oi(t, e) {
|
|
1686
|
+
});
|
|
1687
|
+
}),
|
|
1688
|
+
t()
|
|
1689
|
+
)
|
|
1690
|
+
)
|
|
1691
|
+
)(i);
|
|
1692
|
+
}, Kn = (t, e) => {
|
|
1679
1693
|
if (typeof e == "function")
|
|
1680
|
-
return
|
|
1681
|
-
const n = e.failure ?? ((o) =>
|
|
1682
|
-
|
|
1683
|
-
o.map((
|
|
1684
|
-
)),
|
|
1685
|
-
return
|
|
1686
|
-
Success: (o) =>
|
|
1694
|
+
return Kn(t, { success: e });
|
|
1695
|
+
const n = e.failure ?? ((o) => U(
|
|
1696
|
+
st(o.on(console.error)),
|
|
1697
|
+
o.map((i) => `Error: ${i}`)
|
|
1698
|
+
)), s = e.success;
|
|
1699
|
+
return Qt(A.wrap(t), {
|
|
1700
|
+
Success: (o) => s(o.$.value),
|
|
1687
1701
|
Failure: (o) => n(o.$.error)
|
|
1688
1702
|
});
|
|
1689
|
-
}
|
|
1690
|
-
|
|
1691
|
-
return
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
}
|
|
1696
|
-
const si = (t) => (e) => {
|
|
1697
|
-
const n = e.element, i = P({ width: n.clientWidth, height: n.clientHeight }), o = b(t(i))(e), s = () => {
|
|
1698
|
-
i.set({ width: n.clientWidth, height: n.clientHeight });
|
|
1703
|
+
}, as = () => Gt.focus((t) => {
|
|
1704
|
+
var e;
|
|
1705
|
+
return (e = t.target) == null ? void 0 : e.select();
|
|
1706
|
+
}), us = (t) => (e) => {
|
|
1707
|
+
const n = e.element, s = D({ width: n.clientWidth, height: n.clientHeight }), o = b(t(s))(e), i = () => {
|
|
1708
|
+
s.set({ width: n.clientWidth, height: n.clientHeight });
|
|
1699
1709
|
};
|
|
1700
1710
|
let r;
|
|
1701
|
-
return typeof ResizeObserver == "function" && (r = new ResizeObserver(
|
|
1711
|
+
return typeof ResizeObserver == "function" && (r = new ResizeObserver(i), r.observe(n)), (c) => {
|
|
1702
1712
|
r == null || r.disconnect(), o(c);
|
|
1703
1713
|
};
|
|
1704
|
-
},
|
|
1705
|
-
const n =
|
|
1714
|
+
}, fs = (t) => (e) => {
|
|
1715
|
+
const n = D({
|
|
1706
1716
|
width: (window == null ? void 0 : window.innerWidth) ?? 0,
|
|
1707
1717
|
height: (window == null ? void 0 : window.innerHeight) ?? 0
|
|
1708
|
-
}),
|
|
1718
|
+
}), s = b(t(n))(e), o = () => {
|
|
1709
1719
|
n.set({
|
|
1710
1720
|
width: (window == null ? void 0 : window.innerWidth) ?? 0,
|
|
1711
1721
|
height: (window == null ? void 0 : window.innerHeight) ?? 0
|
|
1712
1722
|
});
|
|
1713
1723
|
};
|
|
1714
|
-
return window == null || window.addEventListener("resize", o), (
|
|
1715
|
-
window == null || window.removeEventListener("resize", o), i
|
|
1724
|
+
return window == null || window.addEventListener("resize", o), (i) => {
|
|
1725
|
+
window == null || window.removeEventListener("resize", o), s(i);
|
|
1716
1726
|
};
|
|
1717
|
-
},
|
|
1718
|
-
|
|
1719
|
-
window: ri
|
|
1720
|
-
};
|
|
1721
|
-
function ci(t, e) {
|
|
1722
|
-
const n = e.split("/").filter((o) => o !== ""), i = {};
|
|
1727
|
+
}, Xn = (t, e) => {
|
|
1728
|
+
const n = e.split("/").filter((o) => o !== ""), s = {};
|
|
1723
1729
|
for (let o = 0; o < t.length; o++) {
|
|
1724
|
-
const
|
|
1725
|
-
if (!r &&
|
|
1730
|
+
const i = t[o], r = n[o];
|
|
1731
|
+
if (!r && i.type !== "catch-all")
|
|
1726
1732
|
return null;
|
|
1727
|
-
if (
|
|
1728
|
-
if (
|
|
1733
|
+
if (i.type === "literal") {
|
|
1734
|
+
if (i.value !== r)
|
|
1729
1735
|
return null;
|
|
1730
|
-
} else if (
|
|
1731
|
-
i
|
|
1732
|
-
else if (
|
|
1733
|
-
return { params:
|
|
1736
|
+
} else if (i.type === "param")
|
|
1737
|
+
s[i.name] = r;
|
|
1738
|
+
else if (i.type === "catch-all")
|
|
1739
|
+
return { params: s, path: e };
|
|
1734
1740
|
}
|
|
1735
|
-
return n.length !== t.length ? null : { params:
|
|
1736
|
-
}
|
|
1737
|
-
function li(t) {
|
|
1738
|
-
return t.split("/").map((e) => e.startsWith(":") ? { type: "param", name: e.slice(1) } : e === "*" ? { type: "catch-all" } : { type: "literal", value: e }).filter((e) => e.type !== "literal" || e.value !== "");
|
|
1739
|
-
}
|
|
1740
|
-
function ai(t) {
|
|
1741
|
+
return n.length !== t.length ? null : { params: s, path: e };
|
|
1742
|
+
}, Yn = (t) => t.split("/").map((e) => e.startsWith(":") ? { type: "param", name: e.slice(1) } : e === "*" ? { type: "catch-all" } : { type: "literal", value: e }).filter((e) => e.type !== "literal" || e.value !== ""), Gn = (t) => {
|
|
1741
1743
|
const e = t.map((n) => {
|
|
1742
|
-
const
|
|
1743
|
-
return { route: n, segments:
|
|
1744
|
+
const s = Yn(n);
|
|
1745
|
+
return { route: n, segments: s };
|
|
1744
1746
|
});
|
|
1745
|
-
return function(
|
|
1746
|
-
for (const { segments: o, route:
|
|
1747
|
-
const r =
|
|
1747
|
+
return function(s) {
|
|
1748
|
+
for (const { segments: o, route: i } of e) {
|
|
1749
|
+
const r = Xn(o, s);
|
|
1748
1750
|
if (r)
|
|
1749
|
-
return { ...r, route:
|
|
1751
|
+
return { ...r, route: i };
|
|
1750
1752
|
}
|
|
1751
1753
|
return null;
|
|
1752
1754
|
};
|
|
1753
|
-
}
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
if (s == null)
|
|
1755
|
+
}, hs = (t) => {
|
|
1756
|
+
const e = Gn(Object.keys(t));
|
|
1757
|
+
return ce((n) => {
|
|
1758
|
+
const s = n.map((o) => {
|
|
1759
|
+
const i = e(o.pathname);
|
|
1760
|
+
if (i == null)
|
|
1760
1761
|
throw console.error("No route found for", o), new Error("No route found");
|
|
1761
1762
|
return {
|
|
1762
|
-
params:
|
|
1763
|
-
route:
|
|
1764
|
-
path:
|
|
1763
|
+
params: i.params,
|
|
1764
|
+
route: i.route,
|
|
1765
|
+
path: i.path,
|
|
1765
1766
|
search: o.search,
|
|
1766
1767
|
hash: o.hash
|
|
1767
1768
|
};
|
|
1768
1769
|
});
|
|
1769
|
-
return
|
|
1770
|
-
|
|
1770
|
+
return Ye(
|
|
1771
|
+
s.map((o) => [o.route, o]),
|
|
1771
1772
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1772
1773
|
t
|
|
1773
1774
|
);
|
|
1774
1775
|
});
|
|
1775
|
-
}
|
|
1776
|
+
};
|
|
1776
1777
|
export {
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1778
|
+
ts as Anchor,
|
|
1779
|
+
un as AsyncResultView,
|
|
1780
|
+
ss as AutoFocus,
|
|
1781
|
+
os as AutoSelect,
|
|
1782
|
+
us as ElementSize,
|
|
1783
|
+
rs as HTMLTitle,
|
|
1784
|
+
is as HiddenWhenEmpty,
|
|
1785
|
+
dn as InViewport,
|
|
1786
|
+
re as LocationProviderMarker,
|
|
1787
|
+
ls as PopOver,
|
|
1788
|
+
es as ProvideAppearance,
|
|
1789
|
+
Qn as ProvideLocation,
|
|
1790
|
+
Kn as ResultView,
|
|
1791
|
+
hs as Router,
|
|
1792
|
+
as as SelectOnFocus,
|
|
1793
|
+
ns as UseAppearance,
|
|
1794
|
+
ce as UseLocation,
|
|
1795
|
+
cs as WhenInViewport,
|
|
1796
|
+
fs as WindowSize,
|
|
1797
|
+
sn as _makeLocation,
|
|
1798
|
+
an as _makeLocationProp,
|
|
1799
|
+
Gn as _makeRouteMatcher,
|
|
1800
|
+
Yn as _parseRouteSegments,
|
|
1801
|
+
le as appearanceMarker,
|
|
1802
|
+
on as areLocationsEqual,
|
|
1803
|
+
rn as locationFromURL,
|
|
1804
|
+
Xn as matchesRoute,
|
|
1805
|
+
cn as setLocationFromUrl,
|
|
1806
|
+
ln as urlFromLocation
|
|
1805
1807
|
};
|