playlight-sdk 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/playlight-sdk.es.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
var __typeError = (msg) => {
|
|
2
|
+
throw TypeError(msg);
|
|
3
|
+
};
|
|
4
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
5
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
6
|
+
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
7
|
+
var _a, _PlayLightAPI_instances, e_fn, _b;
|
|
1
8
|
const e = false;
|
|
2
9
|
var t = Array.isArray, n = Array.prototype.indexOf, o = Array.from, i = Object.defineProperty, s = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyDescriptors, l = Object.prototype, c = Array.prototype, u = Object.getPrototypeOf;
|
|
3
10
|
function is_function(e2) {
|
|
@@ -11,7 +18,7 @@ function run(e2) {
|
|
|
11
18
|
function run_all(e2) {
|
|
12
19
|
for (var t2 = 0; t2 < e2.length; t2++) e2[t2]();
|
|
13
20
|
}
|
|
14
|
-
const
|
|
21
|
+
const f = 32, d = 64, p = 128, _ = 256, v = 512, g = 1024, h = 2048, m = 4096, b = 8192, y = 16384, $ = 65536, w = 1 << 20, x = Symbol("$state"), k = Symbol("legacy props"), C = Symbol("");
|
|
15
22
|
function equals(e2) {
|
|
16
23
|
return e2 === this.v;
|
|
17
24
|
}
|
|
@@ -21,25 +28,25 @@ function safe_not_equal(e2, t2) {
|
|
|
21
28
|
function safe_equals(e2) {
|
|
22
29
|
return !safe_not_equal(e2, this.v);
|
|
23
30
|
}
|
|
24
|
-
let
|
|
25
|
-
const M = Symbol()
|
|
31
|
+
let S = false;
|
|
32
|
+
const M = Symbol();
|
|
26
33
|
function lifecycle_outside_component(e2) {
|
|
27
34
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
28
35
|
}
|
|
29
|
-
let
|
|
36
|
+
let q = null;
|
|
30
37
|
function set_component_context(e2) {
|
|
31
|
-
|
|
38
|
+
q = e2;
|
|
32
39
|
}
|
|
33
40
|
function push(e2, t2 = false, n2) {
|
|
34
|
-
|
|
35
|
-
p:
|
|
41
|
+
q = {
|
|
42
|
+
p: q,
|
|
36
43
|
c: null,
|
|
37
44
|
e: null,
|
|
38
45
|
m: false,
|
|
39
46
|
s: e2,
|
|
40
47
|
x: null,
|
|
41
48
|
l: null
|
|
42
|
-
},
|
|
49
|
+
}, S && !t2 && (q.l = {
|
|
43
50
|
s: null,
|
|
44
51
|
u: null,
|
|
45
52
|
r1: [],
|
|
@@ -47,7 +54,7 @@ function push(e2, t2 = false, n2) {
|
|
|
47
54
|
});
|
|
48
55
|
}
|
|
49
56
|
function pop(e2) {
|
|
50
|
-
const t2 =
|
|
57
|
+
const t2 = q;
|
|
51
58
|
if (null !== t2) {
|
|
52
59
|
const e3 = t2.e;
|
|
53
60
|
if (null !== e3) {
|
|
@@ -62,12 +69,12 @@ function pop(e2) {
|
|
|
62
69
|
set_active_effect(n2), set_active_reaction(o2);
|
|
63
70
|
}
|
|
64
71
|
}
|
|
65
|
-
|
|
72
|
+
q = t2.p, t2.m = true;
|
|
66
73
|
}
|
|
67
74
|
return {};
|
|
68
75
|
}
|
|
69
76
|
function is_runes() {
|
|
70
|
-
return !
|
|
77
|
+
return !S || null !== q && null === q.l;
|
|
71
78
|
}
|
|
72
79
|
function source(e2, t2) {
|
|
73
80
|
return {
|
|
@@ -85,11 +92,11 @@ function state(e2) {
|
|
|
85
92
|
}
|
|
86
93
|
// @__NO_SIDE_EFFECTS__
|
|
87
94
|
function mutable_source(e2, t2 = false) {
|
|
88
|
-
var
|
|
95
|
+
var _a2;
|
|
89
96
|
const n2 = source(e2);
|
|
90
97
|
return t2 || (n2.equals = safe_equals), // bind the signal to the component context, in case we need to
|
|
91
98
|
// track updates to trigger beforeUpdate/afterUpdate callbacks
|
|
92
|
-
|
|
99
|
+
S && null !== q && null !== q.l && ((_a2 = q.l).s ?? (_a2.s = [])).push(n2), n2;
|
|
93
100
|
}
|
|
94
101
|
function mutable_state(e2, t2 = false) {
|
|
95
102
|
return /* @__PURE__ */ push_derived_source(/* @__PURE__ */ mutable_source(e2, t2));
|
|
@@ -117,11 +124,11 @@ function set(e2, t2) {
|
|
|
117
124
|
}(), internal_set(e2, t2);
|
|
118
125
|
}
|
|
119
126
|
function internal_set(e2, t2) {
|
|
120
|
-
return e2.equals(t2) || (e2.v, e2.v = t2, e2.wv = increment_write_version(), mark_reactions(e2,
|
|
127
|
+
return e2.equals(t2) || (e2.v, e2.v = t2, e2.wv = increment_write_version(), mark_reactions(e2, h), // It's possible that the current reaction might not have up-to-date dependencies
|
|
121
128
|
// whilst it's actively running. So in the case of ensuring it registers the reaction
|
|
122
129
|
// properly for itself, we need to ensure the current effect actually gets
|
|
123
130
|
// scheduled. i.e: `$effect(() => x++)`
|
|
124
|
-
is_runes() && null !== H && H.f &
|
|
131
|
+
is_runes() && null !== H && H.f & g && !(96 & H.f) && (null === U ? (
|
|
125
132
|
/** @param {null | Source[]} value */
|
|
126
133
|
function set_untracked_writes(e3) {
|
|
127
134
|
U = e3;
|
|
@@ -136,12 +143,12 @@ function mark_reactions(e2, t2) {
|
|
|
136
143
|
var n2 = e2.reactions;
|
|
137
144
|
if (null !== n2) for (var o2 = is_runes(), i2 = n2.length, s2 = 0; s2 < i2; s2++) {
|
|
138
145
|
var a2 = n2[s2], l2 = a2.f;
|
|
139
|
-
l2 &
|
|
146
|
+
l2 & h || // In legacy mode, skip the current effect to prevent infinite loops
|
|
140
147
|
(o2 || a2 !== H) && (set_signal_status(a2, t2), // If the signal a) was previously clean or b) is an unowned derived, then mark it
|
|
141
148
|
1280 & l2 && (2 & l2 ? mark_reactions(
|
|
142
149
|
/** @type {Derived} */
|
|
143
150
|
a2,
|
|
144
|
-
|
|
151
|
+
m
|
|
145
152
|
) : schedule_effect(
|
|
146
153
|
/** @type {Effect} */
|
|
147
154
|
a2
|
|
@@ -149,13 +156,13 @@ function mark_reactions(e2, t2) {
|
|
|
149
156
|
}
|
|
150
157
|
}
|
|
151
158
|
function proxy(e2, n2 = null, o2) {
|
|
152
|
-
if ("object" != typeof e2 || null === e2 ||
|
|
159
|
+
if ("object" != typeof e2 || null === e2 || x in e2) return e2;
|
|
153
160
|
const i2 = u(e2);
|
|
154
161
|
if (i2 !== l && i2 !== c) return e2;
|
|
155
|
-
var a2,
|
|
156
|
-
return
|
|
162
|
+
var a2, f2 = /* @__PURE__ */ new Map(), d2 = t(e2), p2 = source(0);
|
|
163
|
+
return d2 && // We need to create the length source eagerly to ensure that
|
|
157
164
|
// mutations to the array are properly synced with our proxy
|
|
158
|
-
|
|
165
|
+
f2.set("length", source(
|
|
159
166
|
/** @type {any[]} */
|
|
160
167
|
e2.length
|
|
161
168
|
)), new Proxy(
|
|
@@ -174,17 +181,17 @@ function proxy(e2, n2 = null, o2) {
|
|
|
174
181
|
function state_descriptors_fixed() {
|
|
175
182
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
176
183
|
}();
|
|
177
|
-
var o3 =
|
|
178
|
-
return void 0 === o3 ? (o3 = source(n3.value),
|
|
184
|
+
var o3 = f2.get(t2);
|
|
185
|
+
return void 0 === o3 ? (o3 = source(n3.value), f2.set(t2, o3)) : set(o3, proxy(n3.value, a2)), true;
|
|
179
186
|
},
|
|
180
187
|
deleteProperty(e3, t2) {
|
|
181
|
-
var n3 =
|
|
182
|
-
if (void 0 === n3) t2 in e3 &&
|
|
188
|
+
var n3 = f2.get(t2);
|
|
189
|
+
if (void 0 === n3) t2 in e3 && f2.set(t2, source(M));
|
|
183
190
|
else {
|
|
184
|
-
if (
|
|
191
|
+
if (d2 && "string" == typeof t2) {
|
|
185
192
|
var o3 = (
|
|
186
193
|
/** @type {Source<number>} */
|
|
187
|
-
|
|
194
|
+
f2.get("length")
|
|
188
195
|
), i3 = Number(t2);
|
|
189
196
|
Number.isInteger(i3) && i3 < o3.v && set(o3, i3);
|
|
190
197
|
}
|
|
@@ -193,12 +200,12 @@ function proxy(e2, n2 = null, o2) {
|
|
|
193
200
|
return true;
|
|
194
201
|
},
|
|
195
202
|
get(t2, n3, o3) {
|
|
196
|
-
var
|
|
197
|
-
if (n3 ===
|
|
198
|
-
var i3 =
|
|
203
|
+
var _a2;
|
|
204
|
+
if (n3 === x) return e2;
|
|
205
|
+
var i3 = f2.get(n3), l2 = n3 in t2;
|
|
199
206
|
if (
|
|
200
207
|
// create a source, but only if it's an own property and not a prototype property
|
|
201
|
-
void 0 !== i3 || l2 && !((
|
|
208
|
+
void 0 !== i3 || l2 && !((_a2 = s(t2, n3)) == null ? void 0 : _a2.writable) || (i3 = source(proxy(l2 ? t2[n3] : M, a2)), f2.set(n3, i3)), void 0 !== i3
|
|
202
209
|
) {
|
|
203
210
|
var c2 = get$1(i3);
|
|
204
211
|
return c2 === M ? void 0 : c2;
|
|
@@ -208,10 +215,10 @@ function proxy(e2, n2 = null, o2) {
|
|
|
208
215
|
getOwnPropertyDescriptor(e3, t2) {
|
|
209
216
|
var n3 = Reflect.getOwnPropertyDescriptor(e3, t2);
|
|
210
217
|
if (n3 && "value" in n3) {
|
|
211
|
-
var o3 =
|
|
218
|
+
var o3 = f2.get(t2);
|
|
212
219
|
o3 && (n3.value = get$1(o3));
|
|
213
220
|
} else if (void 0 === n3) {
|
|
214
|
-
var i3 =
|
|
221
|
+
var i3 = f2.get(t2), s2 = i3 == null ? void 0 : i3.v;
|
|
215
222
|
if (void 0 !== i3 && s2 !== M) return {
|
|
216
223
|
enumerable: true,
|
|
217
224
|
configurable: true,
|
|
@@ -222,30 +229,30 @@ function proxy(e2, n2 = null, o2) {
|
|
|
222
229
|
return n3;
|
|
223
230
|
},
|
|
224
231
|
has(e3, t2) {
|
|
225
|
-
var
|
|
226
|
-
if (t2 ===
|
|
227
|
-
var n3 =
|
|
228
|
-
if ((void 0 !== n3 || null !== H && (!o3 || ((
|
|
232
|
+
var _a2;
|
|
233
|
+
if (t2 === x) return true;
|
|
234
|
+
var n3 = f2.get(t2), o3 = void 0 !== n3 && n3.v !== M || Reflect.has(e3, t2);
|
|
235
|
+
if ((void 0 !== n3 || null !== H && (!o3 || ((_a2 = s(e3, t2)) == null ? void 0 : _a2.writable))) && (void 0 === n3 && (n3 = source(o3 ? proxy(e3[t2], a2) : M), f2.set(t2, n3)), get$1(n3) === M)) return false;
|
|
229
236
|
return o3;
|
|
230
237
|
},
|
|
231
238
|
set(e3, t2, n3, o3) {
|
|
232
|
-
var
|
|
233
|
-
var i3 =
|
|
234
|
-
if (
|
|
239
|
+
var _a2;
|
|
240
|
+
var i3 = f2.get(t2), l2 = t2 in e3;
|
|
241
|
+
if (d2 && "length" === t2) for (var c2 = n3; c2 < /** @type {Source<number>} */
|
|
235
242
|
i3.v; c2 += 1) {
|
|
236
|
-
var u2 =
|
|
243
|
+
var u2 = f2.get(c2 + "");
|
|
237
244
|
void 0 !== u2 ? set(u2, M) : c2 in e3 && // If the item exists in the original, we need to create a uninitialized source,
|
|
238
245
|
// else a later read of the property would result in a source being created with
|
|
239
246
|
// the value of the original item at that index.
|
|
240
|
-
(u2 = source(M),
|
|
247
|
+
(u2 = source(M), f2.set(c2 + "", u2));
|
|
241
248
|
}
|
|
242
|
-
void 0 === i3 ? l2 && !((
|
|
249
|
+
void 0 === i3 ? l2 && !((_a2 = s(e3, t2)) == null ? void 0 : _a2.writable) || (set(i3 = source(void 0), proxy(n3, a2)), f2.set(t2, i3)) : (l2 = i3.v !== M, set(i3, proxy(n3, a2)));
|
|
243
250
|
var _2 = Reflect.getOwnPropertyDescriptor(e3, t2);
|
|
244
251
|
if ((_2 == null ? void 0 : _2.set) && _2.set.call(o3, n3), !l2) {
|
|
245
|
-
if (
|
|
252
|
+
if (d2 && "string" == typeof t2) {
|
|
246
253
|
var v2 = (
|
|
247
254
|
/** @type {Source<number>} */
|
|
248
|
-
|
|
255
|
+
f2.get("length")
|
|
249
256
|
), g2 = Number(t2);
|
|
250
257
|
Number.isInteger(g2) && g2 >= v2.v && set(v2, g2 + 1);
|
|
251
258
|
}
|
|
@@ -256,10 +263,10 @@ function proxy(e2, n2 = null, o2) {
|
|
|
256
263
|
ownKeys(e3) {
|
|
257
264
|
get$1(p2);
|
|
258
265
|
var t2 = Reflect.ownKeys(e3).filter((e4) => {
|
|
259
|
-
var t3 =
|
|
266
|
+
var t3 = f2.get(e4);
|
|
260
267
|
return void 0 === t3 || t3.v !== M;
|
|
261
268
|
});
|
|
262
|
-
for (var [n3, o3] of
|
|
269
|
+
for (var [n3, o3] of f2) o3.v === M || n3 in e3 || t2.push(n3);
|
|
263
270
|
return t2;
|
|
264
271
|
},
|
|
265
272
|
setPrototypeOf() {
|
|
@@ -273,7 +280,7 @@ function proxy(e2, n2 = null, o2) {
|
|
|
273
280
|
function update_version(e2, t2 = 1) {
|
|
274
281
|
set(e2, e2.v + t2);
|
|
275
282
|
}
|
|
276
|
-
var
|
|
283
|
+
var I, T, P, O, j;
|
|
277
284
|
function create_text(e2 = "") {
|
|
278
285
|
return document.createTextNode(e2);
|
|
279
286
|
}
|
|
@@ -283,7 +290,7 @@ function get_first_child(e2) {
|
|
|
283
290
|
}
|
|
284
291
|
// @__NO_SIDE_EFFECTS__
|
|
285
292
|
function get_next_sibling(e2) {
|
|
286
|
-
return
|
|
293
|
+
return j.call(e2);
|
|
287
294
|
}
|
|
288
295
|
function child(e2, t2) {
|
|
289
296
|
return /* @__PURE__ */ get_first_child(e2);
|
|
@@ -310,13 +317,13 @@ function derived(e2) {
|
|
|
310
317
|
/** @type {Derived} */
|
|
311
318
|
F
|
|
312
319
|
) : null;
|
|
313
|
-
null === H || null !== n2 && n2.f &
|
|
320
|
+
null === H || null !== n2 && n2.f & _ ? t2 |= _ : (
|
|
314
321
|
// Since deriveds are evaluated lazily, any effects created inside them are
|
|
315
322
|
// created too late to ensure that the parent effect is added to the tree
|
|
316
|
-
H.f |=
|
|
323
|
+
H.f |= w
|
|
317
324
|
);
|
|
318
325
|
return {
|
|
319
|
-
ctx:
|
|
326
|
+
ctx: q,
|
|
320
327
|
deps: null,
|
|
321
328
|
effects: null,
|
|
322
329
|
equals,
|
|
@@ -372,7 +379,7 @@ function update_derived(e2) {
|
|
|
372
379
|
return t3;
|
|
373
380
|
}(e2)
|
|
374
381
|
);
|
|
375
|
-
set_signal_status(e2, (J || e2.f &
|
|
382
|
+
set_signal_status(e2, (J || e2.f & _) && null !== e2.deps ? m : g), e2.equals(t2) || (e2.v = t2, e2.wv = increment_write_version());
|
|
376
383
|
}
|
|
377
384
|
function validate_effect(e2) {
|
|
378
385
|
null === H && null === F && /**
|
|
@@ -382,60 +389,60 @@ function validate_effect(e2) {
|
|
|
382
389
|
*/
|
|
383
390
|
function effect_orphan(e3) {
|
|
384
391
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
385
|
-
}(), null !== F && F.f &
|
|
392
|
+
}(), null !== F && F.f & _ && null === H && /**
|
|
386
393
|
* Effect cannot be created inside a `$derived` value that was not itself created inside an effect
|
|
387
394
|
* @returns {never}
|
|
388
395
|
*/
|
|
389
396
|
function effect_in_unowned_derived() {
|
|
390
397
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
391
|
-
}(),
|
|
398
|
+
}(), z && function effect_in_teardown(e3) {
|
|
392
399
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
393
400
|
}();
|
|
394
401
|
}
|
|
395
402
|
function create_effect(e2, t2, n2, o2 = true) {
|
|
396
|
-
var i2 =
|
|
397
|
-
ctx:
|
|
403
|
+
var i2 = H, s2 = {
|
|
404
|
+
ctx: q,
|
|
398
405
|
deps: null,
|
|
399
406
|
nodes_start: null,
|
|
400
407
|
nodes_end: null,
|
|
401
|
-
f: e2 |
|
|
408
|
+
f: e2 | h,
|
|
402
409
|
first: null,
|
|
403
410
|
fn: t2,
|
|
404
411
|
last: null,
|
|
405
412
|
next: null,
|
|
406
|
-
parent: i2
|
|
413
|
+
parent: i2,
|
|
407
414
|
prev: null,
|
|
408
415
|
teardown: null,
|
|
409
416
|
transitions: null,
|
|
410
417
|
wv: 0
|
|
411
418
|
};
|
|
412
419
|
if (n2) try {
|
|
413
|
-
update_effect(
|
|
420
|
+
update_effect(s2), s2.f |= 32768;
|
|
414
421
|
} catch (e3) {
|
|
415
|
-
throw destroy_effect(
|
|
422
|
+
throw destroy_effect(s2), e3;
|
|
416
423
|
}
|
|
417
|
-
else null !== t2 && schedule_effect(
|
|
418
|
-
if (!(n2 && null ===
|
|
424
|
+
else null !== t2 && schedule_effect(s2);
|
|
425
|
+
if (!(n2 && null === s2.deps && null === s2.first && null === s2.nodes_start && null === s2.teardown && !(1048704 & s2.f)) && o2 && (null !== i2 && function push_effect(e3, t3) {
|
|
419
426
|
var n3 = t3.last;
|
|
420
427
|
null === n3 ? t3.last = t3.first = e3 : (n3.next = e3, e3.prev = n3, t3.last = e3);
|
|
421
|
-
}(
|
|
422
|
-
var
|
|
428
|
+
}(s2, i2), null !== F && 2 & F.f)) {
|
|
429
|
+
var a2 = (
|
|
423
430
|
/** @type {Derived} */
|
|
424
431
|
F
|
|
425
432
|
);
|
|
426
|
-
(
|
|
433
|
+
(a2.effects ?? (a2.effects = [])).push(s2);
|
|
427
434
|
}
|
|
428
|
-
return
|
|
435
|
+
return s2;
|
|
429
436
|
}
|
|
430
437
|
function teardown(e2) {
|
|
431
438
|
const t2 = create_effect(8, null, false);
|
|
432
|
-
return set_signal_status(t2,
|
|
439
|
+
return set_signal_status(t2, g), t2.teardown = e2, t2;
|
|
433
440
|
}
|
|
434
441
|
function user_effect(e2) {
|
|
435
|
-
if (validate_effect(), !(null !== H && !!(H.f &
|
|
442
|
+
if (validate_effect(), !(null !== H && !!(H.f & f) && null !== q && !q.m)) return effect(e2);
|
|
436
443
|
var t2 = (
|
|
437
444
|
/** @type {ComponentContext} */
|
|
438
|
-
|
|
445
|
+
q
|
|
439
446
|
);
|
|
440
447
|
(t2.e ?? (t2.e = [])).push({
|
|
441
448
|
fn: e2,
|
|
@@ -449,7 +456,7 @@ function effect(e2) {
|
|
|
449
456
|
function legacy_pre_effect(e2, t2) {
|
|
450
457
|
var n2 = (
|
|
451
458
|
/** @type {ComponentContextLegacy} */
|
|
452
|
-
|
|
459
|
+
q
|
|
453
460
|
), o2 = {
|
|
454
461
|
effect: null,
|
|
455
462
|
ran: false
|
|
@@ -463,13 +470,13 @@ function legacy_pre_effect(e2, t2) {
|
|
|
463
470
|
function legacy_pre_effect_reset() {
|
|
464
471
|
var e2 = (
|
|
465
472
|
/** @type {ComponentContextLegacy} */
|
|
466
|
-
|
|
473
|
+
q
|
|
467
474
|
);
|
|
468
475
|
render_effect(() => {
|
|
469
476
|
if (get$1(e2.l.r2)) {
|
|
470
477
|
for (var t2 of e2.l.r1) {
|
|
471
478
|
var n2 = t2.effect;
|
|
472
|
-
n2.f &
|
|
479
|
+
n2.f & g && set_signal_status(n2, m), check_dirtiness(n2) && update_effect(n2), t2.ran = false;
|
|
473
480
|
}
|
|
474
481
|
e2.l.r2.v = false;
|
|
475
482
|
}
|
|
@@ -491,7 +498,7 @@ function branch(e2, t2 = true) {
|
|
|
491
498
|
function execute_effect_teardown(e2) {
|
|
492
499
|
var t2 = e2.teardown;
|
|
493
500
|
if (null !== t2) {
|
|
494
|
-
const e3 =
|
|
501
|
+
const e3 = z, n2 = F;
|
|
495
502
|
set_is_destroying_effect(true), set_active_reaction(null);
|
|
496
503
|
try {
|
|
497
504
|
t2.call(null);
|
|
@@ -504,7 +511,10 @@ function destroy_effect_children(e2, t2 = false) {
|
|
|
504
511
|
var n2 = e2.first;
|
|
505
512
|
for (e2.first = e2.last = null; null !== n2; ) {
|
|
506
513
|
var o2 = n2.next;
|
|
507
|
-
|
|
514
|
+
n2.f & d ? (
|
|
515
|
+
// this is now an independent root
|
|
516
|
+
n2.parent = null
|
|
517
|
+
) : destroy_effect(n2, t2), n2 = o2;
|
|
508
518
|
}
|
|
509
519
|
}
|
|
510
520
|
function destroy_effect(e2, t2 = true) {
|
|
@@ -519,7 +529,7 @@ function destroy_effect(e2, t2 = true) {
|
|
|
519
529
|
}
|
|
520
530
|
n2 = true;
|
|
521
531
|
}
|
|
522
|
-
destroy_effect_children(e2, t2 && !n2), remove_reactions(e2, 0), set_signal_status(e2,
|
|
532
|
+
destroy_effect_children(e2, t2 && !n2), remove_reactions(e2, 0), set_signal_status(e2, y);
|
|
523
533
|
var a2 = e2.transitions;
|
|
524
534
|
if (null !== a2) for (const e3 of a2) e3.stop();
|
|
525
535
|
execute_effect_teardown(e2);
|
|
@@ -546,11 +556,11 @@ function run_out_transitions(e2, t2) {
|
|
|
546
556
|
} else t2();
|
|
547
557
|
}
|
|
548
558
|
function pause_children(e2, t2, n2) {
|
|
549
|
-
if (!(e2.f &
|
|
550
|
-
if (e2.f ^=
|
|
559
|
+
if (!(e2.f & b)) {
|
|
560
|
+
if (e2.f ^= b, null !== e2.transitions) for (const o3 of e2.transitions) (o3.is_global || n2) && t2.push(o3);
|
|
551
561
|
for (var o2 = e2.first; null !== o2; ) {
|
|
552
562
|
var i2 = o2.next;
|
|
553
|
-
pause_children(o2, t2, !!(!!(o2.f &
|
|
563
|
+
pause_children(o2, t2, !!(!!(o2.f & $) || !!(o2.f & f)) && n2), o2 = i2;
|
|
554
564
|
}
|
|
555
565
|
}
|
|
556
566
|
}
|
|
@@ -558,38 +568,38 @@ function resume_effect(e2) {
|
|
|
558
568
|
resume_children(e2, true);
|
|
559
569
|
}
|
|
560
570
|
function resume_children(e2, t2) {
|
|
561
|
-
if (e2.f &
|
|
562
|
-
e2.f ^=
|
|
571
|
+
if (e2.f & b) {
|
|
572
|
+
e2.f ^= b, // Ensure the effect is marked as clean again so that any dirty child
|
|
563
573
|
// effects can schedule themselves for execution
|
|
564
|
-
e2.f &
|
|
574
|
+
e2.f & g || (e2.f ^= g), // If a dependency of this effect changed while it was paused,
|
|
565
575
|
// schedule the effect to update
|
|
566
|
-
check_dirtiness(e2) && (set_signal_status(e2,
|
|
576
|
+
check_dirtiness(e2) && (set_signal_status(e2, h), schedule_effect(e2));
|
|
567
577
|
for (var n2 = e2.first; null !== n2; ) {
|
|
568
578
|
var o2 = n2.next;
|
|
569
|
-
resume_children(n2, !!(!!(n2.f &
|
|
579
|
+
resume_children(n2, !!(!!(n2.f & $) || !!(n2.f & f)) && t2), n2 = o2;
|
|
570
580
|
}
|
|
571
581
|
if (null !== e2.transitions) for (const n3 of e2.transitions) (n3.is_global || t2) && n3.in();
|
|
572
582
|
}
|
|
573
583
|
}
|
|
574
|
-
let
|
|
584
|
+
let E = [], N = [];
|
|
575
585
|
function run_micro_tasks() {
|
|
576
|
-
var e2 =
|
|
577
|
-
|
|
586
|
+
var e2 = E;
|
|
587
|
+
E = [], run_all(e2);
|
|
578
588
|
}
|
|
579
589
|
function queue_micro_task(e2) {
|
|
580
|
-
0 ===
|
|
590
|
+
0 === E.length && queueMicrotask(run_micro_tasks), E.push(e2);
|
|
581
591
|
}
|
|
582
592
|
function flush_tasks() {
|
|
583
|
-
|
|
593
|
+
E.length > 0 && run_micro_tasks(), N.length > 0 && function run_idle_tasks() {
|
|
584
594
|
var e2 = N;
|
|
585
595
|
N = [], run_all(e2);
|
|
586
596
|
}();
|
|
587
597
|
}
|
|
588
|
-
let
|
|
598
|
+
let A = false, B = false, D = null, W = false, z = false;
|
|
589
599
|
function set_is_destroying_effect(e2) {
|
|
590
|
-
|
|
600
|
+
z = e2;
|
|
591
601
|
}
|
|
592
|
-
let
|
|
602
|
+
let L = [], F = null, G = false;
|
|
593
603
|
function set_active_reaction(e2) {
|
|
594
604
|
F = e2;
|
|
595
605
|
}
|
|
@@ -604,54 +614,54 @@ function increment_write_version() {
|
|
|
604
614
|
return ++Z;
|
|
605
615
|
}
|
|
606
616
|
function check_dirtiness(e2) {
|
|
607
|
-
var
|
|
617
|
+
var _a2;
|
|
608
618
|
var t2 = e2.f;
|
|
609
|
-
if (t2 &
|
|
610
|
-
if (t2 &
|
|
611
|
-
var n2 = e2.deps, o2 = !!(t2 &
|
|
619
|
+
if (t2 & h) return true;
|
|
620
|
+
if (t2 & m) {
|
|
621
|
+
var n2 = e2.deps, o2 = !!(t2 & _);
|
|
612
622
|
if (null !== n2) {
|
|
613
|
-
var i2, s2, a2 = !!(t2 &
|
|
623
|
+
var i2, s2, a2 = !!(t2 & v), l2 = o2 && null !== H && !J, c2 = n2.length;
|
|
614
624
|
if (a2 || l2) {
|
|
615
625
|
var u2 = (
|
|
616
626
|
/** @type {Derived} */
|
|
617
627
|
e2
|
|
618
|
-
),
|
|
628
|
+
), f2 = u2.parent;
|
|
619
629
|
for (i2 = 0; i2 < c2; i2++) s2 = n2[i2], // We always re-add all reactions (even duplicates) if the derived was
|
|
620
630
|
// previously disconnected, however we don't if it was unowned as we
|
|
621
631
|
// de-duplicate dependencies in that case
|
|
622
|
-
!a2 && ((
|
|
623
|
-
a2 && (u2.f ^=
|
|
632
|
+
!a2 && ((_a2 = s2 == null ? void 0 : s2.reactions) == null ? void 0 : _a2.includes(u2)) || (s2.reactions ?? (s2.reactions = [])).push(u2);
|
|
633
|
+
a2 && (u2.f ^= v), // If the unowned derived is now fully connected to the graph again (it's unowned and reconnected, has a parent
|
|
624
634
|
// and the parent is not unowned), then we can mark it as connected again, removing the need for the unowned
|
|
625
635
|
// flag
|
|
626
|
-
!l2 || null ===
|
|
636
|
+
!l2 || null === f2 || f2.f & _ || (u2.f ^= _);
|
|
627
637
|
}
|
|
628
638
|
for (i2 = 0; i2 < c2; i2++) if (check_dirtiness(s2 = n2[i2]) && update_derived(
|
|
629
639
|
/** @type {Derived} */
|
|
630
640
|
s2
|
|
631
641
|
), s2.wv > e2.wv) return true;
|
|
632
642
|
}
|
|
633
|
-
o2 && (null === H || J) || set_signal_status(e2,
|
|
643
|
+
o2 && (null === H || J) || set_signal_status(e2, g);
|
|
634
644
|
}
|
|
635
645
|
return false;
|
|
636
646
|
}
|
|
637
647
|
function handle_error(e2, t2, n2, o2) {
|
|
638
|
-
if (
|
|
639
|
-
if (null === n2 && (
|
|
648
|
+
if (A) {
|
|
649
|
+
if (null === n2 && (A = false), /**
|
|
640
650
|
* @param {Effect} effect
|
|
641
651
|
*/
|
|
642
652
|
function should_rethrow_error(e3) {
|
|
643
|
-
return !(e3.f &
|
|
653
|
+
return !(e3.f & y || null !== e3.parent && e3.parent.f & p);
|
|
644
654
|
}(t2)) throw e2;
|
|
645
|
-
} else null !== n2 && (
|
|
655
|
+
} else null !== n2 && (A = true), function propagate_error(e3, t3) {
|
|
646
656
|
for (var n3 = t3; null !== n3; ) {
|
|
647
|
-
if (n3.f &
|
|
657
|
+
if (n3.f & p) try {
|
|
648
658
|
return void n3.fn(e3);
|
|
649
659
|
} catch {
|
|
650
|
-
n3.f ^=
|
|
660
|
+
n3.f ^= p;
|
|
651
661
|
}
|
|
652
662
|
n3 = n3.parent;
|
|
653
663
|
}
|
|
654
|
-
throw
|
|
664
|
+
throw A = false, e3;
|
|
655
665
|
}(e2, t2);
|
|
656
666
|
}
|
|
657
667
|
function schedule_possible_effect_self_invalidation(e2, t2, n2 = true) {
|
|
@@ -663,36 +673,36 @@ function schedule_possible_effect_self_invalidation(e2, t2, n2 = true) {
|
|
|
663
673
|
s2,
|
|
664
674
|
t2,
|
|
665
675
|
false
|
|
666
|
-
) : t2 === s2 && (n2 ? set_signal_status(s2,
|
|
676
|
+
) : t2 === s2 && (n2 ? set_signal_status(s2, h) : s2.f & g && set_signal_status(s2, m), schedule_effect(
|
|
667
677
|
/** @type {Effect} */
|
|
668
678
|
s2
|
|
669
679
|
));
|
|
670
680
|
}
|
|
671
681
|
}
|
|
672
682
|
function update_reaction(e2) {
|
|
673
|
-
var
|
|
674
|
-
var t2 = V, n2 = K, o2 = U, i2 = F, s2 = J, a2 = R, l2 =
|
|
683
|
+
var _a2;
|
|
684
|
+
var t2 = V, n2 = K, o2 = U, i2 = F, s2 = J, a2 = R, l2 = q, c2 = G, u2 = e2.f;
|
|
675
685
|
V = /** @type {null | Value[]} */
|
|
676
|
-
null, K = 0, U = null, J = !!(u2 &
|
|
686
|
+
null, K = 0, U = null, J = !!(u2 & _) && (G || !W || null === F), F = 96 & u2 ? null : e2, R = null, set_component_context(e2.ctx), G = false, Y++;
|
|
677
687
|
try {
|
|
678
|
-
var
|
|
688
|
+
var f2 = (
|
|
679
689
|
/** @type {Function} */
|
|
680
690
|
/** @type {Function} */
|
|
681
691
|
(0, e2.fn)()
|
|
682
|
-
),
|
|
692
|
+
), d2 = e2.deps;
|
|
683
693
|
if (null !== V) {
|
|
684
|
-
var
|
|
685
|
-
if (remove_reactions(e2, K), null !==
|
|
686
|
-
else e2.deps =
|
|
687
|
-
if (!J) for (
|
|
688
|
-
} else null !==
|
|
689
|
-
if (is_runes() && null !== U && !G && null !==
|
|
690
|
-
U.length;
|
|
691
|
-
U[
|
|
694
|
+
var p2;
|
|
695
|
+
if (remove_reactions(e2, K), null !== d2 && K > 0) for (d2.length = K + V.length, p2 = 0; p2 < V.length; p2++) d2[K + p2] = V[p2];
|
|
696
|
+
else e2.deps = d2 = V;
|
|
697
|
+
if (!J) for (p2 = K; p2 < d2.length; p2++) ((_a2 = d2[p2]).reactions ?? (_a2.reactions = [])).push(e2);
|
|
698
|
+
} else null !== d2 && K < d2.length && (remove_reactions(e2, K), d2.length = K);
|
|
699
|
+
if (is_runes() && null !== U && !G && null !== d2 && !(6146 & e2.f)) for (p2 = 0; p2 < /** @type {Source[]} */
|
|
700
|
+
U.length; p2++) schedule_possible_effect_self_invalidation(
|
|
701
|
+
U[p2],
|
|
692
702
|
/** @type {Effect} */
|
|
693
703
|
e2
|
|
694
704
|
);
|
|
695
|
-
return null !== i2 && Y++,
|
|
705
|
+
return null !== i2 && Y++, f2;
|
|
696
706
|
} finally {
|
|
697
707
|
V = t2, K = n2, U = o2, F = i2, J = s2, R = a2, set_component_context(l2), G = c2;
|
|
698
708
|
}
|
|
@@ -712,9 +722,9 @@ function remove_reaction(e2, t2) {
|
|
|
712
722
|
null === o2 && 2 & t2.f && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
713
723
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
714
724
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
715
|
-
(null === V || !V.includes(t2)) && (set_signal_status(t2,
|
|
725
|
+
(null === V || !V.includes(t2)) && (set_signal_status(t2, m), // If we are working with a derived that is owned by an effect, then mark it as being
|
|
716
726
|
// disconnected.
|
|
717
|
-
768 & t2.f || (t2.f ^=
|
|
727
|
+
768 & t2.f || (t2.f ^= v), // Disconnect any reactions owned by this reaction
|
|
718
728
|
destroy_derived_effects(
|
|
719
729
|
/** @type {Derived} **/
|
|
720
730
|
t2
|
|
@@ -730,15 +740,15 @@ function remove_reactions(e2, t2) {
|
|
|
730
740
|
}
|
|
731
741
|
function update_effect(t2) {
|
|
732
742
|
var n2 = t2.f;
|
|
733
|
-
if (!(n2 &
|
|
734
|
-
set_signal_status(t2,
|
|
735
|
-
var o2 = H, i2 =
|
|
736
|
-
H = t2,
|
|
743
|
+
if (!(n2 & y)) {
|
|
744
|
+
set_signal_status(t2, g);
|
|
745
|
+
var o2 = H, i2 = q, s2 = W;
|
|
746
|
+
H = t2, W = true;
|
|
737
747
|
try {
|
|
738
748
|
16 & n2 ? function destroy_block_effect_children(e2) {
|
|
739
749
|
for (var t3 = e2.first; null !== t3; ) {
|
|
740
750
|
var n3 = t3.next;
|
|
741
|
-
t3.f &
|
|
751
|
+
t3.f & f || destroy_effect(t3), t3 = n3;
|
|
742
752
|
}
|
|
743
753
|
}(t2) : destroy_effect_children(t2), execute_effect_teardown(t2);
|
|
744
754
|
var a2 = update_reaction(t2);
|
|
@@ -748,7 +758,7 @@ function update_effect(t2) {
|
|
|
748
758
|
} catch (e2) {
|
|
749
759
|
handle_error(e2, t2, o2, i2 || t2.ctx);
|
|
750
760
|
} finally {
|
|
751
|
-
|
|
761
|
+
W = s2, H = o2;
|
|
752
762
|
}
|
|
753
763
|
}
|
|
754
764
|
}
|
|
@@ -758,23 +768,24 @@ function infinite_loop_guard() {
|
|
|
758
768
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
759
769
|
}();
|
|
760
770
|
} catch (e2) {
|
|
761
|
-
if (null ===
|
|
762
|
-
handle_error(e2,
|
|
771
|
+
if (null === D) throw e2;
|
|
772
|
+
handle_error(e2, D, null);
|
|
763
773
|
}
|
|
764
774
|
}
|
|
765
775
|
function flush_queued_root_effects() {
|
|
776
|
+
var e2 = W;
|
|
766
777
|
try {
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
778
|
+
var t2 = 0;
|
|
779
|
+
for (W = true; L.length > 0; ) {
|
|
780
|
+
t2++ > 1e3 && infinite_loop_guard();
|
|
781
|
+
var n2 = L, o2 = n2.length;
|
|
782
|
+
L = [];
|
|
783
|
+
for (var i2 = 0; i2 < o2; i2++) {
|
|
784
|
+
flush_queued_effects(process_effects(n2[i2]));
|
|
774
785
|
}
|
|
775
786
|
}
|
|
776
787
|
} finally {
|
|
777
|
-
|
|
788
|
+
B = false, W = e2, D = null;
|
|
778
789
|
}
|
|
779
790
|
}
|
|
780
791
|
function flush_queued_effects(e2) {
|
|
@@ -800,22 +811,22 @@ function flush_queued_effects(e2) {
|
|
|
800
811
|
}
|
|
801
812
|
}
|
|
802
813
|
function schedule_effect(e2) {
|
|
803
|
-
|
|
804
|
-
for (var t2 =
|
|
814
|
+
B || (B = true, queueMicrotask(flush_queued_root_effects));
|
|
815
|
+
for (var t2 = D = e2; null !== t2.parent; ) {
|
|
805
816
|
var n2 = (t2 = t2.parent).f;
|
|
806
817
|
if (96 & n2) {
|
|
807
|
-
if (!(n2 &
|
|
808
|
-
t2.f ^=
|
|
818
|
+
if (!(n2 & g)) return;
|
|
819
|
+
t2.f ^= g;
|
|
809
820
|
}
|
|
810
821
|
}
|
|
811
|
-
|
|
822
|
+
L.push(t2);
|
|
812
823
|
}
|
|
813
824
|
function process_effects(e2) {
|
|
814
|
-
for (var t2 = [], n2 = e2
|
|
815
|
-
var o2 = n2.f, i2 = !!(
|
|
816
|
-
if (!(i2 && !!(o2 &
|
|
825
|
+
for (var t2 = [], n2 = e2; null !== n2; ) {
|
|
826
|
+
var o2 = n2.f, i2 = !!(96 & o2);
|
|
827
|
+
if (!(i2 && !!(o2 & g) || o2 & b)) {
|
|
817
828
|
if (4 & o2) t2.push(n2);
|
|
818
|
-
else if (i2) n2.f ^=
|
|
829
|
+
else if (i2) n2.f ^= g;
|
|
819
830
|
else {
|
|
820
831
|
var s2 = F;
|
|
821
832
|
try {
|
|
@@ -841,7 +852,7 @@ async function tick() {
|
|
|
841
852
|
await Promise.resolve(), // By calling flushSync we guarantee that any pending state changes are applied after one tick.
|
|
842
853
|
// TODO look into whether we can make flushing subsequent updates synchronously in the future.
|
|
843
854
|
function flushSync(e2) {
|
|
844
|
-
for (flush_tasks();
|
|
855
|
+
for (flush_tasks(); L.length > 0; ) B = true, flush_queued_root_effects(), flush_tasks();
|
|
845
856
|
}();
|
|
846
857
|
}
|
|
847
858
|
function get$1(e2) {
|
|
@@ -854,10 +865,10 @@ function get$1(e2) {
|
|
|
854
865
|
/** @type {Derived} */
|
|
855
866
|
e2
|
|
856
867
|
), o2 = n2.parent;
|
|
857
|
-
null === o2 || o2.f &
|
|
868
|
+
null === o2 || o2.f & _ || // If the derived is owned by another derived then mark it as unowned
|
|
858
869
|
// as the derived value might have been referenced in a different context
|
|
859
870
|
// since and thus its parent might not be its true owner anymore
|
|
860
|
-
(n2.f ^=
|
|
871
|
+
(n2.f ^= _);
|
|
861
872
|
}
|
|
862
873
|
} else {
|
|
863
874
|
null !== R && R.includes(e2) && function state_unsafe_local_read() {
|
|
@@ -889,10 +900,10 @@ function set_signal_status(e2, t2) {
|
|
|
889
900
|
}
|
|
890
901
|
function deep_read_state(e2) {
|
|
891
902
|
if ("object" == typeof e2 && e2 && !(e2 instanceof EventTarget)) {
|
|
892
|
-
if (
|
|
903
|
+
if (x in e2) deep_read(e2);
|
|
893
904
|
else if (!Array.isArray(e2)) for (let t2 in e2) {
|
|
894
905
|
const n2 = e2[t2];
|
|
895
|
-
"object" == typeof n2 && n2 &&
|
|
906
|
+
"object" == typeof n2 && n2 && x in n2 && deep_read(n2);
|
|
896
907
|
}
|
|
897
908
|
}
|
|
898
909
|
}
|
|
@@ -975,13 +986,13 @@ function listen_to_event_and_reset_event(e2, t2, n2, o2 = n2) {
|
|
|
975
986
|
"reset",
|
|
976
987
|
(e3) => {
|
|
977
988
|
Promise.resolve().then(() => {
|
|
978
|
-
var
|
|
989
|
+
var _a2;
|
|
979
990
|
if (!e3.defaultPrevented) for (
|
|
980
991
|
const t3 of
|
|
981
992
|
/**@type {HTMLFormElement} */
|
|
982
993
|
e3.target.elements
|
|
983
994
|
)
|
|
984
|
-
(
|
|
995
|
+
(_a2 = t3.__on_r) == null ? void 0 : _a2.call(t3);
|
|
985
996
|
});
|
|
986
997
|
},
|
|
987
998
|
// In the capture phase to guarantee we get noticed of it (no possiblity of stopPropagation)
|
|
@@ -1015,23 +1026,23 @@ function delegate(e2) {
|
|
|
1015
1026
|
for (var n2 of ie) n2(e2);
|
|
1016
1027
|
}
|
|
1017
1028
|
function handle_event_propagation(e2) {
|
|
1018
|
-
var
|
|
1029
|
+
var _a2;
|
|
1019
1030
|
var n2 = this, o2 = (
|
|
1020
1031
|
/** @type {Node} */
|
|
1021
1032
|
n2.ownerDocument
|
|
1022
|
-
), s2 = e2.type, a2 = ((
|
|
1033
|
+
), s2 = e2.type, a2 = ((_a2 = e2.composedPath) == null ? void 0 : _a2.call(e2)) || [], l2 = (
|
|
1023
1034
|
/** @type {null | Element} */
|
|
1024
1035
|
a2[0] || e2.target
|
|
1025
1036
|
), c2 = 0, u2 = e2.__root;
|
|
1026
1037
|
if (u2) {
|
|
1027
|
-
var
|
|
1028
|
-
if (-1 !==
|
|
1038
|
+
var f2 = a2.indexOf(u2);
|
|
1039
|
+
if (-1 !== f2 && (n2 === document || n2 === /** @type {any} */
|
|
1029
1040
|
window))
|
|
1030
1041
|
return void (e2.__root = n2);
|
|
1031
|
-
var
|
|
1032
|
-
if (-1 ===
|
|
1042
|
+
var d2 = a2.indexOf(n2);
|
|
1043
|
+
if (-1 === d2)
|
|
1033
1044
|
return;
|
|
1034
|
-
|
|
1045
|
+
f2 <= d2 && (c2 = f2);
|
|
1035
1046
|
}
|
|
1036
1047
|
if ((l2 = /** @type {Element} */
|
|
1037
1048
|
a2[c2] || e2.target) !== n2) {
|
|
@@ -1047,7 +1058,7 @@ function handle_event_propagation(e2) {
|
|
|
1047
1058
|
l2.host || null;
|
|
1048
1059
|
try {
|
|
1049
1060
|
var m2 = l2["__" + s2];
|
|
1050
|
-
if (
|
|
1061
|
+
if (null != m2 && (!/** @type {any} */
|
|
1051
1062
|
l2.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1052
1063
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1053
1064
|
e2.target === l2)) if (t(m2)) {
|
|
@@ -1155,16 +1166,16 @@ function mount(e2, t2) {
|
|
|
1155
1166
|
* where these globals are not available while avoiding a separate server entry point
|
|
1156
1167
|
*/
|
|
1157
1168
|
function init_operations() {
|
|
1158
|
-
if (void 0 ===
|
|
1159
|
-
|
|
1169
|
+
if (void 0 === I) {
|
|
1170
|
+
I = window, T = document, P = /Firefox/.test(navigator.userAgent);
|
|
1160
1171
|
var e4 = Element.prototype, t4 = Node.prototype;
|
|
1161
1172
|
O = s(t4, "firstChild").get, // @ts-ignore
|
|
1162
|
-
|
|
1173
|
+
j = s(t4, "nextSibling").get, // the following assignments improve perf of lookups on DOM nodes
|
|
1163
1174
|
// @ts-expect-error
|
|
1164
1175
|
e4.__click = void 0, // @ts-expect-error
|
|
1165
1176
|
e4.__className = void 0, // @ts-expect-error
|
|
1166
1177
|
e4.__attributes = null, // @ts-expect-error
|
|
1167
|
-
e4.
|
|
1178
|
+
e4.__style = void 0, // @ts-expect-error
|
|
1168
1179
|
e4.__e = void 0, // @ts-expect-error
|
|
1169
1180
|
Text.prototype.__t = void 0;
|
|
1170
1181
|
}
|
|
@@ -1190,14 +1201,14 @@ function mount(e2, t2) {
|
|
|
1190
1201
|
}
|
|
1191
1202
|
};
|
|
1192
1203
|
event_handle(o(oe)), ie.add(event_handle);
|
|
1193
|
-
var
|
|
1204
|
+
var f2 = void 0, p2 = (
|
|
1194
1205
|
/**
|
|
1195
1206
|
* An effect root whose children can transition out
|
|
1196
1207
|
* @param {() => void} fn
|
|
1197
1208
|
* @returns {(options?: { outro?: boolean }) => Promise<void>}
|
|
1198
1209
|
*/
|
|
1199
1210
|
function component_root(e4) {
|
|
1200
|
-
const t4 = create_effect(
|
|
1211
|
+
const t4 = create_effect(d, e4, true);
|
|
1201
1212
|
return (e5 = {}) => new Promise((n3) => {
|
|
1202
1213
|
e5.outro ? pause_effect(t4, () => {
|
|
1203
1214
|
destroy_effect(t4), n3(void 0);
|
|
@@ -1207,13 +1218,13 @@ function mount(e2, t2) {
|
|
|
1207
1218
|
var o2 = n2 ?? t3.appendChild(create_text());
|
|
1208
1219
|
return branch(() => {
|
|
1209
1220
|
l2 && (push({}), /** @type {ComponentContext} */
|
|
1210
|
-
|
|
1221
|
+
q.c = l2);
|
|
1211
1222
|
a2 && // We can't spread the object or else we'd lose the state proxy stuff, if it is one
|
|
1212
1223
|
/** @type {any} */
|
|
1213
1224
|
(i2.$$events = a2), se = c2, // @ts-expect-error the public typings are not what the actual function looks like
|
|
1214
|
-
|
|
1225
|
+
f2 = e3(o2, i2) || {}, se = true, l2 && pop();
|
|
1215
1226
|
}), () => {
|
|
1216
|
-
var
|
|
1227
|
+
var _a2;
|
|
1217
1228
|
for (var e4 of u2) {
|
|
1218
1229
|
t3.removeEventListener(e4, handle_event_propagation);
|
|
1219
1230
|
var i3 = (
|
|
@@ -1222,29 +1233,29 @@ function mount(e2, t2) {
|
|
|
1222
1233
|
);
|
|
1223
1234
|
0 == --i3 ? (document.removeEventListener(e4, handle_event_propagation), ae.delete(e4)) : ae.set(e4, i3);
|
|
1224
1235
|
}
|
|
1225
|
-
ie.delete(event_handle), o2 !== n2 && ((
|
|
1236
|
+
ie.delete(event_handle), o2 !== n2 && ((_a2 = o2.parentNode) == null ? void 0 : _a2.removeChild(o2));
|
|
1226
1237
|
};
|
|
1227
1238
|
})
|
|
1228
1239
|
);
|
|
1229
|
-
return le.set(
|
|
1240
|
+
return le.set(f2, p2), f2;
|
|
1230
1241
|
}(e2, t2);
|
|
1231
1242
|
}
|
|
1232
1243
|
const ae = /* @__PURE__ */ new Map();
|
|
1233
1244
|
let le = /* @__PURE__ */ new WeakMap();
|
|
1234
|
-
function if_block(e2, t2, n2 =
|
|
1235
|
-
var
|
|
1245
|
+
function if_block(e2, t2, [n2, o2] = [0, 0]) {
|
|
1246
|
+
var i2 = e2, s2 = null, a2 = null, l2 = M, c2 = false;
|
|
1236
1247
|
const set_branch = (e3, t3 = true) => {
|
|
1237
|
-
|
|
1248
|
+
c2 = true, update_branch(t3, e3);
|
|
1238
1249
|
}, update_branch = (e3, t3) => {
|
|
1239
|
-
|
|
1250
|
+
l2 !== (l2 = e3) && (l2 ? (s2 ? resume_effect(s2) : t3 && (s2 = branch(() => t3(i2))), a2 && pause_effect(a2, () => {
|
|
1251
|
+
a2 = null;
|
|
1252
|
+
})) : (a2 ? resume_effect(a2) : t3 && (a2 = branch(() => t3(i2, [n2 + 1, o2]))), s2 && pause_effect(s2, () => {
|
|
1240
1253
|
s2 = null;
|
|
1241
|
-
})) : (s2 ? resume_effect(s2) : t3 && (s2 = branch(() => t3(o2))), i2 && pause_effect(i2, () => {
|
|
1242
|
-
i2 = null;
|
|
1243
1254
|
})));
|
|
1244
1255
|
};
|
|
1245
1256
|
block(() => {
|
|
1246
|
-
|
|
1247
|
-
}, n2 ?
|
|
1257
|
+
c2 = false, t2(set_branch), c2 || update_branch(null, null);
|
|
1258
|
+
}, n2 > 0 ? $ : 0);
|
|
1248
1259
|
}
|
|
1249
1260
|
let ce = null;
|
|
1250
1261
|
function set_current_each_item(e2) {
|
|
@@ -1261,13 +1272,13 @@ function each(e2, n2, i2, s2, a2, l2 = null) {
|
|
|
1261
1272
|
};
|
|
1262
1273
|
!(4 & n2) || (c2 = /** @type {Element} */
|
|
1263
1274
|
e2.appendChild(create_text()));
|
|
1264
|
-
var
|
|
1275
|
+
var f2 = null, d2 = false, p2 = /* @__PURE__ */ derived_safe_equal(() => {
|
|
1265
1276
|
var e3 = i2();
|
|
1266
1277
|
return t(e3) ? e3 : null == e3 ? [] : o(e3);
|
|
1267
1278
|
});
|
|
1268
1279
|
block(() => {
|
|
1269
1280
|
var e3 = get$1(p2), t2 = e3.length;
|
|
1270
|
-
|
|
1281
|
+
d2 && 0 === t2 || (d2 = 0 === t2, /**
|
|
1271
1282
|
* Add, remove, or reorder items output by an each block as its input changes
|
|
1272
1283
|
* @template V
|
|
1273
1284
|
* @param {Array<V>} array
|
|
@@ -1280,25 +1291,25 @@ function each(e2, n2, i2, s2, a2, l2 = null) {
|
|
|
1280
1291
|
* @returns {void}
|
|
1281
1292
|
*/
|
|
1282
1293
|
function reconcile(e4, t3, n3, i3, s3, a3, l3) {
|
|
1283
|
-
var
|
|
1284
|
-
var c3, u3,
|
|
1285
|
-
if (v2) for (_2 = 0; _2 < h2; _2 += 1)
|
|
1286
|
-
for (_2 = 0; _2 < h2; _2 += 1) if (
|
|
1287
|
-
if (g2 && update_item(p3,
|
|
1294
|
+
var _a2, _b2, _c, _d;
|
|
1295
|
+
var c3, u3, f3, d3, p3, _2, v2 = !!(8 & s3), g2 = !!(3 & s3), h2 = e4.length, m2 = t3.items, y2 = t3.first, $2 = y2, w2 = null, x2 = [], k2 = [];
|
|
1296
|
+
if (v2) for (_2 = 0; _2 < h2; _2 += 1) d3 = a3(f3 = e4[_2], _2), void 0 !== (p3 = m2.get(d3)) && ((_a2 = p3.a) == null ? void 0 : _a2.measure(), (u3 ?? (u3 = /* @__PURE__ */ new Set())).add(p3));
|
|
1297
|
+
for (_2 = 0; _2 < h2; _2 += 1) if (d3 = a3(f3 = e4[_2], _2), void 0 !== (p3 = m2.get(d3))) {
|
|
1298
|
+
if (g2 && update_item(p3, f3, _2, s3), p3.e.f & b && (resume_effect(p3.e), v2 && ((_b2 = p3.a) == null ? void 0 : _b2.unfix(), (u3 ?? (u3 = /* @__PURE__ */ new Set())).delete(p3))), p3 !== $2) {
|
|
1288
1299
|
if (void 0 !== c3 && c3.has(p3)) {
|
|
1289
1300
|
if (x2.length < k2.length) {
|
|
1290
|
-
var C2,
|
|
1291
|
-
w2 =
|
|
1292
|
-
var
|
|
1293
|
-
for (C2 = 0; C2 < x2.length; C2 += 1) move(x2[C2],
|
|
1301
|
+
var C2, S2 = k2[0];
|
|
1302
|
+
w2 = S2.prev;
|
|
1303
|
+
var M2 = x2[0], q2 = x2[x2.length - 1];
|
|
1304
|
+
for (C2 = 0; C2 < x2.length; C2 += 1) move(x2[C2], S2, n3);
|
|
1294
1305
|
for (C2 = 0; C2 < k2.length; C2 += 1) c3.delete(k2[C2]);
|
|
1295
|
-
link(t3,
|
|
1306
|
+
link(t3, M2.prev, q2.next), link(t3, w2, M2), link(t3, q2, S2), $2 = S2, w2 = q2, _2 -= 1, x2 = [], k2 = [];
|
|
1296
1307
|
} else
|
|
1297
1308
|
c3.delete(p3), move(p3, $2, n3), link(t3, p3.prev, p3.next), link(t3, p3, null === w2 ? t3.first : w2.next), link(t3, w2, p3), w2 = p3;
|
|
1298
1309
|
continue;
|
|
1299
1310
|
}
|
|
1300
|
-
for (x2 = [], k2 = []; null !== $2 && $2.k !==
|
|
1301
|
-
$2.e.f &
|
|
1311
|
+
for (x2 = [], k2 = []; null !== $2 && $2.k !== d3; )
|
|
1312
|
+
$2.e.f & b || (c3 ?? (c3 = /* @__PURE__ */ new Set())).add($2), k2.push($2), $2 = $2.next;
|
|
1302
1313
|
if (null === $2) continue;
|
|
1303
1314
|
p3 = $2;
|
|
1304
1315
|
}
|
|
@@ -1307,17 +1318,17 @@ function each(e2, n2, i2, s2, a2, l2 = null) {
|
|
|
1307
1318
|
w2 = create_item($2 ? (
|
|
1308
1319
|
/** @type {TemplateNode} */
|
|
1309
1320
|
$2.e.nodes_start
|
|
1310
|
-
) : n3, t3, w2, null === w2 ? t3.first : w2.next,
|
|
1321
|
+
) : n3, t3, w2, null === w2 ? t3.first : w2.next, f3, d3, _2, i3, s3, l3), m2.set(d3, w2), x2 = [], k2 = [], $2 = w2.next;
|
|
1311
1322
|
}
|
|
1312
1323
|
if (null !== $2 || void 0 !== c3) {
|
|
1313
|
-
for (var
|
|
1314
|
-
$2.e.f &
|
|
1315
|
-
var T2 =
|
|
1324
|
+
for (var I2 = void 0 === c3 ? [] : o(c3); null !== $2; )
|
|
1325
|
+
$2.e.f & b || I2.push($2), $2 = $2.next;
|
|
1326
|
+
var T2 = I2.length;
|
|
1316
1327
|
if (T2 > 0) {
|
|
1317
1328
|
var P2 = 4 & s3 && 0 === h2 ? n3 : null;
|
|
1318
1329
|
if (v2) {
|
|
1319
|
-
for (_2 = 0; _2 < T2; _2 += 1) (_c =
|
|
1320
|
-
for (_2 = 0; _2 < T2; _2 += 1) (_d =
|
|
1330
|
+
for (_2 = 0; _2 < T2; _2 += 1) (_c = I2[_2].a) == null ? void 0 : _c.measure();
|
|
1331
|
+
for (_2 = 0; _2 < T2; _2 += 1) (_d = I2[_2].a) == null ? void 0 : _d.fix();
|
|
1321
1332
|
}
|
|
1322
1333
|
!function pause_effects(e5, t4, n4, o2) {
|
|
1323
1334
|
for (var i4 = [], s4 = t4.length, a4 = 0; a4 < s4; a4++) pause_children(t4[a4].e, i4, true);
|
|
@@ -1341,17 +1352,17 @@ function each(e2, n2, i2, s2, a2, l2 = null) {
|
|
|
1341
1352
|
l4 || (o2.delete(i5.k), link(e5, i5.prev, i5.next)), destroy_effect(i5.e, !l4);
|
|
1342
1353
|
}
|
|
1343
1354
|
});
|
|
1344
|
-
}(t3,
|
|
1355
|
+
}(t3, I2, P2, m2);
|
|
1345
1356
|
}
|
|
1346
1357
|
}
|
|
1347
1358
|
v2 && queue_micro_task(() => {
|
|
1348
|
-
var
|
|
1349
|
-
if (void 0 !== u3) for (p3 of u3) (
|
|
1359
|
+
var _a3;
|
|
1360
|
+
if (void 0 !== u3) for (p3 of u3) (_a3 = p3.a) == null ? void 0 : _a3.apply();
|
|
1350
1361
|
});
|
|
1351
1362
|
H.first = t3.first && t3.first.e, /** @type {Effect} */
|
|
1352
1363
|
H.last = w2 && w2.e;
|
|
1353
|
-
}(e3, u2, c2, a2, n2, s2, i2), null !== l2 && (0 === t2 ?
|
|
1354
|
-
|
|
1364
|
+
}(e3, u2, c2, a2, n2, s2, i2), null !== l2 && (0 === t2 ? f2 ? resume_effect(f2) : f2 = branch(() => l2(c2)) : null !== f2 && pause_effect(f2, () => {
|
|
1365
|
+
f2 = null;
|
|
1355
1366
|
})), // When we mount the each block for the first time, the collection won't be
|
|
1356
1367
|
// connected to this effect as the effect hasn't finished running yet and its deps
|
|
1357
1368
|
// won't be assigned. However, it's possible that when reconciling the each block
|
|
@@ -1369,9 +1380,9 @@ function update_item(e2, t2, n2, o2) {
|
|
|
1369
1380
|
) : e2.i = n2;
|
|
1370
1381
|
}
|
|
1371
1382
|
function create_item(e2, t2, n2, o2, i2, s2, a2, l2, c2, u2) {
|
|
1372
|
-
var
|
|
1383
|
+
var f2 = ce, d2 = !!(1 & c2) ? !(16 & c2) ? /* @__PURE__ */ mutable_source(i2) : source(i2) : i2, p2 = 2 & c2 ? source(a2) : a2, _2 = {
|
|
1373
1384
|
i: p2,
|
|
1374
|
-
v:
|
|
1385
|
+
v: d2,
|
|
1375
1386
|
k: s2,
|
|
1376
1387
|
a: null,
|
|
1377
1388
|
// @ts-expect-error
|
|
@@ -1381,9 +1392,9 @@ function create_item(e2, t2, n2, o2, i2, s2, a2, l2, c2, u2) {
|
|
|
1381
1392
|
};
|
|
1382
1393
|
ce = _2;
|
|
1383
1394
|
try {
|
|
1384
|
-
return _2.e = branch(() => l2(e2,
|
|
1395
|
+
return _2.e = branch(() => l2(e2, d2, p2, u2), false), _2.e.prev = n2 && n2.e, _2.e.next = o2 && o2.e, null === n2 ? t2.first = _2 : (n2.next = _2, n2.e.next = _2.e), null !== o2 && (o2.prev = _2, o2.e.prev = _2.e), _2;
|
|
1385
1396
|
} finally {
|
|
1386
|
-
ce =
|
|
1397
|
+
ce = f2;
|
|
1387
1398
|
}
|
|
1388
1399
|
}
|
|
1389
1400
|
function move(e2, t2, n2) {
|
|
@@ -1408,15 +1419,15 @@ function link(e2, t2, n2) {
|
|
|
1408
1419
|
null === t2 ? e2.first = n2 : (t2.next = n2, t2.e.next = n2 && n2.e), null !== n2 && (n2.prev = t2, n2.e.prev = t2 && t2.e);
|
|
1409
1420
|
}
|
|
1410
1421
|
function slot(e2, t2, n2, o2, i2) {
|
|
1411
|
-
var
|
|
1412
|
-
var s2 = (
|
|
1422
|
+
var _a2;
|
|
1423
|
+
var s2 = (_a2 = t2.$$slots) == null ? void 0 : _a2[n2], a2 = false;
|
|
1413
1424
|
true === s2 && (s2 = t2["default" === n2 ? "children" : n2], a2 = true), void 0 === s2 ? null !== i2 && i2(e2) : s2(e2, a2 ? () => o2 : o2);
|
|
1414
1425
|
}
|
|
1415
1426
|
function component(e2, t2, n2) {
|
|
1416
1427
|
var o2, i2, s2 = e2;
|
|
1417
1428
|
block(() => {
|
|
1418
1429
|
o2 !== (o2 = t2()) && (i2 && (pause_effect(i2), i2 = null), o2 && (i2 = branch(() => n2(s2, o2))));
|
|
1419
|
-
},
|
|
1430
|
+
}, $);
|
|
1420
1431
|
}
|
|
1421
1432
|
function r(e2) {
|
|
1422
1433
|
var t2, n2, o2 = "";
|
|
@@ -1434,6 +1445,17 @@ function clsx(e2) {
|
|
|
1434
1445
|
}(e2) : e2 ?? "";
|
|
1435
1446
|
}
|
|
1436
1447
|
const ue = [..." \n\r\f \v\uFEFF"];
|
|
1448
|
+
function append_styles(e2, t2 = false) {
|
|
1449
|
+
var n2 = t2 ? " !important;" : ";", o2 = "";
|
|
1450
|
+
for (var i2 in e2) {
|
|
1451
|
+
var s2 = e2[i2];
|
|
1452
|
+
null != s2 && "" !== s2 && (o2 += " " + i2 + ": " + s2 + n2);
|
|
1453
|
+
}
|
|
1454
|
+
return o2;
|
|
1455
|
+
}
|
|
1456
|
+
function to_css_name(e2) {
|
|
1457
|
+
return "-" !== e2[0] || "-" !== e2[1] ? e2.toLowerCase() : e2;
|
|
1458
|
+
}
|
|
1437
1459
|
function set_class(e2, t2, n2, o2, i2, s2) {
|
|
1438
1460
|
if (e2.__className !== n2) {
|
|
1439
1461
|
var a2 = function to_class(e3, t3, n3) {
|
|
@@ -1449,13 +1471,53 @@ function set_class(e2, t2, n2, o2, i2, s2) {
|
|
|
1449
1471
|
}(n2, o2, s2);
|
|
1450
1472
|
null == a2 ? e2.removeAttribute("class") : t2 ? e2.className = a2 : e2.setAttribute("class", a2), // @ts-expect-error need to add __className to patched prototype
|
|
1451
1473
|
e2.__className = n2;
|
|
1452
|
-
} else if (s2) for (var l2 in s2) {
|
|
1474
|
+
} else if (s2 && i2 !== s2) for (var l2 in s2) {
|
|
1453
1475
|
var c2 = !!s2[l2];
|
|
1454
1476
|
null != i2 && c2 === !!i2[l2] || e2.classList.toggle(l2, c2);
|
|
1455
1477
|
}
|
|
1456
1478
|
return s2;
|
|
1457
1479
|
}
|
|
1458
|
-
|
|
1480
|
+
function update_styles(e2, t2 = {}, n2, o2) {
|
|
1481
|
+
for (var i2 in n2) {
|
|
1482
|
+
var s2 = n2[i2];
|
|
1483
|
+
t2[i2] !== s2 && (null == n2[i2] ? e2.style.removeProperty(i2) : e2.style.setProperty(i2, s2, o2));
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
function set_style(e2, t2, n2, o2) {
|
|
1487
|
+
if (e2.__style !== t2) {
|
|
1488
|
+
var i2 = function to_style(e3, t3) {
|
|
1489
|
+
if (t3) {
|
|
1490
|
+
var n3, o3, i3 = "";
|
|
1491
|
+
if (Array.isArray(t3) ? (n3 = t3[0], o3 = t3[1]) : n3 = t3, e3) {
|
|
1492
|
+
e3 = String(e3).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
|
|
1493
|
+
var s2 = false, a2 = 0, l2 = false, c2 = [];
|
|
1494
|
+
n3 && c2.push(...Object.keys(n3).map(to_css_name)), o3 && c2.push(...Object.keys(o3).map(to_css_name));
|
|
1495
|
+
var u2 = 0, f2 = -1;
|
|
1496
|
+
const t4 = e3.length;
|
|
1497
|
+
for (var d2 = 0; d2 < t4; d2++) {
|
|
1498
|
+
var p2 = e3[d2];
|
|
1499
|
+
if (l2 ? "/" === p2 && "*" === e3[d2 - 1] && (l2 = false) : s2 ? s2 === p2 && (s2 = false) : "/" === p2 && "*" === e3[d2 + 1] ? l2 = true : '"' === p2 || "'" === p2 ? s2 = p2 : "(" === p2 ? a2++ : ")" === p2 && a2--, !l2 && false === s2 && 0 === a2) {
|
|
1500
|
+
if (":" === p2 && -1 === f2) f2 = d2;
|
|
1501
|
+
else if (";" === p2 || d2 === t4 - 1) {
|
|
1502
|
+
if (-1 !== f2) {
|
|
1503
|
+
var _2 = to_css_name(e3.substring(u2, f2).trim());
|
|
1504
|
+
c2.includes(_2) || (";" !== p2 && d2++, i3 += " " + e3.substring(u2, d2).trim() + ";");
|
|
1505
|
+
}
|
|
1506
|
+
u2 = d2 + 1, f2 = -1;
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1511
|
+
return n3 && (i3 += append_styles(n3)), o3 && (i3 += append_styles(o3, true)), "" === (i3 = i3.trim()) ? null : i3;
|
|
1512
|
+
}
|
|
1513
|
+
return null == e3 ? null : String(e3);
|
|
1514
|
+
}(t2, o2);
|
|
1515
|
+
null == i2 ? e2.removeAttribute("style") : e2.style.cssText = i2, // @ts-expect-error
|
|
1516
|
+
e2.__style = t2;
|
|
1517
|
+
} else o2 && (Array.isArray(o2) ? (update_styles(e2, n2 == null ? void 0 : n2[0], o2[0]), update_styles(e2, n2 == null ? void 0 : n2[1], o2[1], "important")) : update_styles(e2, n2, o2));
|
|
1518
|
+
return o2;
|
|
1519
|
+
}
|
|
1520
|
+
const fe = Symbol("class"), de = Symbol("style"), pe = Symbol("is custom element"), _e = Symbol("is html");
|
|
1459
1521
|
function set_selected(e2, t2) {
|
|
1460
1522
|
t2 ? (
|
|
1461
1523
|
// The selected option could've changed via user selection, and
|
|
@@ -1464,113 +1526,107 @@ function set_selected(e2, t2) {
|
|
|
1464
1526
|
) : e2.removeAttribute("selected");
|
|
1465
1527
|
}
|
|
1466
1528
|
function set_attribute(e2, t2, n2, o2) {
|
|
1467
|
-
var i2 =
|
|
1468
|
-
i2[t2] !== (i2[t2] = n2) && ("
|
|
1469
|
-
(e2
|
|
1470
|
-
(e2[k] = n2), null == n2 ? e2.removeAttribute(t2) : "string" != typeof n2 && get_setters(e2).includes(t2) ? (
|
|
1529
|
+
var i2 = get_attributes(e2);
|
|
1530
|
+
i2[t2] !== (i2[t2] = n2) && ("loading" === t2 && // @ts-expect-error
|
|
1531
|
+
(e2[C] = n2), null == n2 ? e2.removeAttribute(t2) : "string" != typeof n2 && get_setters(e2).includes(t2) ? (
|
|
1471
1532
|
// @ts-ignore
|
|
1472
1533
|
e2[t2] = n2
|
|
1473
1534
|
) : e2.setAttribute(t2, n2));
|
|
1474
1535
|
}
|
|
1475
|
-
function set_attributes(e2, t2, n2, o2, i2 = false
|
|
1476
|
-
var l2 = t2 || {},
|
|
1477
|
-
for (var
|
|
1478
|
-
n2.class ? n2.class = clsx(n2.class) : (o2 || n2[
|
|
1479
|
-
var d2 = get_setters(e2)
|
|
1480
|
-
/** @type {Record<string, unknown>} **/
|
|
1481
|
-
e2.__attributes ?? (e2.__attributes = {})
|
|
1482
|
-
);
|
|
1536
|
+
function set_attributes(e2, t2, n2, o2, i2 = false) {
|
|
1537
|
+
var s2 = get_attributes(e2), a2 = s2[pe], l2 = !s2[_e], c2 = t2 || {}, u2 = "OPTION" === e2.tagName;
|
|
1538
|
+
for (var f2 in t2) f2 in n2 || (n2[f2] = null);
|
|
1539
|
+
n2.class ? n2.class = clsx(n2.class) : (o2 || n2[fe]) && (n2.class = null), n2[de] && (n2.style ?? (n2.style = null));
|
|
1540
|
+
var d2 = get_setters(e2);
|
|
1483
1541
|
for (const m2 in n2) {
|
|
1484
1542
|
let b2 = n2[m2];
|
|
1485
|
-
if (
|
|
1486
|
-
e2.value = e2.__value = "",
|
|
1487
|
-
else if ("class" !== m2) {
|
|
1488
|
-
var p2 =
|
|
1543
|
+
if (u2 && "value" === m2 && null == b2)
|
|
1544
|
+
e2.value = e2.__value = "", c2[m2] = b2;
|
|
1545
|
+
else if ("class" !== m2) if ("style" !== m2) {
|
|
1546
|
+
var p2 = c2[m2];
|
|
1489
1547
|
if (b2 !== p2) {
|
|
1490
|
-
|
|
1548
|
+
c2[m2] = b2;
|
|
1491
1549
|
var _2 = m2[0] + m2[1];
|
|
1492
|
-
if ("$$" !== _2) {
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
if (
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
e2[`__${w2}`] = b2, delegate([w2]);
|
|
1503
|
-
else {
|
|
1504
|
-
let handle = function(e3) {
|
|
1505
|
-
l2[m2].call(this, e3);
|
|
1506
|
-
};
|
|
1507
|
-
l2[$2] = create_event(w2, e2, handle, y2);
|
|
1508
|
-
}
|
|
1509
|
-
else v2 && // @ts-ignore
|
|
1510
|
-
(e2[`__${w2}`] = void 0);
|
|
1511
|
-
} else if ("style" === m2 && null != b2) e2.style.cssText = b2 + "";
|
|
1512
|
-
else if ("autofocus" === m2) autofocus(
|
|
1513
|
-
/** @type {HTMLElement} */
|
|
1514
|
-
e2,
|
|
1515
|
-
Boolean(b2)
|
|
1516
|
-
);
|
|
1517
|
-
else if (s2 || "__value" !== m2 && ("value" !== m2 || null == b2)) if ("selected" === m2 && c2) set_selected(
|
|
1518
|
-
/** @type {HTMLOptionElement} */
|
|
1519
|
-
e2,
|
|
1520
|
-
b2
|
|
1521
|
-
);
|
|
1550
|
+
if ("$$" !== _2) if ("on" === _2) {
|
|
1551
|
+
const y2 = {}, $2 = "$$" + m2;
|
|
1552
|
+
let w2 = m2.slice(2);
|
|
1553
|
+
var v2 = is_delegated(w2);
|
|
1554
|
+
if (is_capture_event(w2) && (w2 = w2.slice(0, -7), y2.capture = true), !v2 && p2) {
|
|
1555
|
+
if (null != b2) continue;
|
|
1556
|
+
e2.removeEventListener(w2, c2[$2], y2), c2[$2] = null;
|
|
1557
|
+
}
|
|
1558
|
+
if (null != b2) if (v2)
|
|
1559
|
+
e2[`__${w2}`] = b2, delegate([w2]);
|
|
1522
1560
|
else {
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
// @ts-ignore
|
|
1528
|
-
e2[g2] = b2
|
|
1529
|
-
) : "function" != typeof b2 && set_attribute(e2, g2, b2);
|
|
1530
|
-
else if (f2[m2] = null, "value" === g2 || "checked" === g2) {
|
|
1531
|
-
let x2 = (
|
|
1532
|
-
/** @type {HTMLInputElement} */
|
|
1533
|
-
e2
|
|
1534
|
-
);
|
|
1535
|
-
const k2 = void 0 === t2;
|
|
1536
|
-
if ("value" === g2) {
|
|
1537
|
-
let C2 = x2.defaultValue;
|
|
1538
|
-
x2.removeAttribute(g2), x2.defaultValue = C2, // @ts-ignore
|
|
1539
|
-
x2.value = x2.__value = k2 ? C2 : null;
|
|
1540
|
-
} else {
|
|
1541
|
-
let M2 = x2.defaultChecked;
|
|
1542
|
-
x2.removeAttribute(g2), x2.defaultChecked = M2, x2.checked = !!k2 && M2;
|
|
1543
|
-
}
|
|
1544
|
-
} else e2.removeAttribute(m2);
|
|
1561
|
+
let handle = function(e3) {
|
|
1562
|
+
c2[m2].call(this, e3);
|
|
1563
|
+
};
|
|
1564
|
+
c2[$2] = create_event(w2, e2, handle, y2);
|
|
1545
1565
|
}
|
|
1546
|
-
else
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
(e2
|
|
1566
|
+
else v2 && // @ts-ignore
|
|
1567
|
+
(e2[`__${w2}`] = void 0);
|
|
1568
|
+
} else if ("style" === m2)
|
|
1569
|
+
set_attribute(e2, m2, b2);
|
|
1570
|
+
else if ("autofocus" === m2) autofocus(
|
|
1571
|
+
/** @type {HTMLElement} */
|
|
1572
|
+
e2,
|
|
1573
|
+
Boolean(b2)
|
|
1574
|
+
);
|
|
1575
|
+
else if (a2 || "__value" !== m2 && ("value" !== m2 || null == b2)) if ("selected" === m2 && u2) set_selected(
|
|
1576
|
+
/** @type {HTMLOptionElement} */
|
|
1577
|
+
e2,
|
|
1578
|
+
b2
|
|
1579
|
+
);
|
|
1580
|
+
else {
|
|
1581
|
+
var g2 = m2;
|
|
1582
|
+
l2 || (g2 = normalize_attribute(g2));
|
|
1583
|
+
var h2 = "defaultValue" === g2 || "defaultChecked" === g2;
|
|
1584
|
+
if (null != b2 || a2 || h2) h2 || d2.includes(g2) && (a2 || "string" != typeof b2) ? (
|
|
1585
|
+
// @ts-ignore
|
|
1586
|
+
e2[g2] = b2
|
|
1587
|
+
) : "function" != typeof b2 && set_attribute(e2, g2, b2);
|
|
1588
|
+
else if (s2[m2] = null, "value" === g2 || "checked" === g2) {
|
|
1589
|
+
let x2 = (
|
|
1590
|
+
/** @type {HTMLInputElement} */
|
|
1591
|
+
e2
|
|
1592
|
+
);
|
|
1593
|
+
const k2 = void 0 === t2;
|
|
1594
|
+
if ("value" === g2) {
|
|
1595
|
+
let C2 = x2.defaultValue;
|
|
1596
|
+
x2.removeAttribute(g2), x2.defaultValue = C2, // @ts-ignore
|
|
1597
|
+
x2.value = x2.__value = k2 ? C2 : null;
|
|
1598
|
+
} else {
|
|
1599
|
+
let S2 = x2.defaultChecked;
|
|
1600
|
+
x2.removeAttribute(g2), x2.defaultChecked = S2, x2.checked = !!k2 && S2;
|
|
1601
|
+
}
|
|
1602
|
+
} else e2.removeAttribute(m2);
|
|
1550
1603
|
}
|
|
1604
|
+
else
|
|
1605
|
+
e2.value = e2.__value = b2;
|
|
1551
1606
|
}
|
|
1552
|
-
} else
|
|
1553
|
-
|
|
1554
|
-
}
|
|
1607
|
+
} else set_style(e2, b2, t2 == null ? void 0 : t2[de], n2[de]), c2[m2] = b2, c2[de] = n2[de];
|
|
1608
|
+
else set_class(e2, "http://www.w3.org/1999/xhtml" === e2.namespaceURI, b2, o2, t2 == null ? void 0 : t2[fe], n2[fe]), c2[m2] = b2, c2[fe] = n2[fe];
|
|
1555
1609
|
}
|
|
1556
|
-
return
|
|
1610
|
+
return c2;
|
|
1557
1611
|
}
|
|
1558
|
-
|
|
1612
|
+
function get_attributes(e2) {
|
|
1613
|
+
return e2.__attributes ?? (e2.__attributes = {
|
|
1614
|
+
[pe]: e2.nodeName.includes("-"),
|
|
1615
|
+
[_e]: "http://www.w3.org/1999/xhtml" === e2.namespaceURI
|
|
1616
|
+
});
|
|
1617
|
+
}
|
|
1618
|
+
var ve = /* @__PURE__ */ new Map();
|
|
1559
1619
|
function get_setters(e2) {
|
|
1560
|
-
var t2, n2 =
|
|
1620
|
+
var t2, n2 = ve.get(e2.nodeName);
|
|
1561
1621
|
if (n2) return n2;
|
|
1562
|
-
|
|
1622
|
+
ve.set(e2.nodeName, n2 = []);
|
|
1563
1623
|
for (var o2 = e2, i2 = Element.prototype; i2 !== o2; ) {
|
|
1564
1624
|
for (var s2 in t2 = a(o2)) t2[s2].set && n2.push(s2);
|
|
1565
1625
|
o2 = u(o2);
|
|
1566
1626
|
}
|
|
1567
1627
|
return n2;
|
|
1568
1628
|
}
|
|
1569
|
-
|
|
1570
|
-
var i2 = e2.__styles ?? (e2.__styles = {});
|
|
1571
|
-
i2[t2] !== n2 && (i2[t2] = n2, null == n2 ? e2.style.removeProperty(t2) : e2.style.setProperty(t2, n2, ""));
|
|
1572
|
-
}
|
|
1573
|
-
const pe = {
|
|
1629
|
+
const ge = {
|
|
1574
1630
|
// don't access requestAnimationFrame eagerly outside method
|
|
1575
1631
|
// this allows basic testing of user code without JSDOM
|
|
1576
1632
|
// bunder will eval and remove ternary when the user's app is built
|
|
@@ -1582,10 +1638,10 @@ const pe = {
|
|
|
1582
1638
|
tasks: /* @__PURE__ */ new Set()
|
|
1583
1639
|
};
|
|
1584
1640
|
function run_tasks() {
|
|
1585
|
-
const e2 =
|
|
1586
|
-
|
|
1587
|
-
t2.c(e2) || (
|
|
1588
|
-
}), 0 !==
|
|
1641
|
+
const e2 = ge.now();
|
|
1642
|
+
ge.tasks.forEach((t2) => {
|
|
1643
|
+
t2.c(e2) || (ge.tasks.delete(t2), t2.f());
|
|
1644
|
+
}), 0 !== ge.tasks.size && ge.tick(run_tasks);
|
|
1589
1645
|
}
|
|
1590
1646
|
function dispatch_event(e2, t2) {
|
|
1591
1647
|
without_reactive_context(() => {
|
|
@@ -1626,7 +1682,7 @@ function transition(e2, t2, n2, o2) {
|
|
|
1626
1682
|
set_active_reaction(e3), set_active_effect(s3);
|
|
1627
1683
|
}
|
|
1628
1684
|
}
|
|
1629
|
-
var
|
|
1685
|
+
var f2 = {
|
|
1630
1686
|
is_global: l2,
|
|
1631
1687
|
in() {
|
|
1632
1688
|
t2.inert = c2, dispatch_event(t2, "introstart"), s2 = animate(t2, get_options(), a2, 1, () => {
|
|
@@ -1642,21 +1698,21 @@ function transition(e2, t2, n2, o2) {
|
|
|
1642
1698
|
stop: () => {
|
|
1643
1699
|
s2 == null ? void 0 : s2.abort(), a2 == null ? void 0 : a2.abort();
|
|
1644
1700
|
}
|
|
1645
|
-
},
|
|
1701
|
+
}, d2 = (
|
|
1646
1702
|
/** @type {Effect} */
|
|
1647
1703
|
H
|
|
1648
1704
|
);
|
|
1649
|
-
if ((
|
|
1705
|
+
if ((d2.transitions ?? (d2.transitions = [])).push(f2), se) {
|
|
1650
1706
|
var p2 = l2;
|
|
1651
1707
|
if (!p2) {
|
|
1652
1708
|
for (var _2 = (
|
|
1653
1709
|
/** @type {Effect | null} */
|
|
1654
|
-
|
|
1655
|
-
); _2 && _2.f &
|
|
1710
|
+
d2.parent
|
|
1711
|
+
); _2 && _2.f & $; ) for (; (_2 = _2.parent) && !(16 & _2.f); ) ;
|
|
1656
1712
|
p2 = !_2 || !!(32768 & _2.f);
|
|
1657
1713
|
}
|
|
1658
1714
|
p2 && effect(() => {
|
|
1659
|
-
untrack(() =>
|
|
1715
|
+
untrack(() => f2.in());
|
|
1660
1716
|
});
|
|
1661
1717
|
}
|
|
1662
1718
|
}
|
|
@@ -1686,9 +1742,9 @@ function animate(e2, t2, n2, o2, i2) {
|
|
|
1686
1742
|
reset: noop,
|
|
1687
1743
|
t: () => o2
|
|
1688
1744
|
};
|
|
1689
|
-
const { delay: c2 = 0, css: u2, tick:
|
|
1745
|
+
const { delay: c2 = 0, css: u2, tick: f2, easing: d2 = linear } = t2;
|
|
1690
1746
|
var p2 = [];
|
|
1691
|
-
if (s2 && void 0 === n2 && (
|
|
1747
|
+
if (s2 && void 0 === n2 && (f2 && f2(0, 1), u2)) {
|
|
1692
1748
|
var _2 = css_to_keyframe(u2(0, 1));
|
|
1693
1749
|
p2.push(_2, _2);
|
|
1694
1750
|
}
|
|
@@ -1706,7 +1762,7 @@ function animate(e2, t2, n2, o2, i2) {
|
|
|
1706
1762
|
var p3 = false;
|
|
1707
1763
|
if (u2)
|
|
1708
1764
|
for (var _3 = Math.ceil(l3 / (1e3 / 60)), g2 = 0; g2 <= _3; g2 += 1) {
|
|
1709
|
-
var h2 = s3 + a3 *
|
|
1765
|
+
var h2 = s3 + a3 * d2(g2 / _3), m2 = css_to_keyframe(u2(h2, 1 - h2));
|
|
1710
1766
|
c3.push(m2), p3 || (p3 = "hidden" === m2.overflow);
|
|
1711
1767
|
}
|
|
1712
1768
|
p3 && /** @type {HTMLElement} */
|
|
@@ -1716,31 +1772,31 @@ function animate(e2, t2, n2, o2, i2) {
|
|
|
1716
1772
|
/** @type {globalThis.Animation} */
|
|
1717
1773
|
v2.currentTime
|
|
1718
1774
|
);
|
|
1719
|
-
return s3 + a3 *
|
|
1720
|
-
},
|
|
1775
|
+
return s3 + a3 * d2(e3 / l3);
|
|
1776
|
+
}, f2 && function loop(e3) {
|
|
1721
1777
|
let t3;
|
|
1722
|
-
return 0 ===
|
|
1778
|
+
return 0 === ge.tasks.size && ge.tick(run_tasks), {
|
|
1723
1779
|
promise: new Promise((n3) => {
|
|
1724
|
-
|
|
1780
|
+
ge.tasks.add(t3 = {
|
|
1725
1781
|
c: e3,
|
|
1726
1782
|
f: n3
|
|
1727
1783
|
});
|
|
1728
1784
|
}),
|
|
1729
1785
|
abort() {
|
|
1730
|
-
|
|
1786
|
+
ge.tasks.delete(t3);
|
|
1731
1787
|
}
|
|
1732
1788
|
};
|
|
1733
1789
|
}(() => {
|
|
1734
1790
|
if ("running" !== v2.playState) return false;
|
|
1735
1791
|
var e3 = get_t();
|
|
1736
|
-
return
|
|
1792
|
+
return f2(e3, 1 - e3), true;
|
|
1737
1793
|
});
|
|
1738
1794
|
}
|
|
1739
1795
|
(v2 = e2.animate(c3, {
|
|
1740
1796
|
duration: l3,
|
|
1741
1797
|
fill: "forwards"
|
|
1742
1798
|
})).onfinish = () => {
|
|
1743
|
-
get_t = () => o2,
|
|
1799
|
+
get_t = () => o2, f2 == null ? void 0 : f2(o2, 1 - o2), i2();
|
|
1744
1800
|
};
|
|
1745
1801
|
}, {
|
|
1746
1802
|
abort: () => {
|
|
@@ -1754,7 +1810,7 @@ function animate(e2, t2, n2, o2, i2) {
|
|
|
1754
1810
|
i2 = noop;
|
|
1755
1811
|
},
|
|
1756
1812
|
reset: () => {
|
|
1757
|
-
0 === o2 && (
|
|
1813
|
+
0 === o2 && (f2 == null ? void 0 : f2(1, 0));
|
|
1758
1814
|
},
|
|
1759
1815
|
t: () => get_t()
|
|
1760
1816
|
};
|
|
@@ -1767,7 +1823,7 @@ function to_number(e2) {
|
|
|
1767
1823
|
return "" === e2 ? null : +e2;
|
|
1768
1824
|
}
|
|
1769
1825
|
function is_bound_this(e2, t2) {
|
|
1770
|
-
return e2 === t2 || (e2 == null ? void 0 : e2[
|
|
1826
|
+
return e2 === t2 || (e2 == null ? void 0 : e2[x]) === t2;
|
|
1771
1827
|
}
|
|
1772
1828
|
function bind_this(e2 = {}, t2, n2, o2) {
|
|
1773
1829
|
return effect(() => {
|
|
@@ -1789,7 +1845,7 @@ function bind_this(e2 = {}, t2, n2, o2) {
|
|
|
1789
1845
|
function init(e2 = false) {
|
|
1790
1846
|
const t2 = (
|
|
1791
1847
|
/** @type {ComponentContextLegacy} */
|
|
1792
|
-
|
|
1848
|
+
q
|
|
1793
1849
|
), n2 = t2.l.u;
|
|
1794
1850
|
if (!n2) return;
|
|
1795
1851
|
let props = () => deep_read_state(t2.s);
|
|
@@ -1835,17 +1891,17 @@ function subscribe_to_store(e2, t2, n2) {
|
|
|
1835
1891
|
));
|
|
1836
1892
|
return o2.unsubscribe ? () => o2.unsubscribe() : o2;
|
|
1837
1893
|
}
|
|
1838
|
-
const
|
|
1894
|
+
const he = [];
|
|
1839
1895
|
function writable(e2, t2 = noop) {
|
|
1840
1896
|
let n2 = null;
|
|
1841
1897
|
const o2 = /* @__PURE__ */ new Set();
|
|
1842
1898
|
function set2(t3) {
|
|
1843
1899
|
if (safe_not_equal(e2, t3) && (e2 = t3, n2)) {
|
|
1844
|
-
const t4 = !
|
|
1845
|
-
for (const t5 of o2) t5[1](),
|
|
1900
|
+
const t4 = !he.length;
|
|
1901
|
+
for (const t5 of o2) t5[1](), he.push(t5, e2);
|
|
1846
1902
|
if (t4) {
|
|
1847
|
-
for (let e3 = 0; e3 <
|
|
1848
|
-
|
|
1903
|
+
for (let e3 = 0; e3 < he.length; e3 += 2) he[e3][0](he[e3 + 1]);
|
|
1904
|
+
he.length = 0;
|
|
1849
1905
|
}
|
|
1850
1906
|
}
|
|
1851
1907
|
}
|
|
@@ -1873,14 +1929,14 @@ function get(e2) {
|
|
|
1873
1929
|
let t2;
|
|
1874
1930
|
return subscribe_to_store(e2, (e3) => t2 = e3)(), t2;
|
|
1875
1931
|
}
|
|
1876
|
-
let
|
|
1932
|
+
let me = false, be = Symbol();
|
|
1877
1933
|
function store_get(e2, t2, n2) {
|
|
1878
1934
|
const o2 = n2[t2] ?? (n2[t2] = {
|
|
1879
1935
|
store: null,
|
|
1880
1936
|
source: /* @__PURE__ */ mutable_source(void 0),
|
|
1881
1937
|
unsubscribe: noop
|
|
1882
1938
|
});
|
|
1883
|
-
if (o2.store !== e2 && !(
|
|
1939
|
+
if (o2.store !== e2 && !(be in n2)) if (o2.unsubscribe(), o2.store = e2 ?? null, null == e2) o2.source.v = void 0, // see synchronous callback comment below
|
|
1884
1940
|
o2.unsubscribe = noop;
|
|
1885
1941
|
else {
|
|
1886
1942
|
var i2 = true;
|
|
@@ -1892,7 +1948,7 @@ function store_get(e2, t2, n2) {
|
|
|
1892
1948
|
) : set(o2.source, e3);
|
|
1893
1949
|
}), i2 = false;
|
|
1894
1950
|
}
|
|
1895
|
-
return e2 &&
|
|
1951
|
+
return e2 && be in n2 ? get(e2) : get$1(o2.source);
|
|
1896
1952
|
}
|
|
1897
1953
|
function store_set(e2, t2) {
|
|
1898
1954
|
return e2.set(t2), t2;
|
|
@@ -1904,14 +1960,14 @@ function setup_stores() {
|
|
|
1904
1960
|
for (var t2 in e2) {
|
|
1905
1961
|
e2[t2].unsubscribe();
|
|
1906
1962
|
}
|
|
1907
|
-
i(e2,
|
|
1963
|
+
i(e2, be, {
|
|
1908
1964
|
enumerable: false,
|
|
1909
1965
|
value: true
|
|
1910
1966
|
});
|
|
1911
1967
|
});
|
|
1912
1968
|
}];
|
|
1913
1969
|
}
|
|
1914
|
-
const
|
|
1970
|
+
const ye = {
|
|
1915
1971
|
get(e2, t2) {
|
|
1916
1972
|
if (!e2.exclude.includes(t2)) return get$1(e2.version), t2 in e2.special ? e2.special[t2]() : e2.props[t2];
|
|
1917
1973
|
},
|
|
@@ -1947,9 +2003,9 @@ function legacy_rest_props(e2, t2) {
|
|
|
1947
2003
|
exclude: t2,
|
|
1948
2004
|
special: {},
|
|
1949
2005
|
version: source(0)
|
|
1950
|
-
},
|
|
2006
|
+
}, ye);
|
|
1951
2007
|
}
|
|
1952
|
-
const
|
|
2008
|
+
const $e = {
|
|
1953
2009
|
get(e2, t2) {
|
|
1954
2010
|
let n2 = e2.props.length;
|
|
1955
2011
|
for (; n2--; ) {
|
|
@@ -1981,7 +2037,7 @@ const me = {
|
|
|
1981
2037
|
}
|
|
1982
2038
|
},
|
|
1983
2039
|
has(e2, t2) {
|
|
1984
|
-
if (t2 ===
|
|
2040
|
+
if (t2 === x || t2 === k) return false;
|
|
1985
2041
|
for (let n2 of e2.props) if (is_function(n2) && (n2 = n2()), null != n2 && t2 in n2) return true;
|
|
1986
2042
|
return false;
|
|
1987
2043
|
},
|
|
@@ -1997,24 +2053,24 @@ const me = {
|
|
|
1997
2053
|
function spread_props(...e2) {
|
|
1998
2054
|
return new Proxy({
|
|
1999
2055
|
props: e2
|
|
2000
|
-
},
|
|
2056
|
+
}, $e);
|
|
2001
2057
|
}
|
|
2002
2058
|
function prop(e2, t2, n2, o2) {
|
|
2003
|
-
var
|
|
2004
|
-
var i2, a2 = !!(1 & n2), l2 = !
|
|
2005
|
-
c2 ? [i2,
|
|
2006
|
-
var t3 =
|
|
2059
|
+
var _a2;
|
|
2060
|
+
var i2, a2 = !!(1 & n2), l2 = !S || !!(2 & n2), c2 = !!(8 & n2), u2 = !!(16 & n2), f2 = false;
|
|
2061
|
+
c2 ? [i2, f2] = function capture_store_binding(e3) {
|
|
2062
|
+
var t3 = me;
|
|
2007
2063
|
try {
|
|
2008
|
-
return
|
|
2064
|
+
return me = false, [e3(), me];
|
|
2009
2065
|
} finally {
|
|
2010
|
-
|
|
2066
|
+
me = t3;
|
|
2011
2067
|
}
|
|
2012
2068
|
}(() => (
|
|
2013
2069
|
/** @type {V} */
|
|
2014
2070
|
e2[t2]
|
|
2015
2071
|
)) : i2 = /** @type {V} */
|
|
2016
2072
|
e2[t2];
|
|
2017
|
-
var
|
|
2073
|
+
var d2, p2 = x in e2 || k in e2, _2 = c2 && (((_a2 = s(e2, t2)) == null ? void 0 : _a2.set) ?? (p2 && t2 in e2 && ((n3) => e2[t2] = n3))) || void 0, v2 = (
|
|
2018
2074
|
/** @type {V} */
|
|
2019
2075
|
o2
|
|
2020
2076
|
), g2 = true, h2 = false, get_fallback = () => (h2 = true, g2 && (g2 = false, v2 = u2 ? untrack(
|
|
@@ -2026,7 +2082,7 @@ function prop(e2, t2, n2, o2) {
|
|
|
2026
2082
|
)), v2);
|
|
2027
2083
|
if (void 0 === i2 && void 0 !== o2 && (_2 && l2 && function props_invalid_value(e3) {
|
|
2028
2084
|
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
2029
|
-
}(), i2 = get_fallback(), _2 && _2(i2)), l2)
|
|
2085
|
+
}(), i2 = get_fallback(), _2 && _2(i2)), l2) d2 = () => {
|
|
2030
2086
|
var n3 = (
|
|
2031
2087
|
/** @type {V} */
|
|
2032
2088
|
e2[t2]
|
|
@@ -2038,13 +2094,13 @@ function prop(e2, t2, n2, o2) {
|
|
|
2038
2094
|
/** @type {V} */
|
|
2039
2095
|
e2[t2]
|
|
2040
2096
|
));
|
|
2041
|
-
m2.f |= 131072,
|
|
2097
|
+
m2.f |= 131072, d2 = () => {
|
|
2042
2098
|
var e3 = get$1(m2);
|
|
2043
2099
|
return void 0 !== e3 && (v2 = /** @type {V} */
|
|
2044
2100
|
void 0), void 0 === e3 ? v2 : e3;
|
|
2045
2101
|
};
|
|
2046
2102
|
}
|
|
2047
|
-
if (!(4 & n2)) return
|
|
2103
|
+
if (!(4 & n2)) return d2;
|
|
2048
2104
|
if (_2) {
|
|
2049
2105
|
var b2 = e2.$$legacy;
|
|
2050
2106
|
return function(e3, t3) {
|
|
@@ -2053,27 +2109,27 @@ function prop(e2, t2, n2, o2) {
|
|
|
2053
2109
|
// In that case the state proxy (if it exists) should take care of the notification.
|
|
2054
2110
|
// If the parent is not in runes mode, we need to notify on mutation, too, that the prop
|
|
2055
2111
|
// has changed because the parent will not be able to detect the change otherwise.
|
|
2056
|
-
(l2 && t3 && !b2 && !
|
|
2057
|
-
_2(t3 ?
|
|
2058
|
-
) :
|
|
2112
|
+
(l2 && t3 && !b2 && !f2 || /** @type {Function} */
|
|
2113
|
+
_2(t3 ? d2() : e3), e3)
|
|
2114
|
+
) : d2();
|
|
2059
2115
|
};
|
|
2060
2116
|
}
|
|
2061
|
-
var y2 = false, $2 = /* @__PURE__ */ mutable_source(i2),
|
|
2062
|
-
var e3 =
|
|
2117
|
+
var y2 = false, $2 = /* @__PURE__ */ mutable_source(i2), w2 = /* @__PURE__ */ derived(() => {
|
|
2118
|
+
var e3 = d2(), t3 = get$1($2);
|
|
2063
2119
|
return y2 ? (y2 = false, t3) : $2.v = e3;
|
|
2064
2120
|
});
|
|
2065
|
-
return a2 || (
|
|
2121
|
+
return a2 || (w2.equals = safe_equals), function(e3, t3) {
|
|
2066
2122
|
if (arguments.length > 0) {
|
|
2067
|
-
const n3 = t3 ? get$1(
|
|
2068
|
-
return
|
|
2123
|
+
const n3 = t3 ? get$1(w2) : l2 && c2 ? proxy(e3) : e3;
|
|
2124
|
+
return w2.equals(n3) || (y2 = true, set($2, n3), // To ensure the fallback value is consistent when used with proxies, we
|
|
2069
2125
|
// update the local fallback_value, but only if the fallback is actively used
|
|
2070
|
-
h2 && void 0 !== v2 && (v2 = n3), untrack(() => get$1(
|
|
2126
|
+
h2 && void 0 !== v2 && (v2 = n3), untrack(() => get$1(w2))), e3;
|
|
2071
2127
|
}
|
|
2072
|
-
return get$1(
|
|
2128
|
+
return get$1(w2);
|
|
2073
2129
|
};
|
|
2074
2130
|
}
|
|
2075
2131
|
function onMount(e2) {
|
|
2076
|
-
null ===
|
|
2132
|
+
null === q && lifecycle_outside_component(), S && null !== q.l ? (
|
|
2077
2133
|
/**
|
|
2078
2134
|
* Legacy-mode: Init callbacks object for onMount/beforeUpdate/afterUpdate
|
|
2079
2135
|
* @param {ComponentContext} context
|
|
@@ -2088,17 +2144,15 @@ function onMount(e2) {
|
|
|
2088
2144
|
b: [],
|
|
2089
2145
|
m: []
|
|
2090
2146
|
});
|
|
2091
|
-
}(
|
|
2147
|
+
}(q).m.push(e2)
|
|
2092
2148
|
) : user_effect(() => {
|
|
2093
2149
|
const t2 = untrack(e2);
|
|
2094
2150
|
if ("function" == typeof t2) return t2;
|
|
2095
2151
|
});
|
|
2096
2152
|
}
|
|
2097
|
-
"undefined" != typeof window && // @ts-
|
|
2098
|
-
(window.__svelte
|
|
2099
|
-
|
|
2100
|
-
})).v.add("5"), function enable_legacy_mode_flag() {
|
|
2101
|
-
C = true;
|
|
2153
|
+
"undefined" != typeof window && // @ts-expect-error
|
|
2154
|
+
((_a = window.__svelte ?? (window.__svelte = {})).v ?? (_a.v = /* @__PURE__ */ new Set())).add("5"), function enable_legacy_mode_flag() {
|
|
2155
|
+
S = true;
|
|
2102
2156
|
}();
|
|
2103
2157
|
/**
|
|
2104
2158
|
* @license lucide-svelte v0.476.0 - ISC
|
|
@@ -2120,7 +2174,7 @@ function onMount(e2) {
|
|
|
2120
2174
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
2121
2175
|
*
|
|
2122
2176
|
*/
|
|
2123
|
-
const
|
|
2177
|
+
const we = {
|
|
2124
2178
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2125
2179
|
width: 24,
|
|
2126
2180
|
height: 24,
|
|
@@ -2131,28 +2185,27 @@ const be = {
|
|
|
2131
2185
|
"stroke-linecap": "round",
|
|
2132
2186
|
"stroke-linejoin": "round"
|
|
2133
2187
|
};
|
|
2134
|
-
var
|
|
2188
|
+
var xe = /* @__PURE__ */ ns_template("<svg><!><!></svg>");
|
|
2135
2189
|
function Icon$1(e2, t2) {
|
|
2136
2190
|
const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]), o2 = legacy_rest_props(n2, ["name", "color", "size", "strokeWidth", "absoluteStrokeWidth", "iconNode"]);
|
|
2137
2191
|
push(t2, false);
|
|
2138
2192
|
let i2 = prop(t2, "name", 8, void 0), s2 = prop(t2, "color", 8, "currentColor"), a2 = prop(t2, "size", 8, 24), l2 = prop(t2, "strokeWidth", 8, 2), c2 = prop(t2, "absoluteStrokeWidth", 8, false), u2 = prop(t2, "iconNode", 24, () => []);
|
|
2139
2193
|
init();
|
|
2140
|
-
var
|
|
2141
|
-
let
|
|
2142
|
-
var p2 = child(
|
|
2194
|
+
var f2 = xe();
|
|
2195
|
+
let d2;
|
|
2196
|
+
var p2 = child(f2);
|
|
2143
2197
|
each(p2, 1, u2, index, (e3, t3) => {
|
|
2144
2198
|
var n3 = comment();
|
|
2145
2199
|
!function element(e4, t4, n4, o3, i3, s3) {
|
|
2146
|
-
var a3, l3, c3, u3 = null,
|
|
2200
|
+
var a3, l3, c3, u3 = null, f3 = (
|
|
2147
2201
|
/** @type {TemplateNode} */
|
|
2148
2202
|
e4
|
|
2149
|
-
),
|
|
2203
|
+
), d3 = ce;
|
|
2150
2204
|
block(() => {
|
|
2151
2205
|
const e5 = t4() || null;
|
|
2152
|
-
var n5 = q;
|
|
2153
2206
|
if (e5 !== a3) {
|
|
2154
|
-
var
|
|
2155
|
-
set_current_each_item(
|
|
2207
|
+
var n5 = ce;
|
|
2208
|
+
set_current_each_item(d3), c3 && (null === e5 ? (
|
|
2156
2209
|
// start outro
|
|
2157
2210
|
pause_effect(c3, () => {
|
|
2158
2211
|
c3 = null, l3 = null;
|
|
@@ -2164,32 +2217,32 @@ function Icon$1(e2, t2) {
|
|
|
2164
2217
|
// tag is changing — destroy immediately, render contents without intro transitions
|
|
2165
2218
|
(destroy_effect(c3), set_should_intro(false))
|
|
2166
2219
|
)), e5 && e5 !== l3 && (c3 = branch(() => {
|
|
2167
|
-
if (assign_nodes(u3 = document.createElementNS(
|
|
2220
|
+
if (assign_nodes(u3 = document.createElementNS("http://www.w3.org/2000/svg", e5), u3), o3) {
|
|
2168
2221
|
var t5 = (
|
|
2169
2222
|
/** @type {TemplateNode} */
|
|
2170
2223
|
u3.appendChild(create_text())
|
|
2171
2224
|
);
|
|
2172
2225
|
o3(u3, t5);
|
|
2173
2226
|
}
|
|
2174
|
-
H.nodes_end = u3,
|
|
2175
|
-
})), (a3 = e5) && (l3 = a3), set_should_intro(true), set_current_each_item(
|
|
2227
|
+
H.nodes_end = u3, f3.before(u3);
|
|
2228
|
+
})), (a3 = e5) && (l3 = a3), set_should_intro(true), set_current_each_item(n5);
|
|
2176
2229
|
}
|
|
2177
|
-
},
|
|
2230
|
+
}, $);
|
|
2178
2231
|
}(first_child(n3), () => get$1(t3)[0], 0, (e4, n4) => {
|
|
2179
2232
|
let o3;
|
|
2180
2233
|
template_effect(() => o3 = set_attributes(e4, o3, {
|
|
2181
2234
|
...get$1(t3)[1]
|
|
2182
|
-
}
|
|
2235
|
+
}));
|
|
2183
2236
|
}), append(e3, n3);
|
|
2184
|
-
}), slot(sibling(p2), t2, "default", {}, null), template_effect((e3, t3) =>
|
|
2185
|
-
...
|
|
2237
|
+
}), slot(sibling(p2), t2, "default", {}, null), template_effect((e3, t3) => d2 = set_attributes(f2, d2, {
|
|
2238
|
+
...we,
|
|
2186
2239
|
...o2,
|
|
2187
2240
|
width: a2(),
|
|
2188
2241
|
height: a2(),
|
|
2189
2242
|
stroke: s2(),
|
|
2190
2243
|
"stroke-width": e3,
|
|
2191
2244
|
class: t3
|
|
2192
|
-
}
|
|
2245
|
+
}), [() => c2() ? 24 * Number(l2()) / Number(a2()) : l2(), () => ((...e3) => e3.filter((e4, t3, n3) => Boolean(e4) && n3.indexOf(e4) === t3).join(" "))("lucide-icon", "lucide", i2() ? `lucide-${i2()}` : "", n2.class)], derived_safe_equal), append(e2, f2), pop();
|
|
2193
2246
|
}
|
|
2194
2247
|
function Loader_circle(e2, t2) {
|
|
2195
2248
|
const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]);
|
|
@@ -2209,14 +2262,14 @@ function Loader_circle(e2, t2) {
|
|
|
2209
2262
|
}));
|
|
2210
2263
|
}
|
|
2211
2264
|
var on_click$2 = (e2, t2) => {
|
|
2212
|
-
var
|
|
2213
|
-
(
|
|
2214
|
-
},
|
|
2265
|
+
var _a2;
|
|
2266
|
+
(_a2 = t2.onClick) == null ? void 0 : _a2.call(t2);
|
|
2267
|
+
}, ke = /* @__PURE__ */ template('<button id="floating playlight button" aria-label="Open Playlight Discovery"><p class="z-2 flex items-center overflow-hidden svelte-1j97rta"><!> <span class="mr-0.25 inline-block font-bold svelte-1j97rta">More Games</span></p> <div class="absolute bottom-0 left-0 h-full w-0 bg-black transition-all duration-300 group-hover:w-full svelte-1j97rta"></div></button>');
|
|
2215
2268
|
function FloatingButton(e2, t2) {
|
|
2216
2269
|
push(t2, true);
|
|
2217
2270
|
let n2 = prop(t2, "position", 3, "bottom-right"), o2 = prop(t2, "visible", 3, true);
|
|
2218
2271
|
var i2 = comment(), s2 = first_child(i2), consequent = (e3) => {
|
|
2219
|
-
var o3 =
|
|
2272
|
+
var o3 = ke();
|
|
2220
2273
|
o3.__click = [on_click$2, t2];
|
|
2221
2274
|
var i3 = child(o3);
|
|
2222
2275
|
!function Gamepad(e4, t3) {
|
|
@@ -2285,118 +2338,118 @@ function split_css_unit(e2) {
|
|
|
2285
2338
|
];
|
|
2286
2339
|
}
|
|
2287
2340
|
function blur(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_in_out, amount: i2 = 5, opacity: s2 = 0 } = {}) {
|
|
2288
|
-
const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.filter ? "" : a2.filter, u2 = l2 * (1 - s2), [
|
|
2341
|
+
const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.filter ? "" : a2.filter, u2 = l2 * (1 - s2), [f2, d2] = split_css_unit(i2);
|
|
2289
2342
|
return {
|
|
2290
2343
|
delay: t2,
|
|
2291
2344
|
duration: n2,
|
|
2292
2345
|
easing: o2,
|
|
2293
|
-
css: (e3, t3) => `opacity: ${l2 - u2 * t3}; filter: ${c2} blur(${t3 *
|
|
2346
|
+
css: (e3, t3) => `opacity: ${l2 - u2 * t3}; filter: ${c2} blur(${t3 * f2}${d2});`
|
|
2294
2347
|
};
|
|
2295
2348
|
}
|
|
2296
2349
|
function fly(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_out, x: i2 = 0, y: s2 = 0, opacity: a2 = 0 } = {}) {
|
|
2297
|
-
const l2 = getComputedStyle(e2), c2 = +l2.opacity, u2 = "none" === l2.transform ? "" : l2.transform,
|
|
2350
|
+
const l2 = getComputedStyle(e2), c2 = +l2.opacity, u2 = "none" === l2.transform ? "" : l2.transform, f2 = c2 * (1 - a2), [d2, p2] = split_css_unit(i2), [_2, v2] = split_css_unit(s2);
|
|
2298
2351
|
return {
|
|
2299
2352
|
delay: t2,
|
|
2300
2353
|
duration: n2,
|
|
2301
2354
|
easing: o2,
|
|
2302
2355
|
css: (e3, t3) => `
|
|
2303
|
-
transform: ${u2} translate(${(1 - e3) *
|
|
2304
|
-
opacity: ${c2 -
|
|
2356
|
+
transform: ${u2} translate(${(1 - e3) * d2}${p2}, ${(1 - e3) * _2}${v2});
|
|
2357
|
+
opacity: ${c2 - f2 * t3}`
|
|
2305
2358
|
};
|
|
2306
2359
|
}
|
|
2307
2360
|
function slide(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_out, axis: i2 = "y" } = {}) {
|
|
2308
|
-
const s2 = getComputedStyle(e2), a2 = +s2.opacity, l2 = "y" === i2 ? "height" : "width", c2 = parseFloat(s2[l2]), u2 = "y" === i2 ? ["top", "bottom"] : ["left", "right"],
|
|
2361
|
+
const s2 = getComputedStyle(e2), a2 = +s2.opacity, l2 = "y" === i2 ? "height" : "width", c2 = parseFloat(s2[l2]), u2 = "y" === i2 ? ["top", "bottom"] : ["left", "right"], f2 = u2.map((e3) => (
|
|
2309
2362
|
/** @type {'Left' | 'Right' | 'Top' | 'Bottom'} */
|
|
2310
2363
|
`${e3[0].toUpperCase()}${e3.slice(1)}`
|
|
2311
|
-
)),
|
|
2364
|
+
)), d2 = parseFloat(s2[`padding${f2[0]}`]), p2 = parseFloat(s2[`padding${f2[1]}`]), _2 = parseFloat(s2[`margin${f2[0]}`]), v2 = parseFloat(s2[`margin${f2[1]}`]), g2 = parseFloat(s2[`border${f2[0]}Width`]), h2 = parseFloat(s2[`border${f2[1]}Width`]);
|
|
2312
2365
|
return {
|
|
2313
2366
|
delay: t2,
|
|
2314
2367
|
duration: n2,
|
|
2315
2368
|
easing: o2,
|
|
2316
|
-
css: (e3) => `overflow: hidden;opacity: ${Math.min(20 * e3, 1) * a2};${l2}: ${e3 * c2}px;padding-${u2[0]}: ${e3 *
|
|
2369
|
+
css: (e3) => `overflow: hidden;opacity: ${Math.min(20 * e3, 1) * a2};${l2}: ${e3 * c2}px;padding-${u2[0]}: ${e3 * d2}px;padding-${u2[1]}: ${e3 * p2}px;margin-${u2[0]}: ${e3 * _2}px;margin-${u2[1]}: ${e3 * v2}px;border-${u2[0]}-width: ${e3 * g2}px;border-${u2[1]}-width: ${e3 * h2}px;min-${l2}: 0`
|
|
2317
2370
|
};
|
|
2318
2371
|
}
|
|
2319
2372
|
function scale(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_out, start: i2 = 0, opacity: s2 = 0 } = {}) {
|
|
2320
|
-
const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.transform ? "" : a2.transform, u2 = 1 - i2,
|
|
2373
|
+
const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.transform ? "" : a2.transform, u2 = 1 - i2, f2 = l2 * (1 - s2);
|
|
2321
2374
|
return {
|
|
2322
2375
|
delay: t2,
|
|
2323
2376
|
duration: n2,
|
|
2324
2377
|
easing: o2,
|
|
2325
2378
|
css: (e3, t3) => `
|
|
2326
2379
|
transform: ${c2} scale(${1 - u2 * t3});
|
|
2327
|
-
opacity: ${l2 -
|
|
2380
|
+
opacity: ${l2 - f2 * t3}
|
|
2328
2381
|
`
|
|
2329
2382
|
};
|
|
2330
2383
|
}
|
|
2331
2384
|
delegate(["click"]);
|
|
2332
|
-
var
|
|
2385
|
+
var Ce = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>'), Se = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>'), Me = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>'), qe = /* @__PURE__ */ ns_template('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');
|
|
2333
2386
|
function Icon(e2, t2) {
|
|
2334
2387
|
let n2 = prop(t2, "type", 8, "success");
|
|
2335
2388
|
var o2 = comment(), i2 = first_child(o2), consequent = (e3) => {
|
|
2336
|
-
append(e3,
|
|
2337
|
-
},
|
|
2338
|
-
var
|
|
2339
|
-
append(e4,
|
|
2340
|
-
},
|
|
2341
|
-
var
|
|
2342
|
-
append(e5,
|
|
2343
|
-
},
|
|
2344
|
-
var
|
|
2345
|
-
append(e6,
|
|
2346
|
-
},
|
|
2389
|
+
append(e3, Ce());
|
|
2390
|
+
}, alternate = (e3, t3) => {
|
|
2391
|
+
var consequent_1 = (e4) => {
|
|
2392
|
+
append(e4, Se());
|
|
2393
|
+
}, alternate_1 = (e4, t4) => {
|
|
2394
|
+
var consequent_2 = (e5) => {
|
|
2395
|
+
append(e5, Me());
|
|
2396
|
+
}, alternate_2 = (e5, t5) => {
|
|
2397
|
+
var consequent_3 = (e6) => {
|
|
2398
|
+
append(e6, qe());
|
|
2399
|
+
}, alternate_3 = (e6) => {
|
|
2347
2400
|
};
|
|
2348
|
-
if_block(
|
|
2349
|
-
"warning" === n2() ? e6(consequent_3) : e6(
|
|
2350
|
-
},
|
|
2401
|
+
if_block(e5, (e6) => {
|
|
2402
|
+
"warning" === n2() ? e6(consequent_3) : e6(alternate_3, false);
|
|
2403
|
+
}, t5);
|
|
2351
2404
|
};
|
|
2352
|
-
if_block(
|
|
2353
|
-
"info" === n2() ? e5(consequent_2) : e5(
|
|
2354
|
-
},
|
|
2405
|
+
if_block(e4, (e5) => {
|
|
2406
|
+
"info" === n2() ? e5(consequent_2) : e5(alternate_2, false);
|
|
2407
|
+
}, t4);
|
|
2355
2408
|
};
|
|
2356
|
-
if_block(
|
|
2357
|
-
"error" === n2() ? e4(consequent_1) : e4(
|
|
2358
|
-
},
|
|
2409
|
+
if_block(e3, (e4) => {
|
|
2410
|
+
"error" === n2() ? e4(consequent_1) : e4(alternate_1, false);
|
|
2411
|
+
}, t3);
|
|
2359
2412
|
};
|
|
2360
2413
|
if_block(i2, (e3) => {
|
|
2361
|
-
"success" === n2() ? e3(consequent) : e3(
|
|
2414
|
+
"success" === n2() ? e3(consequent) : e3(alternate, false);
|
|
2362
2415
|
}), append(e2, o2);
|
|
2363
2416
|
}
|
|
2364
|
-
var
|
|
2417
|
+
var Ie = /* @__PURE__ */ template('<div class="sonner-loading-bar"></div>'), Te = /* @__PURE__ */ template('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');
|
|
2365
2418
|
function Loader(e2, t2) {
|
|
2366
2419
|
push(t2, false);
|
|
2367
2420
|
let n2 = prop(t2, "visible", 8);
|
|
2368
2421
|
const o2 = Array(12).fill(0);
|
|
2369
2422
|
init();
|
|
2370
|
-
var i2 =
|
|
2423
|
+
var i2 = Te();
|
|
2371
2424
|
each(child(i2), 5, () => o2, index, (e3, t3) => {
|
|
2372
|
-
append(e3,
|
|
2425
|
+
append(e3, Ie());
|
|
2373
2426
|
}), template_effect(() => set_attribute(i2, "data-visible", n2())), append(e2, i2), pop();
|
|
2374
2427
|
}
|
|
2375
2428
|
function cn(...e2) {
|
|
2376
2429
|
return e2.filter(Boolean).join(" ");
|
|
2377
2430
|
}
|
|
2378
|
-
const
|
|
2431
|
+
const Pe = "undefined" != typeof document;
|
|
2379
2432
|
function clientWritable(e2) {
|
|
2380
2433
|
const t2 = writable(e2);
|
|
2381
2434
|
return {
|
|
2382
2435
|
subscribe: t2.subscribe,
|
|
2383
2436
|
set: function set2(e3) {
|
|
2384
|
-
|
|
2437
|
+
Pe && t2.set(e3);
|
|
2385
2438
|
},
|
|
2386
2439
|
update: function update2(e3) {
|
|
2387
|
-
|
|
2440
|
+
Pe && t2.update(e3);
|
|
2388
2441
|
}
|
|
2389
2442
|
};
|
|
2390
2443
|
}
|
|
2391
|
-
let
|
|
2392
|
-
const
|
|
2444
|
+
let Oe = 0;
|
|
2445
|
+
const je = function createToastState() {
|
|
2393
2446
|
const e2 = clientWritable([]), t2 = clientWritable([]);
|
|
2394
2447
|
function addToast(t3) {
|
|
2395
2448
|
e2.update((e3) => [t3, ...e3]);
|
|
2396
2449
|
}
|
|
2397
2450
|
function create(t3) {
|
|
2398
|
-
var
|
|
2399
|
-
const { message: n2, ...o2 } = t3, i2 = "number" == typeof (t3 == null ? void 0 : t3.id) || t3.id && ((
|
|
2451
|
+
var _a2;
|
|
2452
|
+
const { message: n2, ...o2 } = t3, i2 = "number" == typeof (t3 == null ? void 0 : t3.id) || t3.id && ((_a2 = t3.id) == null ? void 0 : _a2.length) > 0 ? t3.id : Oe++, s2 = void 0 === t3.dismissable || t3.dismissable, a2 = void 0 === t3.type ? "default" : t3.type, l2 = get(e2).find((e3) => e3.id === i2);
|
|
2400
2453
|
return l2 ? e2.update((e3) => e3.map((e4) => e4.id === i2 ? {
|
|
2401
2454
|
...e4,
|
|
2402
2455
|
...t3,
|
|
@@ -2527,13 +2580,13 @@ const Te = function createToastState() {
|
|
|
2527
2580
|
});
|
|
2528
2581
|
}
|
|
2529
2582
|
}).finally(() => {
|
|
2530
|
-
var
|
|
2583
|
+
var _a2;
|
|
2531
2584
|
i2 && // Toast is still in load state (and will be indefinitely — dismiss it)
|
|
2532
|
-
(dismiss(n2), n2 = void 0), (
|
|
2585
|
+
(dismiss(n2), n2 = void 0), (_a2 = t3.finally) == null ? void 0 : _a2.call(t3);
|
|
2533
2586
|
}), n2;
|
|
2534
2587
|
},
|
|
2535
2588
|
custom: function custom(e3, t3) {
|
|
2536
|
-
const n2 = (t3 == null ? void 0 : t3.id) ||
|
|
2589
|
+
const n2 = (t3 == null ? void 0 : t3.id) || Oe++;
|
|
2537
2590
|
return create({
|
|
2538
2591
|
component: e3,
|
|
2539
2592
|
id: n2,
|
|
@@ -2554,27 +2607,27 @@ const Te = function createToastState() {
|
|
|
2554
2607
|
heights: t2
|
|
2555
2608
|
};
|
|
2556
2609
|
}();
|
|
2557
|
-
const
|
|
2558
|
-
return
|
|
2610
|
+
const Ee = function toastFunction(e2, t2) {
|
|
2611
|
+
return je.create({
|
|
2559
2612
|
message: e2,
|
|
2560
2613
|
...t2
|
|
2561
2614
|
});
|
|
2562
|
-
},
|
|
2563
|
-
success:
|
|
2564
|
-
info:
|
|
2565
|
-
warning:
|
|
2566
|
-
error:
|
|
2567
|
-
custom:
|
|
2568
|
-
message:
|
|
2569
|
-
promise:
|
|
2570
|
-
dismiss:
|
|
2571
|
-
loading:
|
|
2615
|
+
}, Ne = Object.assign(Ee, {
|
|
2616
|
+
success: je.success,
|
|
2617
|
+
info: je.info,
|
|
2618
|
+
warning: je.warning,
|
|
2619
|
+
error: je.error,
|
|
2620
|
+
custom: je.custom,
|
|
2621
|
+
message: je.message,
|
|
2622
|
+
promise: je.promise,
|
|
2623
|
+
dismiss: je.dismiss,
|
|
2624
|
+
loading: je.loading
|
|
2572
2625
|
});
|
|
2573
|
-
var
|
|
2626
|
+
var Ae = /* @__PURE__ */ template('<button aria-label="Close toast" data-close-button=""><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button>'), Be = /* @__PURE__ */ template('<div data-icon=""><!> <!></div>'), De = /* @__PURE__ */ template('<div data-title=""><!></div>'), We = /* @__PURE__ */ template('<div data-description=""><!></div>'), ze = /* @__PURE__ */ template('<button data-button="" data-cancel=""> </button>'), Le = /* @__PURE__ */ template('<button data-button=""> </button>'), Fe = /* @__PURE__ */ template('<!> <div data-content=""><!> <!></div> <!> <!>', 1), Ge = /* @__PURE__ */ template('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');
|
|
2574
2627
|
function Toast(e2, t2) {
|
|
2575
2628
|
const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]);
|
|
2576
2629
|
push(t2, false);
|
|
2577
|
-
const [o2, i2] = setup_stores(), $heights = () => store_get(y2, "$heights", o2), $effect = () => store_get(get$1(Q2), "$effect", o2), s2 = mutable_state(void 0, true), a2 = mutable_state(void 0, true), l2 = mutable_state(void 0, true), c2 = mutable_state(void 0, true), u2 = mutable_state(void 0, true),
|
|
2630
|
+
const [o2, i2] = setup_stores(), $heights = () => store_get(y2, "$heights", o2), $effect = () => store_get(get$1(Q2), "$effect", o2), s2 = mutable_state(void 0, true), a2 = mutable_state(void 0, true), l2 = mutable_state(void 0, true), c2 = mutable_state(void 0, true), u2 = mutable_state(void 0, true), f2 = mutable_state(void 0, true), d2 = mutable_state(void 0, true), p2 = mutable_state(void 0, true), _2 = mutable_state(void 0, true), v2 = mutable_state(void 0, true), g2 = mutable_state(void 0, true), h2 = mutable_state(void 0, true), m2 = {
|
|
2578
2631
|
toast: "",
|
|
2579
2632
|
title: "",
|
|
2580
2633
|
description: "",
|
|
@@ -2589,10 +2642,10 @@ function Toast(e2, t2) {
|
|
|
2589
2642
|
default: "",
|
|
2590
2643
|
info: "",
|
|
2591
2644
|
loading: ""
|
|
2592
|
-
}, { toasts: b2, heights: y2, removeHeight: $2, setHeight: w2, remove: x2 } =
|
|
2593
|
-
let k2 = prop(t2, "toast", 9), C2 = prop(t2, "index", 9),
|
|
2645
|
+
}, { toasts: b2, heights: y2, removeHeight: $2, setHeight: w2, remove: x2 } = je;
|
|
2646
|
+
let k2 = prop(t2, "toast", 9), C2 = prop(t2, "index", 9), S2 = prop(t2, "expanded", 9), M2 = prop(t2, "invert", 13), q2 = prop(t2, "position", 9), I2 = prop(t2, "visibleToasts", 9), T2 = prop(t2, "expandByDefault", 9), P2 = prop(t2, "closeButton", 9), O2 = prop(t2, "interacting", 9), j2 = prop(t2, "cancelButtonStyle", 9, ""), E2 = prop(t2, "actionButtonStyle", 9, ""), N2 = prop(t2, "duration", 9, 4e3), A2 = prop(t2, "descriptionClass", 9, ""), B2 = prop(t2, "classes", 29, () => ({})), D2 = prop(t2, "unstyled", 9, false), W2 = mutable_state(false, true), z2 = mutable_state(false, true), L2 = mutable_state(false, true), F2 = mutable_state(false, true), G2 = mutable_state(0, true), H2 = mutable_state(0, true), R2 = mutable_state(void 0, true), V2 = mutable_state(0, true), K2 = 0, U2 = 0, Z2 = null;
|
|
2594
2647
|
function deleteToast() {
|
|
2595
|
-
set(
|
|
2648
|
+
set(z2, true), // Save the offset for the exit swipe animation
|
|
2596
2649
|
set(G2, get$1(V2)), $2(k2().id), setTimeout(() => {
|
|
2597
2650
|
x2(k2().id);
|
|
2598
2651
|
}, 200);
|
|
@@ -2601,27 +2654,27 @@ function Toast(e2, t2) {
|
|
|
2601
2654
|
function startTimer() {
|
|
2602
2655
|
K2 = (/* @__PURE__ */ new Date()).getTime(), // Let the toast know it has started
|
|
2603
2656
|
set(Y2, setTimeout(() => {
|
|
2604
|
-
var
|
|
2605
|
-
(
|
|
2657
|
+
var _a2, _b2;
|
|
2658
|
+
(_b2 = (_a2 = k2()).onAutoClose) == null ? void 0 : _b2.call(_a2, k2()), deleteToast();
|
|
2606
2659
|
}, get$1(J2)));
|
|
2607
2660
|
}
|
|
2608
2661
|
let Q2 = mutable_state(void 0, true);
|
|
2609
2662
|
onMount(() => {
|
|
2610
|
-
set(
|
|
2663
|
+
set(W2, true);
|
|
2611
2664
|
const e3 = get$1(R2).getBoundingClientRect().height;
|
|
2612
2665
|
return set(H2, e3), w2({
|
|
2613
2666
|
toastId: k2().id,
|
|
2614
2667
|
height: e3
|
|
2615
2668
|
}), () => $2(k2().id);
|
|
2616
|
-
}), legacy_pre_effect(() => deep_read_state(
|
|
2617
|
-
|
|
2669
|
+
}), legacy_pre_effect(() => deep_read_state(B2()), () => {
|
|
2670
|
+
B2({
|
|
2618
2671
|
...m2,
|
|
2619
|
-
...
|
|
2672
|
+
...B2()
|
|
2620
2673
|
});
|
|
2621
2674
|
}), legacy_pre_effect(() => deep_read_state(C2()), () => {
|
|
2622
2675
|
set(s2, 0 === C2());
|
|
2623
|
-
}), legacy_pre_effect(() => (deep_read_state(C2()), deep_read_state(
|
|
2624
|
-
set(a2, C2() + 1 <=
|
|
2676
|
+
}), legacy_pre_effect(() => (deep_read_state(C2()), deep_read_state(I2())), () => {
|
|
2677
|
+
set(a2, C2() + 1 <= I2());
|
|
2625
2678
|
}), legacy_pre_effect(() => deep_read_state(k2()), () => {
|
|
2626
2679
|
set(l2, k2().title);
|
|
2627
2680
|
}), legacy_pre_effect(() => deep_read_state(k2()), () => {
|
|
@@ -2629,20 +2682,20 @@ function Toast(e2, t2) {
|
|
|
2629
2682
|
}), legacy_pre_effect(() => deep_read_state(k2()), () => {
|
|
2630
2683
|
set(u2, k2().type);
|
|
2631
2684
|
}), legacy_pre_effect(() => deep_read_state(k2()), () => {
|
|
2632
|
-
set(
|
|
2685
|
+
set(f2, k2().class || "");
|
|
2633
2686
|
}), legacy_pre_effect(() => deep_read_state(k2()), () => {
|
|
2634
|
-
set(
|
|
2687
|
+
set(d2, k2().descriptionClass || "");
|
|
2635
2688
|
}), legacy_pre_effect(() => ($heights(), deep_read_state(k2())), () => {
|
|
2636
2689
|
set(p2, $heights().findIndex((e3) => e3.toastId === k2().id) || 0);
|
|
2637
|
-
}), legacy_pre_effect(() => deep_read_state(
|
|
2638
|
-
set(_2,
|
|
2690
|
+
}), legacy_pre_effect(() => deep_read_state(q2()), () => {
|
|
2691
|
+
set(_2, q2().split("-"));
|
|
2639
2692
|
}), legacy_pre_effect(() => ($heights(), get$1(p2)), () => {
|
|
2640
2693
|
set(v2, $heights().reduce((e3, t3, n3) => (
|
|
2641
2694
|
// Calculate offset up untill current toast
|
|
2642
2695
|
n3 >= get$1(p2) ? e3 : e3 + t3.height
|
|
2643
2696
|
), 0));
|
|
2644
|
-
}), legacy_pre_effect(() => (deep_read_state(
|
|
2645
|
-
|
|
2697
|
+
}), legacy_pre_effect(() => (deep_read_state(M2()), deep_read_state(k2())), () => {
|
|
2698
|
+
M2(k2().invert || M2());
|
|
2646
2699
|
}), legacy_pre_effect(() => get$1(u2), () => {
|
|
2647
2700
|
set(g2, "loading" === get$1(u2));
|
|
2648
2701
|
}), legacy_pre_effect(() => (get$1(p2), get$1(v2)), () => {
|
|
@@ -2650,9 +2703,9 @@ function Toast(e2, t2) {
|
|
|
2650
2703
|
}), legacy_pre_effect(() => (get$1(l2), get$1(c2)), () => {
|
|
2651
2704
|
get$1(l2), get$1(c2), // Listen to height changes
|
|
2652
2705
|
async function updateHeights() {
|
|
2653
|
-
if (!get$1(
|
|
2706
|
+
if (!get$1(W2)) return;
|
|
2654
2707
|
let e3;
|
|
2655
|
-
await tick(), e3 =
|
|
2708
|
+
await tick(), e3 = S2() || T2() ? 1 : 1 - 0.05 * C2(), get$1(R2).style.setProperty("height", "auto");
|
|
2656
2709
|
const t3 = get$1(R2).offsetHeight, n3 = get$1(R2).getBoundingClientRect().height, o3 = Math.round(100 * (n3 / e3 + Number.EPSILON)) / 100;
|
|
2657
2710
|
let i3;
|
|
2658
2711
|
get$1(R2).style.removeProperty("height"), // Use scaledRectHeight as it's more precise
|
|
@@ -2668,13 +2721,13 @@ function Toast(e2, t2) {
|
|
|
2668
2721
|
(clearTimeout(get$1(Y2)), set(J2, k2().duration || N2() || 4e3), startTimer());
|
|
2669
2722
|
}), legacy_pre_effect(() => (deep_read_state(k2()), get$1(u2)), () => {
|
|
2670
2723
|
set(h2, k2().promise && "loading" === get$1(u2) || k2().duration === Number.POSITIVE_INFINITY);
|
|
2671
|
-
}), legacy_pre_effect(() => (get$1(h2), deep_read_state(
|
|
2724
|
+
}), legacy_pre_effect(() => (get$1(h2), deep_read_state(S2()), deep_read_state(O2()), get$1(Y2)), () => {
|
|
2672
2725
|
var e3;
|
|
2673
2726
|
!function store_unsub(e4, t3, n3) {
|
|
2674
2727
|
let o3 = n3[t3];
|
|
2675
2728
|
return o3 && o3.store !== e4 && // Don't reset store yet, so that store_get above can resubscribe to new store if necessary
|
|
2676
2729
|
(o3.unsubscribe(), o3.unsubscribe = noop), e4;
|
|
2677
|
-
}(set(Q2, (e3 = () => (get$1(h2) || (
|
|
2730
|
+
}(set(Q2, (e3 = () => (get$1(h2) || (S2() || O2() ? (
|
|
2678
2731
|
// If toast's duration changes, it will be out of sync with the
|
|
2679
2732
|
// remainingAtTimeout, so we know we need to restart the timer
|
|
2680
2733
|
// with the new duration
|
|
@@ -2694,27 +2747,28 @@ function Toast(e2, t2) {
|
|
|
2694
2747
|
}), legacy_pre_effect(() => deep_read_state(k2()), () => {
|
|
2695
2748
|
k2().delete && deleteToast();
|
|
2696
2749
|
}), legacy_pre_effect_reset(), init(true);
|
|
2697
|
-
var ee2 =
|
|
2750
|
+
var ee2 = Ge();
|
|
2751
|
+
let te2;
|
|
2698
2752
|
set_attribute(ee2, "tabindex", 0);
|
|
2699
|
-
var
|
|
2700
|
-
var t3 =
|
|
2753
|
+
var ne2 = child(ee2), consequent = (e3) => {
|
|
2754
|
+
var t3 = Ae();
|
|
2701
2755
|
template_effect((e4) => {
|
|
2702
|
-
set_attribute(t3, "data-disabled", get$1(g2)), set_class(t3, 1,
|
|
2756
|
+
set_attribute(t3, "data-disabled", get$1(g2)), set_class(t3, 1, e4);
|
|
2703
2757
|
}, [() => {
|
|
2704
|
-
var
|
|
2705
|
-
return cn((
|
|
2758
|
+
var _a2, _b2, _c;
|
|
2759
|
+
return clsx(cn((_a2 = B2()) == null ? void 0 : _a2.closeButton, (_c = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c.closeButton));
|
|
2706
2760
|
}], derived_safe_equal), event("click", t3, function(...e4) {
|
|
2707
|
-
var
|
|
2708
|
-
(
|
|
2709
|
-
var
|
|
2710
|
-
deleteToast(), (
|
|
2711
|
-
}) == null ? void 0 :
|
|
2761
|
+
var _a2;
|
|
2762
|
+
(_a2 = get$1(g2) ? void 0 : () => {
|
|
2763
|
+
var _a3, _b2;
|
|
2764
|
+
deleteToast(), (_b2 = (_a3 = k2()).onDismiss) == null ? void 0 : _b2.call(_a3, k2());
|
|
2765
|
+
}) == null ? void 0 : _a2.apply(this, e4);
|
|
2712
2766
|
}), append(e3, t3);
|
|
2713
2767
|
};
|
|
2714
|
-
if_block(
|
|
2768
|
+
if_block(ne2, (e3) => {
|
|
2715
2769
|
P2() && !k2().component && e3(consequent);
|
|
2716
2770
|
});
|
|
2717
|
-
var
|
|
2771
|
+
var re2 = sibling(ne2, 2), consequent_1 = (e3) => {
|
|
2718
2772
|
var t3 = comment();
|
|
2719
2773
|
component(first_child(t3), () => k2().component, (e4, t4) => {
|
|
2720
2774
|
t4(e4, spread_props(() => k2().componentProps, {
|
|
@@ -2723,9 +2777,9 @@ function Toast(e2, t2) {
|
|
|
2723
2777
|
}
|
|
2724
2778
|
}));
|
|
2725
2779
|
}), append(e3, t3);
|
|
2726
|
-
},
|
|
2727
|
-
var n3 =
|
|
2728
|
-
var n4 =
|
|
2780
|
+
}, alternate = (e3) => {
|
|
2781
|
+
var n3 = Fe(), o3 = first_child(n3), consequent_8 = (e4) => {
|
|
2782
|
+
var n4 = Be(), o4 = child(n4), consequent_2 = (e5) => {
|
|
2729
2783
|
var n5 = comment();
|
|
2730
2784
|
slot(first_child(n5), t2, "loading-icon", {}, null), append(e5, n5);
|
|
2731
2785
|
};
|
|
@@ -2737,140 +2791,146 @@ function Toast(e2, t2) {
|
|
|
2737
2791
|
component(first_child(t3), () => k2().icon, (e6, t4) => {
|
|
2738
2792
|
t4(e6, {});
|
|
2739
2793
|
}), append(e5, t3);
|
|
2740
|
-
},
|
|
2741
|
-
var
|
|
2794
|
+
}, alternate_1 = (e5, n5) => {
|
|
2795
|
+
var consequent_4 = (e6) => {
|
|
2742
2796
|
var n6 = comment();
|
|
2743
2797
|
slot(first_child(n6), t2, "success-icon", {}, null), append(e6, n6);
|
|
2744
|
-
}, alternate_2 = (e6) => {
|
|
2745
|
-
var
|
|
2798
|
+
}, alternate_2 = (e6, n6) => {
|
|
2799
|
+
var consequent_5 = (e7) => {
|
|
2746
2800
|
var n7 = comment();
|
|
2747
2801
|
slot(first_child(n7), t2, "error-icon", {}, null), append(e7, n7);
|
|
2748
|
-
},
|
|
2749
|
-
var
|
|
2802
|
+
}, alternate_3 = (e7, n7) => {
|
|
2803
|
+
var consequent_6 = (e8) => {
|
|
2750
2804
|
var n8 = comment();
|
|
2751
2805
|
slot(first_child(n8), t2, "warning-icon", {}, null), append(e8, n8);
|
|
2752
|
-
},
|
|
2753
|
-
var
|
|
2806
|
+
}, alternate_4 = (e8, n8) => {
|
|
2807
|
+
var consequent_7 = (e9) => {
|
|
2754
2808
|
var n9 = comment();
|
|
2755
2809
|
slot(first_child(n9), t2, "info-icon", {}, null), append(e9, n9);
|
|
2756
2810
|
};
|
|
2757
|
-
if_block(
|
|
2811
|
+
if_block(e8, (e9) => {
|
|
2758
2812
|
"info" === get$1(u2) && e9(consequent_7);
|
|
2759
|
-
},
|
|
2813
|
+
}, n8);
|
|
2760
2814
|
};
|
|
2761
|
-
if_block(
|
|
2762
|
-
"warning" === get$1(u2) ? e8(consequent_6) : e8(
|
|
2763
|
-
},
|
|
2815
|
+
if_block(e7, (e8) => {
|
|
2816
|
+
"warning" === get$1(u2) ? e8(consequent_6) : e8(alternate_4, false);
|
|
2817
|
+
}, n7);
|
|
2764
2818
|
};
|
|
2765
|
-
if_block(
|
|
2766
|
-
"error" === get$1(u2) ? e7(consequent_5) : e7(
|
|
2767
|
-
},
|
|
2819
|
+
if_block(e6, (e7) => {
|
|
2820
|
+
"error" === get$1(u2) ? e7(consequent_5) : e7(alternate_3, false);
|
|
2821
|
+
}, n6);
|
|
2768
2822
|
};
|
|
2769
|
-
if_block(
|
|
2823
|
+
if_block(e5, (e6) => {
|
|
2770
2824
|
"success" === get$1(u2) ? e6(consequent_4) : e6(alternate_2, false);
|
|
2771
|
-
},
|
|
2825
|
+
}, n5);
|
|
2772
2826
|
};
|
|
2773
2827
|
if_block(i4, (e5) => {
|
|
2774
|
-
k2().icon ? e5(consequent_3) : e5(
|
|
2828
|
+
k2().icon ? e5(consequent_3) : e5(alternate_1, false);
|
|
2775
2829
|
}), append(e4, n4);
|
|
2776
2830
|
};
|
|
2777
2831
|
if_block(o3, (e4) => {
|
|
2778
2832
|
("default" !== get$1(u2) || k2().icon || k2().promise) && e4(consequent_8);
|
|
2779
2833
|
});
|
|
2780
2834
|
var i3 = sibling(o3, 2), s3 = child(i3), consequent_10 = (e4) => {
|
|
2781
|
-
var t3 =
|
|
2835
|
+
var t3 = De(), n4 = child(t3), consequent_9 = (e5) => {
|
|
2782
2836
|
var t4 = comment();
|
|
2783
2837
|
component(first_child(t4), () => k2().title, (e6, t5) => {
|
|
2784
2838
|
t5(e6, spread_props(() => k2().componentProps));
|
|
2785
2839
|
}), append(e5, t4);
|
|
2786
|
-
},
|
|
2840
|
+
}, alternate_5 = (e5) => {
|
|
2787
2841
|
var t4 = text();
|
|
2788
2842
|
template_effect(() => set_text(t4, k2().title)), append(e5, t4);
|
|
2789
2843
|
};
|
|
2790
2844
|
if_block(n4, (e5) => {
|
|
2791
|
-
"string" != typeof k2().title ? e5(consequent_9) : e5(
|
|
2792
|
-
}), template_effect((e5) => set_class(t3, 1,
|
|
2793
|
-
var
|
|
2794
|
-
return cn((
|
|
2845
|
+
"string" != typeof k2().title ? e5(consequent_9) : e5(alternate_5, false);
|
|
2846
|
+
}), template_effect((e5) => set_class(t3, 1, e5), [() => {
|
|
2847
|
+
var _a2, _b2, _c;
|
|
2848
|
+
return clsx(cn((_a2 = B2()) == null ? void 0 : _a2.title, (_c = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c.title));
|
|
2795
2849
|
}], derived_safe_equal), append(e4, t3);
|
|
2796
2850
|
};
|
|
2797
2851
|
if_block(s3, (e4) => {
|
|
2798
2852
|
k2().title && e4(consequent_10);
|
|
2799
2853
|
});
|
|
2800
2854
|
var a3 = sibling(s3, 2), consequent_12 = (e4) => {
|
|
2801
|
-
var t3 =
|
|
2855
|
+
var t3 = We(), n4 = child(t3), consequent_11 = (e5) => {
|
|
2802
2856
|
var t4 = comment();
|
|
2803
2857
|
component(first_child(t4), () => k2().description, (e6, t5) => {
|
|
2804
2858
|
t5(e6, spread_props(() => k2().componentProps));
|
|
2805
2859
|
}), append(e5, t4);
|
|
2806
|
-
},
|
|
2860
|
+
}, alternate_6 = (e5) => {
|
|
2807
2861
|
var t4 = text();
|
|
2808
2862
|
template_effect(() => set_text(t4, k2().description)), append(e5, t4);
|
|
2809
2863
|
};
|
|
2810
2864
|
if_block(n4, (e5) => {
|
|
2811
|
-
"string" != typeof k2().description ? e5(consequent_11) : e5(
|
|
2812
|
-
}), template_effect((e5) => set_class(t3, 1,
|
|
2813
|
-
var
|
|
2814
|
-
return cn(
|
|
2865
|
+
"string" != typeof k2().description ? e5(consequent_11) : e5(alternate_6, false);
|
|
2866
|
+
}), template_effect((e5) => set_class(t3, 1, e5), [() => {
|
|
2867
|
+
var _a2, _b2;
|
|
2868
|
+
return clsx(cn(A2(), get$1(d2), (_a2 = B2()) == null ? void 0 : _a2.description, (_b2 = k2().classes) == null ? void 0 : _b2.description));
|
|
2815
2869
|
}], derived_safe_equal), append(e4, t3);
|
|
2816
2870
|
};
|
|
2817
2871
|
if_block(a3, (e4) => {
|
|
2818
2872
|
k2().description && e4(consequent_12);
|
|
2819
2873
|
});
|
|
2820
2874
|
var l3 = sibling(i3, 2), consequent_13 = (e4) => {
|
|
2821
|
-
var t3 =
|
|
2875
|
+
var t3 = ze(), n4 = child(t3);
|
|
2822
2876
|
template_effect((e5) => {
|
|
2823
|
-
|
|
2877
|
+
set_style(t3, j2()), set_class(t3, 1, e5), set_text(n4, k2().cancel.label);
|
|
2824
2878
|
}, [() => {
|
|
2825
|
-
var
|
|
2826
|
-
return cn((
|
|
2879
|
+
var _a2, _b2, _c;
|
|
2880
|
+
return clsx(cn((_a2 = B2()) == null ? void 0 : _a2.cancelButton, (_c = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c.cancelButton));
|
|
2827
2881
|
}], derived_safe_equal), event("click", t3, () => {
|
|
2828
|
-
var
|
|
2829
|
-
deleteToast(), ((
|
|
2882
|
+
var _a2;
|
|
2883
|
+
deleteToast(), ((_a2 = k2().cancel) == null ? void 0 : _a2.onClick) && k2().cancel.onClick();
|
|
2830
2884
|
}), append(e4, t3);
|
|
2831
2885
|
};
|
|
2832
2886
|
if_block(l3, (e4) => {
|
|
2833
2887
|
k2().cancel && e4(consequent_13);
|
|
2834
2888
|
});
|
|
2835
2889
|
var c3 = sibling(l3, 2), consequent_14 = (e4) => {
|
|
2836
|
-
var t3 =
|
|
2890
|
+
var t3 = Le(), n4 = child(t3);
|
|
2837
2891
|
template_effect((e5) => {
|
|
2838
|
-
|
|
2892
|
+
set_style(t3, E2()), set_class(t3, 1, e5), set_text(n4, k2().action.label);
|
|
2839
2893
|
}, [() => {
|
|
2840
|
-
var
|
|
2841
|
-
return cn((
|
|
2894
|
+
var _a2, _b2, _c;
|
|
2895
|
+
return clsx(cn((_a2 = B2()) == null ? void 0 : _a2.actionButton, (_c = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c.actionButton));
|
|
2842
2896
|
}], derived_safe_equal), event("click", t3, (e5) => {
|
|
2843
|
-
var
|
|
2844
|
-
(
|
|
2897
|
+
var _a2;
|
|
2898
|
+
(_a2 = k2().action) == null ? void 0 : _a2.onClick(e5), e5.defaultPrevented || deleteToast();
|
|
2845
2899
|
}), append(e4, t3);
|
|
2846
2900
|
};
|
|
2847
2901
|
if_block(c3, (e4) => {
|
|
2848
2902
|
k2().action && e4(consequent_14);
|
|
2849
2903
|
}), append(e3, n3);
|
|
2850
2904
|
};
|
|
2851
|
-
if_block(
|
|
2852
|
-
k2().component ? e3(consequent_1) : e3(
|
|
2905
|
+
if_block(re2, (e3) => {
|
|
2906
|
+
k2().component ? e3(consequent_1) : e3(alternate, false);
|
|
2853
2907
|
}), bind_this(ee2, (e3) => set(R2, e3), () => get$1(R2)), template_effect((e3, t3, i3) => {
|
|
2854
|
-
var
|
|
2855
|
-
set_attribute(ee2, "aria-live", k2().important ? "assertive" : "polite"), set_class(ee2, 1,
|
|
2908
|
+
var _a2;
|
|
2909
|
+
set_attribute(ee2, "aria-live", k2().important ? "assertive" : "polite"), set_class(ee2, 1, e3), set_attribute(ee2, "data-styled", !(k2().component || ((_a2 = k2()) == null ? void 0 : _a2.unstyled) || D2())), set_attribute(ee2, "data-mounted", get$1(W2)), set_attribute(ee2, "data-promise", t3), set_attribute(ee2, "data-removed", get$1(z2)), set_attribute(ee2, "data-visible", get$1(a2)), set_attribute(ee2, "data-y-position", get$1(_2)[0]), set_attribute(ee2, "data-x-position", get$1(_2)[1]), set_attribute(ee2, "data-index", C2()), set_attribute(ee2, "data-front", get$1(s2)), set_attribute(ee2, "data-swiping", get$1(L2)), set_attribute(ee2, "data-type", get$1(u2)), set_attribute(ee2, "data-invert", M2()), set_attribute(ee2, "data-swipe-out", get$1(F2)), set_attribute(ee2, "data-expanded", i3), te2 = set_style(ee2, `${n2.style} ${k2().style}`, te2, {
|
|
2910
|
+
"--index": C2(),
|
|
2911
|
+
"--toasts-before": C2(),
|
|
2912
|
+
"--z-index": store_get(b2, "$toasts", o2).length - C2(),
|
|
2913
|
+
"--offset": `${get$1(z2) ? get$1(G2) : get$1(V2)}px`,
|
|
2914
|
+
"--initial-height": `${get$1(H2)}px`
|
|
2915
|
+
});
|
|
2856
2916
|
}, [() => {
|
|
2857
|
-
var
|
|
2858
|
-
return cn(n2.class, get$1(
|
|
2859
|
-
}, () => Boolean(k2().promise), () => Boolean(
|
|
2917
|
+
var _a2, _b2, _c, _d, _e2, _f;
|
|
2918
|
+
return clsx(cn(n2.class, get$1(f2), (_a2 = B2()) == null ? void 0 : _a2.toast, (_c = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c.toast, (_d = B2()) == null ? void 0 : _d[get$1(u2)], (_f = (_e2 = k2()) == null ? void 0 : _e2.classes) == null ? void 0 : _f[get$1(u2)]));
|
|
2919
|
+
}, () => Boolean(k2().promise), () => Boolean(S2() || T2() && get$1(W2))], derived_safe_equal), event("pointerdown", ee2, function onPointerDown(e3) {
|
|
2860
2920
|
if (get$1(g2)) return;
|
|
2861
2921
|
set(G2, get$1(V2));
|
|
2862
2922
|
const t3 = e3.target;
|
|
2863
|
-
t3.setPointerCapture(e3.pointerId), "BUTTON" !== t3.tagName && (set(
|
|
2923
|
+
t3.setPointerCapture(e3.pointerId), "BUTTON" !== t3.tagName && (set(L2, true), Z2 = {
|
|
2864
2924
|
x: e3.clientX,
|
|
2865
2925
|
y: e3.clientY
|
|
2866
2926
|
});
|
|
2867
2927
|
}), event("pointerup", ee2, function onPointerUp() {
|
|
2868
|
-
var
|
|
2928
|
+
var _a2, _b2, _c;
|
|
2869
2929
|
if (get$1(F2)) return;
|
|
2870
2930
|
Z2 = null;
|
|
2871
|
-
const e3 = Number(((
|
|
2872
|
-
if (Math.abs(e3) >= 20) return set(G2, get$1(V2)), (_c = (
|
|
2873
|
-
get$1(R2).style.setProperty("--swipe-amount", "0px"), set(
|
|
2931
|
+
const e3 = Number(((_a2 = get$1(R2)) == null ? void 0 : _a2.style.getPropertyValue("--swipe-amount").replace("px", "")) || 0);
|
|
2932
|
+
if (Math.abs(e3) >= 20) return set(G2, get$1(V2)), (_c = (_b2 = k2()).onDismiss) == null ? void 0 : _c.call(_b2, k2()), deleteToast(), void set(F2, true);
|
|
2933
|
+
get$1(R2).style.setProperty("--swipe-amount", "0px"), set(L2, false);
|
|
2874
2934
|
}), event("pointermove", ee2, function onPointerMove(e3) {
|
|
2875
2935
|
if (!Z2) return;
|
|
2876
2936
|
const t3 = e3.clientY - Z2.y, n3 = e3.clientX - Z2.x, o3 = ("top" === get$1(_2)[0] ? Math.min : Math.max)(0, t3), i3 = "touch" === e3.pointerType ? 10 : 2;
|
|
@@ -2879,7 +2939,7 @@ function Toast(e2, t2) {
|
|
|
2879
2939
|
(Z2 = null);
|
|
2880
2940
|
}), append(e2, ee2), pop(), i2();
|
|
2881
2941
|
}
|
|
2882
|
-
var
|
|
2942
|
+
var He = /* @__PURE__ */ template("<ol></ol>"), Re = /* @__PURE__ */ template('<section class="svelte-1fo5d1m"></section>');
|
|
2883
2943
|
function Toaster(e2, t2) {
|
|
2884
2944
|
const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]), o2 = legacy_rest_props(n2, ["invert", "theme", "position", "hotkey", "containerAriaLabel", "richColors", "expand", "duration", "visibleToasts", "closeButton", "toastOptions", "offset", "dir"]);
|
|
2885
2945
|
push(t2, false);
|
|
@@ -2890,33 +2950,33 @@ function Toaster(e2, t2) {
|
|
|
2890
2950
|
const e3 = document.documentElement.getAttribute("dir");
|
|
2891
2951
|
return "auto" !== e3 && e3 ? e3 : window.getComputedStyle(document.documentElement).direction;
|
|
2892
2952
|
}
|
|
2893
|
-
let
|
|
2894
|
-
const { toasts: k2, heights: C2, reset:
|
|
2895
|
-
let
|
|
2953
|
+
let f2 = prop(t2, "invert", 8, false), d2 = prop(t2, "theme", 8, "light"), p2 = prop(t2, "position", 8, "bottom-right"), _2 = prop(t2, "hotkey", 24, () => ["altKey", "KeyT"]), v2 = prop(t2, "containerAriaLabel", 8, "Notifications"), g2 = prop(t2, "richColors", 8, false), h2 = prop(t2, "expand", 8, false), m2 = prop(t2, "duration", 8, 4e3), b2 = prop(t2, "visibleToasts", 8, 3), y2 = prop(t2, "closeButton", 8, false), $2 = prop(t2, "toastOptions", 24, () => ({})), w2 = prop(t2, "offset", 8, null), x2 = prop(t2, "dir", 24, getDocumentDirection);
|
|
2954
|
+
const { toasts: k2, heights: C2, reset: S2 } = je;
|
|
2955
|
+
let M2 = mutable_state(false), I2 = mutable_state(false), T2 = mutable_state(function getInitialTheme(e3) {
|
|
2896
2956
|
return "system" !== e3 ? e3 : "undefined" != typeof window && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? c2 : u2;
|
|
2897
|
-
}(
|
|
2957
|
+
}(d2())), P2 = mutable_state(), O2 = null, j2 = false;
|
|
2898
2958
|
function handleBlur(e3) {
|
|
2899
|
-
|
|
2959
|
+
j2 && !e3.currentTarget.contains(e3.relatedTarget) && (j2 = false, O2 && (O2.focus({
|
|
2900
2960
|
preventScroll: true
|
|
2901
2961
|
}), O2 = null));
|
|
2902
2962
|
}
|
|
2903
2963
|
function handleFocus(e3) {
|
|
2904
|
-
|
|
2964
|
+
j2 || (j2 = true, O2 = e3.relatedTarget);
|
|
2905
2965
|
}
|
|
2906
2966
|
!function onDestroy(e3) {
|
|
2907
|
-
null ===
|
|
2967
|
+
null === q && lifecycle_outside_component(), onMount(() => () => untrack(e3));
|
|
2908
2968
|
}(() => {
|
|
2909
2969
|
get$1(P2) && O2 && (O2.focus({
|
|
2910
2970
|
preventScroll: true
|
|
2911
|
-
}), O2 = null,
|
|
2971
|
+
}), O2 = null, j2 = false);
|
|
2912
2972
|
}), onMount(() => {
|
|
2913
|
-
|
|
2973
|
+
S2();
|
|
2914
2974
|
const handleKeydown = (e3) => {
|
|
2915
|
-
var
|
|
2975
|
+
var _a2, _b2;
|
|
2916
2976
|
_2().every((t3) => (
|
|
2917
2977
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2918
2978
|
e3[t3] || e3.code === t3
|
|
2919
|
-
)) && (set(
|
|
2979
|
+
)) && (set(M2, true), (_a2 = get$1(P2)) == null ? void 0 : _a2.focus()), "Escape" !== e3.code || document.activeElement !== get$1(P2) && !((_b2 = get$1(P2)) == null ? void 0 : _b2.contains(document.activeElement)) || set(M2, false);
|
|
2920
2980
|
};
|
|
2921
2981
|
return document.addEventListener("keydown", handleKeydown), () => {
|
|
2922
2982
|
document.removeEventListener("keydown", handleKeydown);
|
|
@@ -2926,7 +2986,7 @@ function Toaster(e2, t2) {
|
|
|
2926
2986
|
}), legacy_pre_effect(() => deep_read_state(_2()), () => {
|
|
2927
2987
|
set(l2, _2().join("+").replace(/Key/g, "").replace(/Digit/g, ""));
|
|
2928
2988
|
}), legacy_pre_effect(() => $toasts(), () => {
|
|
2929
|
-
$toasts().length <= 1 && set(
|
|
2989
|
+
$toasts().length <= 1 && set(M2, false);
|
|
2930
2990
|
}), legacy_pre_effect(() => $toasts(), () => {
|
|
2931
2991
|
const e3 = $toasts().filter((e4) => e4.dismiss && !e4.delete);
|
|
2932
2992
|
if (e3.length > 0) {
|
|
@@ -2936,9 +2996,9 @@ function Toaster(e2, t2) {
|
|
|
2936
2996
|
} : t4);
|
|
2937
2997
|
k2.set(t3);
|
|
2938
2998
|
}
|
|
2939
|
-
}), legacy_pre_effect(() => deep_read_state(
|
|
2940
|
-
if ("system" !==
|
|
2941
|
-
"system" ===
|
|
2999
|
+
}), legacy_pre_effect(() => deep_read_state(d2()), () => {
|
|
3000
|
+
if ("system" !== d2() && set(T2, d2()), "undefined" != typeof window) {
|
|
3001
|
+
"system" === d2() && // check if current preference is dark
|
|
2942
3002
|
(window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? (
|
|
2943
3003
|
// it's currently dark
|
|
2944
3004
|
set(T2, c2)
|
|
@@ -2955,27 +3015,27 @@ function Toaster(e2, t2) {
|
|
|
2955
3015
|
);
|
|
2956
3016
|
}
|
|
2957
3017
|
}), legacy_pre_effect_reset(), init();
|
|
2958
|
-
var
|
|
2959
|
-
var s3 =
|
|
3018
|
+
var E2 = comment(), N2 = first_child(E2), consequent = (e3) => {
|
|
3019
|
+
var s3 = Re();
|
|
2960
3020
|
set_attribute(s3, "tabindex", -1), each(s3, 5, () => get$1(a2), index, (e4, s4, a3, l3) => {
|
|
2961
|
-
var c3 =
|
|
3021
|
+
var c3 = He();
|
|
2962
3022
|
let u3;
|
|
2963
3023
|
each(c3, 7, () => $toasts().filter((e5) => !e5.position && 0 === a3 || e5.position === get$1(s4)), (e5) => e5.id, (e5, n3, o3, i3) => {
|
|
2964
3024
|
const a4 = /* @__PURE__ */ derived_safe_equal(() => {
|
|
2965
|
-
var
|
|
2966
|
-
return ((
|
|
3025
|
+
var _a2;
|
|
3026
|
+
return ((_a2 = $2()) == null ? void 0 : _a2.actionButtonStyle) || "";
|
|
2967
3027
|
}), l4 = /* @__PURE__ */ derived_safe_equal(() => {
|
|
2968
|
-
var
|
|
2969
|
-
return ((
|
|
3028
|
+
var _a2;
|
|
3029
|
+
return ((_a2 = $2()) == null ? void 0 : _a2.cancelButtonStyle) || "";
|
|
2970
3030
|
}), c4 = /* @__PURE__ */ derived_safe_equal(() => {
|
|
2971
|
-
var
|
|
2972
|
-
return ((
|
|
3031
|
+
var _a2;
|
|
3032
|
+
return ((_a2 = $2()) == null ? void 0 : _a2.class) || "";
|
|
2973
3033
|
}), u4 = /* @__PURE__ */ derived_safe_equal(() => {
|
|
2974
|
-
var
|
|
2975
|
-
return ((
|
|
2976
|
-
}),
|
|
2977
|
-
var
|
|
2978
|
-
return ((
|
|
3034
|
+
var _a2;
|
|
3035
|
+
return ((_a2 = $2()) == null ? void 0 : _a2.descriptionClass) || "";
|
|
3036
|
+
}), d3 = /* @__PURE__ */ derived_safe_equal(() => $2().classes || {}), p3 = /* @__PURE__ */ derived_safe_equal(() => {
|
|
3037
|
+
var _a2;
|
|
3038
|
+
return ((_a2 = $2()) == null ? void 0 : _a2.duration) ?? m2();
|
|
2979
3039
|
}), _3 = /* @__PURE__ */ derived_safe_equal(() => $2().unstyled || false);
|
|
2980
3040
|
Toast(e5, {
|
|
2981
3041
|
get index() {
|
|
@@ -2985,7 +3045,7 @@ function Toaster(e2, t2) {
|
|
|
2985
3045
|
return get$1(n3);
|
|
2986
3046
|
},
|
|
2987
3047
|
get invert() {
|
|
2988
|
-
return
|
|
3048
|
+
return f2();
|
|
2989
3049
|
},
|
|
2990
3050
|
get visibleToasts() {
|
|
2991
3051
|
return b2();
|
|
@@ -2994,7 +3054,7 @@ function Toaster(e2, t2) {
|
|
|
2994
3054
|
return y2();
|
|
2995
3055
|
},
|
|
2996
3056
|
get interacting() {
|
|
2997
|
-
return get$1(
|
|
3057
|
+
return get$1(I2);
|
|
2998
3058
|
},
|
|
2999
3059
|
get position() {
|
|
3000
3060
|
return get$1(s4);
|
|
@@ -3003,7 +3063,7 @@ function Toaster(e2, t2) {
|
|
|
3003
3063
|
return h2();
|
|
3004
3064
|
},
|
|
3005
3065
|
get expanded() {
|
|
3006
|
-
return get$1(
|
|
3066
|
+
return get$1(M2);
|
|
3007
3067
|
},
|
|
3008
3068
|
get actionButtonStyle() {
|
|
3009
3069
|
return get$1(a4);
|
|
@@ -3018,7 +3078,7 @@ function Toaster(e2, t2) {
|
|
|
3018
3078
|
return get$1(u4);
|
|
3019
3079
|
},
|
|
3020
3080
|
get classes() {
|
|
3021
|
-
return get$1(
|
|
3081
|
+
return get$1(d3);
|
|
3022
3082
|
},
|
|
3023
3083
|
get duration() {
|
|
3024
3084
|
return get$1(p3);
|
|
@@ -3073,7 +3133,7 @@ function Toaster(e2, t2) {
|
|
|
3073
3133
|
}
|
|
3074
3134
|
});
|
|
3075
3135
|
}), bind_this(c3, (e5) => set(P2, e5), () => get$1(P2)), template_effect((e5, t3, s5) => {
|
|
3076
|
-
var
|
|
3136
|
+
var _a2;
|
|
3077
3137
|
u3 = set_attributes(c3, u3, {
|
|
3078
3138
|
tabIndex: -1,
|
|
3079
3139
|
class: n2.class,
|
|
@@ -3084,31 +3144,37 @@ function Toaster(e2, t2) {
|
|
|
3084
3144
|
"data-y-position": t3,
|
|
3085
3145
|
"data-x-position": s5,
|
|
3086
3146
|
style: n2.style,
|
|
3087
|
-
...o2
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3147
|
+
...o2,
|
|
3148
|
+
[de]: {
|
|
3149
|
+
"--front-toast-height": `${(_a2 = store_get(C2, "$heights", i2)[0]) == null ? void 0 : _a2.height}px`,
|
|
3150
|
+
"--offset": "number" == typeof w2() ? `${w2()}px` : w2() || "32px",
|
|
3151
|
+
"--width": "356px",
|
|
3152
|
+
"--gap": "14px"
|
|
3153
|
+
}
|
|
3154
|
+
}, "svelte-1fo5d1m"), c3.dir = c3.dir;
|
|
3155
|
+
}, [() => "auto" === x2() ? getDocumentDirection() : x2(), () => get$1(s4).split("-")[0], () => get$1(s4).split("-")[1]], derived_safe_equal), event("blur", c3, handleBlur), event("focus", c3, handleFocus), event("mouseenter", c3, () => set(M2, true)), event("mousemove", c3, () => set(M2, true)), event("mouseleave", c3, () => {
|
|
3156
|
+
get$1(I2) || set(M2, false);
|
|
3157
|
+
}), event("pointerdown", c3, () => set(I2, true)), event("pointerup", c3, () => set(I2, false)), append(e4, c3);
|
|
3092
3158
|
}), template_effect(() => set_attribute(s3, "aria-label", `${v2()} ${get$1(l2)}`)), append(e3, s3);
|
|
3093
3159
|
};
|
|
3094
3160
|
if_block(N2, (e3) => {
|
|
3095
3161
|
$toasts().length > 0 && e3(consequent);
|
|
3096
|
-
}), append(e2,
|
|
3162
|
+
}), append(e2, E2), pop(), s2();
|
|
3097
3163
|
}
|
|
3098
|
-
const
|
|
3164
|
+
const Ve = writable(false), Ke = writable("https://sdk.playlight.dev");
|
|
3099
3165
|
function handleClick(e2, t2, n2) {
|
|
3100
|
-
var
|
|
3101
|
-
get$1(t2) ? e2.preventDefault() : ((
|
|
3166
|
+
var _a2;
|
|
3167
|
+
get$1(t2) ? e2.preventDefault() : ((_a2 = n2.onClick) == null ? void 0 : _a2.call(n2, n2.game.id), window.open("https://" + n2.game.domain, "_blank", "noopener"));
|
|
3102
3168
|
}
|
|
3103
3169
|
function playGame(e2, t2) {
|
|
3104
|
-
var
|
|
3105
|
-
e2.stopPropagation(), e2.preventDefault(), (
|
|
3170
|
+
var _a2;
|
|
3171
|
+
e2.stopPropagation(), e2.preventDefault(), (_a2 = t2.onClick) == null ? void 0 : _a2.call(t2, t2.game.id), window.open("https://" + t2.game.domain, "_blank", "noopener");
|
|
3106
3172
|
}
|
|
3107
|
-
var
|
|
3173
|
+
var Ue = /* @__PURE__ */ template('<div><p class="text-primary font-bold uppercase">New</p></div>'), Ze = /* @__PURE__ */ template('<video playsinline="" loop preload="auto"></video>', 2), Ye = /* @__PURE__ */ template("<button>Play</button>"), Je = /* @__PURE__ */ template('<div class="bg-background/75 text-foreground absolute right-0 bottom-0 left-0 z-11 flex max-h-1/3 flex-col overflow-hidden backdrop-blur-xl"><div class="hide-scrollbar h-full w-full overflow-y-auto p-3 svelte-rulnq9"><h3 class="mb-2 truncate text-center text-lg font-bold"> </h3> <p class="text-muted-foreground mb-4 text-center text-sm text-balance"> </p></div> <div class="fade-mask bg-background/75 pointer-events-none absolute right-0 bottom-0 left-0 h-8 svelte-rulnq9"></div></div>'), Xe = /* @__PURE__ */ template('<div role="button" tabindex="0"><!> <!> <img alt="cover" loading="eager"> <!> <!> <img alt="game logo" loading="eager"></div>');
|
|
3108
3174
|
function GameCard(e2, t2) {
|
|
3109
3175
|
push(t2, true);
|
|
3110
3176
|
const [n2, o2] = setup_stores();
|
|
3111
|
-
let i2 = state(false), s2 = state(void 0), a2 = state(false), l2 = state(false), c2 = state(false), u2 = state(false),
|
|
3177
|
+
let i2 = state(false), s2 = state(void 0), a2 = state(false), l2 = state(false), c2 = state(false), u2 = state(false), f2 = state(void 0);
|
|
3112
3178
|
function handleMouseEnter() {
|
|
3113
3179
|
get$1(i2) || get$1(u2) || function playSound(e3, t3 = 1) {
|
|
3114
3180
|
try {
|
|
@@ -3117,7 +3183,7 @@ function GameCard(e2, t2) {
|
|
|
3117
3183
|
} catch (e4) {
|
|
3118
3184
|
console.error("Error playing sound:", e4);
|
|
3119
3185
|
}
|
|
3120
|
-
}(store_get(
|
|
3186
|
+
}(store_get(Ke, "$projectUrl", n2) + "/static/sounds/hover-selection.ogg", 0.25), set(i2, true), get$1(s2) && t2.game.cover_video_url && get$1(s2).play().catch((e3) => console.error("Video play error:", e3));
|
|
3121
3187
|
}
|
|
3122
3188
|
function handleMouseLeave() {
|
|
3123
3189
|
get$1(u2) || (set(i2, false), get$1(s2) && get$1(a2) && get$1(s2).pause());
|
|
@@ -3125,32 +3191,32 @@ function GameCard(e2, t2) {
|
|
|
3125
3191
|
user_effect(() => {
|
|
3126
3192
|
set(u2, "ontouchstart" in window);
|
|
3127
3193
|
});
|
|
3128
|
-
var
|
|
3129
|
-
event("touchstart",
|
|
3130
|
-
get$1(
|
|
3131
|
-
}, void 0, true),
|
|
3132
|
-
var p2 = child(
|
|
3133
|
-
var t3 =
|
|
3194
|
+
var d2 = Xe();
|
|
3195
|
+
event("touchstart", I, () => set(u2, true), void 0, true), event("touchstart", T, function handleDocumentTouch(e3) {
|
|
3196
|
+
get$1(f2) && !get$1(f2).contains(e3.target) && set(i2, false);
|
|
3197
|
+
}, void 0, true), d2.__touchstart = handleMouseEnter, d2.__click = [handleClick, u2, t2];
|
|
3198
|
+
var p2 = child(d2), consequent = (e3) => {
|
|
3199
|
+
var t3 = Ue();
|
|
3134
3200
|
let n3;
|
|
3135
|
-
template_effect(() => n3 = set_class(t3, 1, "bg-background absolute top-4 right-4 z-13 px-2 py-0.5 transition-opacity", null, n3, {
|
|
3201
|
+
template_effect((e4) => n3 = set_class(t3, 1, "bg-background absolute top-4 right-4 z-13 px-2 py-0.5 transition-opacity", null, n3, e4), [() => ({
|
|
3136
3202
|
"opacity-0": get$1(i2)
|
|
3137
|
-
})), append(e3, t3);
|
|
3203
|
+
})]), append(e3, t3);
|
|
3138
3204
|
};
|
|
3139
3205
|
if_block(p2, (e3) => {
|
|
3140
|
-
var
|
|
3206
|
+
var _a2;
|
|
3141
3207
|
(function isNewGame(e4) {
|
|
3142
3208
|
const t3 = /* @__PURE__ */ new Date();
|
|
3143
3209
|
return t3.setDate(t3.getDate() - 7), new Date(e4) > t3;
|
|
3144
|
-
})((
|
|
3210
|
+
})((_a2 = t2.game) == null ? void 0 : _a2.created_at) && e3(consequent);
|
|
3145
3211
|
});
|
|
3146
3212
|
var _2 = sibling(p2, 2), consequent_1 = (e3) => {
|
|
3147
|
-
var n3 =
|
|
3213
|
+
var n3 = Ze();
|
|
3148
3214
|
let o3;
|
|
3149
|
-
n3.muted = true, bind_this(n3, (e4) => set(s2, e4), () => get$1(s2)), template_effect(() => {
|
|
3150
|
-
set_attribute(n3, "src", t2.game.cover_video_url), o3 = set_class(n3, 1, "absolute top-0 left-0 z-5 h-full w-full object-cover opacity-0", null, o3,
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
}), event("loadeddata", n3, () => {
|
|
3215
|
+
n3.muted = true, bind_this(n3, (e4) => set(s2, e4), () => get$1(s2)), template_effect((e4) => {
|
|
3216
|
+
set_attribute(n3, "src", t2.game.cover_video_url), o3 = set_class(n3, 1, "absolute top-0 left-0 z-5 h-full w-full object-cover opacity-0", null, o3, e4);
|
|
3217
|
+
}, [() => ({
|
|
3218
|
+
"opacity-100": get$1(i2) && get$1(a2) && t2.game.cover_video_url
|
|
3219
|
+
})]), event("loadeddata", n3, () => {
|
|
3154
3220
|
set(a2, true);
|
|
3155
3221
|
}), append(e3, n3);
|
|
3156
3222
|
};
|
|
@@ -3160,17 +3226,17 @@ function GameCard(e2, t2) {
|
|
|
3160
3226
|
var v2 = sibling(_2, 2);
|
|
3161
3227
|
let g2;
|
|
3162
3228
|
var h2 = sibling(v2, 2), consequent_2 = (e3) => {
|
|
3163
|
-
var n3 =
|
|
3229
|
+
var n3 = Ye();
|
|
3164
3230
|
let o3;
|
|
3165
|
-
n3.__click = [playGame, t2], template_effect(() => o3 = set_class(n3, 1, "bg-foreground text-background hover:bg-foreground/90 absolute right-4 bottom-4 z-15 flex items-center justify-center rounded-sm px-3 py-1 font-bold uppercase transition-all", null, o3, {
|
|
3231
|
+
n3.__click = [playGame, t2], template_effect((e4) => o3 = set_class(n3, 1, "bg-foreground text-background hover:bg-foreground/90 absolute right-4 bottom-4 z-15 flex items-center justify-center rounded-sm px-3 py-1 font-bold uppercase transition-all", null, o3, e4), [() => ({
|
|
3166
3232
|
"opacity-0": get$1(i2)
|
|
3167
|
-
})), append(e3, n3);
|
|
3233
|
+
})]), append(e3, n3);
|
|
3168
3234
|
};
|
|
3169
3235
|
if_block(h2, (e3) => {
|
|
3170
3236
|
get$1(u2) && e3(consequent_2);
|
|
3171
3237
|
});
|
|
3172
3238
|
var m2 = sibling(h2, 2), consequent_3 = (e3) => {
|
|
3173
|
-
var n3 =
|
|
3239
|
+
var n3 = Je(), o3 = child(n3), i3 = child(o3), s3 = child(i3), a3 = child(sibling(i3, 2));
|
|
3174
3240
|
template_effect(() => {
|
|
3175
3241
|
set_text(s3, t2.game.name), set_text(a3, t2.game.description || "No description.");
|
|
3176
3242
|
}), transition(3, n3, () => slide), append(e3, n3);
|
|
@@ -3180,21 +3246,22 @@ function GameCard(e2, t2) {
|
|
|
3180
3246
|
});
|
|
3181
3247
|
var b2 = sibling(m2, 2);
|
|
3182
3248
|
let y2;
|
|
3183
|
-
bind_this(
|
|
3184
|
-
set_class(
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
}), event("mouseenter",
|
|
3249
|
+
bind_this(d2, (e3) => set(f2, e3), () => get$1(f2)), template_effect((e3, n3) => {
|
|
3250
|
+
set_class(d2, 1, `bg-background highlight-border group relative mt-5 mb-[calc(3dvh+1.5vw)] flex aspect-[2/3] h-1/2 max-h-[75vh] min-h-92 cursor-pointer flex-col shadow-xl transition hover:outline-2 hover:brightness-105 lg:h-3/7 ${(get$1(l2) ? "" : "animate-pulse") ?? ""}`, "svelte-rulnq9"), set_attribute(v2, "src", t2.game.cover_image_url), g2 = set_class(v2, 1, "prevent-image-select absolute top-0 left-0 z-10 h-full w-full object-cover opacity-0 transition svelte-rulnq9", null, g2, e3), set_attribute(b2, "src", t2.game.logo_url), y2 = set_class(b2, 1, "absolute right-0 -bottom-[18%] left-0 z-12 mx-auto aspect-square w-1/5 rounded-full object-center opacity-0 transition group-hover:outline-2 prevent-image-select svelte-rulnq9", null, y2, n3);
|
|
3251
|
+
}, [() => ({
|
|
3252
|
+
"opacity-100": get$1(l2) && (!get$1(i2) || !get$1(a2) || !t2.game.cover_video_url)
|
|
3253
|
+
}), () => ({
|
|
3254
|
+
"opacity-100": get$1(c2)
|
|
3255
|
+
})]), event("mouseenter", d2, handleMouseEnter), event("focus", d2, handleMouseEnter), event("mouseleave", d2, handleMouseLeave), event("blur", d2, handleMouseLeave), event("load", v2, () => {
|
|
3190
3256
|
set(l2, true);
|
|
3191
3257
|
}), event("load", b2, () => {
|
|
3192
3258
|
set(c2, true);
|
|
3193
|
-
}), append(e2,
|
|
3259
|
+
}), append(e2, d2), pop(), o2();
|
|
3194
3260
|
}
|
|
3195
3261
|
delegate(["touchstart", "click"]);
|
|
3196
|
-
const
|
|
3262
|
+
const Qe = new (_b = class {
|
|
3197
3263
|
constructor() {
|
|
3264
|
+
__privateAdd(this, _PlayLightAPI_instances);
|
|
3198
3265
|
this.baseUrl = "https://api.playlight.dev/platform", this.cachedCategories = null, this.currentGame = null;
|
|
3199
3266
|
}
|
|
3200
3267
|
async request(e2, t2 = {}) {
|
|
@@ -3218,7 +3285,7 @@ const Ye = new class PlayLightAPI {
|
|
|
3218
3285
|
}
|
|
3219
3286
|
return await o2.json();
|
|
3220
3287
|
} catch (e3) {
|
|
3221
|
-
|
|
3288
|
+
Ne.error("Error: " + e3), console.error("Playlight API error:", e3);
|
|
3222
3289
|
}
|
|
3223
3290
|
}
|
|
3224
3291
|
// Get all categories
|
|
@@ -3228,21 +3295,21 @@ const Ye = new class PlayLightAPI {
|
|
|
3228
3295
|
return this.cachedCategories = e2, e2;
|
|
3229
3296
|
}
|
|
3230
3297
|
// Get game suggestions, optionally filtered by category
|
|
3231
|
-
async getSuggestions(e2 = null, t2 = 1
|
|
3232
|
-
let
|
|
3233
|
-
return e2 && (
|
|
3298
|
+
async getSuggestions(e2 = null, t2 = 1) {
|
|
3299
|
+
let n2 = "/suggestions";
|
|
3300
|
+
return e2 && (n2 += "/" + e2), t2 && (n2 += "?page=" + t2), n2 += "&without=" + __privateMethod(this, _PlayLightAPI_instances, e_fn).call(this), await this.request(n2);
|
|
3234
3301
|
}
|
|
3235
3302
|
// Get game suggestions, optionally filtered by category
|
|
3236
3303
|
async getCurrentGameInfo() {
|
|
3237
3304
|
if (this.currentGame) return this.currentGame;
|
|
3238
|
-
let e2 = "/game-by-domain/" +
|
|
3305
|
+
let e2 = "/game-by-domain/" + __privateMethod(this, _PlayLightAPI_instances, e_fn).call(this);
|
|
3239
3306
|
return this.currentGame = await this.request(e2), {
|
|
3240
3307
|
...this.currentGame
|
|
3241
3308
|
};
|
|
3242
3309
|
}
|
|
3243
3310
|
// Track discovery overlay open
|
|
3244
3311
|
async trackOpen() {
|
|
3245
|
-
const e2 =
|
|
3312
|
+
const e2 = __privateMethod(this, _PlayLightAPI_instances, e_fn).call(this);
|
|
3246
3313
|
await this.request("/event/open", {
|
|
3247
3314
|
method: "POST",
|
|
3248
3315
|
body: JSON.stringify({
|
|
@@ -3252,7 +3319,7 @@ const Ye = new class PlayLightAPI {
|
|
|
3252
3319
|
}
|
|
3253
3320
|
// Track game click (pass id of the game that was clicked on)
|
|
3254
3321
|
async trackClick(e2) {
|
|
3255
|
-
const t2 =
|
|
3322
|
+
const t2 = __privateMethod(this, _PlayLightAPI_instances, e_fn).call(this);
|
|
3256
3323
|
await this.request("/event/click", {
|
|
3257
3324
|
method: "POST",
|
|
3258
3325
|
body: JSON.stringify({
|
|
@@ -3261,7 +3328,10 @@ const Ye = new class PlayLightAPI {
|
|
|
3261
3328
|
})
|
|
3262
3329
|
});
|
|
3263
3330
|
}
|
|
3264
|
-
}()
|
|
3331
|
+
}, _PlayLightAPI_instances = new WeakSet(), e_fn = function() {
|
|
3332
|
+
const e2 = window.location.hostname;
|
|
3333
|
+
return e2.startsWith("www.") ? e2.substring(4) : e2;
|
|
3334
|
+
}, _b)();
|
|
3265
3335
|
function cubicOut(e2) {
|
|
3266
3336
|
const t2 = e2 - 1;
|
|
3267
3337
|
return t2 * t2 * t2 + 1;
|
|
@@ -3270,9 +3340,9 @@ function elasticOut(e2) {
|
|
|
3270
3340
|
return Math.sin(-13 * (e2 + 1) * Math.PI / 2) * Math.pow(2, -10 * e2) + 1;
|
|
3271
3341
|
}
|
|
3272
3342
|
function flip(e2, { from: t2, to: n2 }, o2 = {}) {
|
|
3273
|
-
var { delay: i2 = 0, duration: s2 = (e3) => 120 * Math.sqrt(e3), easing: a2 = cubicOut } = o2, l2 = getComputedStyle(e2), c2 = "none" === l2.transform ? "" : l2.transform, [u2,
|
|
3274
|
-
u2 /= e2.clientWidth,
|
|
3275
|
-
var
|
|
3343
|
+
var { delay: i2 = 0, duration: s2 = (e3) => 120 * Math.sqrt(e3), easing: a2 = cubicOut } = o2, l2 = getComputedStyle(e2), c2 = "none" === l2.transform ? "" : l2.transform, [u2, f2] = l2.transformOrigin.split(" ").map(parseFloat);
|
|
3344
|
+
u2 /= e2.clientWidth, f2 /= e2.clientHeight;
|
|
3345
|
+
var d2 = (
|
|
3276
3346
|
/**
|
|
3277
3347
|
* @param {Element} element
|
|
3278
3348
|
*/
|
|
@@ -3284,7 +3354,7 @@ function flip(e2, { from: t2, to: n2 }, o2 = {}) {
|
|
|
3284
3354
|
t3.parentElement;
|
|
3285
3355
|
return n3;
|
|
3286
3356
|
}(e2)
|
|
3287
|
-
), p2 = e2.clientWidth / n2.width /
|
|
3357
|
+
), p2 = e2.clientWidth / n2.width / d2, _2 = e2.clientHeight / n2.height / d2, v2 = t2.left + t2.width * u2, g2 = t2.top + t2.height * f2, h2 = n2.left + n2.width * u2, m2 = n2.top + n2.height * f2, b2 = (v2 - h2) * p2, y2 = (g2 - m2) * _2, $2 = t2.width / n2.width, w2 = t2.height / n2.height;
|
|
3288
3358
|
return {
|
|
3289
3359
|
delay: i2,
|
|
3290
3360
|
duration: "function" == typeof s2 ? s2(Math.sqrt(b2 * b2 + y2 * y2)) : s2,
|
|
@@ -3294,20 +3364,20 @@ function flip(e2, { from: t2, to: n2 }, o2 = {}) {
|
|
|
3294
3364
|
}
|
|
3295
3365
|
var on_click$1 = (e2, t2, n2) => {
|
|
3296
3366
|
set(t2, ""), set(n2, !get$1(n2));
|
|
3297
|
-
},
|
|
3367
|
+
}, et = /* @__PURE__ */ template('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'), tt = /* @__PURE__ */ template('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'), on_click_1$1 = (e2, t2, n2, o2) => {
|
|
3298
3368
|
t2(n2), set(o2, false);
|
|
3299
|
-
},
|
|
3369
|
+
}, nt = /* @__PURE__ */ template("<button> </button>"), rt = /* @__PURE__ */ template('<div class="space-y-1 p-1"></div>'), ot = /* @__PURE__ */ template('<div class="bg-background/85 fixed left-1/2 z-50 mt-24 w-30 w-full max-w-xs -translate-x-1/2 transform border shadow-lg backdrop-blur"><div class="border-b p-3"><div class="relative"><div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-1"><!></div> <input type="text" placeholder="Search categories..." class="w-full border-0 p-1 pl-10 text-white focus:ring-0 focus:outline-none"></div></div> <div class="max-h-60 overflow-y-auto"><!></div></div>'), it = /* @__PURE__ */ template('<div class="flex w-full flex-col py-2"><h1 class="mb-0! py-2 text-center text-2xl font-bold text-white drop-shadow-xl lg:text-4xl"><span> </span> <button class="group mx-1 inline-flex cursor-pointer items-center bg-white px-3 py-1 text-black transition hover:rotate-5"><span class="truncate max-w-[40vw] text-2xl font-bold text-black lg:text-4xl"> </span> <!></button> <span>games?</span></h1> <!></div>');
|
|
3300
3370
|
function Navigation(e2, t2) {
|
|
3301
3371
|
push(t2, true);
|
|
3302
3372
|
let n2, o2 = prop(t2, "categories", 19, () => []), i2 = prop(t2, "selectedCategory", 15), s2 = state(false), a2 = /* @__PURE__ */ derived(() => i2() || (o2().length > 0 ? o2()[0] : "...")), l2 = state(""), c2 = state(void 0), u2 = /* @__PURE__ */ derived(() => get$1(l2) ? o2().filter((e3) => e3.toLowerCase().includes(get$1(l2).toLowerCase())) : o2());
|
|
3303
|
-
const
|
|
3304
|
-
let
|
|
3373
|
+
const f2 = ["Looking for", "Interested in", "Searching for", "Fancy some", "What about these"];
|
|
3374
|
+
let d2, p2 = state(proxy(f2[0]));
|
|
3305
3375
|
onMount(function updateRandomPhrase() {
|
|
3306
3376
|
let e3;
|
|
3307
|
-
for (e3 = Math.floor(Math.random() * (
|
|
3308
|
-
set(p2, proxy(
|
|
3377
|
+
for (e3 = Math.floor(Math.random() * (f2 == null ? void 0 : f2.length)); e3 == d2; ) e3 = Math.floor(Math.random() * (f2 == null ? void 0 : f2.length));
|
|
3378
|
+
set(p2, proxy(f2[e3])), d2 = e3;
|
|
3309
3379
|
});
|
|
3310
|
-
var _2 =
|
|
3380
|
+
var _2 = it();
|
|
3311
3381
|
event("click", T, function handleClickOutside(e3) {
|
|
3312
3382
|
get$1(c2) && !get$1(c2).contains(e3.target) && n2 && !n2.contains(e3.target) && set(s2, false);
|
|
3313
3383
|
});
|
|
@@ -3339,7 +3409,7 @@ function Navigation(e2, t2) {
|
|
|
3339
3409
|
}
|
|
3340
3410
|
}), bind_this(m2, (e3) => n2 = e3, () => n2);
|
|
3341
3411
|
var x2 = sibling(v2, 2), consequent_2 = (e3) => {
|
|
3342
|
-
var t3 =
|
|
3412
|
+
var t3 = ot(), n3 = child(t3), a3 = child(n3), f3 = child(a3);
|
|
3343
3413
|
!function Search(e4, t4) {
|
|
3344
3414
|
const n4 = legacy_rest_props(t4, ["children", "$$slots", "$$events", "$$legacy"]);
|
|
3345
3415
|
Icon$1(e4, spread_props({
|
|
@@ -3360,24 +3430,24 @@ function Navigation(e2, t2) {
|
|
|
3360
3430
|
default: true
|
|
3361
3431
|
}
|
|
3362
3432
|
}));
|
|
3363
|
-
}(child(
|
|
3433
|
+
}(child(f3), {
|
|
3364
3434
|
size: 18,
|
|
3365
3435
|
class: "text-muted-foreground"
|
|
3366
3436
|
});
|
|
3367
|
-
var
|
|
3368
|
-
append(e4,
|
|
3369
|
-
},
|
|
3370
|
-
var
|
|
3371
|
-
append(e5,
|
|
3372
|
-
},
|
|
3373
|
-
var t5 =
|
|
3437
|
+
var d3 = sibling(f3, 2), p3 = child(sibling(n3, 2)), consequent = (e4) => {
|
|
3438
|
+
append(e4, et());
|
|
3439
|
+
}, alternate = (e4, t4) => {
|
|
3440
|
+
var consequent_1 = (e5) => {
|
|
3441
|
+
append(e5, tt());
|
|
3442
|
+
}, alternate_1 = (e5) => {
|
|
3443
|
+
var t5 = rt();
|
|
3374
3444
|
each(t5, 28, () => get$1(u2), (e6) => e6, (e6, t6) => {
|
|
3375
|
-
var
|
|
3376
|
-
|
|
3377
|
-
var o3 = child(
|
|
3445
|
+
var n4 = nt();
|
|
3446
|
+
n4.__click = [on_click_1$1, i2, t6, s2];
|
|
3447
|
+
var o3 = child(n4);
|
|
3378
3448
|
template_effect(() => {
|
|
3379
|
-
set_class(
|
|
3380
|
-
}), function animation(e7, t7,
|
|
3449
|
+
set_class(n4, 1, `w-full cursor-pointer px-4 py-2 text-left transition-colors ${(i2() != t6 ? "hover:bg-muted-foreground/20" : "") ?? ""} ${(i2() == t6 ? "bg-white text-black" : "text-white") ?? ""}`), set_text(o3, t6);
|
|
3450
|
+
}), function animation(e7, t7, n5) {
|
|
3381
3451
|
var o4, i3, s3, a4 = (
|
|
3382
3452
|
/** @type {EachItem} */
|
|
3383
3453
|
ce
|
|
@@ -3392,7 +3462,7 @@ function Navigation(e2, t2) {
|
|
|
3392
3462
|
const e8 = t7()(this.element, {
|
|
3393
3463
|
from: o4,
|
|
3394
3464
|
to: i3
|
|
3395
|
-
},
|
|
3465
|
+
}, n5 == null ? void 0 : n5());
|
|
3396
3466
|
s3 = animate(this.element, e8, void 0, 1, () => {
|
|
3397
3467
|
s3 == null ? void 0 : s3.abort(), s3 = void 0;
|
|
3398
3468
|
});
|
|
@@ -3400,7 +3470,7 @@ function Navigation(e2, t2) {
|
|
|
3400
3470
|
},
|
|
3401
3471
|
fix() {
|
|
3402
3472
|
if (!e7.getAnimations().length) {
|
|
3403
|
-
var { position: t8, width:
|
|
3473
|
+
var { position: t8, width: n6, height: i4 } = getComputedStyle(e7);
|
|
3404
3474
|
if ("absolute" !== t8 && "fixed" !== t8) {
|
|
3405
3475
|
var s4 = (
|
|
3406
3476
|
/** @type {HTMLElement | SVGElement} */
|
|
@@ -3411,7 +3481,7 @@ function Navigation(e2, t2) {
|
|
|
3411
3481
|
width: s4.width,
|
|
3412
3482
|
height: s4.height,
|
|
3413
3483
|
transform: s4.transform
|
|
3414
|
-
}, s4.position = "absolute", s4.width =
|
|
3484
|
+
}, s4.position = "absolute", s4.width = n6, s4.height = i4;
|
|
3415
3485
|
var a5 = e7.getBoundingClientRect();
|
|
3416
3486
|
if (o4.left !== a5.left || o4.top !== a5.top) {
|
|
3417
3487
|
var c3 = `translate(${o4.left - a5.left}px, ${o4.top - a5.top}px)`;
|
|
@@ -3434,17 +3504,17 @@ function Navigation(e2, t2) {
|
|
|
3434
3504
|
// swap out the element rather than creating a new manager, in case it happened at the same
|
|
3435
3505
|
// moment as a reconciliation
|
|
3436
3506
|
a4.a.element = e7;
|
|
3437
|
-
}(
|
|
3507
|
+
}(n4, () => flip, () => ({
|
|
3438
3508
|
duration: 150
|
|
3439
|
-
})), append(e6,
|
|
3509
|
+
})), append(e6, n4);
|
|
3440
3510
|
}), append(e5, t5);
|
|
3441
3511
|
};
|
|
3442
|
-
if_block(
|
|
3443
|
-
0 === get$1(u2).length ? e5(consequent_1) : e5(
|
|
3444
|
-
},
|
|
3512
|
+
if_block(e4, (e5) => {
|
|
3513
|
+
0 === get$1(u2).length ? e5(consequent_1) : e5(alternate_1, false);
|
|
3514
|
+
}, t4);
|
|
3445
3515
|
};
|
|
3446
3516
|
if_block(p3, (e4) => {
|
|
3447
|
-
0 === o2().length ? e4(consequent) : e4(
|
|
3517
|
+
0 === o2().length ? e4(consequent) : e4(alternate, false);
|
|
3448
3518
|
}), bind_this(t3, (e4) => set(c2, e4), () => get$1(c2)), function bind_value(e4, t4, n4 = t4) {
|
|
3449
3519
|
var o3 = is_runes();
|
|
3450
3520
|
listen_to_event_and_reset_event(e4, "input", (i3) => {
|
|
@@ -3463,7 +3533,7 @@ function Navigation(e2, t2) {
|
|
|
3463
3533
|
is_numberlike_input(e4) && n5 === to_number(e4.value) || ("date" !== e4.type || n5 || e4.value) && n5 !== e4.value && // @ts-expect-error the value is coerced on assignment
|
|
3464
3534
|
(e4.value = n5 ?? "");
|
|
3465
3535
|
});
|
|
3466
|
-
}(
|
|
3536
|
+
}(d3, () => get$1(l2), (e4) => set(l2, e4)), transition(3, t3, () => fly, () => ({
|
|
3467
3537
|
y: -5,
|
|
3468
3538
|
duration: 250
|
|
3469
3539
|
})), append(e3, t3);
|
|
@@ -3482,21 +3552,21 @@ function Navigation(e2, t2) {
|
|
|
3482
3552
|
delegate(["click"]);
|
|
3483
3553
|
var on_click = (e2, t2) => {
|
|
3484
3554
|
localStorage.getItem("playlight_exit_intent_disabled_by_user") ? localStorage.removeItem("playlight_exit_intent_disabled_by_user") : localStorage.setItem("playlight_exit_intent_disabled_by_user", true), set(t2, !get$1(t2));
|
|
3485
|
-
},
|
|
3555
|
+
}, st = /* @__PURE__ */ template('<button class="cursor-pointer truncate text-sm text-nowrap opacity-50 transition hover:opacity-25 max-md:hidden"><p class="bg-background/50 text-primary p-1 px-2 text-sm"> </p></button>'), on_click_1 = (e2, t2) => store_set(Ve, false), at = /* @__PURE__ */ template('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'), lt = /* @__PURE__ */ template('<div class="text-muted-foreground flex h-4/5 items-center justify-center gap-4"><p>No games found that match the filter.</p></div>'), ct = /* @__PURE__ */ template('<div class="mx-auto flex h-full flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="flex h-10 w-full justify-center"><!></div></div>'), ut = /* @__PURE__ */ template('<div class="bg-background/75 fixed inset-0 top-0 right-0 bottom-0 left-0 z-99999 flex flex-col justify-center text-white backdrop-blur-md"><div class="ml-2 flex items-center justify-between p-4"><a href="https://playlight.dev" target="_blank"><img alt="logo" class="w-50"></a> <div class="mt-4 mr-2 flex items-center justify-evenly gap-8 overflow-hidden md:mr-4"><!> <button class="cursor-pointer text-white transition hover:opacity-50" aria-label="Close"><!></button></div></div> <div class="mx-auto p-2 px-5"><!></div> <div class="mask-fade no-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-12skmk8"><!></div> <div class="fixed right-0 bottom-0 flex items-center justify-between p-4"><a href="https://playlight.dev" target="_blank" class="text-muted-foreground flex items-center gap-1 text-sm transition hover:text-white">Game Developer? Join Playlight <!></a></div></div>');
|
|
3486
3556
|
function DiscoveryOverlay(e2, t2) {
|
|
3487
3557
|
push(t2, true);
|
|
3488
3558
|
const [n2, o2] = setup_stores();
|
|
3489
|
-
let i2, s2 = prop(t2, "showIntentToggle", 3, true), a2 = state(void 0), l2 = state(true), c2 = state(false), u2 = state(void 0),
|
|
3559
|
+
let i2, s2 = prop(t2, "showIntentToggle", 3, true), a2 = state(void 0), l2 = state(true), c2 = state(false), u2 = state(void 0), f2 = state(proxy([])), d2 = state(proxy([])), p2 = state(true), _2 = state(1), v2 = state(true), g2 = state(void 0), h2 = state(false);
|
|
3490
3560
|
async function fetchGames() {
|
|
3491
3561
|
if (!(get$1(l2) && get$1(_2) > 1 || get$1(c2))) try {
|
|
3492
3562
|
1 === get$1(_2) ? set(l2, true) : set(c2, true);
|
|
3493
|
-
const e3 = get$1(h2) ? null : get$1(a2), t3 = await
|
|
3494
|
-
set(
|
|
3563
|
+
const e3 = get$1(h2) ? null : get$1(a2), t3 = await Qe.getSuggestions(e3, get$1(_2)), n3 = (t3 == null ? void 0 : t3.games) || [], o3 = n3.filter((e4) => !get$1(f2).some((t4) => t4.id === e4.id));
|
|
3564
|
+
set(f2, proxy([...get$1(f2), ...o3])), n3.length < 10 ? !get$1(h2) && get$1(a2) ? (
|
|
3495
3565
|
// Try with all games
|
|
3496
3566
|
(set(h2, true), set(_2, 1), setTimeout(() => fetchGames(), 100))
|
|
3497
3567
|
) : set(v2, false) : set(_2, get$1(_2) + 1);
|
|
3498
3568
|
} catch (e3) {
|
|
3499
|
-
console.error(e3),
|
|
3569
|
+
console.error(e3), Ne.error("Failed to load games: " + e3);
|
|
3500
3570
|
} finally {
|
|
3501
3571
|
set(l2, false), set(c2, false), // For Chrome: manually check if element is still in view and should trigger another load
|
|
3502
3572
|
get$1(v2) && get$1(g2) && setTimeout(() => {
|
|
@@ -3513,25 +3583,25 @@ function DiscoveryOverlay(e2, t2) {
|
|
|
3513
3583
|
}, {
|
|
3514
3584
|
rootMargin: "200px"
|
|
3515
3585
|
}), () => i2 == null ? void 0 : i2.disconnect())), onMount(async () => {
|
|
3516
|
-
const e3 = await
|
|
3586
|
+
const e3 = await Qe.getCurrentGameInfo();
|
|
3517
3587
|
set(u2, proxy(e3 == null ? void 0 : e3.category)), await async function fetchCategories() {
|
|
3518
|
-
var
|
|
3519
|
-
set(
|
|
3588
|
+
var _a2, _b2, _c, _d;
|
|
3589
|
+
set(d2, proxy(await Qe.getCategories())), !get$1(a2) && ((_a2 = get$1(d2)) == null ? void 0 : _a2.length) > 0 && set(a2, proxy(get$1(u2) && ((_b2 = get$1(d2)) == null ? void 0 : _b2.includes(get$1(u2))) ? get$1(u2) : (_d = get$1(d2)) == null ? void 0 : _d[((_c = get$1(d2)) == null ? void 0 : _c.length) - 1]));
|
|
3520
3590
|
}();
|
|
3521
3591
|
}), user_effect(() => {
|
|
3522
|
-
get$1(a2) && (set(
|
|
3592
|
+
get$1(a2) && (set(f2, proxy([])), set(_2, 1), set(v2, true), set(h2, false), set(l2, true), // Delay fetch to prevent rapid requests
|
|
3523
3593
|
setTimeout(async () => {
|
|
3524
|
-
await fetchGames(), get$1(
|
|
3594
|
+
await fetchGames(), get$1(f2).length < 10 && await fetchGames();
|
|
3525
3595
|
}, 100));
|
|
3526
3596
|
}), user_effect(() => {
|
|
3527
3597
|
get$1(g2) && i2 && i2.observe(get$1(g2));
|
|
3528
3598
|
});
|
|
3529
|
-
var m2 =
|
|
3599
|
+
var m2 = ut();
|
|
3530
3600
|
event("keydown", T, (e3) => {
|
|
3531
|
-
"Escape" == e3.key && store_set(
|
|
3601
|
+
"Escape" == e3.key && store_set(Ve, false);
|
|
3532
3602
|
});
|
|
3533
3603
|
var b2 = child(m2), y2 = child(b2), $2 = child(y2), w2 = child(sibling(y2, 2)), consequent = (e3) => {
|
|
3534
|
-
var t3 =
|
|
3604
|
+
var t3 = st();
|
|
3535
3605
|
t3.__click = [on_click, p2];
|
|
3536
3606
|
var n3 = child(t3), o3 = child(n3);
|
|
3537
3607
|
template_effect(() => set_text(o3, get$1(p2) ? "Ignore exit intent" : "Trigger on exit intent")), append(e3, t3);
|
|
@@ -3540,7 +3610,7 @@ function DiscoveryOverlay(e2, t2) {
|
|
|
3540
3610
|
s2() && e3(consequent);
|
|
3541
3611
|
});
|
|
3542
3612
|
var x2 = sibling(w2, 2);
|
|
3543
|
-
x2.__click = [on_click_1, () => store_get(
|
|
3613
|
+
x2.__click = [on_click_1, () => store_get(Ve, "$discoveryOpen", n2)], function X(e3, t3) {
|
|
3544
3614
|
const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
|
|
3545
3615
|
Icon$1(e3, spread_props({
|
|
3546
3616
|
name: "x"
|
|
@@ -3564,7 +3634,7 @@ function DiscoveryOverlay(e2, t2) {
|
|
|
3564
3634
|
var k2 = sibling(b2, 2);
|
|
3565
3635
|
Navigation(child(k2), {
|
|
3566
3636
|
get categories() {
|
|
3567
|
-
return get$1(
|
|
3637
|
+
return get$1(d2);
|
|
3568
3638
|
},
|
|
3569
3639
|
get selectedCategory() {
|
|
3570
3640
|
return get$1(a2);
|
|
@@ -3573,27 +3643,27 @@ function DiscoveryOverlay(e2, t2) {
|
|
|
3573
3643
|
set(a2, proxy(e3));
|
|
3574
3644
|
}
|
|
3575
3645
|
});
|
|
3576
|
-
var C2 = sibling(k2, 2),
|
|
3577
|
-
var t3 =
|
|
3646
|
+
var C2 = sibling(k2, 2), S2 = child(C2), consequent_1 = (e3) => {
|
|
3647
|
+
var t3 = at();
|
|
3578
3648
|
Loader_circle(child(t3), {
|
|
3579
3649
|
class: "animate-spin opacity-75",
|
|
3580
3650
|
size: 50,
|
|
3581
3651
|
strokeWidth: 2.5
|
|
3582
3652
|
}), append(e3, t3);
|
|
3583
|
-
},
|
|
3584
|
-
var
|
|
3585
|
-
append(e4,
|
|
3586
|
-
},
|
|
3587
|
-
var t4 =
|
|
3588
|
-
each(
|
|
3653
|
+
}, alternate = (e3, t3) => {
|
|
3654
|
+
var consequent_2 = (e4) => {
|
|
3655
|
+
append(e4, lt());
|
|
3656
|
+
}, alternate_1 = (e4) => {
|
|
3657
|
+
var t4 = ct(), n3 = child(t4);
|
|
3658
|
+
each(n3, 17, () => get$1(f2), index, (e5, t5) => {
|
|
3589
3659
|
GameCard(e5, {
|
|
3590
3660
|
get game() {
|
|
3591
3661
|
return get$1(t5);
|
|
3592
3662
|
},
|
|
3593
|
-
onClick: () =>
|
|
3663
|
+
onClick: () => Qe.trackClick(get$1(t5).id)
|
|
3594
3664
|
});
|
|
3595
3665
|
});
|
|
3596
|
-
var o3 = sibling(
|
|
3666
|
+
var o3 = sibling(n3, 2), i3 = child(o3), consequent_3 = (e5) => {
|
|
3597
3667
|
Loader_circle(e5, {
|
|
3598
3668
|
class: "animate-spin opacity-75",
|
|
3599
3669
|
size: 30,
|
|
@@ -3604,14 +3674,14 @@ function DiscoveryOverlay(e2, t2) {
|
|
|
3604
3674
|
get$1(c2) && e5(consequent_3);
|
|
3605
3675
|
}), bind_this(o3, (e5) => set(g2, e5), () => get$1(g2)), append(e4, t4);
|
|
3606
3676
|
};
|
|
3607
|
-
if_block(
|
|
3608
|
-
0 !== get$1(
|
|
3609
|
-
},
|
|
3677
|
+
if_block(e3, (e4) => {
|
|
3678
|
+
0 !== get$1(f2).length || get$1(l2) ? e4(alternate_1, false) : e4(consequent_2);
|
|
3679
|
+
}, t3);
|
|
3610
3680
|
};
|
|
3611
|
-
if_block(
|
|
3612
|
-
get$1(l2) && 0 === get$1(
|
|
3681
|
+
if_block(S2, (e3) => {
|
|
3682
|
+
get$1(l2) && 0 === get$1(f2).length ? e3(consequent_1) : e3(alternate, false);
|
|
3613
3683
|
});
|
|
3614
|
-
var
|
|
3684
|
+
var M2 = child(sibling(C2, 2));
|
|
3615
3685
|
!function External_link(e3, t3) {
|
|
3616
3686
|
const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
|
|
3617
3687
|
Icon$1(e3, spread_props({
|
|
@@ -3632,26 +3702,26 @@ function DiscoveryOverlay(e2, t2) {
|
|
|
3632
3702
|
default: true
|
|
3633
3703
|
}
|
|
3634
3704
|
}));
|
|
3635
|
-
}(sibling(child(
|
|
3705
|
+
}(sibling(child(M2)), {
|
|
3636
3706
|
size: 14,
|
|
3637
3707
|
style: "margin-top: 1px;"
|
|
3638
|
-
}), template_effect(() => set_attribute($2, "src", store_get(
|
|
3708
|
+
}), template_effect(() => set_attribute($2, "src", store_get(Ke, "$projectUrl", n2) + "/static/images/logo-white-small.png")), transition(3, m2, () => blur, () => ({
|
|
3639
3709
|
duration: 250
|
|
3640
3710
|
})), append(e2, m2), pop(), o2();
|
|
3641
3711
|
}
|
|
3642
3712
|
delegate(["click"]);
|
|
3643
|
-
var
|
|
3713
|
+
var ft = /* @__PURE__ */ template('<div class="fixed top-0 left-0 right-0 h-2 z-99990"></div>');
|
|
3644
3714
|
delegate(["mouseover"]);
|
|
3645
|
-
var
|
|
3715
|
+
var dt = /* @__PURE__ */ template("<!> <!> <!> <!>", 1);
|
|
3646
3716
|
function App(e2, t2) {
|
|
3647
|
-
var
|
|
3717
|
+
var _a2, _b2, _c, _d;
|
|
3648
3718
|
push(t2, true);
|
|
3649
|
-
const [n2, o2] = setup_stores(), $discoveryOpen = () => store_get(
|
|
3650
|
-
let i2 = proxy((
|
|
3719
|
+
const [n2, o2] = setup_stores(), $discoveryOpen = () => store_get(Ve, "$discoveryOpen", n2);
|
|
3720
|
+
let i2 = proxy((_b2 = (_a2 = t2.config) == null ? void 0 : _a2.button) == null ? void 0 : _b2.position), s2 = proxy((_d = (_c = t2.config) == null ? void 0 : _c.button) == null ? void 0 : _d.visible);
|
|
3651
3721
|
function openDiscovery() {
|
|
3652
|
-
store_set(
|
|
3722
|
+
store_set(Ve, true), Qe.trackOpen();
|
|
3653
3723
|
}
|
|
3654
|
-
var a2 =
|
|
3724
|
+
var a2 = dt(), l2 = first_child(a2);
|
|
3655
3725
|
FloatingButton(l2, {
|
|
3656
3726
|
get position() {
|
|
3657
3727
|
return i2;
|
|
@@ -3663,8 +3733,8 @@ function App(e2, t2) {
|
|
|
3663
3733
|
});
|
|
3664
3734
|
var c2 = sibling(l2, 2), consequent = (e3) => {
|
|
3665
3735
|
const n3 = /* @__PURE__ */ derived(() => {
|
|
3666
|
-
var
|
|
3667
|
-
return (
|
|
3736
|
+
var _a3, _b3;
|
|
3737
|
+
return (_b3 = (_a3 = t2.config) == null ? void 0 : _a3.exitIntent) == null ? void 0 : _b3.enabled;
|
|
3668
3738
|
});
|
|
3669
3739
|
DiscoveryOverlay(e3, {
|
|
3670
3740
|
get showIntentToggle() {
|
|
@@ -3676,9 +3746,9 @@ function App(e2, t2) {
|
|
|
3676
3746
|
$discoveryOpen() && e3(consequent);
|
|
3677
3747
|
});
|
|
3678
3748
|
var u2 = sibling(c2, 2);
|
|
3679
|
-
const
|
|
3680
|
-
var
|
|
3681
|
-
return (
|
|
3749
|
+
const f2 = /* @__PURE__ */ derived(() => {
|
|
3750
|
+
var _a3, _b3;
|
|
3751
|
+
return (_b3 = (_a3 = t2.config) == null ? void 0 : _a3.exitIntent) == null ? void 0 : _b3.enabled;
|
|
3682
3752
|
});
|
|
3683
3753
|
!function ExitIntentDetector(e3, t3) {
|
|
3684
3754
|
push(t3, true);
|
|
@@ -3686,7 +3756,7 @@ function App(e2, t2) {
|
|
|
3686
3756
|
onMount(() => {
|
|
3687
3757
|
"undefined" != typeof window && (n3 = window.innerHeight);
|
|
3688
3758
|
});
|
|
3689
|
-
var s3 =
|
|
3759
|
+
var s3 = ft();
|
|
3690
3760
|
event("mouseleave", T, () => {
|
|
3691
3761
|
i3 = false;
|
|
3692
3762
|
}), event("mousemove", T, (e4) => {
|
|
@@ -3694,21 +3764,21 @@ function App(e2, t2) {
|
|
|
3694
3764
|
if (!i3) return i3 = true, void (n3 = t4);
|
|
3695
3765
|
n3 = t4;
|
|
3696
3766
|
}), s3.__mouseover = (e4) => {
|
|
3697
|
-
var
|
|
3767
|
+
var _a3;
|
|
3698
3768
|
const s4 = e4.clientY;
|
|
3699
|
-
s4 < n3 && i3 && o3() && !localStorage.getItem("playlight_exit_intent_disabled_by_user") && ((
|
|
3769
|
+
s4 < n3 && i3 && o3() && !localStorage.getItem("playlight_exit_intent_disabled_by_user") && ((_a3 = t3.onIntent) == null ? void 0 : _a3.call(t3)), // Update lastMouseY after checking
|
|
3700
3770
|
n3 = s4;
|
|
3701
3771
|
}, append(e3, s3), pop();
|
|
3702
3772
|
}(u2, {
|
|
3703
3773
|
get enabled() {
|
|
3704
|
-
return get$1(
|
|
3774
|
+
return get$1(f2);
|
|
3705
3775
|
},
|
|
3706
3776
|
onIntent: () => {
|
|
3707
3777
|
$discoveryOpen() || openDiscovery();
|
|
3708
3778
|
}
|
|
3709
3779
|
}), Toaster(sibling(u2, 2), {}), append(e2, a2), pop(), o2();
|
|
3710
3780
|
}
|
|
3711
|
-
const
|
|
3781
|
+
const pt = {
|
|
3712
3782
|
button: {
|
|
3713
3783
|
position: "bottom-right",
|
|
3714
3784
|
visible: true
|
|
@@ -3717,11 +3787,11 @@ const ut = {
|
|
|
3717
3787
|
enabled: true
|
|
3718
3788
|
}
|
|
3719
3789
|
};
|
|
3720
|
-
let
|
|
3721
|
-
...
|
|
3790
|
+
let _t = {
|
|
3791
|
+
...pt
|
|
3722
3792
|
};
|
|
3723
3793
|
function initializeConfig(e2 = {}) {
|
|
3724
|
-
return
|
|
3794
|
+
return _t = deepMerge(pt, e2), _t;
|
|
3725
3795
|
}
|
|
3726
3796
|
function deepMerge(e2, t2) {
|
|
3727
3797
|
const n2 = {
|
|
@@ -3738,9 +3808,9 @@ function deepMerge(e2, t2) {
|
|
|
3738
3808
|
function isObject(e2) {
|
|
3739
3809
|
return e2 && "object" == typeof e2 && !Array.isArray(e2);
|
|
3740
3810
|
}
|
|
3741
|
-
const
|
|
3811
|
+
const vt = new class PlaylightSDK {
|
|
3742
3812
|
constructor() {
|
|
3743
|
-
this.container = null, this.app = null, this.isInitialized = false, this.config = null, this.api =
|
|
3813
|
+
this.container = null, this.app = null, this.isInitialized = false, this.config = null, this.api = Qe;
|
|
3744
3814
|
}
|
|
3745
3815
|
async init(e2 = {}) {
|
|
3746
3816
|
if (!this.isInitialized) return "undefined" == typeof window ? console.error("Playlight cannot run on the server, as it depends browser APIs.") : (
|
|
@@ -3758,11 +3828,11 @@ const ft = new class PlaylightSDK {
|
|
|
3758
3828
|
}
|
|
3759
3829
|
// Public methods
|
|
3760
3830
|
setDiscovery(e2) {
|
|
3761
|
-
this.isInitialized && (
|
|
3831
|
+
this.isInitialized && (Ve.set(e2), get(Ve) && Qe.trackOpen());
|
|
3762
3832
|
}
|
|
3763
3833
|
}();
|
|
3764
|
-
"undefined" != typeof window && (window.playlightSDK =
|
|
3834
|
+
"undefined" != typeof window && (window.playlightSDK = vt);
|
|
3765
3835
|
export {
|
|
3766
|
-
|
|
3836
|
+
vt as default
|
|
3767
3837
|
};
|
|
3768
3838
|
//# sourceMappingURL=playlight-sdk.es.js.map
|