playlight-sdk 0.2.5 → 0.2.6

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.
@@ -9,9 +9,9 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
11
11
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
12
- var _e2, _t2, _n, _ResizeObserverSingleton_instances, r_fn, _a, _PlayLightAPI_instances, o_fn, _b, _PlaylightSDK_instances, s_fn, _c;
12
+ var _e2, _t2, _n, _ResizeObserverSingleton_instances, r_fn, _a, _PlayLightAPI_instances, s_fn, _b, _PlaylightSDK_instances, i_fn, _c;
13
13
  const e = false;
14
- var t = Array.isArray, n = Array.prototype.indexOf, o = Array.from, s = Object.defineProperty, i = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyDescriptors, l = Object.prototype, c = Array.prototype, u = Object.getPrototypeOf, d = Object.isExtensible;
14
+ var t = Array.isArray, n = Array.prototype.indexOf, s = Array.from, i = Object.defineProperty, o = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyDescriptors, l = Object.prototype, c = Array.prototype, u = Object.getPrototypeOf, d = Object.isExtensible;
15
15
  function is_function(e2) {
16
16
  return "function" == typeof e2;
17
17
  }
@@ -34,17 +34,17 @@ function safe_equals(e2) {
34
34
  return !safe_not_equal(e2, this.v);
35
35
  }
36
36
  let I = false;
37
- const T = Symbol();
37
+ const O = Symbol();
38
38
  function lifecycle_outside_component(e2) {
39
39
  throw new Error("https://svelte.dev/e/lifecycle_outside_component");
40
40
  }
41
- let O = null;
41
+ let T = null;
42
42
  function set_component_context(e2) {
43
- O = e2;
43
+ T = e2;
44
44
  }
45
45
  function push(e2, t2 = false, n2) {
46
- var o2 = O = {
47
- p: O,
46
+ var s2 = T = {
47
+ p: T,
48
48
  c: null,
49
49
  d: false,
50
50
  e: null,
@@ -53,49 +53,49 @@ function push(e2, t2 = false, n2) {
53
53
  x: null,
54
54
  l: null
55
55
  };
56
- I && !t2 && (O.l = {
56
+ I && !t2 && (T.l = {
57
57
  s: null,
58
58
  u: null,
59
59
  r1: [],
60
60
  r2: source(false)
61
61
  }), teardown(() => {
62
- o2.d = true;
62
+ s2.d = true;
63
63
  });
64
64
  }
65
65
  function pop(e2) {
66
- const t2 = O;
66
+ const t2 = T;
67
67
  if (null !== t2) {
68
68
  const e3 = t2.e;
69
69
  if (null !== e3) {
70
- var n2 = V, o2 = R;
70
+ var n2 = V, s2 = R;
71
71
  t2.e = null;
72
72
  try {
73
- for (var s2 = 0; s2 < e3.length; s2++) {
74
- var i2 = e3[s2];
75
- set_active_effect(i2.effect), set_active_reaction(i2.reaction), effect(i2.fn);
73
+ for (var i2 = 0; i2 < e3.length; i2++) {
74
+ var o2 = e3[i2];
75
+ set_active_effect(o2.effect), set_active_reaction(o2.reaction), effect(o2.fn);
76
76
  }
77
77
  } finally {
78
- set_active_effect(n2), set_active_reaction(o2);
78
+ set_active_effect(n2), set_active_reaction(s2);
79
79
  }
80
80
  }
81
- O = t2.p, t2.m = true;
81
+ T = t2.p, t2.m = true;
82
82
  }
83
83
  return {};
84
84
  }
85
85
  function is_runes() {
86
- return !I || null !== O && null === O.l;
86
+ return !I || null !== T && null === T.l;
87
87
  }
88
88
  function proxy(e2, n2) {
89
89
  if ("object" != typeof e2 || null === e2 || C in e2) return e2;
90
- const o2 = u(e2);
91
- if (o2 !== l && o2 !== c) return e2;
92
- var s2 = /* @__PURE__ */ new Map(), a2 = t(e2), d2 = state(0), f2 = R, with_parent = (e3) => {
90
+ const s2 = u(e2);
91
+ if (s2 !== l && s2 !== c) return e2;
92
+ var i2 = /* @__PURE__ */ new Map(), a2 = t(e2), d2 = state(0), f2 = R, with_parent = (e3) => {
93
93
  var t2, n3 = R;
94
94
  return set_active_reaction(f2), t2 = e3(), set_active_reaction(n3), t2;
95
95
  };
96
96
  return a2 && // We need to create the length source eagerly to ensure that
97
97
  // mutations to the array are properly synced with our proxy
98
- s2.set("length", state(
98
+ i2.set("length", state(
99
99
  /** @type {any[]} */
100
100
  e2.length
101
101
  )), new Proxy(
@@ -114,45 +114,45 @@ function proxy(e2, n2) {
114
114
  function state_descriptors_fixed() {
115
115
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
116
116
  }();
117
- var o3 = s2.get(t2);
118
- return void 0 === o3 ? (o3 = with_parent(() => state(n3.value)), s2.set(t2, o3)) : set(o3, with_parent(() => proxy(n3.value))), true;
117
+ var s3 = i2.get(t2);
118
+ return void 0 === s3 ? (s3 = with_parent(() => state(n3.value)), i2.set(t2, s3)) : set(s3, with_parent(() => proxy(n3.value))), true;
119
119
  },
120
120
  deleteProperty(e3, t2) {
121
- var n3 = s2.get(t2);
122
- if (void 0 === n3) t2 in e3 && s2.set(t2, with_parent(() => state(T)));
121
+ var n3 = i2.get(t2);
122
+ if (void 0 === n3) t2 in e3 && i2.set(t2, with_parent(() => state(O)));
123
123
  else {
124
124
  if (a2 && "string" == typeof t2) {
125
- var o3 = (
125
+ var s3 = (
126
126
  /** @type {Source<number>} */
127
- s2.get("length")
128
- ), i2 = Number(t2);
129
- Number.isInteger(i2) && i2 < o3.v && set(o3, i2);
127
+ i2.get("length")
128
+ ), o2 = Number(t2);
129
+ Number.isInteger(o2) && o2 < s3.v && set(s3, o2);
130
130
  }
131
- set(n3, T), update_version(d2);
131
+ set(n3, O), update_version(d2);
132
132
  }
133
133
  return true;
134
134
  },
135
- get(t2, n3, o3) {
135
+ get(t2, n3, s3) {
136
136
  var _a2;
137
137
  if (n3 === C) return e2;
138
- var a3 = s2.get(n3), l2 = n3 in t2;
138
+ var a3 = i2.get(n3), l2 = n3 in t2;
139
139
  if (
140
140
  // create a source, but only if it's an own property and not a prototype property
141
- void 0 !== a3 || l2 && !((_a2 = i(t2, n3)) == null ? void 0 : _a2.writable) || (a3 = with_parent(() => state(proxy(l2 ? t2[n3] : T))), s2.set(n3, a3)), void 0 !== a3
141
+ void 0 !== a3 || l2 && !((_a2 = o(t2, n3)) == null ? void 0 : _a2.writable) || (a3 = with_parent(() => state(proxy(l2 ? t2[n3] : O))), i2.set(n3, a3)), void 0 !== a3
142
142
  ) {
143
143
  var c2 = get$1(a3);
144
- return c2 === T ? void 0 : c2;
144
+ return c2 === O ? void 0 : c2;
145
145
  }
146
- return Reflect.get(t2, n3, o3);
146
+ return Reflect.get(t2, n3, s3);
147
147
  },
148
148
  getOwnPropertyDescriptor(e3, t2) {
149
149
  var n3 = Reflect.getOwnPropertyDescriptor(e3, t2);
150
150
  if (n3 && "value" in n3) {
151
- var o3 = s2.get(t2);
152
- o3 && (n3.value = get$1(o3));
151
+ var s3 = i2.get(t2);
152
+ s3 && (n3.value = get$1(s3));
153
153
  } else if (void 0 === n3) {
154
- var i2 = s2.get(t2), a3 = i2 == null ? void 0 : i2.v;
155
- if (void 0 !== i2 && a3 !== T) return {
154
+ var o2 = i2.get(t2), a3 = o2 == null ? void 0 : o2.v;
155
+ if (void 0 !== o2 && a3 !== O) return {
156
156
  enumerable: true,
157
157
  configurable: true,
158
158
  value: a3,
@@ -164,28 +164,28 @@ function proxy(e2, n2) {
164
164
  has(e3, t2) {
165
165
  var _a2;
166
166
  if (t2 === C) return true;
167
- var n3 = s2.get(t2), o3 = void 0 !== n3 && n3.v !== T || Reflect.has(e3, t2);
168
- if ((void 0 !== n3 || null !== V && (!o3 || ((_a2 = i(e3, t2)) == null ? void 0 : _a2.writable))) && (void 0 === n3 && (n3 = with_parent(() => state(o3 ? proxy(e3[t2]) : T)), s2.set(t2, n3)), get$1(n3) === T)) return false;
169
- return o3;
167
+ var n3 = i2.get(t2), s3 = void 0 !== n3 && n3.v !== O || Reflect.has(e3, t2);
168
+ if ((void 0 !== n3 || null !== V && (!s3 || ((_a2 = o(e3, t2)) == null ? void 0 : _a2.writable))) && (void 0 === n3 && (n3 = with_parent(() => state(s3 ? proxy(e3[t2]) : O)), i2.set(t2, n3)), get$1(n3) === O)) return false;
169
+ return s3;
170
170
  },
171
- set(e3, t2, n3, o3) {
171
+ set(e3, t2, n3, s3) {
172
172
  var _a2;
173
- var l2 = s2.get(t2), c2 = t2 in e3;
173
+ var l2 = i2.get(t2), c2 = t2 in e3;
174
174
  if (a2 && "length" === t2) for (var u2 = n3; u2 < /** @type {Source<number>} */
175
175
  l2.v; u2 += 1) {
176
- var f3 = s2.get(u2 + "");
177
- void 0 !== f3 ? set(f3, T) : u2 in e3 && // If the item exists in the original, we need to create a uninitialized source,
176
+ var f3 = i2.get(u2 + "");
177
+ void 0 !== f3 ? set(f3, O) : u2 in e3 && // If the item exists in the original, we need to create a uninitialized source,
178
178
  // else a later read of the property would result in a source being created with
179
179
  // the value of the original item at that index.
180
- (f3 = with_parent(() => state(T)), s2.set(u2 + "", f3));
180
+ (f3 = with_parent(() => state(O)), i2.set(u2 + "", f3));
181
181
  }
182
- void 0 === l2 ? c2 && !((_a2 = i(e3, t2)) == null ? void 0 : _a2.writable) || (set(l2 = with_parent(() => state(void 0)), with_parent(() => proxy(n3))), s2.set(t2, l2)) : (c2 = l2.v !== T, set(l2, with_parent(() => proxy(n3))));
182
+ void 0 === l2 ? c2 && !((_a2 = o(e3, t2)) == null ? void 0 : _a2.writable) || (set(l2 = with_parent(() => state(void 0)), with_parent(() => proxy(n3))), i2.set(t2, l2)) : (c2 = l2.v !== O, set(l2, with_parent(() => proxy(n3))));
183
183
  var p2 = Reflect.getOwnPropertyDescriptor(e3, t2);
184
- if ((p2 == null ? void 0 : p2.set) && p2.set.call(o3, n3), !c2) {
184
+ if ((p2 == null ? void 0 : p2.set) && p2.set.call(s3, n3), !c2) {
185
185
  if (a2 && "string" == typeof t2) {
186
186
  var _2 = (
187
187
  /** @type {Source<number>} */
188
- s2.get("length")
188
+ i2.get("length")
189
189
  ), g2 = Number(t2);
190
190
  Number.isInteger(g2) && g2 >= _2.v && set(_2, g2 + 1);
191
191
  }
@@ -196,10 +196,10 @@ function proxy(e2, n2) {
196
196
  ownKeys(e3) {
197
197
  get$1(d2);
198
198
  var t2 = Reflect.ownKeys(e3).filter((e4) => {
199
- var t3 = s2.get(e4);
200
- return void 0 === t3 || t3.v !== T;
199
+ var t3 = i2.get(e4);
200
+ return void 0 === t3 || t3.v !== O;
201
201
  });
202
- for (var [n3, o3] of s2) o3.v === T || n3 in e3 || t2.push(n3);
202
+ for (var [n3, s3] of i2) s3.v === O || n3 in e3 || t2.push(n3);
203
203
  return t2;
204
204
  },
205
205
  setPrototypeOf() {
@@ -235,7 +235,7 @@ function mutable_source(e2, t2 = false) {
235
235
  const n2 = source(e2);
236
236
  return t2 || (n2.equals = safe_equals), // bind the signal to the component context, in case we need to
237
237
  // track updates to trigger beforeUpdate/afterUpdate callbacks
238
- I && null !== O && null !== O.l && ((_a2 = O.l).s ?? (_a2.s = [])).push(n2), n2;
238
+ I && null !== T && null !== T.l && ((_a2 = T.l).s ?? (_a2.s = [])).push(n2), n2;
239
239
  }
240
240
  function set(e2, t2, n2 = false) {
241
241
  return null !== R && !U && is_runes() && 18 & R.f && !(K == null ? void 0 : K.includes(e2)) && function state_unsafe_mutation() {
@@ -259,15 +259,15 @@ function internal_set(e2, t2) {
259
259
  return t2;
260
260
  }
261
261
  function update(e2, t2 = 1) {
262
- var n2 = get$1(e2), o2 = 1 === t2 ? n2++ : n2--;
263
- return set(e2, n2), o2;
262
+ var n2 = get$1(e2), s2 = 1 === t2 ? n2++ : n2--;
263
+ return set(e2, n2), s2;
264
264
  }
265
265
  function mark_reactions(e2, t2) {
266
266
  var n2 = e2.reactions;
267
- if (null !== n2) for (var o2 = is_runes(), s2 = n2.length, i2 = 0; i2 < s2; i2++) {
268
- var a2 = n2[i2], l2 = a2.f;
267
+ if (null !== n2) for (var s2 = is_runes(), i2 = n2.length, o2 = 0; o2 < i2; o2++) {
268
+ var a2 = n2[o2], l2 = a2.f;
269
269
  l2 & m || // In legacy mode, skip the current effect to prevent infinite loops
270
- (o2 || a2 !== V) && (set_signal_status(a2, t2), // If the signal a) was previously clean or b) is an unowned derived, then mark it
270
+ (s2 || a2 !== V) && (set_signal_status(a2, t2), // If the signal a) was previously clean or b) is an unowned derived, then mark it
271
271
  1280 & l2 && (2 & l2 ? mark_reactions(
272
272
  /** @type {Derived} */
273
273
  a2,
@@ -278,17 +278,17 @@ function mark_reactions(e2, t2) {
278
278
  )));
279
279
  }
280
280
  }
281
- var q, W, z, D, E;
281
+ var q, W, z, E, j;
282
282
  function create_text(e2 = "") {
283
283
  return document.createTextNode(e2);
284
284
  }
285
285
  // @__NO_SIDE_EFFECTS__
286
286
  function get_first_child(e2) {
287
- return D.call(e2);
287
+ return E.call(e2);
288
288
  }
289
289
  // @__NO_SIDE_EFFECTS__
290
290
  function get_next_sibling(e2) {
291
- return E.call(e2);
291
+ return j.call(e2);
292
292
  }
293
293
  function child(e2, t2) {
294
294
  return /* @__PURE__ */ get_first_child(e2);
@@ -304,10 +304,10 @@ function first_child(e2, t2) {
304
304
  return n2 instanceof Comment && "" === n2.data ? /* @__PURE__ */ get_next_sibling(n2) : n2;
305
305
  }
306
306
  function sibling(e2, t2 = 1, n2 = false) {
307
- let o2 = e2;
308
- for (; t2--; ) o2 = /** @type {TemplateNode} */
309
- /* @__PURE__ */ get_next_sibling(o2);
310
- return o2;
307
+ let s2 = e2;
308
+ for (; t2--; ) s2 = /** @type {TemplateNode} */
309
+ /* @__PURE__ */ get_next_sibling(s2);
310
+ return s2;
311
311
  }
312
312
  // @__NO_SIDE_EFFECTS__
313
313
  function derived(e2) {
@@ -321,7 +321,7 @@ function derived(e2) {
321
321
  V.f |= x
322
322
  );
323
323
  return {
324
- ctx: O,
324
+ ctx: T,
325
325
  deps: null,
326
326
  effects: null,
327
327
  equals,
@@ -401,9 +401,9 @@ function validate_effect(e2) {
401
401
  throw new Error("https://svelte.dev/e/effect_in_teardown");
402
402
  }();
403
403
  }
404
- function create_effect(e2, t2, n2, o2 = true) {
405
- var s2 = V, i2 = {
406
- ctx: O,
404
+ function create_effect(e2, t2, n2, s2 = true) {
405
+ var i2 = V, o2 = {
406
+ ctx: T,
407
407
  deps: null,
408
408
  nodes_start: null,
409
409
  nodes_end: null,
@@ -412,39 +412,39 @@ function create_effect(e2, t2, n2, o2 = true) {
412
412
  fn: t2,
413
413
  last: null,
414
414
  next: null,
415
- parent: s2,
415
+ parent: i2,
416
416
  prev: null,
417
417
  teardown: null,
418
418
  transitions: null,
419
419
  wv: 0
420
420
  };
421
421
  if (n2) try {
422
- update_effect(i2), i2.f |= 32768;
422
+ update_effect(o2), o2.f |= 32768;
423
423
  } catch (e3) {
424
- throw destroy_effect(i2), e3;
424
+ throw destroy_effect(o2), e3;
425
425
  }
426
- else null !== t2 && schedule_effect(i2);
427
- if (!(n2 && null === i2.deps && null === i2.first && null === i2.nodes_start && null === i2.teardown && !(1048704 & i2.f)) && o2 && (null !== s2 && function push_effect(e3, t3) {
426
+ else null !== t2 && schedule_effect(o2);
427
+ if (!(n2 && null === o2.deps && null === o2.first && null === o2.nodes_start && null === o2.teardown && !(1048704 & o2.f)) && s2 && (null !== i2 && function push_effect(e3, t3) {
428
428
  var n3 = t3.last;
429
429
  null === n3 ? t3.last = t3.first = e3 : (n3.next = e3, e3.prev = n3, t3.last = e3);
430
- }(i2, s2), null !== R && 2 & R.f)) {
430
+ }(o2, i2), null !== R && 2 & R.f)) {
431
431
  var a2 = (
432
432
  /** @type {Derived} */
433
433
  R
434
434
  );
435
- (a2.effects ?? (a2.effects = [])).push(i2);
435
+ (a2.effects ?? (a2.effects = [])).push(o2);
436
436
  }
437
- return i2;
437
+ return o2;
438
438
  }
439
439
  function teardown(e2) {
440
440
  const t2 = create_effect(8, null, false);
441
441
  return set_signal_status(t2, h), t2.teardown = e2, t2;
442
442
  }
443
443
  function user_effect(e2) {
444
- if (validate_effect(), !(null !== V && !!(V.f & f) && null !== O && !O.m)) return effect(e2);
444
+ if (validate_effect(), !(null !== V && !!(V.f & f) && null !== T && !T.m)) return effect(e2);
445
445
  var t2 = (
446
446
  /** @type {ComponentContext} */
447
- O
447
+ T
448
448
  );
449
449
  (t2.e ?? (t2.e = [])).push({
450
450
  fn: e2,
@@ -458,21 +458,21 @@ function effect(e2) {
458
458
  function legacy_pre_effect(e2, t2) {
459
459
  var n2 = (
460
460
  /** @type {ComponentContextLegacy} */
461
- O
462
- ), o2 = {
461
+ T
462
+ ), s2 = {
463
463
  effect: null,
464
464
  ran: false
465
465
  };
466
- n2.l.r1.push(o2), o2.effect = render_effect(() => {
466
+ n2.l.r1.push(s2), s2.effect = render_effect(() => {
467
467
  e2(), // If this legacy pre effect has already run before the end of the reset, then
468
468
  // bail out to emulate the same behavior.
469
- o2.ran || (o2.ran = true, set(n2.l.r2, true), untrack(t2));
469
+ s2.ran || (s2.ran = true, set(n2.l.r2, true), untrack(t2));
470
470
  });
471
471
  }
472
472
  function legacy_pre_effect_reset() {
473
473
  var e2 = (
474
474
  /** @type {ComponentContextLegacy} */
475
- O
475
+ T
476
476
  );
477
477
  render_effect(() => {
478
478
  if (get$1(e2.l.r2)) {
@@ -488,8 +488,8 @@ function render_effect(e2) {
488
488
  return create_effect(8, e2, true);
489
489
  }
490
490
  function template_effect(e2, t2 = [], n2 = derived) {
491
- const o2 = t2.map(n2);
492
- return block(() => e2(...o2.map(get$1)));
491
+ const s2 = t2.map(n2);
492
+ return block(() => e2(...s2.map(get$1)));
493
493
  }
494
494
  function block(e2, t2 = 0) {
495
495
  return create_effect(24 | t2, e2, true);
@@ -512,22 +512,22 @@ function execute_effect_teardown(e2) {
512
512
  function destroy_effect_children(e2, t2 = false) {
513
513
  var n2 = e2.first;
514
514
  for (e2.first = e2.last = null; null !== n2; ) {
515
- var o2 = n2.next;
515
+ var s2 = n2.next;
516
516
  n2.f & p ? (
517
517
  // this is now an independent root
518
518
  n2.parent = null
519
- ) : destroy_effect(n2, t2), n2 = o2;
519
+ ) : destroy_effect(n2, t2), n2 = s2;
520
520
  }
521
521
  }
522
522
  function destroy_effect(e2, t2 = true) {
523
523
  var n2 = false;
524
524
  if ((t2 || 524288 & e2.f) && null !== e2.nodes_start) {
525
- for (var o2 = e2.nodes_start, s2 = e2.nodes_end; null !== o2; ) {
526
- var i2 = o2 === s2 ? null : (
525
+ for (var s2 = e2.nodes_start, i2 = e2.nodes_end; null !== s2; ) {
526
+ var o2 = s2 === i2 ? null : (
527
527
  /** @type {TemplateNode} */
528
- /* @__PURE__ */ get_next_sibling(o2)
528
+ /* @__PURE__ */ get_next_sibling(s2)
529
529
  );
530
- o2.remove(), o2 = i2;
530
+ s2.remove(), s2 = o2;
531
531
  }
532
532
  n2 = true;
533
533
  }
@@ -541,8 +541,8 @@ function destroy_effect(e2, t2 = true) {
541
541
  e2.next = e2.prev = e2.teardown = e2.ctx = e2.deps = e2.fn = e2.nodes_start = e2.nodes_end = null;
542
542
  }
543
543
  function unlink_effect(e2) {
544
- var t2 = e2.parent, n2 = e2.prev, o2 = e2.next;
545
- null !== n2 && (n2.next = o2), null !== o2 && (o2.prev = n2), null !== t2 && (t2.first === e2 && (t2.first = o2), t2.last === e2 && (t2.last = n2));
544
+ var t2 = e2.parent, n2 = e2.prev, s2 = e2.next;
545
+ null !== n2 && (n2.next = s2), null !== s2 && (s2.prev = n2), null !== t2 && (t2.first === e2 && (t2.first = s2), t2.last === e2 && (t2.last = n2));
546
546
  }
547
547
  function pause_effect(e2, t2) {
548
548
  var n2 = [];
@@ -554,15 +554,15 @@ function run_out_transitions(e2, t2) {
554
554
  var n2 = e2.length;
555
555
  if (n2 > 0) {
556
556
  var check = () => --n2 || t2();
557
- for (var o2 of e2) o2.out(check);
557
+ for (var s2 of e2) s2.out(check);
558
558
  } else t2();
559
559
  }
560
560
  function pause_children(e2, t2, n2) {
561
561
  if (!(e2.f & y)) {
562
- if (e2.f ^= y, null !== e2.transitions) for (const o3 of e2.transitions) (o3.is_global || n2) && t2.push(o3);
563
- for (var o2 = e2.first; null !== o2; ) {
564
- var s2 = o2.next;
565
- pause_children(o2, t2, !!(!!(o2.f & w) || !!(o2.f & f)) && n2), o2 = s2;
562
+ if (e2.f ^= y, null !== e2.transitions) for (const s3 of e2.transitions) (s3.is_global || n2) && t2.push(s3);
563
+ for (var s2 = e2.first; null !== s2; ) {
564
+ var i2 = s2.next;
565
+ pause_children(s2, t2, !!(!!(s2.f & w) || !!(s2.f & f)) && n2), s2 = i2;
566
566
  }
567
567
  }
568
568
  }
@@ -577,22 +577,22 @@ function resume_children(e2, t2) {
577
577
  // schedule the effect to update
578
578
  check_dirtiness(e2) && (set_signal_status(e2, m), schedule_effect(e2));
579
579
  for (var n2 = e2.first; null !== n2; ) {
580
- var o2 = n2.next;
581
- resume_children(n2, !!(!!(n2.f & w) || !!(n2.f & f)) && t2), n2 = o2;
580
+ var s2 = n2.next;
581
+ resume_children(n2, !!(!!(n2.f & w) || !!(n2.f & f)) && t2), n2 = s2;
582
582
  }
583
583
  if (null !== e2.transitions) for (const n3 of e2.transitions) (n3.is_global || t2) && n3.in();
584
584
  }
585
585
  }
586
- let j = [], N = [];
586
+ let D = [], N = [];
587
587
  function run_micro_tasks() {
588
- var e2 = j;
589
- j = [], run_all(e2);
588
+ var e2 = D;
589
+ D = [], run_all(e2);
590
590
  }
591
591
  function queue_micro_task(e2) {
592
- 0 === j.length && queueMicrotask(run_micro_tasks), j.push(e2);
592
+ 0 === D.length && queueMicrotask(run_micro_tasks), D.push(e2);
593
593
  }
594
594
  function flush_tasks() {
595
- j.length > 0 && run_micro_tasks(), N.length > 0 && function run_idle_tasks() {
595
+ D.length > 0 && run_micro_tasks(), N.length > 0 && function run_idle_tasks() {
596
596
  var e2 = N;
597
597
  N = [], run_all(e2);
598
598
  }();
@@ -625,33 +625,33 @@ function check_dirtiness(e2) {
625
625
  var t2 = e2.f;
626
626
  if (t2 & m) return true;
627
627
  if (t2 & b) {
628
- var n2 = e2.deps, o2 = !!(t2 & g);
628
+ var n2 = e2.deps, s2 = !!(t2 & g);
629
629
  if (null !== n2) {
630
- var s2, i2, a2 = !!(t2 & v), l2 = o2 && null !== V && !te, c2 = n2.length;
630
+ var i2, o2, a2 = !!(t2 & v), l2 = s2 && null !== V && !te, c2 = n2.length;
631
631
  if (a2 || l2) {
632
632
  var u2 = (
633
633
  /** @type {Derived} */
634
634
  e2
635
635
  ), d2 = u2.parent;
636
- for (s2 = 0; s2 < c2; s2++) i2 = n2[s2], // We always re-add all reactions (even duplicates) if the derived was
636
+ for (i2 = 0; i2 < c2; i2++) o2 = n2[i2], // We always re-add all reactions (even duplicates) if the derived was
637
637
  // previously disconnected, however we don't if it was unowned as we
638
638
  // de-duplicate dependencies in that case
639
- !a2 && ((_a2 = i2 == null ? void 0 : i2.reactions) == null ? void 0 : _a2.includes(u2)) || (i2.reactions ?? (i2.reactions = [])).push(u2);
639
+ !a2 && ((_a2 = o2 == null ? void 0 : o2.reactions) == null ? void 0 : _a2.includes(u2)) || (o2.reactions ?? (o2.reactions = [])).push(u2);
640
640
  a2 && (u2.f ^= v), // If the unowned derived is now fully connected to the graph again (it's unowned and reconnected, has a parent
641
641
  // and the parent is not unowned), then we can mark it as connected again, removing the need for the unowned
642
642
  // flag
643
643
  !l2 || null === d2 || d2.f & g || (u2.f ^= g);
644
644
  }
645
- for (s2 = 0; s2 < c2; s2++) if (check_dirtiness(i2 = n2[s2]) && update_derived(
645
+ for (i2 = 0; i2 < c2; i2++) if (check_dirtiness(o2 = n2[i2]) && update_derived(
646
646
  /** @type {Derived} */
647
- i2
648
- ), i2.wv > e2.wv) return true;
647
+ o2
648
+ ), o2.wv > e2.wv) return true;
649
649
  }
650
- o2 && (null === V || te) || set_signal_status(e2, h);
650
+ s2 && (null === V || te) || set_signal_status(e2, h);
651
651
  }
652
652
  return false;
653
653
  }
654
- function handle_error(e2, t2, n2, o2) {
654
+ function handle_error(e2, t2, n2, s2) {
655
655
  if (B) {
656
656
  if (null === n2 && (B = false), /**
657
657
  * @param {Effect} effect
@@ -672,23 +672,23 @@ function handle_error(e2, t2, n2, o2) {
672
672
  }(e2, t2);
673
673
  }
674
674
  function schedule_possible_effect_self_invalidation(e2, t2, n2 = true) {
675
- var o2 = e2.reactions;
676
- if (null !== o2) for (var s2 = 0; s2 < o2.length; s2++) {
677
- var i2 = o2[s2];
678
- (K == null ? void 0 : K.includes(e2)) || (2 & i2.f ? schedule_possible_effect_self_invalidation(
675
+ var s2 = e2.reactions;
676
+ if (null !== s2) for (var i2 = 0; i2 < s2.length; i2++) {
677
+ var o2 = s2[i2];
678
+ (K == null ? void 0 : K.includes(e2)) || (2 & o2.f ? schedule_possible_effect_self_invalidation(
679
679
  /** @type {Derived} */
680
- i2,
680
+ o2,
681
681
  t2,
682
682
  false
683
- ) : t2 === i2 && (n2 ? set_signal_status(i2, m) : i2.f & h && set_signal_status(i2, b), schedule_effect(
683
+ ) : t2 === o2 && (n2 ? set_signal_status(o2, m) : o2.f & h && set_signal_status(o2, b), schedule_effect(
684
684
  /** @type {Effect} */
685
- i2
685
+ o2
686
686
  )));
687
687
  }
688
688
  }
689
689
  function update_reaction(e2) {
690
690
  var _a2;
691
- var t2 = Y, n2 = Z, o2 = J, s2 = R, i2 = te, a2 = K, l2 = O, c2 = U, u2 = e2.f;
691
+ var t2 = Y, n2 = Z, s2 = J, i2 = R, o2 = te, a2 = K, l2 = T, c2 = U, u2 = e2.f;
692
692
  Y = /** @type {null | Value[]} */
693
693
  null, Z = 0, J = null, te = !!(u2 & g) && (U || !G || null === R), R = 96 & u2 ? null : e2, K = null, set_component_context(e2.ctx), U = false, ee++, e2.f |= k;
694
694
  try {
@@ -709,25 +709,25 @@ function update_reaction(e2) {
709
709
  /** @type {Effect} */
710
710
  e2
711
711
  );
712
- return null !== s2 && (ee++, null !== J && (null === o2 ? o2 = J : o2.push(.../** @type {Source[]} */
712
+ return null !== i2 && (ee++, null !== J && (null === s2 ? s2 = J : s2.push(.../** @type {Source[]} */
713
713
  J))), d2;
714
714
  } finally {
715
- Y = t2, Z = n2, J = o2, R = s2, te = i2, K = a2, set_component_context(l2), U = c2, e2.f ^= k;
715
+ Y = t2, Z = n2, J = s2, R = i2, te = o2, K = a2, set_component_context(l2), U = c2, e2.f ^= k;
716
716
  }
717
717
  }
718
718
  function remove_reaction(e2, t2) {
719
- let o2 = t2.reactions;
720
- if (null !== o2) {
721
- var s2 = n.call(o2, e2);
722
- if (-1 !== s2) {
723
- var i2 = o2.length - 1;
724
- 0 === i2 ? o2 = t2.reactions = null : (
719
+ let s2 = t2.reactions;
720
+ if (null !== s2) {
721
+ var i2 = n.call(s2, e2);
722
+ if (-1 !== i2) {
723
+ var o2 = s2.length - 1;
724
+ 0 === o2 ? s2 = t2.reactions = null : (
725
725
  // Swap with last element and then remove.
726
- (o2[s2] = o2[i2], o2.pop())
726
+ (s2[i2] = s2[o2], s2.pop())
727
727
  );
728
728
  }
729
729
  }
730
- null === o2 && 2 & t2.f && // Destroying a child effect while updating a parent effect can cause a dependency to appear
730
+ null === s2 && 2 & t2.f && // Destroying a child effect while updating a parent effect can cause a dependency to appear
731
731
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
732
732
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
733
733
  (null === Y || !Y.includes(t2)) && (set_signal_status(t2, b), // If we are working with a derived that is owned by an effect, then mark it as being
@@ -744,13 +744,13 @@ function remove_reaction(e2, t2) {
744
744
  }
745
745
  function remove_reactions(e2, t2) {
746
746
  var n2 = e2.deps;
747
- if (null !== n2) for (var o2 = t2; o2 < n2.length; o2++) remove_reaction(e2, n2[o2]);
747
+ if (null !== n2) for (var s2 = t2; s2 < n2.length; s2++) remove_reaction(e2, n2[s2]);
748
748
  }
749
749
  function update_effect(t2) {
750
750
  var n2 = t2.f;
751
751
  if (!(n2 & $)) {
752
752
  set_signal_status(t2, h);
753
- var o2 = V, s2 = O, i2 = G;
753
+ var s2 = V, i2 = T, o2 = G;
754
754
  V = t2, G = true;
755
755
  try {
756
756
  16 & n2 ? function destroy_block_effect_children(e2) {
@@ -764,9 +764,9 @@ function update_effect(t2) {
764
764
  t2.deps;
765
765
  e;
766
766
  } catch (e2) {
767
- handle_error(e2, t2, o2, s2 || t2.ctx);
767
+ handle_error(e2, t2, s2, i2 || t2.ctx);
768
768
  } finally {
769
- G = i2, V = o2;
769
+ G = o2, V = s2;
770
770
  }
771
771
  }
772
772
  }
@@ -786,10 +786,10 @@ function flush_queued_root_effects() {
786
786
  var t2 = 0;
787
787
  for (G = true; H.length > 0; ) {
788
788
  t2++ > 1e3 && infinite_loop_guard();
789
- var n2 = H, o2 = n2.length;
789
+ var n2 = H, s2 = n2.length;
790
790
  H = [];
791
- for (var s2 = 0; s2 < o2; s2++) {
792
- flush_queued_effects(process_effects(n2[s2]));
791
+ for (var i2 = 0; i2 < s2; i2++) {
792
+ flush_queued_effects(process_effects(n2[i2]));
793
793
  }
794
794
  }
795
795
  } finally {
@@ -799,22 +799,22 @@ function flush_queued_root_effects() {
799
799
  function flush_queued_effects(e2) {
800
800
  var t2 = e2.length;
801
801
  if (0 !== t2) for (var n2 = 0; n2 < t2; n2++) {
802
- var o2 = e2[n2];
803
- if (!(24576 & o2.f)) try {
804
- check_dirtiness(o2) && (update_effect(o2), // Effects with no dependencies or teardown do not get added to the effect tree.
802
+ var s2 = e2[n2];
803
+ if (!(24576 & s2.f)) try {
804
+ check_dirtiness(s2) && (update_effect(s2), // Effects with no dependencies or teardown do not get added to the effect tree.
805
805
  // Deferred effects (e.g. `$effect(...)`) _are_ added to the tree because we
806
806
  // don't know if we need to keep them until they are executed. Doing the check
807
807
  // here (rather than in `update_effect`) allows us to skip the work for
808
808
  // immediate effects.
809
- null === o2.deps && null === o2.first && null === o2.nodes_start && (null === o2.teardown ? (
809
+ null === s2.deps && null === s2.first && null === s2.nodes_start && (null === s2.teardown ? (
810
810
  // remove this effect from the graph
811
- unlink_effect(o2)
811
+ unlink_effect(s2)
812
812
  ) : (
813
813
  // keep the effect in the graph, but free up some memory
814
- o2.fn = null
814
+ s2.fn = null
815
815
  )));
816
816
  } catch (e3) {
817
- handle_error(e3, o2, null, o2.ctx);
817
+ handle_error(e3, s2, null, s2.ctx);
818
818
  }
819
819
  }
820
820
  }
@@ -831,18 +831,18 @@ function schedule_effect(e2) {
831
831
  }
832
832
  function process_effects(e2) {
833
833
  for (var t2 = [], n2 = e2; null !== n2; ) {
834
- var o2 = n2.f, s2 = !!(96 & o2);
835
- if (!(s2 && !!(o2 & h) || o2 & y)) {
836
- if (4 & o2) t2.push(n2);
837
- else if (s2) n2.f ^= h;
834
+ var s2 = n2.f, i2 = !!(96 & s2);
835
+ if (!(i2 && !!(s2 & h) || s2 & y)) {
836
+ if (4 & s2) t2.push(n2);
837
+ else if (i2) n2.f ^= h;
838
838
  else {
839
- var i2 = R;
839
+ var o2 = R;
840
840
  try {
841
841
  R = n2, check_dirtiness(n2) && update_effect(n2);
842
842
  } catch (e3) {
843
843
  handle_error(e3, n2, null, n2.ctx);
844
844
  } finally {
845
- R = i2;
845
+ R = o2;
846
846
  }
847
847
  }
848
848
  var a2 = n2.first;
@@ -872,18 +872,18 @@ function get$1(e2) {
872
872
  var n2 = (
873
873
  /** @type {Derived} */
874
874
  e2
875
- ), o2 = n2.parent;
876
- null === o2 || o2.f & g || // If the derived is owned by another derived then mark it as unowned
875
+ ), s2 = n2.parent;
876
+ null === s2 || s2.f & g || // If the derived is owned by another derived then mark it as unowned
877
877
  // as the derived value might have been referenced in a different context
878
878
  // since and thus its parent might not be its true owner anymore
879
879
  (n2.f ^= g);
880
880
  }
881
881
  } else if (!(K == null ? void 0 : K.includes(e2))) {
882
- var s2 = R.deps;
882
+ var i2 = R.deps;
883
883
  e2.rv < ee && (e2.rv = ee, // If the signal is accessing the same dependencies in the same
884
884
  // order as it did last time, increment `skipped_deps`
885
885
  // rather than updating `new_deps`, which creates GC cost
886
- null === Y && null !== s2 && s2[Z] === e2 ? Z++ : null === Y ? Y = [e2] : te && Y.includes(e2) || // Normally we can push duplicated dependencies to `new_deps`, but if we're inside
886
+ null === Y && null !== i2 && i2[Z] === e2 ? Z++ : null === Y ? Y = [e2] : te && Y.includes(e2) || // Normally we can push duplicated dependencies to `new_deps`, but if we're inside
887
887
  // an unowned derived because skip_reaction is true, then we need to ensure that
888
888
  // we don't have duplicates
889
889
  Y.push(e2));
@@ -925,9 +925,9 @@ function deep_read(e2, t2 = /* @__PURE__ */ new Set()) {
925
925
  if (n2 !== Object.prototype && n2 !== Array.prototype && n2 !== Map.prototype && n2 !== Set.prototype && n2 !== Date.prototype) {
926
926
  const t3 = a(n2);
927
927
  for (let n3 in t3) {
928
- const o2 = t3[n3].get;
929
- if (o2) try {
930
- o2.call(e2);
928
+ const s2 = t3[n3].get;
929
+ if (s2) try {
930
+ s2.call(e2);
931
931
  } catch (e3) {
932
932
  }
933
933
  }
@@ -941,7 +941,7 @@ const re = ["beforeinput", "click", "change", "dblclick", "contextmenu", "focusi
941
941
  function is_delegated(e2) {
942
942
  return re.includes(e2);
943
943
  }
944
- const oe = {
944
+ const se = {
945
945
  // no `class: 'className'` because we handle that separately
946
946
  formnovalidate: "formNoValidate",
947
947
  ismap: "isMap",
@@ -957,11 +957,11 @@ const oe = {
957
957
  disableremoteplayback: "disableRemotePlayback"
958
958
  };
959
959
  function normalize_attribute(e2) {
960
- return e2 = e2.toLowerCase(), oe[e2] ?? e2;
960
+ return e2 = e2.toLowerCase(), se[e2] ?? e2;
961
961
  }
962
- const se = ["touchstart", "touchmove"];
962
+ const ie = ["touchstart", "touchmove"];
963
963
  function is_passive_event(e2) {
964
- return se.includes(e2);
964
+ return ie.includes(e2);
965
965
  }
966
966
  function autofocus(e2, t2) {
967
967
  if (t2) {
@@ -971,7 +971,7 @@ function autofocus(e2, t2) {
971
971
  });
972
972
  }
973
973
  }
974
- let ie = false;
974
+ let oe = false;
975
975
  function without_reactive_context(e2) {
976
976
  var t2 = R, n2 = V;
977
977
  set_active_reaction(null), set_active_effect(null);
@@ -981,13 +981,13 @@ function without_reactive_context(e2) {
981
981
  set_active_reaction(t2), set_active_effect(n2);
982
982
  }
983
983
  }
984
- function listen_to_event_and_reset_event(e2, t2, n2, o2 = n2) {
984
+ function listen_to_event_and_reset_event(e2, t2, n2, s2 = n2) {
985
985
  e2.addEventListener(t2, () => without_reactive_context(n2));
986
- const s2 = e2.__on_r;
987
- e2.__on_r = s2 ? () => {
988
- s2(), o2(true);
989
- } : () => o2(true), function add_form_reset_listener() {
990
- ie || (ie = true, document.addEventListener(
986
+ const i2 = e2.__on_r;
987
+ e2.__on_r = i2 ? () => {
988
+ i2(), s2(true);
989
+ } : () => s2(true), function add_form_reset_listener() {
990
+ oe || (oe = true, document.addEventListener(
991
991
  "reset",
992
992
  (e3) => {
993
993
  Promise.resolve().then(() => {
@@ -1008,22 +1008,22 @@ function listen_to_event_and_reset_event(e2, t2, n2, o2 = n2) {
1008
1008
  }();
1009
1009
  }
1010
1010
  const ae = /* @__PURE__ */ new Set(), le = /* @__PURE__ */ new Set();
1011
- function create_event(e2, t2, n2, o2 = {}) {
1011
+ function create_event(e2, t2, n2, s2 = {}) {
1012
1012
  function target_handler(e3) {
1013
- if (o2.capture || // Only call in the bubble phase, else delegated events would be called before the capturing events
1013
+ if (s2.capture || // Only call in the bubble phase, else delegated events would be called before the capturing events
1014
1014
  handle_event_propagation.call(t2, e3), !e3.cancelBubble) return without_reactive_context(() => n2 == null ? void 0 : n2.call(this, e3));
1015
1015
  }
1016
1016
  return e2.startsWith("pointer") || e2.startsWith("touch") || "wheel" === e2 ? queue_micro_task(() => {
1017
- t2.addEventListener(e2, target_handler, o2);
1018
- }) : t2.addEventListener(e2, target_handler, o2), target_handler;
1019
- }
1020
- function event(e2, t2, n2, o2, s2) {
1021
- var i2 = {
1022
- capture: o2,
1023
- passive: s2
1024
- }, a2 = create_event(e2, t2, n2, i2);
1017
+ t2.addEventListener(e2, target_handler, s2);
1018
+ }) : t2.addEventListener(e2, target_handler, s2), target_handler;
1019
+ }
1020
+ function event(e2, t2, n2, s2, i2) {
1021
+ var o2 = {
1022
+ capture: s2,
1023
+ passive: i2
1024
+ }, a2 = create_event(e2, t2, n2, o2);
1025
1025
  t2 !== document.body && t2 !== window && t2 !== document || teardown(() => {
1026
- t2.removeEventListener(e2, a2, i2);
1026
+ t2.removeEventListener(e2, a2, o2);
1027
1027
  });
1028
1028
  }
1029
1029
  function delegate(e2) {
@@ -1032,10 +1032,10 @@ function delegate(e2) {
1032
1032
  }
1033
1033
  function handle_event_propagation(e2) {
1034
1034
  var _a2;
1035
- var n2 = this, o2 = (
1035
+ var n2 = this, s2 = (
1036
1036
  /** @type {Node} */
1037
1037
  n2.ownerDocument
1038
- ), i2 = e2.type, a2 = ((_a2 = e2.composedPath) == null ? void 0 : _a2.call(e2)) || [], l2 = (
1038
+ ), o2 = e2.type, a2 = ((_a2 = e2.composedPath) == null ? void 0 : _a2.call(e2)) || [], l2 = (
1039
1039
  /** @type {null | Element} */
1040
1040
  a2[0] || e2.target
1041
1041
  ), c2 = 0, u2 = e2.__root;
@@ -1051,9 +1051,9 @@ function handle_event_propagation(e2) {
1051
1051
  }
1052
1052
  if ((l2 = /** @type {Element} */
1053
1053
  a2[c2] || e2.target) !== n2) {
1054
- s(e2, "currentTarget", {
1054
+ i(e2, "currentTarget", {
1055
1055
  configurable: true,
1056
- get: () => l2 || o2
1056
+ get: () => l2 || s2
1057
1057
  });
1058
1058
  var p2 = R, _2 = V;
1059
1059
  set_active_reaction(null), set_active_effect(null);
@@ -1062,7 +1062,7 @@ function handle_event_propagation(e2) {
1062
1062
  var h2 = l2.assignedSlot || l2.parentNode || /** @type {any} */
1063
1063
  l2.host || null;
1064
1064
  try {
1065
- var m2 = l2["__" + i2];
1065
+ var m2 = l2["__" + o2];
1066
1066
  if (null != m2 && (!/** @type {any} */
1067
1067
  l2.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
1068
1068
  // -> the target could not have been disabled because it emits the event in the first place
@@ -1102,15 +1102,15 @@ function assign_nodes(e2, t2) {
1102
1102
  }
1103
1103
  // @__NO_SIDE_EFFECTS__
1104
1104
  function template(e2, t2) {
1105
- var n2, o2 = !!(1 & t2), s2 = !!(2 & t2), i2 = !e2.startsWith("<!>");
1105
+ var n2, s2 = !!(1 & t2), i2 = !!(2 & t2), o2 = !e2.startsWith("<!>");
1106
1106
  return () => {
1107
- void 0 === n2 && (n2 = create_fragment_from_html(i2 ? e2 : "<!>" + e2), o2 || (n2 = /** @type {Node} */
1107
+ void 0 === n2 && (n2 = create_fragment_from_html(o2 ? e2 : "<!>" + e2), s2 || (n2 = /** @type {Node} */
1108
1108
  /* @__PURE__ */ get_first_child(n2)));
1109
1109
  var t3 = (
1110
1110
  /** @type {TemplateNode} */
1111
- s2 || z ? document.importNode(n2, true) : n2.cloneNode(true)
1111
+ i2 || z ? document.importNode(n2, true) : n2.cloneNode(true)
1112
1112
  );
1113
- o2 ? assign_nodes(
1113
+ s2 ? assign_nodes(
1114
1114
  /** @type {TemplateNode} */
1115
1115
  /* @__PURE__ */ get_first_child(t3),
1116
1116
  /** @type {TemplateNode} */
@@ -1121,22 +1121,22 @@ function template(e2, t2) {
1121
1121
  }
1122
1122
  // @__NO_SIDE_EFFECTS__
1123
1123
  function ns_template(e2, t2, n2 = "svg") {
1124
- var o2, s2 = `<${n2}>${!e2.startsWith("<!>") ? e2 : "<!>" + e2}</${n2}>`;
1124
+ var s2, i2 = `<${n2}>${!e2.startsWith("<!>") ? e2 : "<!>" + e2}</${n2}>`;
1125
1125
  return () => {
1126
- if (!o2) {
1126
+ if (!s2) {
1127
1127
  var e3 = (
1128
1128
  /** @type {Element} */
1129
1129
  /* @__PURE__ */ get_first_child(
1130
1130
  /** @type {DocumentFragment} */
1131
- create_fragment_from_html(s2)
1131
+ create_fragment_from_html(i2)
1132
1132
  )
1133
1133
  );
1134
- o2 = /** @type {Element} */
1134
+ s2 = /** @type {Element} */
1135
1135
  /* @__PURE__ */ get_first_child(e3);
1136
1136
  }
1137
1137
  var t3 = (
1138
1138
  /** @type {TemplateNode} */
1139
- o2.cloneNode(true)
1139
+ s2.cloneNode(true)
1140
1140
  );
1141
1141
  return assign_nodes(t3, t3), t3;
1142
1142
  };
@@ -1165,7 +1165,7 @@ function set_text(e2, t2) {
1165
1165
  (e2.__t = n2, e2.nodeValue = n2 + "");
1166
1166
  }
1167
1167
  function mount(e2, t2) {
1168
- return function _mount(e3, { target: t3, anchor: n2, props: s2 = {}, events: a2, context: l2, intro: c2 = true }) {
1168
+ return function _mount(e3, { target: t3, anchor: n2, props: i2 = {}, events: a2, context: l2, intro: c2 = true }) {
1169
1169
  !/**
1170
1170
  * Initialize these lazily to avoid issues when using the runtime in a server context
1171
1171
  * where these globals are not available while avoiding a separate server entry point
@@ -1174,8 +1174,8 @@ function mount(e2, t2) {
1174
1174
  if (void 0 === q) {
1175
1175
  q = window, W = document, z = /Firefox/.test(navigator.userAgent);
1176
1176
  var e4 = Element.prototype, t4 = Node.prototype, n3 = Text.prototype;
1177
- D = i(t4, "firstChild").get, // @ts-ignore
1178
- E = i(t4, "nextSibling").get, d(e4) && // the following assignments improve perf of lookups on DOM nodes
1177
+ E = o(t4, "firstChild").get, // @ts-ignore
1178
+ j = o(t4, "nextSibling").get, d(e4) && // the following assignments improve perf of lookups on DOM nodes
1179
1179
  // @ts-expect-error
1180
1180
  (e4.__click = void 0, // @ts-expect-error
1181
1181
  e4.__className = void 0, // @ts-expect-error
@@ -1187,25 +1187,25 @@ function mount(e2, t2) {
1187
1187
  }();
1188
1188
  var u2 = /* @__PURE__ */ new Set(), event_handle = (e4) => {
1189
1189
  for (var n3 = 0; n3 < e4.length; n3++) {
1190
- var o2 = e4[n3];
1191
- if (!u2.has(o2)) {
1192
- u2.add(o2);
1193
- var s3 = is_passive_event(o2);
1194
- t3.addEventListener(o2, handle_event_propagation, {
1195
- passive: s3
1190
+ var s2 = e4[n3];
1191
+ if (!u2.has(s2)) {
1192
+ u2.add(s2);
1193
+ var i3 = is_passive_event(s2);
1194
+ t3.addEventListener(s2, handle_event_propagation, {
1195
+ passive: i3
1196
1196
  });
1197
- var i2 = ue.get(o2);
1198
- void 0 === i2 ? (
1197
+ var o2 = ue.get(s2);
1198
+ void 0 === o2 ? (
1199
1199
  // The document listener ensures we catch events that originate from elements that were
1200
1200
  // manually moved outside of the container (e.g. via manual portals).
1201
- (document.addEventListener(o2, handle_event_propagation, {
1202
- passive: s3
1203
- }), ue.set(o2, 1))
1204
- ) : ue.set(o2, i2 + 1);
1201
+ (document.addEventListener(s2, handle_event_propagation, {
1202
+ passive: i3
1203
+ }), ue.set(s2, 1))
1204
+ ) : ue.set(s2, o2 + 1);
1205
1205
  }
1206
1206
  }
1207
1207
  };
1208
- event_handle(o(ae)), le.add(event_handle);
1208
+ event_handle(s(ae)), le.add(event_handle);
1209
1209
  var f2 = void 0, _2 = (
1210
1210
  /**
1211
1211
  * An effect root whose children can transition out
@@ -1220,25 +1220,25 @@ function mount(e2, t2) {
1220
1220
  }) : (destroy_effect(t4), n3(void 0));
1221
1221
  });
1222
1222
  }(() => {
1223
- var o2 = n2 ?? t3.appendChild(create_text());
1223
+ var s2 = n2 ?? t3.appendChild(create_text());
1224
1224
  return branch(() => {
1225
1225
  l2 && (push({}), /** @type {ComponentContext} */
1226
- O.c = l2);
1226
+ T.c = l2);
1227
1227
  a2 && // We can't spread the object or else we'd lose the state proxy stuff, if it is one
1228
1228
  /** @type {any} */
1229
- (s2.$$events = a2), ce = c2, // @ts-expect-error the public typings are not what the actual function looks like
1230
- f2 = e3(o2, s2) || {}, ce = true, l2 && pop();
1229
+ (i2.$$events = a2), ce = c2, // @ts-expect-error the public typings are not what the actual function looks like
1230
+ f2 = e3(s2, i2) || {}, ce = true, l2 && pop();
1231
1231
  }), () => {
1232
1232
  var _a2;
1233
1233
  for (var e4 of u2) {
1234
1234
  t3.removeEventListener(e4, handle_event_propagation);
1235
- var s3 = (
1235
+ var i3 = (
1236
1236
  /** @type {number} */
1237
1237
  ue.get(e4)
1238
1238
  );
1239
- 0 == --s3 ? (document.removeEventListener(e4, handle_event_propagation), ue.delete(e4)) : ue.set(e4, s3);
1239
+ 0 == --i3 ? (document.removeEventListener(e4, handle_event_propagation), ue.delete(e4)) : ue.set(e4, i3);
1240
1240
  }
1241
- le.delete(event_handle), o2 !== n2 && ((_a2 = o2.parentNode) == null ? void 0 : _a2.removeChild(o2));
1241
+ le.delete(event_handle), s2 !== n2 && ((_a2 = s2.parentNode) == null ? void 0 : _a2.removeChild(s2));
1242
1242
  };
1243
1243
  })
1244
1244
  );
@@ -1247,15 +1247,15 @@ function mount(e2, t2) {
1247
1247
  }
1248
1248
  const ue = /* @__PURE__ */ new Map();
1249
1249
  let de = /* @__PURE__ */ new WeakMap();
1250
- function if_block(e2, t2, [n2, o2] = [0, 0]) {
1251
- var s2 = e2, i2 = null, a2 = null, l2 = T, c2 = false;
1250
+ function if_block(e2, t2, [n2, s2] = [0, 0]) {
1251
+ var i2 = e2, o2 = null, a2 = null, l2 = O, c2 = false;
1252
1252
  const set_branch = (e3, t3 = true) => {
1253
1253
  c2 = true, update_branch(t3, e3);
1254
1254
  }, update_branch = (e3, t3) => {
1255
- l2 !== (l2 = e3) && (l2 ? (i2 ? resume_effect(i2) : t3 && (i2 = branch(() => t3(s2))), a2 && pause_effect(a2, () => {
1255
+ l2 !== (l2 = e3) && (l2 ? (o2 ? resume_effect(o2) : t3 && (o2 = branch(() => t3(i2))), a2 && pause_effect(a2, () => {
1256
1256
  a2 = null;
1257
- })) : (a2 ? resume_effect(a2) : t3 && (a2 = branch(() => t3(s2, [n2 + 1, o2]))), i2 && pause_effect(i2, () => {
1258
- i2 = null;
1257
+ })) : (a2 ? resume_effect(a2) : t3 && (a2 = branch(() => t3(i2, [n2 + 1, s2]))), o2 && pause_effect(o2, () => {
1258
+ o2 = null;
1259
1259
  })));
1260
1260
  };
1261
1261
  block(() => {
@@ -1269,7 +1269,7 @@ function set_current_each_item(e2) {
1269
1269
  function index(e2, t2) {
1270
1270
  return t2;
1271
1271
  }
1272
- function each(e2, n2, s2, i2, a2, l2 = null) {
1272
+ function each(e2, n2, i2, o2, a2, l2 = null) {
1273
1273
  var c2 = e2, u2 = {
1274
1274
  flags: n2,
1275
1275
  items: /* @__PURE__ */ new Map(),
@@ -1278,8 +1278,8 @@ function each(e2, n2, s2, i2, a2, l2 = null) {
1278
1278
  !(4 & n2) || (c2 = /** @type {Element} */
1279
1279
  e2.appendChild(create_text()));
1280
1280
  var d2 = null, f2 = false, p2 = /* @__PURE__ */ derived_safe_equal(() => {
1281
- var e3 = s2();
1282
- return t(e3) ? e3 : null == e3 ? [] : o(e3);
1281
+ var e3 = i2();
1282
+ return t(e3) ? e3 : null == e3 ? [] : s(e3);
1283
1283
  });
1284
1284
  block(() => {
1285
1285
  var e3 = get$1(p2), t2 = e3.length;
@@ -1295,12 +1295,12 @@ function each(e2, n2, s2, i2, a2, l2 = null) {
1295
1295
  * @param {() => V[]} get_collection
1296
1296
  * @returns {void}
1297
1297
  */
1298
- function reconcile(e4, t3, n3, s3, i3, a3, l3) {
1298
+ function reconcile(e4, t3, n3, i3, o3, a3, l3) {
1299
1299
  var _a2, _b2, _c2, _d;
1300
- var c3, u3, d3, f3, p3, _2, g2 = !!(8 & i3), v2 = !!(3 & i3), h2 = e4.length, m2 = t3.items, b2 = t3.first, $2 = b2, w2 = null, x2 = [], k2 = [];
1300
+ var c3, u3, d3, f3, p3, _2, g2 = !!(8 & o3), v2 = !!(3 & o3), h2 = e4.length, m2 = t3.items, b2 = t3.first, $2 = b2, w2 = null, x2 = [], k2 = [];
1301
1301
  if (g2) for (_2 = 0; _2 < h2; _2 += 1) f3 = a3(d3 = e4[_2], _2), void 0 !== (p3 = m2.get(f3)) && ((_a2 = p3.a) == null ? void 0 : _a2.measure(), (u3 ?? (u3 = /* @__PURE__ */ new Set())).add(p3));
1302
1302
  for (_2 = 0; _2 < h2; _2 += 1) if (f3 = a3(d3 = e4[_2], _2), void 0 !== (p3 = m2.get(f3))) {
1303
- if (v2 && update_item(p3, d3, _2, i3), p3.e.f & y && (resume_effect(p3.e), g2 && ((_b2 = p3.a) == null ? void 0 : _b2.unfix(), (u3 ?? (u3 = /* @__PURE__ */ new Set())).delete(p3))), p3 !== $2) {
1303
+ if (v2 && update_item(p3, d3, _2, o3), p3.e.f & y && (resume_effect(p3.e), g2 && ((_b2 = p3.a) == null ? void 0 : _b2.unfix(), (u3 ?? (u3 = /* @__PURE__ */ new Set())).delete(p3))), p3 !== $2) {
1304
1304
  if (void 0 !== c3 && c3.has(p3)) {
1305
1305
  if (x2.length < k2.length) {
1306
1306
  var C2, M2 = k2[0];
@@ -1323,21 +1323,21 @@ function each(e2, n2, s2, i2, a2, l2 = null) {
1323
1323
  w2 = create_item($2 ? (
1324
1324
  /** @type {TemplateNode} */
1325
1325
  $2.e.nodes_start
1326
- ) : n3, t3, w2, null === w2 ? t3.first : w2.next, d3, f3, _2, s3, i3, l3), m2.set(f3, w2), x2 = [], k2 = [], $2 = w2.next;
1326
+ ) : n3, t3, w2, null === w2 ? t3.first : w2.next, d3, f3, _2, i3, o3, l3), m2.set(f3, w2), x2 = [], k2 = [], $2 = w2.next;
1327
1327
  }
1328
1328
  if (null !== $2 || void 0 !== c3) {
1329
- for (var T2 = void 0 === c3 ? [] : o(c3); null !== $2; )
1330
- $2.e.f & y || T2.push($2), $2 = $2.next;
1331
- var O2 = T2.length;
1332
- if (O2 > 0) {
1333
- var P2 = 4 & i3 && 0 === h2 ? n3 : null;
1329
+ for (var O2 = void 0 === c3 ? [] : s(c3); null !== $2; )
1330
+ $2.e.f & y || O2.push($2), $2 = $2.next;
1331
+ var T2 = O2.length;
1332
+ if (T2 > 0) {
1333
+ var P2 = 4 & o3 && 0 === h2 ? n3 : null;
1334
1334
  if (g2) {
1335
- for (_2 = 0; _2 < O2; _2 += 1) (_c2 = T2[_2].a) == null ? void 0 : _c2.measure();
1336
- for (_2 = 0; _2 < O2; _2 += 1) (_d = T2[_2].a) == null ? void 0 : _d.fix();
1335
+ for (_2 = 0; _2 < T2; _2 += 1) (_c2 = O2[_2].a) == null ? void 0 : _c2.measure();
1336
+ for (_2 = 0; _2 < T2; _2 += 1) (_d = O2[_2].a) == null ? void 0 : _d.fix();
1337
1337
  }
1338
- !function pause_effects(e5, t4, n4, o2) {
1339
- for (var s4 = [], i4 = t4.length, a4 = 0; a4 < i4; a4++) pause_children(t4[a4].e, s4, true);
1340
- var l4 = i4 > 0 && 0 === s4.length && null !== n4;
1338
+ !function pause_effects(e5, t4, n4, s2) {
1339
+ for (var i4 = [], o4 = t4.length, a4 = 0; a4 < o4; a4++) pause_children(t4[a4].e, i4, true);
1340
+ var l4 = o4 > 0 && 0 === i4.length && null !== n4;
1341
1341
  if (l4) {
1342
1342
  var c4 = (
1343
1343
  /** @type {Element} */
@@ -1349,15 +1349,15 @@ function each(e2, n2, s2, i2, a2, l2 = null) {
1349
1349
  }(c4), c4.append(
1350
1350
  /** @type {Element} */
1351
1351
  n4
1352
- ), o2.clear(), link(e5, t4[0].prev, t4[i4 - 1].next);
1352
+ ), s2.clear(), link(e5, t4[0].prev, t4[o4 - 1].next);
1353
1353
  }
1354
- run_out_transitions(s4, () => {
1355
- for (var n5 = 0; n5 < i4; n5++) {
1356
- var s5 = t4[n5];
1357
- l4 || (o2.delete(s5.k), link(e5, s5.prev, s5.next)), destroy_effect(s5.e, !l4);
1354
+ run_out_transitions(i4, () => {
1355
+ for (var n5 = 0; n5 < o4; n5++) {
1356
+ var i5 = t4[n5];
1357
+ l4 || (s2.delete(i5.k), link(e5, i5.prev, i5.next)), destroy_effect(i5.e, !l4);
1358
1358
  }
1359
1359
  });
1360
- }(t3, T2, P2, m2);
1360
+ }(t3, O2, P2, m2);
1361
1361
  }
1362
1362
  }
1363
1363
  g2 && queue_micro_task(() => {
@@ -1366,7 +1366,7 @@ function each(e2, n2, s2, i2, a2, l2 = null) {
1366
1366
  });
1367
1367
  V.first = t3.first && t3.first.e, /** @type {Effect} */
1368
1368
  V.last = w2 && w2.e;
1369
- }(e3, u2, c2, a2, n2, i2, s2), null !== l2 && (0 === t2 ? d2 ? resume_effect(d2) : d2 = branch(() => l2(c2)) : null !== d2 && pause_effect(d2, () => {
1369
+ }(e3, u2, c2, a2, n2, o2, i2), null !== l2 && (0 === t2 ? d2 ? resume_effect(d2) : d2 = branch(() => l2(c2)) : null !== d2 && pause_effect(d2, () => {
1370
1370
  d2 = null;
1371
1371
  })), // When we mount the each block for the first time, the collection won't be
1372
1372
  // connected to this effect as the effect hasn't finished running yet and its deps
@@ -1377,151 +1377,151 @@ function each(e2, n2, s2, i2, a2, l2 = null) {
1377
1377
  get$1(p2));
1378
1378
  });
1379
1379
  }
1380
- function update_item(e2, t2, n2, o2) {
1381
- 1 & o2 && internal_set(e2.v, t2), 2 & o2 ? internal_set(
1380
+ function update_item(e2, t2, n2, s2) {
1381
+ 1 & s2 && internal_set(e2.v, t2), 2 & s2 ? internal_set(
1382
1382
  /** @type {Value<number>} */
1383
1383
  e2.i,
1384
1384
  n2
1385
1385
  ) : e2.i = n2;
1386
1386
  }
1387
- function create_item(e2, t2, n2, o2, s2, i2, a2, l2, c2, u2) {
1388
- var d2 = fe, f2 = !!(1 & c2) ? !(16 & c2) ? /* @__PURE__ */ mutable_source(s2) : source(s2) : s2, p2 = 2 & c2 ? source(a2) : a2, _2 = {
1387
+ function create_item(e2, t2, n2, s2, i2, o2, a2, l2, c2, u2) {
1388
+ var d2 = fe, f2 = !!(1 & c2) ? !(16 & c2) ? /* @__PURE__ */ mutable_source(i2) : source(i2) : i2, p2 = 2 & c2 ? source(a2) : a2, _2 = {
1389
1389
  i: p2,
1390
1390
  v: f2,
1391
- k: i2,
1391
+ k: o2,
1392
1392
  a: null,
1393
1393
  // @ts-expect-error
1394
1394
  e: null,
1395
1395
  prev: n2,
1396
- next: o2
1396
+ next: s2
1397
1397
  };
1398
1398
  fe = _2;
1399
1399
  try {
1400
- 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;
1400
+ return _2.e = branch(() => l2(e2, f2, p2, u2), false), _2.e.prev = n2 && n2.e, _2.e.next = s2 && s2.e, null === n2 ? t2.first = _2 : (n2.next = _2, n2.e.next = _2.e), null !== s2 && (s2.prev = _2, s2.e.prev = _2.e), _2;
1401
1401
  } finally {
1402
1402
  fe = d2;
1403
1403
  }
1404
1404
  }
1405
1405
  function move(e2, t2, n2) {
1406
- for (var o2 = e2.next ? (
1406
+ for (var s2 = e2.next ? (
1407
1407
  /** @type {TemplateNode} */
1408
1408
  e2.next.e.nodes_start
1409
- ) : n2, s2 = t2 ? (
1409
+ ) : n2, i2 = t2 ? (
1410
1410
  /** @type {TemplateNode} */
1411
1411
  t2.e.nodes_start
1412
- ) : n2, i2 = (
1412
+ ) : n2, o2 = (
1413
1413
  /** @type {TemplateNode} */
1414
1414
  e2.e.nodes_start
1415
- ); i2 !== o2; ) {
1415
+ ); o2 !== s2; ) {
1416
1416
  var a2 = (
1417
1417
  /** @type {TemplateNode} */
1418
- /* @__PURE__ */ get_next_sibling(i2)
1418
+ /* @__PURE__ */ get_next_sibling(o2)
1419
1419
  );
1420
- s2.before(i2), i2 = a2;
1420
+ i2.before(o2), o2 = a2;
1421
1421
  }
1422
1422
  }
1423
1423
  function link(e2, t2, n2) {
1424
1424
  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);
1425
1425
  }
1426
- function slot(e2, t2, n2, o2, s2) {
1426
+ function slot(e2, t2, n2, s2, i2) {
1427
1427
  var _a2;
1428
- var i2 = (_a2 = t2.$$slots) == null ? void 0 : _a2[n2], a2 = false;
1429
- true === i2 && (i2 = t2["default" === n2 ? "children" : n2], a2 = true), void 0 === i2 ? null !== s2 && s2(e2) : i2(e2, a2 ? () => o2 : o2);
1428
+ var o2 = (_a2 = t2.$$slots) == null ? void 0 : _a2[n2], a2 = false;
1429
+ true === o2 && (o2 = t2["default" === n2 ? "children" : n2], a2 = true), void 0 === o2 ? null !== i2 && i2(e2) : o2(e2, a2 ? () => s2 : s2);
1430
1430
  }
1431
1431
  function component(e2, t2, n2) {
1432
- var o2, s2, i2 = e2;
1432
+ var s2, i2, o2 = e2;
1433
1433
  block(() => {
1434
- o2 !== (o2 = t2()) && (s2 && (pause_effect(s2), s2 = null), o2 && (s2 = branch(() => n2(i2, o2))));
1434
+ s2 !== (s2 = t2()) && (i2 && (pause_effect(i2), i2 = null), s2 && (i2 = branch(() => n2(o2, s2))));
1435
1435
  }, w);
1436
1436
  }
1437
1437
  function r(e2) {
1438
- var t2, n2, o2 = "";
1439
- if ("string" == typeof e2 || "number" == typeof e2) o2 += e2;
1438
+ var t2, n2, s2 = "";
1439
+ if ("string" == typeof e2 || "number" == typeof e2) s2 += e2;
1440
1440
  else if ("object" == typeof e2) if (Array.isArray(e2)) {
1441
- var s2 = e2.length;
1442
- for (t2 = 0; t2 < s2; t2++) e2[t2] && (n2 = r(e2[t2])) && (o2 && (o2 += " "), o2 += n2);
1443
- } else for (n2 in e2) e2[n2] && (o2 && (o2 += " "), o2 += n2);
1444
- return o2;
1441
+ var i2 = e2.length;
1442
+ for (t2 = 0; t2 < i2; t2++) e2[t2] && (n2 = r(e2[t2])) && (s2 && (s2 += " "), s2 += n2);
1443
+ } else for (n2 in e2) e2[n2] && (s2 && (s2 += " "), s2 += n2);
1444
+ return s2;
1445
1445
  }
1446
1446
  function clsx(e2) {
1447
1447
  return "object" == typeof e2 ? function clsx$1() {
1448
- for (var e3, t2, n2 = 0, o2 = "", s2 = arguments.length; n2 < s2; n2++) (e3 = arguments[n2]) && (t2 = r(e3)) && (o2 && (o2 += " "), o2 += t2);
1449
- return o2;
1448
+ for (var e3, t2, n2 = 0, s2 = "", i2 = arguments.length; n2 < i2; n2++) (e3 = arguments[n2]) && (t2 = r(e3)) && (s2 && (s2 += " "), s2 += t2);
1449
+ return s2;
1450
1450
  }(e2) : e2 ?? "";
1451
1451
  }
1452
1452
  const pe = [..." \n\r\f \v\uFEFF"];
1453
1453
  function append_styles(e2, t2 = false) {
1454
- var n2 = t2 ? " !important;" : ";", o2 = "";
1455
- for (var s2 in e2) {
1456
- var i2 = e2[s2];
1457
- null != i2 && "" !== i2 && (o2 += " " + s2 + ": " + i2 + n2);
1454
+ var n2 = t2 ? " !important;" : ";", s2 = "";
1455
+ for (var i2 in e2) {
1456
+ var o2 = e2[i2];
1457
+ null != o2 && "" !== o2 && (s2 += " " + i2 + ": " + o2 + n2);
1458
1458
  }
1459
- return o2;
1459
+ return s2;
1460
1460
  }
1461
1461
  function to_css_name(e2) {
1462
1462
  return "-" !== e2[0] || "-" !== e2[1] ? e2.toLowerCase() : e2;
1463
1463
  }
1464
- function set_class(e2, t2, n2, o2, s2, i2) {
1464
+ function set_class(e2, t2, n2, s2, i2, o2) {
1465
1465
  var a2 = e2.__className;
1466
1466
  if (a2 !== n2 || void 0 === a2) {
1467
1467
  var l2 = function to_class(e3, t3, n3) {
1468
- var o3 = null == e3 ? "" : "" + e3;
1469
- if (t3 && (o3 = o3 ? o3 + " " + t3 : t3), n3) {
1470
- for (var s3 in n3) if (n3[s3]) o3 = o3 ? o3 + " " + s3 : s3;
1471
- else if (o3.length) for (var i3 = s3.length, a3 = 0; (a3 = o3.indexOf(s3, a3)) >= 0; ) {
1472
- var l3 = a3 + i3;
1473
- 0 !== a3 && !pe.includes(o3[a3 - 1]) || l3 !== o3.length && !pe.includes(o3[l3]) ? a3 = l3 : o3 = (0 === a3 ? "" : o3.substring(0, a3)) + o3.substring(l3 + 1);
1468
+ var s3 = null == e3 ? "" : "" + e3;
1469
+ if (t3 && (s3 = s3 ? s3 + " " + t3 : t3), n3) {
1470
+ for (var i3 in n3) if (n3[i3]) s3 = s3 ? s3 + " " + i3 : i3;
1471
+ else if (s3.length) for (var o3 = i3.length, a3 = 0; (a3 = s3.indexOf(i3, a3)) >= 0; ) {
1472
+ var l3 = a3 + o3;
1473
+ 0 !== a3 && !pe.includes(s3[a3 - 1]) || l3 !== s3.length && !pe.includes(s3[l3]) ? a3 = l3 : s3 = (0 === a3 ? "" : s3.substring(0, a3)) + s3.substring(l3 + 1);
1474
1474
  }
1475
1475
  }
1476
- return "" === o3 ? null : o3;
1477
- }(n2, o2, i2);
1476
+ return "" === s3 ? null : s3;
1477
+ }(n2, s2, o2);
1478
1478
  null == l2 ? e2.removeAttribute("class") : t2 ? e2.className = l2 : e2.setAttribute("class", l2), // @ts-expect-error need to add __className to patched prototype
1479
1479
  e2.__className = n2;
1480
- } else if (i2 && s2 !== i2) for (var c2 in i2) {
1481
- var u2 = !!i2[c2];
1482
- null != s2 && u2 === !!s2[c2] || e2.classList.toggle(c2, u2);
1480
+ } else if (o2 && i2 !== o2) for (var c2 in o2) {
1481
+ var u2 = !!o2[c2];
1482
+ null != i2 && u2 === !!i2[c2] || e2.classList.toggle(c2, u2);
1483
1483
  }
1484
- return i2;
1484
+ return o2;
1485
1485
  }
1486
- function update_styles(e2, t2 = {}, n2, o2) {
1487
- for (var s2 in n2) {
1488
- var i2 = n2[s2];
1489
- t2[s2] !== i2 && (null == n2[s2] ? e2.style.removeProperty(s2) : e2.style.setProperty(s2, i2, o2));
1486
+ function update_styles(e2, t2 = {}, n2, s2) {
1487
+ for (var i2 in n2) {
1488
+ var o2 = n2[i2];
1489
+ t2[i2] !== o2 && (null == n2[i2] ? e2.style.removeProperty(i2) : e2.style.setProperty(i2, o2, s2));
1490
1490
  }
1491
1491
  }
1492
- function set_style(e2, t2, n2, o2) {
1492
+ function set_style(e2, t2, n2, s2) {
1493
1493
  if (e2.__style !== t2) {
1494
- var s2 = function to_style(e3, t3) {
1494
+ var i2 = function to_style(e3, t3) {
1495
1495
  if (t3) {
1496
- var n3, o3, s3 = "";
1497
- if (Array.isArray(t3) ? (n3 = t3[0], o3 = t3[1]) : n3 = t3, e3) {
1496
+ var n3, s3, i3 = "";
1497
+ if (Array.isArray(t3) ? (n3 = t3[0], s3 = t3[1]) : n3 = t3, e3) {
1498
1498
  e3 = String(e3).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
1499
- var i2 = false, a2 = 0, l2 = false, c2 = [];
1500
- n3 && c2.push(...Object.keys(n3).map(to_css_name)), o3 && c2.push(...Object.keys(o3).map(to_css_name));
1499
+ var o2 = false, a2 = 0, l2 = false, c2 = [];
1500
+ n3 && c2.push(...Object.keys(n3).map(to_css_name)), s3 && c2.push(...Object.keys(s3).map(to_css_name));
1501
1501
  var u2 = 0, d2 = -1;
1502
1502
  const t4 = e3.length;
1503
1503
  for (var f2 = 0; f2 < t4; f2++) {
1504
1504
  var p2 = e3[f2];
1505
- if (l2 ? "/" === p2 && "*" === e3[f2 - 1] && (l2 = false) : i2 ? i2 === p2 && (i2 = false) : "/" === p2 && "*" === e3[f2 + 1] ? l2 = true : '"' === p2 || "'" === p2 ? i2 = p2 : "(" === p2 ? a2++ : ")" === p2 && a2--, !l2 && false === i2 && 0 === a2) {
1505
+ if (l2 ? "/" === p2 && "*" === e3[f2 - 1] && (l2 = false) : o2 ? o2 === p2 && (o2 = false) : "/" === p2 && "*" === e3[f2 + 1] ? l2 = true : '"' === p2 || "'" === p2 ? o2 = p2 : "(" === p2 ? a2++ : ")" === p2 && a2--, !l2 && false === o2 && 0 === a2) {
1506
1506
  if (":" === p2 && -1 === d2) d2 = f2;
1507
1507
  else if (";" === p2 || f2 === t4 - 1) {
1508
1508
  if (-1 !== d2) {
1509
1509
  var _2 = to_css_name(e3.substring(u2, d2).trim());
1510
- c2.includes(_2) || (";" !== p2 && f2++, s3 += " " + e3.substring(u2, f2).trim() + ";");
1510
+ c2.includes(_2) || (";" !== p2 && f2++, i3 += " " + e3.substring(u2, f2).trim() + ";");
1511
1511
  }
1512
1512
  u2 = f2 + 1, d2 = -1;
1513
1513
  }
1514
1514
  }
1515
1515
  }
1516
1516
  }
1517
- return n3 && (s3 += append_styles(n3)), o3 && (s3 += append_styles(o3, true)), "" === (s3 = s3.trim()) ? null : s3;
1517
+ return n3 && (i3 += append_styles(n3)), s3 && (i3 += append_styles(s3, true)), "" === (i3 = i3.trim()) ? null : i3;
1518
1518
  }
1519
1519
  return null == e3 ? null : String(e3);
1520
- }(t2, o2);
1521
- null == s2 ? e2.removeAttribute("style") : e2.style.cssText = s2, // @ts-expect-error
1520
+ }(t2, s2);
1521
+ null == i2 ? e2.removeAttribute("style") : e2.style.cssText = i2, // @ts-expect-error
1522
1522
  e2.__style = t2;
1523
- } else o2 && (Array.isArray(o2) ? (update_styles(e2, n2 == null ? void 0 : n2[0], o2[0]), update_styles(e2, n2 == null ? void 0 : n2[1], o2[1], "important")) : update_styles(e2, n2, o2));
1524
- return o2;
1523
+ } else s2 && (Array.isArray(s2) ? (update_styles(e2, n2 == null ? void 0 : n2[0], s2[0]), update_styles(e2, n2 == null ? void 0 : n2[1], s2[1], "important")) : update_styles(e2, n2, s2));
1524
+ return s2;
1525
1525
  }
1526
1526
  const _e = Symbol("class"), ge = Symbol("style"), ve = Symbol("is custom element"), he = Symbol("is html");
1527
1527
  function set_selected(e2, t2) {
@@ -1531,18 +1531,18 @@ function set_selected(e2, t2) {
1531
1531
  e2.hasAttribute("selected") || e2.setAttribute("selected", "")
1532
1532
  ) : e2.removeAttribute("selected");
1533
1533
  }
1534
- function set_attribute(e2, t2, n2, o2) {
1535
- var s2 = get_attributes(e2);
1536
- s2[t2] !== (s2[t2] = n2) && ("loading" === t2 && // @ts-expect-error
1534
+ function set_attribute(e2, t2, n2, s2) {
1535
+ var i2 = get_attributes(e2);
1536
+ i2[t2] !== (i2[t2] = n2) && ("loading" === t2 && // @ts-expect-error
1537
1537
  (e2[S] = n2), null == n2 ? e2.removeAttribute(t2) : "string" != typeof n2 && get_setters(e2).includes(t2) ? (
1538
1538
  // @ts-ignore
1539
1539
  e2[t2] = n2
1540
1540
  ) : e2.setAttribute(t2, n2));
1541
1541
  }
1542
- function set_attributes(e2, t2, n2, o2, s2 = false) {
1543
- var i2 = get_attributes(e2), a2 = i2[ve], l2 = !i2[he], c2 = t2 || {}, u2 = "OPTION" === e2.tagName;
1542
+ function set_attributes(e2, t2, n2, s2, i2 = false) {
1543
+ var o2 = get_attributes(e2), a2 = o2[ve], l2 = !o2[he], c2 = t2 || {}, u2 = "OPTION" === e2.tagName;
1544
1544
  for (var d2 in t2) d2 in n2 || (n2[d2] = null);
1545
- n2.class ? n2.class = clsx(n2.class) : (o2 || n2[_e]) && (n2.class = null), n2[ge] && (n2.style ?? (n2.style = null));
1545
+ n2.class ? n2.class = clsx(n2.class) : (s2 || n2[_e]) && (n2.class = null), n2[ge] && (n2.style ?? (n2.style = null));
1546
1546
  var f2 = get_setters(e2);
1547
1547
  for (const m2 in n2) {
1548
1548
  let b2 = n2[m2];
@@ -1591,7 +1591,7 @@ function set_attributes(e2, t2, n2, o2, s2 = false) {
1591
1591
  // @ts-ignore
1592
1592
  e2[v2] = b2
1593
1593
  ) : "function" != typeof b2 && set_attribute(e2, v2, b2);
1594
- else if (i2[m2] = null, "value" === v2 || "checked" === v2) {
1594
+ else if (o2[m2] = null, "value" === v2 || "checked" === v2) {
1595
1595
  let x2 = (
1596
1596
  /** @type {HTMLInputElement} */
1597
1597
  e2
@@ -1611,7 +1611,7 @@ function set_attributes(e2, t2, n2, o2, s2 = false) {
1611
1611
  e2.value = e2.__value = b2;
1612
1612
  }
1613
1613
  } else set_style(e2, b2, t2 == null ? void 0 : t2[ge], n2[ge]), c2[m2] = b2, c2[ge] = n2[ge];
1614
- else set_class(e2, "http://www.w3.org/1999/xhtml" === e2.namespaceURI, b2, o2, t2 == null ? void 0 : t2[_e], n2[_e]), c2[m2] = b2, c2[_e] = n2[_e];
1614
+ else set_class(e2, "http://www.w3.org/1999/xhtml" === e2.namespaceURI, b2, s2, t2 == null ? void 0 : t2[_e], n2[_e]), c2[m2] = b2, c2[_e] = n2[_e];
1615
1615
  }
1616
1616
  return c2;
1617
1617
  }
@@ -1626,9 +1626,9 @@ function get_setters(e2) {
1626
1626
  var t2, n2 = me.get(e2.nodeName);
1627
1627
  if (n2) return n2;
1628
1628
  me.set(e2.nodeName, n2 = []);
1629
- for (var o2 = e2, s2 = Element.prototype; s2 !== o2; ) {
1630
- for (var i2 in t2 = a(o2)) t2[i2].set && n2.push(i2);
1631
- o2 = u(o2);
1629
+ for (var s2 = e2, i2 = Element.prototype; i2 !== s2; ) {
1630
+ for (var o2 in t2 = a(s2)) t2[o2].set && n2.push(o2);
1631
+ s2 = u(s2);
1632
1632
  }
1633
1633
  return n2;
1634
1634
  }
@@ -1667,71 +1667,76 @@ function css_property_to_camelcase(e2) {
1667
1667
  function css_to_keyframe(e2) {
1668
1668
  const t2 = {}, n2 = e2.split(";");
1669
1669
  for (const e3 of n2) {
1670
- const [n3, o2] = e3.split(":");
1671
- if (!n3 || void 0 === o2) break;
1672
- t2[css_property_to_camelcase(n3.trim())] = o2.trim();
1670
+ const [n3, s2] = e3.split(":");
1671
+ if (!n3 || void 0 === s2) break;
1672
+ t2[css_property_to_camelcase(n3.trim())] = s2.trim();
1673
1673
  }
1674
1674
  return t2;
1675
1675
  }
1676
- const linear = (e2) => e2;
1677
- function transition(e2, t2, n2, o2) {
1678
- var s2, i2, a2, l2 = !!(4 & e2), c2 = t2.inert, u2 = t2.style.overflow;
1676
+ const linear$1 = (e2) => e2;
1677
+ function transition(e2, t2, n2, s2) {
1678
+ var i2, o2, a2, l2 = !!(1 & e2), c2 = !!(2 & e2), u2 = !!(4 & e2), d2 = l2 && c2 ? "both" : l2 ? "in" : "out", f2 = t2.inert, p2 = t2.style.overflow;
1679
1679
  function get_options() {
1680
- var e3 = R, i3 = V;
1680
+ var e3 = R, o3 = V;
1681
1681
  set_active_reaction(null), set_active_effect(null);
1682
1682
  try {
1683
- return s2 ?? (s2 = n2()(t2, (o2 == null ? void 0 : o2()) ?? /** @type {P} */
1683
+ return i2 ?? (i2 = n2()(t2, (s2 == null ? void 0 : s2()) ?? /** @type {P} */
1684
1684
  {}, {
1685
- direction: "both"
1685
+ direction: d2
1686
1686
  }));
1687
1687
  } finally {
1688
- set_active_reaction(e3), set_active_effect(i3);
1688
+ set_active_reaction(e3), set_active_effect(o3);
1689
1689
  }
1690
1690
  }
1691
- var d2 = {
1692
- is_global: l2,
1691
+ var _2 = {
1692
+ is_global: u2,
1693
1693
  in() {
1694
- t2.inert = c2, dispatch_event(t2, "introstart"), i2 = animate(t2, get_options(), a2, 1, () => {
1694
+ var _a2;
1695
+ if (t2.inert = f2, !l2) return a2 == null ? void 0 : a2.abort(), void ((_a2 = a2 == null ? void 0 : a2.reset) == null ? void 0 : _a2.call(a2));
1696
+ c2 || // if we intro then outro then intro again, we want to abort the first intro,
1697
+ // if it's not a bidirectional transition
1698
+ (o2 == null ? void 0 : o2.abort()), dispatch_event(t2, "introstart"), o2 = animate(t2, get_options(), a2, 1, () => {
1695
1699
  dispatch_event(t2, "introend"), // Ensure we cancel the animation to prevent leaking
1696
- i2 == null ? void 0 : i2.abort(), i2 = s2 = void 0, t2.style.overflow = u2;
1700
+ o2 == null ? void 0 : o2.abort(), o2 = i2 = void 0, t2.style.overflow = p2;
1697
1701
  });
1698
1702
  },
1699
1703
  out(e3) {
1700
- t2.inert = true, dispatch_event(t2, "outrostart"), a2 = animate(t2, get_options(), i2, 0, () => {
1704
+ if (!c2) return e3 == null ? void 0 : e3(), void (i2 = void 0);
1705
+ t2.inert = true, dispatch_event(t2, "outrostart"), a2 = animate(t2, get_options(), o2, 0, () => {
1701
1706
  dispatch_event(t2, "outroend"), e3 == null ? void 0 : e3();
1702
1707
  });
1703
1708
  },
1704
1709
  stop: () => {
1705
- i2 == null ? void 0 : i2.abort(), a2 == null ? void 0 : a2.abort();
1710
+ o2 == null ? void 0 : o2.abort(), a2 == null ? void 0 : a2.abort();
1706
1711
  }
1707
- }, f2 = (
1712
+ }, g2 = (
1708
1713
  /** @type {Effect} */
1709
1714
  V
1710
1715
  );
1711
- if ((f2.transitions ?? (f2.transitions = [])).push(d2), ce) {
1712
- var p2 = l2;
1713
- if (!p2) {
1714
- for (var _2 = (
1716
+ if ((g2.transitions ?? (g2.transitions = [])).push(_2), l2 && ce) {
1717
+ var v2 = u2;
1718
+ if (!v2) {
1719
+ for (var h2 = (
1715
1720
  /** @type {Effect | null} */
1716
- f2.parent
1717
- ); _2 && _2.f & w; ) for (; (_2 = _2.parent) && !(16 & _2.f); ) ;
1718
- p2 = !_2 || !!(32768 & _2.f);
1721
+ g2.parent
1722
+ ); h2 && h2.f & w; ) for (; (h2 = h2.parent) && !(16 & h2.f); ) ;
1723
+ v2 = !h2 || !!(32768 & h2.f);
1719
1724
  }
1720
- p2 && effect(() => {
1721
- untrack(() => d2.in());
1725
+ v2 && effect(() => {
1726
+ untrack(() => _2.in());
1722
1727
  });
1723
1728
  }
1724
1729
  }
1725
- function animate(e2, t2, n2, o2, s2) {
1726
- var i2 = 1 === o2;
1730
+ function animate(e2, t2, n2, s2, i2) {
1731
+ var o2 = 1 === s2;
1727
1732
  if (is_function(t2)) {
1728
1733
  var a2, l2 = false;
1729
1734
  return queue_micro_task(() => {
1730
1735
  if (!l2) {
1731
1736
  var c3 = t2({
1732
- direction: i2 ? "in" : "out"
1737
+ direction: o2 ? "in" : "out"
1733
1738
  });
1734
- a2 = animate(e2, c3, n2, o2, s2);
1739
+ a2 = animate(e2, c3, n2, s2, i2);
1735
1740
  }
1736
1741
  }), {
1737
1742
  abort: () => {
@@ -1742,25 +1747,25 @@ function animate(e2, t2, n2, o2, s2) {
1742
1747
  t: () => a2.t()
1743
1748
  };
1744
1749
  }
1745
- if (n2 == null ? void 0 : n2.deactivate(), !(t2 == null ? void 0 : t2.duration)) return s2(), {
1750
+ if (n2 == null ? void 0 : n2.deactivate(), !(t2 == null ? void 0 : t2.duration)) return i2(), {
1746
1751
  abort: noop,
1747
1752
  deactivate: noop,
1748
1753
  reset: noop,
1749
- t: () => o2
1754
+ t: () => s2
1750
1755
  };
1751
- const { delay: c2 = 0, css: u2, tick: d2, easing: f2 = linear } = t2;
1756
+ const { delay: c2 = 0, css: u2, tick: d2, easing: f2 = linear$1 } = t2;
1752
1757
  var p2 = [];
1753
- if (i2 && void 0 === n2 && (d2 && d2(0, 1), u2)) {
1758
+ if (o2 && void 0 === n2 && (d2 && d2(0, 1), u2)) {
1754
1759
  var _2 = css_to_keyframe(u2(0, 1));
1755
1760
  p2.push(_2, _2);
1756
1761
  }
1757
- var get_t = () => 1 - o2, g2 = e2.animate(p2, {
1762
+ var get_t = () => 1 - s2, g2 = e2.animate(p2, {
1758
1763
  duration: c2
1759
1764
  });
1760
1765
  return g2.onfinish = () => {
1761
- var i3 = (n2 == null ? void 0 : n2.t()) ?? 1 - o2;
1766
+ var o3 = (n2 == null ? void 0 : n2.t()) ?? 1 - s2;
1762
1767
  n2 == null ? void 0 : n2.abort();
1763
- var a3 = o2 - i3, l3 = (
1768
+ var a3 = s2 - o3, l3 = (
1764
1769
  /** @type {number} */
1765
1770
  t2.duration * Math.abs(a3)
1766
1771
  ), c3 = [];
@@ -1768,7 +1773,7 @@ function animate(e2, t2, n2, o2, s2) {
1768
1773
  var p3 = false;
1769
1774
  if (u2)
1770
1775
  for (var _3 = Math.ceil(l3 / (1e3 / 60)), v2 = 0; v2 <= _3; v2 += 1) {
1771
- var h2 = i3 + a3 * f2(v2 / _3), m2 = css_to_keyframe(u2(h2, 1 - h2));
1776
+ var h2 = o3 + a3 * f2(v2 / _3), m2 = css_to_keyframe(u2(h2, 1 - h2));
1772
1777
  c3.push(m2), p3 || (p3 = "hidden" === m2.overflow);
1773
1778
  }
1774
1779
  p3 && /** @type {HTMLElement} */
@@ -1778,7 +1783,7 @@ function animate(e2, t2, n2, o2, s2) {
1778
1783
  /** @type {globalThis.Animation} */
1779
1784
  g2.currentTime
1780
1785
  );
1781
- return i3 + a3 * f2(e3 / l3);
1786
+ return o3 + a3 * f2(e3 / l3);
1782
1787
  }, d2 && function loop(e3) {
1783
1788
  let t3;
1784
1789
  return 0 === be.tasks.size && be.tick(run_tasks), {
@@ -1802,7 +1807,7 @@ function animate(e2, t2, n2, o2, s2) {
1802
1807
  duration: l3,
1803
1808
  fill: "forwards"
1804
1809
  })).onfinish = () => {
1805
- get_t = () => o2, d2 == null ? void 0 : d2(o2, 1 - o2), s2();
1810
+ get_t = () => s2, d2 == null ? void 0 : d2(s2, 1 - s2), i2();
1806
1811
  };
1807
1812
  }, {
1808
1813
  abort: () => {
@@ -1813,10 +1818,10 @@ function animate(e2, t2, n2, o2, s2) {
1813
1818
  g2.onfinish = noop);
1814
1819
  },
1815
1820
  deactivate: () => {
1816
- s2 = noop;
1821
+ i2 = noop;
1817
1822
  },
1818
1823
  reset: () => {
1819
- 0 === o2 && (d2 == null ? void 0 : d2(1, 0));
1824
+ 0 === s2 && (d2 == null ? void 0 : d2(1, 0));
1820
1825
  },
1821
1826
  t: () => get_t()
1822
1827
  };
@@ -1874,19 +1879,19 @@ var ye = new ResizeObserverSingleton({
1874
1879
  function is_bound_this(e2, t2) {
1875
1880
  return e2 === t2 || (e2 == null ? void 0 : e2[C]) === t2;
1876
1881
  }
1877
- function bind_this(e2 = {}, t2, n2, o2) {
1882
+ function bind_this(e2 = {}, t2, n2, s2) {
1878
1883
  return effect(() => {
1879
- var o3, s2;
1884
+ var s3, i2;
1880
1885
  return render_effect(() => {
1881
- o3 = s2, // We only track changes to the parts, not the value itself to avoid unnecessary reruns.
1882
- s2 = [], untrack(() => {
1883
- e2 !== n2(...s2) && (t2(e2, ...s2), // If this is an effect rerun (cause: each block context changes), then nullfiy the binding at
1886
+ s3 = i2, // We only track changes to the parts, not the value itself to avoid unnecessary reruns.
1887
+ i2 = [], untrack(() => {
1888
+ e2 !== n2(...i2) && (t2(e2, ...i2), // If this is an effect rerun (cause: each block context changes), then nullfiy the binding at
1884
1889
  // the previous position if it isn't already taken over by a different effect.
1885
- o3 && is_bound_this(n2(...o3), e2) && t2(null, ...o3));
1890
+ s3 && is_bound_this(n2(...s3), e2) && t2(null, ...s3));
1886
1891
  });
1887
1892
  }), () => {
1888
1893
  queue_micro_task(() => {
1889
- s2 && is_bound_this(n2(...s2), e2) && t2(null, ...s2);
1894
+ i2 && is_bound_this(n2(...i2), e2) && t2(null, ...i2);
1890
1895
  });
1891
1896
  };
1892
1897
  }), e2;
@@ -1894,7 +1899,7 @@ function bind_this(e2 = {}, t2, n2, o2) {
1894
1899
  function init(e2 = false) {
1895
1900
  const t2 = (
1896
1901
  /** @type {ComponentContextLegacy} */
1897
- O
1902
+ T
1898
1903
  ), n2 = t2.l.u;
1899
1904
  if (!n2) return;
1900
1905
  let props = () => deep_read_state(t2.s);
@@ -1903,13 +1908,13 @@ function init(e2 = false) {
1903
1908
  /** @type {Record<string, any>} */
1904
1909
  {}
1905
1910
  );
1906
- const o2 = /* @__PURE__ */ derived(() => {
1907
- let o3 = false;
1908
- const s2 = t2.s;
1909
- for (const e4 in s2) s2[e4] !== n3[e4] && (n3[e4] = s2[e4], o3 = true);
1910
- return o3 && e3++, e3;
1911
+ const s2 = /* @__PURE__ */ derived(() => {
1912
+ let s3 = false;
1913
+ const i2 = t2.s;
1914
+ for (const e4 in i2) i2[e4] !== n3[e4] && (n3[e4] = i2[e4], s3 = true);
1915
+ return s3 && e3++, e3;
1911
1916
  });
1912
- props = () => get$1(o2);
1917
+ props = () => get$1(s2);
1913
1918
  }
1914
1919
  n2.b.length && function user_pre_effect(e3) {
1915
1920
  return validate_effect(), render_effect(e3);
@@ -1933,21 +1938,21 @@ function observe_all(e2, t2) {
1933
1938
  function subscribe_to_store(e2, t2, n2) {
1934
1939
  if (null == e2)
1935
1940
  return t2(void 0), noop;
1936
- const o2 = untrack(() => e2.subscribe(
1941
+ const s2 = untrack(() => e2.subscribe(
1937
1942
  t2,
1938
1943
  // @ts-expect-error
1939
1944
  n2
1940
1945
  ));
1941
- return o2.unsubscribe ? () => o2.unsubscribe() : o2;
1946
+ return s2.unsubscribe ? () => s2.unsubscribe() : s2;
1942
1947
  }
1943
1948
  const $e = [];
1944
1949
  function writable(e2, t2 = noop) {
1945
1950
  let n2 = null;
1946
- const o2 = /* @__PURE__ */ new Set();
1951
+ const s2 = /* @__PURE__ */ new Set();
1947
1952
  function set2(t3) {
1948
1953
  if (safe_not_equal(e2, t3) && (e2 = t3, n2)) {
1949
1954
  const t4 = !$e.length;
1950
- for (const t5 of o2) t5[1](), $e.push(t5, e2);
1955
+ for (const t5 of s2) t5[1](), $e.push(t5, e2);
1951
1956
  if (t4) {
1952
1957
  for (let e3 = 0; e3 < $e.length; e3 += 2) $e[e3][0]($e[e3 + 1]);
1953
1958
  $e.length = 0;
@@ -1963,13 +1968,13 @@ function writable(e2, t2 = noop) {
1963
1968
  return {
1964
1969
  set: set2,
1965
1970
  update: update2,
1966
- subscribe: function subscribe(s2, i2 = noop) {
1967
- const a2 = [s2, i2];
1968
- return o2.add(a2), 1 === o2.size && (n2 = t2(set2, update2) || noop), s2(
1971
+ subscribe: function subscribe(i2, o2 = noop) {
1972
+ const a2 = [i2, o2];
1973
+ return s2.add(a2), 1 === s2.size && (n2 = t2(set2, update2) || noop), i2(
1969
1974
  /** @type {T} */
1970
1975
  e2
1971
1976
  ), () => {
1972
- o2.delete(a2), 0 === o2.size && n2 && (n2(), n2 = null);
1977
+ s2.delete(a2), 0 === s2.size && n2 && (n2(), n2 = null);
1973
1978
  };
1974
1979
  }
1975
1980
  };
@@ -1980,24 +1985,24 @@ function get(e2) {
1980
1985
  }
1981
1986
  let we = false, xe = Symbol();
1982
1987
  function store_get(e2, t2, n2) {
1983
- const o2 = n2[t2] ?? (n2[t2] = {
1988
+ const s2 = n2[t2] ?? (n2[t2] = {
1984
1989
  store: null,
1985
1990
  source: /* @__PURE__ */ mutable_source(void 0),
1986
1991
  unsubscribe: noop
1987
1992
  });
1988
- if (o2.store !== e2 && !(xe in n2)) if (o2.unsubscribe(), o2.store = e2 ?? null, null == e2) o2.source.v = void 0, // see synchronous callback comment below
1989
- o2.unsubscribe = noop;
1993
+ if (s2.store !== e2 && !(xe in n2)) if (s2.unsubscribe(), s2.store = e2 ?? null, null == e2) s2.source.v = void 0, // see synchronous callback comment below
1994
+ s2.unsubscribe = noop;
1990
1995
  else {
1991
- var s2 = true;
1992
- o2.unsubscribe = subscribe_to_store(e2, (e3) => {
1993
- s2 ? (
1996
+ var i2 = true;
1997
+ s2.unsubscribe = subscribe_to_store(e2, (e3) => {
1998
+ i2 ? (
1994
1999
  // If the first updates to the store value (possibly multiple of them) are synchronously
1995
2000
  // inside a derived, we will hit the `state_unsafe_mutation` error if we `set` the value
1996
- o2.source.v = e3
1997
- ) : set(o2.source, e3);
1998
- }), s2 = false;
2001
+ s2.source.v = e3
2002
+ ) : set(s2.source, e3);
2003
+ }), i2 = false;
1999
2004
  }
2000
- return e2 && xe in n2 ? get(e2) : get$1(o2.source);
2005
+ return e2 && xe in n2 ? get(e2) : get$1(s2.source);
2001
2006
  }
2002
2007
  function store_set(e2, t2) {
2003
2008
  return e2.set(t2), t2;
@@ -2009,7 +2014,7 @@ function setup_stores() {
2009
2014
  for (var t2 in e2) {
2010
2015
  e2[t2].unsubscribe();
2011
2016
  }
2012
- s(e2, xe, {
2017
+ i(e2, xe, {
2013
2018
  enumerable: false,
2014
2019
  value: true
2015
2020
  });
@@ -2058,16 +2063,16 @@ const Ce = {
2058
2063
  get(e2, t2) {
2059
2064
  let n2 = e2.props.length;
2060
2065
  for (; n2--; ) {
2061
- let o2 = e2.props[n2];
2062
- if (is_function(o2) && (o2 = o2()), "object" == typeof o2 && null !== o2 && t2 in o2) return o2[t2];
2066
+ let s2 = e2.props[n2];
2067
+ if (is_function(s2) && (s2 = s2()), "object" == typeof s2 && null !== s2 && t2 in s2) return s2[t2];
2063
2068
  }
2064
2069
  },
2065
2070
  set(e2, t2, n2) {
2066
- let o2 = e2.props.length;
2067
- for (; o2--; ) {
2068
- let s2 = e2.props[o2];
2069
- is_function(s2) && (s2 = s2());
2070
- const a2 = i(s2, t2);
2071
+ let s2 = e2.props.length;
2072
+ for (; s2--; ) {
2073
+ let i2 = e2.props[s2];
2074
+ is_function(i2) && (i2 = i2());
2075
+ const a2 = o(i2, t2);
2071
2076
  if (a2 && a2.set) return a2.set(n2), true;
2072
2077
  }
2073
2078
  return false;
@@ -2075,9 +2080,9 @@ const Ce = {
2075
2080
  getOwnPropertyDescriptor(e2, t2) {
2076
2081
  let n2 = e2.props.length;
2077
2082
  for (; n2--; ) {
2078
- let o2 = e2.props[n2];
2079
- if (is_function(o2) && (o2 = o2()), "object" == typeof o2 && null !== o2 && t2 in o2) {
2080
- const e3 = i(o2, t2);
2083
+ let s2 = e2.props[n2];
2084
+ if (is_function(s2) && (s2 = s2()), "object" == typeof s2 && null !== s2 && t2 in s2) {
2085
+ const e3 = o(s2, t2);
2081
2086
  return e3 && !e3.configurable && // Prevent a "Non-configurability Report Error": The target is an array, it does
2082
2087
  // not actually contain this property. If it is now described as non-configurable,
2083
2088
  // the proxy throws a validation error. Setting it to true avoids that.
@@ -2108,10 +2113,10 @@ function has_destroyed_component_ctx(e2) {
2108
2113
  var _a2;
2109
2114
  return ((_a2 = e2.ctx) == null ? void 0 : _a2.d) ?? false;
2110
2115
  }
2111
- function prop(e2, t2, n2, o2) {
2116
+ function prop(e2, t2, n2, s2) {
2112
2117
  var _a2;
2113
- var s2, a2 = !!(1 & n2), l2 = !I || !!(2 & n2), c2 = !!(8 & n2), u2 = !!(16 & n2), d2 = false;
2114
- c2 ? [s2, d2] = function capture_store_binding(e3) {
2118
+ var i2, a2 = !!(1 & n2), l2 = !I || !!(2 & n2), c2 = !!(8 & n2), u2 = !!(16 & n2), d2 = false;
2119
+ c2 ? [i2, d2] = function capture_store_binding(e3) {
2115
2120
  var t3 = we;
2116
2121
  try {
2117
2122
  return we = false, [e3(), we];
@@ -2121,21 +2126,21 @@ function prop(e2, t2, n2, o2) {
2121
2126
  }(() => (
2122
2127
  /** @type {V} */
2123
2128
  e2[t2]
2124
- )) : s2 = /** @type {V} */
2129
+ )) : i2 = /** @type {V} */
2125
2130
  e2[t2];
2126
- var f2, p2 = C in e2 || M in e2, _2 = c2 && (((_a2 = i(e2, t2)) == null ? void 0 : _a2.set) ?? (p2 && t2 in e2 && ((n3) => e2[t2] = n3))) || void 0, g2 = (
2131
+ var f2, p2 = C in e2 || M in e2, _2 = c2 && (((_a2 = o(e2, t2)) == null ? void 0 : _a2.set) ?? (p2 && t2 in e2 && ((n3) => e2[t2] = n3))) || void 0, g2 = (
2127
2132
  /** @type {V} */
2128
- o2
2133
+ s2
2129
2134
  ), v2 = true, h2 = false, get_fallback = () => (h2 = true, v2 && (v2 = false, g2 = u2 ? untrack(
2130
2135
  /** @type {() => V} */
2131
- o2
2136
+ s2
2132
2137
  ) : (
2133
2138
  /** @type {V} */
2134
- o2
2139
+ s2
2135
2140
  )), g2);
2136
- if (void 0 === s2 && void 0 !== o2 && (_2 && l2 && function props_invalid_value(e3) {
2141
+ if (void 0 === i2 && void 0 !== s2 && (_2 && l2 && function props_invalid_value(e3) {
2137
2142
  throw new Error("https://svelte.dev/e/props_invalid_value");
2138
- }(), s2 = get_fallback(), _2 && _2(s2)), l2) f2 = () => {
2143
+ }(), i2 = get_fallback(), _2 && _2(i2)), l2) f2 = () => {
2139
2144
  var n3 = (
2140
2145
  /** @type {V} */
2141
2146
  e2[t2]
@@ -2167,7 +2172,7 @@ function prop(e2, t2, n2, o2) {
2167
2172
  ) : f2();
2168
2173
  };
2169
2174
  }
2170
- var y2 = false, $2 = /* @__PURE__ */ mutable_source(s2), w2 = /* @__PURE__ */ derived(() => {
2175
+ var y2 = false, $2 = /* @__PURE__ */ mutable_source(i2), w2 = /* @__PURE__ */ derived(() => {
2171
2176
  var e3 = f2(), t3 = get$1($2);
2172
2177
  return y2 ? (y2 = false, t3) : $2.v = e3;
2173
2178
  });
@@ -2186,7 +2191,7 @@ function prop(e2, t2, n2, o2) {
2186
2191
  };
2187
2192
  }
2188
2193
  function onMount(e2) {
2189
- null === O && lifecycle_outside_component(), I && null !== O.l ? (
2194
+ null === T && lifecycle_outside_component(), I && null !== T.l ? (
2190
2195
  /**
2191
2196
  * Legacy-mode: Init callbacks object for onMount/beforeUpdate/afterUpdate
2192
2197
  * @param {ComponentContext} context
@@ -2201,7 +2206,7 @@ function onMount(e2) {
2201
2206
  b: [],
2202
2207
  m: []
2203
2208
  });
2204
- }(O).m.push(e2)
2209
+ }(T).m.push(e2)
2205
2210
  ) : user_effect(() => {
2206
2211
  const t2 = untrack(e2);
2207
2212
  if ("function" == typeof t2) return t2;
@@ -2244,16 +2249,16 @@ const Me = {
2244
2249
  };
2245
2250
  var Se = /* @__PURE__ */ ns_template("<svg><!><!></svg>");
2246
2251
  function Icon$1(e2, t2) {
2247
- const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]), o2 = legacy_rest_props(n2, ["name", "color", "size", "strokeWidth", "absoluteStrokeWidth", "iconNode"]);
2252
+ const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]), s2 = legacy_rest_props(n2, ["name", "color", "size", "strokeWidth", "absoluteStrokeWidth", "iconNode"]);
2248
2253
  push(t2, false);
2249
- let s2 = prop(t2, "name", 8, void 0), i2 = 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, () => []);
2254
+ let i2 = prop(t2, "name", 8, void 0), o2 = 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, () => []);
2250
2255
  init();
2251
2256
  var d2 = Se();
2252
2257
  let f2;
2253
2258
  var p2 = child(d2);
2254
2259
  each(p2, 1, u2, index, (e3, t3) => {
2255
2260
  var n3 = comment();
2256
- !function element(e4, t4, n4, o3, s3, i3) {
2261
+ !function element(e4, t4, n4, s3, i3, o3) {
2257
2262
  var a3, l3, c3, u3 = null, d3 = (
2258
2263
  /** @type {TemplateNode} */
2259
2264
  e4
@@ -2274,32 +2279,32 @@ function Icon$1(e2, t2) {
2274
2279
  // tag is changing — destroy immediately, render contents without intro transitions
2275
2280
  (destroy_effect(c3), set_should_intro(false))
2276
2281
  )), e5 && e5 !== l3 && (c3 = branch(() => {
2277
- if (assign_nodes(u3 = document.createElementNS("http://www.w3.org/2000/svg", e5), u3), o3) {
2282
+ if (assign_nodes(u3 = document.createElementNS("http://www.w3.org/2000/svg", e5), u3), s3) {
2278
2283
  var t5 = (
2279
2284
  /** @type {TemplateNode} */
2280
2285
  u3.appendChild(create_text())
2281
2286
  );
2282
- o3(u3, t5);
2287
+ s3(u3, t5);
2283
2288
  }
2284
2289
  V.nodes_end = u3, d3.before(u3);
2285
2290
  })), (a3 = e5) && (l3 = a3), set_should_intro(true), set_current_each_item(n5);
2286
2291
  }
2287
2292
  }, w);
2288
2293
  }(first_child(n3), () => get$1(t3)[0], 0, (e4, n4) => {
2289
- let o3;
2290
- template_effect(() => o3 = set_attributes(e4, o3, {
2294
+ let s3;
2295
+ template_effect(() => s3 = set_attributes(e4, s3, {
2291
2296
  ...get$1(t3)[1]
2292
2297
  }));
2293
2298
  }), append(e3, n3);
2294
2299
  }), slot(sibling(p2), t2, "default", {}, null), template_effect((e3, t3) => f2 = set_attributes(d2, f2, {
2295
2300
  ...Me,
2296
- ...o2,
2301
+ ...s2,
2297
2302
  width: a2(),
2298
2303
  height: a2(),
2299
- stroke: i2(),
2304
+ stroke: o2(),
2300
2305
  "stroke-width": e3,
2301
2306
  class: t3
2302
- }), [() => c2() ? 24 * Number(l2()) / Number(a2()) : l2(), () => ((...e3) => e3.filter((e4, t3, n3) => Boolean(e4) && n3.indexOf(e4) === t3).join(" "))("lucide-icon", "lucide", s2() ? `lucide-${s2()}` : "", n2.class)], derived_safe_equal), append(e2, d2), pop();
2307
+ }), [() => 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();
2303
2308
  }
2304
2309
  function Loader_circle(e2, t2) {
2305
2310
  const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]);
@@ -2310,14 +2315,15 @@ function Loader_circle(e2, t2) {
2310
2315
  d: "M21 12a9 9 0 1 1-6.219-8.56"
2311
2316
  }]],
2312
2317
  children: (e3, n3) => {
2313
- var o2 = comment();
2314
- slot(first_child(o2), t2, "default", {}, null), append(e3, o2);
2318
+ var s2 = comment();
2319
+ slot(first_child(s2), t2, "default", {}, null), append(e3, s2);
2315
2320
  },
2316
2321
  $$slots: {
2317
2322
  default: true
2318
2323
  }
2319
2324
  }));
2320
2325
  }
2326
+ const linear = (e2) => e2;
2321
2327
  function cubic_out(e2) {
2322
2328
  const t2 = e2 - 1;
2323
2329
  return t2 * t2 * t2 + 1;
@@ -2333,44 +2339,53 @@ function split_css_unit(e2) {
2333
2339
  "px"
2334
2340
  ];
2335
2341
  }
2336
- function blur(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_in_out, amount: s2 = 5, opacity: i2 = 0 } = {}) {
2337
- const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.filter ? "" : a2.filter, u2 = l2 * (1 - i2), [d2, f2] = split_css_unit(s2);
2342
+ function blur(e2, { delay: t2 = 0, duration: n2 = 400, easing: s2 = cubic_in_out, amount: i2 = 5, opacity: o2 = 0 } = {}) {
2343
+ const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.filter ? "" : a2.filter, u2 = l2 * (1 - o2), [d2, f2] = split_css_unit(i2);
2338
2344
  return {
2339
2345
  delay: t2,
2340
2346
  duration: n2,
2341
- easing: o2,
2347
+ easing: s2,
2342
2348
  css: (e3, t3) => `opacity: ${l2 - u2 * t3}; filter: ${c2} blur(${t3 * d2}${f2});`
2343
2349
  };
2344
2350
  }
2345
- function fly(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_out, x: s2 = 0, y: i2 = 0, opacity: a2 = 0 } = {}) {
2346
- const l2 = getComputedStyle(e2), c2 = +l2.opacity, u2 = "none" === l2.transform ? "" : l2.transform, d2 = c2 * (1 - a2), [f2, p2] = split_css_unit(s2), [_2, g2] = split_css_unit(i2);
2351
+ function fade(e2, { delay: t2 = 0, duration: n2 = 400, easing: s2 = linear } = {}) {
2352
+ const i2 = +getComputedStyle(e2).opacity;
2353
+ return {
2354
+ delay: t2,
2355
+ duration: n2,
2356
+ easing: s2,
2357
+ css: (e3) => "opacity: " + e3 * i2
2358
+ };
2359
+ }
2360
+ function fly(e2, { delay: t2 = 0, duration: n2 = 400, easing: s2 = cubic_out, x: i2 = 0, y: o2 = 0, opacity: a2 = 0 } = {}) {
2361
+ const l2 = getComputedStyle(e2), c2 = +l2.opacity, u2 = "none" === l2.transform ? "" : l2.transform, d2 = c2 * (1 - a2), [f2, p2] = split_css_unit(i2), [_2, g2] = split_css_unit(o2);
2347
2362
  return {
2348
2363
  delay: t2,
2349
2364
  duration: n2,
2350
- easing: o2,
2365
+ easing: s2,
2351
2366
  css: (e3, t3) => `
2352
2367
  transform: ${u2} translate(${(1 - e3) * f2}${p2}, ${(1 - e3) * _2}${g2});
2353
2368
  opacity: ${c2 - d2 * t3}`
2354
2369
  };
2355
2370
  }
2356
- function slide(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_out, axis: s2 = "y" } = {}) {
2357
- const i2 = getComputedStyle(e2), a2 = +i2.opacity, l2 = "y" === s2 ? "height" : "width", c2 = parseFloat(i2[l2]), u2 = "y" === s2 ? ["top", "bottom"] : ["left", "right"], d2 = u2.map((e3) => (
2371
+ function slide(e2, { delay: t2 = 0, duration: n2 = 400, easing: s2 = cubic_out, axis: i2 = "y" } = {}) {
2372
+ const o2 = getComputedStyle(e2), a2 = +o2.opacity, l2 = "y" === i2 ? "height" : "width", c2 = parseFloat(o2[l2]), u2 = "y" === i2 ? ["top", "bottom"] : ["left", "right"], d2 = u2.map((e3) => (
2358
2373
  /** @type {'Left' | 'Right' | 'Top' | 'Bottom'} */
2359
2374
  `${e3[0].toUpperCase()}${e3.slice(1)}`
2360
- )), f2 = parseFloat(i2[`padding${d2[0]}`]), p2 = parseFloat(i2[`padding${d2[1]}`]), _2 = parseFloat(i2[`margin${d2[0]}`]), g2 = parseFloat(i2[`margin${d2[1]}`]), v2 = parseFloat(i2[`border${d2[0]}Width`]), h2 = parseFloat(i2[`border${d2[1]}Width`]);
2375
+ )), f2 = parseFloat(o2[`padding${d2[0]}`]), p2 = parseFloat(o2[`padding${d2[1]}`]), _2 = parseFloat(o2[`margin${d2[0]}`]), g2 = parseFloat(o2[`margin${d2[1]}`]), v2 = parseFloat(o2[`border${d2[0]}Width`]), h2 = parseFloat(o2[`border${d2[1]}Width`]);
2361
2376
  return {
2362
2377
  delay: t2,
2363
2378
  duration: n2,
2364
- easing: o2,
2379
+ easing: s2,
2365
2380
  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 * g2}px;border-${u2[0]}-width: ${e3 * v2}px;border-${u2[1]}-width: ${e3 * h2}px;min-${l2}: 0`
2366
2381
  };
2367
2382
  }
2368
- function scale(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_out, start: s2 = 0, opacity: i2 = 0 } = {}) {
2369
- const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.transform ? "" : a2.transform, u2 = 1 - s2, d2 = l2 * (1 - i2);
2383
+ function scale(e2, { delay: t2 = 0, duration: n2 = 400, easing: s2 = cubic_out, start: i2 = 0, opacity: o2 = 0 } = {}) {
2384
+ const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.transform ? "" : a2.transform, u2 = 1 - i2, d2 = l2 * (1 - o2);
2370
2385
  return {
2371
2386
  delay: t2,
2372
2387
  duration: n2,
2373
- easing: o2,
2388
+ easing: s2,
2374
2389
  css: (e3, t3) => `
2375
2390
  transform: ${c2} scale(${1 - u2 * t3});
2376
2391
  opacity: ${l2 - d2 * t3}
@@ -2383,11 +2398,11 @@ var on_click$4 = (e2, t2) => {
2383
2398
  }, Ie = /* @__PURE__ */ template('<button aria-label="open the game discovery"><p class="z-2 flex items-center overflow-hidden svelte-1j97rta"><!> <span class="text-md mr-0.25 inline-block font-bold svelte-1j97rta">More Games</span></p> <div class="bg-background absolute bottom-0 left-0 h-full w-0 transition-all duration-300 group-hover:w-full svelte-1j97rta"></div></button>');
2384
2399
  function FloatingButton(e2, t2) {
2385
2400
  push(t2, true);
2386
- let n2 = prop(t2, "position", 3, "bottom-right"), o2 = prop(t2, "visible", 3, true);
2387
- var s2 = comment(), i2 = first_child(s2), consequent = (e3) => {
2388
- var o3 = Ie();
2389
- o3.__click = [on_click$4, t2];
2390
- var s3 = child(o3);
2401
+ let n2 = prop(t2, "position", 3, "bottom-right"), s2 = prop(t2, "visible", 3, true);
2402
+ var i2 = comment(), o2 = first_child(i2), consequent = (e3) => {
2403
+ var s3 = Ie();
2404
+ s3.__click = [on_click$4, t2];
2405
+ var i3 = child(s3);
2391
2406
  !function Gamepad(e4, t3) {
2392
2407
  const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
2393
2408
  Icon$1(e4, spread_props({
@@ -2421,38 +2436,39 @@ function FloatingButton(e2, t2) {
2421
2436
  rx: "2"
2422
2437
  }]],
2423
2438
  children: (e5, n4) => {
2424
- var o4 = comment();
2425
- slot(first_child(o4), t3, "default", {}, null), append(e5, o4);
2439
+ var s4 = comment();
2440
+ slot(first_child(s4), t3, "default", {}, null), append(e5, s4);
2426
2441
  },
2427
2442
  $$slots: {
2428
2443
  default: true
2429
2444
  }
2430
2445
  }));
2431
- }(child(s3), {
2446
+ }(child(i3), {
2432
2447
  size: 26,
2433
2448
  strokeWidth: 1.75,
2434
2449
  class: "z-2 mr-2 transform transition-all duration-300 group-hover:rotate-12"
2435
- }), 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 text-background z-99990 flex cursor-pointer gap-2 rounded-md bg-white p-3 font-bold uppercase shadow-lg transition-all hover:scale-105`, "svelte-1j97rta")), transition(3, o3, () => blur), append(e3, o3);
2450
+ }), template_effect(() => set_class(s3, 1, `fixed ${("bottom-left" == n2() ? "bottom-4 left-4" : "bottom-right" == n2() ? "right-4 bottom-4" : "") ?? ""} group children-text-white text-black z-99990 flex cursor-pointer gap-2 rounded-md bg-white p-3 font-bold uppercase shadow-lg transition-all hover:scale-105`, "svelte-1j97rta")), transition(3, s3, () => blur), append(e3, s3);
2436
2451
  };
2437
- if_block(i2, (e3) => {
2438
- o2() && e3(consequent);
2439
- }), append(e2, s2), pop();
2452
+ if_block(o2, (e3) => {
2453
+ s2() && e3(consequent);
2454
+ }), append(e2, i2), pop();
2440
2455
  }
2441
2456
  delegate(["click"]);
2442
- var Te = /* @__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>'), Oe = /* @__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>'), Pe = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>'), qe = /* @__PURE__ */ ns_template('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');
2457
+ const Oe = writable(false), Te = writable("https://sdk.playlight.dev");
2458
+ var Pe = /* @__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>'), qe = /* @__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>'), 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="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>'), ze = /* @__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>');
2443
2459
  function Icon(e2, t2) {
2444
2460
  let n2 = prop(t2, "type", 8, "success");
2445
- var o2 = comment(), s2 = first_child(o2), consequent = (e3) => {
2446
- append(e3, Te());
2461
+ var s2 = comment(), i2 = first_child(s2), consequent = (e3) => {
2462
+ append(e3, Pe());
2447
2463
  }, alternate = (e3, t3) => {
2448
2464
  var consequent_1 = (e4) => {
2449
- append(e4, Oe());
2465
+ append(e4, qe());
2450
2466
  }, alternate_1 = (e4, t4) => {
2451
2467
  var consequent_2 = (e5) => {
2452
- append(e5, Pe());
2468
+ append(e5, We());
2453
2469
  }, alternate_2 = (e5, t5) => {
2454
2470
  var consequent_3 = (e6) => {
2455
- append(e6, qe());
2471
+ append(e6, ze());
2456
2472
  }, alternate_3 = (e6) => {
2457
2473
  };
2458
2474
  if_block(e5, (e6) => {
@@ -2467,20 +2483,20 @@ function Icon(e2, t2) {
2467
2483
  "error" === n2() ? e4(consequent_1) : e4(alternate_1, false);
2468
2484
  }, t3);
2469
2485
  };
2470
- if_block(s2, (e3) => {
2486
+ if_block(i2, (e3) => {
2471
2487
  "success" === n2() ? e3(consequent) : e3(alternate, false);
2472
- }), append(e2, o2);
2488
+ }), append(e2, s2);
2473
2489
  }
2474
- var We = /* @__PURE__ */ template('<div class="sonner-loading-bar"></div>'), ze = /* @__PURE__ */ template('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');
2490
+ var Ee = /* @__PURE__ */ template('<div class="sonner-loading-bar"></div>'), je = /* @__PURE__ */ template('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');
2475
2491
  function Loader(e2, t2) {
2476
2492
  push(t2, false);
2477
2493
  let n2 = prop(t2, "visible", 8);
2478
- const o2 = Array(12).fill(0);
2494
+ const s2 = Array(12).fill(0);
2479
2495
  init();
2480
- var s2 = ze();
2481
- each(child(s2), 5, () => o2, index, (e3, t3) => {
2482
- append(e3, We());
2483
- }), template_effect(() => set_attribute(s2, "data-visible", n2())), append(e2, s2), pop();
2496
+ var i2 = je();
2497
+ each(child(i2), 5, () => s2, index, (e3, t3) => {
2498
+ append(e3, Ee());
2499
+ }), template_effect(() => set_attribute(i2, "data-visible", n2())), append(e2, i2), pop();
2484
2500
  }
2485
2501
  function cn(...e2) {
2486
2502
  return e2.filter(Boolean).join(" ");
@@ -2498,33 +2514,33 @@ function clientWritable(e2) {
2498
2514
  }
2499
2515
  };
2500
2516
  }
2501
- let Ee = 0;
2502
- const je = function createToastState() {
2517
+ let Ne = 0;
2518
+ const Be = function createToastState() {
2503
2519
  const e2 = clientWritable([]), t2 = clientWritable([]);
2504
2520
  function addToast(t3) {
2505
2521
  e2.update((e3) => [t3, ...e3]);
2506
2522
  }
2507
2523
  function create(t3) {
2508
2524
  var _a2;
2509
- const { message: n2, ...o2 } = t3, s2 = "number" == typeof (t3 == null ? void 0 : t3.id) || t3.id && ((_a2 = t3.id) == null ? void 0 : _a2.length) > 0 ? t3.id : Ee++, i2 = void 0 === t3.dismissable || t3.dismissable, a2 = void 0 === t3.type ? "default" : t3.type, l2 = get(e2).find((e3) => e3.id === s2);
2510
- return l2 ? e2.update((e3) => e3.map((e4) => e4.id === s2 ? {
2525
+ const { message: n2, ...s2 } = t3, i2 = "number" == typeof (t3 == null ? void 0 : t3.id) || t3.id && ((_a2 = t3.id) == null ? void 0 : _a2.length) > 0 ? t3.id : Ne++, o2 = void 0 === t3.dismissable || t3.dismissable, a2 = void 0 === t3.type ? "default" : t3.type, l2 = get(e2).find((e3) => e3.id === i2);
2526
+ return l2 ? e2.update((e3) => e3.map((e4) => e4.id === i2 ? {
2511
2527
  ...e4,
2512
2528
  ...t3,
2513
- id: s2,
2529
+ id: i2,
2514
2530
  title: n2,
2515
- dismissable: i2,
2531
+ dismissable: o2,
2516
2532
  type: a2,
2517
2533
  updated: true
2518
2534
  } : {
2519
2535
  ...e4,
2520
2536
  updated: false
2521
2537
  })) : addToast({
2522
- ...o2,
2523
- id: s2,
2538
+ ...s2,
2539
+ id: i2,
2524
2540
  title: n2,
2525
- dismissable: i2,
2541
+ dismissable: o2,
2526
2542
  type: a2
2527
- }), s2;
2543
+ }), i2;
2528
2544
  }
2529
2545
  function dismiss(t3) {
2530
2546
  if (void 0 !== t3) return e2.update((e3) => e3.map((e4) => e4.id === t3 ? {
@@ -2597,53 +2613,53 @@ const je = function createToastState() {
2597
2613
  type: "loading",
2598
2614
  message: t3.loading
2599
2615
  }));
2600
- const o2 = e3 instanceof Promise ? e3 : e3();
2601
- let s2 = void 0 !== n2;
2602
- return o2.then((e4) => {
2616
+ const s2 = e3 instanceof Promise ? e3 : e3();
2617
+ let i2 = void 0 !== n2;
2618
+ return s2.then((e4) => {
2603
2619
  if (e4 && "boolean" == typeof e4.ok && !e4.ok) {
2604
- s2 = false;
2605
- const o3 = "function" == typeof t3.error ? (
2620
+ i2 = false;
2621
+ const s3 = "function" == typeof t3.error ? (
2606
2622
  // @ts-expect-error: Incorrect response type
2607
2623
  t3.error(`HTTP error! status: ${e4.status}`)
2608
2624
  ) : t3.error;
2609
2625
  create({
2610
2626
  id: n2,
2611
2627
  type: "error",
2612
- message: o3
2628
+ message: s3
2613
2629
  });
2614
2630
  } else if (void 0 !== t3.success) {
2615
- s2 = false;
2616
- const o3 = (
2631
+ i2 = false;
2632
+ const s3 = (
2617
2633
  // @ts-expect-error: TODO: Better function checking
2618
2634
  "function" == typeof t3.success ? t3.success(e4) : t3.success
2619
2635
  );
2620
2636
  create({
2621
2637
  id: n2,
2622
2638
  type: "success",
2623
- message: o3
2639
+ message: s3
2624
2640
  });
2625
2641
  }
2626
2642
  }).catch((e4) => {
2627
2643
  if (void 0 !== t3.error) {
2628
- s2 = false;
2629
- const o3 = (
2644
+ i2 = false;
2645
+ const s3 = (
2630
2646
  // @ts-expect-error: TODO: Better function checking
2631
2647
  "function" == typeof t3.error ? t3.error(e4) : t3.error
2632
2648
  );
2633
2649
  create({
2634
2650
  id: n2,
2635
2651
  type: "error",
2636
- message: o3
2652
+ message: s3
2637
2653
  });
2638
2654
  }
2639
2655
  }).finally(() => {
2640
2656
  var _a2;
2641
- s2 && // Toast is still in load state (and will be indefinitely — dismiss it)
2657
+ i2 && // Toast is still in load state (and will be indefinitely — dismiss it)
2642
2658
  (dismiss(n2), n2 = void 0), (_a2 = t3.finally) == null ? void 0 : _a2.call(t3);
2643
2659
  }), n2;
2644
2660
  },
2645
2661
  custom: function custom(e3, t3) {
2646
- const n2 = (t3 == null ? void 0 : t3.id) || Ee++;
2662
+ const n2 = (t3 == null ? void 0 : t3.id) || Ne++;
2647
2663
  return create({
2648
2664
  component: e3,
2649
2665
  id: n2,
@@ -2664,27 +2680,27 @@ const je = function createToastState() {
2664
2680
  heights: t2
2665
2681
  };
2666
2682
  }();
2667
- const Ne = function toastFunction(e2, t2) {
2668
- return je.create({
2683
+ const Ae = function toastFunction(e2, t2) {
2684
+ return Be.create({
2669
2685
  message: e2,
2670
2686
  ...t2
2671
2687
  });
2672
- }, Be = Object.assign(Ne, {
2673
- success: je.success,
2674
- info: je.info,
2675
- warning: je.warning,
2676
- error: je.error,
2677
- custom: je.custom,
2678
- message: je.message,
2679
- promise: je.promise,
2680
- dismiss: je.dismiss,
2681
- loading: je.loading
2688
+ }, Le = Object.assign(Ae, {
2689
+ success: Be.success,
2690
+ info: Be.info,
2691
+ warning: Be.warning,
2692
+ error: Be.error,
2693
+ custom: Be.custom,
2694
+ message: Be.message,
2695
+ promise: Be.promise,
2696
+ dismiss: Be.dismiss,
2697
+ loading: Be.loading
2682
2698
  });
2683
- var Ae = /* @__PURE__ */ template('<button aria-label="Close toast" data-close-button=""><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button>'), Le = /* @__PURE__ */ template('<div data-icon=""><!> <!></div>'), Ge = /* @__PURE__ */ template('<div data-title=""><!></div>'), Fe = /* @__PURE__ */ template('<div data-description=""><!></div>'), He = /* @__PURE__ */ template('<button data-button="" data-cancel=""> </button>'), Re = /* @__PURE__ */ template('<button data-button=""> </button>'), Ue = /* @__PURE__ */ template('<!> <div data-content=""><!> <!></div> <!> <!>', 1), Ve = /* @__PURE__ */ template('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');
2699
+ var Ge = /* @__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>'), Fe = /* @__PURE__ */ template('<div data-icon=""><!> <!></div>'), He = /* @__PURE__ */ template('<div data-title=""><!></div>'), Re = /* @__PURE__ */ template('<div data-description=""><!></div>'), Ue = /* @__PURE__ */ template('<button data-button="" data-cancel=""> </button>'), Ve = /* @__PURE__ */ template('<button data-button=""> </button>'), Ke = /* @__PURE__ */ template('<!> <div data-content=""><!> <!></div> <!> <!>', 1), Ye = /* @__PURE__ */ template('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');
2684
2700
  function Toast(e2, t2) {
2685
2701
  const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]);
2686
2702
  push(t2, false);
2687
- const [o2, s2] = setup_stores(), $heights = () => store_get(y2, "$heights", o2), $effect = () => store_get(get$1(Q2), "$effect", o2), i2 = /* @__PURE__ */ mutable_source(void 0, true), a2 = /* @__PURE__ */ mutable_source(void 0, true), l2 = /* @__PURE__ */ mutable_source(void 0, true), c2 = /* @__PURE__ */ mutable_source(void 0, true), u2 = /* @__PURE__ */ mutable_source(void 0, true), d2 = /* @__PURE__ */ mutable_source(void 0, true), f2 = /* @__PURE__ */ mutable_source(void 0, true), p2 = /* @__PURE__ */ mutable_source(void 0, true), _2 = /* @__PURE__ */ mutable_source(void 0, true), g2 = /* @__PURE__ */ mutable_source(void 0, true), v2 = /* @__PURE__ */ mutable_source(void 0, true), h2 = /* @__PURE__ */ mutable_source(void 0, true), m2 = {
2703
+ const [s2, i2] = setup_stores(), $heights = () => store_get(y2, "$heights", s2), $effect = () => store_get(get$1(Q2), "$effect", s2), o2 = /* @__PURE__ */ mutable_source(void 0, true), a2 = /* @__PURE__ */ mutable_source(void 0, true), l2 = /* @__PURE__ */ mutable_source(void 0, true), c2 = /* @__PURE__ */ mutable_source(void 0, true), u2 = /* @__PURE__ */ mutable_source(void 0, true), d2 = /* @__PURE__ */ mutable_source(void 0, true), f2 = /* @__PURE__ */ mutable_source(void 0, true), p2 = /* @__PURE__ */ mutable_source(void 0, true), _2 = /* @__PURE__ */ mutable_source(void 0, true), g2 = /* @__PURE__ */ mutable_source(void 0, true), v2 = /* @__PURE__ */ mutable_source(void 0, true), h2 = /* @__PURE__ */ mutable_source(void 0, true), m2 = {
2688
2704
  toast: "",
2689
2705
  title: "",
2690
2706
  description: "",
@@ -2699,15 +2715,15 @@ function Toast(e2, t2) {
2699
2715
  default: "",
2700
2716
  info: "",
2701
2717
  loading: ""
2702
- }, { toasts: b2, heights: y2, removeHeight: $2, setHeight: w2, remove: x2 } = je;
2703
- 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), O2 = prop(t2, "expandByDefault", 9), P2 = prop(t2, "closeButton", 9), q2 = prop(t2, "interacting", 9), W2 = prop(t2, "cancelButtonStyle", 9, ""), z2 = prop(t2, "actionButtonStyle", 9, ""), D2 = prop(t2, "duration", 9, 4e3), E2 = prop(t2, "descriptionClass", 9, ""), j2 = prop(t2, "classes", 29, () => ({})), N2 = prop(t2, "unstyled", 9, false), B2 = /* @__PURE__ */ mutable_source(false, true), A2 = /* @__PURE__ */ mutable_source(false, true), L2 = /* @__PURE__ */ mutable_source(false, true), G2 = /* @__PURE__ */ mutable_source(false, true), F2 = /* @__PURE__ */ mutable_source(0, true), H2 = /* @__PURE__ */ mutable_source(0, true), R2 = /* @__PURE__ */ mutable_source(void 0, true), U2 = /* @__PURE__ */ mutable_source(0, true), V2 = 0, K2 = 0, Y2 = null;
2718
+ }, { toasts: b2, heights: y2, removeHeight: $2, setHeight: w2, remove: x2 } = Be;
2719
+ 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), O2 = prop(t2, "visibleToasts", 9), T2 = prop(t2, "expandByDefault", 9), P2 = prop(t2, "closeButton", 9), q2 = prop(t2, "interacting", 9), W2 = prop(t2, "cancelButtonStyle", 9, ""), z2 = prop(t2, "actionButtonStyle", 9, ""), E2 = prop(t2, "duration", 9, 4e3), j2 = prop(t2, "descriptionClass", 9, ""), D2 = prop(t2, "classes", 29, () => ({})), N2 = prop(t2, "unstyled", 9, false), B2 = /* @__PURE__ */ mutable_source(false, true), A2 = /* @__PURE__ */ mutable_source(false, true), L2 = /* @__PURE__ */ mutable_source(false, true), G2 = /* @__PURE__ */ mutable_source(false, true), F2 = /* @__PURE__ */ mutable_source(0, true), H2 = /* @__PURE__ */ mutable_source(0, true), R2 = /* @__PURE__ */ mutable_source(void 0, true), U2 = /* @__PURE__ */ mutable_source(0, true), V2 = 0, K2 = 0, Y2 = null;
2704
2720
  function deleteToast() {
2705
2721
  set(A2, true), // Save the offset for the exit swipe animation
2706
2722
  set(F2, get$1(U2)), $2(k2().id), setTimeout(() => {
2707
2723
  x2(k2().id);
2708
2724
  }, 200);
2709
2725
  }
2710
- let Z2 = /* @__PURE__ */ mutable_source(void 0, true), J2 = /* @__PURE__ */ mutable_source(k2().duration || D2() || 4e3, true);
2726
+ let Z2 = /* @__PURE__ */ mutable_source(void 0, true), J2 = /* @__PURE__ */ mutable_source(k2().duration || E2() || 4e3, true);
2711
2727
  function startTimer() {
2712
2728
  V2 = (/* @__PURE__ */ new Date()).getTime(), // Let the toast know it has started
2713
2729
  set(Z2, setTimeout(() => {
@@ -2723,15 +2739,15 @@ function Toast(e2, t2) {
2723
2739
  toastId: k2().id,
2724
2740
  height: e3
2725
2741
  }), () => $2(k2().id);
2726
- }), legacy_pre_effect(() => deep_read_state(j2()), () => {
2727
- j2({
2742
+ }), legacy_pre_effect(() => deep_read_state(D2()), () => {
2743
+ D2({
2728
2744
  ...m2,
2729
- ...j2()
2745
+ ...D2()
2730
2746
  });
2731
2747
  }), legacy_pre_effect(() => deep_read_state(C2()), () => {
2732
- set(i2, 0 === C2());
2733
- }), legacy_pre_effect(() => (deep_read_state(C2()), deep_read_state(T2())), () => {
2734
- set(a2, C2() + 1 <= T2());
2748
+ set(o2, 0 === C2());
2749
+ }), legacy_pre_effect(() => (deep_read_state(C2()), deep_read_state(O2())), () => {
2750
+ set(a2, C2() + 1 <= O2());
2735
2751
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
2736
2752
  set(l2, k2().title);
2737
2753
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
@@ -2762,28 +2778,28 @@ function Toast(e2, t2) {
2762
2778
  async function updateHeights() {
2763
2779
  if (!get$1(B2)) return;
2764
2780
  let e3;
2765
- await tick(), e3 = M2() || O2() ? 1 : 1 - 0.05 * C2(), get$1(R2).style.setProperty("height", "auto");
2766
- const t3 = get$1(R2).offsetHeight, n3 = get$1(R2).getBoundingClientRect().height, o3 = Math.round(100 * (n3 / e3 + Number.EPSILON)) / 100;
2767
- let s3;
2781
+ await tick(), e3 = M2() || T2() ? 1 : 1 - 0.05 * C2(), get$1(R2).style.setProperty("height", "auto");
2782
+ const t3 = get$1(R2).offsetHeight, n3 = get$1(R2).getBoundingClientRect().height, s3 = Math.round(100 * (n3 / e3 + Number.EPSILON)) / 100;
2783
+ let i3;
2768
2784
  get$1(R2).style.removeProperty("height"), // Use scaledRectHeight as it's more precise
2769
- s3 = Math.abs(o3 - t3) < 1 ? o3 : t3, set(H2, s3), w2({
2785
+ i3 = Math.abs(s3 - t3) < 1 ? s3 : t3, set(H2, i3), w2({
2770
2786
  toastId: k2().id,
2771
- height: s3
2787
+ height: i3
2772
2788
  });
2773
2789
  }();
2774
- }), legacy_pre_effect(() => (deep_read_state(k2()), get$1(Z2), deep_read_state(D2())), () => {
2790
+ }), legacy_pre_effect(() => (deep_read_state(k2()), get$1(Z2), deep_read_state(E2())), () => {
2775
2791
  k2().updated && // if the toast has been updated after the initial render,
2776
2792
  // we want to reset the timer and set the remaining time to the
2777
2793
  // new duration
2778
- (clearTimeout(get$1(Z2)), set(J2, k2().duration || D2() || 4e3), startTimer());
2794
+ (clearTimeout(get$1(Z2)), set(J2, k2().duration || E2() || 4e3), startTimer());
2779
2795
  }), legacy_pre_effect(() => (deep_read_state(k2()), get$1(u2)), () => {
2780
2796
  set(h2, k2().promise && "loading" === get$1(u2) || k2().duration === Number.POSITIVE_INFINITY);
2781
2797
  }), legacy_pre_effect(() => (get$1(h2), deep_read_state(M2()), deep_read_state(q2()), get$1(Z2)), () => {
2782
2798
  var e3;
2783
2799
  !function store_unsub(e4, t3, n3) {
2784
- let o3 = n3[t3];
2785
- return o3 && o3.store !== e4 && // Don't reset store yet, so that store_get above can resubscribe to new store if necessary
2786
- (o3.unsubscribe(), o3.unsubscribe = noop), e4;
2800
+ let s3 = n3[t3];
2801
+ return s3 && s3.store !== e4 && // Don't reset store yet, so that store_get above can resubscribe to new store if necessary
2802
+ (s3.unsubscribe(), s3.unsubscribe = noop), e4;
2787
2803
  }(set(Q2, (e3 = () => (get$1(h2) || (M2() || q2() ? (
2788
2804
  // If toast's duration changes, it will be out of sync with the
2789
2805
  // remainingAtTimeout, so we know we need to restart the timer
@@ -2798,22 +2814,22 @@ function Toast(e2, t2) {
2798
2814
  }()
2799
2815
  ) : startTimer()), () => clearTimeout(get$1(Z2))), {
2800
2816
  subscribe: e3
2801
- })), "$effect", o2);
2817
+ })), "$effect", s2);
2802
2818
  }), legacy_pre_effect(() => $effect(), () => {
2803
2819
  $effect();
2804
2820
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
2805
2821
  k2().delete && deleteToast();
2806
2822
  }), legacy_pre_effect_reset(), init(true);
2807
- var ee2 = Ve();
2823
+ var ee2 = Ye();
2808
2824
  let te2;
2809
2825
  set_attribute(ee2, "tabindex", 0);
2810
2826
  var ne2 = child(ee2), consequent = (e3) => {
2811
- var t3 = Ae();
2827
+ var t3 = Ge();
2812
2828
  template_effect((e4) => {
2813
2829
  set_attribute(t3, "data-disabled", get$1(v2)), set_class(t3, 1, e4);
2814
2830
  }, [() => {
2815
2831
  var _a2, _b2, _c2;
2816
- return clsx(cn((_a2 = j2()) == null ? void 0 : _a2.closeButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.closeButton));
2832
+ return clsx(cn((_a2 = D2()) == null ? void 0 : _a2.closeButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.closeButton));
2817
2833
  }], derived_safe_equal), event("click", t3, function(...e4) {
2818
2834
  var _a2;
2819
2835
  (_a2 = get$1(v2) ? void 0 : () => {
@@ -2835,15 +2851,15 @@ function Toast(e2, t2) {
2835
2851
  }));
2836
2852
  }), append(e3, t3);
2837
2853
  }, alternate = (e3) => {
2838
- var n3 = Ue(), o3 = first_child(n3), consequent_8 = (e4) => {
2839
- var n4 = Le(), o4 = child(n4), consequent_2 = (e5) => {
2854
+ var n3 = Ke(), s3 = first_child(n3), consequent_8 = (e4) => {
2855
+ var n4 = Fe(), s4 = child(n4), consequent_2 = (e5) => {
2840
2856
  var n5 = comment();
2841
2857
  slot(first_child(n5), t2, "loading-icon", {}, null), append(e5, n5);
2842
2858
  };
2843
- if_block(o4, (e5) => {
2859
+ if_block(s4, (e5) => {
2844
2860
  !k2().promise && "loading" !== get$1(u2) || k2().icon || e5(consequent_2);
2845
2861
  });
2846
- var s4 = sibling(o4, 2), consequent_3 = (e5) => {
2862
+ var i4 = sibling(s4, 2), consequent_3 = (e5) => {
2847
2863
  var t3 = comment();
2848
2864
  component(first_child(t3), () => k2().icon, (e6, t4) => {
2849
2865
  t4(e6, {});
@@ -2881,15 +2897,15 @@ function Toast(e2, t2) {
2881
2897
  "success" === get$1(u2) ? e6(consequent_4) : e6(alternate_2, false);
2882
2898
  }, n5);
2883
2899
  };
2884
- if_block(s4, (e5) => {
2900
+ if_block(i4, (e5) => {
2885
2901
  k2().icon ? e5(consequent_3) : e5(alternate_1, false);
2886
2902
  }), append(e4, n4);
2887
2903
  };
2888
- if_block(o3, (e4) => {
2904
+ if_block(s3, (e4) => {
2889
2905
  ("default" !== get$1(u2) || k2().icon || k2().promise) && e4(consequent_8);
2890
2906
  });
2891
- var s3 = sibling(o3, 2), i3 = child(s3), consequent_10 = (e4) => {
2892
- var t3 = Ge(), n4 = child(t3), consequent_9 = (e5) => {
2907
+ var i3 = sibling(s3, 2), o3 = child(i3), consequent_10 = (e4) => {
2908
+ var t3 = He(), n4 = child(t3), consequent_9 = (e5) => {
2893
2909
  var t4 = comment();
2894
2910
  component(first_child(t4), () => k2().title, (e6, t5) => {
2895
2911
  t5(e6, spread_props(() => k2().componentProps));
@@ -2902,14 +2918,14 @@ function Toast(e2, t2) {
2902
2918
  "string" != typeof k2().title ? e5(consequent_9) : e5(alternate_5, false);
2903
2919
  }), template_effect((e5) => set_class(t3, 1, e5), [() => {
2904
2920
  var _a2, _b2, _c2;
2905
- return clsx(cn((_a2 = j2()) == null ? void 0 : _a2.title, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.title));
2921
+ return clsx(cn((_a2 = D2()) == null ? void 0 : _a2.title, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.title));
2906
2922
  }], derived_safe_equal), append(e4, t3);
2907
2923
  };
2908
- if_block(i3, (e4) => {
2924
+ if_block(o3, (e4) => {
2909
2925
  k2().title && e4(consequent_10);
2910
2926
  });
2911
- var a3 = sibling(i3, 2), consequent_12 = (e4) => {
2912
- var t3 = Fe(), n4 = child(t3), consequent_11 = (e5) => {
2927
+ var a3 = sibling(o3, 2), consequent_12 = (e4) => {
2928
+ var t3 = Re(), n4 = child(t3), consequent_11 = (e5) => {
2913
2929
  var t4 = comment();
2914
2930
  component(first_child(t4), () => k2().description, (e6, t5) => {
2915
2931
  t5(e6, spread_props(() => k2().componentProps));
@@ -2922,19 +2938,19 @@ function Toast(e2, t2) {
2922
2938
  "string" != typeof k2().description ? e5(consequent_11) : e5(alternate_6, false);
2923
2939
  }), template_effect((e5) => set_class(t3, 1, e5), [() => {
2924
2940
  var _a2, _b2;
2925
- return clsx(cn(E2(), get$1(f2), (_a2 = j2()) == null ? void 0 : _a2.description, (_b2 = k2().classes) == null ? void 0 : _b2.description));
2941
+ return clsx(cn(j2(), get$1(f2), (_a2 = D2()) == null ? void 0 : _a2.description, (_b2 = k2().classes) == null ? void 0 : _b2.description));
2926
2942
  }], derived_safe_equal), append(e4, t3);
2927
2943
  };
2928
2944
  if_block(a3, (e4) => {
2929
2945
  k2().description && e4(consequent_12);
2930
2946
  });
2931
- var l3 = sibling(s3, 2), consequent_13 = (e4) => {
2932
- var t3 = He(), n4 = child(t3);
2947
+ var l3 = sibling(i3, 2), consequent_13 = (e4) => {
2948
+ var t3 = Ue(), n4 = child(t3);
2933
2949
  template_effect((e5) => {
2934
2950
  set_style(t3, W2()), set_class(t3, 1, e5), set_text(n4, k2().cancel.label);
2935
2951
  }, [() => {
2936
2952
  var _a2, _b2, _c2;
2937
- return clsx(cn((_a2 = j2()) == null ? void 0 : _a2.cancelButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.cancelButton));
2953
+ return clsx(cn((_a2 = D2()) == null ? void 0 : _a2.cancelButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.cancelButton));
2938
2954
  }], derived_safe_equal), event("click", t3, () => {
2939
2955
  var _a2;
2940
2956
  deleteToast(), ((_a2 = k2().cancel) == null ? void 0 : _a2.onClick) && k2().cancel.onClick();
@@ -2944,12 +2960,12 @@ function Toast(e2, t2) {
2944
2960
  k2().cancel && e4(consequent_13);
2945
2961
  });
2946
2962
  var c3 = sibling(l3, 2), consequent_14 = (e4) => {
2947
- var t3 = Re(), n4 = child(t3);
2963
+ var t3 = Ve(), n4 = child(t3);
2948
2964
  template_effect((e5) => {
2949
2965
  set_style(t3, z2()), set_class(t3, 1, e5), set_text(n4, k2().action.label);
2950
2966
  }, [() => {
2951
2967
  var _a2, _b2, _c2;
2952
- return clsx(cn((_a2 = j2()) == null ? void 0 : _a2.actionButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.actionButton));
2968
+ return clsx(cn((_a2 = D2()) == null ? void 0 : _a2.actionButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.actionButton));
2953
2969
  }], derived_safe_equal), event("click", t3, (e5) => {
2954
2970
  var _a2;
2955
2971
  (_a2 = k2().action) == null ? void 0 : _a2.onClick(e5), e5.defaultPrevented || deleteToast();
@@ -2961,19 +2977,19 @@ function Toast(e2, t2) {
2961
2977
  };
2962
2978
  if_block(re2, (e3) => {
2963
2979
  k2().component ? e3(consequent_1) : e3(alternate, false);
2964
- }), bind_this(ee2, (e3) => set(R2, e3), () => get$1(R2)), template_effect((e3, t3, s3) => {
2980
+ }), bind_this(ee2, (e3) => set(R2, e3), () => get$1(R2)), template_effect((e3, t3, i3) => {
2965
2981
  var _a2;
2966
- set_attribute(ee2, "aria-live", k2().important ? "assertive" : "polite"), set_class(ee2, 1, e3), set_attribute(ee2, "data-styled", !(k2().component || ((_a2 = k2()) == null ? void 0 : _a2.unstyled) || N2())), set_attribute(ee2, "data-mounted", get$1(B2)), set_attribute(ee2, "data-promise", t3), set_attribute(ee2, "data-removed", get$1(A2)), 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(i2)), set_attribute(ee2, "data-swiping", get$1(L2)), set_attribute(ee2, "data-type", get$1(u2)), set_attribute(ee2, "data-invert", S2()), set_attribute(ee2, "data-swipe-out", get$1(G2)), set_attribute(ee2, "data-expanded", s3), te2 = set_style(ee2, `${n2.style} ${k2().style}`, te2, {
2982
+ set_attribute(ee2, "aria-live", k2().important ? "assertive" : "polite"), set_class(ee2, 1, e3), set_attribute(ee2, "data-styled", !(k2().component || ((_a2 = k2()) == null ? void 0 : _a2.unstyled) || N2())), set_attribute(ee2, "data-mounted", get$1(B2)), set_attribute(ee2, "data-promise", t3), set_attribute(ee2, "data-removed", get$1(A2)), 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(o2)), set_attribute(ee2, "data-swiping", get$1(L2)), set_attribute(ee2, "data-type", get$1(u2)), set_attribute(ee2, "data-invert", S2()), set_attribute(ee2, "data-swipe-out", get$1(G2)), set_attribute(ee2, "data-expanded", i3), te2 = set_style(ee2, `${n2.style} ${k2().style}`, te2, {
2967
2983
  "--index": C2(),
2968
2984
  "--toasts-before": C2(),
2969
- "--z-index": store_get(b2, "$toasts", o2).length - C2(),
2985
+ "--z-index": store_get(b2, "$toasts", s2).length - C2(),
2970
2986
  "--offset": `${get$1(A2) ? get$1(F2) : get$1(U2)}px`,
2971
2987
  "--initial-height": `${get$1(H2)}px`
2972
2988
  });
2973
2989
  }, [() => {
2974
2990
  var _a2, _b2, _c2, _d, _e3, _f;
2975
- return clsx(cn(n2.class, get$1(d2), (_a2 = j2()) == null ? void 0 : _a2.toast, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.toast, (_d = j2()) == null ? void 0 : _d[get$1(u2)], (_f = (_e3 = k2()) == null ? void 0 : _e3.classes) == null ? void 0 : _f[get$1(u2)]));
2976
- }, () => Boolean(k2().promise), () => Boolean(M2() || O2() && get$1(B2))], derived_safe_equal), event("pointerdown", ee2, function onPointerDown(e3) {
2991
+ return clsx(cn(n2.class, get$1(d2), (_a2 = D2()) == null ? void 0 : _a2.toast, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.toast, (_d = D2()) == null ? void 0 : _d[get$1(u2)], (_f = (_e3 = k2()) == null ? void 0 : _e3.classes) == null ? void 0 : _f[get$1(u2)]));
2992
+ }, () => Boolean(k2().promise), () => Boolean(M2() || T2() && get$1(B2))], derived_safe_equal), event("pointerdown", ee2, function onPointerDown(e3) {
2977
2993
  if (get$1(v2)) return;
2978
2994
  set(F2, get$1(U2));
2979
2995
  const t3 = e3.target;
@@ -2990,17 +3006,17 @@ function Toast(e2, t2) {
2990
3006
  get$1(R2).style.setProperty("--swipe-amount", "0px"), set(L2, false);
2991
3007
  }), event("pointermove", ee2, function onPointerMove(e3) {
2992
3008
  if (!Y2) return;
2993
- const t3 = e3.clientY - Y2.y, n3 = e3.clientX - Y2.x, o3 = ("top" === get$1(_2)[0] ? Math.min : Math.max)(0, t3), s3 = "touch" === e3.pointerType ? 10 : 2;
2994
- Math.abs(o3) > s3 ? get$1(R2).style.setProperty("--swipe-amount", `${t3}px`) : Math.abs(n3) > s3 && // User is swiping in wrong direction so we disable swipe gesture
3009
+ const t3 = e3.clientY - Y2.y, n3 = e3.clientX - Y2.x, s3 = ("top" === get$1(_2)[0] ? Math.min : Math.max)(0, t3), i3 = "touch" === e3.pointerType ? 10 : 2;
3010
+ Math.abs(s3) > 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
2995
3011
  // for the current pointer down interaction
2996
3012
  (Y2 = null);
2997
- }), append(e2, ee2), pop(), s2();
3013
+ }), append(e2, ee2), pop(), i2();
2998
3014
  }
2999
- var Ke = /* @__PURE__ */ template("<ol></ol>"), Ye = /* @__PURE__ */ template('<section class="svelte-1fo5d1m"></section>');
3015
+ var Ze = /* @__PURE__ */ template("<ol></ol>"), Je = /* @__PURE__ */ template('<section class="svelte-1fo5d1m"></section>');
3000
3016
  function Toaster(e2, t2) {
3001
- 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"]);
3017
+ const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]), s2 = legacy_rest_props(n2, ["invert", "theme", "position", "hotkey", "containerAriaLabel", "richColors", "expand", "duration", "visibleToasts", "closeButton", "toastOptions", "offset", "dir"]);
3002
3018
  push(t2, false);
3003
- const [s2, i2] = setup_stores(), $toasts = () => store_get(k2, "$toasts", s2), a2 = /* @__PURE__ */ mutable_source(), l2 = /* @__PURE__ */ mutable_source(), c2 = "dark", u2 = "light";
3019
+ const [i2, o2] = setup_stores(), $toasts = () => store_get(k2, "$toasts", i2), a2 = /* @__PURE__ */ mutable_source(), l2 = /* @__PURE__ */ mutable_source(), c2 = "dark", u2 = "light";
3004
3020
  function getDocumentDirection() {
3005
3021
  if ("undefined" == typeof window) return "ltr";
3006
3022
  if ("undefined" == typeof document) return "ltr";
@@ -3008,8 +3024,8 @@ function Toaster(e2, t2) {
3008
3024
  return "auto" !== e3 && e3 ? e3 : window.getComputedStyle(document.documentElement).direction;
3009
3025
  }
3010
3026
  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"]), g2 = prop(t2, "containerAriaLabel", 8, "Notifications"), v2 = 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);
3011
- const { toasts: k2, heights: C2, reset: M2 } = je;
3012
- let S2 = /* @__PURE__ */ mutable_source(false), I2 = /* @__PURE__ */ mutable_source(false), T2 = /* @__PURE__ */ mutable_source(function getInitialTheme(e3) {
3027
+ const { toasts: k2, heights: C2, reset: M2 } = Be;
3028
+ let S2 = /* @__PURE__ */ mutable_source(false), I2 = /* @__PURE__ */ mutable_source(false), O2 = /* @__PURE__ */ mutable_source(function getInitialTheme(e3) {
3013
3029
  return "system" !== e3 ? e3 : "undefined" != typeof window && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? c2 : u2;
3014
3030
  }(f2())), P2 = /* @__PURE__ */ mutable_source(), q2 = null, W2 = false;
3015
3031
  function handleBlur(e3) {
@@ -3021,7 +3037,7 @@ function Toaster(e2, t2) {
3021
3037
  W2 || (W2 = true, q2 = e3.relatedTarget);
3022
3038
  }
3023
3039
  !function onDestroy(e3) {
3024
- null === O && lifecycle_outside_component(), onMount(() => () => untrack(e3));
3040
+ null === T && lifecycle_outside_component(), onMount(() => () => untrack(e3));
3025
3041
  }(() => {
3026
3042
  get$1(P2) && q2 && (q2.focus({
3027
3043
  preventScroll: true
@@ -3054,17 +3070,17 @@ function Toaster(e2, t2) {
3054
3070
  k2.set(t3);
3055
3071
  }
3056
3072
  }), legacy_pre_effect(() => deep_read_state(f2()), () => {
3057
- if ("system" !== f2() && set(T2, f2()), "undefined" != typeof window) {
3073
+ if ("system" !== f2() && set(O2, f2()), "undefined" != typeof window) {
3058
3074
  "system" === f2() && // check if current preference is dark
3059
3075
  (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? (
3060
3076
  // it's currently dark
3061
- set(T2, c2)
3077
+ set(O2, c2)
3062
3078
  ) : (
3063
3079
  // it's not dark
3064
- set(T2, u2)
3080
+ set(O2, u2)
3065
3081
  ));
3066
3082
  const e3 = window.matchMedia("(prefers-color-scheme: dark)"), changeHandler = ({ matches: e4 }) => {
3067
- set(T2, e4 ? c2 : u2);
3083
+ set(O2, e4 ? c2 : u2);
3068
3084
  };
3069
3085
  "addEventListener" in e3 ? e3.addEventListener("change", changeHandler) : (
3070
3086
  // @ts-expect-error deprecated API
@@ -3072,12 +3088,12 @@ function Toaster(e2, t2) {
3072
3088
  );
3073
3089
  }
3074
3090
  }), legacy_pre_effect_reset(), init();
3075
- var z2 = comment(), D2 = first_child(z2), consequent = (e3) => {
3076
- var i3 = Ye();
3077
- set_attribute(i3, "tabindex", -1), each(i3, 5, () => get$1(a2), index, (e4, i4, a3, l3) => {
3078
- var c3 = Ke();
3091
+ var z2 = comment(), E2 = first_child(z2), consequent = (e3) => {
3092
+ var o3 = Je();
3093
+ set_attribute(o3, "tabindex", -1), each(o3, 5, () => get$1(a2), index, (e4, o4, a3, l3) => {
3094
+ var c3 = Ze();
3079
3095
  let u3;
3080
- each(c3, 7, () => $toasts().filter((e5) => !e5.position && 0 === a3 || e5.position === get$1(i4)), (e5) => e5.id, (e5, n3, o3, s3) => {
3096
+ each(c3, 7, () => $toasts().filter((e5) => !e5.position && 0 === a3 || e5.position === get$1(o4)), (e5) => e5.id, (e5, n3, s3, i3) => {
3081
3097
  const a4 = /* @__PURE__ */ derived_safe_equal(() => {
3082
3098
  var _a2;
3083
3099
  return ((_a2 = $2()) == null ? void 0 : _a2.actionButtonStyle) || "";
@@ -3096,7 +3112,7 @@ function Toaster(e2, t2) {
3096
3112
  }), _3 = /* @__PURE__ */ derived_safe_equal(() => $2().unstyled || false);
3097
3113
  Toast(e5, {
3098
3114
  get index() {
3099
- return get$1(o3);
3115
+ return get$1(s3);
3100
3116
  },
3101
3117
  get toast() {
3102
3118
  return get$1(n3);
@@ -3114,7 +3130,7 @@ function Toaster(e2, t2) {
3114
3130
  return get$1(I2);
3115
3131
  },
3116
3132
  get position() {
3117
- return get$1(i4);
3133
+ return get$1(o4);
3118
3134
  },
3119
3135
  get expandByDefault() {
3120
3136
  return h2();
@@ -3144,108 +3160,107 @@ function Toaster(e2, t2) {
3144
3160
  return get$1(_3);
3145
3161
  },
3146
3162
  $$slots: {
3147
- "loading-icon": (e6, o4) => {
3148
- var s4 = comment();
3149
- slot(first_child(s4), t2, "loading-icon", {}, (e7) => {
3163
+ "loading-icon": (e6, s4) => {
3164
+ var i4 = comment();
3165
+ slot(first_child(i4), t2, "loading-icon", {}, (e7) => {
3150
3166
  const t3 = /* @__PURE__ */ derived_safe_equal(() => "loading" === get$1(n3).type);
3151
3167
  Loader(e7, {
3152
3168
  get visible() {
3153
3169
  return get$1(t3);
3154
3170
  }
3155
3171
  });
3156
- }), append(e6, s4);
3172
+ }), append(e6, i4);
3157
3173
  },
3158
3174
  "success-icon": (e6, n4) => {
3159
- var o4 = comment();
3160
- slot(first_child(o4), t2, "success-icon", {}, (e7) => {
3175
+ var s4 = comment();
3176
+ slot(first_child(s4), t2, "success-icon", {}, (e7) => {
3161
3177
  Icon(e7, {
3162
3178
  type: "success"
3163
3179
  });
3164
- }), append(e6, o4);
3180
+ }), append(e6, s4);
3165
3181
  },
3166
3182
  "error-icon": (e6, n4) => {
3167
- var o4 = comment();
3168
- slot(first_child(o4), t2, "error-icon", {}, (e7) => {
3183
+ var s4 = comment();
3184
+ slot(first_child(s4), t2, "error-icon", {}, (e7) => {
3169
3185
  Icon(e7, {
3170
3186
  type: "error"
3171
3187
  });
3172
- }), append(e6, o4);
3188
+ }), append(e6, s4);
3173
3189
  },
3174
3190
  "warning-icon": (e6, n4) => {
3175
- var o4 = comment();
3176
- slot(first_child(o4), t2, "warning-icon", {}, (e7) => {
3191
+ var s4 = comment();
3192
+ slot(first_child(s4), t2, "warning-icon", {}, (e7) => {
3177
3193
  Icon(e7, {
3178
3194
  type: "warning"
3179
3195
  });
3180
- }), append(e6, o4);
3196
+ }), append(e6, s4);
3181
3197
  },
3182
3198
  "info-icon": (e6, n4) => {
3183
- var o4 = comment();
3184
- slot(first_child(o4), t2, "info-icon", {}, (e7) => {
3199
+ var s4 = comment();
3200
+ slot(first_child(s4), t2, "info-icon", {}, (e7) => {
3185
3201
  Icon(e7, {
3186
3202
  type: "info"
3187
3203
  });
3188
- }), append(e6, o4);
3204
+ }), append(e6, s4);
3189
3205
  }
3190
3206
  }
3191
3207
  });
3192
- }), bind_this(c3, (e5) => set(P2, e5), () => get$1(P2)), template_effect((e5, t3, i5) => {
3208
+ }), bind_this(c3, (e5) => set(P2, e5), () => get$1(P2)), template_effect((e5, t3, o5) => {
3193
3209
  var _a2;
3194
3210
  u3 = set_attributes(c3, u3, {
3195
3211
  tabIndex: -1,
3196
3212
  class: n2.class,
3197
3213
  "data-sonner-toaster": true,
3198
- "data-theme": get$1(T2),
3214
+ "data-theme": get$1(O2),
3199
3215
  "data-rich-colors": v2(),
3200
3216
  dir: e5,
3201
3217
  "data-y-position": t3,
3202
- "data-x-position": i5,
3218
+ "data-x-position": o5,
3203
3219
  style: n2.style,
3204
- ...o2,
3220
+ ...s2,
3205
3221
  [ge]: {
3206
- "--front-toast-height": `${(_a2 = store_get(C2, "$heights", s2)[0]) == null ? void 0 : _a2.height}px`,
3222
+ "--front-toast-height": `${(_a2 = store_get(C2, "$heights", i2)[0]) == null ? void 0 : _a2.height}px`,
3207
3223
  "--offset": "number" == typeof w2() ? `${w2()}px` : w2() || "32px",
3208
3224
  "--width": "356px",
3209
3225
  "--gap": "14px"
3210
3226
  }
3211
3227
  }, "svelte-1fo5d1m"), c3.dir = c3.dir;
3212
- }, [() => "auto" === x2() ? getDocumentDirection() : x2(), () => get$1(i4).split("-")[0], () => get$1(i4).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, () => {
3228
+ }, [() => "auto" === x2() ? getDocumentDirection() : x2(), () => get$1(o4).split("-")[0], () => get$1(o4).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, () => {
3213
3229
  get$1(I2) || set(S2, false);
3214
3230
  }), event("pointerdown", c3, () => set(I2, true)), event("pointerup", c3, () => set(I2, false)), append(e4, c3);
3215
- }), template_effect(() => set_attribute(i3, "aria-label", `${g2()} ${get$1(l2)}`)), append(e3, i3);
3231
+ }), template_effect(() => set_attribute(o3, "aria-label", `${g2()} ${get$1(l2)}`)), append(e3, o3);
3216
3232
  };
3217
- if_block(D2, (e3) => {
3233
+ if_block(E2, (e3) => {
3218
3234
  $toasts().length > 0 && e3(consequent);
3219
- }), append(e2, z2), pop(), i2();
3235
+ }), append(e2, z2), pop(), o2();
3220
3236
  }
3221
- const Ze = writable(false), Je = writable(false), Xe = writable("https://sdk.playlight.dev");
3222
- const Qe = new (_b = class {
3237
+ const Xe = new (_b = class {
3223
3238
  constructor() {
3224
3239
  __privateAdd(this, _PlayLightAPI_instances);
3225
3240
  this.baseUrl = "https://api.playlight.dev/platform", this.cachedCategories = null, this.currentGame = null;
3226
3241
  }
3227
3242
  async request(e2, t2 = {}) {
3228
3243
  try {
3229
- const n2 = `${this.baseUrl}${e2}`, o2 = await fetch(n2, {
3244
+ const n2 = `${this.baseUrl}${e2}`, s2 = await fetch(n2, {
3230
3245
  ...t2,
3231
3246
  headers: {
3232
3247
  "Content-Type": "application/json",
3233
3248
  ...t2.headers
3234
3249
  }
3235
3250
  });
3236
- if (!o2.ok) {
3251
+ if (!s2.ok) {
3237
3252
  let e3;
3238
3253
  try {
3239
- e3 = await o2.json();
3254
+ e3 = await s2.json();
3240
3255
  } catch {
3241
3256
  } finally {
3242
- 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}`);
3243
- 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.");
3257
+ if (429 !== s2.status && 404 !== s2.status) throw new Error(`API request failed: ${(e3 == null ? void 0 : e3.error) || (e3 == null ? void 0 : e3.message) || s2.status}`);
3258
+ return 429 === s2.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.");
3244
3259
  }
3245
3260
  }
3246
- return await o2.json();
3261
+ return await s2.json();
3247
3262
  } catch (e3) {
3248
- Be.error("Error: " + e3), console.error("Playlight API error:", e3);
3263
+ Le.error("Error: " + e3), console.error("Playlight API error:", e3);
3249
3264
  }
3250
3265
  }
3251
3266
  // Get all categories
@@ -3257,19 +3272,19 @@ const Qe = new (_b = class {
3257
3272
  // Get game suggestions, optionally filtered by category
3258
3273
  async getSuggestions(e2 = null, t2 = 1) {
3259
3274
  let n2 = "/suggestions";
3260
- return e2 && (n2 += "/" + e2), t2 && (n2 += "?page=" + t2), n2 += "&without=" + __privateMethod(this, _PlayLightAPI_instances, o_fn).call(this), await this.request(n2);
3275
+ return e2 && (n2 += "/" + e2), t2 && (n2 += "?page=" + t2), n2 += "&without=" + __privateMethod(this, _PlayLightAPI_instances, s_fn).call(this), await this.request(n2);
3261
3276
  }
3262
3277
  // Get game suggestions, optionally filtered by category
3263
3278
  async getCurrentGameInfo() {
3264
3279
  if (this.currentGame) return this.currentGame;
3265
- let e2 = "/game-by-domain/" + __privateMethod(this, _PlayLightAPI_instances, o_fn).call(this);
3280
+ let e2 = "/game-by-domain/" + __privateMethod(this, _PlayLightAPI_instances, s_fn).call(this);
3266
3281
  return this.currentGame = await this.request(e2), this.currentGame ? {
3267
3282
  ...this.currentGame
3268
3283
  } : void 0;
3269
3284
  }
3270
3285
  // Track discovery overlay open
3271
3286
  async trackOpen() {
3272
- const e2 = __privateMethod(this, _PlayLightAPI_instances, o_fn).call(this);
3287
+ const e2 = __privateMethod(this, _PlayLightAPI_instances, s_fn).call(this);
3273
3288
  await this.request("/event/open", {
3274
3289
  method: "POST",
3275
3290
  body: JSON.stringify({
@@ -3279,7 +3294,7 @@ const Qe = new (_b = class {
3279
3294
  }
3280
3295
  // Track game click (pass id of the game that was clicked on)
3281
3296
  async trackClick(e2) {
3282
- const t2 = __privateMethod(this, _PlayLightAPI_instances, o_fn).call(this);
3297
+ const t2 = __privateMethod(this, _PlayLightAPI_instances, s_fn).call(this);
3283
3298
  await this.request("/event/click", {
3284
3299
  method: "POST",
3285
3300
  body: JSON.stringify({
@@ -3290,22 +3305,22 @@ const Qe = new (_b = class {
3290
3305
  }
3291
3306
  // Like or unlike a game (pass gameId and true to like, false to unlike)
3292
3307
  async toggleLike(e2, t2 = true) {
3293
- const n2 = t2 ? "like" : "unlike", o2 = await this.request(`/rating/${e2}/${n2}`, {
3308
+ const n2 = t2 ? "like" : "unlike", s2 = await this.request(`/rating/${e2}/${n2}`, {
3294
3309
  method: "POST"
3295
3310
  });
3296
- return (o2 == null ? void 0 : o2.success) || false;
3311
+ return (s2 == null ? void 0 : s2.success) || false;
3297
3312
  }
3298
- }, _PlayLightAPI_instances = new WeakSet(), o_fn = function() {
3313
+ }, _PlayLightAPI_instances = new WeakSet(), s_fn = function() {
3299
3314
  const e2 = window.location.hostname;
3300
3315
  return e2.startsWith("www.") ? e2.substring(4) : e2;
3301
3316
  }, _b)();
3302
- var on_click$3 = (e2, t2, n2, o2, s2) => {
3303
- !get$1(t2) || get$1(n2) ? (Qe.trackClick(s2.game.id), window.open("https://" + s2.game.domain + "?utm_source=playlight", "_blank", "noopener")) : o2();
3304
- }, et = /* @__PURE__ */ template('<div><p class="text-primary font-bold uppercase">New</p></div>'), tt = /* @__PURE__ */ template('<video playsinline="" loop preload="auto"></video>', 2), nt = /* @__PURE__ */ template('<div class="bg-background/25 text-muted-foreground z-12 flex items-center justify-center gap-1 border-t p-1 px-2 text-sm"><!> <p class="text-muted-foreground text-sm">Tap again to open</p></div>'), rt = /* @__PURE__ */ template('<div class="bg-background/75 text-foreground absolute right-0 bottom-0 left-0 z-11 flex max-h-1/3 flex-col overflow-hidden backdrop-blur-xl"><div class="h-full w-full overflow-y-auto p-3"><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></div></div>'), ot = /* @__PURE__ */ template('<div role="button" tabindex="0"><!> <!> <img alt="cover" loading="eager"> <!> <img alt="game logo" loading="eager"></div>');
3317
+ var on_click$3 = (e2, t2, n2, s2, i2) => {
3318
+ !get$1(t2) || get$1(n2) ? (Xe.trackClick(i2.game.id), window.open("https://" + i2.game.domain + "?utm_source=playlight", "_blank", "noopener")) : s2();
3319
+ }, Qe = /* @__PURE__ */ template('<div><p class="font-bold text-white uppercase">New</p></div>'), et = /* @__PURE__ */ template('<video playsinline="" loop preload="auto"></video>', 2), tt = /* @__PURE__ */ template('<div class="bg-background/25 text-muted-foreground z-12 flex items-center justify-center gap-1 border-t p-1 px-2 text-sm"><!> <p class="text-muted-foreground text-sm">Tap again to open</p></div>'), nt = /* @__PURE__ */ template('<div class="bg-background/75 absolute right-0 bottom-0 left-0 z-11 flex max-h-1/3 flex-col overflow-hidden text-white backdrop-blur-xl"><div class="h-full w-full overflow-y-auto p-3"><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></div></div>'), rt = /* @__PURE__ */ template('<div role="button" tabindex="0"><!> <!> <img alt="cover" loading="eager"> <!> <img alt="game logo" loading="eager"></div>');
3305
3320
  function GameCard(e2, t2) {
3306
3321
  push(t2, true);
3307
- const [n2, o2] = setup_stores();
3308
- let s2, i2 = prop(t2, "compact", 3, false), a2 = state(false), l2 = state(false), c2 = state(void 0), u2 = state(false), d2 = state(false), f2 = state(false), p2 = state(false), _2 = state(void 0);
3322
+ const [n2, s2] = setup_stores();
3323
+ let i2, o2 = prop(t2, "compact", 3, false), a2 = state(false), l2 = state(false), c2 = state(void 0), u2 = state(false), d2 = state(false), f2 = state(false), p2 = state(false), _2 = state(void 0);
3309
3324
  function handleMouseEnter() {
3310
3325
  get$1(a2) || get$1(p2) || function playSound(e3, t3 = 1) {
3311
3326
  try {
@@ -3314,23 +3329,23 @@ function GameCard(e2, t2) {
3314
3329
  } catch (e4) {
3315
3330
  console.error("Error playing sound:", e4);
3316
3331
  }
3317
- }(store_get(Xe, "$projectUrl", n2) + "/static/sounds/hover-selection.ogg", 0.25), set(a2, true), clearTimeout(s2), s2 = setTimeout(() => set(l2, true), 300), get$1(c2) && t2.game.cover_video_url && get$1(c2).play().catch((e3) => console.error("Video play error:", e3));
3332
+ }(store_get(Te, "$projectUrl", n2) + "/static/sounds/hover-selection.ogg", 0.25), set(a2, true), clearTimeout(i2), i2 = setTimeout(() => set(l2, true), 300), get$1(c2) && t2.game.cover_video_url && get$1(c2).play().catch((e3) => console.error("Video play error:", e3));
3318
3333
  }
3319
3334
  function handleMouseLeave() {
3320
- get$1(p2) || (setUnhovered(), get$1(c2) && get$1(u2) && get$1(c2).pause());
3335
+ get$1(p2) || (get$1(c2) && get$1(u2) && get$1(c2).pause(), setUnhovered());
3321
3336
  }
3322
3337
  function setUnhovered() {
3323
- set(a2, false), clearTimeout(s2), set(l2, false);
3338
+ set(a2, false), clearTimeout(i2), set(l2, false);
3324
3339
  }
3325
3340
  user_effect(() => {
3326
3341
  set(p2, "ontouchstart" in window);
3327
3342
  });
3328
- var g2 = ot();
3343
+ var g2 = rt();
3329
3344
  event("touchstart", q, () => set(p2, true), void 0, true), event("touchstart", W, (e3) => {
3330
3345
  get$1(_2) && !get$1(_2).contains(e3.target) && setUnhovered();
3331
3346
  }, void 0, true), g2.__click = [on_click$3, p2, l2, handleMouseEnter, t2];
3332
3347
  var v2 = child(g2), consequent = (e3) => {
3333
- var t3 = et();
3348
+ var t3 = Qe();
3334
3349
  let n3;
3335
3350
  template_effect((e4) => n3 = set_class(t3, 1, "bg-background absolute top-4 right-4 z-12 px-2 py-0.5 transition-opacity select-none", null, n3, e4), [() => ({
3336
3351
  "opacity-0": get$1(a2)
@@ -3344,10 +3359,10 @@ function GameCard(e2, t2) {
3344
3359
  })((_a2 = t2.game) == null ? void 0 : _a2.created_at) && e3(consequent);
3345
3360
  });
3346
3361
  var h2 = sibling(v2, 2), consequent_1 = (e3) => {
3347
- var n3 = tt();
3348
- let o3;
3362
+ var n3 = et();
3363
+ let s3;
3349
3364
  n3.muted = true, bind_this(n3, (e4) => set(c2, e4), () => get$1(c2)), template_effect((e4) => {
3350
- set_attribute(n3, "src", t2.game.cover_video_url), o3 = set_class(n3, 1, "absolute top-0 left-0 z-5 h-full w-full object-cover opacity-0", null, o3, e4);
3365
+ set_attribute(n3, "src", t2.game.cover_video_url), s3 = set_class(n3, 1, "absolute top-0 left-0 z-5 h-full w-full object-cover opacity-0", null, s3, e4);
3351
3366
  }, [() => ({
3352
3367
  "opacity-100": get$1(a2) && get$1(u2) && t2.game.cover_video_url
3353
3368
  })]), event("loadeddata", n3, () => {
@@ -3360,8 +3375,8 @@ function GameCard(e2, t2) {
3360
3375
  var m2 = sibling(h2, 2);
3361
3376
  let b2;
3362
3377
  var y2 = sibling(m2, 2), consequent_3 = (e3) => {
3363
- var n3 = rt(), o3 = child(n3), s3 = child(o3), i3 = child(s3), a3 = child(sibling(s3, 2)), l3 = sibling(o3, 2), consequent_2 = (e4) => {
3364
- var t3 = nt();
3378
+ var n3 = nt(), s3 = child(n3), i3 = child(s3), o3 = child(i3), a3 = child(sibling(i3, 2)), l3 = sibling(s3, 2), consequent_2 = (e4) => {
3379
+ var t3 = tt();
3365
3380
  !function Info(e5, t4) {
3366
3381
  const n4 = legacy_rest_props(t4, ["children", "$$slots", "$$events", "$$legacy"]);
3367
3382
  Icon$1(e5, spread_props({
@@ -3377,8 +3392,8 @@ function GameCard(e2, t2) {
3377
3392
  d: "M12 8h.01"
3378
3393
  }]],
3379
3394
  children: (e6, n5) => {
3380
- var o4 = comment();
3381
- slot(first_child(o4), t4, "default", {}, null), append(e6, o4);
3395
+ var s4 = comment();
3396
+ slot(first_child(s4), t4, "default", {}, null), append(e6, s4);
3382
3397
  },
3383
3398
  $$slots: {
3384
3399
  default: true
@@ -3393,7 +3408,7 @@ function GameCard(e2, t2) {
3393
3408
  });
3394
3409
  var c3 = sibling(l3, 2);
3395
3410
  template_effect(() => {
3396
- set_text(i3, t2.game.name), set_text(a3, t2.game.description || "No description."), set_class(c3, 1, `fade-mask bg-background/75 pointer-events-none absolute right-0 ${(get$1(p2) ? "bottom-7" : "bottom-0") ?? ""} left-0 h-8`, "svelte-o63m4o");
3411
+ set_text(o3, t2.game.name), set_text(a3, t2.game.description || "No description."), set_class(c3, 1, `fade-mask bg-background/75 pointer-events-none absolute right-0 ${(get$1(p2) ? "bottom-7" : "bottom-0") ?? ""} left-0 h-8`, "svelte-o63m4o");
3397
3412
  }), transition(3, n3, () => slide), append(e3, n3);
3398
3413
  };
3399
3414
  if_block(y2, (e3) => {
@@ -3402,7 +3417,7 @@ function GameCard(e2, t2) {
3402
3417
  var $2 = sibling(y2, 2);
3403
3418
  let w2;
3404
3419
  bind_this(g2, (e3) => set(_2, e3), () => get$1(_2)), template_effect((e3, n3) => {
3405
- set_class(g2, 1, `bg-background highlight-border group relative mt-5 mb-[calc(3dvh+1.5vw)] flex aspect-[2/3] h-1/2 max-h-[75vh] cursor-pointer flex-col shadow-xl transition hover:outline-2 lg:h-3/7 ${(get$1(d2) ? "" : "animate-pulse") ?? ""} ${(i2() ? "min-h-62" : "min-h-92") ?? ""}`, "svelte-o63m4o"), set_attribute(m2, "src", t2.game.cover_image_url), b2 = set_class(m2, 1, "prevent-image-select absolute top-0 left-0 z-10 h-full w-full object-cover opacity-0 transition svelte-o63m4o", null, b2, e3), set_attribute($2, "src", t2.game.logo_url), w2 = set_class($2, 1, "prevent-image-select absolute right-0 -bottom-[18%] left-0 z-10 mx-auto aspect-square w-1/5 rounded-full object-center opacity-0 shadow-xl transition group-hover:outline-2 svelte-o63m4o", null, w2, n3);
3420
+ set_class(g2, 1, `bg-background highlight-border group relative mt-5 mb-[calc(3dvh+1.5vw)] flex aspect-[2/3] h-1/2 max-h-[75vh] cursor-pointer flex-col shadow-xl transition hover:outline-2 lg:h-3/7 ${(get$1(d2) ? "" : "animate-pulse") ?? ""} ${(o2() ? "min-h-62" : "min-h-92") ?? ""}`, "svelte-o63m4o"), set_attribute(m2, "src", t2.game.cover_image_url), b2 = set_class(m2, 1, "prevent-image-select absolute top-0 left-0 z-10 h-full w-full object-cover opacity-0 transition svelte-o63m4o", null, b2, e3), set_attribute($2, "src", t2.game.logo_url), w2 = set_class($2, 1, "prevent-image-select absolute right-0 -bottom-[18%] left-0 z-10 mx-auto aspect-square w-1/5 rounded-full object-center opacity-0 shadow-xl transition group-hover:outline-2 svelte-o63m4o", null, w2, n3);
3406
3421
  }, [() => ({
3407
3422
  "opacity-100": get$1(d2) && (!get$1(a2) || !get$1(u2) || !t2.game.cover_video_url)
3408
3423
  }), () => ({
@@ -3411,17 +3426,25 @@ function GameCard(e2, t2) {
3411
3426
  set(d2, true);
3412
3427
  }), event("load", $2, () => {
3413
3428
  set(f2, true);
3414
- }), append(e2, g2), pop(), o2();
3429
+ }), append(e2, g2), pop(), s2();
3430
+ }
3431
+ function backInOut(e2) {
3432
+ const t2 = 2.5949095;
3433
+ return (e2 *= 2) < 1 ? e2 * e2 * ((t2 + 1) * e2 - t2) * 0.5 : 0.5 * ((e2 -= 2) * e2 * ((t2 + 1) * e2 + t2) + 2);
3434
+ }
3435
+ function backOut(e2) {
3436
+ const t2 = 1.70158;
3437
+ return --e2 * e2 * ((t2 + 1) * e2 + t2) + 1;
3415
3438
  }
3416
3439
  function cubicOut(e2) {
3417
3440
  const t2 = e2 - 1;
3418
3441
  return t2 * t2 * t2 + 1;
3419
3442
  }
3420
- function elasticOut(e2) {
3421
- return Math.sin(-13 * (e2 + 1) * Math.PI / 2) * Math.pow(2, -10 * e2) + 1;
3443
+ function sineOut(e2) {
3444
+ return Math.sin(e2 * Math.PI / 2);
3422
3445
  }
3423
- function flip(e2, { from: t2, to: n2 }, o2 = {}) {
3424
- var { delay: s2 = 0, duration: i2 = (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);
3446
+ function flip(e2, { from: t2, to: n2 }, s2 = {}) {
3447
+ var { delay: i2 = 0, duration: o2 = (e3) => 120 * Math.sqrt(e3), easing: a2 = cubicOut } = s2, l2 = getComputedStyle(e2), c2 = "none" === l2.transform ? "" : l2.transform, [u2, d2] = l2.transformOrigin.split(" ").map(parseFloat);
3425
3448
  u2 /= e2.clientWidth, d2 /= e2.clientHeight;
3426
3449
  var f2 = (
3427
3450
  /**
@@ -3437,8 +3460,8 @@ function flip(e2, { from: t2, to: n2 }, o2 = {}) {
3437
3460
  }(e2)
3438
3461
  ), p2 = e2.clientWidth / n2.width / f2, _2 = e2.clientHeight / n2.height / f2, g2 = t2.left + t2.width * u2, v2 = t2.top + t2.height * d2, h2 = n2.left + n2.width * u2, m2 = n2.top + n2.height * d2, b2 = (g2 - h2) * p2, y2 = (v2 - m2) * _2, $2 = t2.width / n2.width, w2 = t2.height / n2.height;
3439
3462
  return {
3440
- delay: s2,
3441
- duration: "function" == typeof i2 ? i2(Math.sqrt(b2 * b2 + y2 * y2)) : i2,
3463
+ delay: i2,
3464
+ duration: "function" == typeof o2 ? o2(Math.sqrt(b2 * b2 + y2 * y2)) : o2,
3442
3465
  easing: a2,
3443
3466
  css: (e3, t3) => `transform: ${c2} translate(${t3 * b2}px, ${t3 * y2}px) scale(${e3 + t3 * $2}, ${e3 + t3 * w2});`
3444
3467
  };
@@ -3446,28 +3469,27 @@ function flip(e2, { from: t2, to: n2 }, o2 = {}) {
3446
3469
  delegate(["click"]);
3447
3470
  var on_click$2 = (e2, t2, n2) => {
3448
3471
  set(t2, ""), set(n2, !get$1(n2));
3449
- }, st = /* @__PURE__ */ template('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'), it = /* @__PURE__ */ template('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'), on_click_1$2 = (e2, t2, n2, o2, s2) => {
3472
+ }, st = /* @__PURE__ */ template('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'), it = /* @__PURE__ */ template('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'), on_click_1$1 = (e2, t2, n2, s2, i2) => {
3450
3473
  var _a2;
3451
- t2(n2), set(o2, false), (_a2 = s2.onCategoryChange) == null ? void 0 : _a2.call(s2);
3452
- }, at = /* @__PURE__ */ template("<button> </button>"), lt = /* @__PURE__ */ template('<div class="space-y-1 p-1"></div>'), ct = /* @__PURE__ */ template('<div class="bg-background/85 fixed left-1/2 z-50 mt-22 w-30 w-full max-w-xs -translate-x-1/2 transform border shadow-lg backdrop-blur-xl"><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>'), ut = /* @__PURE__ */ template('<div class="flex w-full flex-col"><h1 class="mb-0! text-center text-2xl font-bold text-white drop-shadow-xl lg:text-4xl"><span> </span> <button class="group text-background mx-1 inline-flex cursor-pointer items-center bg-white px-3 py-1 transition hover:rotate-5"><span class="text-background max-w-[40vw] truncate text-2xl font-bold lg:text-4xl"> </span> <!></button> <span>games?</span></h1> <!></div>');
3474
+ t2(n2), set(s2, false), (_a2 = i2.onCategoryChange) == null ? void 0 : _a2.call(i2);
3475
+ }, ot = /* @__PURE__ */ template("<button> </button>"), at = /* @__PURE__ */ template('<div class="space-y-1 p-1"></div>'), lt = /* @__PURE__ */ template('<div class="bg-background/85 fixed left-1/2 z-50 mt-22 w-30 w-full max-w-xs -translate-x-1/2 transform border shadow-lg backdrop-blur-xl"><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>'), ct = /* @__PURE__ */ template('<div class="flex w-full flex-col"><h1 class="mb-0! text-center text-2xl font-bold text-white drop-shadow-xl sm: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] truncate text-2xl font-bold text-black sm:text-4xl"> </span> <!></button> <span>games?</span></h1> <!></div>');
3453
3476
  function Navigation(e2, t2) {
3454
3477
  push(t2, true);
3455
- let n2, o2 = prop(t2, "categories", 19, () => []), s2 = prop(t2, "selectedCategory", 15), i2 = state(false), a2 = user_derived(() => s2() || (o2().length > 0 ? o2()[0] : "...")), l2 = state(""), c2 = state(void 0), u2 = user_derived(() => get$1(l2) ? o2().filter((e3) => e3.toLowerCase().includes(get$1(l2).toLowerCase())) : o2());
3478
+ let n2, s2 = prop(t2, "categories", 19, () => []), i2 = prop(t2, "selectedCategory", 15), o2 = state(false), a2 = user_derived(() => i2() || (s2().length > 0 ? s2()[0] : "...")), l2 = state(""), c2 = state(void 0), u2 = user_derived(() => get$1(l2) ? s2().filter((e3) => e3.toLowerCase().includes(get$1(l2).toLowerCase())) : s2());
3456
3479
  const d2 = ["Looking for", "Interested in", "Searching for", "Fancy some", "What about these"];
3457
- let f2, p2 = state(proxy(d2[0]));
3458
- onMount(function updateRandomPhrase() {
3459
- let e3;
3460
- for (e3 = Math.floor(Math.random() * (d2 == null ? void 0 : d2.length)); e3 == f2; ) e3 = Math.floor(Math.random() * (d2 == null ? void 0 : d2.length));
3461
- set(p2, d2[e3], true), f2 = e3;
3480
+ let f2 = state(proxy(d2[0]));
3481
+ onMount(() => {
3482
+ set(f2, d2[Math.floor(Math.random() * (d2 == null ? void 0 : d2.length))], true);
3462
3483
  });
3463
- var _2 = ut();
3484
+ var p2 = ct();
3464
3485
  event("click", W, (e3) => {
3465
- get$1(c2) && !get$1(c2).contains(e3.target) && n2 && !n2.contains(e3.target) && set(i2, false);
3486
+ var _a2;
3487
+ !get$1(c2) || ((_a2 = get$1(c2)) == null ? void 0 : _a2.contains(e3.target)) || (n2 == null ? void 0 : n2.contains(e3.target)) || set(o2, false);
3466
3488
  });
3467
- var g2 = child(_2), v2 = child(g2), h2 = child(v2), m2 = sibling(v2, 2);
3468
- m2.__click = [on_click$2, l2, i2];
3469
- var b2 = child(m2), y2 = child(b2), $2 = sibling(b2, 2);
3470
- const w2 = user_derived(() => get$1(i2) ? "rotate-180 transform" : "");
3489
+ var _2 = child(p2), g2 = child(_2), v2 = child(g2), h2 = sibling(g2, 2);
3490
+ h2.__click = [on_click$2, l2, o2];
3491
+ var m2 = child(h2), b2 = child(m2), y2 = sibling(m2, 2);
3492
+ const $2 = user_derived(() => get$1(o2) ? "rotate-180 transform" : "");
3471
3493
  !function Chevron_down(e3, t3) {
3472
3494
  const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
3473
3495
  Icon$1(e3, spread_props({
@@ -3477,22 +3499,22 @@ function Navigation(e2, t2) {
3477
3499
  d: "m6 9 6 6 6-6"
3478
3500
  }]],
3479
3501
  children: (e4, n4) => {
3480
- var o3 = comment();
3481
- slot(first_child(o3), t3, "default", {}, null), append(e4, o3);
3502
+ var s3 = comment();
3503
+ slot(first_child(s3), t3, "default", {}, null), append(e4, s3);
3482
3504
  },
3483
3505
  $$slots: {
3484
3506
  default: true
3485
3507
  }
3486
3508
  }));
3487
- }($2, {
3509
+ }(y2, {
3488
3510
  size: 25,
3489
3511
  strokeWidth: 3,
3490
3512
  get class() {
3491
- return `text-background mt-1 ml-1 ${get$1(w2) ?? ""} transition-transform duration-200`;
3513
+ return `mt-1 ml-1 text-black ${get$1($2) ?? ""} transition-transform duration-200`;
3492
3514
  }
3493
- }), bind_this(m2, (e3) => n2 = e3, () => n2);
3494
- var x2 = sibling(g2, 2), consequent_2 = (e3) => {
3495
- var n3 = ct(), a3 = child(n3), d3 = child(a3), f3 = child(d3);
3515
+ }), bind_this(h2, (e3) => n2 = e3, () => n2);
3516
+ var w2 = sibling(_2, 2), consequent_2 = (e3) => {
3517
+ var n3 = lt(), a3 = child(n3), d3 = child(a3), f3 = child(d3);
3496
3518
  !function Search(e4, t3) {
3497
3519
  const n4 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
3498
3520
  Icon$1(e4, spread_props({
@@ -3506,8 +3528,8 @@ function Navigation(e2, t2) {
3506
3528
  d: "m21 21-4.3-4.3"
3507
3529
  }]],
3508
3530
  children: (e5, n5) => {
3509
- var o3 = comment();
3510
- slot(first_child(o3), t3, "default", {}, null), append(e5, o3);
3531
+ var s3 = comment();
3532
+ slot(first_child(s3), t3, "default", {}, null), append(e5, s3);
3511
3533
  },
3512
3534
  $$slots: {
3513
3535
  default: true
@@ -3524,52 +3546,52 @@ function Navigation(e2, t2) {
3524
3546
  var consequent_1 = (e5) => {
3525
3547
  append(e5, it());
3526
3548
  }, alternate_1 = (e5) => {
3527
- var n5 = lt();
3549
+ var n5 = at();
3528
3550
  each(n5, 28, () => get$1(u2), (e6) => e6, (e6, n6) => {
3529
- var o3 = at();
3530
- o3.__click = [on_click_1$2, s2, n6, i2, t2];
3531
- var a4 = child(o3);
3551
+ var s3 = ot();
3552
+ s3.__click = [on_click_1$1, i2, n6, o2, t2];
3553
+ var a4 = child(s3);
3532
3554
  template_effect(() => {
3533
- set_class(o3, 1, `w-full cursor-pointer px-4 py-2 text-left transition-colors ${(s2() != n6 ? "hover:bg-muted-foreground/20" : "") ?? ""} ${(s2() == n6 ? "text-background bg-white" : "text-white") ?? ""}`), set_text(a4, n6);
3555
+ set_class(s3, 1, `w-full cursor-pointer px-4 py-2 text-left transition-colors ${(i2() != n6 ? "hover:bg-muted-foreground/20" : "") ?? ""} ${(i2() == n6 ? "bg-white text-black" : "text-white") ?? ""}`), set_text(a4, n6);
3534
3556
  }), function animation(e7, t3, n7) {
3535
- var o4, s3, i3, a5 = (
3557
+ var s4, i3, o3, a5 = (
3536
3558
  /** @type {EachItem} */
3537
3559
  fe
3538
3560
  ), l3 = null;
3539
3561
  a5.a ?? (a5.a = {
3540
3562
  element: e7,
3541
3563
  measure() {
3542
- o4 = this.element.getBoundingClientRect();
3564
+ s4 = this.element.getBoundingClientRect();
3543
3565
  },
3544
3566
  apply() {
3545
- if (i3 == null ? void 0 : i3.abort(), s3 = this.element.getBoundingClientRect(), o4.left !== s3.left || o4.right !== s3.right || o4.top !== s3.top || o4.bottom !== s3.bottom) {
3567
+ if (o3 == null ? void 0 : o3.abort(), i3 = this.element.getBoundingClientRect(), s4.left !== i3.left || s4.right !== i3.right || s4.top !== i3.top || s4.bottom !== i3.bottom) {
3546
3568
  const e8 = t3()(this.element, {
3547
- from: o4,
3548
- to: s3
3569
+ from: s4,
3570
+ to: i3
3549
3571
  }, n7 == null ? void 0 : n7());
3550
- i3 = animate(this.element, e8, void 0, 1, () => {
3551
- i3 == null ? void 0 : i3.abort(), i3 = void 0;
3572
+ o3 = animate(this.element, e8, void 0, 1, () => {
3573
+ o3 == null ? void 0 : o3.abort(), o3 = void 0;
3552
3574
  });
3553
3575
  }
3554
3576
  },
3555
3577
  fix() {
3556
3578
  if (!e7.getAnimations().length) {
3557
- var { position: t4, width: n8, height: s4 } = getComputedStyle(e7);
3579
+ var { position: t4, width: n8, height: i4 } = getComputedStyle(e7);
3558
3580
  if ("absolute" !== t4 && "fixed" !== t4) {
3559
- var i4 = (
3581
+ var o4 = (
3560
3582
  /** @type {HTMLElement | SVGElement} */
3561
3583
  e7.style
3562
3584
  );
3563
3585
  l3 = {
3564
- position: i4.position,
3565
- width: i4.width,
3566
- height: i4.height,
3567
- transform: i4.transform
3568
- }, i4.position = "absolute", i4.width = n8, i4.height = s4;
3586
+ position: o4.position,
3587
+ width: o4.width,
3588
+ height: o4.height,
3589
+ transform: o4.transform
3590
+ }, o4.position = "absolute", o4.width = n8, o4.height = i4;
3569
3591
  var a6 = e7.getBoundingClientRect();
3570
- if (o4.left !== a6.left || o4.top !== a6.top) {
3571
- var c3 = `translate(${o4.left - a6.left}px, ${o4.top - a6.top}px)`;
3572
- i4.transform = i4.transform ? `${i4.transform} ${c3}` : c3;
3592
+ if (s4.left !== a6.left || s4.top !== a6.top) {
3593
+ var c3 = `translate(${s4.left - a6.left}px, ${s4.top - a6.top}px)`;
3594
+ o4.transform = o4.transform ? `${o4.transform} ${c3}` : c3;
3573
3595
  }
3574
3596
  }
3575
3597
  }
@@ -3588,9 +3610,9 @@ function Navigation(e2, t2) {
3588
3610
  // swap out the element rather than creating a new manager, in case it happened at the same
3589
3611
  // moment as a reconciliation
3590
3612
  a5.a.element = e7;
3591
- }(o3, () => flip, () => ({
3613
+ }(s3, () => flip, () => ({
3592
3614
  duration: 150
3593
- })), append(e6, o3);
3615
+ })), append(e6, s3);
3594
3616
  }), append(e5, n5);
3595
3617
  };
3596
3618
  if_block(e4, (e5) => {
@@ -3598,14 +3620,14 @@ function Navigation(e2, t2) {
3598
3620
  }, n4);
3599
3621
  };
3600
3622
  if_block(_3, (e4) => {
3601
- 0 === o2().length ? e4(consequent) : e4(alternate, false);
3623
+ 0 === s2().length ? e4(consequent) : e4(alternate, false);
3602
3624
  }), bind_this(n3, (e4) => set(c2, e4), () => get$1(c2)), function bind_value(e4, t3, n4 = t3) {
3603
- var o3 = is_runes();
3604
- listen_to_event_and_reset_event(e4, "input", (s3) => {
3605
- var i3 = s3 ? e4.defaultValue : e4.value;
3606
- if (i3 = is_numberlike_input(e4) ? to_number(i3) : i3, n4(i3), o3 && i3 !== (i3 = t3())) {
3625
+ var s3 = is_runes();
3626
+ listen_to_event_and_reset_event(e4, "input", (i3) => {
3627
+ var o3 = i3 ? e4.defaultValue : e4.value;
3628
+ if (o3 = is_numberlike_input(e4) ? to_number(o3) : o3, n4(o3), s3 && o3 !== (o3 = t3())) {
3607
3629
  var a4 = e4.selectionStart, l3 = e4.selectionEnd;
3608
- e4.value = i3 ?? "", // Restore selection
3630
+ e4.value = o3 ?? "", // Restore selection
3609
3631
  null !== l3 && (e4.selectionStart = a4, e4.selectionEnd = Math.min(l3, e4.value.length));
3610
3632
  }
3611
3633
  }), // If we are hydrating and the value has since changed,
@@ -3617,76 +3639,77 @@ function Navigation(e2, t2) {
3617
3639
  is_numberlike_input(e4) && n5 === to_number(e4.value) || ("date" !== e4.type || n5 || e4.value) && n5 !== e4.value && // @ts-expect-error the value is coerced on assignment
3618
3640
  (e4.value = n5 ?? "");
3619
3641
  });
3620
- }(p3, () => get$1(l2), (e4) => set(l2, e4)), transition(3, n3, () => fly, () => ({
3621
- y: -5,
3622
- duration: 250
3642
+ }(p3, () => get$1(l2), (e4) => set(l2, e4)), transition(1, n3, () => fade, () => ({
3643
+ duration: 150,
3644
+ easing: sineOut
3645
+ })), transition(2, n3, () => fade, () => ({
3646
+ duration: 200,
3647
+ easing: sineOut
3623
3648
  })), append(e3, n3);
3624
3649
  };
3625
- if_block(x2, (e3) => {
3626
- get$1(i2) && e3(consequent_2);
3650
+ if_block(w2, (e3) => {
3651
+ get$1(o2) && e3(consequent_2);
3627
3652
  }), template_effect(() => {
3628
- set_text(h2, get$1(p2)), set_text(y2, get$1(a2));
3629
- }), transition(3, _2, () => scale, () => ({
3630
- duration: 600,
3631
- delay: 50,
3632
- easing: elasticOut,
3653
+ set_text(v2, get$1(f2)), set_text(b2, get$1(a2));
3654
+ }), transition(3, p2, () => scale, () => ({
3655
+ easing: backInOut,
3633
3656
  start: 0.95
3634
- })), append(e2, _2), pop();
3657
+ })), append(e2, p2), pop();
3635
3658
  }
3636
3659
  delegate(["click"]);
3637
- var dt = /* @__PURE__ */ template('<div class="-mx-10 mt-5 flex h-1/2 max-h-[75vh] min-h-92 w-10 flex-col lg:h-3/7"><div class="flex h-full items-center justify-center"><div class="flex h-full w-full flex-col items-center justify-between py-6"><div class="bg-muted-foreground min-[1920px]:h-1/4 h-1/5 w-px"></div> <div class="text-muted-foreground origin-center -rotate-90 transform text-sm whitespace-nowrap select-none">From other categories</div> <div class="bg-muted-foreground h-1/5 w-px min-[1920px]:h-1/4"></div></div></div></div>');
3638
- function restore(e2, t2, n2, o2, s2, i2) {
3639
- set(t2, false), set(n2, true), set(o2, 250), set(s2, 0), i2(250, 0, 250, (e3, t3, n3) => {
3640
- set(o2, e3 * (1 - n3)), set(s2, n3, true);
3660
+ var ut = /* @__PURE__ */ template('<div class="-mx-10 mt-5 flex h-1/2 max-h-[75vh] min-h-92 w-10 flex-col lg:h-3/7"><div class="flex h-full items-center justify-center"><div class="flex h-full w-full flex-col items-center justify-between py-6"><div class="bg-muted-foreground min-[1920px]:h-1/4 h-1/5 w-px"></div> <div class="text-muted-foreground origin-center -rotate-90 transform text-sm whitespace-nowrap select-none">From other categories</div> <div class="bg-muted-foreground h-1/5 w-px min-[1920px]:h-1/4"></div></div></div></div>');
3661
+ function restore(e2, t2, n2, s2, i2, o2) {
3662
+ set(t2, false), set(n2, true), set(s2, 250), set(i2, 0), o2(250, 0, 250, (e3, t3, n3) => {
3663
+ set(s2, e3 * (1 - n3)), set(i2, n3, true);
3641
3664
  });
3642
3665
  }
3643
- async function toggleLike(e2, t2, n2, o2) {
3666
+ async function toggleLike(e2, t2, n2, s2) {
3644
3667
  var _a2;
3645
3668
  if (!((_a2 = t2.currentGame) == null ? void 0 : _a2.id)) return;
3646
- const s2 = !get$1(n2);
3647
- set(n2, !get$1(n2)), set(o2, get$1(o2) + (s2 ? 1 : -1)), // Save to localStorage
3648
- s2 ? localStorage.setItem(`playlight_${t2.currentGame.id}_liked`, "true") : localStorage.removeItem(`playlight_${t2.currentGame.id}_liked`);
3649
- await Qe.toggleLike(t2.currentGame.id, s2) || set(o2, get$1(o2) + (s2 ? -1 : 1));
3669
+ const i2 = !get$1(n2);
3670
+ set(n2, !get$1(n2)), set(s2, get$1(s2) + (i2 ? 1 : -1)), // Save to localStorage
3671
+ i2 ? localStorage.setItem(`playlight_${t2.currentGame.id}_liked`, "true") : localStorage.removeItem(`playlight_${t2.currentGame.id}_liked`);
3672
+ await Xe.toggleLike(t2.currentGame.id, i2) || set(s2, get$1(s2) + (i2 ? -1 : 1));
3650
3673
  }
3651
- var ft = /* @__PURE__ */ template('<div class="bg-background/85 fixed bottom-4 left-4 z-2 flex touch-none flex-wrap items-center gap-1 border-1 p-4 text-start shadow-lg backdrop-blur-xl max-sm:right-4 sm:w-72" role="button" tabindex="0"><div class="w-full"><p class="text-muted-foreground text-sm select-none">Currently playing</p></div> <div class="flex w-full items-center gap-2"><img alt="logo"> <p class="text-foreground max-w-2/3 truncate text-lg font-bold"> </p> <div class="mt-0.5 ml-auto flex items-center gap-2"><p class="text-muted-foreground text-sm"> </p> <button class="text-muted-foreground cursor-pointer transition hover:text-white"><!></button></div></div></div>'), pt = /* @__PURE__ */ template('<div class="fixed bottom-0 z-3 shadow-xl max-sm:right-4 max-sm:left-4 sm:left-4 sm:w-72"><button class="bg-background/85 hover:bg-background/95 w-full rounded-t-md border px-4 py-1.5 backdrop-blur-sm transition" aria-label="Show game display"><div class="bg-muted-foreground mx-auto h-px w-16"></div></button></div>'), _t = /* @__PURE__ */ template("<!> <!>", 1);
3674
+ var dt = /* @__PURE__ */ template('<div class="bg-background/85 fixed bottom-4 left-4 z-2 flex touch-none flex-wrap items-center gap-1 border-1 p-4 text-start shadow-lg backdrop-blur-xl max-sm:right-4 sm:w-72" role="button" tabindex="0"><div class="w-full"><p class="text-muted-foreground text-sm select-none">Currently playing</p></div> <div class="flex w-full items-center gap-2"><img alt="logo"> <p class="text-white max-w-2/3 truncate text-lg font-bold"> </p> <div class="mt-0.5 ml-auto flex items-center gap-2"><p class="text-muted-foreground text-sm"> </p> <button class="text-muted-foreground cursor-pointer transition hover:text-white"><!></button></div></div></div>'), ft = /* @__PURE__ */ template('<div class="fixed bottom-0 z-3 shadow-xl max-sm:right-4 max-sm:left-4 sm:left-4 sm:w-72"><button class="bg-background/85 hover:bg-background/95 w-full rounded-t-md border px-4 py-1.5 backdrop-blur-sm transition" aria-label="Show game display"><div class="bg-muted-foreground mx-auto h-px w-16"></div></button></div>'), pt = /* @__PURE__ */ template("<!> <!>", 1);
3652
3675
  function CurrentGameDisplay(e2, t2) {
3653
3676
  var _a2;
3654
3677
  push(t2, true);
3655
- let n2 = state(false), o2 = state(true), s2 = state(false), i2 = state(0), a2 = state(1), l2 = state(false), c2 = state(false), u2 = state(proxy(((_a2 = t2.currentGame) == null ? void 0 : _a2.likes) || 0)), d2 = 0;
3678
+ let n2 = state(false), s2 = state(true), i2 = state(false), o2 = state(0), a2 = state(1), l2 = state(false), c2 = state(false), u2 = state(proxy(((_a2 = t2.currentGame) == null ? void 0 : _a2.likes) || 0)), d2 = 0;
3656
3679
  function startDrag(e3) {
3657
3680
  set(l2, true), d2 = e3.type.includes("touch") ? e3.touches[0].clientY : e3.clientY;
3658
3681
  }
3659
3682
  function drag(e3) {
3660
3683
  if (!get$1(l2)) return;
3661
3684
  const t3 = e3.type.includes("touch") ? e3.touches[0].clientY : e3.clientY, n3 = Math.max(0, t3 - d2);
3662
- set(i2, n3, true), set(a2, Math.max(0, 1 - n3 / 150), true), n3 > 40 && function hide() {
3663
- set(l2, false), animate2(get$1(i2), 250, 250, (e4, t4, n4) => {
3664
- set(i2, e4 + (t4 - e4) * n4), set(a2, Math.max(0, 1 - 1.5 * n4), true), 1 === n4 && (set(o2, false), set(s2, true));
3685
+ set(o2, n3, true), set(a2, Math.max(0, 1 - n3 / 150), true), n3 > 40 && function hide() {
3686
+ set(l2, false), animate2(get$1(o2), 250, 250, (e4, t4, n4) => {
3687
+ set(o2, e4 + (t4 - e4) * n4), set(a2, Math.max(0, 1 - 1.5 * n4), true), 1 === n4 && (set(s2, false), set(i2, true));
3665
3688
  });
3666
3689
  }();
3667
3690
  }
3668
3691
  function endDrag() {
3669
- get$1(l2) && (set(l2, false), get$1(i2) < 40 && function animateBack() {
3670
- animate2(get$1(i2), 0, 250, (e3, t3, n3) => {
3671
- set(i2, e3 * (1 - n3)), set(a2, 1);
3692
+ get$1(l2) && (set(l2, false), get$1(o2) < 40 && function animateBack() {
3693
+ animate2(get$1(o2), 0, 250, (e3, t3, n3) => {
3694
+ set(o2, e3 * (1 - n3)), set(a2, 1);
3672
3695
  });
3673
3696
  }());
3674
3697
  }
3675
- function animate2(e3, t3, n3, o3) {
3676
- const s3 = Date.now();
3698
+ function animate2(e3, t3, n3, s3) {
3699
+ const i3 = Date.now();
3677
3700
  !function frame() {
3678
- const i3 = Math.min((Date.now() - s3) / n3, 1);
3679
- o3(e3, t3, i3), i3 < 1 && requestAnimationFrame(frame);
3701
+ const o3 = Math.min((Date.now() - i3) / n3, 1);
3702
+ s3(e3, t3, o3), o3 < 1 && requestAnimationFrame(frame);
3680
3703
  }();
3681
3704
  }
3682
3705
  user_effect(() => {
3683
3706
  var _a3, _b2;
3684
3707
  ((_a3 = t2.currentGame) == null ? void 0 : _a3.id) && (set(c2, null !== localStorage.getItem(`playlight_${t2.currentGame.id}_liked`)), set(u2, ((_b2 = t2.currentGame) == null ? void 0 : _b2.likes) || 0, true));
3685
3708
  });
3686
- var f2 = _t(), p2 = first_child(f2), consequent = (e3) => {
3687
- var o3 = ft();
3688
- o3.__mousedown = startDrag, o3.__mousemove = drag, o3.__mouseup = endDrag, o3.__touchstart = startDrag, o3.__touchmove = drag, o3.__touchend = endDrag;
3689
- var s3 = sibling(child(o3), 2), l3 = child(s3);
3709
+ var f2 = pt(), p2 = first_child(f2), consequent = (e3) => {
3710
+ var s3 = dt();
3711
+ s3.__mousedown = startDrag, s3.__mousemove = drag, s3.__mouseup = endDrag, s3.__touchstart = startDrag, s3.__touchmove = drag, s3.__touchend = endDrag;
3712
+ var i3 = sibling(child(s3), 2), l3 = child(i3);
3690
3713
  let d3;
3691
3714
  var f3 = sibling(l3, 2), p3 = child(f3), _3 = child(sibling(f3, 2)), g2 = child(_3), v2 = sibling(_3, 2);
3692
3715
  v2.__click = [toggleLike, t2, c2, u2];
@@ -3703,8 +3726,8 @@ function CurrentGameDisplay(e2, t2) {
3703
3726
  d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z"
3704
3727
  }]],
3705
3728
  children: (e5, n4) => {
3706
- var o4 = comment();
3707
- slot(first_child(o4), t3, "default", {}, null), append(e5, o4);
3729
+ var s4 = comment();
3730
+ slot(first_child(s4), t3, "default", {}, null), append(e5, s4);
3708
3731
  },
3709
3732
  $$slots: {
3710
3733
  default: true
@@ -3719,78 +3742,66 @@ function CurrentGameDisplay(e2, t2) {
3719
3742
  style: "margin-top: -5px;"
3720
3743
  }), template_effect((e4) => {
3721
3744
  var _a3, _b2;
3722
- set_style(o3, `transform: translateY(${get$1(i2) ?? ""}px); opacity: ${get$1(a2) ?? ""}; cursor: grab;`), set_attribute(l3, "src", (_a3 = t2.currentGame) == null ? void 0 : _a3.logo_url), d3 = set_class(l3, 1, "bg-muted h-5 w-5 select-none", null, d3, e4), set_text(p3, ((_b2 = t2.currentGame) == null ? void 0 : _b2.name) || "Default name"), set_text(g2, get$1(u2)), set_style(v2, `color: ${(get$1(c2) ? "white !important" : "") ?? ""};`), set_attribute(v2, "aria-label", get$1(c2) ? "Unlike game" : "Like game");
3745
+ set_style(s3, `transform: translateY(${get$1(o2) ?? ""}px); opacity: ${get$1(a2) ?? ""}; cursor: grab;`), set_attribute(l3, "src", (_a3 = t2.currentGame) == null ? void 0 : _a3.logo_url), d3 = set_class(l3, 1, "bg-muted h-5 w-5 select-none", null, d3, e4), set_text(p3, ((_b2 = t2.currentGame) == null ? void 0 : _b2.name) || "Default name"), set_text(g2, get$1(u2)), set_style(v2, `color: ${(get$1(c2) ? "white !important" : "") ?? ""};`), set_attribute(v2, "aria-label", get$1(c2) ? "Unlike game" : "Like game");
3723
3746
  }, [() => ({
3724
3747
  "animate-pulse": !get$1(n2)
3725
- })]), event("mouseleave", o3, endDrag), event("load", l3, () => {
3748
+ })]), event("mouseleave", s3, endDrag), event("load", l3, () => {
3726
3749
  set(n2, true);
3727
- }), append(e3, o3);
3750
+ }), append(e3, s3);
3728
3751
  };
3729
3752
  if_block(p2, (e3) => {
3730
- t2.currentGame && get$1(o2) && e3(consequent);
3753
+ t2.currentGame && get$1(s2) && e3(consequent);
3731
3754
  });
3732
3755
  var _2 = sibling(p2, 2), consequent_1 = (e3) => {
3733
- var t3 = pt(), n3 = child(t3);
3734
- n3.__mousedown = [restore, s2, o2, i2, a2, animate2], n3.__touchstart = [restore, s2, o2, i2, a2, animate2], transition(3, n3, () => fly, () => ({
3756
+ var t3 = ft(), n3 = child(t3);
3757
+ n3.__mousedown = [restore, i2, s2, o2, a2, animate2], n3.__touchstart = [restore, i2, s2, o2, a2, animate2], transition(3, n3, () => fly, () => ({
3735
3758
  delay: 150,
3736
3759
  y: 30
3737
3760
  })), append(e3, t3);
3738
3761
  };
3739
3762
  if_block(_2, (e3) => {
3740
- t2.currentGame && get$1(s2) && e3(consequent_1);
3763
+ t2.currentGame && get$1(i2) && e3(consequent_1);
3741
3764
  }), append(e2, f2), pop();
3742
3765
  }
3743
3766
  function closeDiscoveryOnEmptyClick(e2, t2) {
3744
- e2.target === e2.currentTarget && store_set(Ze, false);
3767
+ e2.target === e2.currentTarget && store_set(Oe, false);
3745
3768
  }
3746
3769
  delegate(["mousedown", "mousemove", "mouseup", "touchstart", "touchmove", "touchend", "click"]);
3747
- var on_click$1 = (e2, t2, n2) => {
3748
- store_set(Je, true), store_set(Ze, false);
3749
- }, gt = /* @__PURE__ */ template(`<div><button class="bg-background/50 text-primary cursor-pointer truncate p-1 px-2 text-sm font-normal text-nowrap opacity-50 transition hover:opacity-25 max-sm:hidden">Don't show on exit</button></div>`), on_click_1$1 = (e2, t2) => store_set(Ze, false), vt = /* @__PURE__ */ template('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'), ht = /* @__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>'), mt = /* @__PURE__ */ template("<!> <!>", 1), bt = /* @__PURE__ */ template('<div class="flex h-30 items-center"><!></div>'), yt = /* @__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 min-h-10 w-full justify-center"><!></div></div>'), $t = /* @__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" id="playlight-discovery"><div class="pointer-events-none ml-2 flex items-center justify-between p-4"><img alt="logo" class="pointer-events-none w-50 max-sm:w-40"> <div class="mt-4 mr-2 flex items-center justify-evenly gap-8 overflow-hidden max-sm:mt-3.5 sm:mr-4"><!> <button class="cursor-pointer text-white transition hover:opacity-50"><!></button></div></div> <div class="mx-auto px-5 py-6 max-sm:py-1"><!></div> <!> <div class="mask-fade relative h-full w-full overflow-y-auto p-4 svelte-1tor7ei"><!></div> <a href="https://playlight.dev" target="_blank" class="text-muted-foreground fixed right-4 bottom-4 flex items-center gap-1 text-sm transition hover:text-white">Game dev? Join Playlight <!></a></div>');
3770
+ var on_click$1 = (e2, t2) => store_set(Oe, false), _t = /* @__PURE__ */ template('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'), gt = /* @__PURE__ */ template('<div class="pointer-events-none flex h-4/5 items-center justify-center gap-4"><p class="text-white">No games found that match the filter.</p></div>'), vt = /* @__PURE__ */ template("<!> <!>", 1), ht = /* @__PURE__ */ template('<div class="flex h-30 items-center"><!></div>'), mt = /* @__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 min-h-10 w-full justify-center"><!></div></div>'), bt = /* @__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" id="playlight-discovery"><div class="pointer-events-none flex items-center justify-between p-4"><img alt="logo" class="pointer-events-none ml-3 w-50 max-sm:w-40"> <div class="mt-3.5 mr-4 flex items-center justify-evenly gap-8 overflow-hidden max-sm:mt-3"><button class="cursor-pointer text-white transition hover:opacity-50"><!></button></div></div> <div class="mx-auto px-6 max-sm:py-1 sm:pt-2 sm:pb-6"><!></div> <!> <div class="mask-fade show-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-44gflq"><!></div> <a href="https://playlight.dev" target="_blank" class="text-muted-foreground fixed right-4 bottom-4 flex items-center gap-1 text-sm transition hover:text-white">Game dev? Join Playlight <!></a></div>');
3750
3771
  function DiscoveryOverlay(e2, t2) {
3751
3772
  push(t2, true);
3752
- const [n2, o2] = setup_stores(), $discoveryOpen = () => store_get(Ze, "$discoveryOpen", n2), $exitIntentDisabledByUser = () => store_get(Je, "$exitIntentDisabledByUser", n2);
3753
- let s2, i2 = prop(t2, "showIntentToggle", 3, true), a2 = state(void 0), l2 = state(false), c2 = state(false), u2 = state(void 0), d2 = state(proxy([])), f2 = state(proxy([])), p2 = state(1), _2 = state(true), g2 = state(void 0), v2 = state(false);
3773
+ const [n2, s2] = setup_stores(), $discoveryOpen = () => store_get(Oe, "$discoveryOpen", n2);
3774
+ let i2, o2 = state(true), a2 = state(false), l2 = state(void 0), c2 = state(proxy([])), u2 = state(void 0), d2 = state(proxy([])), f2 = state(1), p2 = state(true), _2 = state(false), g2 = state(void 0), v2 = state(void 0);
3754
3775
  async function loadNewFeed() {
3755
- set(d2, [], true), set(p2, 1), set(_2, true), set(v2, false), await fetchGames(), get$1(d2).length < 10 && await fetchGames();
3776
+ set(d2, [], true), set(f2, 1), set(p2, true), set(_2, false), await fetchGames();
3756
3777
  }
3757
3778
  async function fetchGames() {
3758
- if (!get$1(l2) && !get$1(c2))
3759
- try {
3760
- 1 === get$1(p2) ? set(l2, true) : set(c2, true);
3761
- const e3 = get$1(v2) ? null : get$1(a2), t3 = await Qe.getSuggestions(e3, get$1(p2)), n3 = (t3 == null ? void 0 : t3.games) || [], o3 = n3.filter((e4) => !get$1(d2).some((t4) => t4.id === e4.id));
3762
- set(d2, [...get$1(d2), ...o3], true), n3.length < 10 ? !get$1(v2) && get$1(a2) ? (set(v2, true), set(p2, 1), fetchGames()) : set(_2, false) : set(p2, get$1(p2) + 1);
3763
- } catch (e3) {
3764
- console.error(e3), Be.error("Failed to load games: " + e3);
3765
- } finally {
3766
- set(l2, false), set(c2, false);
3767
- }
3779
+ if (get$1(o2) || get$1(a2)) return;
3780
+ 1 === get$1(f2) ? set(o2, true) : set(a2, true);
3781
+ const e3 = get$1(_2) ? null : get$1(u2), t3 = await Xe.getSuggestions(e3, get$1(f2)), n3 = (t3 == null ? void 0 : t3.games) || [], s3 = (t3 == null ? void 0 : t3.pageSize) || 15, i3 = n3.filter((e4) => !get$1(d2).some((t4) => t4.id === e4.id));
3782
+ if (set(d2, [...get$1(d2), ...i3], true), n3.length < s3 ? !get$1(_2) && get$1(u2) ? (set(_2, true), set(f2, 1)) : set(p2, false) : set(f2, get$1(f2) + 1), // Disable loading state
3783
+ set(o2, false), set(a2, false), get$1(p2) && get$1(g2)) {
3784
+ get$1(g2).getBoundingClientRect().bottom <= window.innerHeight + 300 && fetchGames();
3785
+ }
3768
3786
  }
3769
- onMount(() => (s2 = new IntersectionObserver((e3) => {
3770
- e3[0].isIntersecting && get$1(_2) && fetchGames();
3787
+ onMount(() => (i2 = new IntersectionObserver((e3) => {
3788
+ e3[0].isIntersecting && get$1(p2) && fetchGames();
3771
3789
  }, {
3772
- rootMargin: "200px"
3773
- }), () => s2 == null ? void 0 : s2.disconnect())), user_effect(() => {
3774
- get$1(g2) && s2 && s2.observe(get$1(g2));
3790
+ rootMargin: "300px",
3791
+ root: get$1(v2)
3792
+ }), () => i2 == null ? void 0 : i2.disconnect())), user_effect(() => {
3793
+ get$1(g2) && i2 && i2.observe(get$1(g2));
3775
3794
  }), onMount(async () => {
3776
- set(u2, await Qe.getCurrentGameInfo(), true), await async function fetchCategories() {
3777
- var _a2, _b2, _c2, _d, _e3, _f, _g;
3778
- set(f2, await Qe.getCategories(), true), !get$1(a2) && ((_a2 = get$1(f2)) == null ? void 0 : _a2.length) > 0 && set(a2, ((_b2 = get$1(u2)) == null ? void 0 : _b2.category) && ((_d = get$1(f2)) == null ? void 0 : _d.includes((_c2 = get$1(u2)) == null ? void 0 : _c2.category)) ? (_e3 = get$1(u2)) == null ? void 0 : _e3.category : (_g = get$1(f2)) == null ? void 0 : _g[((_f = get$1(f2)) == null ? void 0 : _f.length) - 1], true);
3779
- }(), await loadNewFeed();
3795
+ var _a2, _b2, _c2;
3796
+ set(l2, await Xe.getCurrentGameInfo(), true), set(c2, await Xe.getCategories(), true), set(u2, ((_a2 = get$1(l2)) == null ? void 0 : _a2.category) || ((_c2 = get$1(c2)) == null ? void 0 : _c2[((_b2 = get$1(c2)) == null ? void 0 : _b2.length) - 1]), true), set(o2, false), // Initial loading done, but loading will be set to true again by fetchGames
3797
+ await loadNewFeed();
3780
3798
  });
3781
- var h2 = $t();
3799
+ var h2 = bt();
3782
3800
  event("keydown", W, (e3) => {
3783
- "Escape" == e3.key && store_set(Ze, false);
3801
+ "Escape" == e3.key && store_set(Oe, false);
3784
3802
  }), h2.__click = [closeDiscoveryOnEmptyClick, $discoveryOpen];
3785
- var m2 = child(h2), b2 = child(m2), y2 = child(sibling(b2, 2)), consequent = (e3) => {
3786
- var t3 = gt();
3787
- child(t3).__click = [on_click$1, $exitIntentDisabledByUser, $discoveryOpen], transition(3, t3, () => blur), append(e3, t3);
3788
- };
3789
- if_block(y2, (e3) => {
3790
- i2() && !$exitIntentDisabledByUser() && e3(consequent);
3791
- });
3792
- var $2 = sibling(y2, 2);
3793
- $2.__click = [on_click_1$1, $discoveryOpen], function X(e3, t3) {
3803
+ var m2 = child(h2), b2 = child(m2), y2 = child(sibling(b2, 2));
3804
+ y2.__click = [on_click$1, $discoveryOpen], function X(e3, t3) {
3794
3805
  const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
3795
3806
  Icon$1(e3, spread_props({
3796
3807
  name: "x"
@@ -3801,86 +3812,86 @@ function DiscoveryOverlay(e2, t2) {
3801
3812
  d: "m6 6 12 12"
3802
3813
  }]],
3803
3814
  children: (e4, n4) => {
3804
- var o3 = comment();
3805
- slot(first_child(o3), t3, "default", {}, null), append(e4, o3);
3815
+ var s3 = comment();
3816
+ slot(first_child(s3), t3, "default", {}, null), append(e4, s3);
3806
3817
  },
3807
3818
  $$slots: {
3808
3819
  default: true
3809
3820
  }
3810
3821
  }));
3811
- }(child($2), {
3822
+ }(child(y2), {
3812
3823
  size: 24,
3813
3824
  strokeWidth: 2.5
3814
3825
  });
3815
- var w2 = sibling(m2, 2);
3816
- Navigation(child(w2), {
3826
+ var $2 = sibling(m2, 2);
3827
+ Navigation(child($2), {
3817
3828
  get categories() {
3818
- return get$1(f2);
3829
+ return get$1(c2);
3819
3830
  },
3820
3831
  onCategoryChange: loadNewFeed,
3821
3832
  get selectedCategory() {
3822
- return get$1(a2);
3833
+ return get$1(u2);
3823
3834
  },
3824
3835
  set selectedCategory(e3) {
3825
- set(a2, e3, true);
3836
+ set(u2, e3, true);
3826
3837
  }
3827
3838
  });
3828
- var x2 = sibling(w2, 2);
3829
- CurrentGameDisplay(x2, {
3839
+ var w2 = sibling($2, 2);
3840
+ CurrentGameDisplay(w2, {
3830
3841
  get currentGame() {
3831
- return get$1(u2);
3842
+ return get$1(l2);
3832
3843
  }
3833
3844
  });
3834
- var k2 = sibling(x2, 2);
3835
- k2.__click = [closeDiscoveryOnEmptyClick, $discoveryOpen];
3836
- var C2 = child(k2), consequent_1 = (e3) => {
3837
- var t3 = vt();
3845
+ var x2 = sibling(w2, 2);
3846
+ x2.__click = [closeDiscoveryOnEmptyClick, $discoveryOpen];
3847
+ var k2 = child(x2), consequent = (e3) => {
3848
+ var t3 = _t();
3838
3849
  Loader_circle(child(t3), {
3839
3850
  class: "animate-spin opacity-75",
3840
3851
  size: 50,
3841
3852
  strokeWidth: 2.25
3842
3853
  }), append(e3, t3);
3843
3854
  }, alternate = (e3, t3) => {
3844
- var consequent_2 = (e4) => {
3845
- append(e4, ht());
3855
+ var consequent_1 = (e4) => {
3856
+ append(e4, gt());
3846
3857
  }, alternate_1 = (e4) => {
3847
- var t4 = yt(), n3 = child(t4);
3858
+ var t4 = mt(), n3 = child(t4);
3848
3859
  each(n3, 17, () => get$1(d2), index, (e5, t5, n4) => {
3849
- var o4 = mt();
3850
- const s4 = user_derived(() => get$1(d2).findIndex((e6) => e6.category !== get$1(a2)));
3851
- var i3 = first_child(o4), consequent_3 = (e6) => {
3860
+ var s4 = vt();
3861
+ const i4 = user_derived(() => get$1(d2).findIndex((e6) => e6.category !== get$1(u2)));
3862
+ var o3 = first_child(s4), consequent_2 = (e6) => {
3852
3863
  !function GameCategorySeperator(e7) {
3853
- append(e7, dt());
3864
+ append(e7, ut());
3854
3865
  }(e6);
3855
3866
  };
3856
- if_block(i3, (e6) => {
3857
- n4 == get$1(s4) && e6(consequent_3);
3858
- }), GameCard(sibling(i3, 2), {
3867
+ if_block(o3, (e6) => {
3868
+ n4 == get$1(i4) && e6(consequent_2);
3869
+ }), GameCard(sibling(o3, 2), {
3859
3870
  get game() {
3860
3871
  return get$1(t5);
3861
3872
  }
3862
- }), append(e5, o4);
3873
+ }), append(e5, s4);
3863
3874
  });
3864
- var o3 = sibling(n3, 2), s3 = child(o3), consequent_4 = (e5) => {
3865
- var t5 = bt();
3875
+ var s3 = sibling(n3, 2), i3 = child(s3), consequent_3 = (e5) => {
3876
+ var t5 = ht();
3866
3877
  Loader_circle(child(t5), {
3867
3878
  class: "animate-spin opacity-75",
3868
3879
  size: 40,
3869
3880
  strokeWidth: 2.5
3870
3881
  }), append(e5, t5);
3871
3882
  };
3872
- if_block(s3, (e5) => {
3873
- get$1(c2) && e5(consequent_4);
3874
- }), bind_this(o3, (e5) => set(g2, e5), () => get$1(g2)), append(e4, t4);
3883
+ if_block(i3, (e5) => {
3884
+ get$1(a2) && e5(consequent_3);
3885
+ }), bind_this(s3, (e5) => set(g2, e5), () => get$1(g2)), append(e4, t4);
3875
3886
  };
3876
3887
  if_block(e3, (e4) => {
3877
- 0 !== get$1(d2).length || get$1(l2) ? e4(alternate_1, false) : e4(consequent_2);
3888
+ 0 !== get$1(d2).length || get$1(o2) ? e4(alternate_1, false) : e4(consequent_1);
3878
3889
  }, t3);
3879
3890
  };
3880
- if_block(C2, (e3) => {
3881
- get$1(l2) && 0 === get$1(d2).length ? e3(consequent_1) : e3(alternate, false);
3882
- });
3883
- var M2 = sibling(k2, 2);
3891
+ if_block(k2, (e3) => {
3892
+ get$1(o2) && 0 === get$1(d2).length ? e3(consequent) : e3(alternate, false);
3893
+ }), bind_this(x2, (e3) => set(v2, e3), () => get$1(v2));
3894
+ var C2 = sibling(x2, 2);
3884
3895
  !function External_link(e3, t3) {
3885
3896
  const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
3886
3897
  Icon$1(e3, spread_props({
@@ -3894,38 +3905,124 @@ function DiscoveryOverlay(e2, t2) {
3894
3905
  d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"
3895
3906
  }]],
3896
3907
  children: (e4, n4) => {
3897
- var o3 = comment();
3898
- slot(first_child(o3), t3, "default", {}, null), append(e4, o3);
3908
+ var s3 = comment();
3909
+ slot(first_child(s3), t3, "default", {}, null), append(e4, s3);
3899
3910
  },
3900
3911
  $$slots: {
3901
3912
  default: true
3902
3913
  }
3903
3914
  }));
3904
- }(sibling(child(M2)), {
3915
+ }(sibling(child(C2)), {
3905
3916
  size: 14
3906
- }), template_effect(() => set_attribute(b2, "src", store_get(Xe, "$projectUrl", n2) + "/static/images/logo-white-small.png")), transition(3, h2, () => blur, () => ({
3917
+ }), template_effect(() => set_attribute(b2, "src", store_get(Te, "$projectUrl", n2) + "/static/images/logo-white-small.png")), transition(3, h2, () => blur, () => ({
3907
3918
  duration: 250
3908
- })), append(e2, h2), pop(), o2();
3919
+ })), append(e2, h2), pop(), s2();
3909
3920
  }
3910
3921
  delegate(["click"]);
3911
- var wt = /* @__PURE__ */ template('<div class="fixed top-0 right-0 left-0 h-4"></div>');
3922
+ var yt = /* @__PURE__ */ template("<button><!></button>");
3923
+ function Button(e2, t2) {
3924
+ var n2 = yt();
3925
+ n2.__click = function(...e3) {
3926
+ var _a2;
3927
+ (_a2 = t2.onclick) == null ? void 0 : _a2.apply(this, e3);
3928
+ }, function snippet(e3, t3, ...n3) {
3929
+ var s2, i2 = e3, o2 = noop;
3930
+ block(() => {
3931
+ o2 !== (o2 = t3()) && (s2 && (destroy_effect(s2), s2 = null), s2 = branch(() => (
3932
+ /** @type {SnippetFn} */
3933
+ o2(i2, ...n3)
3934
+ )));
3935
+ }, w);
3936
+ }(child(n2), () => t2.children ?? noop), template_effect(() => set_class(n2, 1, `bg-white hover:bg-background hover:text-white text-md cursor-pointer px-3 py-2 font-bold uppercase transition text-nowrap inline-flex items-center ${t2.class ?? ""}`)), append(e2, n2);
3937
+ }
3938
+ delegate(["click"]);
3939
+ var $t = /* @__PURE__ */ template('<div class="fixed top-0 right-0 left-0 h-4"></div>'), wt = /* @__PURE__ */ template('<div class="relative"><img alt="" class="bg-foreground group-hover:outline-background relative h-7 w-7 outline outline-4 outline-white transition-colors select-none"></div>'), xt = /* @__PURE__ */ template('<div class="ml-3 flex items-center -space-x-2"></div>'), kt = /* @__PURE__ */ template("More games <!>", 1), Ct = /* @__PURE__ */ template('<div role="menu" tabindex="0" class="bg-background/85 fixed top-4 right-4 left-4 z-99998 mx-auto flex w-fit flex-wrap items-center gap-4 border-1 p-4 shadow-lg backdrop-blur-xl"><p class="text-lg font-semibold text-nowrap text-white"> </p> <!></div>'), Mt = /* @__PURE__ */ template("<!> <!>", 1);
3940
+ function ExitIntentDetector(e2, t2) {
3941
+ push(t2, true);
3942
+ let n2, s2 = prop(t2, "enabled", 3, true), i2 = prop(t2, "immediate", 3, false), o2 = state(void 0), a2 = state(void 0), l2 = state(false), c2 = state(void 0);
3943
+ function handleBarTrigger() {
3944
+ setTimeout(() => {
3945
+ var _a2;
3946
+ n2 < Date.now() - 50 && (clearTimeout(get$1(c2)), set(c2, null), i2() ? (_a2 = t2.onIntent) == null ? void 0 : _a2.call(t2) : (!async function loadInitialSuggestions() {
3947
+ const e3 = await Xe.getCategories(), t3 = await Xe.getCurrentGameInfo();
3948
+ get$1(d2) || set(d2, (t3 == null ? void 0 : t3.category) || (e3 == null ? void 0 : e3[(e3 == null ? void 0 : e3.length) - 1]), true);
3949
+ let n3 = await Xe.getSuggestions(get$1(d2), 1);
3950
+ set(f2, ((n3 == null ? void 0 : n3.games) || []).slice(0, 3), true);
3951
+ }(), set(l2, true)));
3952
+ }, 150);
3953
+ }
3954
+ let u2 = ["The cure for boredom.", "Playtime’s just getting started.", "Why stop the fun now?", "Games don’t play themselves.", "A new adventure awaits.", "There’s always time for one more."], d2 = state(void 0), f2 = state(proxy([]));
3955
+ var p2 = Mt();
3956
+ event("mousemove", q, function trackMouse(e3) {
3957
+ var _a2, _b2;
3958
+ !s2() || ((_a2 = get$1(o2)) == null ? void 0 : _a2.contains(e3.target)) || ((_b2 = get$1(a2)) == null ? void 0 : _b2.contains(e3.target)) || (!get$1(c2) && get$1(l2) && set(c2, setTimeout(() => set(l2, false), 1500), true), n2 = Date.now());
3959
+ });
3960
+ var _2 = first_child(p2), consequent = (e3) => {
3961
+ var t3 = $t();
3962
+ t3.__mouseover = handleBarTrigger, bind_this(t3, (e4) => set(o2, e4), () => get$1(o2)), append(e3, t3);
3963
+ };
3964
+ if_block(_2, (e3) => {
3965
+ s2() && e3(consequent);
3966
+ });
3967
+ var g2 = sibling(_2, 2), consequent_2 = (e3) => {
3968
+ var n3 = Ct(), s3 = child(n3), i3 = child(s3);
3969
+ Button(sibling(s3, 2), {
3970
+ class: "group",
3971
+ onclick: () => {
3972
+ var _a2;
3973
+ (_a2 = t2.onIntent) == null ? void 0 : _a2.call(t2), setTimeout(() => set(l2, false), 150);
3974
+ },
3975
+ children: (e4, t3) => {
3976
+ var n4 = kt(), s4 = sibling(first_child(n4)), consequent_1 = (e5) => {
3977
+ var t4 = xt();
3978
+ each(t4, 21, () => get$1(f2), index, (e6, t5, n5) => {
3979
+ var s5 = wt();
3980
+ let i4;
3981
+ var o3 = child(s5);
3982
+ template_effect(() => {
3983
+ i4 = set_style(s5, "", i4, {
3984
+ "z-index": get$1(f2).length - n5
3985
+ }), set_attribute(o3, "src", get$1(t5).logo_url);
3986
+ }), append(e6, s5);
3987
+ }), transition(3, t4, () => slide, () => ({
3988
+ axis: "x",
3989
+ duration: 150
3990
+ })), append(e5, t4);
3991
+ };
3992
+ if_block(s4, (e5) => {
3993
+ var _a2;
3994
+ ((_a2 = get$1(f2)) == null ? void 0 : _a2.length) >= 3 && e5(consequent_1);
3995
+ }), append(e4, n4);
3996
+ }
3997
+ }), bind_this(n3, (e4) => set(a2, e4), () => get$1(a2)), template_effect((e4) => set_text(i3, e4), [() => u2[Math.floor(Math.random() * u2.length)]]), event("mouseenter", n3, () => {
3998
+ clearTimeout(get$1(c2)), set(c2, null);
3999
+ }), transition(3, n3, () => fly, () => ({
4000
+ y: -100,
4001
+ easing: backOut,
4002
+ duration: 500
4003
+ })), append(e3, n3);
4004
+ };
4005
+ if_block(g2, (e3) => {
4006
+ get$1(l2) && e3(consequent_2);
4007
+ }), append(e2, p2), pop();
4008
+ }
3912
4009
  delegate(["mouseover"]);
3913
- var xt = /* @__PURE__ */ template("<!> <!> <!> <!>", 1);
4010
+ var St = /* @__PURE__ */ template("<!> <!> <!> <!>", 1);
3914
4011
  function App(e2, t2) {
3915
4012
  push(t2, true);
3916
- const [n2, o2] = setup_stores(), $discoveryOpen = () => store_get(Ze, "$discoveryOpen", n2), $config = () => store_get(t2.config, "$config", n2);
4013
+ const [n2, s2] = setup_stores(), $discoveryOpen = () => store_get(Oe, "$discoveryOpen", n2), $config = () => store_get(t2.config, "$config", n2);
3917
4014
  function openDiscovery() {
3918
- store_set(Ze, true), Qe.trackOpen();
4015
+ $discoveryOpen() || (store_set(Oe, true), Xe.trackOpen());
3919
4016
  }
3920
- let s2;
3921
- Ze.subscribe((e3) => {
4017
+ let i2;
4018
+ Oe.subscribe((e3) => {
3922
4019
  try {
3923
- e3 ? (s2 = document.body.style.overflow, document.body.style.overflow = "hidden") : document.body.style.overflow = s2;
4020
+ e3 ? (i2 = document.body.style.overflow, document.body.style.overflow = "hidden") : document.body.style.overflow = i2;
3924
4021
  } catch (e4) {
3925
4022
  console.error("Failed to toggle body overflow style:", e4);
3926
4023
  }
3927
4024
  });
3928
- var i2 = xt(), a2 = first_child(i2);
4025
+ var o2 = St(), a2 = first_child(o2);
3929
4026
  const l2 = user_derived(() => {
3930
4027
  var _a2, _b2;
3931
4028
  return (_b2 = (_a2 = $config()) == null ? void 0 : _a2.button) == null ? void 0 : _b2.position;
@@ -3943,15 +4040,7 @@ function App(e2, t2) {
3943
4040
  onClick: openDiscovery
3944
4041
  });
3945
4042
  var u2 = sibling(a2, 2), consequent = (e3) => {
3946
- const t3 = user_derived(() => {
3947
- var _a2, _b2;
3948
- return (_b2 = (_a2 = $config()) == null ? void 0 : _a2.exitIntent) == null ? void 0 : _b2.enabled;
3949
- });
3950
- DiscoveryOverlay(e3, {
3951
- get showIntentToggle() {
3952
- return get$1(t3);
3953
- }
3954
- });
4043
+ DiscoveryOverlay(e3, {});
3955
4044
  };
3956
4045
  if_block(u2, (e3) => {
3957
4046
  $discoveryOpen() && e3(consequent);
@@ -3960,100 +4049,65 @@ function App(e2, t2) {
3960
4049
  const f2 = user_derived(() => {
3961
4050
  var _a2, _b2;
3962
4051
  return (_b2 = (_a2 = $config()) == null ? void 0 : _a2.exitIntent) == null ? void 0 : _b2.enabled;
4052
+ }), p2 = user_derived(() => {
4053
+ var _a2, _b2;
4054
+ return (_b2 = (_a2 = $config()) == null ? void 0 : _a2.exitIntent) == null ? void 0 : _b2.immediate;
3963
4055
  });
3964
- !function ExitIntentDetector(e3, t3) {
3965
- push(t3, true);
3966
- const [n3, o3] = setup_stores(), $exitIntentDisabledByUser = () => store_get(Je, "$exitIntentDisabledByUser", n3);
3967
- let s3, i3 = prop(t3, "enabled", 3, true), a3 = false, l3 = state(void 0);
3968
- function handleBarTrigger() {
3969
- a3 && // Trigger exit intent
3970
- setTimeout(() => {
3971
- var _a2;
3972
- s3 < Date.now() - 50 && ((_a2 = t3.onIntent) == null ? void 0 : _a2.call(t3));
3973
- }, 150);
3974
- }
3975
- var c3 = comment();
3976
- event("mousemove", q, function trackMouse(e4) {
3977
- var _a2;
3978
- i3() && !$exitIntentDisabledByUser() && (a3 || setTimeout(() => a3 = true, 250), ((_a2 = get$1(l3)) == null ? void 0 : _a2.contains(e4.target)) || (s3 = Date.now()));
3979
- });
3980
- var u3 = first_child(c3), consequent2 = (e4) => {
3981
- var t4 = wt();
3982
- t4.__mouseover = handleBarTrigger, bind_this(t4, (e5) => set(l3, e5), () => get$1(l3)), append(e4, t4);
3983
- };
3984
- if_block(u3, (e4) => {
3985
- i3() && !$exitIntentDisabledByUser() && e4(consequent2);
3986
- }), append(e3, c3), pop(), o3();
3987
- }(d2, {
4056
+ ExitIntentDetector(d2, {
3988
4057
  get enabled() {
3989
4058
  return get$1(f2);
3990
4059
  },
3991
- onIntent: () => {
3992
- $discoveryOpen() || openDiscovery();
3993
- }
3994
- }), Toaster(sibling(d2, 2), {}), append(e2, i2), pop(), o2();
4060
+ get immediate() {
4061
+ return get$1(p2);
4062
+ },
4063
+ onIntent: openDiscovery
4064
+ }), Toaster(sibling(d2, 2), {}), append(e2, o2), pop(), s2();
3995
4065
  }
3996
- const kt = {
4066
+ const It = {
3997
4067
  button: {
3998
4068
  position: "bottom-right",
3999
4069
  visible: true
4000
4070
  },
4001
4071
  exitIntent: {
4002
- enabled: true
4072
+ enabled: true,
4073
+ immediate: false
4003
4074
  }
4004
4075
  };
4005
- let Ct = {
4006
- ...kt
4076
+ let Ot = {
4077
+ ...It
4007
4078
  };
4008
4079
  function initializeConfig(e2 = {}) {
4009
- return Ct = deepMerge(kt, e2), Ct;
4080
+ return Ot = deepMerge(It, e2), Ot;
4010
4081
  }
4011
4082
  function deepMerge(e2, t2) {
4012
4083
  const n2 = {
4013
4084
  ...e2
4014
4085
  };
4015
- return isObject(e2) && isObject(t2) && Object.keys(t2).forEach((o2) => {
4016
- isObject(t2[o2]) ? o2 in e2 ? n2[o2] = deepMerge(e2[o2], t2[o2]) : Object.assign(n2, {
4017
- [o2]: t2[o2]
4086
+ return isObject(e2) && isObject(t2) && Object.keys(t2).forEach((s2) => {
4087
+ isObject(t2[s2]) ? s2 in e2 ? n2[s2] = deepMerge(e2[s2], t2[s2]) : Object.assign(n2, {
4088
+ [s2]: t2[s2]
4018
4089
  }) : Object.assign(n2, {
4019
- [o2]: t2[o2]
4090
+ [s2]: t2[s2]
4020
4091
  });
4021
4092
  }), n2;
4022
4093
  }
4023
4094
  function isObject(e2) {
4024
4095
  return e2 && "object" == typeof e2 && !Array.isArray(e2);
4025
4096
  }
4026
- var Mt = /* @__PURE__ */ template("<button><!></button>");
4027
- function Button(e2, t2) {
4028
- var n2 = Mt();
4029
- n2.__click = function(...e3) {
4030
- var _a2;
4031
- (_a2 = t2.onclick) == null ? void 0 : _a2.apply(this, e3);
4032
- }, function snippet(e3, t3, ...n3) {
4033
- var o2, s2 = e3, i2 = noop;
4034
- block(() => {
4035
- i2 !== (i2 = t3()) && (o2 && (destroy_effect(o2), o2 = null), o2 = branch(() => (
4036
- /** @type {SnippetFn} */
4037
- i2(s2, ...n3)
4038
- )));
4039
- }, w);
4040
- }(child(n2), () => t2.children ?? noop), template_effect(() => set_class(n2, 1, `bg-foreground hover:bg-background hover:text-primary text-md cursor-pointer px-3 py-2 font-bold uppercase transition $${t2.class ?? ""}`)), append(e2, n2);
4041
- }
4042
- delegate(["click"]);
4043
- var St = /* @__PURE__ */ template('<div class="flex h-62 w-full items-center justify-center"><!></div>'), It = /* @__PURE__ */ template('<div class="snap-center px-2"><!></div>'), Tt = /* @__PURE__ */ template('<!> <div class="bg-background/85 my-auto mr-3 mb-30 ml-2 flex min-w-40 snap-center flex-wrap items-center justify-center gap-4 p-4 pb-6 shadow-xl backdrop-blur-xl"><p class="text-foreground w-full text-center text-lg font-semibold">Fancy more?</p> <!></div>', 1), on_click = (e2, t2, n2) => get$1(t2).scrollBy({
4097
+ var Tt = /* @__PURE__ */ template('<div class="flex h-62 w-full items-center justify-center"><!></div>'), Pt = /* @__PURE__ */ template('<div class="snap-center px-2"><!></div>'), qt = /* @__PURE__ */ template('<!> <div class="bg-background/85 my-auto mr-3 mb-30 ml-2 flex min-w-40 snap-center flex-wrap items-center justify-center gap-4 p-4 pb-6 shadow-lg backdrop-blur-xl"><p class="w-full text-center text-lg font-semibold text-white">Fancy more?</p> <!></div>', 1), on_click = (e2, t2, n2) => get$1(t2).scrollBy({
4044
4098
  left: 2 * -get$1(n2),
4045
4099
  behavior: "smooth"
4046
- }), Ot = /* @__PURE__ */ template('<button class="bg-background/85 hover:bg-foreground hover:text-background text-foreground absolute top-4/9 left-2 z-20 -translate-y-1/2 transform border p-1 py-4 shadow-xl backdrop-blur-xl transition max-sm:hidden"><!></button>'), on_click_1 = (e2, t2, n2) => get$1(t2).scrollBy({
4100
+ }), Wt = /* @__PURE__ */ template('<button class="bg-background/85 absolute top-4/9 left-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-white hover:text-black max-sm:hidden"><!></button>'), on_click_1 = (e2, t2, n2) => get$1(t2).scrollBy({
4047
4101
  left: 2 * get$1(n2),
4048
4102
  behavior: "smooth"
4049
- }), Pt = /* @__PURE__ */ template('<button class="bg-background/85 hover:bg-foreground hover:text-background text-foreground absolute top-4/9 right-2 z-20 -translate-y-1/2 transform border p-1 py-4 shadow-xl backdrop-blur-xl transition max-sm:hidden"><!></button>'), qt = /* @__PURE__ */ template("<!> <!>", 1), Wt = /* @__PURE__ */ template('<div class="playlight-sdk-container"><div class="relative flex h-full w-full snap-x gap-2 overflow-x-auto"><!></div> <!></div>');
4103
+ }), zt = /* @__PURE__ */ template('<button class="bg-background/85 absolute top-4/9 right-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-white hover:text-black max-sm:hidden"><!></button>'), Et = /* @__PURE__ */ template("<!> <!>", 1), jt = /* @__PURE__ */ template('<div class="playlight-sdk-container"><div class="relative flex h-full w-full snap-x gap-2 overflow-x-auto"><!></div> <!></div>');
4050
4104
  function WidgetCarousel(e2, t2) {
4051
4105
  push(t2, true);
4052
- const [n2, o2] = setup_stores();
4053
- let s2 = state(true), i2 = state(proxy([])), a2 = state(proxy([])), l2 = state(void 0), c2 = state(void 0), u2 = state(0), d2 = state(false), f2 = state(true), p2 = state("");
4106
+ const [n2, s2] = setup_stores();
4107
+ let i2 = state(true), o2 = state(proxy([])), a2 = state(void 0), l2 = state(void 0), c2 = state(0), u2 = state(false), d2 = state(true), f2 = state("");
4054
4108
  function updateMask(e3, t3) {
4055
- const n3 = Math.min(e3 / 50, 1), o3 = Math.min(t3 / 50, 1);
4056
- set(p2, `mask-image: linear-gradient(
4109
+ const n3 = Math.min(e3 / 50, 1), s3 = Math.min(t3 / 50, 1);
4110
+ set(f2, `mask-image: linear-gradient(
4057
4111
  to right,
4058
4112
  rgba(0, 0, 0, ${1 - 0.95 * n3}) 0%,
4059
4113
  rgba(0, 0, 0, ${1 - 0.674 * n3}) 2%,
@@ -4063,80 +4117,70 @@ function WidgetCarousel(e2, t2) {
4063
4117
  rgba(0, 0, 0, ${1 - 0.046 * n3}) 8%,
4064
4118
  black 9%,
4065
4119
  black 91%,
4066
- rgba(0, 0, 0, ${0.954 * o3 + (1 - o3)}) 92%,
4067
- rgba(0, 0, 0, ${0.86 * o3 + (1 - o3)}) 93.5%,
4068
- rgba(0, 0, 0, ${0.74 * o3 + (1 - o3)}) 95%,
4069
- rgba(0, 0, 0, ${0.554 * o3 + (1 - o3)}) 96.5%,
4070
- rgba(0, 0, 0, ${0.326 * o3 + (1 - o3)}) 98%,
4071
- rgba(0, 0, 0, ${0.05 * o3 + (1 - o3)})
4120
+ rgba(0, 0, 0, ${0.954 * s3 + (1 - s3)}) 92%,
4121
+ rgba(0, 0, 0, ${0.86 * s3 + (1 - s3)}) 93.5%,
4122
+ rgba(0, 0, 0, ${0.74 * s3 + (1 - s3)}) 95%,
4123
+ rgba(0, 0, 0, ${0.554 * s3 + (1 - s3)}) 96.5%,
4124
+ rgba(0, 0, 0, ${0.326 * s3 + (1 - s3)}) 98%,
4125
+ rgba(0, 0, 0, ${0.05 * s3 + (1 - s3)})
4072
4126
  )`);
4073
4127
  }
4074
4128
  onMount(async () => {
4075
- var _a2, _b2, _c2, _d;
4076
- if (set(a2, await Qe.getCategories(), true), ((_a2 = get$1(a2)) == null ? void 0 : _a2.length) > 0) {
4077
- const e3 = await Qe.getCurrentGameInfo();
4078
- set(l2, (e3 == null ? void 0 : e3.category) && ((_b2 = get$1(a2)) == null ? void 0 : _b2.includes(e3 == null ? void 0 : e3.category)) ? e3 == null ? void 0 : e3.category : (_d = get$1(a2)) == null ? void 0 : _d[((_c2 = get$1(a2)) == null ? void 0 : _c2.length) - 1], true);
4079
- }
4080
- if (await async function fetchGames() {
4081
- try {
4082
- set(s2, true);
4083
- let e3 = await Qe.getSuggestions(get$1(l2), 1), t3 = (e3 == null ? void 0 : e3.games) || [];
4084
- if (t3.length < 10 && get$1(l2)) {
4085
- const e4 = await Qe.getSuggestions(null, 1), n3 = ((e4 == null ? void 0 : e4.games) || []).filter((e5) => !t3.some((t4) => t4.id === e5.id));
4086
- t3 = [...t3, ...n3];
4087
- }
4088
- set(i2, t3.slice(0, 10), true);
4089
- } catch (e3) {
4090
- console.error("Failed to load games for widget:", e3);
4091
- } finally {
4092
- set(s2, false);
4129
+ const e3 = await Xe.getCategories(), t3 = await Xe.getCurrentGameInfo();
4130
+ if (set(a2, (t3 == null ? void 0 : t3.category) || (e3 == null ? void 0 : e3[(e3 == null ? void 0 : e3.length) - 1]), true), await async function fetchGames() {
4131
+ set(i2, true);
4132
+ let e4 = await Xe.getSuggestions(get$1(a2), 1), t4 = (e4 == null ? void 0 : e4.games) || [];
4133
+ if (t4.length < 10 && get$1(a2)) {
4134
+ const e5 = await Xe.getSuggestions(null, 1), n3 = ((e5 == null ? void 0 : e5.games) || []).filter((e6) => !t4.some((t5) => t5.id === e6.id));
4135
+ t4 = [...t4, ...n3];
4093
4136
  }
4094
- }(), get$1(c2)) {
4095
- const e3 = get$1(c2).scrollWidth - get$1(c2).clientWidth;
4096
- updateMask(get$1(c2).scrollLeft, e3 - get$1(c2).scrollLeft);
4137
+ set(o2, t4.slice(0, 10), true), set(i2, false);
4138
+ }(), get$1(l2)) {
4139
+ const e4 = get$1(l2).scrollWidth - get$1(l2).clientWidth;
4140
+ updateMask(get$1(l2).scrollLeft, e4 - get$1(l2).scrollLeft);
4097
4141
  }
4098
4142
  });
4099
- var _2 = Wt(), g2 = child(_2), v2 = child(g2), consequent = (e3) => {
4100
- var t3 = St();
4143
+ var p2 = jt(), _2 = child(p2), g2 = child(_2), consequent = (e3) => {
4144
+ var t3 = Tt();
4101
4145
  Loader_circle(child(t3), {
4102
4146
  class: "animate-spin opacity-75",
4103
4147
  size: 30,
4104
4148
  strokeWidth: 2.5
4105
4149
  }), append(e3, t3);
4106
4150
  }, alternate = (e3) => {
4107
- var t3 = Tt(), n3 = first_child(t3);
4108
- each(n3, 17, () => get$1(i2), index, (e4, t4) => {
4109
- var n4 = It();
4151
+ var t3 = qt(), n3 = first_child(t3);
4152
+ each(n3, 17, () => get$1(o2), index, (e4, t4) => {
4153
+ var n4 = Pt();
4110
4154
  GameCard(child(n4), {
4111
4155
  get game() {
4112
4156
  return get$1(t4);
4113
4157
  },
4114
4158
  compact: true
4115
4159
  }), function bind_element_size(e5, t5, n5) {
4116
- var o4 = ye.observe(e5, () => n5(e5[t5]));
4160
+ var s4 = ye.observe(e5, () => n5(e5[t5]));
4117
4161
  effect(() => (
4118
4162
  // The update could contain reads which should be ignored
4119
- (untrack(() => n5(e5[t5])), o4)
4163
+ (untrack(() => n5(e5[t5])), s4)
4120
4164
  ));
4121
- }(n4, "clientWidth", (e5) => set(u2, e5)), append(e4, n4);
4165
+ }(n4, "clientWidth", (e5) => set(c2, e5)), append(e4, n4);
4122
4166
  });
4123
- var o3 = sibling(n3, 2);
4124
- Button(sibling(child(o3), 2), {
4167
+ var s3 = sibling(n3, 2);
4168
+ Button(sibling(child(s3), 2), {
4125
4169
  onclick: () => {
4126
- store_set(Ze, true), Qe.trackOpen();
4170
+ store_set(Oe, true), Xe.trackOpen();
4127
4171
  },
4128
4172
  children: (e4, t4) => {
4129
4173
  append(e4, text("See all"));
4130
4174
  }
4131
4175
  }), append(e3, t3);
4132
4176
  };
4133
- if_block(v2, (e3) => {
4134
- get$1(s2) ? e3(consequent) : e3(alternate, false);
4135
- }), bind_this(g2, (e3) => set(c2, e3), () => get$1(c2));
4136
- var h2 = sibling(g2, 2), consequent_3 = (e3) => {
4137
- var t3 = qt(), n3 = first_child(t3), consequent_1 = (e4) => {
4138
- var t4 = Ot();
4139
- t4.__click = [on_click, c2, u2], function Chevron_left(e5, t5) {
4177
+ if_block(g2, (e3) => {
4178
+ get$1(i2) ? e3(consequent) : e3(alternate, false);
4179
+ }), bind_this(_2, (e3) => set(l2, e3), () => get$1(l2));
4180
+ var v2 = sibling(_2, 2), consequent_3 = (e3) => {
4181
+ var t3 = Et(), n3 = first_child(t3), consequent_1 = (e4) => {
4182
+ var t4 = Wt();
4183
+ t4.__click = [on_click, l2, c2], function Chevron_left(e5, t5) {
4140
4184
  const n4 = legacy_rest_props(t5, ["children", "$$slots", "$$events", "$$legacy"]);
4141
4185
  Icon$1(e5, spread_props({
4142
4186
  name: "chevron-left"
@@ -4145,8 +4189,8 @@ function WidgetCarousel(e2, t2) {
4145
4189
  d: "m15 18-6-6 6-6"
4146
4190
  }]],
4147
4191
  children: (e6, n5) => {
4148
- var o4 = comment();
4149
- slot(first_child(o4), t5, "default", {}, null), append(e6, o4);
4192
+ var s4 = comment();
4193
+ slot(first_child(s4), t5, "default", {}, null), append(e6, s4);
4150
4194
  },
4151
4195
  $$slots: {
4152
4196
  default: true
@@ -4158,11 +4202,11 @@ function WidgetCarousel(e2, t2) {
4158
4202
  }), transition(3, t4, () => blur), append(e4, t4);
4159
4203
  };
4160
4204
  if_block(n3, (e4) => {
4161
- get$1(d2) && e4(consequent_1);
4205
+ get$1(u2) && e4(consequent_1);
4162
4206
  });
4163
- var o3 = sibling(n3, 2), consequent_2 = (e4) => {
4164
- var t4 = Pt();
4165
- t4.__click = [on_click_1, c2, u2], function Chevron_right(e5, t5) {
4207
+ var s3 = sibling(n3, 2), consequent_2 = (e4) => {
4208
+ var t4 = zt();
4209
+ t4.__click = [on_click_1, l2, c2], function Chevron_right(e5, t5) {
4166
4210
  const n4 = legacy_rest_props(t5, ["children", "$$slots", "$$events", "$$legacy"]);
4167
4211
  Icon$1(e5, spread_props({
4168
4212
  name: "chevron-right"
@@ -4171,8 +4215,8 @@ function WidgetCarousel(e2, t2) {
4171
4215
  d: "m9 18 6-6-6-6"
4172
4216
  }]],
4173
4217
  children: (e6, n5) => {
4174
- var o4 = comment();
4175
- slot(first_child(o4), t5, "default", {}, null), append(e6, o4);
4218
+ var s4 = comment();
4219
+ slot(first_child(s4), t5, "default", {}, null), append(e6, s4);
4176
4220
  },
4177
4221
  $$slots: {
4178
4222
  default: true
@@ -4183,16 +4227,16 @@ function WidgetCarousel(e2, t2) {
4183
4227
  strokeWidth: 2.75
4184
4228
  }), transition(3, t4, () => blur), append(e4, t4);
4185
4229
  };
4186
- if_block(o3, (e4) => {
4187
- get$1(f2) && e4(consequent_2);
4230
+ if_block(s3, (e4) => {
4231
+ get$1(d2) && e4(consequent_2);
4188
4232
  }), append(e3, t3);
4189
4233
  };
4190
- if_block(h2, (e3) => {
4191
- get$1(i2).length > 0 && e3(consequent_3);
4192
- }), template_effect(() => set_style(g2, get$1(p2))), event("scroll", g2, (e3) => {
4234
+ if_block(v2, (e3) => {
4235
+ get$1(o2).length > 0 && e3(consequent_3);
4236
+ }), template_effect(() => set_style(_2, get$1(f2))), event("scroll", _2, (e3) => {
4193
4237
  const t3 = e3.target;
4194
- set(d2, t3.scrollLeft > 20), set(f2, t3.scrollLeft < t3.scrollWidth - t3.clientWidth - 20), updateMask(t3.scrollLeft, t3.scrollWidth - t3.clientWidth - t3.scrollLeft);
4195
- }), append(e2, _2), pop(), o2();
4238
+ set(u2, t3.scrollLeft > 20), set(d2, t3.scrollLeft < t3.scrollWidth - t3.clientWidth - 20), updateMask(t3.scrollLeft, t3.scrollWidth - t3.clientWidth - t3.scrollLeft);
4239
+ }), append(e2, p2), pop(), s2();
4196
4240
  }
4197
4241
  function initWidgets() {
4198
4242
  try {
@@ -4208,22 +4252,22 @@ function initWidgets() {
4208
4252
  }
4209
4253
  }
4210
4254
  delegate(["click"]);
4211
- const zt = new /**
4255
+ const Dt = new /**
4212
4256
  * The PlaylightSDK class
4213
4257
  */
4214
4258
  (_c = class {
4215
4259
  constructor() {
4216
4260
  __privateAdd(this, _PlaylightSDK_instances);
4217
- this.container = null, this.isInitialized = false, this.config = writable(null), this.api = Qe;
4261
+ this.container = null, this.isInitialized = false, this.config = writable(null), this.api = Xe;
4218
4262
  }
4219
4263
  /**
4220
4264
  * Initialize Playlight
4221
4265
  * @param {Object} [userConfig] - The playlight configuration object
4222
4266
  */
4223
4267
  async init(e2 = {}) {
4224
- return "undefined" == typeof window ? console.error("Playlight cannot run on the server, as it depends on browser APIs.") : this.isInitialized ? (console.warn("Playlight SDK already initialized!"), void (document.getElementById("playlight-sdk-container") || __privateMethod(this, _PlaylightSDK_instances, s_fn).call(this))) : (
4268
+ return "undefined" == typeof window ? console.error("Playlight cannot run on the server, as it depends on browser APIs.") : this.isInitialized ? (console.warn("Playlight SDK already initialized!"), void (document.getElementById("playlight-sdk-container") || __privateMethod(this, _PlaylightSDK_instances, i_fn).call(this))) : (
4225
4269
  // Initialize configuration with defaults and user overrides
4226
- (this.setConfig(e2), __privateMethod(this, _PlaylightSDK_instances, s_fn).call(this), // Create container and mount app
4270
+ (this.setConfig(e2), __privateMethod(this, _PlaylightSDK_instances, i_fn).call(this), // Create container and mount app
4227
4271
  // Widgets
4228
4272
  initWidgets(), function setupWidgetObserver() {
4229
4273
  try {
@@ -4245,7 +4289,7 @@ const zt = new /**
4245
4289
  * @param {boolean} [value=true] - Whether to show the discovery
4246
4290
  */
4247
4291
  setDiscovery(e2 = true) {
4248
- this.isInitialized && (Ze.set(e2), e2 && Qe.trackOpen());
4292
+ this.isInitialized && (Oe.set(e2), e2 && Xe.trackOpen());
4249
4293
  }
4250
4294
  /**
4251
4295
  * Update the configuration
@@ -4259,7 +4303,7 @@ const zt = new /**
4259
4303
  * Mount the Svelte app to the playlight container
4260
4304
  * @private
4261
4305
  */
4262
- s_fn = function() {
4306
+ i_fn = function() {
4263
4307
  try {
4264
4308
  this.container = document.createElement("div"), this.container.id = "playlight-sdk-container", this.container.className = "playlight-sdk-container", document.body.appendChild(this.container), // Mount (client-side alternative to render)
4265
4309
  mount(App, {
@@ -4272,8 +4316,8 @@ s_fn = function() {
4272
4316
  console.error("Playlight error occured during mount:", e2);
4273
4317
  }
4274
4318
  }, _c)();
4275
- "undefined" != typeof window && (window.playlightSDK = zt);
4319
+ "undefined" != typeof window && (window.playlightSDK = Dt);
4276
4320
  export {
4277
- zt as default
4321
+ Dt as default
4278
4322
  };
4279
4323
  //# sourceMappingURL=playlight-sdk.es.js.map