playlight-sdk 0.0.1 → 0.0.3
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,5 +1,5 @@
|
|
|
1
1
|
const e = false;
|
|
2
|
-
var t = Array.isArray, n = Array.prototype.indexOf,
|
|
2
|
+
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
3
|
function is_function(e2) {
|
|
4
4
|
return "function" == typeof e2;
|
|
5
5
|
}
|
|
@@ -26,20 +26,20 @@ const M = Symbol(), S = "http://www.w3.org/2000/svg";
|
|
|
26
26
|
function lifecycle_outside_component(e2) {
|
|
27
27
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
28
28
|
}
|
|
29
|
-
let
|
|
29
|
+
let I = null;
|
|
30
30
|
function set_component_context(e2) {
|
|
31
|
-
|
|
31
|
+
I = e2;
|
|
32
32
|
}
|
|
33
33
|
function push(e2, t2 = false, n2) {
|
|
34
|
-
|
|
35
|
-
p:
|
|
34
|
+
I = {
|
|
35
|
+
p: I,
|
|
36
36
|
c: null,
|
|
37
37
|
e: null,
|
|
38
38
|
m: false,
|
|
39
39
|
s: e2,
|
|
40
40
|
x: null,
|
|
41
41
|
l: null
|
|
42
|
-
}, C && !t2 && (
|
|
42
|
+
}, C && !t2 && (I.l = {
|
|
43
43
|
s: null,
|
|
44
44
|
u: null,
|
|
45
45
|
r1: [],
|
|
@@ -47,27 +47,27 @@ function push(e2, t2 = false, n2) {
|
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
function pop(e2) {
|
|
50
|
-
const t2 =
|
|
50
|
+
const t2 = I;
|
|
51
51
|
if (null !== t2) {
|
|
52
52
|
const e3 = t2.e;
|
|
53
53
|
if (null !== e3) {
|
|
54
|
-
var n2 = H,
|
|
54
|
+
var n2 = H, o2 = F;
|
|
55
55
|
t2.e = null;
|
|
56
56
|
try {
|
|
57
|
-
for (var
|
|
58
|
-
var s2 = e3[
|
|
57
|
+
for (var i2 = 0; i2 < e3.length; i2++) {
|
|
58
|
+
var s2 = e3[i2];
|
|
59
59
|
set_active_effect(s2.effect), set_active_reaction(s2.reaction), effect(s2.fn);
|
|
60
60
|
}
|
|
61
61
|
} finally {
|
|
62
|
-
set_active_effect(n2), set_active_reaction(
|
|
62
|
+
set_active_effect(n2), set_active_reaction(o2);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
I = t2.p, t2.m = true;
|
|
66
66
|
}
|
|
67
67
|
return {};
|
|
68
68
|
}
|
|
69
69
|
function is_runes() {
|
|
70
|
-
return !C || null !==
|
|
70
|
+
return !C || null !== I && null === I.l;
|
|
71
71
|
}
|
|
72
72
|
function source(e2, t2) {
|
|
73
73
|
return {
|
|
@@ -89,7 +89,7 @@ function mutable_source(e2, t2 = false) {
|
|
|
89
89
|
const n2 = source(e2);
|
|
90
90
|
return t2 || (n2.equals = safe_equals), // bind the signal to the component context, in case we need to
|
|
91
91
|
// track updates to trigger beforeUpdate/afterUpdate callbacks
|
|
92
|
-
C && null !==
|
|
92
|
+
C && null !== I && null !== I.l && ((_a = I.l).s ?? (_a.s = [])).push(n2), n2;
|
|
93
93
|
}
|
|
94
94
|
function mutable_state(e2, t2 = false) {
|
|
95
95
|
return /* @__PURE__ */ push_derived_source(/* @__PURE__ */ mutable_source(e2, t2));
|
|
@@ -129,15 +129,15 @@ function internal_set(e2, t2) {
|
|
|
129
129
|
) : U.push(e2))), t2;
|
|
130
130
|
}
|
|
131
131
|
function update(e2, t2 = 1) {
|
|
132
|
-
var n2 = get$1(e2),
|
|
133
|
-
return set(e2, n2),
|
|
132
|
+
var n2 = get$1(e2), o2 = 1 === t2 ? n2++ : n2--;
|
|
133
|
+
return set(e2, n2), o2;
|
|
134
134
|
}
|
|
135
135
|
function mark_reactions(e2, t2) {
|
|
136
136
|
var n2 = e2.reactions;
|
|
137
|
-
if (null !== n2) for (var
|
|
137
|
+
if (null !== n2) for (var o2 = is_runes(), i2 = n2.length, s2 = 0; s2 < i2; s2++) {
|
|
138
138
|
var a2 = n2[s2], l2 = a2.f;
|
|
139
139
|
l2 & g || // In legacy mode, skip the current effect to prevent infinite loops
|
|
140
|
-
(
|
|
140
|
+
(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
141
|
1280 & l2 && (2 & l2 ? mark_reactions(
|
|
142
142
|
/** @type {Derived} */
|
|
143
143
|
a2,
|
|
@@ -148,10 +148,10 @@ function mark_reactions(e2, t2) {
|
|
|
148
148
|
)));
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
function proxy(e2, n2 = null,
|
|
151
|
+
function proxy(e2, n2 = null, o2) {
|
|
152
152
|
if ("object" != typeof e2 || null === e2 || w in e2) return e2;
|
|
153
|
-
const
|
|
154
|
-
if (
|
|
153
|
+
const i2 = u(e2);
|
|
154
|
+
if (i2 !== l && i2 !== c) return e2;
|
|
155
155
|
var a2, d2 = /* @__PURE__ */ new Map(), f2 = t(e2), p2 = source(0);
|
|
156
156
|
return f2 && // We need to create the length source eagerly to ensure that
|
|
157
157
|
// mutations to the array are properly synced with our proxy
|
|
@@ -174,45 +174,45 @@ function proxy(e2, n2 = null, i2) {
|
|
|
174
174
|
function state_descriptors_fixed() {
|
|
175
175
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
176
176
|
}();
|
|
177
|
-
var
|
|
178
|
-
return void 0 ===
|
|
177
|
+
var o3 = d2.get(t2);
|
|
178
|
+
return void 0 === o3 ? (o3 = source(n3.value), d2.set(t2, o3)) : set(o3, proxy(n3.value, a2)), true;
|
|
179
179
|
},
|
|
180
180
|
deleteProperty(e3, t2) {
|
|
181
181
|
var n3 = d2.get(t2);
|
|
182
182
|
if (void 0 === n3) t2 in e3 && d2.set(t2, source(M));
|
|
183
183
|
else {
|
|
184
184
|
if (f2 && "string" == typeof t2) {
|
|
185
|
-
var
|
|
185
|
+
var o3 = (
|
|
186
186
|
/** @type {Source<number>} */
|
|
187
187
|
d2.get("length")
|
|
188
|
-
),
|
|
189
|
-
Number.isInteger(
|
|
188
|
+
), i3 = Number(t2);
|
|
189
|
+
Number.isInteger(i3) && i3 < o3.v && set(o3, i3);
|
|
190
190
|
}
|
|
191
191
|
set(n3, M), update_version(p2);
|
|
192
192
|
}
|
|
193
193
|
return true;
|
|
194
194
|
},
|
|
195
|
-
get(t2, n3,
|
|
195
|
+
get(t2, n3, o3) {
|
|
196
196
|
var _a;
|
|
197
197
|
if (n3 === w) return e2;
|
|
198
|
-
var
|
|
198
|
+
var i3 = d2.get(n3), l2 = n3 in t2;
|
|
199
199
|
if (
|
|
200
200
|
// create a source, but only if it's an own property and not a prototype property
|
|
201
|
-
void 0 !==
|
|
201
|
+
void 0 !== i3 || l2 && !((_a = s(t2, n3)) == null ? void 0 : _a.writable) || (i3 = source(proxy(l2 ? t2[n3] : M, a2)), d2.set(n3, i3)), void 0 !== i3
|
|
202
202
|
) {
|
|
203
|
-
var c2 = get$1(
|
|
203
|
+
var c2 = get$1(i3);
|
|
204
204
|
return c2 === M ? void 0 : c2;
|
|
205
205
|
}
|
|
206
|
-
return Reflect.get(t2, n3,
|
|
206
|
+
return Reflect.get(t2, n3, o3);
|
|
207
207
|
},
|
|
208
208
|
getOwnPropertyDescriptor(e3, t2) {
|
|
209
209
|
var n3 = Reflect.getOwnPropertyDescriptor(e3, t2);
|
|
210
210
|
if (n3 && "value" in n3) {
|
|
211
|
-
var
|
|
212
|
-
|
|
211
|
+
var o3 = d2.get(t2);
|
|
212
|
+
o3 && (n3.value = get$1(o3));
|
|
213
213
|
} else if (void 0 === n3) {
|
|
214
|
-
var
|
|
215
|
-
if (void 0 !==
|
|
214
|
+
var i3 = d2.get(t2), s2 = i3 == null ? void 0 : i3.v;
|
|
215
|
+
if (void 0 !== i3 && s2 !== M) return {
|
|
216
216
|
enumerable: true,
|
|
217
217
|
configurable: true,
|
|
218
218
|
value: s2,
|
|
@@ -224,24 +224,24 @@ function proxy(e2, n2 = null, i2) {
|
|
|
224
224
|
has(e3, t2) {
|
|
225
225
|
var _a;
|
|
226
226
|
if (t2 === w) return true;
|
|
227
|
-
var n3 = d2.get(t2),
|
|
228
|
-
if ((void 0 !== n3 || null !== H && (!
|
|
229
|
-
return
|
|
227
|
+
var n3 = d2.get(t2), o3 = void 0 !== n3 && n3.v !== M || Reflect.has(e3, t2);
|
|
228
|
+
if ((void 0 !== n3 || null !== H && (!o3 || ((_a = s(e3, t2)) == null ? void 0 : _a.writable))) && (void 0 === n3 && (n3 = source(o3 ? proxy(e3[t2], a2) : M), d2.set(t2, n3)), get$1(n3) === M)) return false;
|
|
229
|
+
return o3;
|
|
230
230
|
},
|
|
231
|
-
set(e3, t2, n3,
|
|
231
|
+
set(e3, t2, n3, o3) {
|
|
232
232
|
var _a;
|
|
233
|
-
var
|
|
233
|
+
var i3 = d2.get(t2), l2 = t2 in e3;
|
|
234
234
|
if (f2 && "length" === t2) for (var c2 = n3; c2 < /** @type {Source<number>} */
|
|
235
|
-
|
|
235
|
+
i3.v; c2 += 1) {
|
|
236
236
|
var u2 = d2.get(c2 + "");
|
|
237
237
|
void 0 !== u2 ? set(u2, M) : c2 in e3 && // If the item exists in the original, we need to create a uninitialized source,
|
|
238
238
|
// else a later read of the property would result in a source being created with
|
|
239
239
|
// the value of the original item at that index.
|
|
240
240
|
(u2 = source(M), d2.set(c2 + "", u2));
|
|
241
241
|
}
|
|
242
|
-
void 0 ===
|
|
242
|
+
void 0 === i3 ? l2 && !((_a = s(e3, t2)) == null ? void 0 : _a.writable) || (set(i3 = source(void 0), proxy(n3, a2)), d2.set(t2, i3)) : (l2 = i3.v !== M, set(i3, proxy(n3, a2)));
|
|
243
243
|
var _2 = Reflect.getOwnPropertyDescriptor(e3, t2);
|
|
244
|
-
if ((_2 == null ? void 0 : _2.set) && _2.set.call(
|
|
244
|
+
if ((_2 == null ? void 0 : _2.set) && _2.set.call(o3, n3), !l2) {
|
|
245
245
|
if (f2 && "string" == typeof t2) {
|
|
246
246
|
var v2 = (
|
|
247
247
|
/** @type {Source<number>} */
|
|
@@ -259,7 +259,7 @@ function proxy(e2, n2 = null, i2) {
|
|
|
259
259
|
var t3 = d2.get(e4);
|
|
260
260
|
return void 0 === t3 || t3.v !== M;
|
|
261
261
|
});
|
|
262
|
-
for (var [n3,
|
|
262
|
+
for (var [n3, o3] of d2) o3.v === M || n3 in e3 || t2.push(n3);
|
|
263
263
|
return t2;
|
|
264
264
|
},
|
|
265
265
|
setPrototypeOf() {
|
|
@@ -273,7 +273,7 @@ function proxy(e2, n2 = null, i2) {
|
|
|
273
273
|
function update_version(e2, t2 = 1) {
|
|
274
274
|
set(e2, e2.v + t2);
|
|
275
275
|
}
|
|
276
|
-
var
|
|
276
|
+
var T, q, P, O, E;
|
|
277
277
|
function create_text(e2 = "") {
|
|
278
278
|
return document.createTextNode(e2);
|
|
279
279
|
}
|
|
@@ -299,10 +299,10 @@ function first_child(e2, t2) {
|
|
|
299
299
|
return n2 instanceof Comment && "" === n2.data ? /* @__PURE__ */ get_next_sibling(n2) : n2;
|
|
300
300
|
}
|
|
301
301
|
function sibling(e2, t2 = 1, n2 = false) {
|
|
302
|
-
let
|
|
303
|
-
for (; t2--; )
|
|
304
|
-
/* @__PURE__ */ get_next_sibling(
|
|
305
|
-
return
|
|
302
|
+
let o2 = e2;
|
|
303
|
+
for (; t2--; ) o2 = /** @type {TemplateNode} */
|
|
304
|
+
/* @__PURE__ */ get_next_sibling(o2);
|
|
305
|
+
return o2;
|
|
306
306
|
}
|
|
307
307
|
// @__NO_SIDE_EFFECTS__
|
|
308
308
|
function derived(e2) {
|
|
@@ -316,7 +316,7 @@ function derived(e2) {
|
|
|
316
316
|
H.f |= $
|
|
317
317
|
);
|
|
318
318
|
return {
|
|
319
|
-
ctx:
|
|
319
|
+
ctx: I,
|
|
320
320
|
deps: null,
|
|
321
321
|
effects: null,
|
|
322
322
|
equals,
|
|
@@ -392,9 +392,9 @@ function validate_effect(e2) {
|
|
|
392
392
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
393
393
|
}();
|
|
394
394
|
}
|
|
395
|
-
function create_effect(e2, t2, n2,
|
|
396
|
-
var
|
|
397
|
-
ctx:
|
|
395
|
+
function create_effect(e2, t2, n2, o2 = true) {
|
|
396
|
+
var i2 = !!(64 & e2), s2 = H, a2 = {
|
|
397
|
+
ctx: I,
|
|
398
398
|
deps: null,
|
|
399
399
|
nodes_start: null,
|
|
400
400
|
nodes_end: null,
|
|
@@ -403,7 +403,7 @@ function create_effect(e2, t2, n2, i2 = true) {
|
|
|
403
403
|
fn: t2,
|
|
404
404
|
last: null,
|
|
405
405
|
next: null,
|
|
406
|
-
parent:
|
|
406
|
+
parent: i2 ? null : s2,
|
|
407
407
|
prev: null,
|
|
408
408
|
teardown: null,
|
|
409
409
|
transitions: null,
|
|
@@ -415,7 +415,7 @@ function create_effect(e2, t2, n2, i2 = true) {
|
|
|
415
415
|
throw destroy_effect(a2), e3;
|
|
416
416
|
}
|
|
417
417
|
else null !== t2 && schedule_effect(a2);
|
|
418
|
-
if (!(n2 && null === a2.deps && null === a2.first && null === a2.nodes_start && null === a2.teardown && !(1048704 & a2.f)) && !
|
|
418
|
+
if (!(n2 && null === a2.deps && null === a2.first && null === a2.nodes_start && null === a2.teardown && !(1048704 & a2.f)) && !i2 && o2 && (null !== s2 && function push_effect(e3, t3) {
|
|
419
419
|
var n3 = t3.last;
|
|
420
420
|
null === n3 ? t3.last = t3.first = e3 : (n3.next = e3, e3.prev = n3, t3.last = e3);
|
|
421
421
|
}(a2, s2), null !== F && 2 & F.f)) {
|
|
@@ -432,10 +432,10 @@ function teardown(e2) {
|
|
|
432
432
|
return set_signal_status(t2, v), t2.teardown = e2, t2;
|
|
433
433
|
}
|
|
434
434
|
function user_effect(e2) {
|
|
435
|
-
if (validate_effect(), !(null !== H && !!(H.f & d) && null !==
|
|
435
|
+
if (validate_effect(), !(null !== H && !!(H.f & d) && null !== I && !I.m)) return effect(e2);
|
|
436
436
|
var t2 = (
|
|
437
437
|
/** @type {ComponentContext} */
|
|
438
|
-
|
|
438
|
+
I
|
|
439
439
|
);
|
|
440
440
|
(t2.e ?? (t2.e = [])).push({
|
|
441
441
|
fn: e2,
|
|
@@ -449,21 +449,21 @@ function effect(e2) {
|
|
|
449
449
|
function legacy_pre_effect(e2, t2) {
|
|
450
450
|
var n2 = (
|
|
451
451
|
/** @type {ComponentContextLegacy} */
|
|
452
|
-
|
|
453
|
-
),
|
|
452
|
+
I
|
|
453
|
+
), o2 = {
|
|
454
454
|
effect: null,
|
|
455
455
|
ran: false
|
|
456
456
|
};
|
|
457
|
-
n2.l.r1.push(
|
|
457
|
+
n2.l.r1.push(o2), o2.effect = render_effect(() => {
|
|
458
458
|
e2(), // If this legacy pre effect has already run before the end of the reset, then
|
|
459
459
|
// bail out to emulate the same behavior.
|
|
460
|
-
|
|
460
|
+
o2.ran || (o2.ran = true, set(n2.l.r2, true), untrack(t2));
|
|
461
461
|
});
|
|
462
462
|
}
|
|
463
463
|
function legacy_pre_effect_reset() {
|
|
464
464
|
var e2 = (
|
|
465
465
|
/** @type {ComponentContextLegacy} */
|
|
466
|
-
|
|
466
|
+
I
|
|
467
467
|
);
|
|
468
468
|
render_effect(() => {
|
|
469
469
|
if (get$1(e2.l.r2)) {
|
|
@@ -479,8 +479,8 @@ function render_effect(e2) {
|
|
|
479
479
|
return create_effect(8, e2, true);
|
|
480
480
|
}
|
|
481
481
|
function template_effect(e2, t2 = [], n2 = derived) {
|
|
482
|
-
const
|
|
483
|
-
return block(() => e2(...
|
|
482
|
+
const o2 = t2.map(n2);
|
|
483
|
+
return block(() => e2(...o2.map(get$1)));
|
|
484
484
|
}
|
|
485
485
|
function block(e2, t2 = 0) {
|
|
486
486
|
return create_effect(24 | t2, e2, true);
|
|
@@ -503,19 +503,19 @@ function execute_effect_teardown(e2) {
|
|
|
503
503
|
function destroy_effect_children(e2, t2 = false) {
|
|
504
504
|
var n2 = e2.first;
|
|
505
505
|
for (e2.first = e2.last = null; null !== n2; ) {
|
|
506
|
-
var
|
|
507
|
-
destroy_effect(n2, t2), n2 =
|
|
506
|
+
var o2 = n2.next;
|
|
507
|
+
destroy_effect(n2, t2), n2 = o2;
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
510
|
function destroy_effect(e2, t2 = true) {
|
|
511
511
|
var n2 = false;
|
|
512
512
|
if ((t2 || 524288 & e2.f) && null !== e2.nodes_start) {
|
|
513
|
-
for (var
|
|
514
|
-
var s2 =
|
|
513
|
+
for (var o2 = e2.nodes_start, i2 = e2.nodes_end; null !== o2; ) {
|
|
514
|
+
var s2 = o2 === i2 ? null : (
|
|
515
515
|
/** @type {TemplateNode} */
|
|
516
|
-
/* @__PURE__ */ get_next_sibling(
|
|
516
|
+
/* @__PURE__ */ get_next_sibling(o2)
|
|
517
517
|
);
|
|
518
|
-
|
|
518
|
+
o2.remove(), o2 = s2;
|
|
519
519
|
}
|
|
520
520
|
n2 = true;
|
|
521
521
|
}
|
|
@@ -529,8 +529,8 @@ function destroy_effect(e2, t2 = true) {
|
|
|
529
529
|
e2.next = e2.prev = e2.teardown = e2.ctx = e2.deps = e2.fn = e2.nodes_start = e2.nodes_end = null;
|
|
530
530
|
}
|
|
531
531
|
function unlink_effect(e2) {
|
|
532
|
-
var t2 = e2.parent, n2 = e2.prev,
|
|
533
|
-
null !== n2 && (n2.next =
|
|
532
|
+
var t2 = e2.parent, n2 = e2.prev, o2 = e2.next;
|
|
533
|
+
null !== n2 && (n2.next = o2), null !== o2 && (o2.prev = n2), null !== t2 && (t2.first === e2 && (t2.first = o2), t2.last === e2 && (t2.last = n2));
|
|
534
534
|
}
|
|
535
535
|
function pause_effect(e2, t2) {
|
|
536
536
|
var n2 = [];
|
|
@@ -542,15 +542,15 @@ function run_out_transitions(e2, t2) {
|
|
|
542
542
|
var n2 = e2.length;
|
|
543
543
|
if (n2 > 0) {
|
|
544
544
|
var check = () => --n2 || t2();
|
|
545
|
-
for (var
|
|
545
|
+
for (var o2 of e2) o2.out(check);
|
|
546
546
|
} else t2();
|
|
547
547
|
}
|
|
548
548
|
function pause_children(e2, t2, n2) {
|
|
549
549
|
if (!(e2.f & m)) {
|
|
550
|
-
if (e2.f ^= m, null !== e2.transitions) for (const
|
|
551
|
-
for (var
|
|
552
|
-
var
|
|
553
|
-
pause_children(
|
|
550
|
+
if (e2.f ^= m, null !== e2.transitions) for (const o3 of e2.transitions) (o3.is_global || n2) && t2.push(o3);
|
|
551
|
+
for (var o2 = e2.first; null !== o2; ) {
|
|
552
|
+
var i2 = o2.next;
|
|
553
|
+
pause_children(o2, t2, !!(!!(o2.f & y) || !!(o2.f & d)) && n2), o2 = i2;
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
556
|
}
|
|
@@ -565,8 +565,8 @@ function resume_children(e2, t2) {
|
|
|
565
565
|
// schedule the effect to update
|
|
566
566
|
check_dirtiness(e2) && (set_signal_status(e2, g), schedule_effect(e2));
|
|
567
567
|
for (var n2 = e2.first; null !== n2; ) {
|
|
568
|
-
var
|
|
569
|
-
resume_children(n2, !!(!!(n2.f & y) || !!(n2.f & d)) && t2), n2 =
|
|
568
|
+
var o2 = n2.next;
|
|
569
|
+
resume_children(n2, !!(!!(n2.f & y) || !!(n2.f & d)) && t2), n2 = o2;
|
|
570
570
|
}
|
|
571
571
|
if (null !== e2.transitions) for (const n3 of e2.transitions) (n3.is_global || t2) && n3.in();
|
|
572
572
|
}
|
|
@@ -608,15 +608,15 @@ function check_dirtiness(e2) {
|
|
|
608
608
|
var t2 = e2.f;
|
|
609
609
|
if (t2 & g) return true;
|
|
610
610
|
if (t2 & h) {
|
|
611
|
-
var n2 = e2.deps,
|
|
611
|
+
var n2 = e2.deps, o2 = !!(t2 & p);
|
|
612
612
|
if (null !== n2) {
|
|
613
|
-
var
|
|
613
|
+
var i2, s2, a2 = !!(t2 & _), l2 = o2 && null !== H && !J, c2 = n2.length;
|
|
614
614
|
if (a2 || l2) {
|
|
615
615
|
var u2 = (
|
|
616
616
|
/** @type {Derived} */
|
|
617
617
|
e2
|
|
618
618
|
), d2 = u2.parent;
|
|
619
|
-
for (
|
|
619
|
+
for (i2 = 0; i2 < c2; i2++) s2 = n2[i2], // We always re-add all reactions (even duplicates) if the derived was
|
|
620
620
|
// previously disconnected, however we don't if it was unowned as we
|
|
621
621
|
// de-duplicate dependencies in that case
|
|
622
622
|
!a2 && ((_a = s2 == null ? void 0 : s2.reactions) == null ? void 0 : _a.includes(u2)) || (s2.reactions ?? (s2.reactions = [])).push(u2);
|
|
@@ -625,16 +625,16 @@ function check_dirtiness(e2) {
|
|
|
625
625
|
// flag
|
|
626
626
|
!l2 || null === d2 || d2.f & p || (u2.f ^= p);
|
|
627
627
|
}
|
|
628
|
-
for (
|
|
628
|
+
for (i2 = 0; i2 < c2; i2++) if (check_dirtiness(s2 = n2[i2]) && update_derived(
|
|
629
629
|
/** @type {Derived} */
|
|
630
630
|
s2
|
|
631
631
|
), s2.wv > e2.wv) return true;
|
|
632
632
|
}
|
|
633
|
-
|
|
633
|
+
o2 && (null === H || J) || set_signal_status(e2, v);
|
|
634
634
|
}
|
|
635
635
|
return false;
|
|
636
636
|
}
|
|
637
|
-
function handle_error(e2, t2, n2,
|
|
637
|
+
function handle_error(e2, t2, n2, o2) {
|
|
638
638
|
if (B) {
|
|
639
639
|
if (null === n2 && (B = false), /**
|
|
640
640
|
* @param {Effect} effect
|
|
@@ -655,9 +655,9 @@ function handle_error(e2, t2, n2, i2) {
|
|
|
655
655
|
}(e2, t2);
|
|
656
656
|
}
|
|
657
657
|
function schedule_possible_effect_self_invalidation(e2, t2, n2 = true) {
|
|
658
|
-
var
|
|
659
|
-
if (null !==
|
|
660
|
-
var s2 = i2
|
|
658
|
+
var o2 = e2.reactions;
|
|
659
|
+
if (null !== o2) for (var i2 = 0; i2 < o2.length; i2++) {
|
|
660
|
+
var s2 = o2[i2];
|
|
661
661
|
2 & s2.f ? schedule_possible_effect_self_invalidation(
|
|
662
662
|
/** @type {Derived} */
|
|
663
663
|
s2,
|
|
@@ -671,7 +671,7 @@ function schedule_possible_effect_self_invalidation(e2, t2, n2 = true) {
|
|
|
671
671
|
}
|
|
672
672
|
function update_reaction(e2) {
|
|
673
673
|
var _a;
|
|
674
|
-
var t2 = V, n2 = K,
|
|
674
|
+
var t2 = V, n2 = K, o2 = U, i2 = F, s2 = J, a2 = R, l2 = I, c2 = G, u2 = e2.f;
|
|
675
675
|
V = /** @type {null | Value[]} */
|
|
676
676
|
null, K = 0, U = null, J = !!(u2 & p) && (G || !A || null === F), F = 96 & u2 ? null : e2, R = null, set_component_context(e2.ctx), G = false, Y++;
|
|
677
677
|
try {
|
|
@@ -692,24 +692,24 @@ function update_reaction(e2) {
|
|
|
692
692
|
/** @type {Effect} */
|
|
693
693
|
e2
|
|
694
694
|
);
|
|
695
|
-
return null !==
|
|
695
|
+
return null !== i2 && Y++, d2;
|
|
696
696
|
} finally {
|
|
697
|
-
V = t2, K = n2, U =
|
|
697
|
+
V = t2, K = n2, U = o2, F = i2, J = s2, R = a2, set_component_context(l2), G = c2;
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
700
|
function remove_reaction(e2, t2) {
|
|
701
|
-
let
|
|
702
|
-
if (null !==
|
|
703
|
-
var
|
|
704
|
-
if (-1 !==
|
|
705
|
-
var s2 =
|
|
706
|
-
0 === s2 ?
|
|
701
|
+
let o2 = t2.reactions;
|
|
702
|
+
if (null !== o2) {
|
|
703
|
+
var i2 = n.call(o2, e2);
|
|
704
|
+
if (-1 !== i2) {
|
|
705
|
+
var s2 = o2.length - 1;
|
|
706
|
+
0 === s2 ? o2 = t2.reactions = null : (
|
|
707
707
|
// Swap with last element and then remove.
|
|
708
|
-
(i2
|
|
708
|
+
(o2[i2] = o2[s2], o2.pop())
|
|
709
709
|
);
|
|
710
710
|
}
|
|
711
711
|
}
|
|
712
|
-
null ===
|
|
712
|
+
null === o2 && 2 & t2.f && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
713
713
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
714
714
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
715
715
|
(null === V || !V.includes(t2)) && (set_signal_status(t2, h), // If we are working with a derived that is owned by an effect, then mark it as being
|
|
@@ -726,13 +726,13 @@ function remove_reaction(e2, t2) {
|
|
|
726
726
|
}
|
|
727
727
|
function remove_reactions(e2, t2) {
|
|
728
728
|
var n2 = e2.deps;
|
|
729
|
-
if (null !== n2) for (var
|
|
729
|
+
if (null !== n2) for (var o2 = t2; o2 < n2.length; o2++) remove_reaction(e2, n2[o2]);
|
|
730
730
|
}
|
|
731
731
|
function update_effect(t2) {
|
|
732
732
|
var n2 = t2.f;
|
|
733
733
|
if (!(n2 & b)) {
|
|
734
734
|
set_signal_status(t2, v);
|
|
735
|
-
var
|
|
735
|
+
var o2 = H, i2 = I, s2 = A;
|
|
736
736
|
H = t2, A = true;
|
|
737
737
|
try {
|
|
738
738
|
16 & n2 ? function destroy_block_effect_children(e2) {
|
|
@@ -746,9 +746,9 @@ function update_effect(t2) {
|
|
|
746
746
|
t2.deps;
|
|
747
747
|
e;
|
|
748
748
|
} catch (e2) {
|
|
749
|
-
handle_error(e2, t2,
|
|
749
|
+
handle_error(e2, t2, o2, i2 || t2.ctx);
|
|
750
750
|
} finally {
|
|
751
|
-
A = s2, H =
|
|
751
|
+
A = s2, H = o2;
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
754
|
}
|
|
@@ -768,9 +768,9 @@ function flush_queued_root_effects() {
|
|
|
768
768
|
e2++ > 1e3 && infinite_loop_guard();
|
|
769
769
|
var t2 = W, n2 = t2.length;
|
|
770
770
|
W = [];
|
|
771
|
-
for (var
|
|
772
|
-
var
|
|
773
|
-
|
|
771
|
+
for (var o2 = 0; o2 < n2; o2++) {
|
|
772
|
+
var i2 = t2[o2];
|
|
773
|
+
i2.f & v || (i2.f ^= v), flush_queued_effects(process_effects(i2));
|
|
774
774
|
}
|
|
775
775
|
}
|
|
776
776
|
} finally {
|
|
@@ -780,22 +780,22 @@ function flush_queued_root_effects() {
|
|
|
780
780
|
function flush_queued_effects(e2) {
|
|
781
781
|
var t2 = e2.length;
|
|
782
782
|
if (0 !== t2) for (var n2 = 0; n2 < t2; n2++) {
|
|
783
|
-
var
|
|
784
|
-
if (!(24576 &
|
|
785
|
-
check_dirtiness(
|
|
783
|
+
var o2 = e2[n2];
|
|
784
|
+
if (!(24576 & o2.f)) try {
|
|
785
|
+
check_dirtiness(o2) && (update_effect(o2), // Effects with no dependencies or teardown do not get added to the effect tree.
|
|
786
786
|
// Deferred effects (e.g. `$effect(...)`) _are_ added to the tree because we
|
|
787
787
|
// don't know if we need to keep them until they are executed. Doing the check
|
|
788
788
|
// here (rather than in `update_effect`) allows us to skip the work for
|
|
789
789
|
// immediate effects.
|
|
790
|
-
null ===
|
|
790
|
+
null === o2.deps && null === o2.first && null === o2.nodes_start && (null === o2.teardown ? (
|
|
791
791
|
// remove this effect from the graph
|
|
792
|
-
unlink_effect(
|
|
792
|
+
unlink_effect(o2)
|
|
793
793
|
) : (
|
|
794
794
|
// keep the effect in the graph, but free up some memory
|
|
795
|
-
|
|
795
|
+
o2.fn = null
|
|
796
796
|
)));
|
|
797
797
|
} catch (e3) {
|
|
798
|
-
handle_error(e3,
|
|
798
|
+
handle_error(e3, o2, null, o2.ctx);
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
801
|
}
|
|
@@ -812,10 +812,10 @@ function schedule_effect(e2) {
|
|
|
812
812
|
}
|
|
813
813
|
function process_effects(e2) {
|
|
814
814
|
for (var t2 = [], n2 = e2.first; null !== n2; ) {
|
|
815
|
-
var
|
|
816
|
-
if (!(
|
|
817
|
-
if (4 &
|
|
818
|
-
else if (
|
|
815
|
+
var o2 = n2.f, i2 = !!(o2 & d);
|
|
816
|
+
if (!(i2 && !!(o2 & v) || o2 & m)) {
|
|
817
|
+
if (4 & o2) t2.push(n2);
|
|
818
|
+
else if (i2) n2.f ^= v;
|
|
819
819
|
else {
|
|
820
820
|
var s2 = F;
|
|
821
821
|
try {
|
|
@@ -853,8 +853,8 @@ function get$1(e2) {
|
|
|
853
853
|
var n2 = (
|
|
854
854
|
/** @type {Derived} */
|
|
855
855
|
e2
|
|
856
|
-
),
|
|
857
|
-
null ===
|
|
856
|
+
), o2 = n2.parent;
|
|
857
|
+
null === o2 || o2.f & p || // If the derived is owned by another derived then mark it as unowned
|
|
858
858
|
// as the derived value might have been referenced in a different context
|
|
859
859
|
// since and thus its parent might not be its true owner anymore
|
|
860
860
|
(n2.f ^= p);
|
|
@@ -863,11 +863,11 @@ function get$1(e2) {
|
|
|
863
863
|
null !== R && R.includes(e2) && function state_unsafe_local_read() {
|
|
864
864
|
throw new Error("https://svelte.dev/e/state_unsafe_local_read");
|
|
865
865
|
}();
|
|
866
|
-
var
|
|
866
|
+
var i2 = F.deps;
|
|
867
867
|
e2.rv < Y && (e2.rv = Y, // If the signal is accessing the same dependencies in the same
|
|
868
868
|
// order as it did last time, increment `skipped_deps`
|
|
869
869
|
// rather than updating `new_deps`, which creates GC cost
|
|
870
|
-
null === V && null !==
|
|
870
|
+
null === V && null !== i2 && i2[K] === e2 ? K++ : null === V ? V = [e2] : J && V.includes(e2) || // Normally we can push duplicated dependencies to `new_deps`, but if we're inside
|
|
871
871
|
// an unowned derived because skip_reaction is true, then we need to ensure that
|
|
872
872
|
// we don't have duplicates
|
|
873
873
|
V.push(e2));
|
|
@@ -909,9 +909,9 @@ function deep_read(e2, t2 = /* @__PURE__ */ new Set()) {
|
|
|
909
909
|
if (n2 !== Object.prototype && n2 !== Array.prototype && n2 !== Map.prototype && n2 !== Set.prototype && n2 !== Date.prototype) {
|
|
910
910
|
const t3 = a(n2);
|
|
911
911
|
for (let n3 in t3) {
|
|
912
|
-
const
|
|
913
|
-
if (
|
|
914
|
-
|
|
912
|
+
const o2 = t3[n3].get;
|
|
913
|
+
if (o2) try {
|
|
914
|
+
o2.call(e2);
|
|
915
915
|
} catch (e3) {
|
|
916
916
|
}
|
|
917
917
|
}
|
|
@@ -965,12 +965,12 @@ function without_reactive_context(e2) {
|
|
|
965
965
|
set_active_reaction(t2), set_active_effect(n2);
|
|
966
966
|
}
|
|
967
967
|
}
|
|
968
|
-
function listen_to_event_and_reset_event(e2, t2, n2,
|
|
968
|
+
function listen_to_event_and_reset_event(e2, t2, n2, o2 = n2) {
|
|
969
969
|
e2.addEventListener(t2, () => without_reactive_context(n2));
|
|
970
|
-
const
|
|
971
|
-
e2.__on_r =
|
|
972
|
-
|
|
973
|
-
} : () =>
|
|
970
|
+
const i2 = e2.__on_r;
|
|
971
|
+
e2.__on_r = i2 ? () => {
|
|
972
|
+
i2(), o2(true);
|
|
973
|
+
} : () => o2(true), function add_form_reset_listener() {
|
|
974
974
|
re || (re = true, document.addEventListener(
|
|
975
975
|
"reset",
|
|
976
976
|
(e3) => {
|
|
@@ -991,32 +991,32 @@ function listen_to_event_and_reset_event(e2, t2, n2, i2 = n2) {
|
|
|
991
991
|
));
|
|
992
992
|
}();
|
|
993
993
|
}
|
|
994
|
-
const
|
|
995
|
-
function create_event(e2, t2, n2,
|
|
994
|
+
const oe = /* @__PURE__ */ new Set(), ie = /* @__PURE__ */ new Set();
|
|
995
|
+
function create_event(e2, t2, n2, o2 = {}) {
|
|
996
996
|
function target_handler(e3) {
|
|
997
|
-
if (
|
|
997
|
+
if (o2.capture || // Only call in the bubble phase, else delegated events would be called before the capturing events
|
|
998
998
|
handle_event_propagation.call(t2, e3), !e3.cancelBubble) return without_reactive_context(() => n2 == null ? void 0 : n2.call(this, e3));
|
|
999
999
|
}
|
|
1000
1000
|
return e2.startsWith("pointer") || e2.startsWith("touch") || "wheel" === e2 ? queue_micro_task(() => {
|
|
1001
|
-
t2.addEventListener(e2, target_handler,
|
|
1002
|
-
}) : t2.addEventListener(e2, target_handler,
|
|
1001
|
+
t2.addEventListener(e2, target_handler, o2);
|
|
1002
|
+
}) : t2.addEventListener(e2, target_handler, o2), target_handler;
|
|
1003
1003
|
}
|
|
1004
|
-
function event(e2, t2, n2,
|
|
1004
|
+
function event(e2, t2, n2, o2, i2) {
|
|
1005
1005
|
var s2 = {
|
|
1006
|
-
capture:
|
|
1007
|
-
passive:
|
|
1006
|
+
capture: o2,
|
|
1007
|
+
passive: i2
|
|
1008
1008
|
}, a2 = create_event(e2, t2, n2, s2);
|
|
1009
1009
|
t2 !== document.body && t2 !== window && t2 !== document || teardown(() => {
|
|
1010
1010
|
t2.removeEventListener(e2, a2, s2);
|
|
1011
1011
|
});
|
|
1012
1012
|
}
|
|
1013
1013
|
function delegate(e2) {
|
|
1014
|
-
for (var t2 = 0; t2 < e2.length; t2++)
|
|
1015
|
-
for (var n2 of
|
|
1014
|
+
for (var t2 = 0; t2 < e2.length; t2++) oe.add(e2[t2]);
|
|
1015
|
+
for (var n2 of ie) n2(e2);
|
|
1016
1016
|
}
|
|
1017
1017
|
function handle_event_propagation(e2) {
|
|
1018
1018
|
var _a;
|
|
1019
|
-
var n2 = this,
|
|
1019
|
+
var n2 = this, o2 = (
|
|
1020
1020
|
/** @type {Node} */
|
|
1021
1021
|
n2.ownerDocument
|
|
1022
1022
|
), s2 = e2.type, a2 = ((_a = e2.composedPath) == null ? void 0 : _a.call(e2)) || [], l2 = (
|
|
@@ -1035,9 +1035,9 @@ function handle_event_propagation(e2) {
|
|
|
1035
1035
|
}
|
|
1036
1036
|
if ((l2 = /** @type {Element} */
|
|
1037
1037
|
a2[c2] || e2.target) !== n2) {
|
|
1038
|
-
|
|
1038
|
+
i(e2, "currentTarget", {
|
|
1039
1039
|
configurable: true,
|
|
1040
|
-
get: () => l2 ||
|
|
1040
|
+
get: () => l2 || o2
|
|
1041
1041
|
});
|
|
1042
1042
|
var p2 = F, _2 = H;
|
|
1043
1043
|
set_active_reaction(null), set_active_effect(null);
|
|
@@ -1086,15 +1086,15 @@ function assign_nodes(e2, t2) {
|
|
|
1086
1086
|
}
|
|
1087
1087
|
// @__NO_SIDE_EFFECTS__
|
|
1088
1088
|
function template(e2, t2) {
|
|
1089
|
-
var n2,
|
|
1089
|
+
var n2, o2 = !!(1 & t2), i2 = !!(2 & t2), s2 = !e2.startsWith("<!>");
|
|
1090
1090
|
return () => {
|
|
1091
|
-
void 0 === n2 && (n2 = create_fragment_from_html(s2 ? e2 : "<!>" + e2),
|
|
1091
|
+
void 0 === n2 && (n2 = create_fragment_from_html(s2 ? e2 : "<!>" + e2), o2 || (n2 = /** @type {Node} */
|
|
1092
1092
|
/* @__PURE__ */ get_first_child(n2)));
|
|
1093
1093
|
var t3 = (
|
|
1094
1094
|
/** @type {TemplateNode} */
|
|
1095
|
-
|
|
1095
|
+
i2 || P ? document.importNode(n2, true) : n2.cloneNode(true)
|
|
1096
1096
|
);
|
|
1097
|
-
|
|
1097
|
+
o2 ? assign_nodes(
|
|
1098
1098
|
/** @type {TemplateNode} */
|
|
1099
1099
|
/* @__PURE__ */ get_first_child(t3),
|
|
1100
1100
|
/** @type {TemplateNode} */
|
|
@@ -1105,22 +1105,22 @@ function template(e2, t2) {
|
|
|
1105
1105
|
}
|
|
1106
1106
|
// @__NO_SIDE_EFFECTS__
|
|
1107
1107
|
function ns_template(e2, t2, n2 = "svg") {
|
|
1108
|
-
var
|
|
1108
|
+
var o2, i2 = `<${n2}>${!e2.startsWith("<!>") ? e2 : "<!>" + e2}</${n2}>`;
|
|
1109
1109
|
return () => {
|
|
1110
|
-
if (!
|
|
1110
|
+
if (!o2) {
|
|
1111
1111
|
var e3 = (
|
|
1112
1112
|
/** @type {Element} */
|
|
1113
1113
|
/* @__PURE__ */ get_first_child(
|
|
1114
1114
|
/** @type {DocumentFragment} */
|
|
1115
|
-
create_fragment_from_html(
|
|
1115
|
+
create_fragment_from_html(i2)
|
|
1116
1116
|
)
|
|
1117
1117
|
);
|
|
1118
|
-
|
|
1118
|
+
o2 = /** @type {Element} */
|
|
1119
1119
|
/* @__PURE__ */ get_first_child(e3);
|
|
1120
1120
|
}
|
|
1121
1121
|
var t3 = (
|
|
1122
1122
|
/** @type {TemplateNode} */
|
|
1123
|
-
|
|
1123
|
+
o2.cloneNode(true)
|
|
1124
1124
|
);
|
|
1125
1125
|
return assign_nodes(t3, t3), t3;
|
|
1126
1126
|
};
|
|
@@ -1149,14 +1149,14 @@ function set_text(e2, t2) {
|
|
|
1149
1149
|
(e2.__t = n2, e2.nodeValue = n2 + "");
|
|
1150
1150
|
}
|
|
1151
1151
|
function mount(e2, t2) {
|
|
1152
|
-
return function _mount(e3, { target: t3, anchor: n2, props:
|
|
1152
|
+
return function _mount(e3, { target: t3, anchor: n2, props: i2 = {}, events: a2, context: l2, intro: c2 = true }) {
|
|
1153
1153
|
!/**
|
|
1154
1154
|
* Initialize these lazily to avoid issues when using the runtime in a server context
|
|
1155
1155
|
* where these globals are not available while avoiding a separate server entry point
|
|
1156
1156
|
*/
|
|
1157
1157
|
function init_operations() {
|
|
1158
|
-
if (void 0 ===
|
|
1159
|
-
|
|
1158
|
+
if (void 0 === T) {
|
|
1159
|
+
T = window, q = document, P = /Firefox/.test(navigator.userAgent);
|
|
1160
1160
|
var e4 = Element.prototype, t4 = Node.prototype;
|
|
1161
1161
|
O = s(t4, "firstChild").get, // @ts-ignore
|
|
1162
1162
|
E = s(t4, "nextSibling").get, // the following assignments improve perf of lookups on DOM nodes
|
|
@@ -1171,25 +1171,25 @@ function mount(e2, t2) {
|
|
|
1171
1171
|
}();
|
|
1172
1172
|
var u2 = /* @__PURE__ */ new Set(), event_handle = (e4) => {
|
|
1173
1173
|
for (var n3 = 0; n3 < e4.length; n3++) {
|
|
1174
|
-
var
|
|
1175
|
-
if (!u2.has(
|
|
1176
|
-
u2.add(
|
|
1177
|
-
var
|
|
1178
|
-
t3.addEventListener(
|
|
1179
|
-
passive:
|
|
1174
|
+
var o2 = e4[n3];
|
|
1175
|
+
if (!u2.has(o2)) {
|
|
1176
|
+
u2.add(o2);
|
|
1177
|
+
var i3 = is_passive_event(o2);
|
|
1178
|
+
t3.addEventListener(o2, handle_event_propagation, {
|
|
1179
|
+
passive: i3
|
|
1180
1180
|
});
|
|
1181
|
-
var s2 = ae.get(
|
|
1181
|
+
var s2 = ae.get(o2);
|
|
1182
1182
|
void 0 === s2 ? (
|
|
1183
1183
|
// The document listener ensures we catch events that originate from elements that were
|
|
1184
1184
|
// manually moved outside of the container (e.g. via manual portals).
|
|
1185
|
-
(document.addEventListener(
|
|
1186
|
-
passive:
|
|
1187
|
-
}), ae.set(
|
|
1188
|
-
) : ae.set(
|
|
1185
|
+
(document.addEventListener(o2, handle_event_propagation, {
|
|
1186
|
+
passive: i3
|
|
1187
|
+
}), ae.set(o2, 1))
|
|
1188
|
+
) : ae.set(o2, s2 + 1);
|
|
1189
1189
|
}
|
|
1190
1190
|
}
|
|
1191
1191
|
};
|
|
1192
|
-
event_handle(
|
|
1192
|
+
event_handle(o(oe)), ie.add(event_handle);
|
|
1193
1193
|
var d2 = void 0, f2 = (
|
|
1194
1194
|
/**
|
|
1195
1195
|
* An effect root whose children can transition out
|
|
@@ -1204,25 +1204,25 @@ function mount(e2, t2) {
|
|
|
1204
1204
|
}) : (destroy_effect(t4), n3(void 0));
|
|
1205
1205
|
});
|
|
1206
1206
|
}(() => {
|
|
1207
|
-
var
|
|
1207
|
+
var o2 = n2 ?? t3.appendChild(create_text());
|
|
1208
1208
|
return branch(() => {
|
|
1209
1209
|
l2 && (push({}), /** @type {ComponentContext} */
|
|
1210
|
-
|
|
1210
|
+
I.c = l2);
|
|
1211
1211
|
a2 && // We can't spread the object or else we'd lose the state proxy stuff, if it is one
|
|
1212
1212
|
/** @type {any} */
|
|
1213
|
-
(
|
|
1214
|
-
d2 = e3(
|
|
1213
|
+
(i2.$$events = a2), se = c2, // @ts-expect-error the public typings are not what the actual function looks like
|
|
1214
|
+
d2 = e3(o2, i2) || {}, se = true, l2 && pop();
|
|
1215
1215
|
}), () => {
|
|
1216
1216
|
var _a;
|
|
1217
1217
|
for (var e4 of u2) {
|
|
1218
1218
|
t3.removeEventListener(e4, handle_event_propagation);
|
|
1219
|
-
var
|
|
1219
|
+
var i3 = (
|
|
1220
1220
|
/** @type {number} */
|
|
1221
1221
|
ae.get(e4)
|
|
1222
1222
|
);
|
|
1223
|
-
0 == --
|
|
1223
|
+
0 == --i3 ? (document.removeEventListener(e4, handle_event_propagation), ae.delete(e4)) : ae.set(e4, i3);
|
|
1224
1224
|
}
|
|
1225
|
-
|
|
1225
|
+
ie.delete(event_handle), o2 !== n2 && ((_a = o2.parentNode) == null ? void 0 : _a.removeChild(o2));
|
|
1226
1226
|
};
|
|
1227
1227
|
})
|
|
1228
1228
|
);
|
|
@@ -1232,14 +1232,14 @@ function mount(e2, t2) {
|
|
|
1232
1232
|
const ae = /* @__PURE__ */ new Map();
|
|
1233
1233
|
let le = /* @__PURE__ */ new WeakMap();
|
|
1234
1234
|
function if_block(e2, t2, n2 = false) {
|
|
1235
|
-
var
|
|
1235
|
+
var o2 = e2, i2 = null, s2 = null, a2 = M, l2 = false;
|
|
1236
1236
|
const set_branch = (e3, t3 = true) => {
|
|
1237
1237
|
l2 = true, update_branch(t3, e3);
|
|
1238
1238
|
}, update_branch = (e3, t3) => {
|
|
1239
|
-
a2 !== (a2 = e3) && (a2 ? (
|
|
1239
|
+
a2 !== (a2 = e3) && (a2 ? (i2 ? resume_effect(i2) : t3 && (i2 = branch(() => t3(o2))), s2 && pause_effect(s2, () => {
|
|
1240
1240
|
s2 = null;
|
|
1241
|
-
})) : (s2 ? resume_effect(s2) : t3 && (s2 = branch(() => t3(
|
|
1242
|
-
|
|
1241
|
+
})) : (s2 ? resume_effect(s2) : t3 && (s2 = branch(() => t3(o2))), i2 && pause_effect(i2, () => {
|
|
1242
|
+
i2 = null;
|
|
1243
1243
|
})));
|
|
1244
1244
|
};
|
|
1245
1245
|
block(() => {
|
|
@@ -1253,7 +1253,7 @@ function set_current_each_item(e2) {
|
|
|
1253
1253
|
function index(e2, t2) {
|
|
1254
1254
|
return t2;
|
|
1255
1255
|
}
|
|
1256
|
-
function each(e2, n2,
|
|
1256
|
+
function each(e2, n2, i2, s2, a2, l2 = null) {
|
|
1257
1257
|
var c2 = e2, u2 = {
|
|
1258
1258
|
flags: n2,
|
|
1259
1259
|
items: /* @__PURE__ */ new Map(),
|
|
@@ -1262,8 +1262,8 @@ function each(e2, n2, o2, s2, a2, l2 = null) {
|
|
|
1262
1262
|
!(4 & n2) || (c2 = /** @type {Element} */
|
|
1263
1263
|
e2.appendChild(create_text()));
|
|
1264
1264
|
var d2 = null, f2 = false, p2 = /* @__PURE__ */ derived_safe_equal(() => {
|
|
1265
|
-
var e3 =
|
|
1266
|
-
return t(e3) ? e3 : null == e3 ? [] :
|
|
1265
|
+
var e3 = i2();
|
|
1266
|
+
return t(e3) ? e3 : null == e3 ? [] : o(e3);
|
|
1267
1267
|
});
|
|
1268
1268
|
block(() => {
|
|
1269
1269
|
var e3 = get$1(p2), t2 = e3.length;
|
|
@@ -1279,7 +1279,7 @@ function each(e2, n2, o2, s2, a2, l2 = null) {
|
|
|
1279
1279
|
* @param {() => V[]} get_collection
|
|
1280
1280
|
* @returns {void}
|
|
1281
1281
|
*/
|
|
1282
|
-
function reconcile(e4, t3, n3,
|
|
1282
|
+
function reconcile(e4, t3, n3, i3, s3, a3, l3) {
|
|
1283
1283
|
var _a, _b, _c, _d;
|
|
1284
1284
|
var c3, u3, d3, f3, p3, _2, v2 = !!(8 & s3), g2 = !!(3 & s3), h2 = e4.length, b2 = t3.items, y2 = t3.first, $2 = y2, w2 = null, x2 = [], k2 = [];
|
|
1285
1285
|
if (v2) for (_2 = 0; _2 < h2; _2 += 1) f3 = a3(d3 = e4[_2], _2), void 0 !== (p3 = b2.get(f3)) && ((_a = p3.a) == null ? void 0 : _a.measure(), (u3 ?? (u3 = /* @__PURE__ */ new Set())).add(p3));
|
|
@@ -1289,10 +1289,10 @@ function each(e2, n2, o2, s2, a2, l2 = null) {
|
|
|
1289
1289
|
if (x2.length < k2.length) {
|
|
1290
1290
|
var C2, M2 = k2[0];
|
|
1291
1291
|
w2 = M2.prev;
|
|
1292
|
-
var S2 = x2[0],
|
|
1292
|
+
var S2 = x2[0], I2 = x2[x2.length - 1];
|
|
1293
1293
|
for (C2 = 0; C2 < x2.length; C2 += 1) move(x2[C2], M2, n3);
|
|
1294
1294
|
for (C2 = 0; C2 < k2.length; C2 += 1) c3.delete(k2[C2]);
|
|
1295
|
-
link(t3, S2.prev,
|
|
1295
|
+
link(t3, S2.prev, I2.next), link(t3, w2, S2), link(t3, I2, M2), $2 = M2, w2 = I2, _2 -= 1, x2 = [], k2 = [];
|
|
1296
1296
|
} else
|
|
1297
1297
|
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
1298
|
continue;
|
|
@@ -1307,21 +1307,21 @@ function each(e2, n2, o2, s2, a2, l2 = null) {
|
|
|
1307
1307
|
w2 = create_item($2 ? (
|
|
1308
1308
|
/** @type {TemplateNode} */
|
|
1309
1309
|
$2.e.nodes_start
|
|
1310
|
-
) : n3, t3, w2, null === w2 ? t3.first : w2.next, d3, f3, _2,
|
|
1310
|
+
) : n3, t3, w2, null === w2 ? t3.first : w2.next, d3, f3, _2, i3, s3, l3), b2.set(f3, w2), x2 = [], k2 = [], $2 = w2.next;
|
|
1311
1311
|
}
|
|
1312
1312
|
if (null !== $2 || void 0 !== c3) {
|
|
1313
|
-
for (var
|
|
1314
|
-
$2.e.f & m ||
|
|
1315
|
-
var
|
|
1316
|
-
if (
|
|
1313
|
+
for (var T2 = void 0 === c3 ? [] : o(c3); null !== $2; )
|
|
1314
|
+
$2.e.f & m || T2.push($2), $2 = $2.next;
|
|
1315
|
+
var q2 = T2.length;
|
|
1316
|
+
if (q2 > 0) {
|
|
1317
1317
|
var P2 = 4 & s3 && 0 === h2 ? n3 : null;
|
|
1318
1318
|
if (v2) {
|
|
1319
|
-
for (_2 = 0; _2 <
|
|
1320
|
-
for (_2 = 0; _2 <
|
|
1319
|
+
for (_2 = 0; _2 < q2; _2 += 1) (_c = T2[_2].a) == null ? void 0 : _c.measure();
|
|
1320
|
+
for (_2 = 0; _2 < q2; _2 += 1) (_d = T2[_2].a) == null ? void 0 : _d.fix();
|
|
1321
1321
|
}
|
|
1322
|
-
!function pause_effects(e5, t4, n4,
|
|
1323
|
-
for (var
|
|
1324
|
-
var l4 = s4 > 0 && 0 ===
|
|
1322
|
+
!function pause_effects(e5, t4, n4, o2) {
|
|
1323
|
+
for (var i4 = [], s4 = t4.length, a4 = 0; a4 < s4; a4++) pause_children(t4[a4].e, i4, true);
|
|
1324
|
+
var l4 = s4 > 0 && 0 === i4.length && null !== n4;
|
|
1325
1325
|
if (l4) {
|
|
1326
1326
|
var c4 = (
|
|
1327
1327
|
/** @type {Element} */
|
|
@@ -1333,15 +1333,15 @@ function each(e2, n2, o2, s2, a2, l2 = null) {
|
|
|
1333
1333
|
}(c4), c4.append(
|
|
1334
1334
|
/** @type {Element} */
|
|
1335
1335
|
n4
|
|
1336
|
-
),
|
|
1336
|
+
), o2.clear(), link(e5, t4[0].prev, t4[s4 - 1].next);
|
|
1337
1337
|
}
|
|
1338
|
-
run_out_transitions(
|
|
1338
|
+
run_out_transitions(i4, () => {
|
|
1339
1339
|
for (var n5 = 0; n5 < s4; n5++) {
|
|
1340
|
-
var
|
|
1341
|
-
l4 || (
|
|
1340
|
+
var i5 = t4[n5];
|
|
1341
|
+
l4 || (o2.delete(i5.k), link(e5, i5.prev, i5.next)), destroy_effect(i5.e, !l4);
|
|
1342
1342
|
}
|
|
1343
1343
|
});
|
|
1344
|
-
}(t3,
|
|
1344
|
+
}(t3, T2, P2, b2);
|
|
1345
1345
|
}
|
|
1346
1346
|
}
|
|
1347
1347
|
v2 && queue_micro_task(() => {
|
|
@@ -1350,7 +1350,7 @@ function each(e2, n2, o2, s2, a2, l2 = null) {
|
|
|
1350
1350
|
});
|
|
1351
1351
|
H.first = t3.first && t3.first.e, /** @type {Effect} */
|
|
1352
1352
|
H.last = w2 && w2.e;
|
|
1353
|
-
}(e3, u2, c2, a2, n2, s2,
|
|
1353
|
+
}(e3, u2, c2, a2, n2, s2, i2), null !== l2 && (0 === t2 ? d2 ? resume_effect(d2) : d2 = branch(() => l2(c2)) : null !== d2 && pause_effect(d2, () => {
|
|
1354
1354
|
d2 = null;
|
|
1355
1355
|
})), // When we mount the each block for the first time, the collection won't be
|
|
1356
1356
|
// connected to this effect as the effect hasn't finished running yet and its deps
|
|
@@ -1361,15 +1361,15 @@ function each(e2, n2, o2, s2, a2, l2 = null) {
|
|
|
1361
1361
|
get$1(p2));
|
|
1362
1362
|
});
|
|
1363
1363
|
}
|
|
1364
|
-
function update_item(e2, t2, n2,
|
|
1365
|
-
1 &
|
|
1364
|
+
function update_item(e2, t2, n2, o2) {
|
|
1365
|
+
1 & o2 && internal_set(e2.v, t2), 2 & o2 ? internal_set(
|
|
1366
1366
|
/** @type {Value<number>} */
|
|
1367
1367
|
e2.i,
|
|
1368
1368
|
n2
|
|
1369
1369
|
) : e2.i = n2;
|
|
1370
1370
|
}
|
|
1371
|
-
function create_item(e2, t2, n2,
|
|
1372
|
-
var d2 = ce, f2 = !!(1 & c2) ? !(16 & c2) ? /* @__PURE__ */ mutable_source(
|
|
1371
|
+
function create_item(e2, t2, n2, o2, i2, s2, a2, l2, c2, u2) {
|
|
1372
|
+
var d2 = ce, f2 = !!(1 & c2) ? !(16 & c2) ? /* @__PURE__ */ mutable_source(i2) : source(i2) : i2, p2 = 2 & c2 ? source(a2) : a2, _2 = {
|
|
1373
1373
|
i: p2,
|
|
1374
1374
|
v: f2,
|
|
1375
1375
|
k: s2,
|
|
@@ -1377,81 +1377,81 @@ function create_item(e2, t2, n2, i2, o2, s2, a2, l2, c2, u2) {
|
|
|
1377
1377
|
// @ts-expect-error
|
|
1378
1378
|
e: null,
|
|
1379
1379
|
prev: n2,
|
|
1380
|
-
next:
|
|
1380
|
+
next: o2
|
|
1381
1381
|
};
|
|
1382
1382
|
ce = _2;
|
|
1383
1383
|
try {
|
|
1384
|
-
return _2.e = branch(() => l2(e2, f2, p2, u2), false), _2.e.prev = n2 && n2.e, _2.e.next =
|
|
1384
|
+
return _2.e = branch(() => l2(e2, f2, 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
1385
|
} finally {
|
|
1386
1386
|
ce = d2;
|
|
1387
1387
|
}
|
|
1388
1388
|
}
|
|
1389
1389
|
function move(e2, t2, n2) {
|
|
1390
|
-
for (var
|
|
1390
|
+
for (var o2 = e2.next ? (
|
|
1391
1391
|
/** @type {TemplateNode} */
|
|
1392
1392
|
e2.next.e.nodes_start
|
|
1393
|
-
) : n2,
|
|
1393
|
+
) : n2, i2 = t2 ? (
|
|
1394
1394
|
/** @type {TemplateNode} */
|
|
1395
1395
|
t2.e.nodes_start
|
|
1396
1396
|
) : n2, s2 = (
|
|
1397
1397
|
/** @type {TemplateNode} */
|
|
1398
1398
|
e2.e.nodes_start
|
|
1399
|
-
); s2 !==
|
|
1399
|
+
); s2 !== o2; ) {
|
|
1400
1400
|
var a2 = (
|
|
1401
1401
|
/** @type {TemplateNode} */
|
|
1402
1402
|
/* @__PURE__ */ get_next_sibling(s2)
|
|
1403
1403
|
);
|
|
1404
|
-
|
|
1404
|
+
i2.before(s2), s2 = a2;
|
|
1405
1405
|
}
|
|
1406
1406
|
}
|
|
1407
1407
|
function link(e2, t2, n2) {
|
|
1408
1408
|
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
1409
|
}
|
|
1410
|
-
function slot(e2, t2, n2,
|
|
1410
|
+
function slot(e2, t2, n2, o2, i2) {
|
|
1411
1411
|
var _a;
|
|
1412
1412
|
var s2 = (_a = t2.$$slots) == null ? void 0 : _a[n2], a2 = false;
|
|
1413
|
-
true === s2 && (s2 = t2["default" === n2 ? "children" : n2], a2 = true), void 0 === s2 ? null !==
|
|
1413
|
+
true === s2 && (s2 = t2["default" === n2 ? "children" : n2], a2 = true), void 0 === s2 ? null !== i2 && i2(e2) : s2(e2, a2 ? () => o2 : o2);
|
|
1414
1414
|
}
|
|
1415
1415
|
function component(e2, t2, n2) {
|
|
1416
|
-
var
|
|
1416
|
+
var o2, i2, s2 = e2;
|
|
1417
1417
|
block(() => {
|
|
1418
|
-
|
|
1418
|
+
o2 !== (o2 = t2()) && (i2 && (pause_effect(i2), i2 = null), o2 && (i2 = branch(() => n2(s2, o2))));
|
|
1419
1419
|
}, y);
|
|
1420
1420
|
}
|
|
1421
1421
|
function r(e2) {
|
|
1422
|
-
var t2, n2,
|
|
1423
|
-
if ("string" == typeof e2 || "number" == typeof e2)
|
|
1422
|
+
var t2, n2, o2 = "";
|
|
1423
|
+
if ("string" == typeof e2 || "number" == typeof e2) o2 += e2;
|
|
1424
1424
|
else if ("object" == typeof e2) if (Array.isArray(e2)) {
|
|
1425
|
-
var
|
|
1426
|
-
for (t2 = 0; t2 <
|
|
1427
|
-
} else for (n2 in e2) e2[n2] && (
|
|
1428
|
-
return
|
|
1425
|
+
var i2 = e2.length;
|
|
1426
|
+
for (t2 = 0; t2 < i2; t2++) e2[t2] && (n2 = r(e2[t2])) && (o2 && (o2 += " "), o2 += n2);
|
|
1427
|
+
} else for (n2 in e2) e2[n2] && (o2 && (o2 += " "), o2 += n2);
|
|
1428
|
+
return o2;
|
|
1429
1429
|
}
|
|
1430
1430
|
function clsx(e2) {
|
|
1431
1431
|
return "object" == typeof e2 ? function clsx$1() {
|
|
1432
|
-
for (var e3, t2, n2 = 0,
|
|
1433
|
-
return
|
|
1432
|
+
for (var e3, t2, n2 = 0, o2 = "", i2 = arguments.length; n2 < i2; n2++) (e3 = arguments[n2]) && (t2 = r(e3)) && (o2 && (o2 += " "), o2 += t2);
|
|
1433
|
+
return o2;
|
|
1434
1434
|
}(e2) : e2 ?? "";
|
|
1435
1435
|
}
|
|
1436
1436
|
const ue = [..." \n\r\f \v\uFEFF"];
|
|
1437
|
-
function set_class(e2, t2, n2,
|
|
1437
|
+
function set_class(e2, t2, n2, o2, i2, s2) {
|
|
1438
1438
|
if (e2.__className !== n2) {
|
|
1439
1439
|
var a2 = function to_class(e3, t3, n3) {
|
|
1440
|
-
var
|
|
1441
|
-
if (t3 && (
|
|
1442
|
-
for (var
|
|
1443
|
-
else if (
|
|
1440
|
+
var o3 = null == e3 ? "" : "" + e3;
|
|
1441
|
+
if (t3 && (o3 = o3 ? o3 + " " + t3 : t3), n3) {
|
|
1442
|
+
for (var i3 in n3) if (n3[i3]) o3 = o3 ? o3 + " " + i3 : i3;
|
|
1443
|
+
else if (o3.length) for (var s3 = i3.length, a3 = 0; (a3 = o3.indexOf(i3, a3)) >= 0; ) {
|
|
1444
1444
|
var l3 = a3 + s3;
|
|
1445
|
-
0 !== a3 && !ue.includes(
|
|
1445
|
+
0 !== a3 && !ue.includes(o3[a3 - 1]) || l3 !== o3.length && !ue.includes(o3[l3]) ? a3 = l3 : o3 = (0 === a3 ? "" : o3.substring(0, a3)) + o3.substring(l3 + 1);
|
|
1446
1446
|
}
|
|
1447
1447
|
}
|
|
1448
|
-
return "" ===
|
|
1449
|
-
}(n2,
|
|
1448
|
+
return "" === o3 ? null : o3;
|
|
1449
|
+
}(n2, o2, s2);
|
|
1450
1450
|
null == a2 ? e2.removeAttribute("class") : t2 ? e2.className = a2 : e2.setAttribute("class", a2), // @ts-expect-error need to add __className to patched prototype
|
|
1451
1451
|
e2.__className = n2;
|
|
1452
1452
|
} else if (s2) for (var l2 in s2) {
|
|
1453
1453
|
var c2 = !!s2[l2];
|
|
1454
|
-
null !=
|
|
1454
|
+
null != i2 && c2 === !!i2[l2] || e2.classList.toggle(l2, c2);
|
|
1455
1455
|
}
|
|
1456
1456
|
return s2;
|
|
1457
1457
|
}
|
|
@@ -1463,19 +1463,19 @@ function set_selected(e2, t2) {
|
|
|
1463
1463
|
e2.hasAttribute("selected") || e2.setAttribute("selected", "")
|
|
1464
1464
|
) : e2.removeAttribute("selected");
|
|
1465
1465
|
}
|
|
1466
|
-
function set_attribute(e2, t2, n2,
|
|
1467
|
-
var
|
|
1468
|
-
|
|
1466
|
+
function set_attribute(e2, t2, n2, o2) {
|
|
1467
|
+
var i2 = e2.__attributes ?? (e2.__attributes = {});
|
|
1468
|
+
i2[t2] !== (i2[t2] = n2) && ("style" === t2 && "__styles" in e2 && // reset styles to force style: directive to update
|
|
1469
1469
|
(e2.__styles = {}), "loading" === t2 && // @ts-expect-error
|
|
1470
1470
|
(e2[k] = n2), null == n2 ? e2.removeAttribute(t2) : "string" != typeof n2 && get_setters(e2).includes(t2) ? (
|
|
1471
1471
|
// @ts-ignore
|
|
1472
1472
|
e2[t2] = n2
|
|
1473
1473
|
) : e2.setAttribute(t2, n2));
|
|
1474
1474
|
}
|
|
1475
|
-
function set_attributes(e2, t2, n2,
|
|
1475
|
+
function set_attributes(e2, t2, n2, o2, i2 = false, s2 = false, a2 = false) {
|
|
1476
1476
|
var l2 = t2 || {}, c2 = "OPTION" === e2.tagName;
|
|
1477
1477
|
for (var u2 in t2) u2 in n2 || (n2[u2] = null);
|
|
1478
|
-
n2.class ? n2.class = clsx(n2.class) : (
|
|
1478
|
+
n2.class ? n2.class = clsx(n2.class) : (o2 || n2[de]) && (n2.class = null);
|
|
1479
1479
|
var d2 = get_setters(e2), f2 = (
|
|
1480
1480
|
/** @type {Record<string, unknown>} **/
|
|
1481
1481
|
e2.__attributes ?? (e2.__attributes = {})
|
|
@@ -1521,7 +1521,7 @@ function set_attributes(e2, t2, n2, i2, o2 = false, s2 = false, a2 = false) {
|
|
|
1521
1521
|
);
|
|
1522
1522
|
else {
|
|
1523
1523
|
var g2 = m2;
|
|
1524
|
-
|
|
1524
|
+
i2 || (g2 = normalize_attribute(g2));
|
|
1525
1525
|
var h2 = "defaultValue" === g2 || "defaultChecked" === g2;
|
|
1526
1526
|
if (null != b2 || s2 || h2) h2 || d2.includes(g2) && (s2 || "string" != typeof b2) ? (
|
|
1527
1527
|
// @ts-ignore
|
|
@@ -1550,7 +1550,7 @@ function set_attributes(e2, t2, n2, i2, o2 = false, s2 = false, a2 = false) {
|
|
|
1550
1550
|
}
|
|
1551
1551
|
}
|
|
1552
1552
|
} else {
|
|
1553
|
-
set_class(e2, "http://www.w3.org/1999/xhtml" === e2.namespaceURI, b2,
|
|
1553
|
+
set_class(e2, "http://www.w3.org/1999/xhtml" === e2.namespaceURI, b2, o2, t2 == null ? void 0 : t2[de], n2[de]), l2[m2] = b2, l2[de] = n2[de];
|
|
1554
1554
|
}
|
|
1555
1555
|
}
|
|
1556
1556
|
return l2;
|
|
@@ -1560,15 +1560,15 @@ function get_setters(e2) {
|
|
|
1560
1560
|
var t2, n2 = fe.get(e2.nodeName);
|
|
1561
1561
|
if (n2) return n2;
|
|
1562
1562
|
fe.set(e2.nodeName, n2 = []);
|
|
1563
|
-
for (var
|
|
1564
|
-
for (var s2 in t2 = a(
|
|
1565
|
-
|
|
1563
|
+
for (var o2 = e2, i2 = Element.prototype; i2 !== o2; ) {
|
|
1564
|
+
for (var s2 in t2 = a(o2)) t2[s2].set && n2.push(s2);
|
|
1565
|
+
o2 = u(o2);
|
|
1566
1566
|
}
|
|
1567
1567
|
return n2;
|
|
1568
1568
|
}
|
|
1569
|
-
function set_style(e2, t2, n2,
|
|
1570
|
-
var
|
|
1571
|
-
|
|
1569
|
+
function set_style(e2, t2, n2, o2) {
|
|
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
1572
|
}
|
|
1573
1573
|
const pe = {
|
|
1574
1574
|
// don't access requestAnimationFrame eagerly outside method
|
|
@@ -1605,20 +1605,20 @@ function css_property_to_camelcase(e2) {
|
|
|
1605
1605
|
function css_to_keyframe(e2) {
|
|
1606
1606
|
const t2 = {}, n2 = e2.split(";");
|
|
1607
1607
|
for (const e3 of n2) {
|
|
1608
|
-
const [n3,
|
|
1609
|
-
if (!n3 || void 0 ===
|
|
1610
|
-
t2[css_property_to_camelcase(n3.trim())] =
|
|
1608
|
+
const [n3, o2] = e3.split(":");
|
|
1609
|
+
if (!n3 || void 0 === o2) break;
|
|
1610
|
+
t2[css_property_to_camelcase(n3.trim())] = o2.trim();
|
|
1611
1611
|
}
|
|
1612
1612
|
return t2;
|
|
1613
1613
|
}
|
|
1614
1614
|
const linear = (e2) => e2;
|
|
1615
|
-
function transition(e2, t2, n2,
|
|
1616
|
-
var
|
|
1615
|
+
function transition(e2, t2, n2, o2) {
|
|
1616
|
+
var i2, s2, a2, l2 = !!(4 & e2), c2 = t2.inert, u2 = t2.style.overflow;
|
|
1617
1617
|
function get_options() {
|
|
1618
1618
|
var e3 = F, s3 = H;
|
|
1619
1619
|
set_active_reaction(null), set_active_effect(null);
|
|
1620
1620
|
try {
|
|
1621
|
-
return
|
|
1621
|
+
return i2 ?? (i2 = n2()(t2, (o2 == null ? void 0 : o2()) ?? /** @type {P} */
|
|
1622
1622
|
{}, {
|
|
1623
1623
|
direction: "both"
|
|
1624
1624
|
}));
|
|
@@ -1631,7 +1631,7 @@ function transition(e2, t2, n2, i2) {
|
|
|
1631
1631
|
in() {
|
|
1632
1632
|
t2.inert = c2, dispatch_event(t2, "introstart"), s2 = animate(t2, get_options(), a2, 1, () => {
|
|
1633
1633
|
dispatch_event(t2, "introend"), // Ensure we cancel the animation to prevent leaking
|
|
1634
|
-
s2 == null ? void 0 : s2.abort(), s2 =
|
|
1634
|
+
s2 == null ? void 0 : s2.abort(), s2 = i2 = void 0, t2.style.overflow = u2;
|
|
1635
1635
|
});
|
|
1636
1636
|
},
|
|
1637
1637
|
out(e3) {
|
|
@@ -1660,8 +1660,8 @@ function transition(e2, t2, n2, i2) {
|
|
|
1660
1660
|
});
|
|
1661
1661
|
}
|
|
1662
1662
|
}
|
|
1663
|
-
function animate(e2, t2, n2,
|
|
1664
|
-
var s2 = 1 ===
|
|
1663
|
+
function animate(e2, t2, n2, o2, i2) {
|
|
1664
|
+
var s2 = 1 === o2;
|
|
1665
1665
|
if (is_function(t2)) {
|
|
1666
1666
|
var a2, l2 = false;
|
|
1667
1667
|
return queue_micro_task(() => {
|
|
@@ -1669,7 +1669,7 @@ function animate(e2, t2, n2, i2, o2) {
|
|
|
1669
1669
|
var c3 = t2({
|
|
1670
1670
|
direction: s2 ? "in" : "out"
|
|
1671
1671
|
});
|
|
1672
|
-
a2 = animate(e2, c3, n2,
|
|
1672
|
+
a2 = animate(e2, c3, n2, o2, i2);
|
|
1673
1673
|
}
|
|
1674
1674
|
}), {
|
|
1675
1675
|
abort: () => {
|
|
@@ -1680,11 +1680,11 @@ function animate(e2, t2, n2, i2, o2) {
|
|
|
1680
1680
|
t: () => a2.t()
|
|
1681
1681
|
};
|
|
1682
1682
|
}
|
|
1683
|
-
if (n2 == null ? void 0 : n2.deactivate(), !(t2 == null ? void 0 : t2.duration)) return
|
|
1683
|
+
if (n2 == null ? void 0 : n2.deactivate(), !(t2 == null ? void 0 : t2.duration)) return i2(), {
|
|
1684
1684
|
abort: noop,
|
|
1685
1685
|
deactivate: noop,
|
|
1686
1686
|
reset: noop,
|
|
1687
|
-
t: () =>
|
|
1687
|
+
t: () => o2
|
|
1688
1688
|
};
|
|
1689
1689
|
const { delay: c2 = 0, css: u2, tick: d2, easing: f2 = linear } = t2;
|
|
1690
1690
|
var p2 = [];
|
|
@@ -1692,13 +1692,13 @@ function animate(e2, t2, n2, i2, o2) {
|
|
|
1692
1692
|
var _2 = css_to_keyframe(u2(0, 1));
|
|
1693
1693
|
p2.push(_2, _2);
|
|
1694
1694
|
}
|
|
1695
|
-
var get_t = () => 1 -
|
|
1695
|
+
var get_t = () => 1 - o2, v2 = e2.animate(p2, {
|
|
1696
1696
|
duration: c2
|
|
1697
1697
|
});
|
|
1698
1698
|
return v2.onfinish = () => {
|
|
1699
|
-
var s3 = (n2 == null ? void 0 : n2.t()) ?? 1 -
|
|
1699
|
+
var s3 = (n2 == null ? void 0 : n2.t()) ?? 1 - o2;
|
|
1700
1700
|
n2 == null ? void 0 : n2.abort();
|
|
1701
|
-
var a3 =
|
|
1701
|
+
var a3 = o2 - s3, l3 = (
|
|
1702
1702
|
/** @type {number} */
|
|
1703
1703
|
t2.duration * Math.abs(a3)
|
|
1704
1704
|
), c3 = [];
|
|
@@ -1740,7 +1740,7 @@ function animate(e2, t2, n2, i2, o2) {
|
|
|
1740
1740
|
duration: l3,
|
|
1741
1741
|
fill: "forwards"
|
|
1742
1742
|
})).onfinish = () => {
|
|
1743
|
-
get_t = () =>
|
|
1743
|
+
get_t = () => o2, d2 == null ? void 0 : d2(o2, 1 - o2), i2();
|
|
1744
1744
|
};
|
|
1745
1745
|
}, {
|
|
1746
1746
|
abort: () => {
|
|
@@ -1751,10 +1751,10 @@ function animate(e2, t2, n2, i2, o2) {
|
|
|
1751
1751
|
v2.onfinish = noop);
|
|
1752
1752
|
},
|
|
1753
1753
|
deactivate: () => {
|
|
1754
|
-
|
|
1754
|
+
i2 = noop;
|
|
1755
1755
|
},
|
|
1756
1756
|
reset: () => {
|
|
1757
|
-
0 ===
|
|
1757
|
+
0 === o2 && (d2 == null ? void 0 : d2(1, 0));
|
|
1758
1758
|
},
|
|
1759
1759
|
t: () => get_t()
|
|
1760
1760
|
};
|
|
@@ -1769,19 +1769,19 @@ function to_number(e2) {
|
|
|
1769
1769
|
function is_bound_this(e2, t2) {
|
|
1770
1770
|
return e2 === t2 || (e2 == null ? void 0 : e2[w]) === t2;
|
|
1771
1771
|
}
|
|
1772
|
-
function bind_this(e2 = {}, t2, n2,
|
|
1772
|
+
function bind_this(e2 = {}, t2, n2, o2) {
|
|
1773
1773
|
return effect(() => {
|
|
1774
|
-
var
|
|
1774
|
+
var o3, i2;
|
|
1775
1775
|
return render_effect(() => {
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
e2 !== n2(...
|
|
1776
|
+
o3 = i2, // We only track changes to the parts, not the value itself to avoid unnecessary reruns.
|
|
1777
|
+
i2 = [], untrack(() => {
|
|
1778
|
+
e2 !== n2(...i2) && (t2(e2, ...i2), // If this is an effect rerun (cause: each block context changes), then nullfiy the binding at
|
|
1779
1779
|
// the previous position if it isn't already taken over by a different effect.
|
|
1780
|
-
|
|
1780
|
+
o3 && is_bound_this(n2(...o3), e2) && t2(null, ...o3));
|
|
1781
1781
|
});
|
|
1782
1782
|
}), () => {
|
|
1783
1783
|
queue_micro_task(() => {
|
|
1784
|
-
|
|
1784
|
+
i2 && is_bound_this(n2(...i2), e2) && t2(null, ...i2);
|
|
1785
1785
|
});
|
|
1786
1786
|
};
|
|
1787
1787
|
}), e2;
|
|
@@ -1789,7 +1789,7 @@ function bind_this(e2 = {}, t2, n2, i2) {
|
|
|
1789
1789
|
function init(e2 = false) {
|
|
1790
1790
|
const t2 = (
|
|
1791
1791
|
/** @type {ComponentContextLegacy} */
|
|
1792
|
-
|
|
1792
|
+
I
|
|
1793
1793
|
), n2 = t2.l.u;
|
|
1794
1794
|
if (!n2) return;
|
|
1795
1795
|
let props = () => deep_read_state(t2.s);
|
|
@@ -1798,13 +1798,13 @@ function init(e2 = false) {
|
|
|
1798
1798
|
/** @type {Record<string, any>} */
|
|
1799
1799
|
{}
|
|
1800
1800
|
);
|
|
1801
|
-
const
|
|
1802
|
-
let
|
|
1803
|
-
const
|
|
1804
|
-
for (const e4 in
|
|
1805
|
-
return
|
|
1801
|
+
const o2 = /* @__PURE__ */ derived(() => {
|
|
1802
|
+
let o3 = false;
|
|
1803
|
+
const i2 = t2.s;
|
|
1804
|
+
for (const e4 in i2) i2[e4] !== n3[e4] && (n3[e4] = i2[e4], o3 = true);
|
|
1805
|
+
return o3 && e3++, e3;
|
|
1806
1806
|
});
|
|
1807
|
-
props = () => get$1(
|
|
1807
|
+
props = () => get$1(o2);
|
|
1808
1808
|
}
|
|
1809
1809
|
n2.b.length && function user_pre_effect(e3) {
|
|
1810
1810
|
return validate_effect(), render_effect(e3);
|
|
@@ -1828,21 +1828,21 @@ function observe_all(e2, t2) {
|
|
|
1828
1828
|
function subscribe_to_store(e2, t2, n2) {
|
|
1829
1829
|
if (null == e2)
|
|
1830
1830
|
return t2(void 0), noop;
|
|
1831
|
-
const
|
|
1831
|
+
const o2 = untrack(() => e2.subscribe(
|
|
1832
1832
|
t2,
|
|
1833
1833
|
// @ts-expect-error
|
|
1834
1834
|
n2
|
|
1835
1835
|
));
|
|
1836
|
-
return
|
|
1836
|
+
return o2.unsubscribe ? () => o2.unsubscribe() : o2;
|
|
1837
1837
|
}
|
|
1838
1838
|
const _e = [];
|
|
1839
1839
|
function writable(e2, t2 = noop) {
|
|
1840
1840
|
let n2 = null;
|
|
1841
|
-
const
|
|
1841
|
+
const o2 = /* @__PURE__ */ new Set();
|
|
1842
1842
|
function set2(t3) {
|
|
1843
1843
|
if (safe_not_equal(e2, t3) && (e2 = t3, n2)) {
|
|
1844
1844
|
const t4 = !_e.length;
|
|
1845
|
-
for (const t5 of
|
|
1845
|
+
for (const t5 of o2) t5[1](), _e.push(t5, e2);
|
|
1846
1846
|
if (t4) {
|
|
1847
1847
|
for (let e3 = 0; e3 < _e.length; e3 += 2) _e[e3][0](_e[e3 + 1]);
|
|
1848
1848
|
_e.length = 0;
|
|
@@ -1858,13 +1858,13 @@ function writable(e2, t2 = noop) {
|
|
|
1858
1858
|
return {
|
|
1859
1859
|
set: set2,
|
|
1860
1860
|
update: update2,
|
|
1861
|
-
subscribe: function subscribe(
|
|
1862
|
-
const a2 = [
|
|
1863
|
-
return
|
|
1861
|
+
subscribe: function subscribe(i2, s2 = noop) {
|
|
1862
|
+
const a2 = [i2, s2];
|
|
1863
|
+
return o2.add(a2), 1 === o2.size && (n2 = t2(set2, update2) || noop), i2(
|
|
1864
1864
|
/** @type {T} */
|
|
1865
1865
|
e2
|
|
1866
1866
|
), () => {
|
|
1867
|
-
|
|
1867
|
+
o2.delete(a2), 0 === o2.size && n2 && (n2(), n2 = null);
|
|
1868
1868
|
};
|
|
1869
1869
|
}
|
|
1870
1870
|
};
|
|
@@ -1875,24 +1875,24 @@ function get(e2) {
|
|
|
1875
1875
|
}
|
|
1876
1876
|
let ve = false, ge = Symbol();
|
|
1877
1877
|
function store_get(e2, t2, n2) {
|
|
1878
|
-
const
|
|
1878
|
+
const o2 = n2[t2] ?? (n2[t2] = {
|
|
1879
1879
|
store: null,
|
|
1880
1880
|
source: /* @__PURE__ */ mutable_source(void 0),
|
|
1881
1881
|
unsubscribe: noop
|
|
1882
1882
|
});
|
|
1883
|
-
if (
|
|
1884
|
-
|
|
1883
|
+
if (o2.store !== e2 && !(ge in n2)) if (o2.unsubscribe(), o2.store = e2 ?? null, null == e2) o2.source.v = void 0, // see synchronous callback comment below
|
|
1884
|
+
o2.unsubscribe = noop;
|
|
1885
1885
|
else {
|
|
1886
|
-
var
|
|
1887
|
-
|
|
1888
|
-
|
|
1886
|
+
var i2 = true;
|
|
1887
|
+
o2.unsubscribe = subscribe_to_store(e2, (e3) => {
|
|
1888
|
+
i2 ? (
|
|
1889
1889
|
// If the first updates to the store value (possibly multiple of them) are synchronously
|
|
1890
1890
|
// inside a derived, we will hit the `state_unsafe_mutation` error if we `set` the value
|
|
1891
|
-
|
|
1892
|
-
) : set(
|
|
1893
|
-
}),
|
|
1891
|
+
o2.source.v = e3
|
|
1892
|
+
) : set(o2.source, e3);
|
|
1893
|
+
}), i2 = false;
|
|
1894
1894
|
}
|
|
1895
|
-
return e2 && ge in n2 ? get(e2) : get$1(
|
|
1895
|
+
return e2 && ge in n2 ? get(e2) : get$1(o2.source);
|
|
1896
1896
|
}
|
|
1897
1897
|
function store_set(e2, t2) {
|
|
1898
1898
|
return e2.set(t2), t2;
|
|
@@ -1904,7 +1904,7 @@ function setup_stores() {
|
|
|
1904
1904
|
for (var t2 in e2) {
|
|
1905
1905
|
e2[t2].unsubscribe();
|
|
1906
1906
|
}
|
|
1907
|
-
|
|
1907
|
+
i(e2, ge, {
|
|
1908
1908
|
enumerable: false,
|
|
1909
1909
|
value: true
|
|
1910
1910
|
});
|
|
@@ -1953,16 +1953,16 @@ const me = {
|
|
|
1953
1953
|
get(e2, t2) {
|
|
1954
1954
|
let n2 = e2.props.length;
|
|
1955
1955
|
for (; n2--; ) {
|
|
1956
|
-
let
|
|
1957
|
-
if (is_function(
|
|
1956
|
+
let o2 = e2.props[n2];
|
|
1957
|
+
if (is_function(o2) && (o2 = o2()), "object" == typeof o2 && null !== o2 && t2 in o2) return o2[t2];
|
|
1958
1958
|
}
|
|
1959
1959
|
},
|
|
1960
1960
|
set(e2, t2, n2) {
|
|
1961
|
-
let
|
|
1962
|
-
for (;
|
|
1963
|
-
let
|
|
1964
|
-
is_function(
|
|
1965
|
-
const a2 = s(
|
|
1961
|
+
let o2 = e2.props.length;
|
|
1962
|
+
for (; o2--; ) {
|
|
1963
|
+
let i2 = e2.props[o2];
|
|
1964
|
+
is_function(i2) && (i2 = i2());
|
|
1965
|
+
const a2 = s(i2, t2);
|
|
1966
1966
|
if (a2 && a2.set) return a2.set(n2), true;
|
|
1967
1967
|
}
|
|
1968
1968
|
return false;
|
|
@@ -1970,9 +1970,9 @@ const me = {
|
|
|
1970
1970
|
getOwnPropertyDescriptor(e2, t2) {
|
|
1971
1971
|
let n2 = e2.props.length;
|
|
1972
1972
|
for (; n2--; ) {
|
|
1973
|
-
let
|
|
1974
|
-
if (is_function(
|
|
1975
|
-
const e3 = s(
|
|
1973
|
+
let o2 = e2.props[n2];
|
|
1974
|
+
if (is_function(o2) && (o2 = o2()), "object" == typeof o2 && null !== o2 && t2 in o2) {
|
|
1975
|
+
const e3 = s(o2, t2);
|
|
1976
1976
|
return e3 && !e3.configurable && // Prevent a "Non-configurability Report Error": The target is an array, it does
|
|
1977
1977
|
// not actually contain this property. If it is now described as non-configurable,
|
|
1978
1978
|
// the proxy throws a validation error. Setting it to true avoids that.
|
|
@@ -1999,10 +1999,10 @@ function spread_props(...e2) {
|
|
|
1999
1999
|
props: e2
|
|
2000
2000
|
}, me);
|
|
2001
2001
|
}
|
|
2002
|
-
function prop(e2, t2, n2,
|
|
2002
|
+
function prop(e2, t2, n2, o2) {
|
|
2003
2003
|
var _a;
|
|
2004
|
-
var
|
|
2005
|
-
c2 ? [
|
|
2004
|
+
var i2, a2 = !!(1 & n2), l2 = !C || !!(2 & n2), c2 = !!(8 & n2), u2 = !!(16 & n2), d2 = false;
|
|
2005
|
+
c2 ? [i2, d2] = function capture_store_binding(e3) {
|
|
2006
2006
|
var t3 = ve;
|
|
2007
2007
|
try {
|
|
2008
2008
|
return ve = false, [e3(), ve];
|
|
@@ -2012,21 +2012,21 @@ function prop(e2, t2, n2, i2) {
|
|
|
2012
2012
|
}(() => (
|
|
2013
2013
|
/** @type {V} */
|
|
2014
2014
|
e2[t2]
|
|
2015
|
-
)) :
|
|
2015
|
+
)) : i2 = /** @type {V} */
|
|
2016
2016
|
e2[t2];
|
|
2017
2017
|
var f2, p2 = w in e2 || x in e2, _2 = c2 && (((_a = s(e2, t2)) == null ? void 0 : _a.set) ?? (p2 && t2 in e2 && ((n3) => e2[t2] = n3))) || void 0, v2 = (
|
|
2018
2018
|
/** @type {V} */
|
|
2019
|
-
|
|
2019
|
+
o2
|
|
2020
2020
|
), g2 = true, h2 = false, get_fallback = () => (h2 = true, g2 && (g2 = false, v2 = u2 ? untrack(
|
|
2021
2021
|
/** @type {() => V} */
|
|
2022
|
-
|
|
2022
|
+
o2
|
|
2023
2023
|
) : (
|
|
2024
2024
|
/** @type {V} */
|
|
2025
|
-
|
|
2025
|
+
o2
|
|
2026
2026
|
)), v2);
|
|
2027
|
-
if (void 0 ===
|
|
2027
|
+
if (void 0 === i2 && void 0 !== o2 && (_2 && l2 && function props_invalid_value(e3) {
|
|
2028
2028
|
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
2029
|
-
}(),
|
|
2029
|
+
}(), i2 = get_fallback(), _2 && _2(i2)), l2) f2 = () => {
|
|
2030
2030
|
var n3 = (
|
|
2031
2031
|
/** @type {V} */
|
|
2032
2032
|
e2[t2]
|
|
@@ -2058,7 +2058,7 @@ function prop(e2, t2, n2, i2) {
|
|
|
2058
2058
|
) : f2();
|
|
2059
2059
|
};
|
|
2060
2060
|
}
|
|
2061
|
-
var y2 = false, $2 = /* @__PURE__ */ mutable_source(
|
|
2061
|
+
var y2 = false, $2 = /* @__PURE__ */ mutable_source(i2), k2 = /* @__PURE__ */ derived(() => {
|
|
2062
2062
|
var e3 = f2(), t3 = get$1($2);
|
|
2063
2063
|
return y2 ? (y2 = false, t3) : $2.v = e3;
|
|
2064
2064
|
});
|
|
@@ -2073,7 +2073,7 @@ function prop(e2, t2, n2, i2) {
|
|
|
2073
2073
|
};
|
|
2074
2074
|
}
|
|
2075
2075
|
function onMount(e2) {
|
|
2076
|
-
null ===
|
|
2076
|
+
null === I && lifecycle_outside_component(), C && null !== I.l ? (
|
|
2077
2077
|
/**
|
|
2078
2078
|
* Legacy-mode: Init callbacks object for onMount/beforeUpdate/afterUpdate
|
|
2079
2079
|
* @param {ComponentContext} context
|
|
@@ -2088,7 +2088,7 @@ function onMount(e2) {
|
|
|
2088
2088
|
b: [],
|
|
2089
2089
|
m: []
|
|
2090
2090
|
});
|
|
2091
|
-
}(
|
|
2091
|
+
}(I).m.push(e2)
|
|
2092
2092
|
) : user_effect(() => {
|
|
2093
2093
|
const t2 = untrack(e2);
|
|
2094
2094
|
if ("function" == typeof t2) return t2;
|
|
@@ -2133,16 +2133,16 @@ const be = {
|
|
|
2133
2133
|
};
|
|
2134
2134
|
var ye = /* @__PURE__ */ ns_template("<svg><!><!></svg>");
|
|
2135
2135
|
function Icon$1(e2, t2) {
|
|
2136
|
-
const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]),
|
|
2136
|
+
const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]), o2 = legacy_rest_props(n2, ["name", "color", "size", "strokeWidth", "absoluteStrokeWidth", "iconNode"]);
|
|
2137
2137
|
push(t2, false);
|
|
2138
|
-
let
|
|
2138
|
+
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
2139
|
init();
|
|
2140
2140
|
var d2 = ye();
|
|
2141
2141
|
let f2;
|
|
2142
2142
|
var p2 = child(d2);
|
|
2143
2143
|
each(p2, 1, u2, index, (e3, t3) => {
|
|
2144
2144
|
var n3 = comment();
|
|
2145
|
-
!function element(e4, t4, n4,
|
|
2145
|
+
!function element(e4, t4, n4, o3, i3, s3) {
|
|
2146
2146
|
var a3, l3, c3, u3 = null, d3 = (
|
|
2147
2147
|
/** @type {TemplateNode} */
|
|
2148
2148
|
e4
|
|
@@ -2151,7 +2151,7 @@ function Icon$1(e2, t2) {
|
|
|
2151
2151
|
const e5 = t4() || null;
|
|
2152
2152
|
var n5 = S;
|
|
2153
2153
|
if (e5 !== a3) {
|
|
2154
|
-
var
|
|
2154
|
+
var i4 = ce;
|
|
2155
2155
|
set_current_each_item(f3), c3 && (null === e5 ? (
|
|
2156
2156
|
// start outro
|
|
2157
2157
|
pause_effect(c3, () => {
|
|
@@ -2164,32 +2164,32 @@ function Icon$1(e2, t2) {
|
|
|
2164
2164
|
// tag is changing — destroy immediately, render contents without intro transitions
|
|
2165
2165
|
(destroy_effect(c3), set_should_intro(false))
|
|
2166
2166
|
)), e5 && e5 !== l3 && (c3 = branch(() => {
|
|
2167
|
-
if (assign_nodes(u3 = document.createElementNS(n5, e5), u3),
|
|
2167
|
+
if (assign_nodes(u3 = document.createElementNS(n5, e5), u3), o3) {
|
|
2168
2168
|
var t5 = (
|
|
2169
2169
|
/** @type {TemplateNode} */
|
|
2170
2170
|
u3.appendChild(create_text())
|
|
2171
2171
|
);
|
|
2172
|
-
|
|
2172
|
+
o3(u3, t5);
|
|
2173
2173
|
}
|
|
2174
2174
|
H.nodes_end = u3, d3.before(u3);
|
|
2175
|
-
})), (a3 = e5) && (l3 = a3), set_should_intro(true), set_current_each_item(
|
|
2175
|
+
})), (a3 = e5) && (l3 = a3), set_should_intro(true), set_current_each_item(i4);
|
|
2176
2176
|
}
|
|
2177
2177
|
}, y);
|
|
2178
2178
|
}(first_child(n3), () => get$1(t3)[0], 0, (e4, n4) => {
|
|
2179
|
-
let
|
|
2180
|
-
template_effect(() =>
|
|
2179
|
+
let o3;
|
|
2180
|
+
template_effect(() => o3 = set_attributes(e4, o3, {
|
|
2181
2181
|
...get$1(t3)[1]
|
|
2182
2182
|
}, void 0, e4.namespaceURI === S, e4.nodeName.includes("-")));
|
|
2183
2183
|
}), append(e3, n3);
|
|
2184
2184
|
}), slot(sibling(p2), t2, "default", {}, null), template_effect((e3, t3) => f2 = set_attributes(d2, f2, {
|
|
2185
2185
|
...be,
|
|
2186
|
-
...
|
|
2186
|
+
...o2,
|
|
2187
2187
|
width: a2(),
|
|
2188
2188
|
height: a2(),
|
|
2189
2189
|
stroke: s2(),
|
|
2190
2190
|
"stroke-width": e3,
|
|
2191
2191
|
class: t3
|
|
2192
|
-
}, void 0, true), [() => c2() ? 24 * Number(l2()) / Number(a2()) : l2(), () => ((...e3) => e3.filter((e4, t3, n3) => Boolean(e4) && n3.indexOf(e4) === t3).join(" "))("lucide-icon", "lucide",
|
|
2192
|
+
}, void 0, true), [() => 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, d2), pop();
|
|
2193
2193
|
}
|
|
2194
2194
|
function Loader_circle(e2, t2) {
|
|
2195
2195
|
const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]);
|
|
@@ -2200,8 +2200,8 @@ function Loader_circle(e2, t2) {
|
|
|
2200
2200
|
d: "M21 12a9 9 0 1 1-6.219-8.56"
|
|
2201
2201
|
}]],
|
|
2202
2202
|
children: (e3, n3) => {
|
|
2203
|
-
var
|
|
2204
|
-
slot(first_child(
|
|
2203
|
+
var o2 = comment();
|
|
2204
|
+
slot(first_child(o2), t2, "default", {}, null), append(e3, o2);
|
|
2205
2205
|
},
|
|
2206
2206
|
$$slots: {
|
|
2207
2207
|
default: true
|
|
@@ -2211,14 +2211,14 @@ function Loader_circle(e2, t2) {
|
|
|
2211
2211
|
var on_click$2 = (e2, t2) => {
|
|
2212
2212
|
var _a;
|
|
2213
2213
|
(_a = t2.onClick) == null ? void 0 : _a.call(t2);
|
|
2214
|
-
}, $e = /* @__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 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>');
|
|
2214
|
+
}, $e = /* @__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
2215
|
function FloatingButton(e2, t2) {
|
|
2216
2216
|
push(t2, true);
|
|
2217
|
-
let n2 = prop(t2, "position", 3, "bottom-right"),
|
|
2218
|
-
var
|
|
2219
|
-
var
|
|
2220
|
-
|
|
2221
|
-
var
|
|
2217
|
+
let n2 = prop(t2, "position", 3, "bottom-right"), o2 = prop(t2, "visible", 3, true);
|
|
2218
|
+
var i2 = comment(), s2 = first_child(i2), consequent = (e3) => {
|
|
2219
|
+
var o3 = $e();
|
|
2220
|
+
o3.__click = [on_click$2, t2];
|
|
2221
|
+
var i3 = child(o3);
|
|
2222
2222
|
!function Gamepad(e4, t3) {
|
|
2223
2223
|
const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
|
|
2224
2224
|
Icon$1(e4, spread_props({
|
|
@@ -2252,22 +2252,22 @@ function FloatingButton(e2, t2) {
|
|
|
2252
2252
|
rx: "2"
|
|
2253
2253
|
}]],
|
|
2254
2254
|
children: (e5, n4) => {
|
|
2255
|
-
var
|
|
2256
|
-
slot(first_child(
|
|
2255
|
+
var o4 = comment();
|
|
2256
|
+
slot(first_child(o4), t3, "default", {}, null), append(e5, o4);
|
|
2257
2257
|
},
|
|
2258
2258
|
$$slots: {
|
|
2259
2259
|
default: true
|
|
2260
2260
|
}
|
|
2261
2261
|
}));
|
|
2262
|
-
}(child(
|
|
2262
|
+
}(child(i3), {
|
|
2263
2263
|
size: 26,
|
|
2264
2264
|
strokeWidth: 1.75,
|
|
2265
2265
|
class: "z-2 mr-2 transform transition-all duration-300 group-hover:rotate-12"
|
|
2266
|
-
}), template_effect(() => set_class(
|
|
2266
|
+
}), template_effect(() => set_class(o3, 1, `fixed ${("bottom-left" == n2() ? "bottom-4 left-4" : "bottom-right" == n2() ? "right-4 bottom-4" : "") ?? ""} group children-text-white z-99990 flex cursor-pointer gap-2 rounded-md bg-white p-3 font-bold text-black uppercase shadow-lg transition-all hover:scale-105`, "svelte-1j97rta")), append(e3, o3);
|
|
2267
2267
|
};
|
|
2268
2268
|
if_block(s2, (e3) => {
|
|
2269
|
-
|
|
2270
|
-
}), append(e2,
|
|
2269
|
+
o2() && e3(consequent);
|
|
2270
|
+
}), append(e2, i2), pop();
|
|
2271
2271
|
}
|
|
2272
2272
|
function cubic_out(e2) {
|
|
2273
2273
|
const t2 = e2 - 1;
|
|
@@ -2284,44 +2284,44 @@ function split_css_unit(e2) {
|
|
|
2284
2284
|
"px"
|
|
2285
2285
|
];
|
|
2286
2286
|
}
|
|
2287
|
-
function blur(e2, { delay: t2 = 0, duration: n2 = 400, easing:
|
|
2288
|
-
const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.filter ? "" : a2.filter, u2 = l2 * (1 - s2), [d2, f2] = split_css_unit(
|
|
2287
|
+
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), [d2, f2] = split_css_unit(i2);
|
|
2289
2289
|
return {
|
|
2290
2290
|
delay: t2,
|
|
2291
2291
|
duration: n2,
|
|
2292
|
-
easing:
|
|
2292
|
+
easing: o2,
|
|
2293
2293
|
css: (e3, t3) => `opacity: ${l2 - u2 * t3}; filter: ${c2} blur(${t3 * d2}${f2});`
|
|
2294
2294
|
};
|
|
2295
2295
|
}
|
|
2296
|
-
function fly(e2, { delay: t2 = 0, duration: n2 = 400, easing:
|
|
2297
|
-
const l2 = getComputedStyle(e2), c2 = +l2.opacity, u2 = "none" === l2.transform ? "" : l2.transform, d2 = c2 * (1 - a2), [f2, p2] = split_css_unit(
|
|
2296
|
+
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, d2 = c2 * (1 - a2), [f2, p2] = split_css_unit(i2), [_2, v2] = split_css_unit(s2);
|
|
2298
2298
|
return {
|
|
2299
2299
|
delay: t2,
|
|
2300
2300
|
duration: n2,
|
|
2301
|
-
easing:
|
|
2301
|
+
easing: o2,
|
|
2302
2302
|
css: (e3, t3) => `
|
|
2303
2303
|
transform: ${u2} translate(${(1 - e3) * f2}${p2}, ${(1 - e3) * _2}${v2});
|
|
2304
2304
|
opacity: ${c2 - d2 * t3}`
|
|
2305
2305
|
};
|
|
2306
2306
|
}
|
|
2307
|
-
function slide(e2, { delay: t2 = 0, duration: n2 = 400, easing:
|
|
2308
|
-
const s2 = getComputedStyle(e2), a2 = +s2.opacity, l2 = "y" ===
|
|
2307
|
+
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"], d2 = u2.map((e3) => (
|
|
2309
2309
|
/** @type {'Left' | 'Right' | 'Top' | 'Bottom'} */
|
|
2310
2310
|
`${e3[0].toUpperCase()}${e3.slice(1)}`
|
|
2311
2311
|
)), f2 = parseFloat(s2[`padding${d2[0]}`]), p2 = parseFloat(s2[`padding${d2[1]}`]), _2 = parseFloat(s2[`margin${d2[0]}`]), v2 = parseFloat(s2[`margin${d2[1]}`]), g2 = parseFloat(s2[`border${d2[0]}Width`]), h2 = parseFloat(s2[`border${d2[1]}Width`]);
|
|
2312
2312
|
return {
|
|
2313
2313
|
delay: t2,
|
|
2314
2314
|
duration: n2,
|
|
2315
|
-
easing:
|
|
2315
|
+
easing: o2,
|
|
2316
2316
|
css: (e3) => `overflow: hidden;opacity: ${Math.min(20 * e3, 1) * a2};${l2}: ${e3 * c2}px;padding-${u2[0]}: ${e3 * f2}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
2317
|
};
|
|
2318
2318
|
}
|
|
2319
|
-
function scale(e2, { delay: t2 = 0, duration: n2 = 400, easing:
|
|
2320
|
-
const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.transform ? "" : a2.transform, u2 = 1 -
|
|
2319
|
+
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, d2 = l2 * (1 - s2);
|
|
2321
2321
|
return {
|
|
2322
2322
|
delay: t2,
|
|
2323
2323
|
duration: n2,
|
|
2324
|
-
easing:
|
|
2324
|
+
easing: o2,
|
|
2325
2325
|
css: (e3, t3) => `
|
|
2326
2326
|
transform: ${c2} scale(${1 - u2 * t3});
|
|
2327
2327
|
opacity: ${l2 - d2 * t3}
|
|
@@ -2332,75 +2332,75 @@ delegate(["click"]);
|
|
|
2332
2332
|
var we = /* @__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>'), xe = /* @__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>'), ke = /* @__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>'), Ce = /* @__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
2333
|
function Icon(e2, t2) {
|
|
2334
2334
|
let n2 = prop(t2, "type", 8, "success");
|
|
2335
|
-
var
|
|
2335
|
+
var o2 = comment(), i2 = first_child(o2), consequent = (e3) => {
|
|
2336
2336
|
append(e3, we());
|
|
2337
2337
|
}, alternate_3 = (e3) => {
|
|
2338
|
-
var t3 = comment(),
|
|
2338
|
+
var t3 = comment(), o3 = first_child(t3), consequent_1 = (e4) => {
|
|
2339
2339
|
append(e4, xe());
|
|
2340
2340
|
}, alternate_2 = (e4) => {
|
|
2341
|
-
var t4 = comment(),
|
|
2341
|
+
var t4 = comment(), o4 = first_child(t4), consequent_2 = (e5) => {
|
|
2342
2342
|
append(e5, ke());
|
|
2343
2343
|
}, alternate_1 = (e5) => {
|
|
2344
|
-
var t5 = comment(),
|
|
2344
|
+
var t5 = comment(), o5 = first_child(t5), consequent_3 = (e6) => {
|
|
2345
2345
|
append(e6, Ce());
|
|
2346
2346
|
}, alternate = (e6) => {
|
|
2347
2347
|
};
|
|
2348
|
-
if_block(
|
|
2348
|
+
if_block(o5, (e6) => {
|
|
2349
2349
|
"warning" === n2() ? e6(consequent_3) : e6(alternate, false);
|
|
2350
2350
|
}, true), append(e5, t5);
|
|
2351
2351
|
};
|
|
2352
|
-
if_block(
|
|
2352
|
+
if_block(o4, (e5) => {
|
|
2353
2353
|
"info" === n2() ? e5(consequent_2) : e5(alternate_1, false);
|
|
2354
2354
|
}, true), append(e4, t4);
|
|
2355
2355
|
};
|
|
2356
|
-
if_block(
|
|
2356
|
+
if_block(o3, (e4) => {
|
|
2357
2357
|
"error" === n2() ? e4(consequent_1) : e4(alternate_2, false);
|
|
2358
2358
|
}, true), append(e3, t3);
|
|
2359
2359
|
};
|
|
2360
|
-
if_block(
|
|
2360
|
+
if_block(i2, (e3) => {
|
|
2361
2361
|
"success" === n2() ? e3(consequent) : e3(alternate_3, false);
|
|
2362
|
-
}), append(e2,
|
|
2362
|
+
}), append(e2, o2);
|
|
2363
2363
|
}
|
|
2364
2364
|
var Me = /* @__PURE__ */ template('<div class="sonner-loading-bar"></div>'), Se = /* @__PURE__ */ template('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');
|
|
2365
2365
|
function Loader(e2, t2) {
|
|
2366
2366
|
push(t2, false);
|
|
2367
2367
|
let n2 = prop(t2, "visible", 8);
|
|
2368
|
-
const
|
|
2368
|
+
const o2 = Array(12).fill(0);
|
|
2369
2369
|
init();
|
|
2370
|
-
var
|
|
2371
|
-
each(child(
|
|
2370
|
+
var i2 = Se();
|
|
2371
|
+
each(child(i2), 5, () => o2, index, (e3, t3) => {
|
|
2372
2372
|
append(e3, Me());
|
|
2373
|
-
}), template_effect(() => set_attribute(
|
|
2373
|
+
}), template_effect(() => set_attribute(i2, "data-visible", n2())), append(e2, i2), pop();
|
|
2374
2374
|
}
|
|
2375
2375
|
function cn(...e2) {
|
|
2376
2376
|
return e2.filter(Boolean).join(" ");
|
|
2377
2377
|
}
|
|
2378
|
-
const
|
|
2378
|
+
const Ie = "undefined" != typeof document;
|
|
2379
2379
|
function clientWritable(e2) {
|
|
2380
2380
|
const t2 = writable(e2);
|
|
2381
2381
|
return {
|
|
2382
2382
|
subscribe: t2.subscribe,
|
|
2383
2383
|
set: function set2(e3) {
|
|
2384
|
-
|
|
2384
|
+
Ie && t2.set(e3);
|
|
2385
2385
|
},
|
|
2386
2386
|
update: function update2(e3) {
|
|
2387
|
-
|
|
2387
|
+
Ie && t2.update(e3);
|
|
2388
2388
|
}
|
|
2389
2389
|
};
|
|
2390
2390
|
}
|
|
2391
|
-
let
|
|
2392
|
-
const
|
|
2391
|
+
let Te = 0;
|
|
2392
|
+
const qe = function createToastState() {
|
|
2393
2393
|
const e2 = clientWritable([]), t2 = clientWritable([]);
|
|
2394
2394
|
function addToast(t3) {
|
|
2395
2395
|
e2.update((e3) => [t3, ...e3]);
|
|
2396
2396
|
}
|
|
2397
2397
|
function create(t3) {
|
|
2398
2398
|
var _a;
|
|
2399
|
-
const { message: n2, ...
|
|
2400
|
-
return l2 ? e2.update((e3) => e3.map((e4) => e4.id ===
|
|
2399
|
+
const { message: n2, ...o2 } = t3, i2 = "number" == typeof (t3 == null ? void 0 : t3.id) || t3.id && ((_a = t3.id) == null ? void 0 : _a.length) > 0 ? t3.id : Te++, s2 = void 0 === t3.dismissable || t3.dismissable, a2 = void 0 === t3.type ? "default" : t3.type, l2 = get(e2).find((e3) => e3.id === i2);
|
|
2400
|
+
return l2 ? e2.update((e3) => e3.map((e4) => e4.id === i2 ? {
|
|
2401
2401
|
...e4,
|
|
2402
2402
|
...t3,
|
|
2403
|
-
id:
|
|
2403
|
+
id: i2,
|
|
2404
2404
|
title: n2,
|
|
2405
2405
|
dismissable: s2,
|
|
2406
2406
|
type: a2,
|
|
@@ -2409,12 +2409,12 @@ const Ie = function createToastState() {
|
|
|
2409
2409
|
...e4,
|
|
2410
2410
|
updated: false
|
|
2411
2411
|
})) : addToast({
|
|
2412
|
-
...
|
|
2413
|
-
id:
|
|
2412
|
+
...o2,
|
|
2413
|
+
id: i2,
|
|
2414
2414
|
title: n2,
|
|
2415
2415
|
dismissable: s2,
|
|
2416
2416
|
type: a2
|
|
2417
|
-
}),
|
|
2417
|
+
}), i2;
|
|
2418
2418
|
}
|
|
2419
2419
|
function dismiss(t3) {
|
|
2420
2420
|
if (void 0 !== t3) return e2.update((e3) => e3.map((e4) => e4.id === t3 ? {
|
|
@@ -2487,53 +2487,53 @@ const Ie = function createToastState() {
|
|
|
2487
2487
|
type: "loading",
|
|
2488
2488
|
message: t3.loading
|
|
2489
2489
|
}));
|
|
2490
|
-
const
|
|
2491
|
-
let
|
|
2492
|
-
return
|
|
2490
|
+
const o2 = e3 instanceof Promise ? e3 : e3();
|
|
2491
|
+
let i2 = void 0 !== n2;
|
|
2492
|
+
return o2.then((e4) => {
|
|
2493
2493
|
if (e4 && "boolean" == typeof e4.ok && !e4.ok) {
|
|
2494
|
-
|
|
2495
|
-
const
|
|
2494
|
+
i2 = false;
|
|
2495
|
+
const o3 = "function" == typeof t3.error ? (
|
|
2496
2496
|
// @ts-expect-error: Incorrect response type
|
|
2497
2497
|
t3.error(`HTTP error! status: ${e4.status}`)
|
|
2498
2498
|
) : t3.error;
|
|
2499
2499
|
create({
|
|
2500
2500
|
id: n2,
|
|
2501
2501
|
type: "error",
|
|
2502
|
-
message:
|
|
2502
|
+
message: o3
|
|
2503
2503
|
});
|
|
2504
2504
|
} else if (void 0 !== t3.success) {
|
|
2505
|
-
|
|
2506
|
-
const
|
|
2505
|
+
i2 = false;
|
|
2506
|
+
const o3 = (
|
|
2507
2507
|
// @ts-expect-error: TODO: Better function checking
|
|
2508
2508
|
"function" == typeof t3.success ? t3.success(e4) : t3.success
|
|
2509
2509
|
);
|
|
2510
2510
|
create({
|
|
2511
2511
|
id: n2,
|
|
2512
2512
|
type: "success",
|
|
2513
|
-
message:
|
|
2513
|
+
message: o3
|
|
2514
2514
|
});
|
|
2515
2515
|
}
|
|
2516
2516
|
}).catch((e4) => {
|
|
2517
2517
|
if (void 0 !== t3.error) {
|
|
2518
|
-
|
|
2519
|
-
const
|
|
2518
|
+
i2 = false;
|
|
2519
|
+
const o3 = (
|
|
2520
2520
|
// @ts-expect-error: TODO: Better function checking
|
|
2521
2521
|
"function" == typeof t3.error ? t3.error(e4) : t3.error
|
|
2522
2522
|
);
|
|
2523
2523
|
create({
|
|
2524
2524
|
id: n2,
|
|
2525
2525
|
type: "error",
|
|
2526
|
-
message:
|
|
2526
|
+
message: o3
|
|
2527
2527
|
});
|
|
2528
2528
|
}
|
|
2529
2529
|
}).finally(() => {
|
|
2530
2530
|
var _a;
|
|
2531
|
-
|
|
2531
|
+
i2 && // Toast is still in load state (and will be indefinitely — dismiss it)
|
|
2532
2532
|
(dismiss(n2), n2 = void 0), (_a = t3.finally) == null ? void 0 : _a.call(t3);
|
|
2533
2533
|
}), n2;
|
|
2534
2534
|
},
|
|
2535
2535
|
custom: function custom(e3, t3) {
|
|
2536
|
-
const n2 = (t3 == null ? void 0 : t3.id) ||
|
|
2536
|
+
const n2 = (t3 == null ? void 0 : t3.id) || Te++;
|
|
2537
2537
|
return create({
|
|
2538
2538
|
component: e3,
|
|
2539
2539
|
id: n2,
|
|
@@ -2555,26 +2555,26 @@ const Ie = function createToastState() {
|
|
|
2555
2555
|
};
|
|
2556
2556
|
}();
|
|
2557
2557
|
const Pe = function toastFunction(e2, t2) {
|
|
2558
|
-
return
|
|
2558
|
+
return qe.create({
|
|
2559
2559
|
message: e2,
|
|
2560
2560
|
...t2
|
|
2561
2561
|
});
|
|
2562
2562
|
}, Oe = Object.assign(Pe, {
|
|
2563
|
-
success:
|
|
2564
|
-
info:
|
|
2565
|
-
warning:
|
|
2566
|
-
error:
|
|
2567
|
-
custom:
|
|
2568
|
-
message:
|
|
2569
|
-
promise:
|
|
2570
|
-
dismiss:
|
|
2571
|
-
loading:
|
|
2563
|
+
success: qe.success,
|
|
2564
|
+
info: qe.info,
|
|
2565
|
+
warning: qe.warning,
|
|
2566
|
+
error: qe.error,
|
|
2567
|
+
custom: qe.custom,
|
|
2568
|
+
message: qe.message,
|
|
2569
|
+
promise: qe.promise,
|
|
2570
|
+
dismiss: qe.dismiss,
|
|
2571
|
+
loading: qe.loading
|
|
2572
2572
|
});
|
|
2573
2573
|
var Ee = /* @__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>'), je = /* @__PURE__ */ template('<div data-icon=""><!> <!></div>'), Ne = /* @__PURE__ */ template('<div data-title=""><!></div>'), Be = /* @__PURE__ */ template('<div data-description=""><!></div>'), ze = /* @__PURE__ */ template('<button data-button="" data-cancel=""> </button>'), De = /* @__PURE__ */ template('<button data-button=""> </button>'), Ae = /* @__PURE__ */ template('<!> <div data-content=""><!> <!></div> <!> <!>', 1), Le = /* @__PURE__ */ template('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');
|
|
2574
2574
|
function Toast(e2, t2) {
|
|
2575
2575
|
const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]);
|
|
2576
2576
|
push(t2, false);
|
|
2577
|
-
const [
|
|
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), d2 = mutable_state(void 0, true), f2 = 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
2578
|
toast: "",
|
|
2579
2579
|
title: "",
|
|
2580
2580
|
description: "",
|
|
@@ -2589,8 +2589,8 @@ function Toast(e2, t2) {
|
|
|
2589
2589
|
default: "",
|
|
2590
2590
|
info: "",
|
|
2591
2591
|
loading: ""
|
|
2592
|
-
}, { toasts: b2, heights: y2, removeHeight: $2, setHeight: w2, remove: x2 } =
|
|
2593
|
-
let k2 = prop(t2, "toast", 9), C2 = prop(t2, "index", 9), M2 = prop(t2, "expanded", 9), S2 = prop(t2, "invert", 13),
|
|
2592
|
+
}, { toasts: b2, heights: y2, removeHeight: $2, setHeight: w2, remove: x2 } = qe;
|
|
2593
|
+
let k2 = prop(t2, "toast", 9), C2 = prop(t2, "index", 9), M2 = prop(t2, "expanded", 9), S2 = prop(t2, "invert", 13), I2 = prop(t2, "position", 9), T2 = prop(t2, "visibleToasts", 9), q2 = prop(t2, "expandByDefault", 9), P2 = prop(t2, "closeButton", 9), O2 = prop(t2, "interacting", 9), E2 = prop(t2, "cancelButtonStyle", 9, ""), j2 = prop(t2, "actionButtonStyle", 9, ""), N2 = prop(t2, "duration", 9, 4e3), B2 = prop(t2, "descriptionClass", 9, ""), z2 = prop(t2, "classes", 29, () => ({})), D2 = prop(t2, "unstyled", 9, false), A2 = mutable_state(false, true), L2 = mutable_state(false, true), W2 = 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
2594
|
function deleteToast() {
|
|
2595
2595
|
set(L2, true), // Save the offset for the exit swipe animation
|
|
2596
2596
|
set(G2, get$1(V2)), $2(k2().id), setTimeout(() => {
|
|
@@ -2620,8 +2620,8 @@ function Toast(e2, t2) {
|
|
|
2620
2620
|
});
|
|
2621
2621
|
}), legacy_pre_effect(() => deep_read_state(C2()), () => {
|
|
2622
2622
|
set(s2, 0 === C2());
|
|
2623
|
-
}), legacy_pre_effect(() => (deep_read_state(C2()), deep_read_state(
|
|
2624
|
-
set(a2, C2() + 1 <=
|
|
2623
|
+
}), legacy_pre_effect(() => (deep_read_state(C2()), deep_read_state(T2())), () => {
|
|
2624
|
+
set(a2, C2() + 1 <= T2());
|
|
2625
2625
|
}), legacy_pre_effect(() => deep_read_state(k2()), () => {
|
|
2626
2626
|
set(l2, k2().title);
|
|
2627
2627
|
}), legacy_pre_effect(() => deep_read_state(k2()), () => {
|
|
@@ -2634,8 +2634,8 @@ function Toast(e2, t2) {
|
|
|
2634
2634
|
set(f2, k2().descriptionClass || "");
|
|
2635
2635
|
}), legacy_pre_effect(() => ($heights(), deep_read_state(k2())), () => {
|
|
2636
2636
|
set(p2, $heights().findIndex((e3) => e3.toastId === k2().id) || 0);
|
|
2637
|
-
}), legacy_pre_effect(() => deep_read_state(
|
|
2638
|
-
set(_2,
|
|
2637
|
+
}), legacy_pre_effect(() => deep_read_state(I2()), () => {
|
|
2638
|
+
set(_2, I2().split("-"));
|
|
2639
2639
|
}), legacy_pre_effect(() => ($heights(), get$1(p2)), () => {
|
|
2640
2640
|
set(v2, $heights().reduce((e3, t3, n3) => (
|
|
2641
2641
|
// Calculate offset up untill current toast
|
|
@@ -2652,13 +2652,13 @@ function Toast(e2, t2) {
|
|
|
2652
2652
|
async function updateHeights() {
|
|
2653
2653
|
if (!get$1(A2)) return;
|
|
2654
2654
|
let e3;
|
|
2655
|
-
await tick(), e3 = M2() ||
|
|
2656
|
-
const t3 = get$1(R2).offsetHeight, n3 = get$1(R2).getBoundingClientRect().height,
|
|
2657
|
-
let
|
|
2655
|
+
await tick(), e3 = M2() || q2() ? 1 : 1 - 0.05 * C2(), get$1(R2).style.setProperty("height", "auto");
|
|
2656
|
+
const t3 = get$1(R2).offsetHeight, n3 = get$1(R2).getBoundingClientRect().height, o3 = Math.round(100 * (n3 / e3 + Number.EPSILON)) / 100;
|
|
2657
|
+
let i3;
|
|
2658
2658
|
get$1(R2).style.removeProperty("height"), // Use scaledRectHeight as it's more precise
|
|
2659
|
-
|
|
2659
|
+
i3 = Math.abs(o3 - t3) < 1 ? o3 : t3, set(H2, i3), w2({
|
|
2660
2660
|
toastId: k2().id,
|
|
2661
|
-
height:
|
|
2661
|
+
height: i3
|
|
2662
2662
|
});
|
|
2663
2663
|
}();
|
|
2664
2664
|
}), legacy_pre_effect(() => (deep_read_state(k2()), get$1(Y2), deep_read_state(N2())), () => {
|
|
@@ -2671,9 +2671,9 @@ function Toast(e2, t2) {
|
|
|
2671
2671
|
}), legacy_pre_effect(() => (get$1(h2), deep_read_state(M2()), deep_read_state(O2()), get$1(Y2)), () => {
|
|
2672
2672
|
var e3;
|
|
2673
2673
|
!function store_unsub(e4, t3, n3) {
|
|
2674
|
-
let
|
|
2675
|
-
return
|
|
2676
|
-
(
|
|
2674
|
+
let o3 = n3[t3];
|
|
2675
|
+
return o3 && o3.store !== e4 && // Don't reset store yet, so that store_get above can resubscribe to new store if necessary
|
|
2676
|
+
(o3.unsubscribe(), o3.unsubscribe = noop), e4;
|
|
2677
2677
|
}(set(Q2, (e3 = () => (get$1(h2) || (M2() || O2() ? (
|
|
2678
2678
|
// If toast's duration changes, it will be out of sync with the
|
|
2679
2679
|
// remainingAtTimeout, so we know we need to restart the timer
|
|
@@ -2688,7 +2688,7 @@ function Toast(e2, t2) {
|
|
|
2688
2688
|
}()
|
|
2689
2689
|
) : startTimer()), () => clearTimeout(get$1(Y2))), {
|
|
2690
2690
|
subscribe: e3
|
|
2691
|
-
})), "$effect",
|
|
2691
|
+
})), "$effect", o2);
|
|
2692
2692
|
}), legacy_pre_effect(() => $effect(), () => {
|
|
2693
2693
|
$effect();
|
|
2694
2694
|
}), legacy_pre_effect(() => deep_read_state(k2()), () => {
|
|
@@ -2724,60 +2724,60 @@ function Toast(e2, t2) {
|
|
|
2724
2724
|
}));
|
|
2725
2725
|
}), append(e3, t3);
|
|
2726
2726
|
}, alternate_6 = (e3) => {
|
|
2727
|
-
var n3 = Ae(),
|
|
2728
|
-
var n4 = je(),
|
|
2727
|
+
var n3 = Ae(), o3 = first_child(n3), consequent_8 = (e4) => {
|
|
2728
|
+
var n4 = je(), o4 = child(n4), consequent_2 = (e5) => {
|
|
2729
2729
|
var n5 = comment();
|
|
2730
2730
|
slot(first_child(n5), t2, "loading-icon", {}, null), append(e5, n5);
|
|
2731
2731
|
};
|
|
2732
|
-
if_block(
|
|
2732
|
+
if_block(o4, (e5) => {
|
|
2733
2733
|
!k2().promise && "loading" !== get$1(u2) || k2().icon || e5(consequent_2);
|
|
2734
2734
|
});
|
|
2735
|
-
var
|
|
2735
|
+
var i4 = sibling(o4, 2), consequent_3 = (e5) => {
|
|
2736
2736
|
var t3 = comment();
|
|
2737
2737
|
component(first_child(t3), () => k2().icon, (e6, t4) => {
|
|
2738
2738
|
t4(e6, {});
|
|
2739
2739
|
}), append(e5, t3);
|
|
2740
2740
|
}, alternate_3 = (e5) => {
|
|
2741
|
-
var n5 = comment(),
|
|
2741
|
+
var n5 = comment(), o5 = first_child(n5), consequent_4 = (e6) => {
|
|
2742
2742
|
var n6 = comment();
|
|
2743
2743
|
slot(first_child(n6), t2, "success-icon", {}, null), append(e6, n6);
|
|
2744
2744
|
}, alternate_2 = (e6) => {
|
|
2745
|
-
var n6 = comment(),
|
|
2745
|
+
var n6 = comment(), o6 = first_child(n6), consequent_5 = (e7) => {
|
|
2746
2746
|
var n7 = comment();
|
|
2747
2747
|
slot(first_child(n7), t2, "error-icon", {}, null), append(e7, n7);
|
|
2748
2748
|
}, alternate_1 = (e7) => {
|
|
2749
|
-
var n7 = comment(),
|
|
2749
|
+
var n7 = comment(), o7 = first_child(n7), consequent_6 = (e8) => {
|
|
2750
2750
|
var n8 = comment();
|
|
2751
2751
|
slot(first_child(n8), t2, "warning-icon", {}, null), append(e8, n8);
|
|
2752
2752
|
}, alternate = (e8) => {
|
|
2753
|
-
var n8 = comment(),
|
|
2753
|
+
var n8 = comment(), o8 = first_child(n8), consequent_7 = (e9) => {
|
|
2754
2754
|
var n9 = comment();
|
|
2755
2755
|
slot(first_child(n9), t2, "info-icon", {}, null), append(e9, n9);
|
|
2756
2756
|
};
|
|
2757
|
-
if_block(
|
|
2757
|
+
if_block(o8, (e9) => {
|
|
2758
2758
|
"info" === get$1(u2) && e9(consequent_7);
|
|
2759
2759
|
}, true), append(e8, n8);
|
|
2760
2760
|
};
|
|
2761
|
-
if_block(
|
|
2761
|
+
if_block(o7, (e8) => {
|
|
2762
2762
|
"warning" === get$1(u2) ? e8(consequent_6) : e8(alternate, false);
|
|
2763
2763
|
}, true), append(e7, n7);
|
|
2764
2764
|
};
|
|
2765
|
-
if_block(
|
|
2765
|
+
if_block(o6, (e7) => {
|
|
2766
2766
|
"error" === get$1(u2) ? e7(consequent_5) : e7(alternate_1, false);
|
|
2767
2767
|
}, true), append(e6, n6);
|
|
2768
2768
|
};
|
|
2769
|
-
if_block(
|
|
2769
|
+
if_block(o5, (e6) => {
|
|
2770
2770
|
"success" === get$1(u2) ? e6(consequent_4) : e6(alternate_2, false);
|
|
2771
2771
|
}, true), append(e5, n5);
|
|
2772
2772
|
};
|
|
2773
|
-
if_block(
|
|
2773
|
+
if_block(i4, (e5) => {
|
|
2774
2774
|
k2().icon ? e5(consequent_3) : e5(alternate_3, false);
|
|
2775
2775
|
}), append(e4, n4);
|
|
2776
2776
|
};
|
|
2777
|
-
if_block(
|
|
2777
|
+
if_block(o3, (e4) => {
|
|
2778
2778
|
("default" !== get$1(u2) || k2().icon || k2().promise) && e4(consequent_8);
|
|
2779
2779
|
});
|
|
2780
|
-
var
|
|
2780
|
+
var i3 = sibling(o3, 2), s3 = child(i3), consequent_10 = (e4) => {
|
|
2781
2781
|
var t3 = Ne(), n4 = child(t3), consequent_9 = (e5) => {
|
|
2782
2782
|
var t4 = comment();
|
|
2783
2783
|
component(first_child(t4), () => k2().title, (e6, t5) => {
|
|
@@ -2817,7 +2817,7 @@ function Toast(e2, t2) {
|
|
|
2817
2817
|
if_block(a3, (e4) => {
|
|
2818
2818
|
k2().description && e4(consequent_12);
|
|
2819
2819
|
});
|
|
2820
|
-
var l3 = sibling(
|
|
2820
|
+
var l3 = sibling(i3, 2), consequent_13 = (e4) => {
|
|
2821
2821
|
var t3 = ze(), n4 = child(t3);
|
|
2822
2822
|
template_effect((e5) => {
|
|
2823
2823
|
set_attribute(t3, "style", E2()), set_class(t3, 1, clsx(e5)), set_text(n4, k2().cancel.label);
|
|
@@ -2850,13 +2850,13 @@ function Toast(e2, t2) {
|
|
|
2850
2850
|
};
|
|
2851
2851
|
if_block(ne2, (e3) => {
|
|
2852
2852
|
k2().component ? e3(consequent_1) : e3(alternate_6, false);
|
|
2853
|
-
}), bind_this(ee2, (e3) => set(R2, e3), () => get$1(R2)), template_effect((e3, t3,
|
|
2853
|
+
}), bind_this(ee2, (e3) => set(R2, e3), () => get$1(R2)), template_effect((e3, t3, i3) => {
|
|
2854
2854
|
var _a;
|
|
2855
|
-
set_attribute(ee2, "aria-live", k2().important ? "assertive" : "polite"), set_class(ee2, 1, clsx(e3)), set_attribute(ee2, "data-styled", !(k2().component || ((_a = k2()) == null ? void 0 : _a.unstyled) || D2())), set_attribute(ee2, "data-mounted", get$1(A2)), set_attribute(ee2, "data-promise", t3), set_attribute(ee2, "data-removed", get$1(L2)), 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(W2)), set_attribute(ee2, "data-type", get$1(u2)), set_attribute(ee2, "data-invert", S2()), set_attribute(ee2, "data-swipe-out", get$1(F2)), set_attribute(ee2, "data-expanded",
|
|
2855
|
+
set_attribute(ee2, "aria-live", k2().important ? "assertive" : "polite"), set_class(ee2, 1, clsx(e3)), set_attribute(ee2, "data-styled", !(k2().component || ((_a = k2()) == null ? void 0 : _a.unstyled) || D2())), set_attribute(ee2, "data-mounted", get$1(A2)), set_attribute(ee2, "data-promise", t3), set_attribute(ee2, "data-removed", get$1(L2)), 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(W2)), set_attribute(ee2, "data-type", get$1(u2)), set_attribute(ee2, "data-invert", S2()), set_attribute(ee2, "data-swipe-out", get$1(F2)), set_attribute(ee2, "data-expanded", i3), set_attribute(ee2, "style", `${n2.style} ${k2().style}`), set_style(ee2, "--index", C2()), set_style(ee2, "--toasts-before", C2()), set_style(ee2, "--z-index", store_get(b2, "$toasts", o2).length - C2()), set_style(ee2, "--offset", `${get$1(L2) ? get$1(G2) : get$1(V2)}px`), set_style(ee2, "--initial-height", `${get$1(H2)}px`);
|
|
2856
2856
|
}, [() => {
|
|
2857
2857
|
var _a, _b, _c, _d, _e2, _f;
|
|
2858
2858
|
return cn(n2.class, get$1(d2), (_a = z2()) == null ? void 0 : _a.toast, (_c = (_b = k2()) == null ? void 0 : _b.classes) == null ? void 0 : _c.toast, (_d = z2()) == null ? void 0 : _d[get$1(u2)], (_f = (_e2 = k2()) == null ? void 0 : _e2.classes) == null ? void 0 : _f[get$1(u2)]);
|
|
2859
|
-
}, () => Boolean(k2().promise), () => Boolean(M2() ||
|
|
2859
|
+
}, () => Boolean(k2().promise), () => Boolean(M2() || q2() && get$1(A2))], derived_safe_equal), event("pointerdown", ee2, function onPointerDown(e3) {
|
|
2860
2860
|
if (get$1(g2)) return;
|
|
2861
2861
|
set(G2, get$1(V2));
|
|
2862
2862
|
const t3 = e3.target;
|
|
@@ -2873,17 +2873,17 @@ function Toast(e2, t2) {
|
|
|
2873
2873
|
get$1(R2).style.setProperty("--swipe-amount", "0px"), set(W2, false);
|
|
2874
2874
|
}), event("pointermove", ee2, function onPointerMove(e3) {
|
|
2875
2875
|
if (!Z2) return;
|
|
2876
|
-
const t3 = e3.clientY - Z2.y, n3 = e3.clientX - Z2.x,
|
|
2877
|
-
Math.abs(
|
|
2876
|
+
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;
|
|
2877
|
+
Math.abs(o3) > i3 ? get$1(R2).style.setProperty("--swipe-amount", `${t3}px`) : Math.abs(n3) > i3 && // User is swiping in wrong direction so we disable swipe gesture
|
|
2878
2878
|
// for the current pointer down interaction
|
|
2879
2879
|
(Z2 = null);
|
|
2880
|
-
}), append(e2, ee2), pop(),
|
|
2880
|
+
}), append(e2, ee2), pop(), i2();
|
|
2881
2881
|
}
|
|
2882
2882
|
var We = /* @__PURE__ */ template("<ol></ol>"), Fe = /* @__PURE__ */ template('<section class="svelte-1fo5d1m"></section>');
|
|
2883
2883
|
function Toaster(e2, t2) {
|
|
2884
|
-
const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]),
|
|
2884
|
+
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
2885
|
push(t2, false);
|
|
2886
|
-
const [
|
|
2886
|
+
const [i2, s2] = setup_stores(), $toasts = () => store_get(k2, "$toasts", i2), a2 = mutable_state(), l2 = mutable_state(), c2 = "dark", u2 = "light";
|
|
2887
2887
|
function getDocumentDirection() {
|
|
2888
2888
|
if ("undefined" == typeof window) return "ltr";
|
|
2889
2889
|
if ("undefined" == typeof document) return "ltr";
|
|
@@ -2891,8 +2891,8 @@ function Toaster(e2, t2) {
|
|
|
2891
2891
|
return "auto" !== e3 && e3 ? e3 : window.getComputedStyle(document.documentElement).direction;
|
|
2892
2892
|
}
|
|
2893
2893
|
let d2 = prop(t2, "invert", 8, false), f2 = 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);
|
|
2894
|
-
const { toasts: k2, heights: C2, reset: M2 } =
|
|
2895
|
-
let S2 = mutable_state(false),
|
|
2894
|
+
const { toasts: k2, heights: C2, reset: M2 } = qe;
|
|
2895
|
+
let S2 = mutable_state(false), T2 = mutable_state(false), q2 = mutable_state(function getInitialTheme(e3) {
|
|
2896
2896
|
return "system" !== e3 ? e3 : "undefined" != typeof window && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? c2 : u2;
|
|
2897
2897
|
}(f2())), P2 = mutable_state(), O2 = null, E2 = false;
|
|
2898
2898
|
function handleBlur(e3) {
|
|
@@ -2904,7 +2904,7 @@ function Toaster(e2, t2) {
|
|
|
2904
2904
|
E2 || (E2 = true, O2 = e3.relatedTarget);
|
|
2905
2905
|
}
|
|
2906
2906
|
!function onDestroy(e3) {
|
|
2907
|
-
null ===
|
|
2907
|
+
null === I && lifecycle_outside_component(), onMount(() => () => untrack(e3));
|
|
2908
2908
|
}(() => {
|
|
2909
2909
|
get$1(P2) && O2 && (O2.focus({
|
|
2910
2910
|
preventScroll: true
|
|
@@ -2937,17 +2937,17 @@ function Toaster(e2, t2) {
|
|
|
2937
2937
|
k2.set(t3);
|
|
2938
2938
|
}
|
|
2939
2939
|
}), legacy_pre_effect(() => deep_read_state(f2()), () => {
|
|
2940
|
-
if ("system" !== f2() && set(
|
|
2940
|
+
if ("system" !== f2() && set(q2, f2()), "undefined" != typeof window) {
|
|
2941
2941
|
"system" === f2() && // check if current preference is dark
|
|
2942
2942
|
(window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? (
|
|
2943
2943
|
// it's currently dark
|
|
2944
|
-
set(
|
|
2944
|
+
set(q2, c2)
|
|
2945
2945
|
) : (
|
|
2946
2946
|
// it's not dark
|
|
2947
|
-
set(
|
|
2947
|
+
set(q2, u2)
|
|
2948
2948
|
));
|
|
2949
2949
|
const e3 = window.matchMedia("(prefers-color-scheme: dark)"), changeHandler = ({ matches: e4 }) => {
|
|
2950
|
-
set(
|
|
2950
|
+
set(q2, e4 ? c2 : u2);
|
|
2951
2951
|
};
|
|
2952
2952
|
"addEventListener" in e3 ? e3.addEventListener("change", changeHandler) : (
|
|
2953
2953
|
// @ts-expect-error deprecated API
|
|
@@ -2960,7 +2960,7 @@ function Toaster(e2, t2) {
|
|
|
2960
2960
|
set_attribute(s3, "tabindex", -1), each(s3, 5, () => get$1(a2), index, (e4, s4, a3, l3) => {
|
|
2961
2961
|
var c3 = We();
|
|
2962
2962
|
let u3;
|
|
2963
|
-
each(c3, 7, () => $toasts().filter((e5) => !e5.position && 0 === a3 || e5.position === get$1(s4)), (e5) => e5.id, (e5, n3,
|
|
2963
|
+
each(c3, 7, () => $toasts().filter((e5) => !e5.position && 0 === a3 || e5.position === get$1(s4)), (e5) => e5.id, (e5, n3, o3, i3) => {
|
|
2964
2964
|
const a4 = /* @__PURE__ */ derived_safe_equal(() => {
|
|
2965
2965
|
var _a;
|
|
2966
2966
|
return ((_a = $2()) == null ? void 0 : _a.actionButtonStyle) || "";
|
|
@@ -2979,7 +2979,7 @@ function Toaster(e2, t2) {
|
|
|
2979
2979
|
}), _3 = /* @__PURE__ */ derived_safe_equal(() => $2().unstyled || false);
|
|
2980
2980
|
Toast(e5, {
|
|
2981
2981
|
get index() {
|
|
2982
|
-
return get$1(
|
|
2982
|
+
return get$1(o3);
|
|
2983
2983
|
},
|
|
2984
2984
|
get toast() {
|
|
2985
2985
|
return get$1(n3);
|
|
@@ -2994,7 +2994,7 @@ function Toaster(e2, t2) {
|
|
|
2994
2994
|
return y2();
|
|
2995
2995
|
},
|
|
2996
2996
|
get interacting() {
|
|
2997
|
-
return get$1(
|
|
2997
|
+
return get$1(T2);
|
|
2998
2998
|
},
|
|
2999
2999
|
get position() {
|
|
3000
3000
|
return get$1(s4);
|
|
@@ -3027,48 +3027,48 @@ function Toaster(e2, t2) {
|
|
|
3027
3027
|
return get$1(_3);
|
|
3028
3028
|
},
|
|
3029
3029
|
$$slots: {
|
|
3030
|
-
"loading-icon": (e6,
|
|
3031
|
-
var
|
|
3032
|
-
slot(first_child(
|
|
3030
|
+
"loading-icon": (e6, o4) => {
|
|
3031
|
+
var i4 = comment();
|
|
3032
|
+
slot(first_child(i4), t2, "loading-icon", {}, (e7) => {
|
|
3033
3033
|
const t3 = /* @__PURE__ */ derived_safe_equal(() => "loading" === get$1(n3).type);
|
|
3034
3034
|
Loader(e7, {
|
|
3035
3035
|
get visible() {
|
|
3036
3036
|
return get$1(t3);
|
|
3037
3037
|
}
|
|
3038
3038
|
});
|
|
3039
|
-
}), append(e6,
|
|
3039
|
+
}), append(e6, i4);
|
|
3040
3040
|
},
|
|
3041
3041
|
"success-icon": (e6, n4) => {
|
|
3042
|
-
var
|
|
3043
|
-
slot(first_child(
|
|
3042
|
+
var o4 = comment();
|
|
3043
|
+
slot(first_child(o4), t2, "success-icon", {}, (e7) => {
|
|
3044
3044
|
Icon(e7, {
|
|
3045
3045
|
type: "success"
|
|
3046
3046
|
});
|
|
3047
|
-
}), append(e6,
|
|
3047
|
+
}), append(e6, o4);
|
|
3048
3048
|
},
|
|
3049
3049
|
"error-icon": (e6, n4) => {
|
|
3050
|
-
var
|
|
3051
|
-
slot(first_child(
|
|
3050
|
+
var o4 = comment();
|
|
3051
|
+
slot(first_child(o4), t2, "error-icon", {}, (e7) => {
|
|
3052
3052
|
Icon(e7, {
|
|
3053
3053
|
type: "error"
|
|
3054
3054
|
});
|
|
3055
|
-
}), append(e6,
|
|
3055
|
+
}), append(e6, o4);
|
|
3056
3056
|
},
|
|
3057
3057
|
"warning-icon": (e6, n4) => {
|
|
3058
|
-
var
|
|
3059
|
-
slot(first_child(
|
|
3058
|
+
var o4 = comment();
|
|
3059
|
+
slot(first_child(o4), t2, "warning-icon", {}, (e7) => {
|
|
3060
3060
|
Icon(e7, {
|
|
3061
3061
|
type: "warning"
|
|
3062
3062
|
});
|
|
3063
|
-
}), append(e6,
|
|
3063
|
+
}), append(e6, o4);
|
|
3064
3064
|
},
|
|
3065
3065
|
"info-icon": (e6, n4) => {
|
|
3066
|
-
var
|
|
3067
|
-
slot(first_child(
|
|
3066
|
+
var o4 = comment();
|
|
3067
|
+
slot(first_child(o4), t2, "info-icon", {}, (e7) => {
|
|
3068
3068
|
Icon(e7, {
|
|
3069
3069
|
type: "info"
|
|
3070
3070
|
});
|
|
3071
|
-
}), append(e6,
|
|
3071
|
+
}), append(e6, o4);
|
|
3072
3072
|
}
|
|
3073
3073
|
}
|
|
3074
3074
|
});
|
|
@@ -3078,17 +3078,17 @@ function Toaster(e2, t2) {
|
|
|
3078
3078
|
tabIndex: -1,
|
|
3079
3079
|
class: n2.class,
|
|
3080
3080
|
"data-sonner-toaster": true,
|
|
3081
|
-
"data-theme": get$1(
|
|
3081
|
+
"data-theme": get$1(q2),
|
|
3082
3082
|
"data-rich-colors": g2(),
|
|
3083
3083
|
dir: e5,
|
|
3084
3084
|
"data-y-position": t3,
|
|
3085
3085
|
"data-x-position": s5,
|
|
3086
3086
|
style: n2.style,
|
|
3087
|
-
...
|
|
3088
|
-
}, "svelte-1fo5d1m"), set_style(c3, "--front-toast-height", `${(_a = store_get(C2, "$heights",
|
|
3087
|
+
...o2
|
|
3088
|
+
}, "svelte-1fo5d1m"), set_style(c3, "--front-toast-height", `${(_a = store_get(C2, "$heights", i2)[0]) == null ? void 0 : _a.height}px`), set_style(c3, "--offset", "number" == typeof w2() ? `${w2()}px` : w2() || "32px"), set_style(c3, "--width", "356px"), set_style(c3, "--gap", "14px"), c3.dir = c3.dir;
|
|
3089
3089
|
}, [() => "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(S2, true)), event("mousemove", c3, () => set(S2, true)), event("mouseleave", c3, () => {
|
|
3090
|
-
get$1(
|
|
3091
|
-
}), event("pointerdown", c3, () => set(
|
|
3090
|
+
get$1(T2) || set(S2, false);
|
|
3091
|
+
}), event("pointerdown", c3, () => set(T2, true)), event("pointerup", c3, () => set(T2, false)), append(e4, c3);
|
|
3092
3092
|
}), template_effect(() => set_attribute(s3, "aria-label", `${v2()} ${get$1(l2)}`)), append(e3, s3);
|
|
3093
3093
|
};
|
|
3094
3094
|
if_block(N2, (e3) => {
|
|
@@ -3100,13 +3100,13 @@ function handleClick(e2, t2) {
|
|
|
3100
3100
|
var _a;
|
|
3101
3101
|
(_a = t2.onClick) == null ? void 0 : _a.call(t2, t2.game.id), window.open("https://" + t2.game.domain, "_blank", "noopener");
|
|
3102
3102
|
}
|
|
3103
|
-
var Re = /* @__PURE__ */ template('<div><p class="uppercase">New</p></div>'), Ve = /* @__PURE__ */ template('<video playsinline="" loop preload="auto"></video>', 2), Ke = /* @__PURE__ */ template('<div id="overlay" 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-styo3v"><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-styo3v"></div></div>'), Ue = /* @__PURE__ */ template('<div role="button" tabindex="0"><!> <!> <img alt="cover" loading="eager"> <!> <img alt="game logo" loading="eager"></div>');
|
|
3103
|
+
var Re = /* @__PURE__ */ template('<div><p class="uppercase font-bold">New</p></div>'), Ve = /* @__PURE__ */ template('<video playsinline="" loop preload="auto"></video>', 2), Ke = /* @__PURE__ */ template('<div id="overlay" 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-styo3v"><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-styo3v"></div></div>'), Ue = /* @__PURE__ */ template('<div role="button" tabindex="0"><!> <!> <img alt="cover" loading="eager"> <!> <img alt="game logo" loading="eager"></div>');
|
|
3104
3104
|
function GameCard(e2, t2) {
|
|
3105
3105
|
push(t2, true);
|
|
3106
|
-
const [n2,
|
|
3107
|
-
let
|
|
3106
|
+
const [n2, o2] = setup_stores();
|
|
3107
|
+
let i2 = state(false), s2 = state(void 0), a2 = state(false), l2 = state(false), c2 = state(false), u2 = state(false);
|
|
3108
3108
|
function handleMouseEnter() {
|
|
3109
|
-
get$1(
|
|
3109
|
+
get$1(i2) || function playSound(e3, t3 = 1) {
|
|
3110
3110
|
try {
|
|
3111
3111
|
const n3 = new Audio(e3);
|
|
3112
3112
|
n3.volume = t3, n3.play();
|
|
@@ -3114,11 +3114,11 @@ function GameCard(e2, t2) {
|
|
|
3114
3114
|
console.error("Error playing sound:", e4);
|
|
3115
3115
|
}
|
|
3116
3116
|
}(store_get(He, "$projectUrl", n2) + "/static/sounds/hover-selection.ogg", 0.25), // Original hover logic
|
|
3117
|
-
set(
|
|
3117
|
+
set(i2, true), get$1(s2) && t2.game.cover_video_url && (set(u2, true), // Flag that we're attempting to load the video
|
|
3118
3118
|
get$1(s2).play().catch((e3) => console.error("Video play error:", e3)));
|
|
3119
3119
|
}
|
|
3120
3120
|
function handleMouseLeave() {
|
|
3121
|
-
set(
|
|
3121
|
+
set(i2, false), // Only pause if it's already loaded and playing
|
|
3122
3122
|
get$1(s2) && get$1(a2) && get$1(s2).pause();
|
|
3123
3123
|
}
|
|
3124
3124
|
var d2 = Ue();
|
|
@@ -3126,8 +3126,8 @@ function GameCard(e2, t2) {
|
|
|
3126
3126
|
var f2 = child(d2), consequent = (e3) => {
|
|
3127
3127
|
var t3 = Re();
|
|
3128
3128
|
let n3;
|
|
3129
|
-
template_effect(() => n3 = set_class(t3, 1, "bg-foreground text-background absolute top-4 right-4 z-13 px-2 py-0.5
|
|
3130
|
-
"opacity-0": get$1(
|
|
3129
|
+
template_effect(() => n3 = set_class(t3, 1, "bg-foreground text-background absolute top-4 right-4 z-13 px-2 py-0.5 transition-opacity", null, n3, {
|
|
3130
|
+
"opacity-0": get$1(i2)
|
|
3131
3131
|
})), append(e3, t3);
|
|
3132
3132
|
};
|
|
3133
3133
|
if_block(f2, (e3) => {
|
|
@@ -3139,10 +3139,10 @@ function GameCard(e2, t2) {
|
|
|
3139
3139
|
});
|
|
3140
3140
|
var p2 = sibling(f2, 2), consequent_1 = (e3) => {
|
|
3141
3141
|
var n3 = Ve();
|
|
3142
|
-
let
|
|
3142
|
+
let o3;
|
|
3143
3143
|
n3.muted = true, bind_this(n3, (e4) => set(s2, e4), () => get$1(s2)), template_effect(() => {
|
|
3144
|
-
set_attribute(n3, "src", t2.game.cover_video_url),
|
|
3145
|
-
"opacity-100": get$1(
|
|
3144
|
+
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, {
|
|
3145
|
+
"opacity-100": get$1(i2) && get$1(a2) && t2.game.cover_video_url
|
|
3146
3146
|
});
|
|
3147
3147
|
}), event("loadeddata", n3, () => {
|
|
3148
3148
|
set(a2, true), set(u2, false);
|
|
@@ -3154,19 +3154,19 @@ function GameCard(e2, t2) {
|
|
|
3154
3154
|
var _2 = sibling(p2, 2);
|
|
3155
3155
|
let v2;
|
|
3156
3156
|
var g2 = sibling(_2, 2), consequent_2 = (e3) => {
|
|
3157
|
-
var n3 = Ke(),
|
|
3157
|
+
var n3 = Ke(), o3 = child(n3), i3 = child(o3), s3 = child(i3), a3 = child(sibling(i3, 2));
|
|
3158
3158
|
template_effect(() => {
|
|
3159
3159
|
set_text(s3, t2.game.name), set_text(a3, t2.game.description || "No description.");
|
|
3160
3160
|
}), transition(3, n3, () => slide), append(e3, n3);
|
|
3161
3161
|
};
|
|
3162
3162
|
if_block(g2, (e3) => {
|
|
3163
|
-
get$1(
|
|
3163
|
+
get$1(i2) && e3(consequent_2);
|
|
3164
3164
|
});
|
|
3165
3165
|
var h2 = sibling(g2, 2);
|
|
3166
3166
|
let m2;
|
|
3167
3167
|
template_effect(() => {
|
|
3168
3168
|
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-styo3v"), set_attribute(_2, "src", t2.game.cover_image_url), v2 = set_class(_2, 1, "absolute top-0 left-0 z-10 h-full w-full object-cover opacity-0 transition svelte-styo3v", null, v2, {
|
|
3169
|
-
"opacity-100": get$1(l2) && (!get$1(
|
|
3169
|
+
"opacity-100": get$1(l2) && (!get$1(i2) || !get$1(a2) || !t2.game.cover_video_url)
|
|
3170
3170
|
}), set_attribute(h2, "src", t2.game.logo_url), m2 = set_class(h2, 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 svelte-styo3v", null, m2, {
|
|
3171
3171
|
"opacity-100": get$1(c2)
|
|
3172
3172
|
});
|
|
@@ -3174,7 +3174,7 @@ function GameCard(e2, t2) {
|
|
|
3174
3174
|
set(l2, true);
|
|
3175
3175
|
}), event("load", h2, () => {
|
|
3176
3176
|
set(c2, true);
|
|
3177
|
-
}), append(e2, d2), pop(),
|
|
3177
|
+
}), append(e2, d2), pop(), o2();
|
|
3178
3178
|
}
|
|
3179
3179
|
delegate(["touchstart", "touchend", "click"]);
|
|
3180
3180
|
const Ze = new class PlayLightAPI {
|
|
@@ -3183,24 +3183,24 @@ const Ze = new class PlayLightAPI {
|
|
|
3183
3183
|
}
|
|
3184
3184
|
async request(e2, t2 = {}) {
|
|
3185
3185
|
try {
|
|
3186
|
-
const n2 = `${this.baseUrl}${e2}`,
|
|
3186
|
+
const n2 = `${this.baseUrl}${e2}`, o2 = await fetch(n2, {
|
|
3187
3187
|
...t2,
|
|
3188
3188
|
headers: {
|
|
3189
3189
|
"Content-Type": "application/json",
|
|
3190
3190
|
...t2.headers
|
|
3191
3191
|
}
|
|
3192
3192
|
});
|
|
3193
|
-
if (!
|
|
3193
|
+
if (!o2.ok) {
|
|
3194
3194
|
let e3;
|
|
3195
3195
|
try {
|
|
3196
|
-
e3 = await
|
|
3196
|
+
e3 = await o2.json();
|
|
3197
3197
|
} catch {
|
|
3198
3198
|
} finally {
|
|
3199
|
-
if (429 !==
|
|
3200
|
-
return 429 ===
|
|
3199
|
+
if (429 !== o2.status && 404 !== o2.status) throw new Error(`API request failed: ${(e3 == null ? void 0 : e3.error) || (e3 == null ? void 0 : e3.message) || o2.status}`);
|
|
3200
|
+
return 429 === o2.status ? console.warn("Playlight request didn't go through due to rate limiting.") : console.warn("Playlight game not found. This is normal in a test / local environment, but should not appear in production.");
|
|
3201
3201
|
}
|
|
3202
3202
|
}
|
|
3203
|
-
return await
|
|
3203
|
+
return await o2.json();
|
|
3204
3204
|
} catch (e3) {
|
|
3205
3205
|
Oe.error("Error: " + e3), console.error("Playlight API error:", e3);
|
|
3206
3206
|
}
|
|
@@ -3213,8 +3213,8 @@ const Ze = new class PlayLightAPI {
|
|
|
3213
3213
|
}
|
|
3214
3214
|
// Get game suggestions, optionally filtered by category
|
|
3215
3215
|
async getSuggestions(e2 = null, t2 = 1, n2) {
|
|
3216
|
-
let
|
|
3217
|
-
return e2 && (
|
|
3216
|
+
let o2 = "/suggestions";
|
|
3217
|
+
return e2 && (o2 += "/" + e2), t2 && (o2 += "?page=" + t2), n2 && (o2 += "&without=" + n2), await this.request(o2);
|
|
3218
3218
|
}
|
|
3219
3219
|
// Get game suggestions, optionally filtered by category
|
|
3220
3220
|
async getCurrentGameInfo() {
|
|
@@ -3253,8 +3253,8 @@ function cubicOut(e2) {
|
|
|
3253
3253
|
function elasticOut(e2) {
|
|
3254
3254
|
return Math.sin(-13 * (e2 + 1) * Math.PI / 2) * Math.pow(2, -10 * e2) + 1;
|
|
3255
3255
|
}
|
|
3256
|
-
function flip(e2, { from: t2, to: n2 },
|
|
3257
|
-
var { delay:
|
|
3256
|
+
function flip(e2, { from: t2, to: n2 }, o2 = {}) {
|
|
3257
|
+
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, d2] = l2.transformOrigin.split(" ").map(parseFloat);
|
|
3258
3258
|
u2 /= e2.clientWidth, d2 /= e2.clientHeight;
|
|
3259
3259
|
var f2 = (
|
|
3260
3260
|
/**
|
|
@@ -3270,7 +3270,7 @@ function flip(e2, { from: t2, to: n2 }, i2 = {}) {
|
|
|
3270
3270
|
}(e2)
|
|
3271
3271
|
), p2 = e2.clientWidth / n2.width / f2, _2 = e2.clientHeight / n2.height / f2, v2 = t2.left + t2.width * u2, g2 = t2.top + t2.height * d2, h2 = n2.left + n2.width * u2, m2 = n2.top + n2.height * d2, b2 = (v2 - h2) * p2, y2 = (g2 - m2) * _2, $2 = t2.width / n2.width, w2 = t2.height / n2.height;
|
|
3272
3272
|
return {
|
|
3273
|
-
delay:
|
|
3273
|
+
delay: i2,
|
|
3274
3274
|
duration: "function" == typeof s2 ? s2(Math.sqrt(b2 * b2 + y2 * y2)) : s2,
|
|
3275
3275
|
easing: a2,
|
|
3276
3276
|
css: (e3, t3) => `transform: ${c2} translate(${t3 * b2}px, ${t3 * y2}px) scale(${e3 + t3 * $2}, ${e3 + t3 * w2});`
|
|
@@ -3278,12 +3278,12 @@ function flip(e2, { from: t2, to: n2 }, i2 = {}) {
|
|
|
3278
3278
|
}
|
|
3279
3279
|
var on_click$1 = (e2, t2, n2) => {
|
|
3280
3280
|
set(t2, ""), set(n2, !get$1(n2));
|
|
3281
|
-
}, Ye = /* @__PURE__ */ template('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'), Je = /* @__PURE__ */ template('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'), on_click_1$1 = (e2, t2, n2,
|
|
3282
|
-
t2(n2), set(
|
|
3283
|
-
}, Xe = /* @__PURE__ */ template("<button> </button>"), Qe = /* @__PURE__ */ template('<div class="space-y-1 p-1"></div>'), et = /* @__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>'), tt = /* @__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="max-w-[40vw]
|
|
3281
|
+
}, Ye = /* @__PURE__ */ template('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'), Je = /* @__PURE__ */ template('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'), on_click_1$1 = (e2, t2, n2, o2) => {
|
|
3282
|
+
t2(n2), set(o2, false);
|
|
3283
|
+
}, Xe = /* @__PURE__ */ template("<button> </button>"), Qe = /* @__PURE__ */ template('<div class="space-y-1 p-1"></div>'), et = /* @__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>'), tt = /* @__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>');
|
|
3284
3284
|
function Navigation(e2, t2) {
|
|
3285
3285
|
push(t2, true);
|
|
3286
|
-
let n2,
|
|
3286
|
+
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());
|
|
3287
3287
|
const d2 = ["Looking for", "Interested in", "Searching for", "Fancy some", "What about these"];
|
|
3288
3288
|
let f2, p2 = state(proxy(d2[0]));
|
|
3289
3289
|
onMount(function updateRandomPhrase() {
|
|
@@ -3292,7 +3292,7 @@ function Navigation(e2, t2) {
|
|
|
3292
3292
|
set(p2, proxy(d2[e3])), f2 = e3;
|
|
3293
3293
|
});
|
|
3294
3294
|
var _2 = tt();
|
|
3295
|
-
event("click",
|
|
3295
|
+
event("click", q, function handleClickOutside(e3) {
|
|
3296
3296
|
get$1(c2) && !get$1(c2).contains(e3.target) && n2 && !n2.contains(e3.target) && set(s2, false);
|
|
3297
3297
|
});
|
|
3298
3298
|
var v2 = child(_2), g2 = child(v2), h2 = child(g2), m2 = sibling(g2, 2);
|
|
@@ -3308,8 +3308,8 @@ function Navigation(e2, t2) {
|
|
|
3308
3308
|
d: "m6 9 6 6 6-6"
|
|
3309
3309
|
}]],
|
|
3310
3310
|
children: (e4, n4) => {
|
|
3311
|
-
var
|
|
3312
|
-
slot(first_child(
|
|
3311
|
+
var o3 = comment();
|
|
3312
|
+
slot(first_child(o3), t3, "default", {}, null), append(e4, o3);
|
|
3313
3313
|
},
|
|
3314
3314
|
$$slots: {
|
|
3315
3315
|
default: true
|
|
@@ -3337,8 +3337,8 @@ function Navigation(e2, t2) {
|
|
|
3337
3337
|
d: "m21 21-4.3-4.3"
|
|
3338
3338
|
}]],
|
|
3339
3339
|
children: (e5, n5) => {
|
|
3340
|
-
var
|
|
3341
|
-
slot(first_child(
|
|
3340
|
+
var o3 = comment();
|
|
3341
|
+
slot(first_child(o3), t4, "default", {}, null), append(e5, o3);
|
|
3342
3342
|
},
|
|
3343
3343
|
$$slots: {
|
|
3344
3344
|
default: true
|
|
@@ -3357,25 +3357,25 @@ function Navigation(e2, t2) {
|
|
|
3357
3357
|
var t5 = Qe();
|
|
3358
3358
|
each(t5, 28, () => get$1(u2), (e6) => e6, (e6, t6) => {
|
|
3359
3359
|
var n5 = Xe();
|
|
3360
|
-
n5.__click = [on_click_1$1,
|
|
3361
|
-
var
|
|
3360
|
+
n5.__click = [on_click_1$1, i2, t6, s2];
|
|
3361
|
+
var o3 = child(n5);
|
|
3362
3362
|
template_effect(() => {
|
|
3363
|
-
set_class(n5, 1, `w-full cursor-pointer px-4 py-2 text-left transition-colors ${(
|
|
3363
|
+
set_class(n5, 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);
|
|
3364
3364
|
}), function animation(e7, t7, n6) {
|
|
3365
|
-
var
|
|
3365
|
+
var o4, i3, s3, a4 = (
|
|
3366
3366
|
/** @type {EachItem} */
|
|
3367
3367
|
ce
|
|
3368
3368
|
), l3 = null;
|
|
3369
3369
|
a4.a ?? (a4.a = {
|
|
3370
3370
|
element: e7,
|
|
3371
3371
|
measure() {
|
|
3372
|
-
|
|
3372
|
+
o4 = this.element.getBoundingClientRect();
|
|
3373
3373
|
},
|
|
3374
3374
|
apply() {
|
|
3375
|
-
if (s3 == null ? void 0 : s3.abort(),
|
|
3375
|
+
if (s3 == null ? void 0 : s3.abort(), i3 = this.element.getBoundingClientRect(), o4.left !== i3.left || o4.right !== i3.right || o4.top !== i3.top || o4.bottom !== i3.bottom) {
|
|
3376
3376
|
const e8 = t7()(this.element, {
|
|
3377
|
-
from:
|
|
3378
|
-
to:
|
|
3377
|
+
from: o4,
|
|
3378
|
+
to: i3
|
|
3379
3379
|
}, n6 == null ? void 0 : n6());
|
|
3380
3380
|
s3 = animate(this.element, e8, void 0, 1, () => {
|
|
3381
3381
|
s3 == null ? void 0 : s3.abort(), s3 = void 0;
|
|
@@ -3384,7 +3384,7 @@ function Navigation(e2, t2) {
|
|
|
3384
3384
|
},
|
|
3385
3385
|
fix() {
|
|
3386
3386
|
if (!e7.getAnimations().length) {
|
|
3387
|
-
var { position: t8, width: n7, height:
|
|
3387
|
+
var { position: t8, width: n7, height: i4 } = getComputedStyle(e7);
|
|
3388
3388
|
if ("absolute" !== t8 && "fixed" !== t8) {
|
|
3389
3389
|
var s4 = (
|
|
3390
3390
|
/** @type {HTMLElement | SVGElement} */
|
|
@@ -3395,10 +3395,10 @@ function Navigation(e2, t2) {
|
|
|
3395
3395
|
width: s4.width,
|
|
3396
3396
|
height: s4.height,
|
|
3397
3397
|
transform: s4.transform
|
|
3398
|
-
}, s4.position = "absolute", s4.width = n7, s4.height =
|
|
3398
|
+
}, s4.position = "absolute", s4.width = n7, s4.height = i4;
|
|
3399
3399
|
var a5 = e7.getBoundingClientRect();
|
|
3400
|
-
if (
|
|
3401
|
-
var c3 = `translate(${
|
|
3400
|
+
if (o4.left !== a5.left || o4.top !== a5.top) {
|
|
3401
|
+
var c3 = `translate(${o4.left - a5.left}px, ${o4.top - a5.top}px)`;
|
|
3402
3402
|
s4.transform = s4.transform ? `${s4.transform} ${c3}` : c3;
|
|
3403
3403
|
}
|
|
3404
3404
|
}
|
|
@@ -3428,12 +3428,12 @@ function Navigation(e2, t2) {
|
|
|
3428
3428
|
}, true), append(e4, t4);
|
|
3429
3429
|
};
|
|
3430
3430
|
if_block(p3, (e4) => {
|
|
3431
|
-
0 ===
|
|
3431
|
+
0 === o2().length ? e4(consequent) : e4(alternate_1, false);
|
|
3432
3432
|
}), bind_this(t3, (e4) => set(c2, e4), () => get$1(c2)), function bind_value(e4, t4, n4 = t4) {
|
|
3433
|
-
var
|
|
3434
|
-
listen_to_event_and_reset_event(e4, "input", (
|
|
3435
|
-
var s3 =
|
|
3436
|
-
if (s3 = is_numberlike_input(e4) ? to_number(s3) : s3, n4(s3),
|
|
3433
|
+
var o3 = is_runes();
|
|
3434
|
+
listen_to_event_and_reset_event(e4, "input", (i3) => {
|
|
3435
|
+
var s3 = i3 ? e4.defaultValue : e4.value;
|
|
3436
|
+
if (s3 = is_numberlike_input(e4) ? to_number(s3) : s3, n4(s3), o3 && s3 !== (s3 = t4())) {
|
|
3437
3437
|
var a4 = e4.selectionStart, l3 = e4.selectionEnd;
|
|
3438
3438
|
e4.value = s3 ?? "", // Restore selection
|
|
3439
3439
|
null !== l3 && (e4.selectionStart = a4, e4.selectionEnd = Math.min(l3, e4.value.length));
|
|
@@ -3466,16 +3466,16 @@ function Navigation(e2, t2) {
|
|
|
3466
3466
|
delegate(["click"]);
|
|
3467
3467
|
var on_click = (e2, t2) => {
|
|
3468
3468
|
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));
|
|
3469
|
-
}, on_click_1 = (e2, t2) => store_set(Ge, false), nt = /* @__PURE__ */ template('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'), rt = /* @__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>'),
|
|
3469
|
+
}, on_click_1 = (e2, t2) => store_set(Ge, false), nt = /* @__PURE__ */ template('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'), rt = /* @__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>'), ot = /* @__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>'), it = /* @__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 truncate text-sm text-nowrap opacity-50 transition hover:opacity-25 max-md:hidden"><p class="bg-background/50 p-1 px-2 text-white"> </p></button> <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>');
|
|
3470
3470
|
function DiscoveryOverlay(e2, t2) {
|
|
3471
3471
|
push(t2, true);
|
|
3472
|
-
const [n2,
|
|
3473
|
-
let
|
|
3472
|
+
const [n2, o2] = setup_stores();
|
|
3473
|
+
let i2, s2 = state(void 0), a2 = state(true), l2 = state(false), c2 = state(void 0), u2 = state(proxy([])), d2 = state(proxy([])), f2 = state(true), p2 = state(1), _2 = state(true), v2 = state(void 0), g2 = state(false);
|
|
3474
3474
|
async function fetchGames() {
|
|
3475
3475
|
if (!(get$1(a2) && get$1(p2) > 1 || get$1(l2))) try {
|
|
3476
3476
|
1 === get$1(p2) ? set(a2, true) : set(l2, true);
|
|
3477
|
-
const e3 = get$1(g2) ? null : get$1(s2), t3 = await Ze.getSuggestions(e3, get$1(p2), window.location.hostname), n3 = (t3 == null ? void 0 : t3.games) || [],
|
|
3478
|
-
set(u2, proxy([...get$1(u2), ...
|
|
3477
|
+
const e3 = get$1(g2) ? null : get$1(s2), t3 = await Ze.getSuggestions(e3, get$1(p2), window.location.hostname), n3 = (t3 == null ? void 0 : t3.games) || [], o3 = n3.filter((e4) => !get$1(u2).some((t4) => t4.id === e4.id));
|
|
3478
|
+
set(u2, proxy([...get$1(u2), ...o3])), n3.length < 10 ? !get$1(g2) && get$1(s2) ? (
|
|
3479
3479
|
// Try with all games
|
|
3480
3480
|
(set(g2, true), set(p2, 1), setTimeout(() => fetchGames(), 100))
|
|
3481
3481
|
) : set(_2, false) : set(p2, get$1(p2) + 1);
|
|
@@ -3492,11 +3492,11 @@ function DiscoveryOverlay(e2, t2) {
|
|
|
3492
3492
|
}
|
|
3493
3493
|
}
|
|
3494
3494
|
onMount(() => (set(f2, !Boolean(localStorage.getItem("playlight_exit_intent_disabled_by_user"))), // Setup scroll observer
|
|
3495
|
-
|
|
3495
|
+
i2 = new IntersectionObserver((e3) => {
|
|
3496
3496
|
e3[0].isIntersecting && get$1(_2) && !get$1(a2) && !get$1(l2) && fetchGames();
|
|
3497
3497
|
}, {
|
|
3498
3498
|
rootMargin: "200px"
|
|
3499
|
-
}), () =>
|
|
3499
|
+
}), () => i2 == null ? void 0 : i2.disconnect())), onMount(async () => {
|
|
3500
3500
|
const e3 = await Ze.getCurrentGameInfo();
|
|
3501
3501
|
set(c2, proxy(e3 == null ? void 0 : e3.category)), await async function fetchCategories() {
|
|
3502
3502
|
var _a, _b, _c, _d;
|
|
@@ -3508,10 +3508,10 @@ function DiscoveryOverlay(e2, t2) {
|
|
|
3508
3508
|
await fetchGames(), get$1(u2).length < 10 && await fetchGames();
|
|
3509
3509
|
}, 100));
|
|
3510
3510
|
}), user_effect(() => {
|
|
3511
|
-
get$1(v2) &&
|
|
3511
|
+
get$1(v2) && i2 && i2.observe(get$1(v2));
|
|
3512
3512
|
});
|
|
3513
|
-
var h2 =
|
|
3514
|
-
event("keydown",
|
|
3513
|
+
var h2 = it();
|
|
3514
|
+
event("keydown", q, (e3) => {
|
|
3515
3515
|
"Escape" == e3.key && store_set(Ge, false);
|
|
3516
3516
|
});
|
|
3517
3517
|
var m2 = child(h2), b2 = child(m2), y2 = child(b2), $2 = child(sibling(b2, 2));
|
|
@@ -3528,8 +3528,8 @@ function DiscoveryOverlay(e2, t2) {
|
|
|
3528
3528
|
d: "m6 6 12 12"
|
|
3529
3529
|
}]],
|
|
3530
3530
|
children: (e4, n4) => {
|
|
3531
|
-
var
|
|
3532
|
-
slot(first_child(
|
|
3531
|
+
var o3 = comment();
|
|
3532
|
+
slot(first_child(o3), t3, "default", {}, null), append(e4, o3);
|
|
3533
3533
|
},
|
|
3534
3534
|
$$slots: {
|
|
3535
3535
|
default: true
|
|
@@ -3561,7 +3561,7 @@ function DiscoveryOverlay(e2, t2) {
|
|
|
3561
3561
|
var t3 = comment(), n3 = first_child(t3), consequent_1 = (e4) => {
|
|
3562
3562
|
append(e4, rt());
|
|
3563
3563
|
}, alternate = (e4) => {
|
|
3564
|
-
var t4 =
|
|
3564
|
+
var t4 = ot(), n4 = child(t4);
|
|
3565
3565
|
each(n4, 17, () => get$1(u2), index, (e5, t5) => {
|
|
3566
3566
|
GameCard(e5, {
|
|
3567
3567
|
get game() {
|
|
@@ -3570,16 +3570,16 @@ function DiscoveryOverlay(e2, t2) {
|
|
|
3570
3570
|
onClick: () => Ze.trackClick(get$1(t5).id)
|
|
3571
3571
|
});
|
|
3572
3572
|
});
|
|
3573
|
-
var
|
|
3573
|
+
var o3 = sibling(n4, 2), i3 = child(o3), consequent_2 = (e5) => {
|
|
3574
3574
|
Loader_circle(e5, {
|
|
3575
3575
|
class: "animate-spin opacity-75",
|
|
3576
3576
|
size: 30,
|
|
3577
3577
|
strokeWidth: 2.5
|
|
3578
3578
|
});
|
|
3579
3579
|
};
|
|
3580
|
-
if_block(
|
|
3580
|
+
if_block(i3, (e5) => {
|
|
3581
3581
|
get$1(l2) && e5(consequent_2);
|
|
3582
|
-
}), bind_this(
|
|
3582
|
+
}), bind_this(o3, (e5) => set(v2, e5), () => get$1(v2)), append(e4, t4);
|
|
3583
3583
|
};
|
|
3584
3584
|
if_block(n3, (e4) => {
|
|
3585
3585
|
0 !== get$1(u2).length || get$1(a2) ? e4(alternate, false) : e4(consequent_1);
|
|
@@ -3588,7 +3588,7 @@ function DiscoveryOverlay(e2, t2) {
|
|
|
3588
3588
|
if_block(S2, (e3) => {
|
|
3589
3589
|
get$1(a2) && 0 === get$1(u2).length ? e3(consequent) : e3(alternate_1, false);
|
|
3590
3590
|
});
|
|
3591
|
-
var
|
|
3591
|
+
var I2 = child(sibling(M2, 2));
|
|
3592
3592
|
!function External_link(e3, t3) {
|
|
3593
3593
|
const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
|
|
3594
3594
|
Icon$1(e3, spread_props({
|
|
@@ -3602,21 +3602,21 @@ function DiscoveryOverlay(e2, t2) {
|
|
|
3602
3602
|
d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"
|
|
3603
3603
|
}]],
|
|
3604
3604
|
children: (e4, n4) => {
|
|
3605
|
-
var
|
|
3606
|
-
slot(first_child(
|
|
3605
|
+
var o3 = comment();
|
|
3606
|
+
slot(first_child(o3), t3, "default", {}, null), append(e4, o3);
|
|
3607
3607
|
},
|
|
3608
3608
|
$$slots: {
|
|
3609
3609
|
default: true
|
|
3610
3610
|
}
|
|
3611
3611
|
}));
|
|
3612
|
-
}(sibling(child(
|
|
3612
|
+
}(sibling(child(I2)), {
|
|
3613
3613
|
size: 14,
|
|
3614
3614
|
style: "margin-top: 1px;"
|
|
3615
3615
|
}), template_effect(() => {
|
|
3616
3616
|
set_attribute(y2, "src", store_get(He, "$projectUrl", n2) + "/static/images/logo-white-small.png"), set_text(x2, get$1(f2) ? "Ignore exit intent" : "Trigger on exit intent");
|
|
3617
3617
|
}), transition(3, h2, () => blur, () => ({
|
|
3618
3618
|
duration: 250
|
|
3619
|
-
})), append(e2, h2), pop(),
|
|
3619
|
+
})), append(e2, h2), pop(), o2();
|
|
3620
3620
|
}
|
|
3621
3621
|
delegate(["click"]);
|
|
3622
3622
|
var st = /* @__PURE__ */ template('<div class="fixed top-0 left-0 right-0 h-2 z-99990"></div>');
|
|
@@ -3625,15 +3625,15 @@ var at = /* @__PURE__ */ template("<!> <!> <!> <!>", 1);
|
|
|
3625
3625
|
function App(e2, t2) {
|
|
3626
3626
|
var _a, _b, _c, _d;
|
|
3627
3627
|
push(t2, true);
|
|
3628
|
-
const [n2,
|
|
3629
|
-
let
|
|
3628
|
+
const [n2, o2] = setup_stores(), $discoveryOpen = () => store_get(Ge, "$discoveryOpen", n2);
|
|
3629
|
+
let i2 = proxy((_b = (_a = t2.config) == null ? void 0 : _a.button) == null ? void 0 : _b.position), s2 = proxy((_d = (_c = t2.config) == null ? void 0 : _c.button) == null ? void 0 : _d.visible);
|
|
3630
3630
|
function openDiscovery() {
|
|
3631
3631
|
store_set(Ge, true), Ze.trackOpen();
|
|
3632
3632
|
}
|
|
3633
3633
|
var a2 = at(), l2 = first_child(a2);
|
|
3634
3634
|
FloatingButton(l2, {
|
|
3635
3635
|
get position() {
|
|
3636
|
-
return
|
|
3636
|
+
return i2;
|
|
3637
3637
|
},
|
|
3638
3638
|
get visible() {
|
|
3639
3639
|
return s2;
|
|
@@ -3653,21 +3653,21 @@ function App(e2, t2) {
|
|
|
3653
3653
|
});
|
|
3654
3654
|
!function ExitIntentDetector(e3, t3) {
|
|
3655
3655
|
push(t3, true);
|
|
3656
|
-
let n3,
|
|
3656
|
+
let n3, o3 = prop(t3, "enabled", 3, true), i3 = false;
|
|
3657
3657
|
onMount(() => {
|
|
3658
3658
|
"undefined" != typeof window && (n3 = window.innerHeight);
|
|
3659
3659
|
});
|
|
3660
3660
|
var s3 = st();
|
|
3661
|
-
event("mouseleave",
|
|
3662
|
-
|
|
3663
|
-
}), event("mousemove",
|
|
3661
|
+
event("mouseleave", q, () => {
|
|
3662
|
+
i3 = false;
|
|
3663
|
+
}), event("mousemove", q, (e4) => {
|
|
3664
3664
|
const t4 = e4.clientY;
|
|
3665
|
-
if (!
|
|
3665
|
+
if (!i3) return i3 = true, void (n3 = t4);
|
|
3666
3666
|
n3 = t4;
|
|
3667
3667
|
}), s3.__mouseover = (e4) => {
|
|
3668
3668
|
var _a2;
|
|
3669
3669
|
const s4 = e4.clientY;
|
|
3670
|
-
s4 < n3 &&
|
|
3670
|
+
s4 < n3 && i3 && o3() && !localStorage.getItem("playlight_exit_intent_disabled_by_user") && ((_a2 = t3.onIntent) == null ? void 0 : _a2.call(t3)), // Update lastMouseY after checking
|
|
3671
3671
|
n3 = s4;
|
|
3672
3672
|
}, append(e3, s3), pop();
|
|
3673
3673
|
}(u2, {
|
|
@@ -3677,7 +3677,7 @@ function App(e2, t2) {
|
|
|
3677
3677
|
onIntent: () => {
|
|
3678
3678
|
$discoveryOpen() || openDiscovery();
|
|
3679
3679
|
}
|
|
3680
|
-
}), Toaster(sibling(u2, 2), {}), append(e2, a2), pop(),
|
|
3680
|
+
}), Toaster(sibling(u2, 2), {}), append(e2, a2), pop(), o2();
|
|
3681
3681
|
}
|
|
3682
3682
|
const lt = {
|
|
3683
3683
|
button: {
|
|
@@ -3698,11 +3698,11 @@ function deepMerge(e2, t2) {
|
|
|
3698
3698
|
const n2 = {
|
|
3699
3699
|
...e2
|
|
3700
3700
|
};
|
|
3701
|
-
return isObject(e2) && isObject(t2) && Object.keys(t2).forEach((
|
|
3702
|
-
isObject(t2[
|
|
3703
|
-
[
|
|
3701
|
+
return isObject(e2) && isObject(t2) && Object.keys(t2).forEach((o2) => {
|
|
3702
|
+
isObject(t2[o2]) ? o2 in e2 ? n2[o2] = deepMerge(e2[o2], t2[o2]) : Object.assign(n2, {
|
|
3703
|
+
[o2]: t2[o2]
|
|
3704
3704
|
}) : Object.assign(n2, {
|
|
3705
|
-
[
|
|
3705
|
+
[o2]: t2[o2]
|
|
3706
3706
|
});
|
|
3707
3707
|
}), n2;
|
|
3708
3708
|
}
|
|
@@ -3714,16 +3714,18 @@ const ut = new class PlaylightSDK {
|
|
|
3714
3714
|
this.container = null, this.app = null, this.isInitialized = false, this.config = null, this.api = Ze;
|
|
3715
3715
|
}
|
|
3716
3716
|
async init(e2 = {}) {
|
|
3717
|
-
if (!this.isInitialized)
|
|
3718
|
-
|
|
3719
|
-
|
|
3717
|
+
if (!this.isInitialized) return "undefined" == typeof window ? console.error("Playlight cannot run on the server, as it depends browser APIs.") : (
|
|
3718
|
+
// Initialize configuration with defaults and user overrides
|
|
3719
|
+
(this.config = initializeConfig(e2), // Create container for Svelte app
|
|
3720
|
+
this.container = document.createElement("div"), this.container.id = "playlight-sdk-container", this.container.className = "playlight-sdk-container", document.body.appendChild(this.container), // Use mount function (client-side equivalent of render)
|
|
3720
3721
|
this.app = mount(App, {
|
|
3721
3722
|
target: this.container,
|
|
3722
3723
|
props: {
|
|
3723
3724
|
config: this.config
|
|
3724
3725
|
}
|
|
3725
3726
|
}), // Fetch current game info to cache it
|
|
3726
|
-
await this.api.getCurrentGameInfo(), this.isInitialized = true, this
|
|
3727
|
+
await this.api.getCurrentGameInfo(), this.isInitialized = true, this)
|
|
3728
|
+
);
|
|
3727
3729
|
}
|
|
3728
3730
|
// Public methods
|
|
3729
3731
|
setDiscovery(e2) {
|