playlight-sdk 0.2.2 → 0.2.4

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.
@@ -11,7 +11,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
11
11
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
12
12
  var _e2, _t2, _n, _ResizeObserverSingleton_instances, r_fn, _a, _PlayLightAPI_instances, o_fn, _b, _PlaylightSDK_instances, s_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;
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;
15
15
  function is_function(e2) {
16
16
  return "function" == typeof e2;
17
17
  }
@@ -23,7 +23,7 @@ function run(e2) {
23
23
  function run_all(e2) {
24
24
  for (var t2 = 0; t2 < e2.length; t2++) e2[t2]();
25
25
  }
26
- const d = 32, f = 64, p = 128, _ = 256, g = 512, v = 1024, h = 2048, m = 4096, b = 8192, y = 16384, $ = 65536, x = 1 << 20, w = Symbol("$state"), k = Symbol("legacy props"), C = Symbol("");
26
+ const f = 32, p = 64, _ = 128, g = 256, v = 512, h = 1024, m = 2048, b = 4096, y = 8192, $ = 16384, w = 65536, x = 1 << 20, k = 1 << 21, C = Symbol("$state"), M = Symbol("legacy props"), S = Symbol("");
27
27
  function equals(e2) {
28
28
  return e2 === this.v;
29
29
  }
@@ -33,37 +33,41 @@ function safe_not_equal(e2, t2) {
33
33
  function safe_equals(e2) {
34
34
  return !safe_not_equal(e2, this.v);
35
35
  }
36
- let S = false;
37
- const M = Symbol();
36
+ let I = false;
37
+ const T = Symbol();
38
38
  function lifecycle_outside_component(e2) {
39
39
  throw new Error("https://svelte.dev/e/lifecycle_outside_component");
40
40
  }
41
- let I = null;
41
+ let O = null;
42
42
  function set_component_context(e2) {
43
- I = e2;
43
+ O = e2;
44
44
  }
45
45
  function push(e2, t2 = false, n2) {
46
- I = {
47
- p: I,
46
+ var o2 = O = {
47
+ p: O,
48
48
  c: null,
49
+ d: false,
49
50
  e: null,
50
51
  m: false,
51
52
  s: e2,
52
53
  x: null,
53
54
  l: null
54
- }, S && !t2 && (I.l = {
55
+ };
56
+ I && !t2 && (O.l = {
55
57
  s: null,
56
58
  u: null,
57
59
  r1: [],
58
60
  r2: source(false)
61
+ }), teardown(() => {
62
+ o2.d = true;
59
63
  });
60
64
  }
61
65
  function pop(e2) {
62
- const t2 = I;
66
+ const t2 = O;
63
67
  if (null !== t2) {
64
68
  const e3 = t2.e;
65
69
  if (null !== e3) {
66
- var n2 = H, o2 = G;
70
+ var n2 = V, o2 = R;
67
71
  t2.e = null;
68
72
  try {
69
73
  for (var s2 = 0; s2 < e3.length; s2++) {
@@ -74,100 +78,24 @@ function pop(e2) {
74
78
  set_active_effect(n2), set_active_reaction(o2);
75
79
  }
76
80
  }
77
- I = t2.p, t2.m = true;
81
+ O = t2.p, t2.m = true;
78
82
  }
79
83
  return {};
80
84
  }
81
85
  function is_runes() {
82
- return !S || null !== I && null === I.l;
83
- }
84
- function source(e2, t2) {
85
- return {
86
- f: 0,
87
- // TODO ideally we could skip this altogether, but it causes type errors
88
- v: e2,
89
- reactions: null,
90
- equals,
91
- rv: 0,
92
- wv: 0
86
+ return !I || null !== O && null === O.l;
87
+ }
88
+ function proxy(e2, n2) {
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) => {
93
+ var t2, n3 = R;
94
+ return set_active_reaction(f2), t2 = e3(), set_active_reaction(n3), t2;
93
95
  };
94
- }
95
- function state(e2) {
96
- return /* @__PURE__ */ push_derived_source(source(e2));
97
- }
98
- // @__NO_SIDE_EFFECTS__
99
- function mutable_source(e2, t2 = false) {
100
- var _a2;
101
- const n2 = source(e2);
102
- return t2 || (n2.equals = safe_equals), // bind the signal to the component context, in case we need to
103
- // track updates to trigger beforeUpdate/afterUpdate callbacks
104
- S && null !== I && null !== I.l && ((_a2 = I.l).s ?? (_a2.s = [])).push(n2), n2;
105
- }
106
- function mutable_state(e2, t2 = false) {
107
- return /* @__PURE__ */ push_derived_source(/* @__PURE__ */ mutable_source(e2, t2));
108
- }
109
- // @__NO_SIDE_EFFECTS__
110
- function push_derived_source(e2) {
111
- return null !== G && !F && 2 & G.f && (null === R ? (
112
- /**
113
- * @param {Source[] | null} sources
114
- */
115
- function set_derived_sources(e3) {
116
- R = e3;
117
- }([e2])
118
- ) : R.push(e2)), e2;
119
- }
120
- function set(e2, t2) {
121
- return null !== G && !F && is_runes() && 18 & G.f && // If the source was created locally within the current derived, then
122
- // we allow the mutation.
123
- (null === R || !R.includes(e2)) && /**
124
- * Updating state inside a derived or a template expression is forbidden. If the value should not be reactive, declare it without `$state`
125
- * @returns {never}
126
- */
127
- function state_unsafe_mutation() {
128
- throw new Error("https://svelte.dev/e/state_unsafe_mutation");
129
- }(), internal_set(e2, t2);
130
- }
131
- function internal_set(e2, t2) {
132
- return e2.equals(t2) || (e2.v, e2.v = t2, e2.wv = increment_write_version(), mark_reactions(e2, h), // It's possible that the current reaction might not have up-to-date dependencies
133
- // whilst it's actively running. So in the case of ensuring it registers the reaction
134
- // properly for itself, we need to ensure the current effect actually gets
135
- // scheduled. i.e: `$effect(() => x++)`
136
- is_runes() && null !== H && H.f & v && !(96 & H.f) && (null === K ? (
137
- /** @param {null | Source[]} value */
138
- function set_untracked_writes(e3) {
139
- K = e3;
140
- }([e2])
141
- ) : K.push(e2))), t2;
142
- }
143
- function update(e2, t2 = 1) {
144
- var n2 = get$1(e2), o2 = 1 === t2 ? n2++ : n2--;
145
- return set(e2, n2), o2;
146
- }
147
- function mark_reactions(e2, t2) {
148
- var n2 = e2.reactions;
149
- if (null !== n2) for (var o2 = is_runes(), s2 = n2.length, i2 = 0; i2 < s2; i2++) {
150
- var a2 = n2[i2], l2 = a2.f;
151
- l2 & h || // In legacy mode, skip the current effect to prevent infinite loops
152
- (o2 || a2 !== H) && (set_signal_status(a2, t2), // If the signal a) was previously clean or b) is an unowned derived, then mark it
153
- 1280 & l2 && (2 & l2 ? mark_reactions(
154
- /** @type {Derived} */
155
- a2,
156
- m
157
- ) : schedule_effect(
158
- /** @type {Effect} */
159
- a2
160
- )));
161
- }
162
- }
163
- function proxy(e2, n2 = null, o2) {
164
- if ("object" != typeof e2 || null === e2 || w in e2) return e2;
165
- const s2 = u(e2);
166
- if (s2 !== l && s2 !== c) return e2;
167
- var a2, d2 = /* @__PURE__ */ new Map(), f2 = t(e2), p2 = source(0);
168
- return f2 && // We need to create the length source eagerly to ensure that
96
+ return a2 && // We need to create the length source eagerly to ensure that
169
97
  // mutations to the array are properly synced with our proxy
170
- d2.set("length", source(
98
+ s2.set("length", state(
171
99
  /** @type {any[]} */
172
100
  e2.length
173
101
  )), new Proxy(
@@ -186,48 +114,48 @@ function proxy(e2, n2 = null, o2) {
186
114
  function state_descriptors_fixed() {
187
115
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
188
116
  }();
189
- var o3 = d2.get(t2);
190
- return void 0 === o3 ? (o3 = source(n3.value), d2.set(t2, o3)) : set(o3, proxy(n3.value, a2)), true;
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;
191
119
  },
192
120
  deleteProperty(e3, t2) {
193
- var n3 = d2.get(t2);
194
- if (void 0 === n3) t2 in e3 && d2.set(t2, source(M));
121
+ var n3 = s2.get(t2);
122
+ if (void 0 === n3) t2 in e3 && s2.set(t2, with_parent(() => state(T)));
195
123
  else {
196
- if (f2 && "string" == typeof t2) {
124
+ if (a2 && "string" == typeof t2) {
197
125
  var o3 = (
198
126
  /** @type {Source<number>} */
199
- d2.get("length")
200
- ), s3 = Number(t2);
201
- Number.isInteger(s3) && s3 < o3.v && set(o3, s3);
127
+ s2.get("length")
128
+ ), i2 = Number(t2);
129
+ Number.isInteger(i2) && i2 < o3.v && set(o3, i2);
202
130
  }
203
- set(n3, M), update_version(p2);
131
+ set(n3, T), update_version(d2);
204
132
  }
205
133
  return true;
206
134
  },
207
135
  get(t2, n3, o3) {
208
136
  var _a2;
209
- if (n3 === w) return e2;
210
- var s3 = d2.get(n3), l2 = n3 in t2;
137
+ if (n3 === C) return e2;
138
+ var a3 = s2.get(n3), l2 = n3 in t2;
211
139
  if (
212
140
  // create a source, but only if it's an own property and not a prototype property
213
- void 0 !== s3 || l2 && !((_a2 = i(t2, n3)) == null ? void 0 : _a2.writable) || (s3 = source(proxy(l2 ? t2[n3] : M, a2)), d2.set(n3, s3)), void 0 !== s3
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
214
142
  ) {
215
- var c2 = get$1(s3);
216
- return c2 === M ? void 0 : c2;
143
+ var c2 = get$1(a3);
144
+ return c2 === T ? void 0 : c2;
217
145
  }
218
146
  return Reflect.get(t2, n3, o3);
219
147
  },
220
148
  getOwnPropertyDescriptor(e3, t2) {
221
149
  var n3 = Reflect.getOwnPropertyDescriptor(e3, t2);
222
150
  if (n3 && "value" in n3) {
223
- var o3 = d2.get(t2);
151
+ var o3 = s2.get(t2);
224
152
  o3 && (n3.value = get$1(o3));
225
153
  } else if (void 0 === n3) {
226
- var s3 = d2.get(t2), i2 = s3 == null ? void 0 : s3.v;
227
- if (void 0 !== s3 && i2 !== M) return {
154
+ var i2 = s2.get(t2), a3 = i2 == null ? void 0 : i2.v;
155
+ if (void 0 !== i2 && a3 !== T) return {
228
156
  enumerable: true,
229
157
  configurable: true,
230
- value: i2,
158
+ value: a3,
231
159
  writable: true
232
160
  };
233
161
  }
@@ -235,43 +163,43 @@ function proxy(e2, n2 = null, o2) {
235
163
  },
236
164
  has(e3, t2) {
237
165
  var _a2;
238
- if (t2 === w) return true;
239
- var n3 = d2.get(t2), o3 = void 0 !== n3 && n3.v !== M || Reflect.has(e3, t2);
240
- if ((void 0 !== n3 || null !== H && (!o3 || ((_a2 = i(e3, t2)) == null ? void 0 : _a2.writable))) && (void 0 === n3 && (n3 = source(o3 ? proxy(e3[t2], a2) : M), d2.set(t2, n3)), get$1(n3) === M)) return false;
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;
241
169
  return o3;
242
170
  },
243
171
  set(e3, t2, n3, o3) {
244
172
  var _a2;
245
- var s3 = d2.get(t2), l2 = t2 in e3;
246
- if (f2 && "length" === t2) for (var c2 = n3; c2 < /** @type {Source<number>} */
247
- s3.v; c2 += 1) {
248
- var u2 = d2.get(c2 + "");
249
- void 0 !== u2 ? set(u2, M) : c2 in e3 && // If the item exists in the original, we need to create a uninitialized source,
173
+ var l2 = s2.get(t2), c2 = t2 in e3;
174
+ if (a2 && "length" === t2) for (var u2 = n3; u2 < /** @type {Source<number>} */
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,
250
178
  // else a later read of the property would result in a source being created with
251
179
  // the value of the original item at that index.
252
- (u2 = source(M), d2.set(c2 + "", u2));
180
+ (f3 = with_parent(() => state(T)), s2.set(u2 + "", f3));
253
181
  }
254
- void 0 === s3 ? l2 && !((_a2 = i(e3, t2)) == null ? void 0 : _a2.writable) || (set(s3 = source(void 0), proxy(n3, a2)), d2.set(t2, s3)) : (l2 = s3.v !== M, set(s3, proxy(n3, a2)));
255
- var _2 = Reflect.getOwnPropertyDescriptor(e3, t2);
256
- if ((_2 == null ? void 0 : _2.set) && _2.set.call(o3, n3), !l2) {
257
- if (f2 && "string" == typeof t2) {
258
- var g2 = (
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))));
183
+ var p2 = Reflect.getOwnPropertyDescriptor(e3, t2);
184
+ if ((p2 == null ? void 0 : p2.set) && p2.set.call(o3, n3), !c2) {
185
+ if (a2 && "string" == typeof t2) {
186
+ var _2 = (
259
187
  /** @type {Source<number>} */
260
- d2.get("length")
261
- ), v2 = Number(t2);
262
- Number.isInteger(v2) && v2 >= g2.v && set(g2, v2 + 1);
188
+ s2.get("length")
189
+ ), g2 = Number(t2);
190
+ Number.isInteger(g2) && g2 >= _2.v && set(_2, g2 + 1);
263
191
  }
264
- update_version(p2);
192
+ update_version(d2);
265
193
  }
266
194
  return true;
267
195
  },
268
196
  ownKeys(e3) {
269
- get$1(p2);
197
+ get$1(d2);
270
198
  var t2 = Reflect.ownKeys(e3).filter((e4) => {
271
- var t3 = d2.get(e4);
272
- return void 0 === t3 || t3.v !== M;
199
+ var t3 = s2.get(e4);
200
+ return void 0 === t3 || t3.v !== T;
273
201
  });
274
- for (var [n3, o3] of d2) o3.v === M || n3 in e3 || t2.push(n3);
202
+ for (var [n3, o3] of s2) o3.v === T || n3 in e3 || t2.push(n3);
275
203
  return t2;
276
204
  },
277
205
  setPrototypeOf() {
@@ -285,17 +213,82 @@ function proxy(e2, n2 = null, o2) {
285
213
  function update_version(e2, t2 = 1) {
286
214
  set(e2, e2.v + t2);
287
215
  }
288
- var T, O, q, P, z;
216
+ const q = /* @__PURE__ */ new Map();
217
+ function source(e2, t2) {
218
+ return {
219
+ f: 0,
220
+ // TODO ideally we could skip this altogether, but it causes type errors
221
+ v: e2,
222
+ reactions: null,
223
+ equals,
224
+ rv: 0,
225
+ wv: 0
226
+ };
227
+ }
228
+ function state(e2, t2) {
229
+ const n2 = source(e2);
230
+ return push_reaction_value(n2), n2;
231
+ }
232
+ // @__NO_SIDE_EFFECTS__
233
+ function mutable_source(e2, t2 = false) {
234
+ var _a2;
235
+ const n2 = source(e2);
236
+ return t2 || (n2.equals = safe_equals), // bind the signal to the component context, in case we need to
237
+ // track updates to trigger beforeUpdate/afterUpdate callbacks
238
+ I && null !== O && null !== O.l && ((_a2 = O.l).s ?? (_a2.s = [])).push(n2), n2;
239
+ }
240
+ function set(e2, t2, n2 = false) {
241
+ return null !== R && !U && is_runes() && 18 & R.f && !(K == null ? void 0 : K.includes(e2)) && function state_unsafe_mutation() {
242
+ throw new Error("https://svelte.dev/e/state_unsafe_mutation");
243
+ }(), internal_set(e2, n2 ? proxy(t2) : t2);
244
+ }
245
+ function internal_set(e2, t2) {
246
+ if (!e2.equals(t2)) {
247
+ var n2 = e2.v;
248
+ F ? q.set(e2, t2) : q.set(e2, n2), e2.v = t2, e2.wv = increment_write_version(), mark_reactions(e2, m), // It's possible that the current reaction might not have up-to-date dependencies
249
+ // whilst it's actively running. So in the case of ensuring it registers the reaction
250
+ // properly for itself, we need to ensure the current effect actually gets
251
+ // scheduled. i.e: `$effect(() => x++)`
252
+ is_runes() && null !== V && V.f & h && !(96 & V.f) && (null === J ? (
253
+ /** @param {null | Source[]} value */
254
+ function set_untracked_writes(e3) {
255
+ J = e3;
256
+ }([e2])
257
+ ) : J.push(e2));
258
+ }
259
+ return t2;
260
+ }
261
+ function update(e2, t2 = 1) {
262
+ var n2 = get$1(e2), o2 = 1 === t2 ? n2++ : n2--;
263
+ return set(e2, n2), o2;
264
+ }
265
+ function mark_reactions(e2, t2) {
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;
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
271
+ 1280 & l2 && (2 & l2 ? mark_reactions(
272
+ /** @type {Derived} */
273
+ a2,
274
+ b
275
+ ) : schedule_effect(
276
+ /** @type {Effect} */
277
+ a2
278
+ )));
279
+ }
280
+ }
281
+ var P, D, z, E, W;
289
282
  function create_text(e2 = "") {
290
283
  return document.createTextNode(e2);
291
284
  }
292
285
  // @__NO_SIDE_EFFECTS__
293
286
  function get_first_child(e2) {
294
- return P.call(e2);
287
+ return E.call(e2);
295
288
  }
296
289
  // @__NO_SIDE_EFFECTS__
297
290
  function get_next_sibling(e2) {
298
- return z.call(e2);
291
+ return W.call(e2);
299
292
  }
300
293
  function child(e2, t2) {
301
294
  return /* @__PURE__ */ get_first_child(e2);
@@ -318,17 +311,17 @@ function sibling(e2, t2 = 1, n2 = false) {
318
311
  }
319
312
  // @__NO_SIDE_EFFECTS__
320
313
  function derived(e2) {
321
- var t2 = 2050, n2 = null !== G && 2 & G.f ? (
314
+ var t2 = 2050, n2 = null !== R && 2 & R.f ? (
322
315
  /** @type {Derived} */
323
- G
316
+ R
324
317
  ) : null;
325
- null === H || null !== n2 && n2.f & _ ? t2 |= _ : (
318
+ null === V || null !== n2 && n2.f & g ? t2 |= g : (
326
319
  // Since deriveds are evaluated lazily, any effects created inside them are
327
320
  // created too late to ensure that the parent effect is added to the tree
328
- H.f |= x
321
+ V.f |= x
329
322
  );
330
323
  return {
331
- ctx: I,
324
+ ctx: O,
332
325
  deps: null,
333
326
  effects: null,
334
327
  equals,
@@ -341,9 +334,13 @@ function derived(e2) {
341
334
  null
342
335
  ),
343
336
  wv: 0,
344
- parent: n2 ?? H
337
+ parent: n2 ?? V
345
338
  };
346
339
  }
340
+ function user_derived(e2) {
341
+ const t2 = /* @__PURE__ */ derived(e2);
342
+ return push_reaction_value(t2), t2;
343
+ }
347
344
  // @__NO_SIDE_EFFECTS__
348
345
  function derived_safe_equal(e2) {
349
346
  const t2 = /* @__PURE__ */ derived(e2);
@@ -367,7 +364,7 @@ function update_derived(e2) {
367
364
  * @returns {T}
368
365
  */
369
366
  function execute_derived(e3) {
370
- var t3, n2 = H;
367
+ var t3, n2 = V;
371
368
  set_active_effect(function get_derived_parent_effect(e4) {
372
369
  for (var t4 = e4.parent; null !== t4; ) {
373
370
  if (!(2 & t4.f))
@@ -384,33 +381,33 @@ function update_derived(e2) {
384
381
  return t3;
385
382
  }(e2)
386
383
  );
387
- set_signal_status(e2, (J || e2.f & _) && null !== e2.deps ? m : v), e2.equals(t2) || (e2.v = t2, e2.wv = increment_write_version());
384
+ set_signal_status(e2, (te || e2.f & g) && null !== e2.deps ? b : h), e2.equals(t2) || (e2.v = t2, e2.wv = increment_write_version());
388
385
  }
389
386
  function validate_effect(e2) {
390
- null === H && null === G && /**
387
+ null === V && null === R && /**
391
388
  * `%rune%` can only be used inside an effect (e.g. during component initialisation)
392
389
  * @param {string} rune
393
390
  * @returns {never}
394
391
  */
395
392
  function effect_orphan(e3) {
396
393
  throw new Error("https://svelte.dev/e/effect_orphan");
397
- }(), null !== G && G.f & _ && null === H && /**
394
+ }(), null !== R && R.f & g && null === V && /**
398
395
  * Effect cannot be created inside a `$derived` value that was not itself created inside an effect
399
396
  * @returns {never}
400
397
  */
401
398
  function effect_in_unowned_derived() {
402
399
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
403
- }(), A && function effect_in_teardown(e3) {
400
+ }(), F && function effect_in_teardown(e3) {
404
401
  throw new Error("https://svelte.dev/e/effect_in_teardown");
405
402
  }();
406
403
  }
407
404
  function create_effect(e2, t2, n2, o2 = true) {
408
- var s2 = H, i2 = {
409
- ctx: I,
405
+ var s2 = V, i2 = {
406
+ ctx: O,
410
407
  deps: null,
411
408
  nodes_start: null,
412
409
  nodes_end: null,
413
- f: e2 | h,
410
+ f: e2 | m,
414
411
  first: null,
415
412
  fn: t2,
416
413
  last: null,
@@ -430,10 +427,10 @@ function create_effect(e2, t2, n2, o2 = true) {
430
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) {
431
428
  var n3 = t3.last;
432
429
  null === n3 ? t3.last = t3.first = e3 : (n3.next = e3, e3.prev = n3, t3.last = e3);
433
- }(i2, s2), null !== G && 2 & G.f)) {
430
+ }(i2, s2), null !== R && 2 & R.f)) {
434
431
  var a2 = (
435
432
  /** @type {Derived} */
436
- G
433
+ R
437
434
  );
438
435
  (a2.effects ?? (a2.effects = [])).push(i2);
439
436
  }
@@ -441,18 +438,18 @@ function create_effect(e2, t2, n2, o2 = true) {
441
438
  }
442
439
  function teardown(e2) {
443
440
  const t2 = create_effect(8, null, false);
444
- return set_signal_status(t2, v), t2.teardown = e2, t2;
441
+ return set_signal_status(t2, h), t2.teardown = e2, t2;
445
442
  }
446
443
  function user_effect(e2) {
447
- if (validate_effect(), !(null !== H && !!(H.f & d) && null !== I && !I.m)) return effect(e2);
444
+ if (validate_effect(), !(null !== V && !!(V.f & f) && null !== O && !O.m)) return effect(e2);
448
445
  var t2 = (
449
446
  /** @type {ComponentContext} */
450
- I
447
+ O
451
448
  );
452
449
  (t2.e ?? (t2.e = [])).push({
453
450
  fn: e2,
454
- effect: H,
455
- reaction: G
451
+ effect: V,
452
+ reaction: R
456
453
  });
457
454
  }
458
455
  function effect(e2) {
@@ -461,7 +458,7 @@ function effect(e2) {
461
458
  function legacy_pre_effect(e2, t2) {
462
459
  var n2 = (
463
460
  /** @type {ComponentContextLegacy} */
464
- I
461
+ O
465
462
  ), o2 = {
466
463
  effect: null,
467
464
  ran: false
@@ -475,13 +472,13 @@ function legacy_pre_effect(e2, t2) {
475
472
  function legacy_pre_effect_reset() {
476
473
  var e2 = (
477
474
  /** @type {ComponentContextLegacy} */
478
- I
475
+ O
479
476
  );
480
477
  render_effect(() => {
481
478
  if (get$1(e2.l.r2)) {
482
479
  for (var t2 of e2.l.r1) {
483
480
  var n2 = t2.effect;
484
- n2.f & v && set_signal_status(n2, m), check_dirtiness(n2) && update_effect(n2), t2.ran = false;
481
+ n2.f & h && set_signal_status(n2, b), check_dirtiness(n2) && update_effect(n2), t2.ran = false;
485
482
  }
486
483
  e2.l.r2.v = false;
487
484
  }
@@ -503,7 +500,7 @@ function branch(e2, t2 = true) {
503
500
  function execute_effect_teardown(e2) {
504
501
  var t2 = e2.teardown;
505
502
  if (null !== t2) {
506
- const e3 = A, n2 = G;
503
+ const e3 = F, n2 = R;
507
504
  set_is_destroying_effect(true), set_active_reaction(null);
508
505
  try {
509
506
  t2.call(null);
@@ -516,7 +513,7 @@ function destroy_effect_children(e2, t2 = false) {
516
513
  var n2 = e2.first;
517
514
  for (e2.first = e2.last = null; null !== n2; ) {
518
515
  var o2 = n2.next;
519
- n2.f & f ? (
516
+ n2.f & p ? (
520
517
  // this is now an independent root
521
518
  n2.parent = null
522
519
  ) : destroy_effect(n2, t2), n2 = o2;
@@ -534,7 +531,7 @@ function destroy_effect(e2, t2 = true) {
534
531
  }
535
532
  n2 = true;
536
533
  }
537
- destroy_effect_children(e2, t2 && !n2), remove_reactions(e2, 0), set_signal_status(e2, y);
534
+ destroy_effect_children(e2, t2 && !n2), remove_reactions(e2, 0), set_signal_status(e2, $);
538
535
  var a2 = e2.transitions;
539
536
  if (null !== a2) for (const e3 of a2) e3.stop();
540
537
  execute_effect_teardown(e2);
@@ -561,11 +558,11 @@ function run_out_transitions(e2, t2) {
561
558
  } else t2();
562
559
  }
563
560
  function pause_children(e2, t2, n2) {
564
- if (!(e2.f & b)) {
565
- if (e2.f ^= b, null !== e2.transitions) for (const o3 of e2.transitions) (o3.is_global || n2) && t2.push(o3);
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);
566
563
  for (var o2 = e2.first; null !== o2; ) {
567
564
  var s2 = o2.next;
568
- pause_children(o2, t2, !!(!!(o2.f & $) || !!(o2.f & d)) && n2), o2 = s2;
565
+ pause_children(o2, t2, !!(!!(o2.f & w) || !!(o2.f & f)) && n2), o2 = s2;
569
566
  }
570
567
  }
571
568
  }
@@ -573,59 +570,64 @@ function resume_effect(e2) {
573
570
  resume_children(e2, true);
574
571
  }
575
572
  function resume_children(e2, t2) {
576
- if (e2.f & b) {
577
- e2.f ^= b, // Ensure the effect is marked as clean again so that any dirty child
573
+ if (e2.f & y) {
574
+ e2.f ^= y, // Ensure the effect is marked as clean again so that any dirty child
578
575
  // effects can schedule themselves for execution
579
- e2.f & v || (e2.f ^= v), // If a dependency of this effect changed while it was paused,
576
+ e2.f & h || (e2.f ^= h), // If a dependency of this effect changed while it was paused,
580
577
  // schedule the effect to update
581
- check_dirtiness(e2) && (set_signal_status(e2, h), schedule_effect(e2));
578
+ check_dirtiness(e2) && (set_signal_status(e2, m), schedule_effect(e2));
582
579
  for (var n2 = e2.first; null !== n2; ) {
583
580
  var o2 = n2.next;
584
- resume_children(n2, !!(!!(n2.f & $) || !!(n2.f & d)) && t2), n2 = o2;
581
+ resume_children(n2, !!(!!(n2.f & w) || !!(n2.f & f)) && t2), n2 = o2;
585
582
  }
586
583
  if (null !== e2.transitions) for (const n3 of e2.transitions) (n3.is_global || t2) && n3.in();
587
584
  }
588
585
  }
589
- let W = [], D = [];
586
+ let j = [], N = [];
590
587
  function run_micro_tasks() {
591
- var e2 = W;
592
- W = [], run_all(e2);
588
+ var e2 = j;
589
+ j = [], run_all(e2);
593
590
  }
594
591
  function queue_micro_task(e2) {
595
- 0 === W.length && queueMicrotask(run_micro_tasks), W.push(e2);
592
+ 0 === j.length && queueMicrotask(run_micro_tasks), j.push(e2);
596
593
  }
597
594
  function flush_tasks() {
598
- W.length > 0 && run_micro_tasks(), D.length > 0 && function run_idle_tasks() {
599
- var e2 = D;
600
- D = [], run_all(e2);
595
+ j.length > 0 && run_micro_tasks(), N.length > 0 && function run_idle_tasks() {
596
+ var e2 = N;
597
+ N = [], run_all(e2);
601
598
  }();
602
599
  }
603
- let E = false, j = false, N = null, B = false, A = false;
600
+ let B = false, A = false, L = null, G = false, F = false;
604
601
  function set_is_destroying_effect(e2) {
605
- A = e2;
602
+ F = e2;
606
603
  }
607
- let L = [], G = null, F = false;
604
+ let H = [], R = null, U = false;
608
605
  function set_active_reaction(e2) {
609
- G = e2;
606
+ R = e2;
610
607
  }
611
- let H = null;
608
+ let V = null;
612
609
  function set_active_effect(e2) {
613
- H = e2;
610
+ V = e2;
614
611
  }
615
- let R = null;
616
- let U = null, V = 0, K = null;
617
- let Y = 1, Z = 0, J = false;
612
+ let K = null;
613
+ function push_reaction_value(e2) {
614
+ null !== R && R.f & k && (null === K ? function set_reaction_sources(e3) {
615
+ K = e3;
616
+ }([e2]) : K.push(e2));
617
+ }
618
+ let Y = null, Z = 0, J = null;
619
+ let Q = 1, ee = 0, te = false;
618
620
  function increment_write_version() {
619
- return ++Y;
621
+ return ++Q;
620
622
  }
621
623
  function check_dirtiness(e2) {
622
624
  var _a2;
623
625
  var t2 = e2.f;
624
- if (t2 & h) return true;
625
- if (t2 & m) {
626
- var n2 = e2.deps, o2 = !!(t2 & _);
626
+ if (t2 & m) return true;
627
+ if (t2 & b) {
628
+ var n2 = e2.deps, o2 = !!(t2 & g);
627
629
  if (null !== n2) {
628
- var s2, i2, a2 = !!(t2 & g), l2 = o2 && null !== H && !J, c2 = n2.length;
630
+ var s2, i2, a2 = !!(t2 & v), l2 = o2 && null !== V && !te, c2 = n2.length;
629
631
  if (a2 || l2) {
630
632
  var u2 = (
631
633
  /** @type {Derived} */
@@ -635,81 +637,82 @@ function check_dirtiness(e2) {
635
637
  // previously disconnected, however we don't if it was unowned as we
636
638
  // de-duplicate dependencies in that case
637
639
  !a2 && ((_a2 = i2 == null ? void 0 : i2.reactions) == null ? void 0 : _a2.includes(u2)) || (i2.reactions ?? (i2.reactions = [])).push(u2);
638
- a2 && (u2.f ^= g), // If the unowned derived is now fully connected to the graph again (it's unowned and reconnected, has a parent
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
639
641
  // and the parent is not unowned), then we can mark it as connected again, removing the need for the unowned
640
642
  // flag
641
- !l2 || null === d2 || d2.f & _ || (u2.f ^= _);
643
+ !l2 || null === d2 || d2.f & g || (u2.f ^= g);
642
644
  }
643
645
  for (s2 = 0; s2 < c2; s2++) if (check_dirtiness(i2 = n2[s2]) && update_derived(
644
646
  /** @type {Derived} */
645
647
  i2
646
648
  ), i2.wv > e2.wv) return true;
647
649
  }
648
- o2 && (null === H || J) || set_signal_status(e2, v);
650
+ o2 && (null === V || te) || set_signal_status(e2, h);
649
651
  }
650
652
  return false;
651
653
  }
652
654
  function handle_error(e2, t2, n2, o2) {
653
- if (E) {
654
- if (null === n2 && (E = false), /**
655
+ if (B) {
656
+ if (null === n2 && (B = false), /**
655
657
  * @param {Effect} effect
656
658
  */
657
659
  function should_rethrow_error(e3) {
658
- return !(e3.f & y || null !== e3.parent && e3.parent.f & p);
660
+ return !(e3.f & $ || null !== e3.parent && e3.parent.f & _);
659
661
  }(t2)) throw e2;
660
- } else null !== n2 && (E = true), function propagate_error(e3, t3) {
662
+ } else null !== n2 && (B = true), function propagate_error(e3, t3) {
661
663
  for (var n3 = t3; null !== n3; ) {
662
- if (n3.f & p) try {
664
+ if (n3.f & _) try {
663
665
  return void n3.fn(e3);
664
666
  } catch {
665
- n3.f ^= p;
667
+ n3.f ^= _;
666
668
  }
667
669
  n3 = n3.parent;
668
670
  }
669
- throw E = false, e3;
671
+ throw B = false, e3;
670
672
  }(e2, t2);
671
673
  }
672
674
  function schedule_possible_effect_self_invalidation(e2, t2, n2 = true) {
673
675
  var o2 = e2.reactions;
674
676
  if (null !== o2) for (var s2 = 0; s2 < o2.length; s2++) {
675
677
  var i2 = o2[s2];
676
- 2 & i2.f ? schedule_possible_effect_self_invalidation(
678
+ (K == null ? void 0 : K.includes(e2)) || (2 & i2.f ? schedule_possible_effect_self_invalidation(
677
679
  /** @type {Derived} */
678
680
  i2,
679
681
  t2,
680
682
  false
681
- ) : t2 === i2 && (n2 ? set_signal_status(i2, h) : i2.f & v && set_signal_status(i2, m), schedule_effect(
683
+ ) : t2 === i2 && (n2 ? set_signal_status(i2, m) : i2.f & h && set_signal_status(i2, b), schedule_effect(
682
684
  /** @type {Effect} */
683
685
  i2
684
- ));
686
+ )));
685
687
  }
686
688
  }
687
689
  function update_reaction(e2) {
688
690
  var _a2;
689
- var t2 = U, n2 = V, o2 = K, s2 = G, i2 = J, a2 = R, l2 = I, c2 = F, u2 = e2.f;
690
- U = /** @type {null | Value[]} */
691
- null, V = 0, K = null, J = !!(u2 & _) && (F || !B || null === G), G = 96 & u2 ? null : e2, R = null, set_component_context(e2.ctx), F = false, Z++;
691
+ var t2 = Y, n2 = Z, o2 = J, s2 = R, i2 = te, a2 = K, l2 = O, c2 = U, u2 = e2.f;
692
+ Y = /** @type {null | Value[]} */
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;
692
694
  try {
693
695
  var d2 = (
694
696
  /** @type {Function} */
695
697
  /** @type {Function} */
696
698
  (0, e2.fn)()
697
699
  ), f2 = e2.deps;
698
- if (null !== U) {
700
+ if (null !== Y) {
699
701
  var p2;
700
- if (remove_reactions(e2, V), null !== f2 && V > 0) for (f2.length = V + U.length, p2 = 0; p2 < U.length; p2++) f2[V + p2] = U[p2];
701
- else e2.deps = f2 = U;
702
- if (!J) for (p2 = V; p2 < f2.length; p2++) ((_a2 = f2[p2]).reactions ?? (_a2.reactions = [])).push(e2);
703
- } else null !== f2 && V < f2.length && (remove_reactions(e2, V), f2.length = V);
704
- if (is_runes() && null !== K && !F && null !== f2 && !(6146 & e2.f)) for (p2 = 0; p2 < /** @type {Source[]} */
705
- K.length; p2++) schedule_possible_effect_self_invalidation(
706
- K[p2],
702
+ if (remove_reactions(e2, Z), null !== f2 && Z > 0) for (f2.length = Z + Y.length, p2 = 0; p2 < Y.length; p2++) f2[Z + p2] = Y[p2];
703
+ else e2.deps = f2 = Y;
704
+ if (!te) for (p2 = Z; p2 < f2.length; p2++) ((_a2 = f2[p2]).reactions ?? (_a2.reactions = [])).push(e2);
705
+ } else null !== f2 && Z < f2.length && (remove_reactions(e2, Z), f2.length = Z);
706
+ if (is_runes() && null !== J && !U && null !== f2 && !(6146 & e2.f)) for (p2 = 0; p2 < /** @type {Source[]} */
707
+ J.length; p2++) schedule_possible_effect_self_invalidation(
708
+ J[p2],
707
709
  /** @type {Effect} */
708
710
  e2
709
711
  );
710
- return null !== s2 && Z++, d2;
712
+ return null !== s2 && (ee++, null !== J && (null === o2 ? o2 = J : o2.push(.../** @type {Source[]} */
713
+ J))), d2;
711
714
  } finally {
712
- U = t2, V = n2, K = o2, G = s2, J = i2, R = a2, set_component_context(l2), F = c2;
715
+ Y = t2, Z = n2, J = o2, R = s2, te = i2, K = a2, set_component_context(l2), U = c2, e2.f ^= k;
713
716
  }
714
717
  }
715
718
  function remove_reaction(e2, t2) {
@@ -727,9 +730,9 @@ function remove_reaction(e2, t2) {
727
730
  null === o2 && 2 & t2.f && // Destroying a child effect while updating a parent effect can cause a dependency to appear
728
731
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
729
732
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
730
- (null === U || !U.includes(t2)) && (set_signal_status(t2, m), // If we are working with a derived that is owned by an effect, then mark it as being
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
731
734
  // disconnected.
732
- 768 & t2.f || (t2.f ^= g), // Disconnect any reactions owned by this reaction
735
+ 768 & t2.f || (t2.f ^= v), // Disconnect any reactions owned by this reaction
733
736
  destroy_derived_effects(
734
737
  /** @type {Derived} **/
735
738
  t2
@@ -745,25 +748,25 @@ function remove_reactions(e2, t2) {
745
748
  }
746
749
  function update_effect(t2) {
747
750
  var n2 = t2.f;
748
- if (!(n2 & y)) {
749
- set_signal_status(t2, v);
750
- var o2 = H, s2 = I, i2 = B;
751
- H = t2, B = true;
751
+ if (!(n2 & $)) {
752
+ set_signal_status(t2, h);
753
+ var o2 = V, s2 = O, i2 = G;
754
+ V = t2, G = true;
752
755
  try {
753
756
  16 & n2 ? function destroy_block_effect_children(e2) {
754
757
  for (var t3 = e2.first; null !== t3; ) {
755
758
  var n3 = t3.next;
756
- t3.f & d || destroy_effect(t3), t3 = n3;
759
+ t3.f & f || destroy_effect(t3), t3 = n3;
757
760
  }
758
761
  }(t2) : destroy_effect_children(t2), execute_effect_teardown(t2);
759
762
  var a2 = update_reaction(t2);
760
- t2.teardown = "function" == typeof a2 ? a2 : null, t2.wv = Y;
763
+ t2.teardown = "function" == typeof a2 ? a2 : null, t2.wv = Q;
761
764
  t2.deps;
762
765
  e;
763
766
  } catch (e2) {
764
767
  handle_error(e2, t2, o2, s2 || t2.ctx);
765
768
  } finally {
766
- B = i2, H = o2;
769
+ G = i2, V = o2;
767
770
  }
768
771
  }
769
772
  }
@@ -773,24 +776,24 @@ function infinite_loop_guard() {
773
776
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
774
777
  }();
775
778
  } catch (e2) {
776
- if (null === N) throw e2;
777
- handle_error(e2, N, null);
779
+ if (null === L) throw e2;
780
+ handle_error(e2, L, null);
778
781
  }
779
782
  }
780
783
  function flush_queued_root_effects() {
781
- var e2 = B;
784
+ var e2 = G;
782
785
  try {
783
786
  var t2 = 0;
784
- for (B = true; L.length > 0; ) {
787
+ for (G = true; H.length > 0; ) {
785
788
  t2++ > 1e3 && infinite_loop_guard();
786
- var n2 = L, o2 = n2.length;
787
- L = [];
789
+ var n2 = H, o2 = n2.length;
790
+ H = [];
788
791
  for (var s2 = 0; s2 < o2; s2++) {
789
792
  flush_queued_effects(process_effects(n2[s2]));
790
793
  }
791
794
  }
792
795
  } finally {
793
- j = false, B = e2, N = null;
796
+ A = false, G = e2, L = null, q.clear();
794
797
  }
795
798
  }
796
799
  function flush_queued_effects(e2) {
@@ -816,30 +819,30 @@ function flush_queued_effects(e2) {
816
819
  }
817
820
  }
818
821
  function schedule_effect(e2) {
819
- j || (j = true, queueMicrotask(flush_queued_root_effects));
820
- for (var t2 = N = e2; null !== t2.parent; ) {
822
+ A || (A = true, queueMicrotask(flush_queued_root_effects));
823
+ for (var t2 = L = e2; null !== t2.parent; ) {
821
824
  var n2 = (t2 = t2.parent).f;
822
825
  if (96 & n2) {
823
- if (!(n2 & v)) return;
824
- t2.f ^= v;
826
+ if (!(n2 & h)) return;
827
+ t2.f ^= h;
825
828
  }
826
829
  }
827
- L.push(t2);
830
+ H.push(t2);
828
831
  }
829
832
  function process_effects(e2) {
830
833
  for (var t2 = [], n2 = e2; null !== n2; ) {
831
834
  var o2 = n2.f, s2 = !!(96 & o2);
832
- if (!(s2 && !!(o2 & v) || o2 & b)) {
835
+ if (!(s2 && !!(o2 & h) || o2 & y)) {
833
836
  if (4 & o2) t2.push(n2);
834
- else if (s2) n2.f ^= v;
837
+ else if (s2) n2.f ^= h;
835
838
  else {
836
- var i2 = G;
839
+ var i2 = R;
837
840
  try {
838
- G = n2, check_dirtiness(n2) && update_effect(n2);
841
+ R = n2, check_dirtiness(n2) && update_effect(n2);
839
842
  } catch (e3) {
840
843
  handle_error(e3, n2, null, n2.ctx);
841
844
  } finally {
842
- G = i2;
845
+ R = i2;
843
846
  }
844
847
  }
845
848
  var a2 = n2.first;
@@ -857,12 +860,12 @@ async function tick() {
857
860
  await Promise.resolve(), // By calling flushSync we guarantee that any pending state changes are applied after one tick.
858
861
  // TODO look into whether we can make flushing subsequent updates synchronously in the future.
859
862
  function flushSync(e2) {
860
- for (flush_tasks(); L.length > 0; ) j = true, flush_queued_root_effects(), flush_tasks();
863
+ for (flush_tasks(); H.length > 0; ) A = true, flush_queued_root_effects(), flush_tasks();
861
864
  }();
862
865
  }
863
866
  function get$1(e2) {
864
867
  var t2 = !!(2 & e2.f);
865
- if (null === G || F) {
868
+ if (null === R || U) {
866
869
  if (t2 && /** @type {Derived} */
867
870
  null === e2.deps && /** @type {Derived} */
868
871
  null === e2.effects) {
@@ -870,45 +873,42 @@ function get$1(e2) {
870
873
  /** @type {Derived} */
871
874
  e2
872
875
  ), o2 = n2.parent;
873
- null === o2 || o2.f & _ || // If the derived is owned by another derived then mark it as unowned
876
+ null === o2 || o2.f & g || // If the derived is owned by another derived then mark it as unowned
874
877
  // as the derived value might have been referenced in a different context
875
878
  // since and thus its parent might not be its true owner anymore
876
- (n2.f ^= _);
879
+ (n2.f ^= g);
877
880
  }
878
- } else {
879
- null !== R && R.includes(e2) && function state_unsafe_local_read() {
880
- throw new Error("https://svelte.dev/e/state_unsafe_local_read");
881
- }();
882
- var s2 = G.deps;
883
- e2.rv < Z && (e2.rv = Z, // If the signal is accessing the same dependencies in the same
881
+ } else if (!(K == null ? void 0 : K.includes(e2))) {
882
+ var s2 = R.deps;
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 === U && null !== s2 && s2[V] === e2 ? V++ : null === U ? U = [e2] : J && U.includes(e2) || // Normally we can push duplicated dependencies to `new_deps`, but if we're inside
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
887
887
  // an unowned derived because skip_reaction is true, then we need to ensure that
888
888
  // we don't have duplicates
889
- U.push(e2));
889
+ Y.push(e2));
890
890
  }
891
891
  return t2 && check_dirtiness(n2 = /** @type {Derived} */
892
- e2) && update_derived(n2), e2.v;
892
+ e2) && update_derived(n2), F && q.has(e2) ? q.get(e2) : e2.v;
893
893
  }
894
894
  function untrack(e2) {
895
- var t2 = F;
895
+ var t2 = U;
896
896
  try {
897
- return F = true, e2();
897
+ return U = true, e2();
898
898
  } finally {
899
- F = t2;
899
+ U = t2;
900
900
  }
901
901
  }
902
- const Q = -7169;
902
+ const ne = -7169;
903
903
  function set_signal_status(e2, t2) {
904
- e2.f = e2.f & Q | t2;
904
+ e2.f = e2.f & ne | t2;
905
905
  }
906
906
  function deep_read_state(e2) {
907
907
  if ("object" == typeof e2 && e2 && !(e2 instanceof EventTarget)) {
908
- if (w in e2) deep_read(e2);
908
+ if (C in e2) deep_read(e2);
909
909
  else if (!Array.isArray(e2)) for (let t2 in e2) {
910
910
  const n2 = e2[t2];
911
- "object" == typeof n2 && n2 && w in n2 && deep_read(n2);
911
+ "object" == typeof n2 && n2 && C in n2 && deep_read(n2);
912
912
  }
913
913
  }
914
914
  }
@@ -937,11 +937,11 @@ function deep_read(e2, t2 = /* @__PURE__ */ new Set()) {
937
937
  function is_capture_event(e2) {
938
938
  return e2.endsWith("capture") && "gotpointercapture" !== e2 && "lostpointercapture" !== e2;
939
939
  }
940
- const ee = ["beforeinput", "click", "change", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"];
940
+ const re = ["beforeinput", "click", "change", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"];
941
941
  function is_delegated(e2) {
942
- return ee.includes(e2);
942
+ return re.includes(e2);
943
943
  }
944
- const te = {
944
+ const oe = {
945
945
  // no `class: 'className'` because we handle that separately
946
946
  formnovalidate: "formNoValidate",
947
947
  ismap: "isMap",
@@ -957,11 +957,11 @@ const te = {
957
957
  disableremoteplayback: "disableRemotePlayback"
958
958
  };
959
959
  function normalize_attribute(e2) {
960
- return e2 = e2.toLowerCase(), te[e2] ?? e2;
960
+ return e2 = e2.toLowerCase(), oe[e2] ?? e2;
961
961
  }
962
- const ne = ["touchstart", "touchmove"];
962
+ const se = ["touchstart", "touchmove"];
963
963
  function is_passive_event(e2) {
964
- return ne.includes(e2);
964
+ return se.includes(e2);
965
965
  }
966
966
  function autofocus(e2, t2) {
967
967
  if (t2) {
@@ -971,9 +971,9 @@ function autofocus(e2, t2) {
971
971
  });
972
972
  }
973
973
  }
974
- let re = false;
974
+ let ie = false;
975
975
  function without_reactive_context(e2) {
976
- var t2 = G, n2 = H;
976
+ var t2 = R, n2 = V;
977
977
  set_active_reaction(null), set_active_effect(null);
978
978
  try {
979
979
  return e2();
@@ -987,7 +987,7 @@ function listen_to_event_and_reset_event(e2, t2, n2, o2 = n2) {
987
987
  e2.__on_r = s2 ? () => {
988
988
  s2(), o2(true);
989
989
  } : () => o2(true), function add_form_reset_listener() {
990
- re || (re = true, document.addEventListener(
990
+ ie || (ie = true, document.addEventListener(
991
991
  "reset",
992
992
  (e3) => {
993
993
  Promise.resolve().then(() => {
@@ -1007,7 +1007,7 @@ function listen_to_event_and_reset_event(e2, t2, n2, o2 = n2) {
1007
1007
  ));
1008
1008
  }();
1009
1009
  }
1010
- const oe = /* @__PURE__ */ new Set(), se = /* @__PURE__ */ new Set();
1010
+ const ae = /* @__PURE__ */ new Set(), le = /* @__PURE__ */ new Set();
1011
1011
  function create_event(e2, t2, n2, o2 = {}) {
1012
1012
  function target_handler(e3) {
1013
1013
  if (o2.capture || // Only call in the bubble phase, else delegated events would be called before the capturing events
@@ -1027,8 +1027,8 @@ function event(e2, t2, n2, o2, s2) {
1027
1027
  });
1028
1028
  }
1029
1029
  function delegate(e2) {
1030
- for (var t2 = 0; t2 < e2.length; t2++) oe.add(e2[t2]);
1031
- for (var n2 of se) n2(e2);
1030
+ for (var t2 = 0; t2 < e2.length; t2++) ae.add(e2[t2]);
1031
+ for (var n2 of le) n2(e2);
1032
1032
  }
1033
1033
  function handle_event_propagation(e2) {
1034
1034
  var _a2;
@@ -1055,7 +1055,7 @@ function handle_event_propagation(e2) {
1055
1055
  configurable: true,
1056
1056
  get: () => l2 || o2
1057
1057
  });
1058
- var p2 = G, _2 = H;
1058
+ var p2 = R, _2 = V;
1059
1059
  set_active_reaction(null), set_active_effect(null);
1060
1060
  try {
1061
1061
  for (var g2, v2 = []; null !== l2; ) {
@@ -1096,7 +1096,7 @@ function create_fragment_from_html(e2) {
1096
1096
  function assign_nodes(e2, t2) {
1097
1097
  var n2 = (
1098
1098
  /** @type {Effect} */
1099
- H
1099
+ V
1100
1100
  );
1101
1101
  null === n2.nodes_start && (n2.nodes_start = e2, n2.nodes_end = t2);
1102
1102
  }
@@ -1108,7 +1108,7 @@ function template(e2, t2) {
1108
1108
  /* @__PURE__ */ get_first_child(n2)));
1109
1109
  var t3 = (
1110
1110
  /** @type {TemplateNode} */
1111
- s2 || q ? document.importNode(n2, true) : n2.cloneNode(true)
1111
+ s2 || z ? document.importNode(n2, true) : n2.cloneNode(true)
1112
1112
  );
1113
1113
  o2 ? assign_nodes(
1114
1114
  /** @type {TemplateNode} */
@@ -1155,9 +1155,9 @@ function append(e2, t2) {
1155
1155
  t2
1156
1156
  );
1157
1157
  }
1158
- let ie = true;
1158
+ let ce = true;
1159
1159
  function set_should_intro(e2) {
1160
- ie = e2;
1160
+ ce = e2;
1161
1161
  }
1162
1162
  function set_text(e2, t2) {
1163
1163
  var n2 = null == t2 ? "" : "object" == typeof t2 ? t2 + "" : t2;
@@ -1171,18 +1171,18 @@ function mount(e2, t2) {
1171
1171
  * where these globals are not available while avoiding a separate server entry point
1172
1172
  */
1173
1173
  function init_operations() {
1174
- if (void 0 === T) {
1175
- T = window, O = document, q = /Firefox/.test(navigator.userAgent);
1176
- var e4 = Element.prototype, t4 = Node.prototype;
1177
- P = i(t4, "firstChild").get, // @ts-ignore
1178
- z = i(t4, "nextSibling").get, // the following assignments improve perf of lookups on DOM nodes
1174
+ if (void 0 === P) {
1175
+ P = window, D = document, z = /Firefox/.test(navigator.userAgent);
1176
+ var e4 = Element.prototype, t4 = Node.prototype, n3 = Text.prototype;
1177
+ E = i(t4, "firstChild").get, // @ts-ignore
1178
+ W = i(t4, "nextSibling").get, d(e4) && // the following assignments improve perf of lookups on DOM nodes
1179
1179
  // @ts-expect-error
1180
- e4.__click = void 0, // @ts-expect-error
1180
+ (e4.__click = void 0, // @ts-expect-error
1181
1181
  e4.__className = void 0, // @ts-expect-error
1182
1182
  e4.__attributes = null, // @ts-expect-error
1183
1183
  e4.__style = void 0, // @ts-expect-error
1184
- e4.__e = void 0, // @ts-expect-error
1185
- Text.prototype.__t = void 0;
1184
+ e4.__e = void 0), d(n3) && // @ts-expect-error
1185
+ (n3.__t = void 0);
1186
1186
  }
1187
1187
  }();
1188
1188
  var u2 = /* @__PURE__ */ new Set(), event_handle = (e4) => {
@@ -1194,26 +1194,26 @@ function mount(e2, t2) {
1194
1194
  t3.addEventListener(o2, handle_event_propagation, {
1195
1195
  passive: s3
1196
1196
  });
1197
- var i2 = ae.get(o2);
1197
+ var i2 = ue.get(o2);
1198
1198
  void 0 === i2 ? (
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
1201
  (document.addEventListener(o2, handle_event_propagation, {
1202
1202
  passive: s3
1203
- }), ae.set(o2, 1))
1204
- ) : ae.set(o2, i2 + 1);
1203
+ }), ue.set(o2, 1))
1204
+ ) : ue.set(o2, i2 + 1);
1205
1205
  }
1206
1206
  }
1207
1207
  };
1208
- event_handle(o(oe)), se.add(event_handle);
1209
- var d2 = void 0, p2 = (
1208
+ event_handle(o(ae)), le.add(event_handle);
1209
+ var f2 = void 0, _2 = (
1210
1210
  /**
1211
1211
  * An effect root whose children can transition out
1212
1212
  * @param {() => void} fn
1213
1213
  * @returns {(options?: { outro?: boolean }) => Promise<void>}
1214
1214
  */
1215
1215
  function component_root(e4) {
1216
- const t4 = create_effect(f, e4, true);
1216
+ const t4 = create_effect(p, e4, true);
1217
1217
  return (e5 = {}) => new Promise((n3) => {
1218
1218
  e5.outro ? pause_effect(t4, () => {
1219
1219
  destroy_effect(t4), n3(void 0);
@@ -1223,32 +1223,32 @@ function mount(e2, t2) {
1223
1223
  var o2 = n2 ?? t3.appendChild(create_text());
1224
1224
  return branch(() => {
1225
1225
  l2 && (push({}), /** @type {ComponentContext} */
1226
- I.c = l2);
1226
+ O.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), ie = c2, // @ts-expect-error the public typings are not what the actual function looks like
1230
- d2 = e3(o2, s2) || {}, ie = true, l2 && pop();
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();
1231
1231
  }), () => {
1232
1232
  var _a2;
1233
1233
  for (var e4 of u2) {
1234
1234
  t3.removeEventListener(e4, handle_event_propagation);
1235
1235
  var s3 = (
1236
1236
  /** @type {number} */
1237
- ae.get(e4)
1237
+ ue.get(e4)
1238
1238
  );
1239
- 0 == --s3 ? (document.removeEventListener(e4, handle_event_propagation), ae.delete(e4)) : ae.set(e4, s3);
1239
+ 0 == --s3 ? (document.removeEventListener(e4, handle_event_propagation), ue.delete(e4)) : ue.set(e4, s3);
1240
1240
  }
1241
- se.delete(event_handle), o2 !== n2 && ((_a2 = o2.parentNode) == null ? void 0 : _a2.removeChild(o2));
1241
+ le.delete(event_handle), o2 !== n2 && ((_a2 = o2.parentNode) == null ? void 0 : _a2.removeChild(o2));
1242
1242
  };
1243
1243
  })
1244
1244
  );
1245
- return le.set(d2, p2), d2;
1245
+ return de.set(f2, _2), f2;
1246
1246
  }(e2, t2);
1247
1247
  }
1248
- const ae = /* @__PURE__ */ new Map();
1249
- let le = /* @__PURE__ */ new WeakMap();
1248
+ const ue = /* @__PURE__ */ new Map();
1249
+ let de = /* @__PURE__ */ new WeakMap();
1250
1250
  function if_block(e2, t2, [n2, o2] = [0, 0]) {
1251
- var s2 = e2, i2 = null, a2 = null, l2 = M, c2 = false;
1251
+ var s2 = e2, i2 = null, a2 = null, l2 = T, c2 = false;
1252
1252
  const set_branch = (e3, t3 = true) => {
1253
1253
  c2 = true, update_branch(t3, e3);
1254
1254
  }, update_branch = (e3, t3) => {
@@ -1260,11 +1260,11 @@ function if_block(e2, t2, [n2, o2] = [0, 0]) {
1260
1260
  };
1261
1261
  block(() => {
1262
1262
  c2 = false, t2(set_branch), c2 || update_branch(null, null);
1263
- }, n2 > 0 ? $ : 0);
1263
+ }, n2 > 0 ? w : 0);
1264
1264
  }
1265
- let ce = null;
1265
+ let fe = null;
1266
1266
  function set_current_each_item(e2) {
1267
- ce = e2;
1267
+ fe = e2;
1268
1268
  }
1269
1269
  function index(e2, t2) {
1270
1270
  return t2;
@@ -1297,37 +1297,37 @@ function each(e2, n2, s2, i2, a2, l2 = null) {
1297
1297
  */
1298
1298
  function reconcile(e4, t3, n3, s3, i3, 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, y2 = t3.first, $2 = y2, x2 = null, w2 = [], k2 = [];
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 = [];
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 & b && (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, 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) {
1304
1304
  if (void 0 !== c3 && c3.has(p3)) {
1305
- if (w2.length < k2.length) {
1306
- var C2, S2 = k2[0];
1307
- x2 = S2.prev;
1308
- var M2 = w2[0], I2 = w2[w2.length - 1];
1309
- for (C2 = 0; C2 < w2.length; C2 += 1) move(w2[C2], S2, n3);
1305
+ if (x2.length < k2.length) {
1306
+ var C2, M2 = k2[0];
1307
+ w2 = M2.prev;
1308
+ var S2 = x2[0], I2 = x2[x2.length - 1];
1309
+ for (C2 = 0; C2 < x2.length; C2 += 1) move(x2[C2], M2, n3);
1310
1310
  for (C2 = 0; C2 < k2.length; C2 += 1) c3.delete(k2[C2]);
1311
- link(t3, M2.prev, I2.next), link(t3, x2, M2), link(t3, I2, S2), $2 = S2, x2 = I2, _2 -= 1, w2 = [], k2 = [];
1311
+ link(t3, S2.prev, I2.next), link(t3, w2, S2), link(t3, I2, M2), $2 = M2, w2 = I2, _2 -= 1, x2 = [], k2 = [];
1312
1312
  } else
1313
- c3.delete(p3), move(p3, $2, n3), link(t3, p3.prev, p3.next), link(t3, p3, null === x2 ? t3.first : x2.next), link(t3, x2, p3), x2 = p3;
1313
+ c3.delete(p3), move(p3, $2, n3), link(t3, p3.prev, p3.next), link(t3, p3, null === w2 ? t3.first : w2.next), link(t3, w2, p3), w2 = p3;
1314
1314
  continue;
1315
1315
  }
1316
- for (w2 = [], k2 = []; null !== $2 && $2.k !== f3; )
1317
- $2.e.f & b || (c3 ?? (c3 = /* @__PURE__ */ new Set())).add($2), k2.push($2), $2 = $2.next;
1316
+ for (x2 = [], k2 = []; null !== $2 && $2.k !== f3; )
1317
+ $2.e.f & y || (c3 ?? (c3 = /* @__PURE__ */ new Set())).add($2), k2.push($2), $2 = $2.next;
1318
1318
  if (null === $2) continue;
1319
1319
  p3 = $2;
1320
1320
  }
1321
- w2.push(p3), x2 = p3, $2 = p3.next;
1321
+ x2.push(p3), w2 = p3, $2 = p3.next;
1322
1322
  } else {
1323
- x2 = create_item($2 ? (
1323
+ w2 = create_item($2 ? (
1324
1324
  /** @type {TemplateNode} */
1325
1325
  $2.e.nodes_start
1326
- ) : n3, t3, x2, null === x2 ? t3.first : x2.next, d3, f3, _2, s3, i3, l3), m2.set(f3, x2), w2 = [], k2 = [], $2 = x2.next;
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;
1327
1327
  }
1328
1328
  if (null !== $2 || void 0 !== c3) {
1329
1329
  for (var T2 = void 0 === c3 ? [] : o(c3); null !== $2; )
1330
- $2.e.f & b || T2.push($2), $2 = $2.next;
1330
+ $2.e.f & y || T2.push($2), $2 = $2.next;
1331
1331
  var O2 = T2.length;
1332
1332
  if (O2 > 0) {
1333
1333
  var q2 = 4 & i3 && 0 === h2 ? n3 : null;
@@ -1364,8 +1364,8 @@ function each(e2, n2, s2, i2, a2, l2 = null) {
1364
1364
  var _a3;
1365
1365
  if (void 0 !== u3) for (p3 of u3) (_a3 = p3.a) == null ? void 0 : _a3.apply();
1366
1366
  });
1367
- H.first = t3.first && t3.first.e, /** @type {Effect} */
1368
- H.last = x2 && x2.e;
1367
+ V.first = t3.first && t3.first.e, /** @type {Effect} */
1368
+ V.last = w2 && w2.e;
1369
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, () => {
1370
1370
  d2 = null;
1371
1371
  })), // When we mount the each block for the first time, the collection won't be
@@ -1385,7 +1385,7 @@ function update_item(e2, t2, n2, o2) {
1385
1385
  ) : e2.i = n2;
1386
1386
  }
1387
1387
  function create_item(e2, t2, n2, o2, s2, i2, a2, l2, c2, u2) {
1388
- var d2 = ce, f2 = !!(1 & c2) ? !(16 & c2) ? /* @__PURE__ */ mutable_source(s2) : source(s2) : s2, p2 = 2 & c2 ? source(a2) : a2, _2 = {
1388
+ var d2 = fe, f2 = !!(1 & c2) ? !(16 & c2) ? /* @__PURE__ */ mutable_source(s2) : source(s2) : s2, p2 = 2 & c2 ? source(a2) : a2, _2 = {
1389
1389
  i: p2,
1390
1390
  v: f2,
1391
1391
  k: i2,
@@ -1395,11 +1395,11 @@ function create_item(e2, t2, n2, o2, s2, i2, a2, l2, c2, u2) {
1395
1395
  prev: n2,
1396
1396
  next: o2
1397
1397
  };
1398
- ce = _2;
1398
+ fe = _2;
1399
1399
  try {
1400
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;
1401
1401
  } finally {
1402
- ce = d2;
1402
+ fe = d2;
1403
1403
  }
1404
1404
  }
1405
1405
  function move(e2, t2, n2) {
@@ -1432,7 +1432,7 @@ function component(e2, t2, n2) {
1432
1432
  var o2, s2, i2 = e2;
1433
1433
  block(() => {
1434
1434
  o2 !== (o2 = t2()) && (s2 && (pause_effect(s2), s2 = null), o2 && (s2 = branch(() => n2(i2, o2))));
1435
- }, $);
1435
+ }, w);
1436
1436
  }
1437
1437
  function r(e2) {
1438
1438
  var t2, n2, o2 = "";
@@ -1449,7 +1449,7 @@ function clsx(e2) {
1449
1449
  return o2;
1450
1450
  }(e2) : e2 ?? "";
1451
1451
  }
1452
- const ue = [..." \n\r\f \v\uFEFF"];
1452
+ const pe = [..." \n\r\f \v\uFEFF"];
1453
1453
  function append_styles(e2, t2 = false) {
1454
1454
  var n2 = t2 ? " !important;" : ";", o2 = "";
1455
1455
  for (var s2 in e2) {
@@ -1462,23 +1462,24 @@ function to_css_name(e2) {
1462
1462
  return "-" !== e2[0] || "-" !== e2[1] ? e2.toLowerCase() : e2;
1463
1463
  }
1464
1464
  function set_class(e2, t2, n2, o2, s2, i2) {
1465
- if (e2.__className !== n2) {
1466
- var a2 = function to_class(e3, t3, n3) {
1465
+ var a2 = e2.__className;
1466
+ if (a2 !== n2 || void 0 === a2) {
1467
+ var l2 = function to_class(e3, t3, n3) {
1467
1468
  var o3 = null == e3 ? "" : "" + e3;
1468
1469
  if (t3 && (o3 = o3 ? o3 + " " + t3 : t3), n3) {
1469
1470
  for (var s3 in n3) if (n3[s3]) o3 = o3 ? o3 + " " + s3 : s3;
1470
1471
  else if (o3.length) for (var i3 = s3.length, a3 = 0; (a3 = o3.indexOf(s3, a3)) >= 0; ) {
1471
1472
  var l3 = a3 + i3;
1472
- 0 !== a3 && !ue.includes(o3[a3 - 1]) || l3 !== o3.length && !ue.includes(o3[l3]) ? a3 = l3 : o3 = (0 === a3 ? "" : o3.substring(0, a3)) + o3.substring(l3 + 1);
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);
1473
1474
  }
1474
1475
  }
1475
1476
  return "" === o3 ? null : o3;
1476
1477
  }(n2, o2, i2);
1477
- null == a2 ? e2.removeAttribute("class") : t2 ? e2.className = a2 : e2.setAttribute("class", a2), // @ts-expect-error need to add __className to patched prototype
1478
+ null == l2 ? e2.removeAttribute("class") : t2 ? e2.className = l2 : e2.setAttribute("class", l2), // @ts-expect-error need to add __className to patched prototype
1478
1479
  e2.__className = n2;
1479
- } else if (i2 && s2 !== i2) for (var l2 in i2) {
1480
- var c2 = !!i2[l2];
1481
- null != s2 && c2 === !!s2[l2] || e2.classList.toggle(l2, c2);
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);
1482
1483
  }
1483
1484
  return i2;
1484
1485
  }
@@ -1522,7 +1523,7 @@ function set_style(e2, t2, n2, o2) {
1522
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));
1523
1524
  return o2;
1524
1525
  }
1525
- const de = Symbol("class"), fe = Symbol("style"), pe = Symbol("is custom element"), _e = Symbol("is html");
1526
+ const _e = Symbol("class"), ge = Symbol("style"), ve = Symbol("is custom element"), he = Symbol("is html");
1526
1527
  function set_selected(e2, t2) {
1527
1528
  t2 ? (
1528
1529
  // The selected option could've changed via user selection, and
@@ -1533,15 +1534,15 @@ function set_selected(e2, t2) {
1533
1534
  function set_attribute(e2, t2, n2, o2) {
1534
1535
  var s2 = get_attributes(e2);
1535
1536
  s2[t2] !== (s2[t2] = n2) && ("loading" === t2 && // @ts-expect-error
1536
- (e2[C] = n2), null == n2 ? e2.removeAttribute(t2) : "string" != typeof n2 && get_setters(e2).includes(t2) ? (
1537
+ (e2[S] = n2), null == n2 ? e2.removeAttribute(t2) : "string" != typeof n2 && get_setters(e2).includes(t2) ? (
1537
1538
  // @ts-ignore
1538
1539
  e2[t2] = n2
1539
1540
  ) : e2.setAttribute(t2, n2));
1540
1541
  }
1541
1542
  function set_attributes(e2, t2, n2, o2, s2 = false) {
1542
- var i2 = get_attributes(e2), a2 = i2[pe], l2 = !i2[_e], c2 = t2 || {}, u2 = "OPTION" === e2.tagName;
1543
+ var i2 = get_attributes(e2), a2 = i2[ve], l2 = !i2[he], c2 = t2 || {}, u2 = "OPTION" === e2.tagName;
1543
1544
  for (var d2 in t2) d2 in n2 || (n2[d2] = null);
1544
- n2.class ? n2.class = clsx(n2.class) : (o2 || n2[de]) && (n2.class = null), n2[fe] && (n2.style ?? (n2.style = null));
1545
+ n2.class ? n2.class = clsx(n2.class) : (o2 || n2[_e]) && (n2.class = null), n2[ge] && (n2.style ?? (n2.style = null));
1545
1546
  var f2 = get_setters(e2);
1546
1547
  for (const m2 in n2) {
1547
1548
  let b2 = n2[m2];
@@ -1554,22 +1555,22 @@ function set_attributes(e2, t2, n2, o2, s2 = false) {
1554
1555
  var _2 = m2[0] + m2[1];
1555
1556
  if ("$$" !== _2) if ("on" === _2) {
1556
1557
  const y2 = {}, $2 = "$$" + m2;
1557
- let x2 = m2.slice(2);
1558
- var g2 = is_delegated(x2);
1559
- if (is_capture_event(x2) && (x2 = x2.slice(0, -7), y2.capture = true), !g2 && p2) {
1558
+ let w2 = m2.slice(2);
1559
+ var g2 = is_delegated(w2);
1560
+ if (is_capture_event(w2) && (w2 = w2.slice(0, -7), y2.capture = true), !g2 && p2) {
1560
1561
  if (null != b2) continue;
1561
- e2.removeEventListener(x2, c2[$2], y2), c2[$2] = null;
1562
+ e2.removeEventListener(w2, c2[$2], y2), c2[$2] = null;
1562
1563
  }
1563
1564
  if (null != b2) if (g2)
1564
- e2[`__${x2}`] = b2, delegate([x2]);
1565
+ e2[`__${w2}`] = b2, delegate([w2]);
1565
1566
  else {
1566
1567
  let handle = function(e3) {
1567
1568
  c2[m2].call(this, e3);
1568
1569
  };
1569
- c2[$2] = create_event(x2, e2, handle, y2);
1570
+ c2[$2] = create_event(w2, e2, handle, y2);
1570
1571
  }
1571
1572
  else g2 && // @ts-ignore
1572
- (e2[`__${x2}`] = void 0);
1573
+ (e2[`__${w2}`] = void 0);
1573
1574
  } else if ("style" === m2)
1574
1575
  set_attribute(e2, m2, b2);
1575
1576
  else if ("autofocus" === m2) autofocus(
@@ -1591,47 +1592,47 @@ function set_attributes(e2, t2, n2, o2, s2 = false) {
1591
1592
  e2[v2] = b2
1592
1593
  ) : "function" != typeof b2 && set_attribute(e2, v2, b2);
1593
1594
  else if (i2[m2] = null, "value" === v2 || "checked" === v2) {
1594
- let w2 = (
1595
+ let x2 = (
1595
1596
  /** @type {HTMLInputElement} */
1596
1597
  e2
1597
1598
  );
1598
1599
  const k2 = void 0 === t2;
1599
1600
  if ("value" === v2) {
1600
- let C2 = w2.defaultValue;
1601
- w2.removeAttribute(v2), w2.defaultValue = C2, // @ts-ignore
1602
- w2.value = w2.__value = k2 ? C2 : null;
1601
+ let C2 = x2.defaultValue;
1602
+ x2.removeAttribute(v2), x2.defaultValue = C2, // @ts-ignore
1603
+ x2.value = x2.__value = k2 ? C2 : null;
1603
1604
  } else {
1604
- let S2 = w2.defaultChecked;
1605
- w2.removeAttribute(v2), w2.defaultChecked = S2, w2.checked = !!k2 && S2;
1605
+ let M2 = x2.defaultChecked;
1606
+ x2.removeAttribute(v2), x2.defaultChecked = M2, x2.checked = !!k2 && M2;
1606
1607
  }
1607
1608
  } else e2.removeAttribute(m2);
1608
1609
  }
1609
1610
  else
1610
1611
  e2.value = e2.__value = b2;
1611
1612
  }
1612
- } else set_style(e2, b2, t2 == null ? void 0 : t2[fe], n2[fe]), c2[m2] = b2, c2[fe] = n2[fe];
1613
- else set_class(e2, "http://www.w3.org/1999/xhtml" === e2.namespaceURI, b2, o2, t2 == null ? void 0 : t2[de], n2[de]), c2[m2] = b2, c2[de] = n2[de];
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
1615
  }
1615
1616
  return c2;
1616
1617
  }
1617
1618
  function get_attributes(e2) {
1618
1619
  return e2.__attributes ?? (e2.__attributes = {
1619
- [pe]: e2.nodeName.includes("-"),
1620
- [_e]: "http://www.w3.org/1999/xhtml" === e2.namespaceURI
1620
+ [ve]: e2.nodeName.includes("-"),
1621
+ [he]: "http://www.w3.org/1999/xhtml" === e2.namespaceURI
1621
1622
  });
1622
1623
  }
1623
- var ge = /* @__PURE__ */ new Map();
1624
+ var me = /* @__PURE__ */ new Map();
1624
1625
  function get_setters(e2) {
1625
- var t2, n2 = ge.get(e2.nodeName);
1626
+ var t2, n2 = me.get(e2.nodeName);
1626
1627
  if (n2) return n2;
1627
- ge.set(e2.nodeName, n2 = []);
1628
+ me.set(e2.nodeName, n2 = []);
1628
1629
  for (var o2 = e2, s2 = Element.prototype; s2 !== o2; ) {
1629
1630
  for (var i2 in t2 = a(o2)) t2[i2].set && n2.push(i2);
1630
1631
  o2 = u(o2);
1631
1632
  }
1632
1633
  return n2;
1633
1634
  }
1634
- const ve = {
1635
+ const be = {
1635
1636
  // don't access requestAnimationFrame eagerly outside method
1636
1637
  // this allows basic testing of user code without JSDOM
1637
1638
  // bunder will eval and remove ternary when the user's app is built
@@ -1643,10 +1644,10 @@ const ve = {
1643
1644
  tasks: /* @__PURE__ */ new Set()
1644
1645
  };
1645
1646
  function run_tasks() {
1646
- const e2 = ve.now();
1647
- ve.tasks.forEach((t2) => {
1648
- t2.c(e2) || (ve.tasks.delete(t2), t2.f());
1649
- }), 0 !== ve.tasks.size && ve.tick(run_tasks);
1647
+ const e2 = be.now();
1648
+ be.tasks.forEach((t2) => {
1649
+ t2.c(e2) || (be.tasks.delete(t2), t2.f());
1650
+ }), 0 !== be.tasks.size && be.tick(run_tasks);
1650
1651
  }
1651
1652
  function dispatch_event(e2, t2) {
1652
1653
  without_reactive_context(() => {
@@ -1676,7 +1677,7 @@ const linear = (e2) => e2;
1676
1677
  function transition(e2, t2, n2, o2) {
1677
1678
  var s2, i2, a2, l2 = !!(4 & e2), c2 = t2.inert, u2 = t2.style.overflow;
1678
1679
  function get_options() {
1679
- var e3 = G, i3 = H;
1680
+ var e3 = R, i3 = V;
1680
1681
  set_active_reaction(null), set_active_effect(null);
1681
1682
  try {
1682
1683
  return s2 ?? (s2 = n2()(t2, (o2 == null ? void 0 : o2()) ?? /** @type {P} */
@@ -1705,15 +1706,15 @@ function transition(e2, t2, n2, o2) {
1705
1706
  }
1706
1707
  }, f2 = (
1707
1708
  /** @type {Effect} */
1708
- H
1709
+ V
1709
1710
  );
1710
- if ((f2.transitions ?? (f2.transitions = [])).push(d2), ie) {
1711
+ if ((f2.transitions ?? (f2.transitions = [])).push(d2), ce) {
1711
1712
  var p2 = l2;
1712
1713
  if (!p2) {
1713
1714
  for (var _2 = (
1714
1715
  /** @type {Effect | null} */
1715
1716
  f2.parent
1716
- ); _2 && _2.f & $; ) for (; (_2 = _2.parent) && !(16 & _2.f); ) ;
1717
+ ); _2 && _2.f & w; ) for (; (_2 = _2.parent) && !(16 & _2.f); ) ;
1717
1718
  p2 = !_2 || !!(32768 & _2.f);
1718
1719
  }
1719
1720
  p2 && effect(() => {
@@ -1780,15 +1781,15 @@ function animate(e2, t2, n2, o2, s2) {
1780
1781
  return i3 + a3 * f2(e3 / l3);
1781
1782
  }, d2 && function loop(e3) {
1782
1783
  let t3;
1783
- return 0 === ve.tasks.size && ve.tick(run_tasks), {
1784
+ return 0 === be.tasks.size && be.tick(run_tasks), {
1784
1785
  promise: new Promise((n3) => {
1785
- ve.tasks.add(t3 = {
1786
+ be.tasks.add(t3 = {
1786
1787
  c: e3,
1787
1788
  f: n3
1788
1789
  });
1789
1790
  }),
1790
1791
  abort() {
1791
- ve.tasks.delete(t3);
1792
+ be.tasks.delete(t3);
1792
1793
  }
1793
1794
  };
1794
1795
  }(() => {
@@ -1867,11 +1868,11 @@ r_fn = function() {
1867
1868
  /** @static */
1868
1869
  __publicField(_ResizeObserverSingleton, "entries", /* @__PURE__ */ new WeakMap());
1869
1870
  let ResizeObserverSingleton = _ResizeObserverSingleton;
1870
- var he = new ResizeObserverSingleton({
1871
+ var ye = new ResizeObserverSingleton({
1871
1872
  box: "border-box"
1872
1873
  });
1873
1874
  function is_bound_this(e2, t2) {
1874
- return e2 === t2 || (e2 == null ? void 0 : e2[w]) === t2;
1875
+ return e2 === t2 || (e2 == null ? void 0 : e2[C]) === t2;
1875
1876
  }
1876
1877
  function bind_this(e2 = {}, t2, n2, o2) {
1877
1878
  return effect(() => {
@@ -1893,7 +1894,7 @@ function bind_this(e2 = {}, t2, n2, o2) {
1893
1894
  function init(e2 = false) {
1894
1895
  const t2 = (
1895
1896
  /** @type {ComponentContextLegacy} */
1896
- I
1897
+ O
1897
1898
  ), n2 = t2.l.u;
1898
1899
  if (!n2) return;
1899
1900
  let props = () => deep_read_state(t2.s);
@@ -1939,17 +1940,17 @@ function subscribe_to_store(e2, t2, n2) {
1939
1940
  ));
1940
1941
  return o2.unsubscribe ? () => o2.unsubscribe() : o2;
1941
1942
  }
1942
- const me = [];
1943
+ const $e = [];
1943
1944
  function writable(e2, t2 = noop) {
1944
1945
  let n2 = null;
1945
1946
  const o2 = /* @__PURE__ */ new Set();
1946
1947
  function set2(t3) {
1947
1948
  if (safe_not_equal(e2, t3) && (e2 = t3, n2)) {
1948
- const t4 = !me.length;
1949
- for (const t5 of o2) t5[1](), me.push(t5, e2);
1949
+ const t4 = !$e.length;
1950
+ for (const t5 of o2) t5[1](), $e.push(t5, e2);
1950
1951
  if (t4) {
1951
- for (let e3 = 0; e3 < me.length; e3 += 2) me[e3][0](me[e3 + 1]);
1952
- me.length = 0;
1952
+ for (let e3 = 0; e3 < $e.length; e3 += 2) $e[e3][0]($e[e3 + 1]);
1953
+ $e.length = 0;
1953
1954
  }
1954
1955
  }
1955
1956
  }
@@ -1977,14 +1978,14 @@ function get(e2) {
1977
1978
  let t2;
1978
1979
  return subscribe_to_store(e2, (e3) => t2 = e3)(), t2;
1979
1980
  }
1980
- let be = false, ye = Symbol();
1981
+ let we = false, xe = Symbol();
1981
1982
  function store_get(e2, t2, n2) {
1982
1983
  const o2 = n2[t2] ?? (n2[t2] = {
1983
1984
  store: null,
1984
1985
  source: /* @__PURE__ */ mutable_source(void 0),
1985
1986
  unsubscribe: noop
1986
1987
  });
1987
- if (o2.store !== e2 && !(ye in n2)) if (o2.unsubscribe(), o2.store = e2 ?? null, null == e2) o2.source.v = void 0, // see synchronous callback comment below
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
1988
1989
  o2.unsubscribe = noop;
1989
1990
  else {
1990
1991
  var s2 = true;
@@ -1996,7 +1997,7 @@ function store_get(e2, t2, n2) {
1996
1997
  ) : set(o2.source, e3);
1997
1998
  }), s2 = false;
1998
1999
  }
1999
- return e2 && ye in n2 ? get(e2) : get$1(o2.source);
2000
+ return e2 && xe in n2 ? get(e2) : get$1(o2.source);
2000
2001
  }
2001
2002
  function store_set(e2, t2) {
2002
2003
  return e2.set(t2), t2;
@@ -2008,14 +2009,14 @@ function setup_stores() {
2008
2009
  for (var t2 in e2) {
2009
2010
  e2[t2].unsubscribe();
2010
2011
  }
2011
- s(e2, ye, {
2012
+ s(e2, xe, {
2012
2013
  enumerable: false,
2013
2014
  value: true
2014
2015
  });
2015
2016
  });
2016
2017
  }];
2017
2018
  }
2018
- const $e = {
2019
+ const ke = {
2019
2020
  get(e2, t2) {
2020
2021
  if (!e2.exclude.includes(t2)) return get$1(e2.version), t2 in e2.special ? e2.special[t2]() : e2.props[t2];
2021
2022
  },
@@ -2051,9 +2052,9 @@ function legacy_rest_props(e2, t2) {
2051
2052
  exclude: t2,
2052
2053
  special: {},
2053
2054
  version: source(0)
2054
- }, $e);
2055
+ }, ke);
2055
2056
  }
2056
- const xe = {
2057
+ const Ce = {
2057
2058
  get(e2, t2) {
2058
2059
  let n2 = e2.props.length;
2059
2060
  for (; n2--; ) {
@@ -2085,7 +2086,7 @@ const xe = {
2085
2086
  }
2086
2087
  },
2087
2088
  has(e2, t2) {
2088
- if (t2 === w || t2 === k) return false;
2089
+ if (t2 === C || t2 === M) return false;
2089
2090
  for (let n2 of e2.props) if (is_function(n2) && (n2 = n2()), null != n2 && t2 in n2) return true;
2090
2091
  return false;
2091
2092
  },
@@ -2101,24 +2102,28 @@ const xe = {
2101
2102
  function spread_props(...e2) {
2102
2103
  return new Proxy({
2103
2104
  props: e2
2104
- }, xe);
2105
+ }, Ce);
2106
+ }
2107
+ function has_destroyed_component_ctx(e2) {
2108
+ var _a2;
2109
+ return ((_a2 = e2.ctx) == null ? void 0 : _a2.d) ?? false;
2105
2110
  }
2106
2111
  function prop(e2, t2, n2, o2) {
2107
2112
  var _a2;
2108
- var s2, a2 = !!(1 & n2), l2 = !S || !!(2 & n2), c2 = !!(8 & n2), u2 = !!(16 & n2), d2 = false;
2113
+ var s2, a2 = !!(1 & n2), l2 = !I || !!(2 & n2), c2 = !!(8 & n2), u2 = !!(16 & n2), d2 = false;
2109
2114
  c2 ? [s2, d2] = function capture_store_binding(e3) {
2110
- var t3 = be;
2115
+ var t3 = we;
2111
2116
  try {
2112
- return be = false, [e3(), be];
2117
+ return we = false, [e3(), we];
2113
2118
  } finally {
2114
- be = t3;
2119
+ we = t3;
2115
2120
  }
2116
2121
  }(() => (
2117
2122
  /** @type {V} */
2118
2123
  e2[t2]
2119
2124
  )) : s2 = /** @type {V} */
2120
2125
  e2[t2];
2121
- var f2, p2 = w in e2 || k in e2, _2 = c2 && (((_a2 = i(e2, t2)) == null ? void 0 : _a2.set) ?? (p2 && t2 in e2 && ((n3) => e2[t2] = n3))) || void 0, g2 = (
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 = (
2122
2127
  /** @type {V} */
2123
2128
  o2
2124
2129
  ), v2 = true, h2 = false, get_fallback = () => (h2 = true, v2 && (v2 = false, g2 = u2 ? untrack(
@@ -2162,22 +2167,26 @@ function prop(e2, t2, n2, o2) {
2162
2167
  ) : f2();
2163
2168
  };
2164
2169
  }
2165
- var y2 = false, $2 = /* @__PURE__ */ mutable_source(s2), x2 = /* @__PURE__ */ derived(() => {
2170
+ var y2 = false, $2 = /* @__PURE__ */ mutable_source(s2), w2 = /* @__PURE__ */ derived(() => {
2166
2171
  var e3 = f2(), t3 = get$1($2);
2167
2172
  return y2 ? (y2 = false, t3) : $2.v = e3;
2168
2173
  });
2169
- return a2 || (x2.equals = safe_equals), function(e3, t3) {
2174
+ return c2 && get$1(w2), a2 || (w2.equals = safe_equals), function(e3, t3) {
2170
2175
  if (arguments.length > 0) {
2171
- const n3 = t3 ? get$1(x2) : l2 && c2 ? proxy(e3) : e3;
2172
- return x2.equals(n3) || (y2 = true, set($2, n3), // To ensure the fallback value is consistent when used with proxies, we
2173
- // update the local fallback_value, but only if the fallback is actively used
2174
- h2 && void 0 !== g2 && (g2 = n3), untrack(() => get$1(x2))), e3;
2176
+ const n3 = t3 ? get$1(w2) : l2 && c2 ? proxy(e3) : e3;
2177
+ if (!w2.equals(n3)) {
2178
+ if (y2 = true, set($2, n3), // To ensure the fallback value is consistent when used with proxies, we
2179
+ // update the local fallback_value, but only if the fallback is actively used
2180
+ h2 && void 0 !== g2 && (g2 = n3), has_destroyed_component_ctx(w2)) return e3;
2181
+ untrack(() => get$1(w2));
2182
+ }
2183
+ return e3;
2175
2184
  }
2176
- return get$1(x2);
2185
+ return has_destroyed_component_ctx(w2) ? w2.v : get$1(w2);
2177
2186
  };
2178
2187
  }
2179
2188
  function onMount(e2) {
2180
- null === I && lifecycle_outside_component(), S && null !== I.l ? (
2189
+ null === O && lifecycle_outside_component(), I && null !== O.l ? (
2181
2190
  /**
2182
2191
  * Legacy-mode: Init callbacks object for onMount/beforeUpdate/afterUpdate
2183
2192
  * @param {ComponentContext} context
@@ -2192,7 +2201,7 @@ function onMount(e2) {
2192
2201
  b: [],
2193
2202
  m: []
2194
2203
  });
2195
- }(I).m.push(e2)
2204
+ }(O).m.push(e2)
2196
2205
  ) : user_effect(() => {
2197
2206
  const t2 = untrack(e2);
2198
2207
  if ("function" == typeof t2) return t2;
@@ -2200,7 +2209,7 @@ function onMount(e2) {
2200
2209
  }
2201
2210
  "undefined" != typeof window && // @ts-expect-error
2202
2211
  ((_a = window.__svelte ?? (window.__svelte = {})).v ?? (_a.v = /* @__PURE__ */ new Set())).add("5"), function enable_legacy_mode_flag() {
2203
- S = true;
2212
+ I = true;
2204
2213
  }();
2205
2214
  /**
2206
2215
  * @license lucide-svelte v0.476.0 - ISC
@@ -2222,7 +2231,7 @@ function onMount(e2) {
2222
2231
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2223
2232
  *
2224
2233
  */
2225
- const we = {
2234
+ const Me = {
2226
2235
  xmlns: "http://www.w3.org/2000/svg",
2227
2236
  width: 24,
2228
2237
  height: 24,
@@ -2233,13 +2242,13 @@ const we = {
2233
2242
  "stroke-linecap": "round",
2234
2243
  "stroke-linejoin": "round"
2235
2244
  };
2236
- var ke = /* @__PURE__ */ ns_template("<svg><!><!></svg>");
2245
+ var Se = /* @__PURE__ */ ns_template("<svg><!><!></svg>");
2237
2246
  function Icon$1(e2, t2) {
2238
2247
  const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]), o2 = legacy_rest_props(n2, ["name", "color", "size", "strokeWidth", "absoluteStrokeWidth", "iconNode"]);
2239
2248
  push(t2, false);
2240
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, () => []);
2241
2250
  init();
2242
- var d2 = ke();
2251
+ var d2 = Se();
2243
2252
  let f2;
2244
2253
  var p2 = child(d2);
2245
2254
  each(p2, 1, u2, index, (e3, t3) => {
@@ -2248,11 +2257,11 @@ function Icon$1(e2, t2) {
2248
2257
  var a3, l3, c3, u3 = null, d3 = (
2249
2258
  /** @type {TemplateNode} */
2250
2259
  e4
2251
- ), f3 = ce;
2260
+ ), f3 = fe;
2252
2261
  block(() => {
2253
2262
  const e5 = t4() || null;
2254
2263
  if (e5 !== a3) {
2255
- var n5 = ce;
2264
+ var n5 = fe;
2256
2265
  set_current_each_item(f3), c3 && (null === e5 ? (
2257
2266
  // start outro
2258
2267
  pause_effect(c3, () => {
@@ -2272,10 +2281,10 @@ function Icon$1(e2, t2) {
2272
2281
  );
2273
2282
  o3(u3, t5);
2274
2283
  }
2275
- H.nodes_end = u3, d3.before(u3);
2284
+ V.nodes_end = u3, d3.before(u3);
2276
2285
  })), (a3 = e5) && (l3 = a3), set_should_intro(true), set_current_each_item(n5);
2277
2286
  }
2278
- }, $);
2287
+ }, w);
2279
2288
  }(first_child(n3), () => get$1(t3)[0], 0, (e4, n4) => {
2280
2289
  let o3;
2281
2290
  template_effect(() => o3 = set_attributes(e4, o3, {
@@ -2283,7 +2292,7 @@ function Icon$1(e2, t2) {
2283
2292
  }));
2284
2293
  }), append(e3, n3);
2285
2294
  }), slot(sibling(p2), t2, "default", {}, null), template_effect((e3, t3) => f2 = set_attributes(d2, f2, {
2286
- ...we,
2295
+ ...Me,
2287
2296
  ...o2,
2288
2297
  width: a2(),
2289
2298
  height: a2(),
@@ -2371,12 +2380,12 @@ function scale(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_out,
2371
2380
  var on_click$4 = (e2, t2) => {
2372
2381
  var _a2;
2373
2382
  (_a2 = t2.onClick) == null ? void 0 : _a2.call(t2);
2374
- }, Ce = /* @__PURE__ */ template('<button id="floating playlight button" aria-label="Open Playlight Discovery"><p class="z-2 flex items-center overflow-hidden svelte-1j97rta"><!> <span class="mr-0.25 inline-block font-bold text-md 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>');
2383
+ }, 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>');
2375
2384
  function FloatingButton(e2, t2) {
2376
2385
  push(t2, true);
2377
2386
  let n2 = prop(t2, "position", 3, "bottom-right"), o2 = prop(t2, "visible", 3, true);
2378
2387
  var s2 = comment(), i2 = first_child(s2), consequent = (e3) => {
2379
- var o3 = Ce();
2388
+ var o3 = Ie();
2380
2389
  o3.__click = [on_click$4, t2];
2381
2390
  var s3 = child(o3);
2382
2391
  !function Gamepad(e4, t3) {
@@ -2430,20 +2439,20 @@ function FloatingButton(e2, t2) {
2430
2439
  }), append(e2, s2), pop();
2431
2440
  }
2432
2441
  delegate(["click"]);
2433
- var Se = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="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>'), Me = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-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>'), Ie = /* @__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>'), Te = /* @__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>');
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>'), 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-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>'), Pe = /* @__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>');
2434
2443
  function Icon(e2, t2) {
2435
2444
  let n2 = prop(t2, "type", 8, "success");
2436
2445
  var o2 = comment(), s2 = first_child(o2), consequent = (e3) => {
2437
- append(e3, Se());
2446
+ append(e3, Te());
2438
2447
  }, alternate = (e3, t3) => {
2439
2448
  var consequent_1 = (e4) => {
2440
- append(e4, Me());
2449
+ append(e4, Oe());
2441
2450
  }, alternate_1 = (e4, t4) => {
2442
2451
  var consequent_2 = (e5) => {
2443
- append(e5, Ie());
2452
+ append(e5, qe());
2444
2453
  }, alternate_2 = (e5, t5) => {
2445
2454
  var consequent_3 = (e6) => {
2446
- append(e6, Te());
2455
+ append(e6, Pe());
2447
2456
  }, alternate_3 = (e6) => {
2448
2457
  };
2449
2458
  if_block(e5, (e6) => {
@@ -2462,42 +2471,42 @@ function Icon(e2, t2) {
2462
2471
  "success" === n2() ? e3(consequent) : e3(alternate, false);
2463
2472
  }), append(e2, o2);
2464
2473
  }
2465
- var Oe = /* @__PURE__ */ template('<div class="sonner-loading-bar"></div>'), qe = /* @__PURE__ */ template('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');
2474
+ var De = /* @__PURE__ */ template('<div class="sonner-loading-bar"></div>'), ze = /* @__PURE__ */ template('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');
2466
2475
  function Loader(e2, t2) {
2467
2476
  push(t2, false);
2468
2477
  let n2 = prop(t2, "visible", 8);
2469
2478
  const o2 = Array(12).fill(0);
2470
2479
  init();
2471
- var s2 = qe();
2480
+ var s2 = ze();
2472
2481
  each(child(s2), 5, () => o2, index, (e3, t3) => {
2473
- append(e3, Oe());
2482
+ append(e3, De());
2474
2483
  }), template_effect(() => set_attribute(s2, "data-visible", n2())), append(e2, s2), pop();
2475
2484
  }
2476
2485
  function cn(...e2) {
2477
2486
  return e2.filter(Boolean).join(" ");
2478
2487
  }
2479
- const Pe = "undefined" != typeof document;
2488
+ const Ee = "undefined" != typeof document;
2480
2489
  function clientWritable(e2) {
2481
2490
  const t2 = writable(e2);
2482
2491
  return {
2483
2492
  subscribe: t2.subscribe,
2484
2493
  set: function set2(e3) {
2485
- Pe && t2.set(e3);
2494
+ Ee && t2.set(e3);
2486
2495
  },
2487
2496
  update: function update2(e3) {
2488
- Pe && t2.update(e3);
2497
+ Ee && t2.update(e3);
2489
2498
  }
2490
2499
  };
2491
2500
  }
2492
- let ze = 0;
2493
- const We = function createToastState() {
2501
+ let We = 0;
2502
+ const je = function createToastState() {
2494
2503
  const e2 = clientWritable([]), t2 = clientWritable([]);
2495
2504
  function addToast(t3) {
2496
2505
  e2.update((e3) => [t3, ...e3]);
2497
2506
  }
2498
2507
  function create(t3) {
2499
2508
  var _a2;
2500
- 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 : ze++, i2 = void 0 === t3.dismissable || t3.dismissable, a2 = void 0 === t3.type ? "default" : t3.type, l2 = get(e2).find((e3) => e3.id === s2);
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 : We++, i2 = void 0 === t3.dismissable || t3.dismissable, a2 = void 0 === t3.type ? "default" : t3.type, l2 = get(e2).find((e3) => e3.id === s2);
2501
2510
  return l2 ? e2.update((e3) => e3.map((e4) => e4.id === s2 ? {
2502
2511
  ...e4,
2503
2512
  ...t3,
@@ -2634,7 +2643,7 @@ const We = function createToastState() {
2634
2643
  }), n2;
2635
2644
  },
2636
2645
  custom: function custom(e3, t3) {
2637
- const n2 = (t3 == null ? void 0 : t3.id) || ze++;
2646
+ const n2 = (t3 == null ? void 0 : t3.id) || We++;
2638
2647
  return create({
2639
2648
  component: e3,
2640
2649
  id: n2,
@@ -2655,27 +2664,27 @@ const We = function createToastState() {
2655
2664
  heights: t2
2656
2665
  };
2657
2666
  }();
2658
- const De = function toastFunction(e2, t2) {
2659
- return We.create({
2667
+ const Ne = function toastFunction(e2, t2) {
2668
+ return je.create({
2660
2669
  message: e2,
2661
2670
  ...t2
2662
2671
  });
2663
- }, Ee = Object.assign(De, {
2664
- success: We.success,
2665
- info: We.info,
2666
- warning: We.warning,
2667
- error: We.error,
2668
- custom: We.custom,
2669
- message: We.message,
2670
- promise: We.promise,
2671
- dismiss: We.dismiss,
2672
- loading: We.loading
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
2673
2682
  });
2674
- var je = /* @__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>'), Ne = /* @__PURE__ */ template('<div data-icon=""><!> <!></div>'), Be = /* @__PURE__ */ template('<div data-title=""><!></div>'), Ae = /* @__PURE__ */ template('<div data-description=""><!></div>'), Le = /* @__PURE__ */ template('<button data-button="" data-cancel=""> </button>'), Ge = /* @__PURE__ */ template('<button data-button=""> </button>'), Fe = /* @__PURE__ */ template('<!> <div data-content=""><!> <!></div> <!> <!>', 1), He = /* @__PURE__ */ template('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');
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>');
2675
2684
  function Toast(e2, t2) {
2676
2685
  const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]);
2677
2686
  push(t2, false);
2678
- const [o2, s2] = setup_stores(), $heights = () => store_get(y2, "$heights", o2), $effect = () => store_get(get$1(Q2), "$effect", o2), i2 = mutable_state(void 0, true), a2 = mutable_state(void 0, true), l2 = mutable_state(void 0, true), c2 = mutable_state(void 0, true), u2 = mutable_state(void 0, true), d2 = mutable_state(void 0, true), f2 = mutable_state(void 0, true), p2 = mutable_state(void 0, true), _2 = mutable_state(void 0, true), g2 = mutable_state(void 0, true), v2 = mutable_state(void 0, true), h2 = mutable_state(void 0, true), m2 = {
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 = {
2679
2688
  toast: "",
2680
2689
  title: "",
2681
2690
  description: "",
@@ -2690,15 +2699,15 @@ function Toast(e2, t2) {
2690
2699
  default: "",
2691
2700
  info: "",
2692
2701
  loading: ""
2693
- }, { toasts: b2, heights: y2, removeHeight: $2, setHeight: x2, remove: w2 } = We;
2694
- let k2 = prop(t2, "toast", 9), C2 = prop(t2, "index", 9), S2 = prop(t2, "expanded", 9), M2 = prop(t2, "invert", 13), I2 = prop(t2, "position", 9), T2 = prop(t2, "visibleToasts", 9), O2 = prop(t2, "expandByDefault", 9), q2 = prop(t2, "closeButton", 9), P2 = prop(t2, "interacting", 9), z2 = prop(t2, "cancelButtonStyle", 9, ""), W2 = 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 = mutable_state(false, true), A2 = mutable_state(false, true), L2 = mutable_state(false, true), G2 = mutable_state(false, true), F2 = mutable_state(0, true), H2 = mutable_state(0, true), R2 = mutable_state(void 0, true), U2 = mutable_state(0, true), V2 = 0, K2 = 0, Y2 = null;
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), q2 = prop(t2, "closeButton", 9), P2 = prop(t2, "interacting", 9), D2 = prop(t2, "cancelButtonStyle", 9, ""), z2 = prop(t2, "actionButtonStyle", 9, ""), E2 = prop(t2, "duration", 9, 4e3), W2 = 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;
2695
2704
  function deleteToast() {
2696
2705
  set(A2, true), // Save the offset for the exit swipe animation
2697
2706
  set(F2, get$1(U2)), $2(k2().id), setTimeout(() => {
2698
- w2(k2().id);
2707
+ x2(k2().id);
2699
2708
  }, 200);
2700
2709
  }
2701
- let Z2 = mutable_state(void 0, true), J2 = mutable_state(k2().duration || D2() || 4e3, true);
2710
+ let Z2 = /* @__PURE__ */ mutable_source(void 0, true), J2 = /* @__PURE__ */ mutable_source(k2().duration || E2() || 4e3, true);
2702
2711
  function startTimer() {
2703
2712
  V2 = (/* @__PURE__ */ new Date()).getTime(), // Let the toast know it has started
2704
2713
  set(Z2, setTimeout(() => {
@@ -2706,11 +2715,11 @@ function Toast(e2, t2) {
2706
2715
  (_b2 = (_a2 = k2()).onAutoClose) == null ? void 0 : _b2.call(_a2, k2()), deleteToast();
2707
2716
  }, get$1(J2)));
2708
2717
  }
2709
- let Q2 = mutable_state(void 0, true);
2718
+ let Q2 = /* @__PURE__ */ mutable_source(void 0, true);
2710
2719
  onMount(() => {
2711
2720
  set(B2, true);
2712
2721
  const e3 = get$1(R2).getBoundingClientRect().height;
2713
- return set(H2, e3), x2({
2722
+ return set(H2, e3), w2({
2714
2723
  toastId: k2().id,
2715
2724
  height: e3
2716
2725
  }), () => $2(k2().id);
@@ -2742,8 +2751,8 @@ function Toast(e2, t2) {
2742
2751
  // Calculate offset up untill current toast
2743
2752
  n3 >= get$1(p2) ? e3 : e3 + t3.height
2744
2753
  ), 0));
2745
- }), legacy_pre_effect(() => (deep_read_state(M2()), deep_read_state(k2())), () => {
2746
- M2(k2().invert || M2());
2754
+ }), legacy_pre_effect(() => (deep_read_state(S2()), deep_read_state(k2())), () => {
2755
+ S2(k2().invert || S2());
2747
2756
  }), legacy_pre_effect(() => get$1(u2), () => {
2748
2757
  set(v2, "loading" === get$1(u2));
2749
2758
  }), legacy_pre_effect(() => (get$1(p2), get$1(g2)), () => {
@@ -2753,29 +2762,29 @@ function Toast(e2, t2) {
2753
2762
  async function updateHeights() {
2754
2763
  if (!get$1(B2)) return;
2755
2764
  let e3;
2756
- await tick(), e3 = S2() || O2() ? 1 : 1 - 0.05 * C2(), get$1(R2).style.setProperty("height", "auto");
2765
+ await tick(), e3 = M2() || O2() ? 1 : 1 - 0.05 * C2(), get$1(R2).style.setProperty("height", "auto");
2757
2766
  const t3 = get$1(R2).offsetHeight, n3 = get$1(R2).getBoundingClientRect().height, o3 = Math.round(100 * (n3 / e3 + Number.EPSILON)) / 100;
2758
2767
  let s3;
2759
2768
  get$1(R2).style.removeProperty("height"), // Use scaledRectHeight as it's more precise
2760
- s3 = Math.abs(o3 - t3) < 1 ? o3 : t3, set(H2, s3), x2({
2769
+ s3 = Math.abs(o3 - t3) < 1 ? o3 : t3, set(H2, s3), w2({
2761
2770
  toastId: k2().id,
2762
2771
  height: s3
2763
2772
  });
2764
2773
  }();
2765
- }), legacy_pre_effect(() => (deep_read_state(k2()), get$1(Z2), deep_read_state(D2())), () => {
2774
+ }), legacy_pre_effect(() => (deep_read_state(k2()), get$1(Z2), deep_read_state(E2())), () => {
2766
2775
  k2().updated && // if the toast has been updated after the initial render,
2767
2776
  // we want to reset the timer and set the remaining time to the
2768
2777
  // new duration
2769
- (clearTimeout(get$1(Z2)), set(J2, k2().duration || D2() || 4e3), startTimer());
2778
+ (clearTimeout(get$1(Z2)), set(J2, k2().duration || E2() || 4e3), startTimer());
2770
2779
  }), legacy_pre_effect(() => (deep_read_state(k2()), get$1(u2)), () => {
2771
2780
  set(h2, k2().promise && "loading" === get$1(u2) || k2().duration === Number.POSITIVE_INFINITY);
2772
- }), legacy_pre_effect(() => (get$1(h2), deep_read_state(S2()), deep_read_state(P2()), get$1(Z2)), () => {
2781
+ }), legacy_pre_effect(() => (get$1(h2), deep_read_state(M2()), deep_read_state(P2()), get$1(Z2)), () => {
2773
2782
  var e3;
2774
2783
  !function store_unsub(e4, t3, n3) {
2775
2784
  let o3 = n3[t3];
2776
2785
  return o3 && o3.store !== e4 && // Don't reset store yet, so that store_get above can resubscribe to new store if necessary
2777
2786
  (o3.unsubscribe(), o3.unsubscribe = noop), e4;
2778
- }(set(Q2, (e3 = () => (get$1(h2) || (S2() || P2() ? (
2787
+ }(set(Q2, (e3 = () => (get$1(h2) || (M2() || P2() ? (
2779
2788
  // If toast's duration changes, it will be out of sync with the
2780
2789
  // remainingAtTimeout, so we know we need to restart the timer
2781
2790
  // with the new duration
@@ -2795,11 +2804,11 @@ function Toast(e2, t2) {
2795
2804
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
2796
2805
  k2().delete && deleteToast();
2797
2806
  }), legacy_pre_effect_reset(), init(true);
2798
- var ee2 = He();
2807
+ var ee2 = Ve();
2799
2808
  let te2;
2800
2809
  set_attribute(ee2, "tabindex", 0);
2801
2810
  var ne2 = child(ee2), consequent = (e3) => {
2802
- var t3 = je();
2811
+ var t3 = Ae();
2803
2812
  template_effect((e4) => {
2804
2813
  set_attribute(t3, "data-disabled", get$1(v2)), set_class(t3, 1, e4);
2805
2814
  }, [() => {
@@ -2826,8 +2835,8 @@ function Toast(e2, t2) {
2826
2835
  }));
2827
2836
  }), append(e3, t3);
2828
2837
  }, alternate = (e3) => {
2829
- var n3 = Fe(), o3 = first_child(n3), consequent_8 = (e4) => {
2830
- var n4 = Ne(), o4 = child(n4), consequent_2 = (e5) => {
2838
+ var n3 = Ue(), o3 = first_child(n3), consequent_8 = (e4) => {
2839
+ var n4 = Le(), o4 = child(n4), consequent_2 = (e5) => {
2831
2840
  var n5 = comment();
2832
2841
  slot(first_child(n5), t2, "loading-icon", {}, null), append(e5, n5);
2833
2842
  };
@@ -2880,7 +2889,7 @@ function Toast(e2, t2) {
2880
2889
  ("default" !== get$1(u2) || k2().icon || k2().promise) && e4(consequent_8);
2881
2890
  });
2882
2891
  var s3 = sibling(o3, 2), i3 = child(s3), consequent_10 = (e4) => {
2883
- var t3 = Be(), n4 = child(t3), consequent_9 = (e5) => {
2892
+ var t3 = Ge(), n4 = child(t3), consequent_9 = (e5) => {
2884
2893
  var t4 = comment();
2885
2894
  component(first_child(t4), () => k2().title, (e6, t5) => {
2886
2895
  t5(e6, spread_props(() => k2().componentProps));
@@ -2900,7 +2909,7 @@ function Toast(e2, t2) {
2900
2909
  k2().title && e4(consequent_10);
2901
2910
  });
2902
2911
  var a3 = sibling(i3, 2), consequent_12 = (e4) => {
2903
- var t3 = Ae(), n4 = child(t3), consequent_11 = (e5) => {
2912
+ var t3 = Fe(), n4 = child(t3), consequent_11 = (e5) => {
2904
2913
  var t4 = comment();
2905
2914
  component(first_child(t4), () => k2().description, (e6, t5) => {
2906
2915
  t5(e6, spread_props(() => k2().componentProps));
@@ -2913,16 +2922,16 @@ function Toast(e2, t2) {
2913
2922
  "string" != typeof k2().description ? e5(consequent_11) : e5(alternate_6, false);
2914
2923
  }), template_effect((e5) => set_class(t3, 1, e5), [() => {
2915
2924
  var _a2, _b2;
2916
- return clsx(cn(E2(), get$1(f2), (_a2 = j2()) == null ? void 0 : _a2.description, (_b2 = k2().classes) == null ? void 0 : _b2.description));
2925
+ return clsx(cn(W2(), get$1(f2), (_a2 = j2()) == null ? void 0 : _a2.description, (_b2 = k2().classes) == null ? void 0 : _b2.description));
2917
2926
  }], derived_safe_equal), append(e4, t3);
2918
2927
  };
2919
2928
  if_block(a3, (e4) => {
2920
2929
  k2().description && e4(consequent_12);
2921
2930
  });
2922
2931
  var l3 = sibling(s3, 2), consequent_13 = (e4) => {
2923
- var t3 = Le(), n4 = child(t3);
2932
+ var t3 = He(), n4 = child(t3);
2924
2933
  template_effect((e5) => {
2925
- set_style(t3, z2()), set_class(t3, 1, e5), set_text(n4, k2().cancel.label);
2934
+ set_style(t3, D2()), set_class(t3, 1, e5), set_text(n4, k2().cancel.label);
2926
2935
  }, [() => {
2927
2936
  var _a2, _b2, _c2;
2928
2937
  return clsx(cn((_a2 = j2()) == null ? void 0 : _a2.cancelButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.cancelButton));
@@ -2935,9 +2944,9 @@ function Toast(e2, t2) {
2935
2944
  k2().cancel && e4(consequent_13);
2936
2945
  });
2937
2946
  var c3 = sibling(l3, 2), consequent_14 = (e4) => {
2938
- var t3 = Ge(), n4 = child(t3);
2947
+ var t3 = Re(), n4 = child(t3);
2939
2948
  template_effect((e5) => {
2940
- set_style(t3, W2()), set_class(t3, 1, e5), set_text(n4, k2().action.label);
2949
+ set_style(t3, z2()), set_class(t3, 1, e5), set_text(n4, k2().action.label);
2941
2950
  }, [() => {
2942
2951
  var _a2, _b2, _c2;
2943
2952
  return clsx(cn((_a2 = j2()) == null ? void 0 : _a2.actionButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.actionButton));
@@ -2954,7 +2963,7 @@ function Toast(e2, t2) {
2954
2963
  k2().component ? e3(consequent_1) : e3(alternate, false);
2955
2964
  }), bind_this(ee2, (e3) => set(R2, e3), () => get$1(R2)), template_effect((e3, t3, s3) => {
2956
2965
  var _a2;
2957
- 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", M2()), set_attribute(ee2, "data-swipe-out", get$1(G2)), set_attribute(ee2, "data-expanded", s3), te2 = set_style(ee2, `${n2.style} ${k2().style}`, te2, {
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, {
2958
2967
  "--index": C2(),
2959
2968
  "--toasts-before": C2(),
2960
2969
  "--z-index": store_get(b2, "$toasts", o2).length - C2(),
@@ -2964,7 +2973,7 @@ function Toast(e2, t2) {
2964
2973
  }, [() => {
2965
2974
  var _a2, _b2, _c2, _d, _e3, _f;
2966
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)]));
2967
- }, () => Boolean(k2().promise), () => Boolean(S2() || O2() && get$1(B2))], derived_safe_equal), event("pointerdown", ee2, function onPointerDown(e3) {
2976
+ }, () => Boolean(k2().promise), () => Boolean(M2() || O2() && get$1(B2))], derived_safe_equal), event("pointerdown", ee2, function onPointerDown(e3) {
2968
2977
  if (get$1(v2)) return;
2969
2978
  set(F2, get$1(U2));
2970
2979
  const t3 = e3.target;
@@ -2987,44 +2996,44 @@ function Toast(e2, t2) {
2987
2996
  (Y2 = null);
2988
2997
  }), append(e2, ee2), pop(), s2();
2989
2998
  }
2990
- var Re = /* @__PURE__ */ template("<ol></ol>"), Ue = /* @__PURE__ */ template('<section class="svelte-1fo5d1m"></section>');
2999
+ var Ke = /* @__PURE__ */ template("<ol></ol>"), Ye = /* @__PURE__ */ template('<section class="svelte-1fo5d1m"></section>');
2991
3000
  function Toaster(e2, t2) {
2992
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"]);
2993
3002
  push(t2, false);
2994
- const [s2, i2] = setup_stores(), $toasts = () => store_get(k2, "$toasts", s2), a2 = mutable_state(), l2 = mutable_state(), c2 = "dark", u2 = "light";
3003
+ const [s2, i2] = setup_stores(), $toasts = () => store_get(k2, "$toasts", s2), a2 = /* @__PURE__ */ mutable_source(), l2 = /* @__PURE__ */ mutable_source(), c2 = "dark", u2 = "light";
2995
3004
  function getDocumentDirection() {
2996
3005
  if ("undefined" == typeof window) return "ltr";
2997
3006
  if ("undefined" == typeof document) return "ltr";
2998
3007
  const e3 = document.documentElement.getAttribute("dir");
2999
3008
  return "auto" !== e3 && e3 ? e3 : window.getComputedStyle(document.documentElement).direction;
3000
3009
  }
3001
- 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, () => ({})), x2 = prop(t2, "offset", 8, null), w2 = prop(t2, "dir", 24, getDocumentDirection);
3002
- const { toasts: k2, heights: C2, reset: S2 } = We;
3003
- let M2 = mutable_state(false), T2 = mutable_state(false), O2 = mutable_state(function getInitialTheme(e3) {
3010
+ 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) {
3004
3013
  return "system" !== e3 ? e3 : "undefined" != typeof window && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? c2 : u2;
3005
- }(f2())), q2 = mutable_state(), P2 = null, z2 = false;
3014
+ }(f2())), q2 = /* @__PURE__ */ mutable_source(), P2 = null, D2 = false;
3006
3015
  function handleBlur(e3) {
3007
- z2 && !e3.currentTarget.contains(e3.relatedTarget) && (z2 = false, P2 && (P2.focus({
3016
+ D2 && !e3.currentTarget.contains(e3.relatedTarget) && (D2 = false, P2 && (P2.focus({
3008
3017
  preventScroll: true
3009
3018
  }), P2 = null));
3010
3019
  }
3011
3020
  function handleFocus(e3) {
3012
- z2 || (z2 = true, P2 = e3.relatedTarget);
3021
+ D2 || (D2 = true, P2 = e3.relatedTarget);
3013
3022
  }
3014
3023
  !function onDestroy(e3) {
3015
- null === I && lifecycle_outside_component(), onMount(() => () => untrack(e3));
3024
+ null === O && lifecycle_outside_component(), onMount(() => () => untrack(e3));
3016
3025
  }(() => {
3017
3026
  get$1(q2) && P2 && (P2.focus({
3018
3027
  preventScroll: true
3019
- }), P2 = null, z2 = false);
3028
+ }), P2 = null, D2 = false);
3020
3029
  }), onMount(() => {
3021
- S2();
3030
+ M2();
3022
3031
  const handleKeydown = (e3) => {
3023
3032
  var _a2, _b2;
3024
3033
  _2().every((t3) => (
3025
3034
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3026
3035
  e3[t3] || e3.code === t3
3027
- )) && (set(M2, true), (_a2 = get$1(q2)) == null ? void 0 : _a2.focus()), "Escape" !== e3.code || document.activeElement !== get$1(q2) && !((_b2 = get$1(q2)) == null ? void 0 : _b2.contains(document.activeElement)) || set(M2, false);
3036
+ )) && (set(S2, true), (_a2 = get$1(q2)) == null ? void 0 : _a2.focus()), "Escape" !== e3.code || document.activeElement !== get$1(q2) && !((_b2 = get$1(q2)) == null ? void 0 : _b2.contains(document.activeElement)) || set(S2, false);
3028
3037
  };
3029
3038
  return document.addEventListener("keydown", handleKeydown), () => {
3030
3039
  document.removeEventListener("keydown", handleKeydown);
@@ -3034,7 +3043,7 @@ function Toaster(e2, t2) {
3034
3043
  }), legacy_pre_effect(() => deep_read_state(_2()), () => {
3035
3044
  set(l2, _2().join("+").replace(/Key/g, "").replace(/Digit/g, ""));
3036
3045
  }), legacy_pre_effect(() => $toasts(), () => {
3037
- $toasts().length <= 1 && set(M2, false);
3046
+ $toasts().length <= 1 && set(S2, false);
3038
3047
  }), legacy_pre_effect(() => $toasts(), () => {
3039
3048
  const e3 = $toasts().filter((e4) => e4.dismiss && !e4.delete);
3040
3049
  if (e3.length > 0) {
@@ -3045,17 +3054,17 @@ function Toaster(e2, t2) {
3045
3054
  k2.set(t3);
3046
3055
  }
3047
3056
  }), legacy_pre_effect(() => deep_read_state(f2()), () => {
3048
- if ("system" !== f2() && set(O2, f2()), "undefined" != typeof window) {
3057
+ if ("system" !== f2() && set(T2, f2()), "undefined" != typeof window) {
3049
3058
  "system" === f2() && // check if current preference is dark
3050
3059
  (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? (
3051
3060
  // it's currently dark
3052
- set(O2, c2)
3061
+ set(T2, c2)
3053
3062
  ) : (
3054
3063
  // it's not dark
3055
- set(O2, u2)
3064
+ set(T2, u2)
3056
3065
  ));
3057
3066
  const e3 = window.matchMedia("(prefers-color-scheme: dark)"), changeHandler = ({ matches: e4 }) => {
3058
- set(O2, e4 ? c2 : u2);
3067
+ set(T2, e4 ? c2 : u2);
3059
3068
  };
3060
3069
  "addEventListener" in e3 ? e3.addEventListener("change", changeHandler) : (
3061
3070
  // @ts-expect-error deprecated API
@@ -3063,10 +3072,10 @@ function Toaster(e2, t2) {
3063
3072
  );
3064
3073
  }
3065
3074
  }), legacy_pre_effect_reset(), init();
3066
- var W2 = comment(), D2 = first_child(W2), consequent = (e3) => {
3067
- var i3 = Ue();
3075
+ var z2 = comment(), E2 = first_child(z2), consequent = (e3) => {
3076
+ var i3 = Ye();
3068
3077
  set_attribute(i3, "tabindex", -1), each(i3, 5, () => get$1(a2), index, (e4, i4, a3, l3) => {
3069
- var c3 = Re();
3078
+ var c3 = Ke();
3070
3079
  let u3;
3071
3080
  each(c3, 7, () => $toasts().filter((e5) => !e5.position && 0 === a3 || e5.position === get$1(i4)), (e5) => e5.id, (e5, n3, o3, s3) => {
3072
3081
  const a4 = /* @__PURE__ */ derived_safe_equal(() => {
@@ -3102,7 +3111,7 @@ function Toaster(e2, t2) {
3102
3111
  return y2();
3103
3112
  },
3104
3113
  get interacting() {
3105
- return get$1(T2);
3114
+ return get$1(I2);
3106
3115
  },
3107
3116
  get position() {
3108
3117
  return get$1(i4);
@@ -3111,7 +3120,7 @@ function Toaster(e2, t2) {
3111
3120
  return h2();
3112
3121
  },
3113
3122
  get expanded() {
3114
- return get$1(M2);
3123
+ return get$1(S2);
3115
3124
  },
3116
3125
  get actionButtonStyle() {
3117
3126
  return get$1(a4);
@@ -3186,34 +3195,113 @@ function Toaster(e2, t2) {
3186
3195
  tabIndex: -1,
3187
3196
  class: n2.class,
3188
3197
  "data-sonner-toaster": true,
3189
- "data-theme": get$1(O2),
3198
+ "data-theme": get$1(T2),
3190
3199
  "data-rich-colors": v2(),
3191
3200
  dir: e5,
3192
3201
  "data-y-position": t3,
3193
3202
  "data-x-position": i5,
3194
3203
  style: n2.style,
3195
3204
  ...o2,
3196
- [fe]: {
3205
+ [ge]: {
3197
3206
  "--front-toast-height": `${(_a2 = store_get(C2, "$heights", s2)[0]) == null ? void 0 : _a2.height}px`,
3198
- "--offset": "number" == typeof x2() ? `${x2()}px` : x2() || "32px",
3207
+ "--offset": "number" == typeof w2() ? `${w2()}px` : w2() || "32px",
3199
3208
  "--width": "356px",
3200
3209
  "--gap": "14px"
3201
3210
  }
3202
3211
  }, "svelte-1fo5d1m"), c3.dir = c3.dir;
3203
- }, [() => "auto" === w2() ? getDocumentDirection() : w2(), () => 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(M2, true)), event("mousemove", c3, () => set(M2, true)), event("mouseleave", c3, () => {
3204
- get$1(T2) || set(M2, false);
3205
- }), event("pointerdown", c3, () => set(T2, true)), event("pointerup", c3, () => set(T2, false)), append(e4, c3);
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, () => {
3213
+ get$1(I2) || set(S2, false);
3214
+ }), event("pointerdown", c3, () => set(I2, true)), event("pointerup", c3, () => set(I2, false)), append(e4, c3);
3206
3215
  }), template_effect(() => set_attribute(i3, "aria-label", `${g2()} ${get$1(l2)}`)), append(e3, i3);
3207
3216
  };
3208
- if_block(D2, (e3) => {
3217
+ if_block(E2, (e3) => {
3209
3218
  $toasts().length > 0 && e3(consequent);
3210
- }), append(e2, W2), pop(), i2();
3219
+ }), append(e2, z2), pop(), i2();
3211
3220
  }
3212
- const Ve = writable(false), Ke = writable("https://sdk.playlight.dev");
3221
+ const Ze = writable(false), Je = writable(false), Xe = writable("https://sdk.playlight.dev");
3222
+ const Qe = new (_b = class {
3223
+ constructor() {
3224
+ __privateAdd(this, _PlayLightAPI_instances);
3225
+ this.baseUrl = "https://api.playlight.dev/platform", this.cachedCategories = null, this.currentGame = null;
3226
+ }
3227
+ async request(e2, t2 = {}) {
3228
+ try {
3229
+ const n2 = `${this.baseUrl}${e2}`, o2 = await fetch(n2, {
3230
+ ...t2,
3231
+ headers: {
3232
+ "Content-Type": "application/json",
3233
+ ...t2.headers
3234
+ }
3235
+ });
3236
+ if (!o2.ok) {
3237
+ let e3;
3238
+ try {
3239
+ e3 = await o2.json();
3240
+ } catch {
3241
+ } 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.");
3244
+ }
3245
+ }
3246
+ return await o2.json();
3247
+ } catch (e3) {
3248
+ Be.error("Error: " + e3), console.error("Playlight API error:", e3);
3249
+ }
3250
+ }
3251
+ // Get all categories
3252
+ async getCategories() {
3253
+ if (this.cachedCategories) return this.cachedCategories;
3254
+ const e2 = await this.request("/categories");
3255
+ return this.cachedCategories = e2, e2;
3256
+ }
3257
+ // Get game suggestions, optionally filtered by category
3258
+ async getSuggestions(e2 = null, t2 = 1) {
3259
+ 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);
3261
+ }
3262
+ // Get game suggestions, optionally filtered by category
3263
+ async getCurrentGameInfo() {
3264
+ if (this.currentGame) return this.currentGame;
3265
+ let e2 = "/game-by-domain/" + __privateMethod(this, _PlayLightAPI_instances, o_fn).call(this);
3266
+ return this.currentGame = await this.request(e2), this.currentGame ? {
3267
+ ...this.currentGame
3268
+ } : void 0;
3269
+ }
3270
+ // Track discovery overlay open
3271
+ async trackOpen() {
3272
+ const e2 = __privateMethod(this, _PlayLightAPI_instances, o_fn).call(this);
3273
+ await this.request("/event/open", {
3274
+ method: "POST",
3275
+ body: JSON.stringify({
3276
+ domain: e2
3277
+ })
3278
+ });
3279
+ }
3280
+ // Track game click (pass id of the game that was clicked on)
3281
+ async trackClick(e2) {
3282
+ const t2 = __privateMethod(this, _PlayLightAPI_instances, o_fn).call(this);
3283
+ await this.request("/event/click", {
3284
+ method: "POST",
3285
+ body: JSON.stringify({
3286
+ sourceDomain: t2,
3287
+ gameId: e2
3288
+ })
3289
+ });
3290
+ }
3291
+ // Like or unlike a game (pass gameId and true to like, false to unlike)
3292
+ async toggleLike(e2, t2 = true) {
3293
+ const n2 = t2 ? "like" : "unlike", o2 = await this.request(`/rating/${e2}/${n2}`, {
3294
+ method: "POST"
3295
+ });
3296
+ return (o2 == null ? void 0 : o2.success) || false;
3297
+ }
3298
+ }, _PlayLightAPI_instances = new WeakSet(), o_fn = function() {
3299
+ const e2 = window.location.hostname;
3300
+ return e2.startsWith("www.") ? e2.substring(4) : e2;
3301
+ }, _b)();
3213
3302
  var on_click$3 = (e2, t2, n2, o2) => {
3214
- var _a2;
3215
- get$1(t2) && !get$1(n2) || ((_a2 = o2.onClick) == null ? void 0 : _a2.call(o2, o2.game.id), window.open("https://" + o2.game.domain, "_blank", "noopener"));
3216
- }, Ye = /* @__PURE__ */ template('<div><p class="text-primary font-bold uppercase">New</p></div>'), Ze = /* @__PURE__ */ template('<video playsinline="" loop preload="auto"></video>', 2), Je = /* @__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>'), Xe = /* @__PURE__ */ template('<div class="bg-background/75 text-foreground absolute right-0 bottom-0 left-0 z-11 flex max-h-1/3 flex-col overflow-hidden backdrop-blur-xl"><div class="hide-scrollbar h-full w-full overflow-y-auto p-3 svelte-rulnq9"><h3 class="mb-2 truncate text-center text-lg font-bold"> </h3> <p class="text-muted-foreground mb-4 text-center text-sm text-balance"> </p></div> <!> <div></div></div>'), Qe = /* @__PURE__ */ template('<div role="button" tabindex="0"><!> <!> <img alt="cover" loading="eager"> <!> <img alt="game logo" loading="eager"></div>');
3303
+ get$1(t2) && !get$1(n2) || (Qe.trackClick(o2.game.id), window.open("https://" + o2.game.domain + "?utm_source=playlight", "_blank", "noopener"));
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="hide-scrollbar h-full w-full overflow-y-auto p-3 svelte-rulnq9"><h3 class="mb-2 truncate text-center text-lg font-bold"> </h3> <p class="text-muted-foreground mb-4 text-center text-sm text-balance"> </p></div> <!> <div></div></div>'), ot = /* @__PURE__ */ template('<div role="button" tabindex="0"><!> <!> <img alt="cover" loading="eager"> <!> <img alt="game logo" loading="eager"></div>');
3217
3305
  function GameCard(e2, t2) {
3218
3306
  push(t2, true);
3219
3307
  const [n2, o2] = setup_stores();
@@ -3226,7 +3314,7 @@ function GameCard(e2, t2) {
3226
3314
  } catch (e4) {
3227
3315
  console.error("Error playing sound:", e4);
3228
3316
  }
3229
- }(store_get(Ke, "$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));
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));
3230
3318
  }
3231
3319
  function handleMouseLeave() {
3232
3320
  get$1(p2) || (setUnhovered(), get$1(c2) && get$1(u2) && get$1(c2).pause());
@@ -3237,12 +3325,12 @@ function GameCard(e2, t2) {
3237
3325
  user_effect(() => {
3238
3326
  set(p2, "ontouchstart" in window);
3239
3327
  });
3240
- var g2 = Qe();
3241
- event("touchstart", T, () => set(p2, true), void 0, true), event("touchstart", O, (e3) => {
3328
+ var g2 = ot();
3329
+ event("touchstart", P, () => set(p2, true), void 0, true), event("touchstart", D, (e3) => {
3242
3330
  get$1(_2) && !get$1(_2).contains(e3.target) && setUnhovered();
3243
3331
  }, void 0, true), g2.__touchstart = handleMouseEnter, g2.__click = [on_click$3, p2, l2, t2];
3244
3332
  var v2 = child(g2), consequent = (e3) => {
3245
- var t3 = Ye();
3333
+ var t3 = et();
3246
3334
  let n3;
3247
3335
  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), [() => ({
3248
3336
  "opacity-0": get$1(a2)
@@ -3256,7 +3344,7 @@ function GameCard(e2, t2) {
3256
3344
  })((_a2 = t2.game) == null ? void 0 : _a2.created_at) && e3(consequent);
3257
3345
  });
3258
3346
  var h2 = sibling(v2, 2), consequent_1 = (e3) => {
3259
- var n3 = Ze();
3347
+ var n3 = tt();
3260
3348
  let o3;
3261
3349
  n3.muted = true, bind_this(n3, (e4) => set(c2, e4), () => get$1(c2)), template_effect((e4) => {
3262
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);
@@ -3272,8 +3360,8 @@ function GameCard(e2, t2) {
3272
3360
  var m2 = sibling(h2, 2);
3273
3361
  let b2;
3274
3362
  var y2 = sibling(m2, 2), consequent_3 = (e3) => {
3275
- var n3 = Xe(), o3 = child(n3), s3 = child(o3), i3 = child(s3), a3 = child(sibling(s3, 2)), l3 = sibling(o3, 2), consequent_2 = (e4) => {
3276
- var t3 = Je();
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();
3277
3365
  !function Info(e5, t4) {
3278
3366
  const n4 = legacy_rest_props(t4, ["children", "$$slots", "$$events", "$$legacy"]);
3279
3367
  Icon$1(e5, spread_props({
@@ -3312,9 +3400,9 @@ function GameCard(e2, t2) {
3312
3400
  get$1(a2) && e3(consequent_3);
3313
3401
  });
3314
3402
  var $2 = sibling(y2, 2);
3315
- let x2;
3403
+ let w2;
3316
3404
  bind_this(g2, (e3) => set(_2, e3), () => get$1(_2)), template_effect((e3, n3) => {
3317
- 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-rulnq9"), 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-rulnq9", null, b2, e3), set_attribute($2, "src", t2.game.logo_url), x2 = 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 transition group-hover:outline-2 svelte-rulnq9", null, x2, 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-rulnq9"), 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-rulnq9", 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 transition group-hover:outline-2 svelte-rulnq9", null, w2, n3);
3318
3406
  }, [() => ({
3319
3407
  "opacity-100": get$1(d2) && (!get$1(a2) || !get$1(u2) || !t2.game.cover_video_url)
3320
3408
  }), () => ({
@@ -3325,87 +3413,6 @@ function GameCard(e2, t2) {
3325
3413
  set(f2, true);
3326
3414
  }), append(e2, g2), pop(), o2();
3327
3415
  }
3328
- delegate(["touchstart", "click"]);
3329
- const et = new (_b = class {
3330
- constructor() {
3331
- __privateAdd(this, _PlayLightAPI_instances);
3332
- this.baseUrl = "https://api.playlight.dev/platform", this.cachedCategories = null, this.currentGame = null;
3333
- }
3334
- async request(e2, t2 = {}) {
3335
- try {
3336
- const n2 = `${this.baseUrl}${e2}`, o2 = await fetch(n2, {
3337
- ...t2,
3338
- headers: {
3339
- "Content-Type": "application/json",
3340
- ...t2.headers
3341
- }
3342
- });
3343
- if (!o2.ok) {
3344
- let e3;
3345
- try {
3346
- e3 = await o2.json();
3347
- } catch {
3348
- } finally {
3349
- 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}`);
3350
- 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.");
3351
- }
3352
- }
3353
- return await o2.json();
3354
- } catch (e3) {
3355
- Ee.error("Error: " + e3), console.error("Playlight API error:", e3);
3356
- }
3357
- }
3358
- // Get all categories
3359
- async getCategories() {
3360
- if (this.cachedCategories) return this.cachedCategories;
3361
- const e2 = await this.request("/categories");
3362
- return this.cachedCategories = e2, e2;
3363
- }
3364
- // Get game suggestions, optionally filtered by category
3365
- async getSuggestions(e2 = null, t2 = 1) {
3366
- let n2 = "/suggestions";
3367
- return e2 && (n2 += "/" + e2), t2 && (n2 += "?page=" + t2), n2 += "&without=" + __privateMethod(this, _PlayLightAPI_instances, o_fn).call(this), await this.request(n2);
3368
- }
3369
- // Get game suggestions, optionally filtered by category
3370
- async getCurrentGameInfo() {
3371
- if (this.currentGame) return this.currentGame;
3372
- let e2 = "/game-by-domain/" + __privateMethod(this, _PlayLightAPI_instances, o_fn).call(this);
3373
- return this.currentGame = await this.request(e2), this.currentGame ? {
3374
- ...this.currentGame
3375
- } : void 0;
3376
- }
3377
- // Track discovery overlay open
3378
- async trackOpen() {
3379
- const e2 = __privateMethod(this, _PlayLightAPI_instances, o_fn).call(this);
3380
- await this.request("/event/open", {
3381
- method: "POST",
3382
- body: JSON.stringify({
3383
- domain: e2
3384
- })
3385
- });
3386
- }
3387
- // Track game click (pass id of the game that was clicked on)
3388
- async trackClick(e2) {
3389
- const t2 = __privateMethod(this, _PlayLightAPI_instances, o_fn).call(this);
3390
- await this.request("/event/click", {
3391
- method: "POST",
3392
- body: JSON.stringify({
3393
- sourceDomain: t2,
3394
- gameId: e2
3395
- })
3396
- });
3397
- }
3398
- // Like or unlike a game (pass gameId and true to like, false to unlike)
3399
- async toggleLike(e2, t2 = true) {
3400
- const n2 = t2 ? "like" : "unlike", o2 = await this.request(`/rating/${e2}/${n2}`, {
3401
- method: "POST"
3402
- });
3403
- return (o2 == null ? void 0 : o2.success) || false;
3404
- }
3405
- }, _PlayLightAPI_instances = new WeakSet(), o_fn = function() {
3406
- const e2 = window.location.hostname;
3407
- return e2.startsWith("www.") ? e2.substring(4) : e2;
3408
- }, _b)();
3409
3416
  function cubicOut(e2) {
3410
3417
  const t2 = e2 - 1;
3411
3418
  return t2 * t2 * t2 + 1;
@@ -3428,37 +3435,38 @@ function flip(e2, { from: t2, to: n2 }, o2 = {}) {
3428
3435
  t3.parentElement;
3429
3436
  return n3;
3430
3437
  }(e2)
3431
- ), 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, x2 = t2.height / n2.height;
3438
+ ), 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;
3432
3439
  return {
3433
3440
  delay: s2,
3434
3441
  duration: "function" == typeof i2 ? i2(Math.sqrt(b2 * b2 + y2 * y2)) : i2,
3435
3442
  easing: a2,
3436
- css: (e3, t3) => `transform: ${c2} translate(${t3 * b2}px, ${t3 * y2}px) scale(${e3 + t3 * $2}, ${e3 + t3 * x2});`
3443
+ css: (e3, t3) => `transform: ${c2} translate(${t3 * b2}px, ${t3 * y2}px) scale(${e3 + t3 * $2}, ${e3 + t3 * w2});`
3437
3444
  };
3438
3445
  }
3446
+ delegate(["touchstart", "click"]);
3439
3447
  var on_click$2 = (e2, t2, n2) => {
3440
3448
  set(t2, ""), set(n2, !get$1(n2));
3441
- }, tt = /* @__PURE__ */ template('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'), nt = /* @__PURE__ */ template('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'), on_click_1$2 = (e2, t2, n2, o2) => {
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) => {
3442
3450
  t2(n2), set(o2, false);
3443
- }, rt = /* @__PURE__ */ template("<button> </button>"), ot = /* @__PURE__ */ template('<div class="space-y-1 p-1"></div>'), st = /* @__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>'), it = /* @__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>');
3451
+ }, 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>');
3444
3452
  function Navigation(e2, t2) {
3445
3453
  push(t2, true);
3446
- let n2, o2 = prop(t2, "categories", 19, () => []), s2 = prop(t2, "selectedCategory", 15), i2 = state(false), a2 = /* @__PURE__ */ derived(() => s2() || (o2().length > 0 ? o2()[0] : "...")), l2 = state(""), c2 = state(void 0), u2 = /* @__PURE__ */ derived(() => get$1(l2) ? o2().filter((e3) => e3.toLowerCase().includes(get$1(l2).toLowerCase())) : o2());
3454
+ 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());
3447
3455
  const d2 = ["Looking for", "Interested in", "Searching for", "Fancy some", "What about these"];
3448
3456
  let f2, p2 = state(proxy(d2[0]));
3449
3457
  onMount(function updateRandomPhrase() {
3450
3458
  let e3;
3451
3459
  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));
3452
- set(p2, proxy(d2[e3])), f2 = e3;
3460
+ set(p2, d2[e3], true), f2 = e3;
3453
3461
  });
3454
- var _2 = it();
3455
- event("click", O, function handleClickOutside(e3) {
3462
+ var _2 = ut();
3463
+ event("click", D, function handleClickOutside(e3) {
3456
3464
  get$1(c2) && !get$1(c2).contains(e3.target) && n2 && !n2.contains(e3.target) && set(i2, false);
3457
3465
  });
3458
3466
  var g2 = child(_2), v2 = child(g2), h2 = child(v2), m2 = sibling(v2, 2);
3459
3467
  m2.__click = [on_click$2, l2, i2];
3460
3468
  var b2 = child(m2), y2 = child(b2), $2 = sibling(b2, 2);
3461
- const x2 = /* @__PURE__ */ derived(() => get$1(i2) ? "rotate-180 transform" : "");
3469
+ const w2 = user_derived(() => get$1(i2) ? "rotate-180 transform" : "");
3462
3470
  !function Chevron_down(e3, t3) {
3463
3471
  const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
3464
3472
  Icon$1(e3, spread_props({
@@ -3479,11 +3487,11 @@ function Navigation(e2, t2) {
3479
3487
  size: 25,
3480
3488
  strokeWidth: 3,
3481
3489
  get class() {
3482
- return `text-background mt-1 ml-1 ${get$1(x2) ?? ""} transition-transform duration-200`;
3490
+ return `text-background mt-1 ml-1 ${get$1(w2) ?? ""} transition-transform duration-200`;
3483
3491
  }
3484
3492
  }), bind_this(m2, (e3) => n2 = e3, () => n2);
3485
- var w2 = sibling(g2, 2), consequent_2 = (e3) => {
3486
- var t3 = st(), n3 = child(t3), a3 = child(n3), d3 = child(a3);
3493
+ var x2 = sibling(g2, 2), consequent_2 = (e3) => {
3494
+ var t3 = ct(), n3 = child(t3), a3 = child(n3), d3 = child(a3);
3487
3495
  !function Search(e4, t4) {
3488
3496
  const n4 = legacy_rest_props(t4, ["children", "$$slots", "$$events", "$$legacy"]);
3489
3497
  Icon$1(e4, spread_props({
@@ -3510,14 +3518,14 @@ function Navigation(e2, t2) {
3510
3518
  class: "text-muted-foreground"
3511
3519
  });
3512
3520
  var f3 = sibling(d3, 2), p3 = child(sibling(n3, 2)), consequent = (e4) => {
3513
- append(e4, tt());
3521
+ append(e4, st());
3514
3522
  }, alternate = (e4, t4) => {
3515
3523
  var consequent_1 = (e5) => {
3516
- append(e5, nt());
3524
+ append(e5, it());
3517
3525
  }, alternate_1 = (e5) => {
3518
- var t5 = ot();
3526
+ var t5 = lt();
3519
3527
  each(t5, 28, () => get$1(u2), (e6) => e6, (e6, t6) => {
3520
- var n4 = rt();
3528
+ var n4 = at();
3521
3529
  n4.__click = [on_click_1$2, s2, t6, i2];
3522
3530
  var o3 = child(n4);
3523
3531
  template_effect(() => {
@@ -3525,7 +3533,7 @@ function Navigation(e2, t2) {
3525
3533
  }), function animation(e7, t7, n5) {
3526
3534
  var o4, s3, i3, a4 = (
3527
3535
  /** @type {EachItem} */
3528
- ce
3536
+ fe
3529
3537
  ), l3 = null;
3530
3538
  a4.a ?? (a4.a = {
3531
3539
  element: e7,
@@ -3613,7 +3621,7 @@ function Navigation(e2, t2) {
3613
3621
  duration: 250
3614
3622
  })), append(e3, t3);
3615
3623
  };
3616
- if_block(w2, (e3) => {
3624
+ if_block(x2, (e3) => {
3617
3625
  get$1(i2) && e3(consequent_2);
3618
3626
  }), template_effect(() => {
3619
3627
  set_text(h2, get$1(p2)), set_text(y2, get$1(a2));
@@ -3625,10 +3633,10 @@ function Navigation(e2, t2) {
3625
3633
  })), append(e2, _2), pop();
3626
3634
  }
3627
3635
  delegate(["click"]);
3628
- var at = /* @__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>');
3636
+ 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>');
3629
3637
  function restore(e2, t2, n2, o2, s2, i2) {
3630
3638
  set(t2, false), set(n2, true), set(o2, 250), set(s2, 0), i2(250, 0, 250, (e3, t3, n3) => {
3631
- set(o2, e3 * (1 - n3)), set(s2, proxy(n3));
3639
+ set(o2, e3 * (1 - n3)), set(s2, n3, true);
3632
3640
  });
3633
3641
  }
3634
3642
  async function toggleLike(e2, t2, n2, o2) {
@@ -3637,9 +3645,9 @@ async function toggleLike(e2, t2, n2, o2) {
3637
3645
  const s2 = !get$1(n2);
3638
3646
  set(n2, !get$1(n2)), set(o2, get$1(o2) + (s2 ? 1 : -1)), // Save to localStorage
3639
3647
  s2 ? localStorage.setItem(`playlight_${t2.currentGame.id}_liked`, "true") : localStorage.removeItem(`playlight_${t2.currentGame.id}_liked`);
3640
- await et.toggleLike(t2.currentGame.id, s2) || set(o2, get$1(o2) + (s2 ? -1 : 1));
3648
+ await Qe.toggleLike(t2.currentGame.id, s2) || set(o2, get$1(o2) + (s2 ? -1 : 1));
3641
3649
  }
3642
- var lt = /* @__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>'), ct = /* @__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>'), ut = /* @__PURE__ */ template("<!> <!>", 1);
3650
+ 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);
3643
3651
  function CurrentGameDisplay(e2, t2) {
3644
3652
  var _a2;
3645
3653
  push(t2, true);
@@ -3650,9 +3658,9 @@ function CurrentGameDisplay(e2, t2) {
3650
3658
  function drag(e3) {
3651
3659
  if (!get$1(l2)) return;
3652
3660
  const t3 = e3.type.includes("touch") ? e3.touches[0].clientY : e3.clientY, n3 = Math.max(0, t3 - d2);
3653
- set(i2, proxy(n3)), set(a2, proxy(Math.max(0, 1 - n3 / 150))), n3 > 40 && function hide() {
3661
+ set(i2, n3, true), set(a2, Math.max(0, 1 - n3 / 150), true), n3 > 40 && function hide() {
3654
3662
  set(l2, false), animate2(get$1(i2), 250, 250, (e4, t4, n4) => {
3655
- set(i2, e4 + (t4 - e4) * n4), set(a2, proxy(Math.max(0, 1 - 1.5 * n4))), 1 === n4 && (set(o2, false), set(s2, true));
3663
+ set(i2, e4 + (t4 - e4) * n4), set(a2, Math.max(0, 1 - 1.5 * n4), true), 1 === n4 && (set(o2, false), set(s2, true));
3656
3664
  });
3657
3665
  }();
3658
3666
  }
@@ -3672,17 +3680,17 @@ function CurrentGameDisplay(e2, t2) {
3672
3680
  }
3673
3681
  user_effect(() => {
3674
3682
  var _a3, _b2;
3675
- ((_a3 = t2.currentGame) == null ? void 0 : _a3.id) && (set(c2, null !== localStorage.getItem(`playlight_${t2.currentGame.id}_liked`)), set(u2, proxy(((_b2 = t2.currentGame) == null ? void 0 : _b2.likes) || 0)));
3683
+ ((_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));
3676
3684
  });
3677
- var f2 = ut(), p2 = first_child(f2), consequent = (e3) => {
3678
- var o3 = lt();
3685
+ var f2 = _t(), p2 = first_child(f2), consequent = (e3) => {
3686
+ var o3 = ft();
3679
3687
  o3.__mousedown = startDrag, o3.__mousemove = drag, o3.__mouseup = endDrag, o3.__touchstart = startDrag, o3.__touchmove = drag, o3.__touchend = endDrag;
3680
3688
  var s3 = sibling(child(o3), 2), l3 = child(s3);
3681
3689
  let d3;
3682
3690
  var f3 = sibling(l3, 2), p3 = child(f3), _3 = child(sibling(f3, 2)), g2 = child(_3), v2 = sibling(_3, 2);
3683
3691
  v2.__click = [toggleLike, t2, c2, u2];
3684
3692
  var h2 = child(v2);
3685
- const m2 = /* @__PURE__ */ derived(() => get$1(c2) ? "currentColor" : "none");
3693
+ const m2 = user_derived(() => get$1(c2) ? "currentColor" : "none");
3686
3694
  !function Thumbs_up(e4, t3) {
3687
3695
  const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
3688
3696
  Icon$1(e4, spread_props({
@@ -3721,7 +3729,7 @@ function CurrentGameDisplay(e2, t2) {
3721
3729
  t2.currentGame && get$1(o2) && e3(consequent);
3722
3730
  });
3723
3731
  var _2 = sibling(p2, 2), consequent_1 = (e3) => {
3724
- var t3 = ct(), n3 = child(t3);
3732
+ var t3 = pt(), n3 = child(t3);
3725
3733
  n3.__mousedown = [restore, s2, o2, i2, a2, animate2], n3.__touchstart = [restore, s2, o2, i2, a2, animate2], transition(3, n3, () => fly, () => ({
3726
3734
  delay: 150,
3727
3735
  y: 30
@@ -3732,69 +3740,66 @@ function CurrentGameDisplay(e2, t2) {
3732
3740
  }), append(e2, f2), pop();
3733
3741
  }
3734
3742
  function closeDiscoveryOnEmptyClick(e2, t2) {
3735
- e2.target === e2.currentTarget && store_set(Ve, false);
3743
+ e2.target === e2.currentTarget && store_set(Ze, false);
3736
3744
  }
3737
3745
  delegate(["mousedown", "mousemove", "mouseup", "touchstart", "touchmove", "touchend", "click"]);
3738
- var on_click$1 = (e2, t2) => {
3739
- localStorage.getItem("playlight_exit_intent_disabled_by_user") ? localStorage.removeItem("playlight_exit_intent_disabled_by_user") : localStorage.setItem("playlight_exit_intent_disabled_by_user", true), set(t2, !get$1(t2));
3740
- }, dt = /* @__PURE__ */ template('<button class="cursor-pointer truncate text-sm text-nowrap opacity-50 transition hover:opacity-25 max-sm:hidden"><p class="bg-background/50 text-primary p-1 px-2 text-sm"> </p></button>'), on_click_1$1 = (e2, t2) => store_set(Ve, false), ft = /* @__PURE__ */ template('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'), pt = /* @__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>'), _t = /* @__PURE__ */ template("<!> <!>", 1), gt = /* @__PURE__ */ template('<div class="mx-auto flex h-full flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="flex h-10 w-full justify-center"><!></div></div>'), vt = /* @__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 no-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-12skmk8"><!></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>');
3746
+ var on_click$1 = (e2, t2, n2) => {
3747
+ store_set(Je, true), store_set(Ze, false);
3748
+ }, 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="mx-auto flex h-full flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="flex h-10 w-full justify-center"><!></div></div>'), yt = /* @__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 no-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-12skmk8"><!></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>');
3741
3749
  function DiscoveryOverlay(e2, t2) {
3742
3750
  push(t2, true);
3743
- const [n2, o2] = setup_stores(), $discoveryOpen = () => store_get(Ve, "$discoveryOpen", n2);
3744
- let s2, i2 = prop(t2, "showIntentToggle", 3, true), a2 = state(true), l2 = state(void 0), c2 = state(true), u2 = state(false), d2 = state(void 0), f2 = state(proxy([])), p2 = state(proxy([])), _2 = state(1), g2 = state(true), v2 = state(void 0), h2 = state(false);
3751
+ const [n2, o2] = setup_stores(), $discoveryOpen = () => store_get(Ze, "$discoveryOpen", n2), $exitIntentDisabledByUser = () => store_get(Je, "$exitIntentDisabledByUser", n2);
3752
+ let s2, i2 = prop(t2, "showIntentToggle", 3, true), a2 = state(void 0), l2 = state(true), 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);
3745
3753
  async function fetchGames() {
3746
- if (!(get$1(c2) && get$1(_2) > 1 || get$1(u2))) try {
3747
- 1 === get$1(_2) ? set(c2, true) : set(u2, true);
3748
- const e3 = get$1(h2) ? null : get$1(l2), t3 = await et.getSuggestions(e3, get$1(_2)), n3 = (t3 == null ? void 0 : t3.games) || [], o3 = n3.filter((e4) => !get$1(f2).some((t4) => t4.id === e4.id));
3749
- set(f2, proxy([...get$1(f2), ...o3])), n3.length < 10 ? !get$1(h2) && get$1(l2) ? (
3754
+ if (!(get$1(l2) && get$1(p2) > 1 || get$1(c2))) try {
3755
+ 1 === get$1(p2) ? set(l2, true) : set(c2, true);
3756
+ 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));
3757
+ set(d2, [...get$1(d2), ...o3], true), n3.length < 10 ? !get$1(v2) && get$1(a2) ? (
3750
3758
  // Try with all games
3751
- (set(h2, true), set(_2, 1), setTimeout(() => fetchGames(), 100))
3752
- ) : set(g2, false) : set(_2, get$1(_2) + 1);
3759
+ (set(v2, true), set(p2, 1), setTimeout(() => fetchGames(), 100))
3760
+ ) : set(_2, false) : set(p2, get$1(p2) + 1);
3753
3761
  } catch (e3) {
3754
- console.error(e3), Ee.error("Failed to load games: " + e3);
3762
+ console.error(e3), Be.error("Failed to load games: " + e3);
3755
3763
  } finally {
3756
- set(c2, false), set(u2, false), // For Chrome: manually check if element is still in view and should trigger another load
3757
- get$1(g2) && get$1(v2) && setTimeout(() => {
3758
- const e3 = get$1(v2).getBoundingClientRect();
3764
+ set(l2, false), set(c2, false), // For Chrome: manually check if element is still in view and should trigger another load
3765
+ get$1(_2) && get$1(g2) && setTimeout(() => {
3766
+ const e3 = get$1(g2).getBoundingClientRect();
3759
3767
  !(e3.top >= -200 && // Include rootMargin
3760
3768
  e3.left >= 0 && e3.bottom <= window.innerHeight + 200 && // Include rootMargin
3761
- e3.right <= window.innerWidth) || get$1(c2) || get$1(u2) || fetchGames();
3769
+ e3.right <= window.innerWidth) || get$1(l2) || get$1(c2) || fetchGames();
3762
3770
  }, 150);
3763
3771
  }
3764
3772
  }
3765
- onMount(() => (set(a2, !Boolean(localStorage.getItem("playlight_exit_intent_disabled_by_user"))), // Setup scroll observer
3766
- s2 = new IntersectionObserver((e3) => {
3767
- e3[0].isIntersecting && get$1(g2) && !get$1(c2) && !get$1(u2) && fetchGames();
3773
+ onMount(() => (s2 = new IntersectionObserver((e3) => {
3774
+ e3[0].isIntersecting && get$1(_2) && !get$1(l2) && !get$1(c2) && fetchGames();
3768
3775
  }, {
3769
3776
  rootMargin: "200px"
3770
3777
  }), () => s2 == null ? void 0 : s2.disconnect())), onMount(async () => {
3771
- set(d2, proxy(await et.getCurrentGameInfo())), await async function fetchCategories() {
3778
+ set(u2, await Qe.getCurrentGameInfo(), true), await async function fetchCategories() {
3772
3779
  var _a2, _b2, _c2, _d, _e3, _f, _g;
3773
- set(p2, proxy(await et.getCategories())), !get$1(l2) && ((_a2 = get$1(p2)) == null ? void 0 : _a2.length) > 0 && set(l2, proxy(((_b2 = get$1(d2)) == null ? void 0 : _b2.category) && ((_d = get$1(p2)) == null ? void 0 : _d.includes((_c2 = get$1(d2)) == null ? void 0 : _c2.category)) ? (_e3 = get$1(d2)) == null ? void 0 : _e3.category : (_g = get$1(p2)) == null ? void 0 : _g[((_f = get$1(p2)) == null ? void 0 : _f.length) - 1]));
3780
+ 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);
3774
3781
  }();
3775
3782
  }), user_effect(() => {
3776
- get$1(l2) && (set(f2, proxy([])), set(_2, 1), set(g2, true), set(h2, false), set(c2, true), // Delay fetch to prevent rapid requests
3783
+ get$1(a2) && (set(d2, [], true), set(p2, 1), set(_2, true), set(v2, false), set(l2, true), // Delay fetch to prevent rapid requests
3777
3784
  setTimeout(async () => {
3778
- await fetchGames(), get$1(f2).length < 10 && await fetchGames();
3785
+ await fetchGames(), get$1(d2).length < 10 && await fetchGames();
3779
3786
  }, 100));
3780
3787
  }), user_effect(() => {
3781
- get$1(v2) && s2 && s2.observe(get$1(v2));
3788
+ get$1(g2) && s2 && s2.observe(get$1(g2));
3782
3789
  });
3783
- var m2 = vt();
3784
- event("keydown", O, (e3) => {
3785
- "Escape" == e3.key && store_set(Ve, false);
3786
- }), m2.__click = [closeDiscoveryOnEmptyClick, $discoveryOpen];
3787
- var b2 = child(m2), y2 = child(b2), $2 = child(sibling(y2, 2)), consequent = (e3) => {
3788
- var t3 = dt();
3789
- t3.__click = [on_click$1, a2];
3790
- var n3 = child(t3), o3 = child(n3);
3791
- template_effect(() => set_text(o3, get$1(a2) ? "Don't show on exit" : "Show on exit again")), append(e3, t3);
3790
+ var h2 = yt();
3791
+ event("keydown", D, (e3) => {
3792
+ "Escape" == e3.key && store_set(Ze, false);
3793
+ }), h2.__click = [closeDiscoveryOnEmptyClick, $discoveryOpen];
3794
+ var m2 = child(h2), b2 = child(m2), y2 = child(sibling(b2, 2)), consequent = (e3) => {
3795
+ var t3 = gt();
3796
+ child(t3).__click = [on_click$1, $exitIntentDisabledByUser, $discoveryOpen], transition(3, t3, () => blur), append(e3, t3);
3792
3797
  };
3793
- if_block($2, (e3) => {
3794
- i2() && e3(consequent);
3798
+ if_block(y2, (e3) => {
3799
+ i2() && !$exitIntentDisabledByUser() && e3(consequent);
3795
3800
  });
3796
- var x2 = sibling($2, 2);
3797
- x2.__click = [on_click_1$1, $discoveryOpen], function X(e3, t3) {
3801
+ var $2 = sibling(y2, 2);
3802
+ $2.__click = [on_click_1$1, $discoveryOpen], function X(e3, t3) {
3798
3803
  const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
3799
3804
  Icon$1(e3, spread_props({
3800
3805
  name: "x"
@@ -3812,32 +3817,32 @@ function DiscoveryOverlay(e2, t2) {
3812
3817
  default: true
3813
3818
  }
3814
3819
  }));
3815
- }(child(x2), {
3820
+ }(child($2), {
3816
3821
  size: 24,
3817
3822
  strokeWidth: 2.5
3818
3823
  });
3819
- var w2 = sibling(b2, 2);
3824
+ var w2 = sibling(m2, 2);
3820
3825
  Navigation(child(w2), {
3821
3826
  get categories() {
3822
- return get$1(p2);
3827
+ return get$1(f2);
3823
3828
  },
3824
3829
  get selectedCategory() {
3825
- return get$1(l2);
3830
+ return get$1(a2);
3826
3831
  },
3827
3832
  set selectedCategory(e3) {
3828
- set(l2, proxy(e3));
3833
+ set(a2, e3, true);
3829
3834
  }
3830
3835
  });
3831
- var k2 = sibling(w2, 2);
3832
- CurrentGameDisplay(k2, {
3836
+ var x2 = sibling(w2, 2);
3837
+ CurrentGameDisplay(x2, {
3833
3838
  get currentGame() {
3834
- return get$1(d2);
3839
+ return get$1(u2);
3835
3840
  }
3836
3841
  });
3837
- var C2 = sibling(k2, 2);
3838
- C2.__click = [closeDiscoveryOnEmptyClick, $discoveryOpen];
3839
- var S2 = child(C2), consequent_1 = (e3) => {
3840
- var t3 = ft();
3842
+ var k2 = sibling(x2, 2);
3843
+ k2.__click = [closeDiscoveryOnEmptyClick, $discoveryOpen];
3844
+ var C2 = child(k2), consequent_1 = (e3) => {
3845
+ var t3 = vt();
3841
3846
  Loader_circle(child(t3), {
3842
3847
  class: "animate-spin opacity-75",
3843
3848
  size: 50,
@@ -3845,15 +3850,15 @@ function DiscoveryOverlay(e2, t2) {
3845
3850
  }), append(e3, t3);
3846
3851
  }, alternate = (e3, t3) => {
3847
3852
  var consequent_2 = (e4) => {
3848
- append(e4, pt());
3853
+ append(e4, ht());
3849
3854
  }, alternate_1 = (e4) => {
3850
- var t4 = gt(), n3 = child(t4);
3851
- each(n3, 17, () => get$1(f2), index, (e5, t5, n4) => {
3852
- var o4 = _t();
3853
- const s4 = /* @__PURE__ */ derived(() => get$1(f2).findIndex((e6) => e6.category !== get$1(l2)));
3855
+ var t4 = bt(), n3 = child(t4);
3856
+ each(n3, 17, () => get$1(d2), index, (e5, t5, n4) => {
3857
+ var o4 = mt();
3858
+ const s4 = user_derived(() => get$1(d2).findIndex((e6) => e6.category !== get$1(a2)));
3854
3859
  var i3 = first_child(o4), consequent_3 = (e6) => {
3855
3860
  !function GameCategorySeperator(e7) {
3856
- append(e7, at());
3861
+ append(e7, dt());
3857
3862
  }(e6);
3858
3863
  };
3859
3864
  if_block(i3, (e6) => {
@@ -3861,8 +3866,7 @@ function DiscoveryOverlay(e2, t2) {
3861
3866
  }), GameCard(sibling(i3, 2), {
3862
3867
  get game() {
3863
3868
  return get$1(t5);
3864
- },
3865
- onClick: () => et.trackClick(get$1(t5).id)
3869
+ }
3866
3870
  }), append(e5, o4);
3867
3871
  });
3868
3872
  var o3 = sibling(n3, 2), s3 = child(o3), consequent_4 = (e5) => {
@@ -3873,17 +3877,17 @@ function DiscoveryOverlay(e2, t2) {
3873
3877
  });
3874
3878
  };
3875
3879
  if_block(s3, (e5) => {
3876
- get$1(u2) && e5(consequent_4);
3877
- }), bind_this(o3, (e5) => set(v2, e5), () => get$1(v2)), append(e4, t4);
3880
+ get$1(c2) && e5(consequent_4);
3881
+ }), bind_this(o3, (e5) => set(g2, e5), () => get$1(g2)), append(e4, t4);
3878
3882
  };
3879
3883
  if_block(e3, (e4) => {
3880
- 0 !== get$1(f2).length || get$1(c2) ? e4(alternate_1, false) : e4(consequent_2);
3884
+ 0 !== get$1(d2).length || get$1(l2) ? e4(alternate_1, false) : e4(consequent_2);
3881
3885
  }, t3);
3882
3886
  };
3883
- if_block(S2, (e3) => {
3884
- get$1(c2) && 0 === get$1(f2).length ? e3(consequent_1) : e3(alternate, false);
3887
+ if_block(C2, (e3) => {
3888
+ get$1(l2) && 0 === get$1(d2).length ? e3(consequent_1) : e3(alternate, false);
3885
3889
  });
3886
- var M2 = sibling(C2, 2);
3890
+ var M2 = sibling(k2, 2);
3887
3891
  !function External_link(e3, t3) {
3888
3892
  const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
3889
3893
  Icon$1(e3, spread_props({
@@ -3906,33 +3910,48 @@ function DiscoveryOverlay(e2, t2) {
3906
3910
  }));
3907
3911
  }(sibling(child(M2)), {
3908
3912
  size: 14
3909
- }), template_effect(() => set_attribute(y2, "src", store_get(Ke, "$projectUrl", n2) + "/static/images/logo-white-small.png")), transition(3, m2, () => blur, () => ({
3913
+ }), template_effect(() => set_attribute(b2, "src", store_get(Xe, "$projectUrl", n2) + "/static/images/logo-white-small.png")), transition(3, h2, () => blur, () => ({
3910
3914
  duration: 250
3911
- })), append(e2, m2), pop(), o2();
3915
+ })), append(e2, h2), pop(), o2();
3912
3916
  }
3913
3917
  delegate(["click"]);
3914
- var ht = /* @__PURE__ */ template('<div class="fixed top-0 right-0 left-0 h-4"></div>');
3918
+ var $t = /* @__PURE__ */ template('<div class="fixed top-0 right-0 left-0 h-4"></div>');
3919
+ function ExitIntentDetector(e2, t2) {
3920
+ push(t2, true);
3921
+ const [n2, o2] = setup_stores();
3922
+ let s2, i2, a2 = prop(t2, "enabled", 3, true), l2 = false;
3923
+ var c2 = $t();
3924
+ event("mousemove", P, function trackMouse(e3) {
3925
+ l2 || setTimeout(() => l2 = true, 250), s2.contains(e3.target) || (i2 = Date.now());
3926
+ }), c2.__mouseover = function handleBarTrigger() {
3927
+ a2() && !store_get(Je, "$exitIntentDisabledByUser", n2) && l2 && // Trigger exit intent
3928
+ setTimeout(() => {
3929
+ var _a2;
3930
+ i2 < Date.now() - 50 && ((_a2 = t2.onIntent) == null ? void 0 : _a2.call(t2));
3931
+ }, 150);
3932
+ }, bind_this(c2, (e3) => s2 = e3, () => s2), append(e2, c2), pop(), o2();
3933
+ }
3915
3934
  delegate(["mouseover"]);
3916
- var mt = /* @__PURE__ */ template("<!> <!> <!> <!>", 1);
3935
+ var wt = /* @__PURE__ */ template("<!> <!> <!> <!>", 1);
3917
3936
  function App(e2, t2) {
3918
3937
  push(t2, true);
3919
- const [n2, o2] = setup_stores(), $discoveryOpen = () => store_get(Ve, "$discoveryOpen", n2), $config = () => store_get(t2.config, "$config", n2);
3938
+ const [n2, o2] = setup_stores(), $discoveryOpen = () => store_get(Ze, "$discoveryOpen", n2), $config = () => store_get(t2.config, "$config", n2);
3920
3939
  function openDiscovery() {
3921
- store_set(Ve, true), et.trackOpen();
3940
+ store_set(Ze, true), Qe.trackOpen();
3922
3941
  }
3923
3942
  let s2;
3924
- Ve.subscribe((e3) => {
3943
+ Ze.subscribe((e3) => {
3925
3944
  try {
3926
3945
  e3 ? (s2 = document.body.style.overflow, document.body.style.overflow = "hidden") : document.body.style.overflow = s2;
3927
3946
  } catch (e4) {
3928
3947
  console.error("Failed to toggle body overflow style:", e4);
3929
3948
  }
3930
3949
  });
3931
- var i2 = mt(), a2 = first_child(i2);
3932
- const l2 = /* @__PURE__ */ derived(() => {
3950
+ var i2 = wt(), a2 = first_child(i2);
3951
+ const l2 = user_derived(() => {
3933
3952
  var _a2, _b2;
3934
3953
  return (_b2 = (_a2 = $config()) == null ? void 0 : _a2.button) == null ? void 0 : _b2.position;
3935
- }), c2 = /* @__PURE__ */ derived(() => {
3954
+ }), c2 = user_derived(() => {
3936
3955
  var _a2, _b2;
3937
3956
  return (_b2 = (_a2 = $config()) == null ? void 0 : _a2.button) == null ? void 0 : _b2.visible;
3938
3957
  });
@@ -3946,7 +3965,7 @@ function App(e2, t2) {
3946
3965
  onClick: openDiscovery
3947
3966
  });
3948
3967
  var u2 = sibling(a2, 2), consequent = (e3) => {
3949
- const t3 = /* @__PURE__ */ derived(() => {
3968
+ const t3 = user_derived(() => {
3950
3969
  var _a2, _b2;
3951
3970
  return (_b2 = (_a2 = $config()) == null ? void 0 : _a2.exitIntent) == null ? void 0 : _b2.enabled;
3952
3971
  });
@@ -3960,24 +3979,11 @@ function App(e2, t2) {
3960
3979
  $discoveryOpen() && e3(consequent);
3961
3980
  });
3962
3981
  var d2 = sibling(u2, 2);
3963
- const f2 = /* @__PURE__ */ derived(() => {
3982
+ const f2 = user_derived(() => {
3964
3983
  var _a2, _b2;
3965
3984
  return (_b2 = (_a2 = $config()) == null ? void 0 : _a2.exitIntent) == null ? void 0 : _b2.enabled;
3966
3985
  });
3967
- !function ExitIntentDetector(e3, t3) {
3968
- push(t3, true);
3969
- let n3, o3, s3 = prop(t3, "enabled", 3, true), i3 = false;
3970
- var a3 = ht();
3971
- event("mousemove", T, function trackMouse(e4) {
3972
- i3 || setTimeout(() => i3 = true, 250), n3.contains(e4.target) || (o3 = Date.now());
3973
- }), a3.__mouseover = function handleBarTrigger() {
3974
- s3() && !localStorage.getItem("playlight_exit_intent_disabled_by_user") && i3 && // Trigger exit intent
3975
- setTimeout(() => {
3976
- var _a2;
3977
- o3 < Date.now() - 50 && ((_a2 = t3.onIntent) == null ? void 0 : _a2.call(t3));
3978
- }, 150);
3979
- }, bind_this(a3, (e4) => n3 = e4, () => n3), append(e3, a3), pop();
3980
- }(d2, {
3986
+ ExitIntentDetector(d2, {
3981
3987
  get enabled() {
3982
3988
  return get$1(f2);
3983
3989
  },
@@ -3986,7 +3992,7 @@ function App(e2, t2) {
3986
3992
  }
3987
3993
  }), Toaster(sibling(d2, 2), {}), append(e2, i2), pop(), o2();
3988
3994
  }
3989
- const bt = {
3995
+ const xt = {
3990
3996
  button: {
3991
3997
  position: "bottom-right",
3992
3998
  visible: true
@@ -3995,11 +4001,11 @@ const bt = {
3995
4001
  enabled: true
3996
4002
  }
3997
4003
  };
3998
- let yt = {
3999
- ...bt
4004
+ let kt = {
4005
+ ...xt
4000
4006
  };
4001
4007
  function initializeConfig(e2 = {}) {
4002
- return yt = deepMerge(bt, e2), yt;
4008
+ return kt = deepMerge(xt, e2), kt;
4003
4009
  }
4004
4010
  function deepMerge(e2, t2) {
4005
4011
  const n2 = {
@@ -4016,9 +4022,9 @@ function deepMerge(e2, t2) {
4016
4022
  function isObject(e2) {
4017
4023
  return e2 && "object" == typeof e2 && !Array.isArray(e2);
4018
4024
  }
4019
- var $t = /* @__PURE__ */ template("<button><!></button>");
4025
+ var Ct = /* @__PURE__ */ template("<button><!></button>");
4020
4026
  function Button(e2, t2) {
4021
- var n2 = $t();
4027
+ var n2 = Ct();
4022
4028
  n2.__click = function(...e3) {
4023
4029
  var _a2;
4024
4030
  (_a2 = t2.onclick) == null ? void 0 : _a2.apply(this, e3);
@@ -4029,36 +4035,36 @@ function Button(e2, t2) {
4029
4035
  /** @type {SnippetFn} */
4030
4036
  i2(s2, ...n3)
4031
4037
  )));
4032
- }, $);
4038
+ }, w);
4033
4039
  }(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);
4034
4040
  }
4035
4041
  delegate(["click"]);
4036
- var xt = /* @__PURE__ */ template('<div class="flex h-62 w-full items-center justify-center"><!></div>'), wt = /* @__PURE__ */ template('<div class="snap-center px-2"><!></div>'), kt = /* @__PURE__ */ template('<!> <div class="bg-background/85 my-auto mr-3 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({
4042
+ var Mt = /* @__PURE__ */ template('<div class="flex h-62 w-full items-center justify-center"><!></div>'), St = /* @__PURE__ */ template('<div class="snap-center px-2"><!></div>'), It = /* @__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({
4037
4043
  left: 2 * -get$1(n2),
4038
4044
  behavior: "smooth"
4039
- }), Ct = /* @__PURE__ */ template('<button class="bg-background/85 hover:bg-foreground hover:text-background text-foreground absolute top-1/2 left-2 z-20 -translate-y-1/2 transform border p-1 shadow-xl backdrop-blur-xl transition max-sm:hidden"><!></button>'), on_click_1 = (e2, t2, n2) => get$1(t2).scrollBy({
4045
+ }), Tt = /* @__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({
4040
4046
  left: 2 * get$1(n2),
4041
4047
  behavior: "smooth"
4042
- }), St = /* @__PURE__ */ template('<button class="bg-background/85 hover:bg-foreground hover:text-background text-foreground absolute top-1/2 right-2 z-20 -translate-y-1/2 transform border p-1 shadow-xl backdrop-blur-xl transition max-sm:hidden"><!></button>'), Mt = /* @__PURE__ */ template("<!> <!>", 1), It = /* @__PURE__ */ template('<div class="playlight-sdk-container svelte-hgmfs5"><div class="h-full w-full px-3"><div class="fade-edges-mask no-scrollbar relative flex h-full w-full snap-x gap-2 overflow-x-auto svelte-hgmfs5"><!></div> <!></div></div>');
4048
+ }), Ot = /* @__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), Pt = /* @__PURE__ */ template('<div class="playlight-sdk-container svelte-14atk0f"><div class="h-full w-full"><div class="fade-edges-mask no-scrollbar relative flex h-full w-full snap-x gap-2 overflow-x-auto svelte-14atk0f"><!></div> <!></div></div>');
4043
4049
  function WidgetCarousel(e2, t2) {
4044
4050
  push(t2, true);
4045
4051
  const [n2, o2] = setup_stores();
4046
4052
  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);
4047
4053
  onMount(async () => {
4048
4054
  var _a2, _b2, _c2, _d;
4049
- if (set(a2, proxy(await et.getCategories())), ((_a2 = get$1(a2)) == null ? void 0 : _a2.length) > 0) {
4050
- const e3 = await et.getCurrentGameInfo();
4051
- set(l2, proxy((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]));
4055
+ if (set(a2, await Qe.getCategories(), true), ((_a2 = get$1(a2)) == null ? void 0 : _a2.length) > 0) {
4056
+ const e3 = await Qe.getCurrentGameInfo();
4057
+ 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);
4052
4058
  }
4053
4059
  await async function fetchGames() {
4054
4060
  try {
4055
4061
  set(s2, true);
4056
- let e3 = await et.getSuggestions(get$1(l2), 1), t3 = (e3 == null ? void 0 : e3.games) || [];
4062
+ let e3 = await Qe.getSuggestions(get$1(l2), 1), t3 = (e3 == null ? void 0 : e3.games) || [];
4057
4063
  if (t3.length < 10 && get$1(l2)) {
4058
- const e4 = await et.getSuggestions(null, 1), n3 = ((e4 == null ? void 0 : e4.games) || []).filter((e5) => !t3.some((t4) => t4.id === e5.id));
4064
+ const e4 = await Qe.getSuggestions(null, 1), n3 = ((e4 == null ? void 0 : e4.games) || []).filter((e5) => !t3.some((t4) => t4.id === e5.id));
4059
4065
  t3 = [...t3, ...n3];
4060
4066
  }
4061
- set(i2, proxy(t3.slice(0, 10)));
4067
+ set(i2, t3.slice(0, 10), true);
4062
4068
  } catch (e3) {
4063
4069
  console.error("Failed to load games for widget:", e3);
4064
4070
  } finally {
@@ -4066,25 +4072,24 @@ function WidgetCarousel(e2, t2) {
4066
4072
  }
4067
4073
  }();
4068
4074
  });
4069
- var p2 = It(), _2 = child(p2), g2 = child(_2), v2 = child(g2), consequent = (e3) => {
4070
- var t3 = xt();
4075
+ var p2 = Pt(), _2 = child(p2), g2 = child(_2), v2 = child(g2), consequent = (e3) => {
4076
+ var t3 = Mt();
4071
4077
  Loader_circle(child(t3), {
4072
4078
  class: "animate-spin opacity-75",
4073
4079
  size: 30,
4074
4080
  strokeWidth: 2.5
4075
4081
  }), append(e3, t3);
4076
4082
  }, alternate = (e3) => {
4077
- var t3 = kt(), n3 = first_child(t3);
4083
+ var t3 = It(), n3 = first_child(t3);
4078
4084
  each(n3, 17, () => get$1(i2), index, (e4, t4) => {
4079
- var n4 = wt();
4085
+ var n4 = St();
4080
4086
  GameCard(child(n4), {
4081
4087
  get game() {
4082
4088
  return get$1(t4);
4083
4089
  },
4084
- compact: true,
4085
- onClick: () => et.trackClick(get$1(t4).id)
4090
+ compact: true
4086
4091
  }), function bind_element_size(e5, t5, n5) {
4087
- var o4 = he.observe(e5, () => n5(e5[t5]));
4092
+ var o4 = ye.observe(e5, () => n5(e5[t5]));
4088
4093
  effect(() => (
4089
4094
  // The update could contain reads which should be ignored
4090
4095
  (untrack(() => n5(e5[t5])), o4)
@@ -4094,7 +4099,7 @@ function WidgetCarousel(e2, t2) {
4094
4099
  var o3 = sibling(n3, 2);
4095
4100
  Button(sibling(child(o3), 2), {
4096
4101
  onclick: () => {
4097
- store_set(Ve, true), et.trackOpen();
4102
+ store_set(Ze, true), Qe.trackOpen();
4098
4103
  },
4099
4104
  children: (e4, t4) => {
4100
4105
  append(e4, text("See all"));
@@ -4105,8 +4110,8 @@ function WidgetCarousel(e2, t2) {
4105
4110
  get$1(s2) ? e3(consequent) : e3(alternate, false);
4106
4111
  }), bind_this(g2, (e3) => set(c2, e3), () => get$1(c2));
4107
4112
  var h2 = sibling(g2, 2), consequent_3 = (e3) => {
4108
- var t3 = Mt(), n3 = first_child(t3), consequent_1 = (e4) => {
4109
- var t4 = Ct();
4113
+ var t3 = qt(), n3 = first_child(t3), consequent_1 = (e4) => {
4114
+ var t4 = Tt();
4110
4115
  t4.__click = [on_click, c2, u2], function Chevron_left(e5, t5) {
4111
4116
  const n4 = legacy_rest_props(t5, ["children", "$$slots", "$$events", "$$legacy"]);
4112
4117
  Icon$1(e5, spread_props({
@@ -4125,14 +4130,14 @@ function WidgetCarousel(e2, t2) {
4125
4130
  }));
4126
4131
  }(child(t4), {
4127
4132
  size: 22,
4128
- strokeWidth: 2.25
4133
+ strokeWidth: 2.75
4129
4134
  }), transition(3, t4, () => blur), append(e4, t4);
4130
4135
  };
4131
4136
  if_block(n3, (e4) => {
4132
4137
  get$1(d2) && e4(consequent_1);
4133
4138
  });
4134
4139
  var o3 = sibling(n3, 2), consequent_2 = (e4) => {
4135
- var t4 = St();
4140
+ var t4 = Ot();
4136
4141
  t4.__click = [on_click_1, c2, u2], function Chevron_right(e5, t5) {
4137
4142
  const n4 = legacy_rest_props(t5, ["children", "$$slots", "$$events", "$$legacy"]);
4138
4143
  Icon$1(e5, spread_props({
@@ -4151,7 +4156,7 @@ function WidgetCarousel(e2, t2) {
4151
4156
  }));
4152
4157
  }(child(t4), {
4153
4158
  size: 22,
4154
- strokeWidth: 2.25
4159
+ strokeWidth: 2.75
4155
4160
  }), transition(3, t4, () => blur), append(e4, t4);
4156
4161
  };
4157
4162
  if_block(o3, (e4) => {
@@ -4178,13 +4183,13 @@ function initWidgets() {
4178
4183
  }
4179
4184
  }
4180
4185
  delegate(["click"]);
4181
- const Tt = new /**
4186
+ const Dt = new /**
4182
4187
  * The PlaylightSDK class
4183
4188
  */
4184
4189
  (_c = class {
4185
4190
  constructor() {
4186
4191
  __privateAdd(this, _PlaylightSDK_instances);
4187
- this.container = null, this.isInitialized = false, this.config = writable(null), this.api = et;
4192
+ this.container = null, this.isInitialized = false, this.config = writable(null), this.api = Qe;
4188
4193
  }
4189
4194
  /**
4190
4195
  * Initialize Playlight
@@ -4215,7 +4220,7 @@ const Tt = new /**
4215
4220
  * @param {boolean} [value=true] - Whether to show the discovery
4216
4221
  */
4217
4222
  setDiscovery(e2 = true) {
4218
- this.isInitialized && (Ve.set(e2), e2 && et.trackOpen());
4223
+ this.isInitialized && (Ze.set(e2), e2 && Qe.trackOpen());
4219
4224
  }
4220
4225
  /**
4221
4226
  * Update the configuration
@@ -4242,8 +4247,8 @@ s_fn = function() {
4242
4247
  console.error("Playlight error occured during mount:", e2);
4243
4248
  }
4244
4249
  }, _c)();
4245
- "undefined" != typeof window && (window.playlightSDK = Tt);
4250
+ "undefined" != typeof window && (window.playlightSDK = Dt);
4246
4251
  export {
4247
- Tt as default
4252
+ Dt as default
4248
4253
  };
4249
4254
  //# sourceMappingURL=playlight-sdk.es.js.map