tabby-rdp 0.3.0 → 0.3.2

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.
@@ -10,124 +10,122 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
10
10
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
11
11
  var _t2, _e2, _a, _b;
12
12
  typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add("5");
13
- const dr = 2, fr = "[", hr = "]", Je = {}, W = Symbol(), si = false, Z = 2, gi = 4, St = 8, Yt = 16, ye = 32, Ie = 64, pt = 128, G = 256, vt = 512, j = 1024, Ce = 2048, Ke = 4096, wt = 8192, Dt = 16384, br = 32768, pr = 65536, vr = 1 << 19, _i = 1 << 20, ct = Symbol("$state"), wr = Symbol("legacy props");
14
- var xi = Array.isArray, mr = Array.prototype.indexOf, gr = Array.from, mt = Object.keys, gt = Object.defineProperty, ze = Object.getOwnPropertyDescriptor, _r = Object.getOwnPropertyDescriptors, xr = Object.prototype, yr = Array.prototype, yi = Object.getPrototypeOf;
15
- const dt = () => {
16
- };
17
- function Ci(t) {
13
+ const nr = 2, sr = "[", or = "]", Qe = {}, K = Symbol(), ii = false, Z = 2, vi = 4, kt = 8, Ht = 16, ye = 32, Ie = 64, bt = 128, G = 256, pt = 512, H = 1024, Ce = 2048, Ke = 4096, vt = 8192, St = 16384, ar = 32768, lr = 65536, ur = 1 << 19, mi = 1 << 20, dt = Symbol("$state"), dr = Symbol("legacy props");
14
+ var wi = Array.isArray, cr = Array.prototype.indexOf, fr = Array.from, mt = Object.keys, wt = Object.defineProperty, ze = Object.getOwnPropertyDescriptor, hr = Object.getOwnPropertyDescriptors, br = Object.prototype, pr = Array.prototype, gi = Object.getPrototypeOf;
15
+ function _i(t) {
18
16
  for (var e = 0; e < t.length; e++)
19
17
  t[e]();
20
18
  }
21
- let tt = [], It = [];
22
- function Ei() {
19
+ let tt = [], zt = [];
20
+ function xi() {
23
21
  var t = tt;
24
- tt = [], Ci(t);
22
+ tt = [], _i(t);
25
23
  }
26
- function Cr() {
27
- var t = It;
28
- It = [], Ci(t);
24
+ function vr() {
25
+ var t = zt;
26
+ zt = [], _i(t);
29
27
  }
30
- function Xt(t) {
31
- tt.length === 0 && queueMicrotask(Ei), tt.push(t);
28
+ function jt(t) {
29
+ tt.length === 0 && queueMicrotask(xi), tt.push(t);
32
30
  }
33
- function oi() {
34
- tt.length > 0 && Ei(), It.length > 0 && Cr();
31
+ function ri() {
32
+ tt.length > 0 && xi(), zt.length > 0 && vr();
35
33
  }
36
- function ki(t) {
34
+ function yi(t) {
37
35
  return t === this.v;
38
36
  }
39
- function Si(t, e) {
37
+ function mr(t, e) {
40
38
  return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
41
39
  }
42
- function Er(t) {
43
- return !Si(t, this.v);
40
+ function wr(t) {
41
+ return !mr(t, this.v);
44
42
  }
45
- function kr(t) {
43
+ function gr(t) {
46
44
  throw new Error("https://svelte.dev/e/effect_in_teardown");
47
45
  }
48
- function Sr() {
46
+ function _r() {
49
47
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
50
48
  }
51
- function Dr(t) {
49
+ function xr(t) {
52
50
  throw new Error("https://svelte.dev/e/effect_orphan");
53
51
  }
54
- function Tr() {
52
+ function yr() {
55
53
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
56
54
  }
57
- function Rr() {
55
+ function Cr() {
58
56
  throw new Error("https://svelte.dev/e/hydration_failed");
59
57
  }
60
- function $r() {
58
+ function Er() {
61
59
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
62
60
  }
63
- function Ar() {
61
+ function kr() {
64
62
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
65
63
  }
66
- function Or() {
64
+ function Sr() {
67
65
  throw new Error("https://svelte.dev/e/state_unsafe_local_read");
68
66
  }
69
- function Lr() {
67
+ function Dr() {
70
68
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
71
69
  }
72
- let Mr = false;
73
- function re(t, e) {
70
+ let Tr = false;
71
+ function se(t, e) {
74
72
  var i = {
75
73
  f: 0,
76
74
  // TODO ideally we could skip this altogether, but it causes type errors
77
75
  v: t,
78
76
  reactions: null,
79
- equals: ki,
77
+ equals: yi,
80
78
  rv: 0,
81
79
  wv: 0
82
80
  };
83
81
  return i;
84
82
  }
85
83
  function Ft(t) {
86
- return /* @__PURE__ */ Fr(re(t));
84
+ return /* @__PURE__ */ Rr(se(t));
87
85
  }
88
86
  // @__NO_SIDE_EFFECTS__
89
- function Di(t, e = false) {
90
- const i = re(t);
91
- return e || (i.equals = Er), i;
87
+ function Ci(t, e = false) {
88
+ const i = se(t);
89
+ return e || (i.equals = wr), i;
92
90
  }
93
91
  // @__NO_SIDE_EFFECTS__
94
- function Fr(t) {
95
- return k !== null && !X && (k.f & Z) !== 0 && (ne === null ? zr([t]) : ne.push(t)), t;
92
+ function Rr(t) {
93
+ return k !== null && !X && (k.f & Z) !== 0 && (oe === null ? Fr([t]) : oe.push(t)), t;
96
94
  }
97
- function H(t, e) {
98
- return k !== null && !X && Xi() && (k.f & (Z | Yt)) !== 0 && // If the source was created locally within the current derived, then
95
+ function q(t, e) {
96
+ return k !== null && !X && Hi() && (k.f & (Z | Ht)) !== 0 && // If the source was created locally within the current derived, then
99
97
  // we allow the mutation.
100
- (ne === null || !ne.includes(t)) && Lr(), Nr(t, e);
98
+ (oe === null || !oe.includes(t)) && Dr(), $r(t, e);
101
99
  }
102
- function Nr(t, e) {
103
- return t.equals(e) || (t.v, t.v = e, t.wv = Ui(), Ti(t, Ce), D !== null && (D.f & j) !== 0 && (D.f & (ye | Ie)) === 0 && (ae === null ? Ir([t]) : ae.push(t))), e;
100
+ function $r(t, e) {
101
+ return t.equals(e) || (t.v, t.v = e, t.wv = Fi(), Ei(t, Ce), D !== null && (D.f & H) !== 0 && (D.f & (ye | Ie)) === 0 && (de === null ? Mr([t]) : de.push(t))), e;
104
102
  }
105
- function Ti(t, e) {
103
+ function Ei(t, e) {
106
104
  var i = t.reactions;
107
105
  if (i !== null)
108
106
  for (var r = i.length, n = 0; n < r; n++) {
109
- var o = i[n], c = o.f;
110
- (c & Ce) === 0 && (ue(o, e), (c & (j | G)) !== 0 && ((c & Z) !== 0 ? Ti(
107
+ var o = i[n], d = o.f;
108
+ (d & Ce) === 0 && (fe(o, e), (d & (H | G)) !== 0 && ((d & Z) !== 0 ? Ei(
111
109
  /** @type {Derived} */
112
110
  o,
113
111
  Ke
114
- ) : ei(
112
+ ) : Zt(
115
113
  /** @type {Effect} */
116
114
  o
117
115
  )));
118
116
  }
119
117
  }
120
118
  // @__NO_SIDE_EFFECTS__
121
- function Ri(t) {
119
+ function ki(t) {
122
120
  var e = Z | Ce, i = k !== null && (k.f & Z) !== 0 ? (
123
121
  /** @type {Derived} */
124
122
  k
125
123
  ) : null;
126
- return D === null || i !== null && (i.f & G) !== 0 ? e |= G : D.f |= _i, {
127
- ctx: U,
124
+ return D === null || i !== null && (i.f & G) !== 0 ? e |= G : D.f |= mi, {
125
+ ctx: B,
128
126
  deps: null,
129
127
  effects: null,
130
- equals: ki,
128
+ equals: yi,
131
129
  f: e,
132
130
  fn: t,
133
131
  reactions: null,
@@ -140,7 +138,7 @@ function Ri(t) {
140
138
  parent: i ?? D
141
139
  };
142
140
  }
143
- function $i(t) {
141
+ function Si(t) {
144
142
  var e = t.effects;
145
143
  if (e !== null) {
146
144
  t.effects = null;
@@ -151,7 +149,7 @@ function $i(t) {
151
149
  );
152
150
  }
153
151
  }
154
- function Pr(t) {
152
+ function Ar(t) {
155
153
  for (var e = t.parent; e !== null; ) {
156
154
  if ((e.f & Z) === 0)
157
155
  return (
@@ -162,200 +160,200 @@ function Pr(t) {
162
160
  }
163
161
  return null;
164
162
  }
165
- function Ur(t) {
163
+ function Or(t) {
166
164
  var e, i = D;
167
- _e(Pr(t));
165
+ _e(Ar(t));
168
166
  try {
169
- $i(t), e = zi(t);
167
+ Si(t), e = Ni(t);
170
168
  } finally {
171
169
  _e(i);
172
170
  }
173
171
  return e;
174
172
  }
175
- function Ai(t) {
176
- var e = Ur(t), i = (me || (t.f & G) !== 0) && t.deps !== null ? Ke : j;
177
- ue(t, i), t.equals(e) || (t.v = e, t.wv = Ui());
173
+ function Di(t) {
174
+ var e = Or(t), i = (we || (t.f & G) !== 0) && t.deps !== null ? Ke : H;
175
+ fe(t, i), t.equals(e) || (t.v = e, t.wv = Fi());
178
176
  }
179
- function Zt(t) {
177
+ function Gt(t) {
180
178
  console.warn("https://svelte.dev/e/hydration_mismatch");
181
179
  }
182
- let Q = false;
180
+ let J = false;
183
181
  function at(t) {
184
- Q = t;
182
+ J = t;
185
183
  }
186
- let z;
187
- function _t(t) {
184
+ let I;
185
+ function gt(t) {
188
186
  if (t === null)
189
- throw Zt(), Je;
190
- return z = t;
187
+ throw Gt(), Qe;
188
+ return I = t;
191
189
  }
192
- function Oi() {
193
- return _t(
190
+ function Ti() {
191
+ return gt(
194
192
  /** @type {TemplateNode} */
195
- /* @__PURE__ */ Tt(z)
193
+ /* @__PURE__ */ Dt(I)
196
194
  );
197
195
  }
198
- function Nt(t) {
199
- if (Q) {
200
- if (/* @__PURE__ */ Tt(z) !== null)
201
- throw Zt(), Je;
202
- z = t;
196
+ function Mt(t) {
197
+ if (J) {
198
+ if (/* @__PURE__ */ Dt(I) !== null)
199
+ throw Gt(), Qe;
200
+ I = t;
203
201
  }
204
202
  }
205
- function Se(t, e = null, i) {
206
- if (typeof t != "object" || t === null || ct in t)
203
+ function De(t, e = null, i) {
204
+ if (typeof t != "object" || t === null || dt in t)
207
205
  return t;
208
- const r = yi(t);
209
- if (r !== xr && r !== yr)
206
+ const r = gi(t);
207
+ if (r !== br && r !== pr)
210
208
  return t;
211
- var n = /* @__PURE__ */ new Map(), o = xi(t), c = re(0);
212
- o && n.set("length", re(
209
+ var n = /* @__PURE__ */ new Map(), o = wi(t), d = se(0);
210
+ o && n.set("length", se(
213
211
  /** @type {any[]} */
214
212
  t.length
215
213
  ));
216
- var f;
214
+ var b;
217
215
  return new Proxy(
218
216
  /** @type {any} */
219
217
  t,
220
218
  {
221
- defineProperty(h, d, p) {
222
- (!("value" in p) || p.configurable === false || p.enumerable === false || p.writable === false) && $r();
223
- var w = n.get(d);
224
- return w === void 0 ? (w = re(p.value), n.set(d, w)) : H(w, Se(p.value, f)), true;
219
+ defineProperty(c, p, h) {
220
+ (!("value" in h) || h.configurable === false || h.enumerable === false || h.writable === false) && Er();
221
+ var m = n.get(p);
222
+ return m === void 0 ? (m = se(h.value), n.set(p, m)) : q(m, De(h.value, b)), true;
225
223
  },
226
- deleteProperty(h, d) {
227
- var p = n.get(d);
228
- if (p === void 0)
229
- d in h && n.set(d, re(W));
224
+ deleteProperty(c, p) {
225
+ var h = n.get(p);
226
+ if (h === void 0)
227
+ p in c && n.set(p, se(K));
230
228
  else {
231
- if (o && typeof d == "string") {
232
- var w = (
229
+ if (o && typeof p == "string") {
230
+ var m = (
233
231
  /** @type {Source<number>} */
234
232
  n.get("length")
235
- ), s = Number(d);
236
- Number.isInteger(s) && s < w.v && H(w, s);
233
+ ), s = Number(p);
234
+ Number.isInteger(s) && s < m.v && q(m, s);
237
235
  }
238
- H(p, W), ai(c);
236
+ q(h, K), ni(d);
239
237
  }
240
238
  return true;
241
239
  },
242
- get(h, d, p) {
240
+ get(c, p, h) {
243
241
  var _a2;
244
- if (d === ct)
242
+ if (p === dt)
245
243
  return t;
246
- var w = n.get(d), s = d in h;
247
- if (w === void 0 && (!s || ((_a2 = ze(h, d)) == null ? void 0 : _a2.writable)) && (w = re(Se(s ? h[d] : W, f)), n.set(d, w)), w !== void 0) {
248
- var a = P(w);
249
- return a === W ? void 0 : a;
244
+ var m = n.get(p), s = p in c;
245
+ if (m === void 0 && (!s || ((_a2 = ze(c, p)) == null ? void 0 : _a2.writable)) && (m = se(De(s ? c[p] : K, b)), n.set(p, m)), m !== void 0) {
246
+ var l = U(m);
247
+ return l === K ? void 0 : l;
250
248
  }
251
- return Reflect.get(h, d, p);
249
+ return Reflect.get(c, p, h);
252
250
  },
253
- getOwnPropertyDescriptor(h, d) {
254
- var p = Reflect.getOwnPropertyDescriptor(h, d);
255
- if (p && "value" in p) {
256
- var w = n.get(d);
257
- w && (p.value = P(w));
258
- } else if (p === void 0) {
259
- var s = n.get(d), a = s == null ? void 0 : s.v;
260
- if (s !== void 0 && a !== W)
251
+ getOwnPropertyDescriptor(c, p) {
252
+ var h = Reflect.getOwnPropertyDescriptor(c, p);
253
+ if (h && "value" in h) {
254
+ var m = n.get(p);
255
+ m && (h.value = U(m));
256
+ } else if (h === void 0) {
257
+ var s = n.get(p), l = s == null ? void 0 : s.v;
258
+ if (s !== void 0 && l !== K)
261
259
  return {
262
260
  enumerable: true,
263
261
  configurable: true,
264
- value: a,
262
+ value: l,
265
263
  writable: true
266
264
  };
267
265
  }
268
- return p;
266
+ return h;
269
267
  },
270
- has(h, d) {
268
+ has(c, p) {
271
269
  var _a2;
272
- if (d === ct)
270
+ if (p === dt)
273
271
  return true;
274
- var p = n.get(d), w = p !== void 0 && p.v !== W || Reflect.has(h, d);
275
- if (p !== void 0 || D !== null && (!w || ((_a2 = ze(h, d)) == null ? void 0 : _a2.writable))) {
276
- p === void 0 && (p = re(w ? Se(h[d], f) : W), n.set(d, p));
277
- var s = P(p);
278
- if (s === W)
272
+ var h = n.get(p), m = h !== void 0 && h.v !== K || Reflect.has(c, p);
273
+ if (h !== void 0 || D !== null && (!m || ((_a2 = ze(c, p)) == null ? void 0 : _a2.writable))) {
274
+ h === void 0 && (h = se(m ? De(c[p], b) : K), n.set(p, h));
275
+ var s = U(h);
276
+ if (s === K)
279
277
  return false;
280
278
  }
281
- return w;
279
+ return m;
282
280
  },
283
- set(h, d, p, w) {
281
+ set(c, p, h, m) {
284
282
  var _a2;
285
- var s = n.get(d), a = d in h;
286
- if (o && d === "length")
287
- for (var l = p; l < /** @type {Source<number>} */
288
- s.v; l += 1) {
289
- var u = n.get(l + "");
290
- u !== void 0 ? H(u, W) : l in h && (u = re(W), n.set(l + "", u));
283
+ var s = n.get(p), l = p in c;
284
+ if (o && p === "length")
285
+ for (var a = h; a < /** @type {Source<number>} */
286
+ s.v; a += 1) {
287
+ var u = n.get(a + "");
288
+ u !== void 0 ? q(u, K) : a in c && (u = se(K), n.set(a + "", u));
291
289
  }
292
- s === void 0 ? (!a || ((_a2 = ze(h, d)) == null ? void 0 : _a2.writable)) && (s = re(void 0), H(s, Se(p, f)), n.set(d, s)) : (a = s.v !== W, H(s, Se(p, f)));
293
- var b = Reflect.getOwnPropertyDescriptor(h, d);
294
- if ((b == null ? void 0 : b.set) && b.set.call(w, p), !a) {
295
- if (o && typeof d == "string") {
290
+ s === void 0 ? (!l || ((_a2 = ze(c, p)) == null ? void 0 : _a2.writable)) && (s = se(void 0), q(s, De(h, b)), n.set(p, s)) : (l = s.v !== K, q(s, De(h, b)));
291
+ var f = Reflect.getOwnPropertyDescriptor(c, p);
292
+ if ((f == null ? void 0 : f.set) && f.set.call(m, h), !l) {
293
+ if (o && typeof p == "string") {
296
294
  var $ = (
297
295
  /** @type {Source<number>} */
298
296
  n.get("length")
299
- ), M = Number(d);
300
- Number.isInteger(M) && M >= $.v && H($, M + 1);
297
+ ), A = Number(p);
298
+ Number.isInteger(A) && A >= $.v && q($, A + 1);
301
299
  }
302
- ai(c);
300
+ ni(d);
303
301
  }
304
302
  return true;
305
303
  },
306
- ownKeys(h) {
307
- P(c);
308
- var d = Reflect.ownKeys(h).filter((s) => {
309
- var a = n.get(s);
310
- return a === void 0 || a.v !== W;
304
+ ownKeys(c) {
305
+ U(d);
306
+ var p = Reflect.ownKeys(c).filter((s) => {
307
+ var l = n.get(s);
308
+ return l === void 0 || l.v !== K;
311
309
  });
312
- for (var [p, w] of n)
313
- w.v !== W && !(p in h) && d.push(p);
314
- return d;
310
+ for (var [h, m] of n)
311
+ m.v !== K && !(h in c) && p.push(h);
312
+ return p;
315
313
  },
316
314
  setPrototypeOf() {
317
- Ar();
315
+ kr();
318
316
  }
319
317
  }
320
318
  );
321
319
  }
322
- function ai(t, e = 1) {
323
- H(t, t.v + e);
320
+ function ni(t, e = 1) {
321
+ q(t, t.v + e);
324
322
  }
325
- var li, Li, Mi, Fi;
326
- function Kt() {
327
- if (li === void 0) {
328
- li = window, Li = /Firefox/.test(navigator.userAgent);
323
+ var si, Ri, $i, Ai;
324
+ function It() {
325
+ if (si === void 0) {
326
+ si = window, Ri = /Firefox/.test(navigator.userAgent);
329
327
  var t = Element.prototype, e = Node.prototype;
330
- Mi = ze(e, "firstChild").get, Fi = ze(e, "nextSibling").get, t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__styles = null, t.__e = void 0, Text.prototype.__t = void 0;
328
+ $i = ze(e, "firstChild").get, Ai = ze(e, "nextSibling").get, t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__styles = null, t.__e = void 0, Text.prototype.__t = void 0;
331
329
  }
332
330
  }
333
- function Ni(t = "") {
331
+ function Oi(t = "") {
334
332
  return document.createTextNode(t);
335
333
  }
336
334
  // @__NO_SIDE_EFFECTS__
337
- function xt(t) {
338
- return Mi.call(t);
335
+ function _t(t) {
336
+ return $i.call(t);
339
337
  }
340
338
  // @__NO_SIDE_EFFECTS__
341
- function Tt(t) {
342
- return Fi.call(t);
339
+ function Dt(t) {
340
+ return Ai.call(t);
343
341
  }
344
- function Pt(t, e) {
345
- if (!Q)
346
- return /* @__PURE__ */ xt(t);
342
+ function Nt(t, e) {
343
+ if (!J)
344
+ return /* @__PURE__ */ _t(t);
347
345
  var i = (
348
346
  /** @type {TemplateNode} */
349
- /* @__PURE__ */ xt(z)
347
+ /* @__PURE__ */ _t(I)
350
348
  );
351
- return i === null && (i = z.appendChild(Ni())), _t(i), i;
349
+ return i === null && (i = I.appendChild(Oi())), gt(i), i;
352
350
  }
353
- function Br(t) {
351
+ function Lr(t) {
354
352
  t.textContent = "";
355
353
  }
356
- let ft = false, yt = false, Ct = null, ht = false, Qt = false;
357
- function ui(t) {
358
- Qt = t;
354
+ let ct = false, xt = false, yt = null, ft = false, Yt = false;
355
+ function oi(t) {
356
+ Yt = t;
359
357
  }
360
358
  let et = [];
361
359
  let k = null, X = false;
@@ -366,19 +364,19 @@ let D = null;
366
364
  function _e(t) {
367
365
  D = t;
368
366
  }
369
- let ne = null;
370
- function zr(t) {
371
- ne = t;
367
+ let oe = null;
368
+ function Fr(t) {
369
+ oe = t;
372
370
  }
373
- let N = null, q = 0, ae = null;
374
- function Ir(t) {
375
- ae = t;
371
+ let P = null, V = 0, de = null;
372
+ function Mr(t) {
373
+ de = t;
376
374
  }
377
- let Pi = 1, Et = 0, me = false;
378
- function Ui() {
379
- return ++Pi;
375
+ let Li = 1, Ct = 0, we = false;
376
+ function Fi() {
377
+ return ++Li;
380
378
  }
381
- function Rt(t) {
379
+ function Tt(t) {
382
380
  var _a2;
383
381
  var e = t.f;
384
382
  if ((e & Ce) !== 0)
@@ -386,112 +384,112 @@ function Rt(t) {
386
384
  if ((e & Ke) !== 0) {
387
385
  var i = t.deps, r = (e & G) !== 0;
388
386
  if (i !== null) {
389
- var n, o, c = (e & vt) !== 0, f = r && D !== null && !me, h = i.length;
390
- if (c || f) {
391
- var d = (
387
+ var n, o, d = (e & pt) !== 0, b = r && D !== null && !we, c = i.length;
388
+ if (d || b) {
389
+ var p = (
392
390
  /** @type {Derived} */
393
391
  t
394
- ), p = d.parent;
395
- for (n = 0; n < h; n++)
396
- o = i[n], (c || !((_a2 = o == null ? void 0 : o.reactions) == null ? void 0 : _a2.includes(d))) && (o.reactions ?? (o.reactions = [])).push(d);
397
- c && (d.f ^= vt), f && p !== null && (p.f & G) === 0 && (d.f ^= G);
392
+ ), h = p.parent;
393
+ for (n = 0; n < c; n++)
394
+ o = i[n], (d || !((_a2 = o == null ? void 0 : o.reactions) == null ? void 0 : _a2.includes(p))) && (o.reactions ?? (o.reactions = [])).push(p);
395
+ d && (p.f ^= pt), b && h !== null && (h.f & G) === 0 && (p.f ^= G);
398
396
  }
399
- for (n = 0; n < h; n++)
400
- if (o = i[n], Rt(
397
+ for (n = 0; n < c; n++)
398
+ if (o = i[n], Tt(
401
399
  /** @type {Derived} */
402
400
  o
403
- ) && Ai(
401
+ ) && Di(
404
402
  /** @type {Derived} */
405
403
  o
406
404
  ), o.wv > t.wv)
407
405
  return true;
408
406
  }
409
- (!r || D !== null && !me) && ue(t, j);
407
+ (!r || D !== null && !we) && fe(t, H);
410
408
  }
411
409
  return false;
412
410
  }
413
- function Kr(t, e) {
411
+ function Nr(t, e) {
414
412
  for (var i = e; i !== null; ) {
415
- if ((i.f & pt) !== 0)
413
+ if ((i.f & bt) !== 0)
416
414
  try {
417
415
  i.fn(t);
418
416
  return;
419
417
  } catch {
420
- i.f ^= pt;
418
+ i.f ^= bt;
421
419
  }
422
420
  i = i.parent;
423
421
  }
424
- throw ft = false, t;
422
+ throw ct = false, t;
425
423
  }
426
- function Wr(t) {
427
- return (t.f & Dt) === 0 && (t.parent === null || (t.parent.f & pt) === 0);
424
+ function Pr(t) {
425
+ return (t.f & St) === 0 && (t.parent === null || (t.parent.f & bt) === 0);
428
426
  }
429
- function $t(t, e, i, r) {
430
- if (ft) {
431
- if (i === null && (ft = false), Wr(e))
427
+ function Rt(t, e, i, r) {
428
+ if (ct) {
429
+ if (i === null && (ct = false), Pr(e))
432
430
  throw t;
433
431
  return;
434
432
  }
435
- i !== null && (ft = true);
433
+ i !== null && (ct = true);
436
434
  {
437
- Kr(t, e);
435
+ Nr(t, e);
438
436
  return;
439
437
  }
440
438
  }
441
- function Bi(t, e, i = true) {
439
+ function Mi(t, e, i = true) {
442
440
  var r = t.reactions;
443
441
  if (r !== null)
444
442
  for (var n = 0; n < r.length; n++) {
445
443
  var o = r[n];
446
- (o.f & Z) !== 0 ? Bi(
444
+ (o.f & Z) !== 0 ? Mi(
447
445
  /** @type {Derived} */
448
446
  o,
449
447
  e,
450
448
  false
451
- ) : e === o && (i ? ue(o, Ce) : (o.f & j) !== 0 && ue(o, Ke), ei(
449
+ ) : e === o && (i ? fe(o, Ce) : (o.f & H) !== 0 && fe(o, Ke), Zt(
452
450
  /** @type {Effect} */
453
451
  o
454
452
  ));
455
453
  }
456
454
  }
457
- function zi(t) {
455
+ function Ni(t) {
458
456
  var _a2;
459
- var e = N, i = q, r = ae, n = k, o = me, c = ne, f = U, h = X, d = t.f;
460
- N = /** @type {null | Value[]} */
461
- null, q = 0, ae = null, me = (d & G) !== 0 && (X || !ht || k === null), k = (d & (ye | Ie)) === 0 ? t : null, ne = null, ci(t.ctx), X = false, Et++;
457
+ var e = P, i = V, r = de, n = k, o = we, d = oe, b = B, c = X, p = t.f;
458
+ P = /** @type {null | Value[]} */
459
+ null, V = 0, de = null, we = (p & G) !== 0 && (X || !ft || k === null), k = (p & (ye | Ie)) === 0 ? t : null, oe = null, ai(t.ctx), X = false, Ct++;
462
460
  try {
463
- var p = (
461
+ var h = (
464
462
  /** @type {Function} */
465
463
  (0, t.fn)()
466
- ), w = t.deps;
467
- if (N !== null) {
464
+ ), m = t.deps;
465
+ if (P !== null) {
468
466
  var s;
469
- if (kt(t, q), w !== null && q > 0)
470
- for (w.length = q + N.length, s = 0; s < N.length; s++)
471
- w[q + s] = N[s];
467
+ if (Et(t, V), m !== null && V > 0)
468
+ for (m.length = V + P.length, s = 0; s < P.length; s++)
469
+ m[V + s] = P[s];
472
470
  else
473
- t.deps = w = N;
474
- if (!me)
475
- for (s = q; s < w.length; s++)
476
- ((_a2 = w[s]).reactions ?? (_a2.reactions = [])).push(t);
477
- } else w !== null && q < w.length && (kt(t, q), w.length = q);
478
- if (Xi() && ae !== null && !X && w !== null && (t.f & (Z | Ke | Ce)) === 0)
471
+ t.deps = m = P;
472
+ if (!we)
473
+ for (s = V; s < m.length; s++)
474
+ ((_a2 = m[s]).reactions ?? (_a2.reactions = [])).push(t);
475
+ } else m !== null && V < m.length && (Et(t, V), m.length = V);
476
+ if (Hi() && de !== null && !X && m !== null && (t.f & (Z | Ke | Ce)) === 0)
479
477
  for (s = 0; s < /** @type {Source[]} */
480
- ae.length; s++)
481
- Bi(
482
- ae[s],
478
+ de.length; s++)
479
+ Mi(
480
+ de[s],
483
481
  /** @type {Effect} */
484
482
  t
485
483
  );
486
- return n !== null && Et++, p;
484
+ return n !== null && Ct++, h;
487
485
  } finally {
488
- N = e, q = i, ae = r, k = n, me = o, ne = c, ci(f), X = h;
486
+ P = e, V = i, de = r, k = n, we = o, oe = d, ai(b), X = c;
489
487
  }
490
488
  }
491
- function Vr(t, e) {
489
+ function Ur(t, e) {
492
490
  let i = e.reactions;
493
491
  if (i !== null) {
494
- var r = mr.call(i, t);
492
+ var r = cr.call(i, t);
495
493
  if (r !== -1) {
496
494
  var n = i.length - 1;
497
495
  n === 0 ? i = e.reactions = null : (i[r] = i[n], i.pop());
@@ -500,137 +498,137 @@ function Vr(t, e) {
500
498
  i === null && (e.f & Z) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
501
499
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
502
500
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
503
- (N === null || !N.includes(e)) && (ue(e, Ke), (e.f & (G | vt)) === 0 && (e.f ^= vt), $i(
501
+ (P === null || !P.includes(e)) && (fe(e, Ke), (e.f & (G | pt)) === 0 && (e.f ^= pt), Si(
504
502
  /** @type {Derived} **/
505
503
  e
506
- ), kt(
504
+ ), Et(
507
505
  /** @type {Derived} **/
508
506
  e,
509
507
  0
510
508
  ));
511
509
  }
512
- function kt(t, e) {
510
+ function Et(t, e) {
513
511
  var i = t.deps;
514
512
  if (i !== null)
515
513
  for (var r = e; r < i.length; r++)
516
- Vr(t, i[r]);
514
+ Ur(t, i[r]);
517
515
  }
518
- function Jt(t) {
516
+ function Xt(t) {
519
517
  var e = t.f;
520
- if ((e & Dt) === 0) {
521
- ue(t, j);
522
- var i = D, r = U, n = ht;
523
- D = t, ht = true;
518
+ if ((e & St) === 0) {
519
+ fe(t, H);
520
+ var i = D, r = B, n = ft;
521
+ D = t, ft = true;
524
522
  try {
525
- (e & Yt) !== 0 ? sn(t) : Vi(t), Wi(t);
526
- var o = zi(t);
527
- t.teardown = typeof o == "function" ? o : null, t.wv = Pi;
528
- var c = t.deps, f;
529
- si && Mr && t.f & Ce;
530
- } catch (h) {
531
- $t(h, t, i, r || t.ctx);
523
+ (e & Ht) !== 0 ? Jr(t) : zi(t), Bi(t);
524
+ var o = Ni(t);
525
+ t.teardown = typeof o == "function" ? o : null, t.wv = Li;
526
+ var d = t.deps, b;
527
+ ii && Tr && t.f & Ce;
528
+ } catch (c) {
529
+ Rt(c, t, i, r || t.ctx);
532
530
  } finally {
533
- ht = n, D = i;
531
+ ft = n, D = i;
534
532
  }
535
533
  }
536
534
  }
537
- function qr() {
535
+ function Br() {
538
536
  try {
539
- Tr();
537
+ yr();
540
538
  } catch (t) {
541
- if (Ct !== null)
542
- $t(t, Ct, null);
539
+ if (yt !== null)
540
+ Rt(t, yt, null);
543
541
  else
544
542
  throw t;
545
543
  }
546
544
  }
547
- function Ii() {
545
+ function Pi() {
548
546
  try {
549
547
  for (var t = 0; et.length > 0; ) {
550
- t++ > 1e3 && qr();
548
+ t++ > 1e3 && Br();
551
549
  var e = et, i = e.length;
552
550
  et = [];
553
551
  for (var r = 0; r < i; r++) {
554
552
  var n = e[r];
555
- (n.f & j) === 0 && (n.f ^= j);
556
- var o = jr(n);
557
- Hr(o);
553
+ (n.f & H) === 0 && (n.f ^= H);
554
+ var o = Ir(n);
555
+ zr(o);
558
556
  }
559
557
  }
560
558
  } finally {
561
- yt = false, Ct = null;
559
+ xt = false, yt = null;
562
560
  }
563
561
  }
564
- function Hr(t) {
562
+ function zr(t) {
565
563
  var e = t.length;
566
564
  if (e !== 0)
567
565
  for (var i = 0; i < e; i++) {
568
566
  var r = t[i];
569
- if ((r.f & (Dt | wt)) === 0)
567
+ if ((r.f & (St | vt)) === 0)
570
568
  try {
571
- Rt(r) && (Jt(r), r.deps === null && r.first === null && r.nodes_start === null && (r.teardown === null ? qi(r) : r.fn = null));
569
+ Tt(r) && (Xt(r), r.deps === null && r.first === null && r.nodes_start === null && (r.teardown === null ? Ii(r) : r.fn = null));
572
570
  } catch (n) {
573
- $t(n, r, null, r.ctx);
571
+ Rt(n, r, null, r.ctx);
574
572
  }
575
573
  }
576
574
  }
577
- function ei(t) {
578
- yt || (yt = true, queueMicrotask(Ii));
579
- for (var e = Ct = t; e.parent !== null; ) {
575
+ function Zt(t) {
576
+ xt || (xt = true, queueMicrotask(Pi));
577
+ for (var e = yt = t; e.parent !== null; ) {
580
578
  e = e.parent;
581
579
  var i = e.f;
582
580
  if ((i & (Ie | ye)) !== 0) {
583
- if ((i & j) === 0) return;
584
- e.f ^= j;
581
+ if ((i & H) === 0) return;
582
+ e.f ^= H;
585
583
  }
586
584
  }
587
585
  et.push(e);
588
586
  }
589
- function jr(t) {
587
+ function Ir(t) {
590
588
  for (var e = [], i = t.first; i !== null; ) {
591
- var r = i.f, n = (r & ye) !== 0, o = n && (r & j) !== 0;
592
- if (!o && (r & wt) === 0) {
593
- if ((r & gi) !== 0)
589
+ var r = i.f, n = (r & ye) !== 0, o = n && (r & H) !== 0;
590
+ if (!o && (r & vt) === 0) {
591
+ if ((r & vi) !== 0)
594
592
  e.push(i);
595
593
  else if (n)
596
- i.f ^= j;
594
+ i.f ^= H;
597
595
  else {
598
- var c = k;
596
+ var d = k;
599
597
  try {
600
- k = i, Rt(i) && Jt(i);
601
- } catch (d) {
602
- $t(d, i, null, i.ctx);
598
+ k = i, Tt(i) && Xt(i);
599
+ } catch (p) {
600
+ Rt(p, i, null, i.ctx);
603
601
  } finally {
604
- k = c;
602
+ k = d;
605
603
  }
606
604
  }
607
- var f = i.first;
608
- if (f !== null) {
609
- i = f;
605
+ var b = i.first;
606
+ if (b !== null) {
607
+ i = b;
610
608
  continue;
611
609
  }
612
610
  }
613
- var h = i.parent;
614
- for (i = i.next; i === null && h !== null; )
615
- i = h.next, h = h.parent;
611
+ var c = i.parent;
612
+ for (i = i.next; i === null && c !== null; )
613
+ i = c.next, c = c.parent;
616
614
  }
617
615
  return e;
618
616
  }
619
617
  function Ye(t) {
620
618
  var e;
621
- for (oi(); et.length > 0; )
622
- yt = true, Ii(), oi();
619
+ for (ri(); et.length > 0; )
620
+ xt = true, Pi(), ri();
623
621
  return (
624
622
  /** @type {T} */
625
623
  e
626
624
  );
627
625
  }
628
- function P(t) {
626
+ function U(t) {
629
627
  var e = t.f, i = (e & Z) !== 0;
630
628
  if (k !== null && !X) {
631
- ne !== null && ne.includes(t) && Or();
629
+ oe !== null && oe.includes(t) && Sr();
632
630
  var r = k.deps;
633
- t.rv < Et && (t.rv = Et, N === null && r !== null && r[q] === t ? q++ : N === null ? N = [t] : (!me || !N.includes(t)) && N.push(t));
631
+ t.rv < Ct && (t.rv = Ct, P === null && r !== null && r[V] === t ? V++ : P === null ? P = [t] : (!we || !P.includes(t)) && P.push(t));
634
632
  } else if (i && /** @type {Derived} */
635
633
  t.deps === null && /** @type {Derived} */
636
634
  t.effects === null) {
@@ -641,9 +639,9 @@ function P(t) {
641
639
  o !== null && (o.f & G) === 0 && (n.f ^= G);
642
640
  }
643
641
  return i && (n = /** @type {Derived} */
644
- t, Rt(n) && Ai(n)), t.v;
642
+ t, Tt(n) && Di(n)), t.v;
645
643
  }
646
- function it(t) {
644
+ function $t(t) {
647
645
  var e = X;
648
646
  try {
649
647
  return X = true, t();
@@ -651,20 +649,20 @@ function it(t) {
651
649
  X = e;
652
650
  }
653
651
  }
654
- const Gr = -7169;
655
- function ue(t, e) {
656
- t.f = t.f & Gr | e;
652
+ const Kr = -7169;
653
+ function fe(t, e) {
654
+ t.f = t.f & Kr | e;
657
655
  }
658
- function Yr(t) {
659
- D === null && k === null && Dr(), k !== null && (k.f & G) !== 0 && D === null && Sr(), Qt && kr();
656
+ function Wr(t) {
657
+ D === null && k === null && xr(), k !== null && (k.f & G) !== 0 && D === null && _r(), Yt && gr();
660
658
  }
661
- function Xr(t, e) {
659
+ function Vr(t, e) {
662
660
  var i = e.last;
663
661
  i === null ? e.last = e.first = t : (i.next = t, t.prev = i, e.last = t);
664
662
  }
665
- function De(t, e, i, r = true) {
666
- var n = (t & Ie) !== 0, o = D, c = {
667
- ctx: U,
663
+ function Te(t, e, i, r = true) {
664
+ var n = (t & Ie) !== 0, o = D, d = {
665
+ ctx: B,
668
666
  deps: null,
669
667
  nodes_start: null,
670
668
  nodes_end: null,
@@ -681,32 +679,32 @@ function De(t, e, i, r = true) {
681
679
  };
682
680
  if (i)
683
681
  try {
684
- Jt(c), c.f |= br;
685
- } catch (d) {
686
- throw xe(c), d;
682
+ Xt(d), d.f |= ar;
683
+ } catch (p) {
684
+ throw xe(d), p;
687
685
  }
688
- else e !== null && ei(c);
689
- var f = i && c.deps === null && c.first === null && c.nodes_start === null && c.teardown === null && (c.f & (_i | pt)) === 0;
690
- if (!f && !n && r && (o !== null && Xr(c, o), k !== null && (k.f & Z) !== 0)) {
691
- var h = (
686
+ else e !== null && Zt(d);
687
+ var b = i && d.deps === null && d.first === null && d.nodes_start === null && d.teardown === null && (d.f & (mi | bt)) === 0;
688
+ if (!b && !n && r && (o !== null && Vr(d, o), k !== null && (k.f & Z) !== 0)) {
689
+ var c = (
692
690
  /** @type {Derived} */
693
691
  k
694
692
  );
695
- (h.effects ?? (h.effects = [])).push(c);
693
+ (c.effects ?? (c.effects = [])).push(d);
696
694
  }
697
- return c;
695
+ return d;
698
696
  }
699
- function Zr(t) {
700
- const e = De(St, null, false);
701
- return ue(e, j), e.teardown = t, e;
697
+ function qr(t) {
698
+ const e = Te(kt, null, false);
699
+ return fe(e, H), e.teardown = t, e;
702
700
  }
703
- function Qr(t) {
704
- Yr();
705
- var e = D !== null && (D.f & ye) !== 0 && U !== null && !U.m;
701
+ function Hr(t) {
702
+ Wr();
703
+ var e = D !== null && (D.f & ye) !== 0 && B !== null && !B.m;
706
704
  if (e) {
707
705
  var i = (
708
706
  /** @type {ComponentContext} */
709
- U
707
+ B
710
708
  );
711
709
  (i.e ?? (i.e = [])).push({
712
710
  fn: t,
@@ -714,60 +712,60 @@ function Qr(t) {
714
712
  reaction: k
715
713
  });
716
714
  } else {
717
- var r = ti(t);
715
+ var r = Jt(t);
718
716
  return r;
719
717
  }
720
718
  }
721
- function Jr(t) {
722
- const e = De(Ie, t, true);
719
+ function jr(t) {
720
+ const e = Te(Ie, t, true);
723
721
  return () => {
724
722
  xe(e);
725
723
  };
726
724
  }
727
- function en(t) {
728
- const e = De(Ie, t, true);
725
+ function Gr(t) {
726
+ const e = Te(Ie, t, true);
729
727
  return (i = {}) => new Promise((r) => {
730
- i.outro ? on(e, () => {
728
+ i.outro ? Qr(e, () => {
731
729
  xe(e), r(void 0);
732
730
  }) : (xe(e), r(void 0));
733
731
  });
734
732
  }
735
- function ti(t) {
736
- return De(gi, t, false);
733
+ function Jt(t) {
734
+ return Te(vi, t, false);
737
735
  }
738
- function Ki(t) {
739
- return De(St, t, true);
736
+ function Ui(t) {
737
+ return Te(kt, t, true);
740
738
  }
741
- function tn(t, e = [], i = Ri) {
739
+ function Yr(t, e = [], i = ki) {
742
740
  const r = e.map(i);
743
- return rn(() => t(...r.map(P)));
741
+ return Xr(() => t(...r.map(U)));
744
742
  }
745
- function rn(t, e = 0) {
746
- return De(St | Yt | e, t, true);
743
+ function Xr(t, e = 0) {
744
+ return Te(kt | Ht | e, t, true);
747
745
  }
748
- function nn(t, e = true) {
749
- return De(St | ye, t, true, e);
746
+ function Zr(t, e = true) {
747
+ return Te(kt | ye, t, true, e);
750
748
  }
751
- function Wi(t) {
749
+ function Bi(t) {
752
750
  var e = t.teardown;
753
751
  if (e !== null) {
754
- const i = Qt, r = k;
755
- ui(true), ge(null);
752
+ const i = Yt, r = k;
753
+ oi(true), ge(null);
756
754
  try {
757
755
  e.call(null);
758
756
  } finally {
759
- ui(i), ge(r);
757
+ oi(i), ge(r);
760
758
  }
761
759
  }
762
760
  }
763
- function Vi(t, e = false) {
761
+ function zi(t, e = false) {
764
762
  var i = t.first;
765
763
  for (t.first = t.last = null; i !== null; ) {
766
764
  var r = i.next;
767
765
  xe(i, e), i = r;
768
766
  }
769
767
  }
770
- function sn(t) {
768
+ function Jr(t) {
771
769
  for (var e = t.first; e !== null; ) {
772
770
  var i = e.next;
773
771
  (e.f & ye) === 0 && xe(e), e = i;
@@ -775,36 +773,36 @@ function sn(t) {
775
773
  }
776
774
  function xe(t, e = true) {
777
775
  var i = false;
778
- if ((e || (t.f & vr) !== 0) && t.nodes_start !== null) {
776
+ if ((e || (t.f & ur) !== 0) && t.nodes_start !== null) {
779
777
  for (var r = t.nodes_start, n = t.nodes_end; r !== null; ) {
780
778
  var o = r === n ? null : (
781
779
  /** @type {TemplateNode} */
782
- /* @__PURE__ */ Tt(r)
780
+ /* @__PURE__ */ Dt(r)
783
781
  );
784
782
  r.remove(), r = o;
785
783
  }
786
784
  i = true;
787
785
  }
788
- Vi(t, e && !i), kt(t, 0), ue(t, Dt);
789
- var c = t.transitions;
790
- if (c !== null)
791
- for (const h of c)
792
- h.stop();
793
- Wi(t);
794
- var f = t.parent;
795
- f !== null && f.first !== null && qi(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes_start = t.nodes_end = null;
786
+ zi(t, e && !i), Et(t, 0), fe(t, St);
787
+ var d = t.transitions;
788
+ if (d !== null)
789
+ for (const c of d)
790
+ c.stop();
791
+ Bi(t);
792
+ var b = t.parent;
793
+ b !== null && b.first !== null && Ii(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes_start = t.nodes_end = null;
796
794
  }
797
- function qi(t) {
795
+ function Ii(t) {
798
796
  var e = t.parent, i = t.prev, r = t.next;
799
797
  i !== null && (i.next = r), r !== null && (r.prev = i), e !== null && (e.first === t && (e.first = r), e.last === t && (e.last = i));
800
798
  }
801
- function on(t, e) {
799
+ function Qr(t, e) {
802
800
  var i = [];
803
- Hi(t, i, true), an(i, () => {
801
+ Ki(t, i, true), en(i, () => {
804
802
  xe(t), e && e();
805
803
  });
806
804
  }
807
- function an(t, e) {
805
+ function en(t, e) {
808
806
  var i = t.length;
809
807
  if (i > 0) {
810
808
  var r = () => --i || e();
@@ -813,27 +811,27 @@ function an(t, e) {
813
811
  } else
814
812
  e();
815
813
  }
816
- function Hi(t, e, i) {
817
- if ((t.f & wt) === 0) {
818
- if (t.f ^= wt, t.transitions !== null)
819
- for (const c of t.transitions)
820
- (c.is_global || i) && e.push(c);
814
+ function Ki(t, e, i) {
815
+ if ((t.f & vt) === 0) {
816
+ if (t.f ^= vt, t.transitions !== null)
817
+ for (const d of t.transitions)
818
+ (d.is_global || i) && e.push(d);
821
819
  for (var r = t.first; r !== null; ) {
822
- var n = r.next, o = (r.f & pr) !== 0 || (r.f & ye) !== 0;
823
- Hi(r, e, o ? i : false), r = n;
820
+ var n = r.next, o = (r.f & lr) !== 0 || (r.f & ye) !== 0;
821
+ Ki(r, e, o ? i : false), r = n;
824
822
  }
825
823
  }
826
824
  }
827
- function ji(t) {
825
+ function Wi(t) {
828
826
  throw new Error("https://svelte.dev/e/lifecycle_outside_component");
829
827
  }
830
- let U = null;
831
- function ci(t) {
832
- U = t;
828
+ let B = null;
829
+ function ai(t) {
830
+ B = t;
833
831
  }
834
- function Gi(t, e = false, i) {
835
- U = {
836
- p: U,
832
+ function Vi(t, e = false, i) {
833
+ B = {
834
+ p: B,
837
835
  c: null,
838
836
  e: null,
839
837
  m: false,
@@ -842,36 +840,36 @@ function Gi(t, e = false, i) {
842
840
  l: null
843
841
  };
844
842
  }
845
- function Yi(t) {
846
- const e = U;
843
+ function qi(t) {
844
+ const e = B;
847
845
  if (e !== null) {
848
846
  t !== void 0 && (e.x = t);
849
- const c = e.e;
850
- if (c !== null) {
847
+ const d = e.e;
848
+ if (d !== null) {
851
849
  var i = D, r = k;
852
850
  e.e = null;
853
851
  try {
854
- for (var n = 0; n < c.length; n++) {
855
- var o = c[n];
856
- _e(o.effect), ge(o.reaction), ti(o.fn);
852
+ for (var n = 0; n < d.length; n++) {
853
+ var o = d[n];
854
+ _e(o.effect), ge(o.reaction), Jt(o.fn);
857
855
  }
858
856
  } finally {
859
857
  _e(i), ge(r);
860
858
  }
861
859
  }
862
- U = e.p, e.m = true;
860
+ B = e.p, e.m = true;
863
861
  }
864
862
  return t || /** @type {T} */
865
863
  {};
866
864
  }
867
- function Xi() {
865
+ function Hi() {
868
866
  return true;
869
867
  }
870
- const ln = ["touchstart", "touchmove"];
871
- function un(t) {
872
- return ln.includes(t);
868
+ const tn = ["touchstart", "touchmove"];
869
+ function rn(t) {
870
+ return tn.includes(t);
873
871
  }
874
- function cn(t) {
872
+ function nn(t) {
875
873
  var e = k, i = D;
876
874
  ge(null), _e(null);
877
875
  try {
@@ -880,26 +878,26 @@ function cn(t) {
880
878
  ge(e), _e(i);
881
879
  }
882
880
  }
883
- const Zi = /* @__PURE__ */ new Set(), Wt = /* @__PURE__ */ new Set();
884
- function dn(t, e, i, r = {}) {
881
+ const ji = /* @__PURE__ */ new Set(), Kt = /* @__PURE__ */ new Set();
882
+ function sn(t, e, i, r = {}) {
885
883
  function n(o) {
886
884
  if (r.capture || Xe.call(e, o), !o.cancelBubble)
887
- return cn(() => i == null ? void 0 : i.call(this, o));
885
+ return nn(() => i == null ? void 0 : i.call(this, o));
888
886
  }
889
- return t.startsWith("pointer") || t.startsWith("touch") || t === "wheel" ? Xt(() => {
887
+ return t.startsWith("pointer") || t.startsWith("touch") || t === "wheel" ? jt(() => {
890
888
  e.addEventListener(t, n, r);
891
889
  }) : e.addEventListener(t, n, r), n;
892
890
  }
893
891
  function lt(t, e, i, r, n) {
894
- var o = { capture: r, passive: n }, c = dn(t, e, i, o);
895
- (e === document.body || e === window || e === document) && Zr(() => {
896
- e.removeEventListener(t, c, o);
892
+ var o = { capture: r, passive: n }, d = sn(t, e, i, o);
893
+ (e === document.body || e === window || e === document) && qr(() => {
894
+ e.removeEventListener(t, d, o);
897
895
  });
898
896
  }
899
- function fn(t) {
897
+ function on(t) {
900
898
  for (var e = 0; e < t.length; e++)
901
- Zi.add(t[e]);
902
- for (var i of Wt)
899
+ ji.add(t[e]);
900
+ for (var i of Kt)
903
901
  i(t);
904
902
  }
905
903
  function Xe(t) {
@@ -910,32 +908,32 @@ function Xe(t) {
910
908
  ), r = t.type, n = ((_a2 = t.composedPath) == null ? void 0 : _a2.call(t)) || [], o = (
911
909
  /** @type {null | Element} */
912
910
  n[0] || t.target
913
- ), c = 0, f = t.__root;
914
- if (f) {
915
- var h = n.indexOf(f);
916
- if (h !== -1 && (e === document || e === /** @type {any} */
911
+ ), d = 0, b = t.__root;
912
+ if (b) {
913
+ var c = n.indexOf(b);
914
+ if (c !== -1 && (e === document || e === /** @type {any} */
917
915
  window)) {
918
916
  t.__root = e;
919
917
  return;
920
918
  }
921
- var d = n.indexOf(e);
922
- if (d === -1)
919
+ var p = n.indexOf(e);
920
+ if (p === -1)
923
921
  return;
924
- h <= d && (c = h);
922
+ c <= p && (d = c);
925
923
  }
926
924
  if (o = /** @type {Element} */
927
- n[c] || t.target, o !== e) {
928
- gt(t, "currentTarget", {
925
+ n[d] || t.target, o !== e) {
926
+ wt(t, "currentTarget", {
929
927
  configurable: true,
930
928
  get() {
931
929
  return o || i;
932
930
  }
933
931
  });
934
- var p = k, w = D;
932
+ var h = k, m = D;
935
933
  ge(null), _e(null);
936
934
  try {
937
- for (var s, a = []; o !== null; ) {
938
- var l = o.assignedSlot || o.parentNode || /** @type {any} */
935
+ for (var s, l = []; o !== null; ) {
936
+ var a = o.assignedSlot || o.parentNode || /** @type {any} */
939
937
  o.host || null;
940
938
  try {
941
939
  var u = o["__" + r];
@@ -943,35 +941,35 @@ function Xe(t) {
943
941
  o.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
944
942
  // -> the target could not have been disabled because it emits the event in the first place
945
943
  t.target === o))
946
- if (xi(u)) {
947
- var [b, ...$] = u;
948
- b.apply(o, [t, ...$]);
944
+ if (wi(u)) {
945
+ var [f, ...$] = u;
946
+ f.apply(o, [t, ...$]);
949
947
  } else
950
948
  u.call(o, t);
951
- } catch (M) {
952
- s ? a.push(M) : s = M;
949
+ } catch (A) {
950
+ s ? l.push(A) : s = A;
953
951
  }
954
- if (t.cancelBubble || l === e || l === null)
952
+ if (t.cancelBubble || a === e || a === null)
955
953
  break;
956
- o = l;
954
+ o = a;
957
955
  }
958
956
  if (s) {
959
- for (let M of a)
957
+ for (let A of l)
960
958
  queueMicrotask(() => {
961
- throw M;
959
+ throw A;
962
960
  });
963
961
  throw s;
964
962
  }
965
963
  } finally {
966
- t.__root = e, delete t.currentTarget, ge(p), _e(w);
964
+ t.__root = e, delete t.currentTarget, ge(h), _e(m);
967
965
  }
968
966
  }
969
967
  }
970
- function hn(t) {
968
+ function an(t) {
971
969
  var e = document.createElement("template");
972
970
  return e.innerHTML = t, e.content;
973
971
  }
974
- function Vt(t, e) {
972
+ function Wt(t, e) {
975
973
  var i = (
976
974
  /** @type {Effect} */
977
975
  D
@@ -979,23 +977,23 @@ function Vt(t, e) {
979
977
  i.nodes_start === null && (i.nodes_start = t, i.nodes_end = e);
980
978
  }
981
979
  // @__NO_SIDE_EFFECTS__
982
- function bn(t, e) {
983
- var i = (e & dr) !== 0, r, n = !t.startsWith("<!>");
980
+ function ln(t, e) {
981
+ var i = (e & nr) !== 0, r, n = !t.startsWith("<!>");
984
982
  return () => {
985
- if (Q)
986
- return Vt(z, null), z;
987
- r === void 0 && (r = hn(n ? t : "<!>" + t), r = /** @type {Node} */
988
- /* @__PURE__ */ xt(r));
983
+ if (J)
984
+ return Wt(I, null), I;
985
+ r === void 0 && (r = an(n ? t : "<!>" + t), r = /** @type {Node} */
986
+ /* @__PURE__ */ _t(r));
989
987
  var o = (
990
988
  /** @type {TemplateNode} */
991
- i || Li ? document.importNode(r, true) : r.cloneNode(true)
989
+ i || Ri ? document.importNode(r, true) : r.cloneNode(true)
992
990
  );
993
- return Vt(o, o), o;
991
+ return Wt(o, o), o;
994
992
  };
995
993
  }
996
- function Qi(t, e) {
997
- if (Q) {
998
- D.nodes_end = z, Oi();
994
+ function Gi(t, e) {
995
+ if (J) {
996
+ D.nodes_end = I, Ti();
999
997
  return;
1000
998
  }
1001
999
  t !== null && t.before(
@@ -1003,94 +1001,94 @@ function Qi(t, e) {
1003
1001
  e
1004
1002
  );
1005
1003
  }
1006
- function Ji(t, e) {
1007
- return er(t, e);
1004
+ function Yi(t, e) {
1005
+ return Xi(t, e);
1008
1006
  }
1009
- function pn(t, e) {
1010
- Kt(), e.intro = e.intro ?? false;
1011
- const i = e.target, r = Q, n = z;
1007
+ function un(t, e) {
1008
+ It(), e.intro = e.intro ?? false;
1009
+ const i = e.target, r = J, n = I;
1012
1010
  try {
1013
1011
  for (var o = (
1014
1012
  /** @type {TemplateNode} */
1015
- /* @__PURE__ */ xt(i)
1013
+ /* @__PURE__ */ _t(i)
1016
1014
  ); o && (o.nodeType !== 8 || /** @type {Comment} */
1017
- o.data !== fr); )
1015
+ o.data !== sr); )
1018
1016
  o = /** @type {TemplateNode} */
1019
- /* @__PURE__ */ Tt(o);
1017
+ /* @__PURE__ */ Dt(o);
1020
1018
  if (!o)
1021
- throw Je;
1022
- at(true), _t(
1019
+ throw Qe;
1020
+ at(true), gt(
1023
1021
  /** @type {Comment} */
1024
1022
  o
1025
- ), Oi();
1026
- const c = er(t, { ...e, anchor: o });
1027
- if (z === null || z.nodeType !== 8 || /** @type {Comment} */
1028
- z.data !== hr)
1029
- throw Zt(), Je;
1023
+ ), Ti();
1024
+ const d = Xi(t, { ...e, anchor: o });
1025
+ if (I === null || I.nodeType !== 8 || /** @type {Comment} */
1026
+ I.data !== or)
1027
+ throw Gt(), Qe;
1030
1028
  return at(false), /** @type {Exports} */
1031
- c;
1032
- } catch (c) {
1033
- if (c === Je)
1034
- return e.recover === false && Rr(), Kt(), Br(i), at(false), Ji(t, e);
1035
- throw c;
1029
+ d;
1030
+ } catch (d) {
1031
+ if (d === Qe)
1032
+ return e.recover === false && Cr(), It(), Lr(i), at(false), Yi(t, e);
1033
+ throw d;
1036
1034
  } finally {
1037
- at(r), _t(n);
1038
- }
1039
- }
1040
- const Ne = /* @__PURE__ */ new Map();
1041
- function er(t, { target: e, anchor: i, props: r = {}, events: n, context: o, intro: c = true }) {
1042
- Kt();
1043
- var f = /* @__PURE__ */ new Set(), h = (w) => {
1044
- for (var s = 0; s < w.length; s++) {
1045
- var a = w[s];
1046
- if (!f.has(a)) {
1047
- f.add(a);
1048
- var l = un(a);
1049
- e.addEventListener(a, Xe, { passive: l });
1050
- var u = Ne.get(a);
1051
- u === void 0 ? (document.addEventListener(a, Xe, { passive: l }), Ne.set(a, 1)) : Ne.set(a, u + 1);
1035
+ at(r), gt(n);
1036
+ }
1037
+ }
1038
+ const Ue = /* @__PURE__ */ new Map();
1039
+ function Xi(t, { target: e, anchor: i, props: r = {}, events: n, context: o, intro: d = true }) {
1040
+ It();
1041
+ var b = /* @__PURE__ */ new Set(), c = (m) => {
1042
+ for (var s = 0; s < m.length; s++) {
1043
+ var l = m[s];
1044
+ if (!b.has(l)) {
1045
+ b.add(l);
1046
+ var a = rn(l);
1047
+ e.addEventListener(l, Xe, { passive: a });
1048
+ var u = Ue.get(l);
1049
+ u === void 0 ? (document.addEventListener(l, Xe, { passive: a }), Ue.set(l, 1)) : Ue.set(l, u + 1);
1052
1050
  }
1053
1051
  }
1054
1052
  };
1055
- h(gr(Zi)), Wt.add(h);
1056
- var d = void 0, p = en(() => {
1057
- var w = i ?? e.appendChild(Ni());
1058
- return nn(() => {
1053
+ c(fr(ji)), Kt.add(c);
1054
+ var p = void 0, h = Gr(() => {
1055
+ var m = i ?? e.appendChild(Oi());
1056
+ return Zr(() => {
1059
1057
  if (o) {
1060
- Gi({});
1058
+ Vi({});
1061
1059
  var s = (
1062
1060
  /** @type {ComponentContext} */
1063
- U
1061
+ B
1064
1062
  );
1065
1063
  s.c = o;
1066
1064
  }
1067
- n && (r.$$events = n), Q && Vt(
1065
+ n && (r.$$events = n), J && Wt(
1068
1066
  /** @type {TemplateNode} */
1069
- w,
1067
+ m,
1070
1068
  null
1071
- ), d = t(w, r) || {}, Q && (D.nodes_end = z), o && Yi();
1069
+ ), p = t(m, r) || {}, J && (D.nodes_end = I), o && qi();
1072
1070
  }), () => {
1073
1071
  var _a2;
1074
- for (var s of f) {
1072
+ for (var s of b) {
1075
1073
  e.removeEventListener(s, Xe);
1076
- var a = (
1074
+ var l = (
1077
1075
  /** @type {number} */
1078
- Ne.get(s)
1076
+ Ue.get(s)
1079
1077
  );
1080
- --a === 0 ? (document.removeEventListener(s, Xe), Ne.delete(s)) : Ne.set(s, a);
1078
+ --l === 0 ? (document.removeEventListener(s, Xe), Ue.delete(s)) : Ue.set(s, l);
1081
1079
  }
1082
- Wt.delete(h), w !== i && ((_a2 = w.parentNode) == null ? void 0 : _a2.removeChild(w));
1080
+ Kt.delete(c), m !== i && ((_a2 = m.parentNode) == null ? void 0 : _a2.removeChild(m));
1083
1081
  };
1084
1082
  });
1085
- return qt.set(d, p), d;
1083
+ return Vt.set(p, h), p;
1086
1084
  }
1087
- let qt = /* @__PURE__ */ new WeakMap();
1088
- function vn(t, e) {
1089
- const i = qt.get(t);
1090
- return i ? (qt.delete(t), i(e)) : Promise.resolve();
1085
+ let Vt = /* @__PURE__ */ new WeakMap();
1086
+ function dn(t, e) {
1087
+ const i = Vt.get(t);
1088
+ return i ? (Vt.delete(t), i(e)) : Promise.resolve();
1091
1089
  }
1092
- function wn(t, e) {
1093
- Xt(() => {
1090
+ function cn(t, e) {
1091
+ jt(() => {
1094
1092
  var i = t.getRootNode(), r = (
1095
1093
  /** @type {ShadowRoot} */
1096
1094
  i.host ? (
@@ -1108,128 +1106,79 @@ function wn(t, e) {
1108
1106
  }
1109
1107
  });
1110
1108
  }
1111
- const di = [...`
1109
+ const li = [...`
1112
1110
  \r\f\xA0\v\uFEFF`];
1113
- function mn(t, e, i) {
1111
+ function fn(t, e, i) {
1114
1112
  var r = t == null ? "" : "" + t;
1115
1113
  if (r = r ? r + " " + e : e, i) {
1116
1114
  for (var n in i)
1117
1115
  if (i[n])
1118
1116
  r = r ? r + " " + n : n;
1119
1117
  else if (r.length)
1120
- for (var o = n.length, c = 0; (c = r.indexOf(n, c)) >= 0; ) {
1121
- var f = c + o;
1122
- (c === 0 || di.includes(r[c - 1])) && (f === r.length || di.includes(r[f])) ? r = (c === 0 ? "" : r.substring(0, c)) + r.substring(f + 1) : c = f;
1118
+ for (var o = n.length, d = 0; (d = r.indexOf(n, d)) >= 0; ) {
1119
+ var b = d + o;
1120
+ (d === 0 || li.includes(r[d - 1])) && (b === r.length || li.includes(r[b])) ? r = (d === 0 ? "" : r.substring(0, d)) + r.substring(b + 1) : d = b;
1123
1121
  }
1124
1122
  }
1125
1123
  return r === "" ? null : r;
1126
1124
  }
1127
- function gn(t, e, i, r, n, o) {
1128
- var c = t.__className;
1129
- if (Q || c !== i) {
1130
- var f = mn(i, r, o);
1131
- (!Q || f !== t.getAttribute("class")) && (f == null ? t.removeAttribute("class") : t.className = f), t.__className = i;
1125
+ function hn(t, e, i, r, n, o) {
1126
+ var d = t.__className;
1127
+ if (J || d !== i) {
1128
+ var b = fn(i, r, o);
1129
+ (!J || b !== t.getAttribute("class")) && (b == null ? t.removeAttribute("class") : t.className = b), t.__className = i;
1132
1130
  } else if (o)
1133
- for (var h in o) {
1134
- var d = !!o[h];
1135
- (n == null || d !== !!n[h]) && t.classList.toggle(h, d);
1131
+ for (var c in o) {
1132
+ var p = !!o[c];
1133
+ (n == null || p !== !!n[c]) && t.classList.toggle(c, p);
1136
1134
  }
1137
1135
  return o;
1138
1136
  }
1139
- function fi(t, e, i, r) {
1137
+ function ui(t, e, i, r) {
1140
1138
  var n = t.__attributes ?? (t.__attributes = {});
1141
- Q && (n[e] = t.getAttribute(e)), n[e] !== (n[e] = i) && ("__styles" in t && (t.__styles = {}), i == null ? t.removeAttribute(e) : typeof i != "string" && _n(t).includes(e) ? t[e] = i : t.setAttribute(e, i));
1139
+ J && (n[e] = t.getAttribute(e)), n[e] !== (n[e] = i) && ("__styles" in t && (t.__styles = {}), i == null ? t.removeAttribute(e) : typeof i != "string" && bn(t).includes(e) ? t[e] = i : t.setAttribute(e, i));
1142
1140
  }
1143
- var hi = /* @__PURE__ */ new Map();
1144
- function _n(t) {
1145
- var e = hi.get(t.nodeName);
1141
+ var di = /* @__PURE__ */ new Map();
1142
+ function bn(t) {
1143
+ var e = di.get(t.nodeName);
1146
1144
  if (e) return e;
1147
- hi.set(t.nodeName, e = []);
1145
+ di.set(t.nodeName, e = []);
1148
1146
  for (var i, r = t, n = Element.prototype; n !== r; ) {
1149
- i = _r(r);
1147
+ i = hr(r);
1150
1148
  for (var o in i)
1151
1149
  i[o].set && e.push(o);
1152
- r = yi(r);
1150
+ r = gi(r);
1153
1151
  }
1154
1152
  return e;
1155
1153
  }
1156
- function bi(t, e) {
1157
- return t === e || (t == null ? void 0 : t[ct]) === e;
1154
+ function ci(t, e) {
1155
+ return t === e || (t == null ? void 0 : t[dt]) === e;
1158
1156
  }
1159
- function Ut(t = {}, e, i, r) {
1160
- return ti(() => {
1157
+ function Pt(t = {}, e, i, r) {
1158
+ return Jt(() => {
1161
1159
  var n, o;
1162
- return Ki(() => {
1163
- n = o, o = [], it(() => {
1164
- t !== i(...o) && (e(t, ...o), n && bi(i(...n), t) && e(null, ...n));
1160
+ return Ui(() => {
1161
+ n = o, o = [], $t(() => {
1162
+ t !== i(...o) && (e(t, ...o), n && ci(i(...n), t) && e(null, ...n));
1165
1163
  });
1166
1164
  }), () => {
1167
- Xt(() => {
1168
- o && bi(i(...o), t) && e(null, ...o);
1165
+ jt(() => {
1166
+ o && ci(i(...o), t) && e(null, ...o);
1169
1167
  });
1170
1168
  };
1171
1169
  }), t;
1172
1170
  }
1173
- function tr(t) {
1174
- U === null && ji(), Qr(() => {
1175
- const e = it(t);
1171
+ function Zi(t) {
1172
+ B === null && Wi(), Hr(() => {
1173
+ const e = $t(t);
1176
1174
  if (typeof e == "function") return (
1177
1175
  /** @type {() => void} */
1178
1176
  e
1179
1177
  );
1180
1178
  });
1181
1179
  }
1182
- function xn(t) {
1183
- U === null && ji(), tr(() => () => it(t));
1184
- }
1185
- function yn(t, e, i) {
1186
- if (t == null)
1187
- return e(void 0), dt;
1188
- const r = it(
1189
- () => t.subscribe(
1190
- e,
1191
- // @ts-expect-error
1192
- i
1193
- )
1194
- );
1195
- return r.unsubscribe ? () => r.unsubscribe() : r;
1196
- }
1197
- const Pe = [];
1198
- function ir(t, e = dt) {
1199
- let i = null;
1200
- const r = /* @__PURE__ */ new Set();
1201
- function n(f) {
1202
- if (Si(t, f) && (t = f, i)) {
1203
- const h = !Pe.length;
1204
- for (const d of r)
1205
- d[1](), Pe.push(d, t);
1206
- if (h) {
1207
- for (let d = 0; d < Pe.length; d += 2)
1208
- Pe[d][0](Pe[d + 1]);
1209
- Pe.length = 0;
1210
- }
1211
- }
1212
- }
1213
- function o(f) {
1214
- n(f(
1215
- /** @type {T} */
1216
- t
1217
- ));
1218
- }
1219
- function c(f, h = dt) {
1220
- const d = [f, h];
1221
- return r.add(d), r.size === 1 && (i = e(n, o) || dt), f(
1222
- /** @type {T} */
1223
- t
1224
- ), () => {
1225
- r.delete(d), r.size === 0 && i && (i(), i = null);
1226
- };
1227
- }
1228
- return { set: n, update: o, subscribe: c };
1229
- }
1230
- function rr(t) {
1231
- let e;
1232
- return yn(t, (i) => e = i)(), e;
1180
+ function pn(t) {
1181
+ B === null && Wi(), Zi(() => () => $t(t));
1233
1182
  }
1234
1183
  function ut(t, e, i, r) {
1235
1184
  var n;
@@ -1238,31 +1187,31 @@ function ut(t, e, i, r) {
1238
1187
  var o = (
1239
1188
  /** @type {V} */
1240
1189
  r
1241
- ), c = true, f = false, h = () => (f = true, c && (c = false, o = /** @type {V} */
1242
- r), o), d;
1243
- d = () => {
1244
- var a = (
1190
+ ), d = true, b = false, c = () => (b = true, d && (d = false, o = /** @type {V} */
1191
+ r), o), p;
1192
+ p = () => {
1193
+ var l = (
1245
1194
  /** @type {V} */
1246
1195
  t[e]
1247
1196
  );
1248
- return a === void 0 ? h() : (c = true, f = false, a);
1197
+ return l === void 0 ? c() : (d = true, b = false, l);
1249
1198
  };
1250
- var p = false, w = /* @__PURE__ */ Di(n), s = /* @__PURE__ */ Ri(() => {
1251
- var a = d(), l = P(w);
1252
- return p ? (p = false, l) : w.v = a;
1199
+ var h = false, m = /* @__PURE__ */ Ci(n), s = /* @__PURE__ */ ki(() => {
1200
+ var l = p(), a = U(m);
1201
+ return h ? (h = false, a) : m.v = l;
1253
1202
  });
1254
- return function(a, l) {
1203
+ return function(l, a) {
1255
1204
  if (arguments.length > 0) {
1256
- const u = l ? P(s) : a;
1257
- return s.equals(u) || (p = true, H(w, u), f && o !== void 0 && (o = u), it(() => P(s))), a;
1205
+ const u = a ? U(s) : l;
1206
+ return s.equals(u) || (h = true, q(m, u), b && o !== void 0 && (o = u), $t(() => U(s))), l;
1258
1207
  }
1259
- return P(s);
1208
+ return U(s);
1260
1209
  };
1261
1210
  }
1262
- function Cn(t) {
1263
- return new En(t);
1211
+ function vn(t) {
1212
+ return new mn(t);
1264
1213
  }
1265
- class En {
1214
+ class mn {
1266
1215
  /**
1267
1216
  * @param {ComponentConstructorOptions & {
1268
1217
  * component: any;
@@ -1274,25 +1223,25 @@ class En {
1274
1223
  /** @type {Record<string, any>} */
1275
1224
  __privateAdd(this, _e2);
1276
1225
  var _a2;
1277
- var i = /* @__PURE__ */ new Map(), r = (o, c) => {
1278
- var f = /* @__PURE__ */ Di(c);
1279
- return i.set(o, f), f;
1226
+ var i = /* @__PURE__ */ new Map(), r = (o, d) => {
1227
+ var b = /* @__PURE__ */ Ci(d);
1228
+ return i.set(o, b), b;
1280
1229
  };
1281
1230
  const n = new Proxy(
1282
1231
  { ...e.props || {}, $$events: {} },
1283
1232
  {
1284
- get(o, c) {
1285
- return P(i.get(c) ?? r(c, Reflect.get(o, c)));
1233
+ get(o, d) {
1234
+ return U(i.get(d) ?? r(d, Reflect.get(o, d)));
1286
1235
  },
1287
- has(o, c) {
1288
- return c === wr ? true : (P(i.get(c) ?? r(c, Reflect.get(o, c))), Reflect.has(o, c));
1236
+ has(o, d) {
1237
+ return d === dr ? true : (U(i.get(d) ?? r(d, Reflect.get(o, d))), Reflect.has(o, d));
1289
1238
  },
1290
- set(o, c, f) {
1291
- return H(i.get(c) ?? r(c, f), f), Reflect.set(o, c, f);
1239
+ set(o, d, b) {
1240
+ return q(i.get(d) ?? r(d, b), b), Reflect.set(o, d, b);
1292
1241
  }
1293
1242
  }
1294
1243
  );
1295
- __privateSet(this, _e2, (e.hydrate ? pn : Ji)(e.component, {
1244
+ __privateSet(this, _e2, (e.hydrate ? un : Yi)(e.component, {
1296
1245
  target: e.target,
1297
1246
  anchor: e.anchor,
1298
1247
  props: n,
@@ -1301,13 +1250,13 @@ class En {
1301
1250
  recover: e.recover
1302
1251
  })), (!((_a2 = e == null ? void 0 : e.props) == null ? void 0 : _a2.$$host) || e.sync === false) && Ye(), __privateSet(this, _t2, n.$$events);
1303
1252
  for (const o of Object.keys(__privateGet(this, _e2)))
1304
- o === "$set" || o === "$destroy" || o === "$on" || gt(this, o, {
1253
+ o === "$set" || o === "$destroy" || o === "$on" || wt(this, o, {
1305
1254
  get() {
1306
1255
  return __privateGet(this, _e2)[o];
1307
1256
  },
1308
1257
  /** @param {any} value */
1309
- set(c) {
1310
- __privateGet(this, _e2)[o] = c;
1258
+ set(d) {
1259
+ __privateGet(this, _e2)[o] = d;
1311
1260
  },
1312
1261
  enumerable: true
1313
1262
  });
@@ -1315,7 +1264,7 @@ class En {
1315
1264
  (o) => {
1316
1265
  Object.assign(n, o);
1317
1266
  }, __privateGet(this, _e2).$destroy = () => {
1318
- vn(__privateGet(this, _e2));
1267
+ dn(__privateGet(this, _e2));
1319
1268
  };
1320
1269
  }
1321
1270
  /** @param {Record<string, any>} props */
@@ -1343,8 +1292,8 @@ class En {
1343
1292
  }
1344
1293
  _t2 = new WeakMap();
1345
1294
  _e2 = new WeakMap();
1346
- let nr;
1347
- typeof HTMLElement == "function" && (nr = class extends HTMLElement {
1295
+ let Ji;
1296
+ typeof HTMLElement == "function" && (Ji = class extends HTMLElement {
1348
1297
  /**
1349
1298
  * @param {*} $$componentCtor
1350
1299
  * @param {*} $$slots
@@ -1402,21 +1351,21 @@ typeof HTMLElement == "function" && (nr = class extends HTMLElement {
1402
1351
  let t = function(r) {
1403
1352
  return (n) => {
1404
1353
  const o = document.createElement("slot");
1405
- r !== "default" && (o.name = r), Qi(n, o);
1354
+ r !== "default" && (o.name = r), Gi(n, o);
1406
1355
  };
1407
1356
  };
1408
1357
  if (await Promise.resolve(), !this.$$cn || this.$$c)
1409
1358
  return;
1410
- const e = {}, i = kn(this);
1359
+ const e = {}, i = wn(this);
1411
1360
  for (const r of this.$$s)
1412
1361
  r in i && (r === "default" && !this.$$d.children ? (this.$$d.children = t(r), e.default = true) : e[r] = t(r));
1413
1362
  for (const r of this.attributes) {
1414
1363
  const n = this.$$g_p(r.name);
1415
- n in this.$$d || (this.$$d[n] = bt(n, r.value, this.$$p_d, "toProp"));
1364
+ n in this.$$d || (this.$$d[n] = ht(n, r.value, this.$$p_d, "toProp"));
1416
1365
  }
1417
1366
  for (const r in this.$$p_d)
1418
1367
  !(r in this.$$d) && this[r] !== void 0 && (this.$$d[r] = this[r], delete this[r]);
1419
- this.$$c = Cn({
1368
+ this.$$c = vn({
1420
1369
  component: this.$$ctor,
1421
1370
  target: this.shadowRoot || this,
1422
1371
  props: {
@@ -1424,14 +1373,14 @@ typeof HTMLElement == "function" && (nr = class extends HTMLElement {
1424
1373
  $$slots: e,
1425
1374
  $$host: this
1426
1375
  }
1427
- }), this.$$me = Jr(() => {
1428
- Ki(() => {
1376
+ }), this.$$me = jr(() => {
1377
+ Ui(() => {
1429
1378
  var _a2;
1430
1379
  this.$$r = true;
1431
1380
  for (const r of mt(this.$$c)) {
1432
1381
  if (!((_a2 = this.$$p_d[r]) == null ? void 0 : _a2.reflect)) continue;
1433
1382
  this.$$d[r] = this.$$c[r];
1434
- const n = bt(
1383
+ const n = ht(
1435
1384
  r,
1436
1385
  this.$$d[r],
1437
1386
  this.$$p_d,
@@ -1459,7 +1408,7 @@ typeof HTMLElement == "function" && (nr = class extends HTMLElement {
1459
1408
  */
1460
1409
  attributeChangedCallback(t, e, i) {
1461
1410
  var _a2;
1462
- this.$$r || (t = this.$$g_p(t), this.$$d[t] = bt(t, i, this.$$p_d, "toProp"), (_a2 = this.$$c) == null ? void 0 : _a2.$set({ [t]: this.$$d[t] }));
1411
+ this.$$r || (t = this.$$g_p(t), this.$$d[t] = ht(t, i, this.$$p_d, "toProp"), (_a2 = this.$$c) == null ? void 0 : _a2.$set({ [t]: this.$$d[t] }));
1463
1412
  }
1464
1413
  disconnectedCallback() {
1465
1414
  this.$$cn = false, Promise.resolve().then(() => {
@@ -1475,7 +1424,7 @@ typeof HTMLElement == "function" && (nr = class extends HTMLElement {
1475
1424
  ) || t;
1476
1425
  }
1477
1426
  });
1478
- function bt(t, e, i, r) {
1427
+ function ht(t, e, i, r) {
1479
1428
  var _a2;
1480
1429
  const n = (_a2 = i[t]) == null ? void 0 : _a2.type;
1481
1430
  if (e = n === "Boolean" && typeof e != "boolean" ? e != null : e, !r || !i[t])
@@ -1506,7 +1455,7 @@ function bt(t, e, i, r) {
1506
1455
  return e;
1507
1456
  }
1508
1457
  }
1509
- function kn(t) {
1458
+ function wn(t) {
1510
1459
  const e = {};
1511
1460
  return t.childNodes.forEach((i) => {
1512
1461
  e[
@@ -1515,43 +1464,43 @@ function kn(t) {
1515
1464
  ] = true;
1516
1465
  }), e;
1517
1466
  }
1518
- function Sn(t, e, i, r, n, o) {
1519
- let c = class extends nr {
1467
+ function gn(t, e, i, r, n, o) {
1468
+ let d = class extends Ji {
1520
1469
  constructor() {
1521
1470
  super(t, i, n), this.$$p_d = e;
1522
1471
  }
1523
1472
  static get observedAttributes() {
1524
1473
  return mt(e).map(
1525
- (f) => (e[f].attribute || f).toLowerCase()
1474
+ (b) => (e[b].attribute || b).toLowerCase()
1526
1475
  );
1527
1476
  }
1528
1477
  };
1529
- return mt(e).forEach((f) => {
1530
- gt(c.prototype, f, {
1478
+ return mt(e).forEach((b) => {
1479
+ wt(d.prototype, b, {
1531
1480
  get() {
1532
- return this.$$c && f in this.$$c ? this.$$c[f] : this.$$d[f];
1481
+ return this.$$c && b in this.$$c ? this.$$c[b] : this.$$d[b];
1533
1482
  },
1534
- set(h) {
1483
+ set(c) {
1535
1484
  var _a2;
1536
- h = bt(f, h, e), this.$$d[f] = h;
1537
- var d = this.$$c;
1538
- if (d) {
1539
- var p = (_a2 = ze(d, f)) == null ? void 0 : _a2.get;
1540
- p ? d[f] = h : d.$set({ [f]: h });
1485
+ c = ht(b, c, e), this.$$d[b] = c;
1486
+ var p = this.$$c;
1487
+ if (p) {
1488
+ var h = (_a2 = ze(p, b)) == null ? void 0 : _a2.get;
1489
+ h ? p[b] = c : p.$set({ [b]: c });
1541
1490
  }
1542
1491
  }
1543
1492
  });
1544
- }), r.forEach((f) => {
1545
- gt(c.prototype, f, {
1493
+ }), r.forEach((b) => {
1494
+ wt(d.prototype, b, {
1546
1495
  get() {
1547
1496
  var _a2;
1548
- return (_a2 = this.$$c) == null ? void 0 : _a2[f];
1497
+ return (_a2 = this.$$c) == null ? void 0 : _a2[b];
1549
1498
  }
1550
1499
  });
1551
- }), o && (c = o(c)), t.element = /** @type {any} */
1552
- c, c;
1500
+ }), o && (d = o(d)), t.element = /** @type {any} */
1501
+ d, d;
1553
1502
  }
1554
- class Dn {
1503
+ class _n {
1555
1504
  constructor() {
1556
1505
  __publicField(this, "verbose", false);
1557
1506
  }
@@ -1562,51 +1511,51 @@ class Dn {
1562
1511
  this.verbose && console.error(e, i);
1563
1512
  }
1564
1513
  }
1565
- const L = new Dn();
1566
- function Tn(t) {
1514
+ const L = new _n();
1515
+ function xn(t) {
1567
1516
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1568
1517
  }
1569
- var Ze = { exports: {} }, Rn = Ze.exports, pi;
1570
- function $n() {
1571
- return pi || (pi = 1, (function(t, e) {
1518
+ var Ze = { exports: {} }, yn = Ze.exports, fi;
1519
+ function Cn() {
1520
+ return fi || (fi = 1, (function(t, e) {
1572
1521
  (function(i, r) {
1573
- var n = "1.0.41", o = "", c = "?", f = "function", h = "undefined", d = "object", p = "string", w = "major", s = "model", a = "name", l = "type", u = "vendor", b = "version", $ = "architecture", M = "console", _ = "mobile", m = "tablet", A = "smarttv", O = "wearable", ce = "embedded", We = 500, Te = "Amazon", de = "Apple", fe = "ASUS", rt = "BlackBerry", Re = "Browser", $e = "Chrome", At = "Edge", Ee = "Firefox", Ae = "Google", nt = "Honor", st = "Huawei", Ot = "Lenovo", Oe = "LG", Le = "Microsoft", Ve = "Motorola", qe = "Nvidia", He = "OnePlus", he = "Opera", Me = "OPPO", J = "Samsung", be = "Sharp", pe = "Sony", ke = "Xiaomi", I = "Zebra", v = "Facebook", T = "Chromium OS", F = "Mac OS", R = " Browser", K = function(y, C) {
1522
+ var n = "1.0.41", o = "", d = "?", b = "function", c = "undefined", p = "object", h = "string", m = "major", s = "model", l = "name", a = "type", u = "vendor", f = "version", $ = "architecture", A = "console", w = "mobile", _ = "tablet", O = "smarttv", F = "wearable", Q = "embedded", ae = 500, Ee = "Amazon", he = "Apple", it = "ASUS", rt = "BlackBerry", ee = "Browser", Re = "Chrome", At = "Edge", $e = "Firefox", Ae = "Google", We = "Honor", nt = "Huawei", Ot = "Lenovo", Oe = "LG", Ve = "Microsoft", qe = "Motorola", Le = "Nvidia", st = "OnePlus", ke = "Opera", be = "OPPO", pe = "Samsung", He = "Sharp", te = "Sony", le = "Xiaomi", Fe = "Zebra", Me = "Facebook", j = "Chromium OS", v = "Mac OS", T = " Browser", M = function(y, C) {
1574
1523
  var x = {};
1575
1524
  for (var S in y)
1576
1525
  C[S] && C[S].length % 2 === 0 ? x[S] = C[S].concat(y[S]) : x[S] = y[S];
1577
1526
  return x;
1578
- }, B = function(y) {
1527
+ }, R = function(y) {
1579
1528
  for (var C = {}, x = 0; x < y.length; x++)
1580
1529
  C[y[x].toUpperCase()] = y[x];
1581
1530
  return C;
1582
- }, se = function(y, C) {
1583
- return typeof y === p ? ve(C).indexOf(ve(y)) !== -1 : false;
1584
- }, ve = function(y) {
1531
+ }, z = function(y, C) {
1532
+ return typeof y === h ? N(C).indexOf(N(y)) !== -1 : false;
1533
+ }, N = function(y) {
1585
1534
  return y.toLowerCase();
1586
- }, ur = function(y) {
1587
- return typeof y === p ? y.replace(/[^\d\.]/g, o).split(".")[0] : r;
1588
- }, Lt = function(y, C) {
1589
- if (typeof y === p)
1590
- return y = y.replace(/^\s\s*/, o), typeof C === h ? y : y.substring(0, We);
1535
+ }, ve = function(y) {
1536
+ return typeof y === h ? y.replace(/[^\d\.]/g, o).split(".")[0] : r;
1537
+ }, Ne = function(y, C) {
1538
+ if (typeof y === h)
1539
+ return y = y.replace(/^\s\s*/, o), typeof C === c ? y : y.substring(0, ae);
1591
1540
  }, je = function(y, C) {
1592
- for (var x = 0, S, oe, ee, E, g, te; x < C.length && !g; ) {
1593
- var Mt = C[x], ni = C[x + 1];
1594
- for (S = oe = 0; S < Mt.length && !g && Mt[S]; )
1595
- if (g = Mt[S++].exec(y), g)
1596
- for (ee = 0; ee < ni.length; ee++)
1597
- te = g[++oe], E = ni[ee], typeof E === d && E.length > 0 ? E.length === 2 ? typeof E[1] == f ? this[E[0]] = E[1].call(this, te) : this[E[0]] = E[1] : E.length === 3 ? typeof E[1] === f && !(E[1].exec && E[1].test) ? this[E[0]] = te ? E[1].call(this, te, E[2]) : r : this[E[0]] = te ? te.replace(E[1], E[2]) : r : E.length === 4 && (this[E[0]] = te ? E[3].call(this, te.replace(E[1], E[2])) : r) : this[E] = te || r;
1541
+ for (var x = 0, S, ue, ie, E, g, re; x < C.length && !g; ) {
1542
+ var Lt = C[x], ti = C[x + 1];
1543
+ for (S = ue = 0; S < Lt.length && !g && Lt[S]; )
1544
+ if (g = Lt[S++].exec(y), g)
1545
+ for (ie = 0; ie < ti.length; ie++)
1546
+ re = g[++ue], E = ti[ie], typeof E === p && E.length > 0 ? E.length === 2 ? typeof E[1] == b ? this[E[0]] = E[1].call(this, re) : this[E[0]] = E[1] : E.length === 3 ? typeof E[1] === b && !(E[1].exec && E[1].test) ? this[E[0]] = re ? E[1].call(this, re, E[2]) : r : this[E[0]] = re ? re.replace(E[1], E[2]) : r : E.length === 4 && (this[E[0]] = re ? E[3].call(this, re.replace(E[1], E[2])) : r) : this[E] = re || r;
1598
1547
  x += 2;
1599
1548
  }
1600
1549
  }, Ge = function(y, C) {
1601
1550
  for (var x in C)
1602
- if (typeof C[x] === d && C[x].length > 0) {
1551
+ if (typeof C[x] === p && C[x].length > 0) {
1603
1552
  for (var S = 0; S < C[x].length; S++)
1604
- if (se(C[x][S], y))
1605
- return x === c ? r : x;
1606
- } else if (se(C[x], y))
1607
- return x === c ? r : x;
1553
+ if (z(C[x][S], y))
1554
+ return x === d ? r : x;
1555
+ } else if (z(C[x], y))
1556
+ return x === d ? r : x;
1608
1557
  return C.hasOwnProperty("*") ? C["*"] : y;
1609
- }, cr = {
1558
+ }, rr = {
1610
1559
  "1.0": "/8",
1611
1560
  "1.2": "/1",
1612
1561
  "1.3": "/3",
@@ -1615,7 +1564,7 @@ function $n() {
1615
1564
  "2.0.3": "/417",
1616
1565
  "2.0.4": "/419",
1617
1566
  "?": "/"
1618
- }, ii = {
1567
+ }, Qt = {
1619
1568
  ME: "4.90",
1620
1569
  "NT 3.11": "NT3.51",
1621
1570
  "NT 4.0": "NT4.0",
@@ -1627,18 +1576,18 @@ function $n() {
1627
1576
  "8.1": "NT 6.3",
1628
1577
  10: ["NT 6.4", "NT 10.0"],
1629
1578
  RT: "ARM"
1630
- }, ri = {
1579
+ }, ei = {
1631
1580
  browser: [
1632
1581
  [
1633
1582
  /\b(?:crmo|crios)\/([\w\.]+)/i
1634
1583
  // Chrome for Android/iOS
1635
1584
  ],
1636
- [b, [a, "Chrome"]],
1585
+ [f, [l, "Chrome"]],
1637
1586
  [
1638
1587
  /edg(?:e|ios|a)?\/([\w\.]+)/i
1639
1588
  // Microsoft Edge
1640
1589
  ],
1641
- [b, [a, "Edge"]],
1590
+ [f, [l, "Edge"]],
1642
1591
  [
1643
1592
  // Presto based
1644
1593
  /(opera mini)\/([-\w\.]+)/i,
@@ -1648,33 +1597,33 @@ function $n() {
1648
1597
  /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i
1649
1598
  // Opera
1650
1599
  ],
1651
- [a, b],
1600
+ [l, f],
1652
1601
  [
1653
1602
  /opios[\/ ]+([\w\.]+)/i
1654
1603
  // Opera mini on iphone >= 8.0
1655
1604
  ],
1656
- [b, [a, he + " Mini"]],
1605
+ [f, [l, ke + " Mini"]],
1657
1606
  [
1658
1607
  /\bop(?:rg)?x\/([\w\.]+)/i
1659
1608
  // Opera GX
1660
1609
  ],
1661
- [b, [a, he + " GX"]],
1610
+ [f, [l, ke + " GX"]],
1662
1611
  [
1663
1612
  /\bopr\/([\w\.]+)/i
1664
1613
  // Opera Webkit
1665
1614
  ],
1666
- [b, [a, he]],
1615
+ [f, [l, ke]],
1667
1616
  [
1668
1617
  // Mixed
1669
1618
  /\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i
1670
1619
  // Baidu
1671
1620
  ],
1672
- [b, [a, "Baidu"]],
1621
+ [f, [l, "Baidu"]],
1673
1622
  [
1674
1623
  /\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i
1675
1624
  // Maxthon
1676
1625
  ],
1677
- [b, [a, "Maxthon"]],
1626
+ [f, [l, "Maxthon"]],
1678
1627
  [
1679
1628
  /(kindle)\/([\w\.]+)/i,
1680
1629
  // Kindle
@@ -1693,22 +1642,22 @@ function $n() {
1693
1642
  /(weibo)__([\d\.]+)/i
1694
1643
  // Weibo
1695
1644
  ],
1696
- [a, b],
1645
+ [l, f],
1697
1646
  [
1698
1647
  /quark(?:pc)?\/([-\w\.]+)/i
1699
1648
  // Quark
1700
1649
  ],
1701
- [b, [a, "Quark"]],
1650
+ [f, [l, "Quark"]],
1702
1651
  [
1703
1652
  /\bddg\/([\w\.]+)/i
1704
1653
  // DuckDuckGo
1705
1654
  ],
1706
- [b, [a, "DuckDuckGo"]],
1655
+ [f, [l, "DuckDuckGo"]],
1707
1656
  [
1708
1657
  /(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i
1709
1658
  // UCBrowser
1710
1659
  ],
1711
- [b, [a, "UC" + Re]],
1660
+ [f, [l, "UC" + ee]],
1712
1661
  [
1713
1662
  /microm.+\bqbcore\/([\w\.]+)/i,
1714
1663
  // WeChat Desktop for Windows Built-in Browser
@@ -1716,97 +1665,97 @@ function $n() {
1716
1665
  /micromessenger\/([\w\.]+)/i
1717
1666
  // WeChat
1718
1667
  ],
1719
- [b, [a, "WeChat"]],
1668
+ [f, [l, "WeChat"]],
1720
1669
  [
1721
1670
  /konqueror\/([\w\.]+)/i
1722
1671
  // Konqueror
1723
1672
  ],
1724
- [b, [a, "Konqueror"]],
1673
+ [f, [l, "Konqueror"]],
1725
1674
  [
1726
1675
  /trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i
1727
1676
  // IE11
1728
1677
  ],
1729
- [b, [a, "IE"]],
1678
+ [f, [l, "IE"]],
1730
1679
  [
1731
1680
  /ya(?:search)?browser\/([\w\.]+)/i
1732
1681
  // Yandex
1733
1682
  ],
1734
- [b, [a, "Yandex"]],
1683
+ [f, [l, "Yandex"]],
1735
1684
  [
1736
1685
  /slbrowser\/([\w\.]+)/i
1737
1686
  // Smart Lenovo Browser
1738
1687
  ],
1739
- [b, [a, "Smart Lenovo " + Re]],
1688
+ [f, [l, "Smart Lenovo " + ee]],
1740
1689
  [
1741
1690
  /(avast|avg)\/([\w\.]+)/i
1742
1691
  // Avast/AVG Secure Browser
1743
1692
  ],
1744
- [[a, /(.+)/, "$1 Secure " + Re], b],
1693
+ [[l, /(.+)/, "$1 Secure " + ee], f],
1745
1694
  [
1746
1695
  /\bfocus\/([\w\.]+)/i
1747
1696
  // Firefox Focus
1748
1697
  ],
1749
- [b, [a, Ee + " Focus"]],
1698
+ [f, [l, $e + " Focus"]],
1750
1699
  [
1751
1700
  /\bopt\/([\w\.]+)/i
1752
1701
  // Opera Touch
1753
1702
  ],
1754
- [b, [a, he + " Touch"]],
1703
+ [f, [l, ke + " Touch"]],
1755
1704
  [
1756
1705
  /coc_coc\w+\/([\w\.]+)/i
1757
1706
  // Coc Coc Browser
1758
1707
  ],
1759
- [b, [a, "Coc Coc"]],
1708
+ [f, [l, "Coc Coc"]],
1760
1709
  [
1761
1710
  /dolfin\/([\w\.]+)/i
1762
1711
  // Dolphin
1763
1712
  ],
1764
- [b, [a, "Dolphin"]],
1713
+ [f, [l, "Dolphin"]],
1765
1714
  [
1766
1715
  /coast\/([\w\.]+)/i
1767
1716
  // Opera Coast
1768
1717
  ],
1769
- [b, [a, he + " Coast"]],
1718
+ [f, [l, ke + " Coast"]],
1770
1719
  [
1771
1720
  /miuibrowser\/([\w\.]+)/i
1772
1721
  // MIUI Browser
1773
1722
  ],
1774
- [b, [a, "MIUI" + R]],
1723
+ [f, [l, "MIUI" + T]],
1775
1724
  [
1776
1725
  /fxios\/([\w\.-]+)/i
1777
1726
  // Firefox for iOS
1778
1727
  ],
1779
- [b, [a, Ee]],
1728
+ [f, [l, $e]],
1780
1729
  [
1781
1730
  /\bqihoobrowser\/?([\w\.]*)/i
1782
1731
  // 360
1783
1732
  ],
1784
- [b, [a, "360"]],
1733
+ [f, [l, "360"]],
1785
1734
  [
1786
1735
  /\b(qq)\/([\w\.]+)/i
1787
1736
  // QQ
1788
1737
  ],
1789
- [[a, /(.+)/, "$1Browser"], b],
1738
+ [[l, /(.+)/, "$1Browser"], f],
1790
1739
  [
1791
1740
  /(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i
1792
1741
  ],
1793
- [[a, /(.+)/, "$1" + R], b],
1742
+ [[l, /(.+)/, "$1" + T], f],
1794
1743
  [
1795
1744
  // Oculus/Sailfish/HuaweiBrowser/VivoBrowser/PicoBrowser
1796
1745
  /samsungbrowser\/([\w\.]+)/i
1797
1746
  // Samsung Internet
1798
1747
  ],
1799
- [b, [a, J + " Internet"]],
1748
+ [f, [l, pe + " Internet"]],
1800
1749
  [
1801
1750
  /metasr[\/ ]?([\d\.]+)/i
1802
1751
  // Sogou Explorer
1803
1752
  ],
1804
- [b, [a, "Sogou Explorer"]],
1753
+ [f, [l, "Sogou Explorer"]],
1805
1754
  [
1806
1755
  /(sogou)mo\w+\/([\d\.]+)/i
1807
1756
  // Sogou Mobile
1808
1757
  ],
1809
- [[a, "Sogou Mobile"], b],
1758
+ [[l, "Sogou Mobile"], f],
1810
1759
  [
1811
1760
  /(electron)\/([\w\.]+) safari/i,
1812
1761
  // Electron-based App
@@ -1815,27 +1764,27 @@ function $n() {
1815
1764
  /m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i
1816
1765
  // QQ/2345
1817
1766
  ],
1818
- [a, b],
1767
+ [l, f],
1819
1768
  [
1820
1769
  /(lbbrowser|rekonq)/i,
1821
1770
  // LieBao Browser/Rekonq
1822
1771
  /\[(linkedin)app\]/i
1823
1772
  // LinkedIn App for iOS & Android
1824
1773
  ],
1825
- [a],
1774
+ [l],
1826
1775
  [
1827
1776
  /ome\/([\w\.]+) \w* ?(iron) saf/i,
1828
1777
  // Iron
1829
1778
  /ome\/([\w\.]+).+qihu (360)[es]e/i
1830
1779
  // 360
1831
1780
  ],
1832
- [b, a],
1781
+ [f, l],
1833
1782
  [
1834
1783
  // WebView
1835
1784
  /((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i
1836
1785
  // Facebook App for iOS & Android
1837
1786
  ],
1838
- [[a, v], b],
1787
+ [[l, Me], f],
1839
1788
  [
1840
1789
  /(Klarna)\/([\w\.]+)/i,
1841
1790
  // Klarna Shopping Browser for iOS & Android
@@ -1856,72 +1805,72 @@ function $n() {
1856
1805
  /(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i
1857
1806
  // Chromium/Instagram/Snapchat
1858
1807
  ],
1859
- [a, b],
1808
+ [l, f],
1860
1809
  [
1861
1810
  /\bgsa\/([\w\.]+) .*safari\//i
1862
1811
  // Google Search Appliance on iOS
1863
1812
  ],
1864
- [b, [a, "GSA"]],
1813
+ [f, [l, "GSA"]],
1865
1814
  [
1866
1815
  /musical_ly(?:.+app_?version\/|_)([\w\.]+)/i
1867
1816
  // TikTok
1868
1817
  ],
1869
- [b, [a, "TikTok"]],
1818
+ [f, [l, "TikTok"]],
1870
1819
  [
1871
1820
  /headlesschrome(?:\/([\w\.]+)| )/i
1872
1821
  // Chrome Headless
1873
1822
  ],
1874
- [b, [a, $e + " Headless"]],
1823
+ [f, [l, Re + " Headless"]],
1875
1824
  [
1876
1825
  / wv\).+(chrome)\/([\w\.]+)/i
1877
1826
  // Chrome WebView
1878
1827
  ],
1879
- [[a, $e + " WebView"], b],
1828
+ [[l, Re + " WebView"], f],
1880
1829
  [
1881
1830
  /droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i
1882
1831
  // Android Browser
1883
1832
  ],
1884
- [b, [a, "Android " + Re]],
1833
+ [f, [l, "Android " + ee]],
1885
1834
  [
1886
1835
  /(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i
1887
1836
  // Chrome/OmniWeb/Arora/Tizen/Nokia
1888
1837
  ],
1889
- [a, b],
1838
+ [l, f],
1890
1839
  [
1891
1840
  /version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i
1892
1841
  // Mobile Safari
1893
1842
  ],
1894
- [b, [a, "Mobile Safari"]],
1843
+ [f, [l, "Mobile Safari"]],
1895
1844
  [
1896
1845
  /version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i
1897
1846
  // Safari & Safari Mobile
1898
1847
  ],
1899
- [b, a],
1848
+ [f, l],
1900
1849
  [
1901
1850
  /webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i
1902
1851
  // Safari < 3.0
1903
1852
  ],
1904
- [a, [b, Ge, cr]],
1853
+ [l, [f, Ge, rr]],
1905
1854
  [
1906
1855
  /(webkit|khtml)\/([\w\.]+)/i
1907
1856
  ],
1908
- [a, b],
1857
+ [l, f],
1909
1858
  [
1910
1859
  // Gecko based
1911
1860
  /(navigator|netscape\d?)\/([-\w\.]+)/i
1912
1861
  // Netscape
1913
1862
  ],
1914
- [[a, "Netscape"], b],
1863
+ [[l, "Netscape"], f],
1915
1864
  [
1916
1865
  /(wolvic|librewolf)\/([\w\.]+)/i
1917
1866
  // Wolvic/LibreWolf
1918
1867
  ],
1919
- [a, b],
1868
+ [l, f],
1920
1869
  [
1921
1870
  /mobile vr; rv:([\w\.]+)\).+firefox/i
1922
1871
  // Firefox Reality
1923
1872
  ],
1924
- [b, [a, Ee + " Reality"]],
1873
+ [f, [l, $e + " Reality"]],
1925
1874
  [
1926
1875
  /ekiohf.+(flow)\/([\w\.]+)/i,
1927
1876
  // Flow
@@ -1941,12 +1890,12 @@ function $n() {
1941
1890
  /\b(links) \(([\w\.]+)/i
1942
1891
  // Links
1943
1892
  ],
1944
- [a, [b, /_/g, "."]],
1893
+ [l, [f, /_/g, "."]],
1945
1894
  [
1946
1895
  /(cobalt)\/([\w\.]+)/i
1947
1896
  // Cobalt
1948
1897
  ],
1949
- [a, [b, /master.|lts./, ""]]
1898
+ [l, [f, /master.|lts./, ""]]
1950
1899
  ],
1951
1900
  cpu: [
1952
1901
  [
@@ -1980,7 +1929,7 @@ function $n() {
1980
1929
  /((ppc|powerpc)(64)?)( mac|;|\))/i
1981
1930
  // PowerPC
1982
1931
  ],
1983
- [[$, /ower/, o, ve]],
1932
+ [[$, /ower/, o, N]],
1984
1933
  [
1985
1934
  / sun4\w[;\)]/i
1986
1935
  // SPARC
@@ -1990,7 +1939,7 @@ function $n() {
1990
1939
  /\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i
1991
1940
  // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
1992
1941
  ],
1993
- [[$, ve]]
1942
+ [[$, N]]
1994
1943
  ],
1995
1944
  device: [
1996
1945
  [
@@ -2000,61 +1949,61 @@ function $n() {
2000
1949
  // Samsung
2001
1950
  /\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i
2002
1951
  ],
2003
- [s, [u, J], [l, m]],
1952
+ [s, [u, pe], [a, _]],
2004
1953
  [
2005
1954
  /\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
2006
1955
  /samsung[- ]((?!sm-[lr])[-\w]+)/i,
2007
1956
  /sec-(sgh\w+)/i
2008
1957
  ],
2009
- [s, [u, J], [l, _]],
1958
+ [s, [u, pe], [a, w]],
2010
1959
  [
2011
1960
  // Apple
2012
1961
  /(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i
2013
1962
  // iPod/iPhone
2014
1963
  ],
2015
- [s, [u, de], [l, _]],
1964
+ [s, [u, he], [a, w]],
2016
1965
  [
2017
1966
  /\((ipad);[-\w\),; ]+apple/i,
2018
1967
  // iPad
2019
1968
  /applecoremedia\/[\w\.]+ \((ipad)/i,
2020
1969
  /\b(ipad)\d\d?,\d\d?[;\]].+ios/i
2021
1970
  ],
2022
- [s, [u, de], [l, m]],
1971
+ [s, [u, he], [a, _]],
2023
1972
  [
2024
1973
  /(macintosh);/i
2025
1974
  ],
2026
- [s, [u, de]],
1975
+ [s, [u, he]],
2027
1976
  [
2028
1977
  // Sharp
2029
1978
  /\b(sh-?[altvz]?\d\d[a-ekm]?)/i
2030
1979
  ],
2031
- [s, [u, be], [l, _]],
1980
+ [s, [u, He], [a, w]],
2032
1981
  [
2033
1982
  // Honor
2034
1983
  /\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i
2035
1984
  ],
2036
- [s, [u, nt], [l, m]],
1985
+ [s, [u, We], [a, _]],
2037
1986
  [
2038
1987
  /honor([-\w ]+)[;\)]/i
2039
1988
  ],
2040
- [s, [u, nt], [l, _]],
1989
+ [s, [u, We], [a, w]],
2041
1990
  [
2042
1991
  // Huawei
2043
1992
  /\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i
2044
1993
  ],
2045
- [s, [u, st], [l, m]],
1994
+ [s, [u, nt], [a, _]],
2046
1995
  [
2047
1996
  /(?:huawei)([-\w ]+)[;\)]/i,
2048
1997
  /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
2049
1998
  ],
2050
- [s, [u, st], [l, _]],
1999
+ [s, [u, nt], [a, w]],
2051
2000
  [
2052
2001
  // Xiaomi
2053
2002
  /oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,
2054
2003
  /\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i
2055
2004
  // Mi Pad tablets
2056
2005
  ],
2057
- [[s, /_/g, " "], [u, ke], [l, m]],
2006
+ [[s, /_/g, " "], [u, le], [a, _]],
2058
2007
  [
2059
2008
  /\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,
2060
2009
  // Xiaomi POCO
@@ -2070,93 +2019,93 @@ function $n() {
2070
2019
  // Xiaomi Mi
2071
2020
  / ([\w ]+) miui\/v?\d/i
2072
2021
  ],
2073
- [[s, /_/g, " "], [u, ke], [l, _]],
2022
+ [[s, /_/g, " "], [u, le], [a, w]],
2074
2023
  [
2075
2024
  // OPPO
2076
2025
  /; (\w+) bui.+ oppo/i,
2077
2026
  /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
2078
2027
  ],
2079
- [s, [u, Me], [l, _]],
2028
+ [s, [u, be], [a, w]],
2080
2029
  [
2081
2030
  /\b(opd2(\d{3}a?))(?: bui|\))/i
2082
2031
  ],
2083
- [s, [u, Ge, { OnePlus: ["304", "403", "203"], "*": Me }], [l, m]],
2032
+ [s, [u, Ge, { OnePlus: ["304", "403", "203"], "*": be }], [a, _]],
2084
2033
  [
2085
2034
  // Vivo
2086
2035
  /vivo (\w+)(?: bui|\))/i,
2087
2036
  /\b(v[12]\d{3}\w?[at])(?: bui|;)/i
2088
2037
  ],
2089
- [s, [u, "Vivo"], [l, _]],
2038
+ [s, [u, "Vivo"], [a, w]],
2090
2039
  [
2091
2040
  // Realme
2092
2041
  /\b(rmx[1-3]\d{3})(?: bui|;|\))/i
2093
2042
  ],
2094
- [s, [u, "Realme"], [l, _]],
2043
+ [s, [u, "Realme"], [a, w]],
2095
2044
  [
2096
2045
  // Motorola
2097
2046
  /\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
2098
2047
  /\bmot(?:orola)?[- ](\w*)/i,
2099
2048
  /((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
2100
2049
  ],
2101
- [s, [u, Ve], [l, _]],
2050
+ [s, [u, qe], [a, w]],
2102
2051
  [
2103
2052
  /\b(mz60\d|xoom[2 ]{0,2}) build\//i
2104
2053
  ],
2105
- [s, [u, Ve], [l, m]],
2054
+ [s, [u, qe], [a, _]],
2106
2055
  [
2107
2056
  // LG
2108
2057
  /((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
2109
2058
  ],
2110
- [s, [u, Oe], [l, m]],
2059
+ [s, [u, Oe], [a, _]],
2111
2060
  [
2112
2061
  /(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
2113
2062
  /\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,
2114
2063
  /\blg-?([\d\w]+) bui/i
2115
2064
  ],
2116
- [s, [u, Oe], [l, _]],
2065
+ [s, [u, Oe], [a, w]],
2117
2066
  [
2118
2067
  // Lenovo
2119
2068
  /(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,
2120
2069
  /lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i
2121
2070
  ],
2122
- [s, [u, Ot], [l, m]],
2071
+ [s, [u, Ot], [a, _]],
2123
2072
  [
2124
2073
  // Nokia
2125
2074
  /(nokia) (t[12][01])/i
2126
2075
  ],
2127
- [u, s, [l, m]],
2076
+ [u, s, [a, _]],
2128
2077
  [
2129
2078
  /(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,
2130
2079
  /nokia[-_ ]?(([-\w\. ]*))/i
2131
2080
  ],
2132
- [[s, /_/g, " "], [l, _], [u, "Nokia"]],
2081
+ [[s, /_/g, " "], [a, w], [u, "Nokia"]],
2133
2082
  [
2134
2083
  // Google
2135
2084
  /(pixel (c|tablet))\b/i
2136
2085
  // Google Pixel C/Tablet
2137
2086
  ],
2138
- [s, [u, Ae], [l, m]],
2087
+ [s, [u, Ae], [a, _]],
2139
2088
  [
2140
2089
  /droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i
2141
2090
  // Google Pixel
2142
2091
  ],
2143
- [s, [u, Ae], [l, _]],
2092
+ [s, [u, Ae], [a, w]],
2144
2093
  [
2145
2094
  // Sony
2146
2095
  /droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i
2147
2096
  ],
2148
- [s, [u, pe], [l, _]],
2097
+ [s, [u, te], [a, w]],
2149
2098
  [
2150
2099
  /sony tablet [ps]/i,
2151
2100
  /\b(?:sony)?sgp\w+(?: bui|\))/i
2152
2101
  ],
2153
- [[s, "Xperia Tablet"], [u, pe], [l, m]],
2102
+ [[s, "Xperia Tablet"], [u, te], [a, _]],
2154
2103
  [
2155
2104
  // OnePlus
2156
2105
  / (kb2005|in20[12]5|be20[12][59])\b/i,
2157
2106
  /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
2158
2107
  ],
2159
- [s, [u, He], [l, _]],
2108
+ [s, [u, st], [a, w]],
2160
2109
  [
2161
2110
  // Amazon
2162
2111
  /(alexa)webm/i,
@@ -2165,39 +2114,39 @@ function $n() {
2165
2114
  /(kf[a-z]+)( bui|\)).+silk\//i
2166
2115
  // Kindle Fire HD
2167
2116
  ],
2168
- [s, [u, Te], [l, m]],
2117
+ [s, [u, Ee], [a, _]],
2169
2118
  [
2170
2119
  /((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i
2171
2120
  // Fire Phone
2172
2121
  ],
2173
- [[s, /(.+)/g, "Fire Phone $1"], [u, Te], [l, _]],
2122
+ [[s, /(.+)/g, "Fire Phone $1"], [u, Ee], [a, w]],
2174
2123
  [
2175
2124
  // BlackBerry
2176
2125
  /(playbook);[-\w\),; ]+(rim)/i
2177
2126
  // BlackBerry PlayBook
2178
2127
  ],
2179
- [s, u, [l, m]],
2128
+ [s, u, [a, _]],
2180
2129
  [
2181
2130
  /\b((?:bb[a-f]|st[hv])100-\d)/i,
2182
2131
  /\(bb10; (\w+)/i
2183
2132
  // BlackBerry 10
2184
2133
  ],
2185
- [s, [u, rt], [l, _]],
2134
+ [s, [u, rt], [a, w]],
2186
2135
  [
2187
2136
  // Asus
2188
2137
  /(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
2189
2138
  ],
2190
- [s, [u, fe], [l, m]],
2139
+ [s, [u, it], [a, _]],
2191
2140
  [
2192
2141
  / (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
2193
2142
  ],
2194
- [s, [u, fe], [l, _]],
2143
+ [s, [u, it], [a, w]],
2195
2144
  [
2196
2145
  // HTC
2197
2146
  /(nexus 9)/i
2198
2147
  // HTC Nexus 9
2199
2148
  ],
2200
- [s, [u, "HTC"], [l, m]],
2149
+ [s, [u, "HTC"], [a, _]],
2201
2150
  [
2202
2151
  /(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,
2203
2152
  // HTC
@@ -2206,66 +2155,66 @@ function $n() {
2206
2155
  /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i
2207
2156
  // Alcatel/GeeksPhone/Nexian/Panasonic/Sony
2208
2157
  ],
2209
- [u, [s, /_/g, " "], [l, _]],
2158
+ [u, [s, /_/g, " "], [a, w]],
2210
2159
  [
2211
2160
  // TCL
2212
2161
  /droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i
2213
2162
  ],
2214
- [s, [u, "TCL"], [l, m]],
2163
+ [s, [u, "TCL"], [a, _]],
2215
2164
  [
2216
2165
  // itel
2217
2166
  /(itel) ((\w+))/i
2218
2167
  ],
2219
- [[u, ve], s, [l, Ge, { tablet: ["p10001l", "w7001"], "*": "mobile" }]],
2168
+ [[u, N], s, [a, Ge, { tablet: ["p10001l", "w7001"], "*": "mobile" }]],
2220
2169
  [
2221
2170
  // Acer
2222
2171
  /droid.+; ([ab][1-7]-?[0178a]\d\d?)/i
2223
2172
  ],
2224
- [s, [u, "Acer"], [l, m]],
2173
+ [s, [u, "Acer"], [a, _]],
2225
2174
  [
2226
2175
  // Meizu
2227
2176
  /droid.+; (m[1-5] note) bui/i,
2228
2177
  /\bmz-([-\w]{2,})/i
2229
2178
  ],
2230
- [s, [u, "Meizu"], [l, _]],
2179
+ [s, [u, "Meizu"], [a, w]],
2231
2180
  [
2232
2181
  // Ulefone
2233
2182
  /; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i
2234
2183
  ],
2235
- [s, [u, "Ulefone"], [l, _]],
2184
+ [s, [u, "Ulefone"], [a, w]],
2236
2185
  [
2237
2186
  // Energizer
2238
2187
  /; (energy ?\w+)(?: bui|\))/i,
2239
2188
  /; energizer ([\w ]+)(?: bui|\))/i
2240
2189
  ],
2241
- [s, [u, "Energizer"], [l, _]],
2190
+ [s, [u, "Energizer"], [a, w]],
2242
2191
  [
2243
2192
  // Cat
2244
2193
  /; cat (b35);/i,
2245
2194
  /; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i
2246
2195
  ],
2247
- [s, [u, "Cat"], [l, _]],
2196
+ [s, [u, "Cat"], [a, w]],
2248
2197
  [
2249
2198
  // Smartfren
2250
2199
  /((?:new )?andromax[\w- ]+)(?: bui|\))/i
2251
2200
  ],
2252
- [s, [u, "Smartfren"], [l, _]],
2201
+ [s, [u, "Smartfren"], [a, w]],
2253
2202
  [
2254
2203
  // Nothing
2255
2204
  /droid.+; (a(?:015|06[35]|142p?))/i
2256
2205
  ],
2257
- [s, [u, "Nothing"], [l, _]],
2206
+ [s, [u, "Nothing"], [a, w]],
2258
2207
  [
2259
2208
  // Archos
2260
2209
  /; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,
2261
2210
  /archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i
2262
2211
  ],
2263
- [s, [u, "Archos"], [l, m]],
2212
+ [s, [u, "Archos"], [a, _]],
2264
2213
  [
2265
2214
  /archos ([\w ]+)( b|\))/i,
2266
2215
  /; (ac[3-6]\d\w{2,8})( b|\))/i
2267
2216
  ],
2268
- [s, [u, "Archos"], [l, _]],
2217
+ [s, [u, "Archos"], [a, w]],
2269
2218
  [
2270
2219
  // MIXED
2271
2220
  /(imo) (tab \w+)/i,
@@ -2273,7 +2222,7 @@ function $n() {
2273
2222
  /(infinix) (x1101b?)/i
2274
2223
  // Infinix XPad
2275
2224
  ],
2276
- [u, s, [l, m]],
2225
+ [u, s, [a, _]],
2277
2226
  [
2278
2227
  /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,
2279
2228
  // BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron/Infinix/Tecno/Micromax/Advan
@@ -2288,7 +2237,7 @@ function $n() {
2288
2237
  /(oppo) ?([\w ]+) bui/i
2289
2238
  // OPPO
2290
2239
  ],
2291
- [u, s, [l, _]],
2240
+ [u, s, [a, w]],
2292
2241
  [
2293
2242
  /(kobo)\s(ereader|touch)/i,
2294
2243
  // Kobo
@@ -2309,146 +2258,146 @@ function $n() {
2309
2258
  /(vodafone) ([\w ]+)(?:\)| bui)/i
2310
2259
  // Vodafone
2311
2260
  ],
2312
- [u, s, [l, m]],
2261
+ [u, s, [a, _]],
2313
2262
  [
2314
2263
  /(surface duo)/i
2315
2264
  // Surface Duo
2316
2265
  ],
2317
- [s, [u, Le], [l, m]],
2266
+ [s, [u, Ve], [a, _]],
2318
2267
  [
2319
2268
  /droid [\d\.]+; (fp\du?)(?: b|\))/i
2320
2269
  // Fairphone
2321
2270
  ],
2322
- [s, [u, "Fairphone"], [l, _]],
2271
+ [s, [u, "Fairphone"], [a, w]],
2323
2272
  [
2324
2273
  /(u304aa)/i
2325
2274
  // AT&T
2326
2275
  ],
2327
- [s, [u, "AT&T"], [l, _]],
2276
+ [s, [u, "AT&T"], [a, w]],
2328
2277
  [
2329
2278
  /\bsie-(\w*)/i
2330
2279
  // Siemens
2331
2280
  ],
2332
- [s, [u, "Siemens"], [l, _]],
2281
+ [s, [u, "Siemens"], [a, w]],
2333
2282
  [
2334
2283
  /\b(rct\w+) b/i
2335
2284
  // RCA Tablets
2336
2285
  ],
2337
- [s, [u, "RCA"], [l, m]],
2286
+ [s, [u, "RCA"], [a, _]],
2338
2287
  [
2339
2288
  /\b(venue[\d ]{2,7}) b/i
2340
2289
  // Dell Venue Tablets
2341
2290
  ],
2342
- [s, [u, "Dell"], [l, m]],
2291
+ [s, [u, "Dell"], [a, _]],
2343
2292
  [
2344
2293
  /\b(q(?:mv|ta)\w+) b/i
2345
2294
  // Verizon Tablet
2346
2295
  ],
2347
- [s, [u, "Verizon"], [l, m]],
2296
+ [s, [u, "Verizon"], [a, _]],
2348
2297
  [
2349
2298
  /\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i
2350
2299
  // Barnes & Noble Tablet
2351
2300
  ],
2352
- [s, [u, "Barnes & Noble"], [l, m]],
2301
+ [s, [u, "Barnes & Noble"], [a, _]],
2353
2302
  [
2354
2303
  /\b(tm\d{3}\w+) b/i
2355
2304
  ],
2356
- [s, [u, "NuVision"], [l, m]],
2305
+ [s, [u, "NuVision"], [a, _]],
2357
2306
  [
2358
2307
  /\b(k88) b/i
2359
2308
  // ZTE K Series Tablet
2360
2309
  ],
2361
- [s, [u, "ZTE"], [l, m]],
2310
+ [s, [u, "ZTE"], [a, _]],
2362
2311
  [
2363
2312
  /\b(nx\d{3}j) b/i
2364
2313
  // ZTE Nubia
2365
2314
  ],
2366
- [s, [u, "ZTE"], [l, _]],
2315
+ [s, [u, "ZTE"], [a, w]],
2367
2316
  [
2368
2317
  /\b(gen\d{3}) b.+49h/i
2369
2318
  // Swiss GEN Mobile
2370
2319
  ],
2371
- [s, [u, "Swiss"], [l, _]],
2320
+ [s, [u, "Swiss"], [a, w]],
2372
2321
  [
2373
2322
  /\b(zur\d{3}) b/i
2374
2323
  // Swiss ZUR Tablet
2375
2324
  ],
2376
- [s, [u, "Swiss"], [l, m]],
2325
+ [s, [u, "Swiss"], [a, _]],
2377
2326
  [
2378
2327
  /\b((zeki)?tb.*\b) b/i
2379
2328
  // Zeki Tablets
2380
2329
  ],
2381
- [s, [u, "Zeki"], [l, m]],
2330
+ [s, [u, "Zeki"], [a, _]],
2382
2331
  [
2383
2332
  /\b([yr]\d{2}) b/i,
2384
2333
  /\b(dragon[- ]+touch |dt)(\w{5}) b/i
2385
2334
  // Dragon Touch Tablet
2386
2335
  ],
2387
- [[u, "Dragon Touch"], s, [l, m]],
2336
+ [[u, "Dragon Touch"], s, [a, _]],
2388
2337
  [
2389
2338
  /\b(ns-?\w{0,9}) b/i
2390
2339
  // Insignia Tablets
2391
2340
  ],
2392
- [s, [u, "Insignia"], [l, m]],
2341
+ [s, [u, "Insignia"], [a, _]],
2393
2342
  [
2394
2343
  /\b((nxa|next)-?\w{0,9}) b/i
2395
2344
  // NextBook Tablets
2396
2345
  ],
2397
- [s, [u, "NextBook"], [l, m]],
2346
+ [s, [u, "NextBook"], [a, _]],
2398
2347
  [
2399
2348
  /\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i
2400
2349
  // Voice Xtreme Phones
2401
2350
  ],
2402
- [[u, "Voice"], s, [l, _]],
2351
+ [[u, "Voice"], s, [a, w]],
2403
2352
  [
2404
2353
  /\b(lvtel\-)?(v1[12]) b/i
2405
2354
  // LvTel Phones
2406
2355
  ],
2407
- [[u, "LvTel"], s, [l, _]],
2356
+ [[u, "LvTel"], s, [a, w]],
2408
2357
  [
2409
2358
  /\b(ph-1) /i
2410
2359
  // Essential PH-1
2411
2360
  ],
2412
- [s, [u, "Essential"], [l, _]],
2361
+ [s, [u, "Essential"], [a, w]],
2413
2362
  [
2414
2363
  /\b(v(100md|700na|7011|917g).*\b) b/i
2415
2364
  // Envizen Tablets
2416
2365
  ],
2417
- [s, [u, "Envizen"], [l, m]],
2366
+ [s, [u, "Envizen"], [a, _]],
2418
2367
  [
2419
2368
  /\b(trio[-\w\. ]+) b/i
2420
2369
  // MachSpeed Tablets
2421
2370
  ],
2422
- [s, [u, "MachSpeed"], [l, m]],
2371
+ [s, [u, "MachSpeed"], [a, _]],
2423
2372
  [
2424
2373
  /\btu_(1491) b/i
2425
2374
  // Rotor Tablets
2426
2375
  ],
2427
- [s, [u, "Rotor"], [l, m]],
2376
+ [s, [u, "Rotor"], [a, _]],
2428
2377
  [
2429
2378
  /((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i
2430
2379
  // Nvidia Tablets
2431
2380
  ],
2432
- [s, [u, qe], [l, m]],
2381
+ [s, [u, Le], [a, _]],
2433
2382
  [
2434
2383
  /(sprint) (\w+)/i
2435
2384
  // Sprint Phones
2436
2385
  ],
2437
- [u, s, [l, _]],
2386
+ [u, s, [a, w]],
2438
2387
  [
2439
2388
  /(kin\.[onetw]{3})/i
2440
2389
  // Microsoft Kin
2441
2390
  ],
2442
- [[s, /\./g, " "], [u, Le], [l, _]],
2391
+ [[s, /\./g, " "], [u, Ve], [a, w]],
2443
2392
  [
2444
2393
  /droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i
2445
2394
  // Zebra
2446
2395
  ],
2447
- [s, [u, I], [l, m]],
2396
+ [s, [u, Fe], [a, _]],
2448
2397
  [
2449
2398
  /droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i
2450
2399
  ],
2451
- [s, [u, I], [l, _]],
2400
+ [s, [u, Fe], [a, w]],
2452
2401
  [
2453
2402
  ///////////////////
2454
2403
  // SMARTTVS
@@ -2456,73 +2405,73 @@ function $n() {
2456
2405
  /smart-tv.+(samsung)/i
2457
2406
  // Samsung
2458
2407
  ],
2459
- [u, [l, A]],
2408
+ [u, [a, O]],
2460
2409
  [
2461
2410
  /hbbtv.+maple;(\d+)/i
2462
2411
  ],
2463
- [[s, /^/, "SmartTV"], [u, J], [l, A]],
2412
+ [[s, /^/, "SmartTV"], [u, pe], [a, O]],
2464
2413
  [
2465
2414
  /(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
2466
2415
  // LG SmartTV
2467
2416
  ],
2468
- [[u, Oe], [l, A]],
2417
+ [[u, Oe], [a, O]],
2469
2418
  [
2470
2419
  /(apple) ?tv/i
2471
2420
  // Apple TV
2472
2421
  ],
2473
- [u, [s, de + " TV"], [l, A]],
2422
+ [u, [s, he + " TV"], [a, O]],
2474
2423
  [
2475
2424
  /crkey/i
2476
2425
  // Google Chromecast
2477
2426
  ],
2478
- [[s, $e + "cast"], [u, Ae], [l, A]],
2427
+ [[s, Re + "cast"], [u, Ae], [a, O]],
2479
2428
  [
2480
2429
  /droid.+aft(\w+)( bui|\))/i
2481
2430
  // Fire TV
2482
2431
  ],
2483
- [s, [u, Te], [l, A]],
2432
+ [s, [u, Ee], [a, O]],
2484
2433
  [
2485
2434
  /(shield \w+ tv)/i
2486
2435
  // Nvidia Shield TV
2487
2436
  ],
2488
- [s, [u, qe], [l, A]],
2437
+ [s, [u, Le], [a, O]],
2489
2438
  [
2490
2439
  /\(dtv[\);].+(aquos)/i,
2491
2440
  /(aquos-tv[\w ]+)\)/i
2492
2441
  // Sharp
2493
2442
  ],
2494
- [s, [u, be], [l, A]],
2443
+ [s, [u, He], [a, O]],
2495
2444
  [
2496
2445
  /(bravia[\w ]+)( bui|\))/i
2497
2446
  // Sony
2498
2447
  ],
2499
- [s, [u, pe], [l, A]],
2448
+ [s, [u, te], [a, O]],
2500
2449
  [
2501
2450
  /(mi(tv|box)-?\w+) bui/i
2502
2451
  // Xiaomi
2503
2452
  ],
2504
- [s, [u, ke], [l, A]],
2453
+ [s, [u, le], [a, O]],
2505
2454
  [
2506
2455
  /Hbbtv.*(technisat) (.*);/i
2507
2456
  // TechniSAT
2508
2457
  ],
2509
- [u, s, [l, A]],
2458
+ [u, s, [a, O]],
2510
2459
  [
2511
2460
  /\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
2512
2461
  // Roku
2513
2462
  /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i
2514
2463
  // HbbTV devices
2515
2464
  ],
2516
- [[u, Lt], [s, Lt], [l, A]],
2465
+ [[u, Ne], [s, Ne], [a, O]],
2517
2466
  [
2518
2467
  // SmartTV from Unidentified Vendors
2519
2468
  /droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i
2520
2469
  ],
2521
- [s, [l, A]],
2470
+ [s, [a, O]],
2522
2471
  [
2523
2472
  /\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i
2524
2473
  ],
2525
- [[l, A]],
2474
+ [[a, O]],
2526
2475
  [
2527
2476
  ///////////////////
2528
2477
  // CONSOLES
@@ -2532,22 +2481,22 @@ function $n() {
2532
2481
  /(nintendo) ([wids3utch]+)/i
2533
2482
  // Nintendo
2534
2483
  ],
2535
- [u, s, [l, M]],
2484
+ [u, s, [a, A]],
2536
2485
  [
2537
2486
  /droid.+; (shield)( bui|\))/i
2538
2487
  // Nvidia Portable
2539
2488
  ],
2540
- [s, [u, qe], [l, M]],
2489
+ [s, [u, Le], [a, A]],
2541
2490
  [
2542
2491
  /(playstation \w+)/i
2543
2492
  // Playstation
2544
2493
  ],
2545
- [s, [u, pe], [l, M]],
2494
+ [s, [u, te], [a, A]],
2546
2495
  [
2547
2496
  /\b(xbox(?: one)?(?!; xbox))[\); ]/i
2548
2497
  // Microsoft Xbox
2549
2498
  ],
2550
- [s, [u, Le], [l, M]],
2499
+ [s, [u, Ve], [a, A]],
2551
2500
  [
2552
2501
  ///////////////////
2553
2502
  // WEARABLES
@@ -2555,48 +2504,48 @@ function $n() {
2555
2504
  /\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i
2556
2505
  // Samsung Galaxy Watch
2557
2506
  ],
2558
- [s, [u, J], [l, O]],
2507
+ [s, [u, pe], [a, F]],
2559
2508
  [
2560
2509
  /((pebble))app/i,
2561
2510
  // Pebble
2562
2511
  /(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i
2563
2512
  // Asus ZenWatch / LG Watch / Pixel Watch
2564
2513
  ],
2565
- [u, s, [l, O]],
2514
+ [u, s, [a, F]],
2566
2515
  [
2567
2516
  /(ow(?:19|20)?we?[1-3]{1,3})/i
2568
2517
  // Oppo Watch
2569
2518
  ],
2570
- [s, [u, Me], [l, O]],
2519
+ [s, [u, be], [a, F]],
2571
2520
  [
2572
2521
  /(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i
2573
2522
  // Apple Watch
2574
2523
  ],
2575
- [s, [u, de], [l, O]],
2524
+ [s, [u, he], [a, F]],
2576
2525
  [
2577
2526
  /(opwwe\d{3})/i
2578
2527
  // OnePlus Watch
2579
2528
  ],
2580
- [s, [u, He], [l, O]],
2529
+ [s, [u, st], [a, F]],
2581
2530
  [
2582
2531
  /(moto 360)/i
2583
2532
  // Motorola 360
2584
2533
  ],
2585
- [s, [u, Ve], [l, O]],
2534
+ [s, [u, qe], [a, F]],
2586
2535
  [
2587
2536
  /(smartwatch 3)/i
2588
2537
  // Sony SmartWatch
2589
2538
  ],
2590
- [s, [u, pe], [l, O]],
2539
+ [s, [u, te], [a, F]],
2591
2540
  [
2592
2541
  /(g watch r)/i
2593
2542
  // LG G Watch R
2594
2543
  ],
2595
- [s, [u, Oe], [l, O]],
2544
+ [s, [u, Oe], [a, F]],
2596
2545
  [
2597
2546
  /droid.+; (wt63?0{2,3})\)/i
2598
2547
  ],
2599
- [s, [u, I], [l, O]],
2548
+ [s, [u, Fe], [a, F]],
2600
2549
  [
2601
2550
  ///////////////////
2602
2551
  // XR
@@ -2604,17 +2553,17 @@ function $n() {
2604
2553
  /droid.+; (glass) \d/i
2605
2554
  // Google Glass
2606
2555
  ],
2607
- [s, [u, Ae], [l, O]],
2556
+ [s, [u, Ae], [a, F]],
2608
2557
  [
2609
2558
  /(pico) (4|neo3(?: link|pro)?)/i
2610
2559
  // Pico
2611
2560
  ],
2612
- [u, s, [l, O]],
2561
+ [u, s, [a, F]],
2613
2562
  [
2614
2563
  /; (quest( \d| pro)?)/i
2615
2564
  // Oculus Quest
2616
2565
  ],
2617
- [s, [u, v], [l, O]],
2566
+ [s, [u, Me], [a, F]],
2618
2567
  [
2619
2568
  ///////////////////
2620
2569
  // EMBEDDED
@@ -2622,21 +2571,21 @@ function $n() {
2622
2571
  /(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i
2623
2572
  // Tesla
2624
2573
  ],
2625
- [u, [l, ce]],
2574
+ [u, [a, Q]],
2626
2575
  [
2627
2576
  /(aeobc)\b/i
2628
2577
  // Echo Dot
2629
2578
  ],
2630
- [s, [u, Te], [l, ce]],
2579
+ [s, [u, Ee], [a, Q]],
2631
2580
  [
2632
2581
  /(homepod).+mac os/i
2633
2582
  // Apple HomePod
2634
2583
  ],
2635
- [s, [u, de], [l, ce]],
2584
+ [s, [u, he], [a, Q]],
2636
2585
  [
2637
2586
  /windows iot/i
2638
2587
  ],
2639
- [[l, ce]],
2588
+ [[a, Q]],
2640
2589
  [
2641
2590
  ////////////////////
2642
2591
  // MIXED (GENERIC)
@@ -2644,22 +2593,22 @@ function $n() {
2644
2593
  /droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i
2645
2594
  // Android Phones from Unidentified Vendors
2646
2595
  ],
2647
- [s, [l, _]],
2596
+ [s, [a, w]],
2648
2597
  [
2649
2598
  /droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i
2650
2599
  // Android Tablets from Unidentified Vendors
2651
2600
  ],
2652
- [s, [l, m]],
2601
+ [s, [a, _]],
2653
2602
  [
2654
2603
  /\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i
2655
2604
  // Unidentifiable Tablet
2656
2605
  ],
2657
- [[l, m]],
2606
+ [[a, _]],
2658
2607
  [
2659
2608
  /(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i
2660
2609
  // Unidentifiable Mobile
2661
2610
  ],
2662
- [[l, _]],
2611
+ [[a, w]],
2663
2612
  [
2664
2613
  /droid .+?; ([\w\. -]+)( bui|\))/i
2665
2614
  // Generic Android Device
@@ -2671,17 +2620,17 @@ function $n() {
2671
2620
  /windows.+ edge\/([\w\.]+)/i
2672
2621
  // EdgeHTML
2673
2622
  ],
2674
- [b, [a, At + "HTML"]],
2623
+ [f, [l, At + "HTML"]],
2675
2624
  [
2676
2625
  /(arkweb)\/([\w\.]+)/i
2677
2626
  // ArkWeb
2678
2627
  ],
2679
- [a, b],
2628
+ [l, f],
2680
2629
  [
2681
2630
  /webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i
2682
2631
  // Blink
2683
2632
  ],
2684
- [b, [a, "Blink"]],
2633
+ [f, [l, "Blink"]],
2685
2634
  [
2686
2635
  /(presto)\/([\w\.]+)/i,
2687
2636
  // Presto
@@ -2696,16 +2645,16 @@ function $n() {
2696
2645
  /\b(libweb)/i
2697
2646
  // LibWeb
2698
2647
  ],
2699
- [a, b],
2648
+ [l, f],
2700
2649
  [
2701
2650
  /ladybird\//i
2702
2651
  ],
2703
- [[a, "LibWeb"]],
2652
+ [[l, "LibWeb"]],
2704
2653
  [
2705
2654
  /rv\:([\w\.]{1,9})\b.+(gecko)/i
2706
2655
  // Gecko
2707
2656
  ],
2708
- [b, a]
2657
+ [f, l]
2709
2658
  ],
2710
2659
  os: [
2711
2660
  [
@@ -2713,19 +2662,19 @@ function $n() {
2713
2662
  /microsoft (windows) (vista|xp)/i
2714
2663
  // Windows (iTunes)
2715
2664
  ],
2716
- [a, b],
2665
+ [l, f],
2717
2666
  [
2718
2667
  /(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i
2719
2668
  // Windows Phone
2720
2669
  ],
2721
- [a, [b, Ge, ii]],
2670
+ [l, [f, Ge, Qt]],
2722
2671
  [
2723
2672
  /windows nt 6\.2; (arm)/i,
2724
2673
  // Windows RT
2725
2674
  /windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,
2726
2675
  /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
2727
2676
  ],
2728
- [[b, Ge, ii], [a, "Windows"]],
2677
+ [[f, Ge, Qt], [l, "Windows"]],
2729
2678
  [
2730
2679
  // iOS/macOS
2731
2680
  /[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,
@@ -2733,66 +2682,66 @@ function $n() {
2733
2682
  /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,
2734
2683
  /cfnetwork\/.+darwin/i
2735
2684
  ],
2736
- [[b, /_/g, "."], [a, "iOS"]],
2685
+ [[f, /_/g, "."], [l, "iOS"]],
2737
2686
  [
2738
2687
  /(mac os x) ?([\w\. ]*)/i,
2739
2688
  /(macintosh|mac_powerpc\b)(?!.+haiku)/i
2740
2689
  // Mac OS
2741
2690
  ],
2742
- [[a, F], [b, /_/g, "."]],
2691
+ [[l, v], [f, /_/g, "."]],
2743
2692
  [
2744
2693
  // Mobile OSes
2745
2694
  /droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i
2746
2695
  // Android-x86/HarmonyOS
2747
2696
  ],
2748
- [b, a],
2697
+ [f, l],
2749
2698
  [
2750
2699
  /(ubuntu) ([\w\.]+) like android/i
2751
2700
  // Ubuntu Touch
2752
2701
  ],
2753
- [[a, /(.+)/, "$1 Touch"], b],
2702
+ [[l, /(.+)/, "$1 Touch"], f],
2754
2703
  [
2755
2704
  // Android/Blackberry/WebOS/QNX/Bada/RIM/KaiOS/Maemo/MeeGo/S40/Sailfish OS/OpenHarmony/Tizen
2756
2705
  /(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i
2757
2706
  ],
2758
- [a, b],
2707
+ [l, f],
2759
2708
  [
2760
2709
  /\(bb(10);/i
2761
2710
  // BlackBerry 10
2762
2711
  ],
2763
- [b, [a, rt]],
2712
+ [f, [l, rt]],
2764
2713
  [
2765
2714
  /(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i
2766
2715
  // Symbian
2767
2716
  ],
2768
- [b, [a, "Symbian"]],
2717
+ [f, [l, "Symbian"]],
2769
2718
  [
2770
2719
  /mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i
2771
2720
  // Firefox OS
2772
2721
  ],
2773
- [b, [a, Ee + " OS"]],
2722
+ [f, [l, $e + " OS"]],
2774
2723
  [
2775
2724
  /web0s;.+rt(tv)/i,
2776
2725
  /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i
2777
2726
  // WebOS
2778
2727
  ],
2779
- [b, [a, "webOS"]],
2728
+ [f, [l, "webOS"]],
2780
2729
  [
2781
2730
  /watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i
2782
2731
  // watchOS
2783
2732
  ],
2784
- [b, [a, "watchOS"]],
2733
+ [f, [l, "watchOS"]],
2785
2734
  [
2786
2735
  // Google Chromecast
2787
2736
  /crkey\/([\d\.]+)/i
2788
2737
  // Google Chromecast
2789
2738
  ],
2790
- [b, [a, $e + "cast"]],
2739
+ [f, [l, Re + "cast"]],
2791
2740
  [
2792
2741
  /(cros) [\w]+(?:\)| ([\w\.]+)\b)/i
2793
2742
  // Chromium OS
2794
2743
  ],
2795
- [[a, T], b],
2744
+ [[l, j], f],
2796
2745
  [
2797
2746
  // Smart TVs
2798
2747
  /panasonic;(viera)/i,
@@ -2824,12 +2773,12 @@ function $n() {
2824
2773
  /(haiku) (\w+)/i
2825
2774
  // Haiku
2826
2775
  ],
2827
- [a, b],
2776
+ [l, f],
2828
2777
  [
2829
2778
  /(sunos) ?([\w\.\d]*)/i
2830
2779
  // Solaris
2831
2780
  ],
2832
- [[a, "Solaris"], b],
2781
+ [[l, "Solaris"], f],
2833
2782
  [
2834
2783
  /((?:open)?solaris)[-\/ ]?([\w\.]*)/i,
2835
2784
  // Solaris
@@ -2840,27 +2789,27 @@ function $n() {
2840
2789
  /(unix) ?([\w\.]*)/i
2841
2790
  // UNIX
2842
2791
  ],
2843
- [a, b]
2792
+ [l, f]
2844
2793
  ]
2845
2794
  }, Y = function(y, C) {
2846
- if (typeof y === d && (C = y, y = r), !(this instanceof Y))
2795
+ if (typeof y === p && (C = y, y = r), !(this instanceof Y))
2847
2796
  return new Y(y, C).getResult();
2848
- var x = typeof i !== h && i.navigator ? i.navigator : r, S = y || (x && x.userAgent ? x.userAgent : o), oe = x && x.userAgentData ? x.userAgentData : r, ee = C ? K(ri, C) : ri, E = x && x.userAgent == S;
2797
+ var x = typeof i !== c && i.navigator ? i.navigator : r, S = y || (x && x.userAgent ? x.userAgent : o), ue = x && x.userAgentData ? x.userAgentData : r, ie = C ? M(ei, C) : ei, E = x && x.userAgent == S;
2849
2798
  return this.getBrowser = function() {
2850
2799
  var g = {};
2851
- return g[a] = r, g[b] = r, je.call(g, S, ee.browser), g[w] = ur(g[b]), E && x && x.brave && typeof x.brave.isBrave == f && (g[a] = "Brave"), g;
2800
+ return g[l] = r, g[f] = r, je.call(g, S, ie.browser), g[m] = ve(g[f]), E && x && x.brave && typeof x.brave.isBrave == b && (g[l] = "Brave"), g;
2852
2801
  }, this.getCPU = function() {
2853
2802
  var g = {};
2854
- return g[$] = r, je.call(g, S, ee.cpu), g;
2803
+ return g[$] = r, je.call(g, S, ie.cpu), g;
2855
2804
  }, this.getDevice = function() {
2856
2805
  var g = {};
2857
- return g[u] = r, g[s] = r, g[l] = r, je.call(g, S, ee.device), E && !g[l] && oe && oe.mobile && (g[l] = _), E && g[s] == "Macintosh" && x && typeof x.standalone !== h && x.maxTouchPoints && x.maxTouchPoints > 2 && (g[s] = "iPad", g[l] = m), g;
2806
+ return g[u] = r, g[s] = r, g[a] = r, je.call(g, S, ie.device), E && !g[a] && ue && ue.mobile && (g[a] = w), E && g[s] == "Macintosh" && x && typeof x.standalone !== c && x.maxTouchPoints && x.maxTouchPoints > 2 && (g[s] = "iPad", g[a] = _), g;
2858
2807
  }, this.getEngine = function() {
2859
2808
  var g = {};
2860
- return g[a] = r, g[b] = r, je.call(g, S, ee.engine), g;
2809
+ return g[l] = r, g[f] = r, je.call(g, S, ie.engine), g;
2861
2810
  }, this.getOS = function() {
2862
2811
  var g = {};
2863
- return g[a] = r, g[b] = r, je.call(g, S, ee.os), E && !g[a] && oe && oe.platform && oe.platform != "Unknown" && (g[a] = oe.platform.replace(/chrome os/i, T).replace(/macos/i, F)), g;
2812
+ return g[l] = r, g[f] = r, je.call(g, S, ie.os), E && !g[l] && ue && ue.platform && ue.platform != "Unknown" && (g[l] = ue.platform.replace(/chrome os/i, j).replace(/macos/i, v)), g;
2864
2813
  }, this.getResult = function() {
2865
2814
  return {
2866
2815
  ua: this.getUA(),
@@ -2873,27 +2822,27 @@ function $n() {
2873
2822
  }, this.getUA = function() {
2874
2823
  return S;
2875
2824
  }, this.setUA = function(g) {
2876
- return S = typeof g === p && g.length > We ? Lt(g, We) : g, this;
2825
+ return S = typeof g === h && g.length > ae ? Ne(g, ae) : g, this;
2877
2826
  }, this.setUA(S), this;
2878
2827
  };
2879
- Y.VERSION = n, Y.BROWSER = B([a, b, w]), Y.CPU = B([$]), Y.DEVICE = B([s, u, l, M, _, A, m, O, ce]), Y.ENGINE = Y.OS = B([a, b]), t.exports && (e = t.exports = Y), e.UAParser = Y;
2880
- var Fe = typeof i !== h && (i.jQuery || i.Zepto);
2881
- if (Fe && !Fe.ua) {
2828
+ Y.VERSION = n, Y.BROWSER = R([l, f, m]), Y.CPU = R([$]), Y.DEVICE = R([s, u, a, A, w, O, _, F, Q]), Y.ENGINE = Y.OS = R([l, f]), t.exports && (e = t.exports = Y), e.UAParser = Y;
2829
+ var Pe = typeof i !== c && (i.jQuery || i.Zepto);
2830
+ if (Pe && !Pe.ua) {
2882
2831
  var ot = new Y();
2883
- Fe.ua = ot.getResult(), Fe.ua.get = function() {
2832
+ Pe.ua = ot.getResult(), Pe.ua.get = function() {
2884
2833
  return ot.getUA();
2885
- }, Fe.ua.set = function(y) {
2834
+ }, Pe.ua.set = function(y) {
2886
2835
  ot.setUA(y);
2887
2836
  var C = ot.getResult();
2888
2837
  for (var x in C)
2889
- Fe.ua[x] = C[x];
2838
+ Pe.ua[x] = C[x];
2890
2839
  };
2891
2840
  }
2892
- })(typeof window == "object" ? window : Rn);
2841
+ })(typeof window == "object" ? window : yn);
2893
2842
  })(Ze, Ze.exports)), Ze.exports;
2894
2843
  }
2895
- var An = $n();
2896
- const On = /* @__PURE__ */ Tn(An), Ln = new On(), sr = Ln.getResult(), Mn = (_a = sr.engine.name) == null ? void 0 : _a.toLowerCase(), vi = Number((_b = sr.engine.version) == null ? void 0 : _b.split(".")[0]), Bt = {
2844
+ var En = Cn();
2845
+ const kn = /* @__PURE__ */ xn(En), Sn = new kn(), Qi = Sn.getResult(), Dn = (_a = Qi.engine.name) == null ? void 0 : _a.toLowerCase(), hi = Number((_b = Qi.engine.version) == null ? void 0 : _b.split(".")[0]), Ut = {
2897
2846
  "0x0001": "Escape",
2898
2847
  "0x0002": "Digit1",
2899
2848
  "0x0003": "Digit2",
@@ -3035,7 +2984,7 @@ const On = /* @__PURE__ */ Tn(An), Ln = new On(), sr = Ln.getResult(), Mn = (_a
3035
2984
  "0xE06B": "LaunchApp1",
3036
2985
  "0xE06C": "LaunchMail",
3037
2986
  "0xE06D": "MediaSelect"
3038
- }, wi = {
2987
+ }, bi = {
3039
2988
  "0x0077": "Lang4",
3040
2989
  "0x0078": "Lang3",
3041
2990
  "0xE008": "Undo",
@@ -3051,31 +3000,31 @@ const On = /* @__PURE__ */ Tn(An), Ln = new On(), sr = Ln.getResult(), Mn = (_a
3051
3000
  "0xE05C": "MetaRight",
3052
3001
  "0xE05F": "Sleep",
3053
3002
  "0xE063": "WakeUp"
3054
- }, Fn = {
3003
+ }, Tn = {
3055
3004
  "0x0054": "PrintScreen",
3056
3005
  "0xE020": "VolumeMute",
3057
3006
  // The documentation says it's 'AudioVolumeMute', but the actual test shows that it's 'VolumeMute'.
3058
3007
  "0xE02E": "VolumeDown",
3059
3008
  "0xE030": "VolumeUp",
3060
- "0xE05B": vi > 117 ? "MetaLeft" : "OSLeft",
3061
- "0xE05C": vi > 117 ? "MetaRight" : "OSRight"
3062
- }, Nn = {
3063
- blink: zt({ ...Bt, ...wi }),
3064
- gecko: zt({ ...Bt, ...Fn }),
3065
- webkit: zt({ ...Bt, ...wi })
3009
+ "0xE05B": hi > 117 ? "MetaLeft" : "OSLeft",
3010
+ "0xE05C": hi > 117 ? "MetaRight" : "OSRight"
3011
+ }, Rn = {
3012
+ blink: Bt({ ...Ut, ...bi }),
3013
+ gecko: Bt({ ...Ut, ...Tn }),
3014
+ webkit: Bt({ ...Ut, ...bi })
3066
3015
  };
3067
- function zt(t) {
3016
+ function Bt(t) {
3068
3017
  const e = {};
3069
3018
  for (const [i, r] of Object.entries(t))
3070
3019
  e[r] = i;
3071
3020
  return e;
3072
3021
  }
3073
- const mi = function(t) {
3074
- const e = Nn[Mn];
3022
+ const pi = function(t) {
3023
+ const e = Rn[Dn];
3075
3024
  return parseInt(e[t], 16);
3076
3025
  };
3077
- var Ht = /* @__PURE__ */ ((t) => (t.CTRL_LEFT = "ControlLeft", t.SHIFT_LEFT = "ShiftLeft", t.SHIFT_RIGHT = "ShiftRight", t.ALT_LEFT = "AltLeft", t.CTRL_RIGHT = "ControlRight", t.ALT_RIGHT = "AltRight", t.ControlLeft = "ControlLeft", t.ShiftLeft = "ShiftLeft", t.ShiftRight = "ShiftRight", t.AltLeft = "AltLeft", t.ControlRight = "ControlRight", t.AltRight = "AltRight", t))(Ht || {}), Be = /* @__PURE__ */ ((t) => (t.CAPS_LOCK = "CapsLock", t.NUM_LOCK = "NumLock", t.SCROLL_LOCK = "ScrollLock", t.KANA_MODE = "KanaMode", t.CapsLock = "CapsLock", t.ScrollLock = "ScrollLock", t.NumLock = "NumLock", t.KanaMode = "KanaMode", t))(Be || {}), le = /* @__PURE__ */ ((t) => (t[t.CTRL_ALT_DEL = 0] = "CTRL_ALT_DEL", t[t.META = 1] = "META", t[t.CTRL_C = 2] = "CTRL_C", t[t.CTRL_V = 3] = "CTRL_V", t))(le || {}), we = /* @__PURE__ */ ((t) => (t[t.Fit = 1] = "Fit", t[t.Full = 2] = "Full", t[t.Real = 3] = "Real", t))(we || {}), Qe = /* @__PURE__ */ ((t) => (t[t.Pixel = 0] = "Pixel", t[t.Line = 1] = "Line", t[t.Page = 2] = "Page", t))(Qe || {});
3078
- class Pn {
3026
+ var qt = /* @__PURE__ */ ((t) => (t.CTRL_LEFT = "ControlLeft", t.SHIFT_LEFT = "ShiftLeft", t.SHIFT_RIGHT = "ShiftRight", t.ALT_LEFT = "AltLeft", t.CTRL_RIGHT = "ControlRight", t.ALT_RIGHT = "AltRight", t.ControlLeft = "ControlLeft", t.ShiftLeft = "ShiftLeft", t.ShiftRight = "ShiftRight", t.AltLeft = "AltLeft", t.ControlRight = "ControlRight", t.AltRight = "AltRight", t))(qt || {}), Be = /* @__PURE__ */ ((t) => (t.CAPS_LOCK = "CapsLock", t.NUM_LOCK = "NumLock", t.SCROLL_LOCK = "ScrollLock", t.KANA_MODE = "KanaMode", t.CapsLock = "CapsLock", t.ScrollLock = "ScrollLock", t.NumLock = "NumLock", t.KanaMode = "KanaMode", t))(Be || {}), ce = /* @__PURE__ */ ((t) => (t[t.CTRL_ALT_DEL = 0] = "CTRL_ALT_DEL", t[t.META = 1] = "META", t[t.CTRL_C = 2] = "CTRL_C", t[t.CTRL_V = 3] = "CTRL_V", t))(ce || {}), me = /* @__PURE__ */ ((t) => (t[t.Fit = 1] = "Fit", t[t.Full = 2] = "Full", t[t.Real = 3] = "Real", t))(me || {}), Je = /* @__PURE__ */ ((t) => (t[t.Pixel = 0] = "Pixel", t[t.Line = 1] = "Line", t[t.Page = 2] = "Page", t))(Je || {});
3027
+ class $n {
3079
3028
  constructor(e, i, r) {
3080
3029
  __publicField(this, "username");
3081
3030
  __publicField(this, "password");
@@ -3088,7 +3037,7 @@ class Pn {
3088
3037
  this.username = e.username, this.password = e.password, this.proxyAddress = i.address, this.authToken = i.authToken, this.destination = r.destination, this.serverDomain = r.serverDomain, this.extensions = r.extensions, this.desktopSize = r.desktopSize;
3089
3038
  }
3090
3039
  }
3091
- class Un {
3040
+ class An {
3092
3041
  /**
3093
3042
  * Creates a new ConfigBuilder instance.
3094
3043
  */
@@ -3193,10 +3142,10 @@ class Un {
3193
3142
  extensions: this.extensions,
3194
3143
  desktopSize: this.desktopSize
3195
3144
  };
3196
- return new Pn(e, i, r);
3145
+ return new $n(e, i, r);
3197
3146
  }
3198
3147
  }
3199
- class Ue {
3148
+ class Se {
3200
3149
  constructor() {
3201
3150
  __publicField(this, "subscribers");
3202
3151
  this.subscribers = [];
@@ -3209,7 +3158,7 @@ class Ue {
3209
3158
  i(e);
3210
3159
  }
3211
3160
  }
3212
- class Bn {
3161
+ class On {
3213
3162
  constructor(e) {
3214
3163
  __publicField(this, "module");
3215
3164
  __publicField(this, "canvas");
@@ -3225,14 +3174,16 @@ class Bn {
3225
3174
  __publicField(this, "lastCursorStyle", "default");
3226
3175
  __publicField(this, "enableClipboard", true);
3227
3176
  __publicField(this, "_autoClipboard", true);
3228
- __publicField(this, "sessionStartedObservable", new Ue());
3229
- __publicField(this, "resizeObservable", new Ue());
3177
+ __publicField(this, "sessionStartedObservable", new Se());
3178
+ /// Published when the session ends: shut down, or its run() returned.
3179
+ __publicField(this, "sessionEndedObservable", new Se());
3180
+ __publicField(this, "resizeObservable", new Se());
3230
3181
  __publicField(this, "session");
3231
3182
  __publicField(this, "modifierKeyPressed", []);
3232
- __publicField(this, "mousePositionObservable", new Ue());
3233
- __publicField(this, "changeVisibilityObservable", new Ue());
3234
- __publicField(this, "scaleObservable", new Ue());
3235
- __publicField(this, "dynamicResizeObservable", new Ue());
3183
+ __publicField(this, "mousePositionObservable", new Se());
3184
+ __publicField(this, "changeVisibilityObservable", new Se());
3185
+ __publicField(this, "scaleObservable", new Se());
3186
+ __publicField(this, "dynamicResizeObservable", new Se());
3236
3187
  this.module = e, L.info("Web bridge initialized.");
3237
3188
  }
3238
3189
  get autoClipboard() {
@@ -3304,8 +3255,9 @@ class Bn {
3304
3255
  this.sendKeyboard(e);
3305
3256
  }
3306
3257
  shutdown() {
3307
- var _a2, _b2;
3308
- (_a2 = this.fileTransferProvider) == null ? void 0 : _a2.dispose(), (_b2 = this.session) == null ? void 0 : _b2.shutdown();
3258
+ var _a2;
3259
+ const e = this.session;
3260
+ this.session = void 0, this.sessionEndedObservable.publish(null), (_a2 = this.fileTransferProvider) == null ? void 0 : _a2.dispose(), e == null ? void 0 : e.shutdown();
3309
3261
  }
3310
3262
  mouseButtonState(e, i, r) {
3311
3263
  r && e.preventDefault();
@@ -3316,7 +3268,7 @@ class Bn {
3316
3268
  this.doTransactionFromDeviceEvents([this.module.DeviceEvent.mouseMove(e.x, e.y)]), this.mousePositionObservable.publish(e);
3317
3269
  }
3318
3270
  configBuilder() {
3319
- return new Un();
3271
+ return new An();
3320
3272
  }
3321
3273
  async connect(e) {
3322
3274
  var _a2;
@@ -3338,7 +3290,7 @@ class Bn {
3338
3290
  try {
3339
3291
  return L.info("Starting the session."), await r.run();
3340
3292
  } finally {
3341
- this.setVisibility(false);
3293
+ this.session === r && (this.session = void 0, this.sessionEndedObservable.publish(null)), this.setVisibility(false);
3342
3294
  }
3343
3295
  };
3344
3296
  return {
@@ -3350,16 +3302,16 @@ class Bn {
3350
3302
  }
3351
3303
  sendSpecialCombination(e) {
3352
3304
  switch (e) {
3353
- case le.CTRL_ALT_DEL:
3305
+ case ce.CTRL_ALT_DEL:
3354
3306
  this.ctrlAltDel();
3355
3307
  break;
3356
- case le.META:
3308
+ case ce.META:
3357
3309
  this.sendMeta();
3358
3310
  break;
3359
- case le.CTRL_C:
3311
+ case ce.CTRL_C:
3360
3312
  this.sendCtrlC();
3361
3313
  break;
3362
- case le.CTRL_V:
3314
+ case ce.CTRL_V:
3363
3315
  this.sendCtrlV();
3364
3316
  break;
3365
3317
  }
@@ -3367,13 +3319,13 @@ class Bn {
3367
3319
  rotation_unit_from_wheel_event(e) {
3368
3320
  switch (e.deltaMode) {
3369
3321
  case e.DOM_DELTA_PIXEL:
3370
- return Qe.Pixel;
3322
+ return Je.Pixel;
3371
3323
  case e.DOM_DELTA_LINE:
3372
- return Qe.Line;
3324
+ return Je.Line;
3373
3325
  case e.DOM_DELTA_PAGE:
3374
- return Qe.Page;
3326
+ return Je.Page;
3375
3327
  default:
3376
- return Qe.Pixel;
3328
+ return Je.Pixel;
3377
3329
  }
3378
3330
  }
3379
3331
  mouseWheel(e) {
@@ -3396,6 +3348,12 @@ class Bn {
3396
3348
  setScale(e) {
3397
3349
  this.scaleObservable.publish(e);
3398
3350
  }
3351
+ /// Whether this session's component has the keyboard focus within the page, which can show several sessions.
3352
+ hasFocus() {
3353
+ var _a2;
3354
+ const e = (_a2 = this.canvas) == null ? void 0 : _a2.getRootNode();
3355
+ return e instanceof ShadowRoot ? e.host === document.activeElement : true;
3356
+ }
3399
3357
  setCanvas(e) {
3400
3358
  this.canvas = e;
3401
3359
  }
@@ -3441,24 +3399,24 @@ class Bn {
3441
3399
  e.type === "keydown" ? (i = this.module.DeviceEvent.keyPressed, r = this.module.DeviceEvent.unicodePressed) : e.type === "keyup" && (i = this.module.DeviceEvent.keyReleased, r = this.module.DeviceEvent.unicodeReleased);
3442
3400
  let n = true;
3443
3401
  if (!this.supportsUnicodeKeyboardShortcuts()) {
3444
- for (const f of ["Alt", "Control", "Meta", "AltGraph", "OS"])
3445
- if (e.getModifierState(f)) {
3402
+ for (const b of ["Alt", "Control", "Meta", "AltGraph", "OS"])
3403
+ if (e.getModifierState(b)) {
3446
3404
  n = false;
3447
3405
  break;
3448
3406
  }
3449
3407
  }
3450
- const o = e.code in Ht, c = e.code in Be;
3451
- if (o && this.updateModifierKeyState(e), c && this.syncModifier(e), !e.repeat || !o && !c) {
3452
- const f = mi(e.code), h = Number.isNaN(f);
3453
- if (!this.keyboardUnicodeMode && i && !h) {
3454
- this.doTransactionFromDeviceEvents([i(f)]);
3408
+ const o = e.code in qt, d = e.code in Be;
3409
+ if (o && this.updateModifierKeyState(e), d && this.syncModifier(e), !e.repeat || !o && !d) {
3410
+ const b = pi(e.code), c = Number.isNaN(b);
3411
+ if (!this.keyboardUnicodeMode && i && !c) {
3412
+ this.doTransactionFromDeviceEvents([i(b)]);
3455
3413
  return;
3456
3414
  }
3457
3415
  if (this.keyboardUnicodeMode && r && i) {
3458
3416
  if (["Dead", "Unidentified"].indexOf(e.key) != -1)
3459
3417
  return;
3460
- const d = mi(e.key);
3461
- Number.isNaN(d) && e.key.length === 1 && !o && n ? this.doTransactionFromDeviceEvents([r(e.key)]) : h || this.doTransactionFromDeviceEvents([i(f)]);
3418
+ const p = pi(e.key);
3419
+ Number.isNaN(p) && e.key.length === 1 && !o && n ? this.doTransactionFromDeviceEvents([r(e.key)]) : c || this.doTransactionFromDeviceEvents([i(b)]);
3462
3420
  return;
3463
3421
  }
3464
3422
  }
@@ -3479,10 +3437,10 @@ class Bn {
3479
3437
  console.error("Invalid custom cursor parameters.");
3480
3438
  return;
3481
3439
  }
3482
- const c = new Image();
3483
- c.src = i;
3484
- const f = Math.round(r), h = Math.round(n);
3485
- o = `url(${i}) ${f} ${h}, default`;
3440
+ const d = new Image();
3441
+ d.src = i;
3442
+ const b = Math.round(r), c = Math.round(n);
3443
+ o = `url(${i}) ${b} ${c}, default`;
3486
3444
  break;
3487
3445
  }
3488
3446
  default: {
@@ -3503,7 +3461,7 @@ class Bn {
3503
3461
  );
3504
3462
  }
3505
3463
  updateModifierKeyState(e) {
3506
- const i = Ht[e.code];
3464
+ const i = qt[e.code];
3507
3465
  this.modifierKeyPressed.indexOf(i) === -1 ? this.modifierKeyPressed.push(i) : e.type === "keyup" && this.modifierKeyPressed.splice(this.modifierKeyPressed.indexOf(i), 1);
3508
3466
  }
3509
3467
  doTransactionFromDeviceEvents(e) {
@@ -3548,7 +3506,7 @@ class Bn {
3548
3506
  ]);
3549
3507
  }
3550
3508
  }
3551
- class zn {
3509
+ class Ln {
3552
3510
  constructor(e, i) {
3553
3511
  __publicField(this, "remoteDesktopService");
3554
3512
  __publicField(this, "clipboardService");
@@ -3561,16 +3519,16 @@ class zn {
3561
3519
  return L.info("Initializing connection."), this.remoteDesktopService.connect(e);
3562
3520
  }
3563
3521
  ctrlAltDel() {
3564
- this.remoteDesktopService.sendSpecialCombination(le.CTRL_ALT_DEL);
3522
+ this.remoteDesktopService.sendSpecialCombination(ce.CTRL_ALT_DEL);
3565
3523
  }
3566
3524
  metaKey() {
3567
- this.remoteDesktopService.sendSpecialCombination(le.META);
3525
+ this.remoteDesktopService.sendSpecialCombination(ce.META);
3568
3526
  }
3569
3527
  ctrlC() {
3570
- this.remoteDesktopService.sendSpecialCombination(le.CTRL_C);
3528
+ this.remoteDesktopService.sendSpecialCombination(ce.CTRL_C);
3571
3529
  }
3572
3530
  ctrlV() {
3573
- this.remoteDesktopService.sendSpecialCombination(le.CTRL_V);
3531
+ this.remoteDesktopService.sendSpecialCombination(ce.CTRL_V);
3574
3532
  }
3575
3533
  // Keys for this session whether or not its canvas has the focus, for a host that routes the keyboard itself (the
3576
3534
  // same keys to several sessions, for one). Handled as the canvas's own: codes as scancodes, modifiers kept in sync.
@@ -3650,37 +3608,19 @@ class zn {
3650
3608
  };
3651
3609
  }
3652
3610
  }
3653
- const jt = ir(false);
3654
- function In() {
3655
- const t = ir([]);
3656
- return {
3657
- subscribe: t.subscribe,
3658
- enqueue(e) {
3659
- t.update((i) => [...i, e]);
3660
- },
3661
- shift() {
3662
- let e;
3663
- return t.update((i) => i.length == 0 ? i : (e = i[0], i.slice(1))), e;
3664
- },
3665
- length() {
3666
- return rr(t).length;
3667
- }
3668
- };
3669
- }
3670
- const Gt = In();
3671
- var V = /* @__PURE__ */ ((t) => (t[t.Full = 0] = "Full", t[t.TextOnly = 1] = "TextOnly", t[t.TextOnlyServerOnly = 2] = "TextOnlyServerOnly", t[t.None = 3] = "None", t))(V || {}), or = /* @__PURE__ */ ((t) => (t[t.General = 0] = "General", t[t.WrongPassword = 1] = "WrongPassword", t[t.LogonFailure = 2] = "LogonFailure", t[t.AccessDenied = 3] = "AccessDenied", t[t.RDCleanPath = 4] = "RDCleanPath", t[t.ProxyConnect = 5] = "ProxyConnect", t[t.NegotiationFailure = 6] = "NegotiationFailure", t))(or || {});
3672
- const Kn = 100;
3673
- function ie(t) {
3611
+ var W = /* @__PURE__ */ ((t) => (t[t.Full = 0] = "Full", t[t.TextOnly = 1] = "TextOnly", t[t.TextOnlyServerOnly = 2] = "TextOnlyServerOnly", t[t.None = 3] = "None", t))(W || {}), er = /* @__PURE__ */ ((t) => (t[t.General = 0] = "General", t[t.WrongPassword = 1] = "WrongPassword", t[t.LogonFailure = 2] = "LogonFailure", t[t.AccessDenied = 3] = "AccessDenied", t[t.RDCleanPath = 4] = "RDCleanPath", t[t.ProxyConnect = 5] = "ProxyConnect", t[t.NegotiationFailure = 6] = "NegotiationFailure", t))(er || {});
3612
+ const Fn = 100;
3613
+ function ne(t) {
3674
3614
  throw {
3675
- kind: () => or.General,
3615
+ kind: () => er.General,
3676
3616
  backtrace: () => t
3677
3617
  };
3678
3618
  }
3679
- class Wn {
3619
+ class Mn {
3680
3620
  constructor(e, i) {
3681
3621
  __publicField(this, "remoteDesktopService");
3682
3622
  __publicField(this, "module");
3683
- __publicField(this, "ClipboardApiSupported", V.None);
3623
+ __publicField(this, "ClipboardApiSupported", W.None);
3684
3624
  __publicField(this, "lastClientClipboardItems", {});
3685
3625
  __publicField(this, "lastReceivedClipboardData", {});
3686
3626
  __publicField(this, "lastSentClipboardData", null);
@@ -3690,6 +3630,13 @@ class Wn {
3690
3630
  // Used to prevent the monitoring loop from clobbering an active file upload's
3691
3631
  // FormatList with a text/image clipboard update.
3692
3632
  __publicField(this, "monitoringSuppressed", false);
3633
+ // The monitoring loop and the clipboard write waiting for focus belong to this component: a page can hold several,
3634
+ // and one being destroyed must not stop the others.
3635
+ __publicField(this, "disposed", false);
3636
+ __publicField(this, "monitoringActive", false);
3637
+ __publicField(this, "monitorTimer");
3638
+ // Only the latest remote clipboard content is written once the window has the focus again.
3639
+ __publicField(this, "pendingFocus", null);
3693
3640
  // Firefox v126 and below does not support `navigator.clipboard.read` and `navigator.clipboard.write`.
3694
3641
  // So, we need to define specific methods to handle text-only clipboard.
3695
3642
  //
@@ -3713,75 +3660,111 @@ class Wn {
3713
3660
  resumeMonitoring() {
3714
3661
  this.monitoringSuppressed = false;
3715
3662
  }
3663
+ /**
3664
+ * Stops the monitoring loop and drops the clipboard write waiting for focus, until the next session starts.
3665
+ */
3666
+ stopMonitoring() {
3667
+ this.monitoringActive = false, clearTimeout(this.monitorTimer), this.monitorTimer = void 0, this.pendingFocus = null;
3668
+ }
3669
+ /**
3670
+ * For when the component is destroyed: nothing is read from or written to the clipboard anymore.
3671
+ */
3672
+ dispose() {
3673
+ this.disposed = true, this.stopMonitoring();
3674
+ }
3716
3675
  async initClipboard() {
3717
3676
  if (!window.isSecureContext) {
3718
3677
  this.remoteDesktopService.emitWarningEvent("Clipboard is available only in secure contexts (HTTPS).");
3719
3678
  return;
3720
3679
  }
3721
- if (navigator.clipboard != null && (navigator.clipboard.read != null && navigator.clipboard.write != null ? this.ClipboardApiSupported = V.Full : navigator.clipboard.readText != null ? (this.ClipboardApiSupported = V.TextOnly, this.remoteDesktopService.emitWarningEvent(
3680
+ if (navigator.clipboard != null && (navigator.clipboard.read != null && navigator.clipboard.write != null ? this.ClipboardApiSupported = W.Full : navigator.clipboard.readText != null ? (this.ClipboardApiSupported = W.TextOnly, this.remoteDesktopService.emitWarningEvent(
3722
3681
  "Clipboard is limited to text-only data types due to an outdated browser version!"
3723
- )) : navigator.clipboard.writeText != null && (this.ClipboardApiSupported = V.TextOnlyServerOnly, this.remoteDesktopService.emitWarningEvent(
3682
+ )) : navigator.clipboard.writeText != null && (this.ClipboardApiSupported = W.TextOnlyServerOnly, this.remoteDesktopService.emitWarningEvent(
3724
3683
  "Clipboard reading is not supported and writing is limited to text-only data types due to an outdated browser version!"
3725
- ))), this.ClipboardApiSupported === V.Full)
3684
+ ))), this.ClipboardApiSupported === W.Full)
3726
3685
  try {
3727
3686
  (await navigator.permissions.query({
3728
3687
  name: "clipboard-read"
3729
- })).state === "denied" && (this.ClipboardApiSupported = V.TextOnly);
3688
+ })).state === "denied" && (this.ClipboardApiSupported = W.TextOnly);
3730
3689
  } catch {
3731
3690
  try {
3732
3691
  await navigator.clipboard.read();
3733
3692
  } catch {
3734
- this.ClipboardApiSupported = V.TextOnly;
3693
+ this.ClipboardApiSupported = W.TextOnly;
3735
3694
  }
3736
3695
  }
3737
- if (this.ClipboardApiSupported === V.None) {
3696
+ if (this.ClipboardApiSupported === W.None) {
3738
3697
  this.remoteDesktopService.emitWarningEvent(
3739
3698
  "Clipboard is not supported due to an outdated browser version!"
3740
3699
  );
3741
3700
  return;
3742
3701
  }
3743
- this.remoteDesktopService.setOnForceClipboardUpdate(this.onForceClipboardUpdate.bind(this)), this.ClipboardApiSupported === V.Full ? this.remoteDesktopService.autoClipboard ? (this.remoteDesktopService.setOnRemoteClipboardChanged(this.onRemoteClipboardChangedAutoMode.bind(this)), this.remoteDesktopService.sessionStartedObservable.subscribe((e) => {
3744
- this.scheduleOnMonitorClipboardUpdate();
3702
+ this.disposed || (this.remoteDesktopService.sessionEndedObservable.subscribe(() => this.stopMonitoring()), this.remoteDesktopService.setOnForceClipboardUpdate(this.onForceClipboardUpdate.bind(this)), this.ClipboardApiSupported === W.Full ? this.remoteDesktopService.autoClipboard ? (this.remoteDesktopService.setOnRemoteClipboardChanged(this.onRemoteClipboardChangedAutoMode.bind(this)), this.remoteDesktopService.sessionStartedObservable.subscribe((e) => {
3703
+ this.monitoringActive = !this.disposed, this.scheduleOnMonitorClipboardUpdate();
3745
3704
  })) : this.remoteDesktopService.setOnRemoteClipboardChanged(
3746
3705
  this.onRemoteClipboardChangedManualMode.bind(this)
3747
- ) : this.remoteDesktopService.setOnRemoteClipboardChanged(this.ffOnRemoteClipboardChanged.bind(this));
3706
+ ) : this.remoteDesktopService.setOnRemoteClipboardChanged(this.ffOnRemoteClipboardChanged.bind(this)));
3748
3707
  }
3749
3708
  // Copies clipboard content received from the server to the local clipboard.
3750
3709
  // Returns the result of the operation. On failure, it additionally raises an error session event.
3751
3710
  async saveRemoteClipboardData() {
3752
- if (this.ClipboardApiSupported !== V.Full)
3711
+ if (this.ClipboardApiSupported !== W.Full)
3753
3712
  return await this.ffSaveRemoteClipboardData();
3754
- this.clipboardDataToSave == null && ie("The server did not send the clipboard data.");
3713
+ this.clipboardDataToSave == null && ne("The server did not send the clipboard data.");
3755
3714
  try {
3756
3715
  const e = this.clipboardDataToRecord(this.clipboardDataToSave), i = new ClipboardItem(e);
3757
3716
  await navigator.clipboard.write([i]), this.clipboardDataToSave = null;
3758
3717
  } catch (e) {
3759
- ie("Failed to write to the clipboard: " + e);
3718
+ ne("Failed to write to the clipboard: " + e);
3760
3719
  }
3761
3720
  }
3762
3721
  // Sends local clipboard's content to the server.
3763
3722
  // Returns the result of the operation. On failure, it additionally raises an error session event.
3764
3723
  async sendClipboardData() {
3765
- if (this.ClipboardApiSupported !== V.Full)
3724
+ if (this.ClipboardApiSupported !== W.Full)
3766
3725
  return await this.ffSendClipboardData();
3767
3726
  const e = await navigator.clipboard.read().catch((n) => {
3768
- ie("Failed to read from the clipboard: " + n);
3727
+ ne("Failed to read from the clipboard: " + n);
3769
3728
  });
3770
- e.length == 0 && ie("The clipboard has no data.");
3729
+ e.length == 0 && ne("The clipboard has no data.");
3771
3730
  const i = e[0];
3772
- i.types.some((n) => n.startsWith("text/") || n.startsWith("image/png")) || ie("The clipboard has no data of supported type (text or image).");
3731
+ i.types.some((n) => n.startsWith("text/") || n.startsWith("image/png")) || ne("The clipboard has no data of supported type (text or image).");
3773
3732
  const r = new this.module.ClipboardData();
3774
3733
  for (const n of i.types) {
3775
- const o = n.startsWith("text/"), c = await i.getType(n);
3776
- o ? r.addText(n, await c.text()) : r.addBinary(n, new Uint8Array(await c.arrayBuffer()));
3734
+ const o = n.startsWith("text/"), d = await i.getType(n);
3735
+ o ? r.addText(n, await d.text()) : r.addBinary(n, new Uint8Array(await d.arrayBuffer()));
3777
3736
  }
3778
3737
  r.isEmpty() || (this.lastSentClipboardData = r, await this.remoteDesktopService.onClipboardChanged(r));
3779
3738
  }
3780
3739
  scheduleOnMonitorClipboardUpdate() {
3781
- setTimeout(this.onMonitorClipboard.bind(this), Kn);
3740
+ clearTimeout(this.monitorTimer), this.monitorTimer = this.monitoringActive && !this.disposed ? setTimeout(() => {
3741
+ this.monitorTimer = void 0, this.onMonitorClipboard();
3742
+ }, Fn) : void 0;
3743
+ }
3744
+ // With several sessions on a page, the automatic clipboard sync belongs to the one with the keyboard focus: the
3745
+ // others neither send the local clipboard nor overwrite it.
3746
+ isFocused() {
3747
+ return document.hasFocus() && this.remoteDesktopService.hasFocus();
3782
3748
  }
3783
3749
  runWhenWindowFocused(e) {
3784
- document.hasFocus() ? e() : Gt.enqueue(e);
3750
+ this.disposed || (this.isFocused() ? Promise.resolve().then(() => {
3751
+ if (!this.disposed) {
3752
+ if (!this.isFocused()) {
3753
+ this.pendingFocus = e;
3754
+ return;
3755
+ }
3756
+ return e();
3757
+ }
3758
+ }).catch((i) => console.error("Failed to set client clipboard: " + i)) : this.pendingFocus = e);
3759
+ }
3760
+ /**
3761
+ * Runs the clipboard write that waited for this session to have the focus (the component calls it on focus).
3762
+ */
3763
+ flushFocused() {
3764
+ if (!this.isFocused())
3765
+ return;
3766
+ const e = this.pendingFocus;
3767
+ this.pendingFocus = null, e && this.runWhenWindowFocused(e);
3785
3768
  }
3786
3769
  // This function is required to convert `ClipboardData` to an object that can be used
3787
3770
  // with `ClipboardItem` API.
@@ -3802,9 +3785,11 @@ class Wn {
3802
3785
  return i;
3803
3786
  }
3804
3787
  // This callback is required to send initial clipboard state if available.
3805
- onForceClipboardUpdate() {
3788
+ async onForceClipboardUpdate() {
3806
3789
  try {
3807
- this.lastSentClipboardData ? this.remoteDesktopService.onClipboardChanged(this.lastSentClipboardData) : this.remoteDesktopService.onClipboardChangedEmpty();
3790
+ if (this.disposed)
3791
+ return;
3792
+ this.lastSentClipboardData ? await this.remoteDesktopService.onClipboardChanged(this.lastSentClipboardData) : await this.remoteDesktopService.onClipboardChangedEmpty();
3808
3793
  } catch (e) {
3809
3794
  console.error("Failed to send initial clipboard state: " + e);
3810
3795
  }
@@ -3815,43 +3800,42 @@ class Wn {
3815
3800
  }
3816
3801
  // This callback is required to update client clipboard state when remote side has changed.
3817
3802
  onRemoteClipboardChangedAutoMode(e) {
3818
- try {
3819
- const i = this.clipboardDataToRecord(e), r = new ClipboardItem(i);
3820
- this.runWhenWindowFocused(() => {
3821
- this.lastReceivedClipboardData = this.clipboardDataToClipboardItemsRecord(e), navigator.clipboard.write([r]);
3822
- });
3823
- } catch (i) {
3824
- console.error("Failed to set client clipboard: " + i);
3825
- }
3803
+ if (!this.disposed)
3804
+ try {
3805
+ const i = this.clipboardDataToRecord(e), r = new ClipboardItem(i);
3806
+ this.runWhenWindowFocused(() => (this.lastReceivedClipboardData = this.clipboardDataToClipboardItemsRecord(e), navigator.clipboard.write([r])));
3807
+ } catch (i) {
3808
+ console.error("Failed to set client clipboard: " + i);
3809
+ }
3826
3810
  }
3827
3811
  // Called periodically to monitor clipboard changes
3828
3812
  async onMonitorClipboard() {
3829
3813
  let e = false;
3830
3814
  try {
3831
- if (this.monitoringSuppressed || !document.hasFocus())
3815
+ if (this.disposed || !this.monitoringActive || this.monitoringSuppressed || !this.isFocused())
3832
3816
  return;
3833
3817
  const i = await navigator.clipboard.read();
3834
3818
  if (i.length == 0)
3835
3819
  return;
3836
3820
  const r = i[0];
3837
- if (!r.types.some((c) => c.startsWith("text/") || c.startsWith("image/png")))
3821
+ if (!r.types.some((d) => d.startsWith("text/") || d.startsWith("image/png")))
3838
3822
  return;
3839
3823
  const n = {};
3840
3824
  let o = true;
3841
- for (const c of r.types) {
3842
- const f = c.startsWith("text/"), h = await r.getType(c), d = f ? await h.text() : new Uint8Array(await h.arrayBuffer()), p = f ? function(s, a) {
3843
- return s === a;
3844
- } : function(s, a) {
3845
- return !(s instanceof Uint8Array) || !(a instanceof Uint8Array) ? false : s.length === a.length && s.every((l, u) => l === a[u]);
3846
- }, w = this.lastClientClipboardItems[c];
3847
- p(w, d) || (p(this.lastReceivedClipboardData[c], d) ? this.lastClientClipboardItems[c] = this.lastReceivedClipboardData[c] : o = false), n[c] = d;
3825
+ for (const d of r.types) {
3826
+ const b = d.startsWith("text/"), c = await r.getType(d), p = b ? await c.text() : new Uint8Array(await c.arrayBuffer()), h = b ? function(s, l) {
3827
+ return s === l;
3828
+ } : function(s, l) {
3829
+ return !(s instanceof Uint8Array) || !(l instanceof Uint8Array) ? false : s.length === l.length && s.every((a, u) => a === l[u]);
3830
+ }, m = this.lastClientClipboardItems[d];
3831
+ h(m, p) || (h(this.lastReceivedClipboardData[d], p) ? this.lastClientClipboardItems[d] = this.lastReceivedClipboardData[d] : o = false), n[d] = p;
3848
3832
  }
3849
- if (!o) {
3833
+ if (!o && !this.disposed && this.monitoringActive && !this.monitoringSuppressed && this.isFocused()) {
3850
3834
  this.lastClientClipboardItems = n;
3851
- const c = new this.module.ClipboardData();
3852
- Object.entries(n).forEach(([f, h]) => {
3853
- h != null && (f.startsWith("text/") && typeof h == "string" ? c.addText(f, h) : f.startsWith("image/") && h instanceof Uint8Array && c.addBinary(f, h));
3854
- }), c.isEmpty() || (this.lastSentClipboardData = c, await this.remoteDesktopService.onClipboardChanged(c));
3835
+ const d = new this.module.ClipboardData();
3836
+ Object.entries(n).forEach(([b, c]) => {
3837
+ c != null && (b.startsWith("text/") && typeof c == "string" ? d.addText(b, c) : b.startsWith("image/") && c instanceof Uint8Array && d.addBinary(b, c));
3838
+ }), d.isEmpty() || (this.lastSentClipboardData = d, await this.remoteDesktopService.onClipboardChanged(d));
3855
3839
  }
3856
3840
  } catch (i) {
3857
3841
  if (i instanceof DOMException && i.name === "NotAllowedError") {
@@ -3862,7 +3846,7 @@ class Wn {
3862
3846
  }
3863
3847
  i instanceof Error && ((this.lastClipboardMonitorLoopError === null || this.lastClipboardMonitorLoopError.toString() !== i.toString()) && console.error("Clipboard monitoring error: " + i), this.lastClipboardMonitorLoopError = i);
3864
3848
  } finally {
3865
- !e && !rr(jt) && this.scheduleOnMonitorClipboardUpdate();
3849
+ e || this.scheduleOnMonitorClipboardUpdate();
3866
3850
  }
3867
3851
  }
3868
3852
  // This function is required to retrieve the text data from the `ClipboardData`.
@@ -3885,11 +3869,11 @@ class Wn {
3885
3869
  // Copies clipboard content received from the server to the local clipboard.
3886
3870
  // Returns the result of the operation. On failure, it additionally raises an error session event.
3887
3871
  async ffSaveRemoteClipboardData() {
3888
- this.ffClipboardDataToSave == null && ie("The server did not send the clipboard data.");
3872
+ this.ffClipboardDataToSave == null && ne("The server did not send the clipboard data.");
3889
3873
  try {
3890
3874
  await navigator.clipboard.writeText(this.ffClipboardDataToSave), this.ffClipboardDataToSave = null;
3891
3875
  } catch (e) {
3892
- ie("Failed to write to the clipboard: " + e);
3876
+ ne("Failed to write to the clipboard: " + e);
3893
3877
  }
3894
3878
  }
3895
3879
  // Firefox specific function. We are using text-only clipboard API here.
@@ -3897,201 +3881,196 @@ class Wn {
3897
3881
  // Sends local clipboard's content to the server.
3898
3882
  // Returns the result of the operation. On failure, it additionally raises an error session event.
3899
3883
  async ffSendClipboardData() {
3900
- this.ClipboardApiSupported !== V.TextOnly && ie("The browser does not support clipboard read.");
3884
+ this.ClipboardApiSupported !== W.TextOnly && ne("The browser does not support clipboard read.");
3901
3885
  const e = await navigator.clipboard.readText().catch((r) => {
3902
- ie("Failed to read from the clipboard: " + r);
3886
+ ne("Failed to read from the clipboard: " + r);
3903
3887
  });
3904
- e.length == 0 && ie("The clipboard has no data.");
3888
+ e.length == 0 && ne("The clipboard has no data.");
3905
3889
  const i = new this.module.ClipboardData();
3906
3890
  i.addText("text/plain", e), i.isEmpty() || (this.lastSentClipboardData = i, await this.remoteDesktopService.onClipboardChanged(i));
3907
3891
  }
3908
3892
  }
3909
- function ar(t = window) {
3893
+ function tr(t = window) {
3910
3894
  const e = t.document.documentElement, i = t.document.getElementsByTagName("body")[0];
3911
3895
  return {
3912
3896
  x: t.innerWidth ?? e.clientWidth ?? i.clientWidth,
3913
3897
  y: t.innerHeight ?? e.clientHeight ?? i.clientHeight
3914
3898
  };
3915
3899
  }
3916
- function Vn(t, e = window) {
3900
+ function Nn(t, e = window) {
3917
3901
  if (t) {
3918
3902
  const i = t.getBoundingClientRect();
3919
3903
  if (i.width > 0 && i.height > 0)
3920
3904
  return { x: i.right, y: i.bottom };
3921
3905
  }
3922
- return ar(e);
3906
+ return tr(e);
3923
3907
  }
3924
- var qn = (t, e) => e(t, true), Hn = (t, e) => e(t, false), jn = (t) => t.preventDefault(), Gn = /* @__PURE__ */ bn('<div class="svelte-1103xra"><div><div class="screen-viewer svelte-1103xra"><canvas id="renderer" tabindex="0" class="svelte-1103xra"></canvas></div></div></div>');
3925
- const Yn = {
3908
+ var Pn = (t, e) => e(t, true), Un = (t, e) => e(t, false), Bn = (t) => t.preventDefault(), zn = /* @__PURE__ */ ln('<div class="svelte-1103xra"><div><div class="screen-viewer svelte-1103xra"><canvas id="renderer" tabindex="0" class="svelte-1103xra"></canvas></div></div></div>');
3909
+ const In = {
3926
3910
  hash: "svelte-1103xra",
3927
3911
  code: ".screen-wrapper.svelte-1103xra {position:relative;}.capturing-inputs.svelte-1103xra {outline:1px solid rgba(0, 97, 166, 0.7);outline-offset:-1px;}canvas.svelte-1103xra {width:100%;height:100%;}.svelte-1103xra::selection {background-color:transparent;}.screen-wrapper.hidden.svelte-1103xra {pointer-events:none !important;position:absolute !important;visibility:hidden;height:100%;width:100%;transform:translate(-100%, -100%);}"
3928
3912
  };
3929
- function lr(t, e) {
3930
- Gi(e, true), wn(t, Yn);
3931
- let i = ut(e, "scale"), r = ut(e, "verbose"), n = ut(e, "flexcenter"), o = ut(e, "module"), c = Ft(false), f = () => {
3913
+ function ir(t, e) {
3914
+ Vi(e, true), cn(t, In);
3915
+ let i = ut(e, "scale"), r = ut(e, "verbose"), n = ut(e, "flexcenter"), o = ut(e, "module"), d = Ft(false), b = () => {
3932
3916
  var _a2, _b2;
3933
3917
  return L.info(`
3934
- capturingInputs: ${document.activeElement === p}
3918
+ capturingInputs: ${document.activeElement === h}
3935
3919
  current active element: ${document.activeElement}
3936
- `), ((_b2 = (_a2 = document.activeElement) == null ? void 0 : _a2.shadowRoot) == null ? void 0 : _b2.firstElementChild) === h;
3937
- }, h, d, p, w = Ft(""), s = Ft(""), a = new Bn(o()), l = new Wn(a, o()), u = new zn(a, l), b = we.Fit;
3938
- function $(v) {
3939
- f() && Ot(v);
3940
- }
3941
- function M() {
3942
- We(), Te(), window.addEventListener("keydown", $, false), window.addEventListener("keyup", $, false), window.addEventListener("focus", He), window.addEventListener("blur", he), document.addEventListener("visibilitychange", Me);
3920
+ `), ((_b2 = (_a2 = document.activeElement) == null ? void 0 : _a2.shadowRoot) == null ? void 0 : _b2.firstElementChild) === c;
3921
+ }, c, p, h, m = Ft(""), s = Ft(""), l = new On(o()), a = new Mn(l, o()), u = new Ln(l, a), f = me.Fit, $ = false, A;
3922
+ function w(v) {
3923
+ b() && Ve(v);
3943
3924
  }
3944
3925
  function _() {
3945
- n() === "true" && (h.style.flexGrow = "", h.style.display = "", h.style.justifyContent = "", h.style.alignItems = "");
3926
+ he(), it(), window.addEventListener("keydown", w, false), window.addEventListener("keyup", w, false), window.addEventListener("focus", be), window.addEventListener("focusin", be), window.addEventListener("blur", pe), document.addEventListener("visibilitychange", He);
3946
3927
  }
3947
- function m(v) {
3948
- n() === "true" && (h.style.flexGrow = "1", h.style.display = "flex", h.style.justifyContent = "center", h.style.alignItems = "center");
3928
+ function O() {
3929
+ n() === "true" && (c.style.flexGrow = "", c.style.display = "", c.style.justifyContent = "", c.style.alignItems = "");
3949
3930
  }
3950
- function A(v, T, F) {
3931
+ function F(v) {
3932
+ n() === "true" && (c.style.flexGrow = "1", c.style.display = "flex", c.style.justifyContent = "center", c.style.alignItems = "center");
3933
+ }
3934
+ function Q(v, T, M) {
3951
3935
  let R = `height: ${v}; width: ${T}`;
3952
- R = `${R}; max-height: ${v}; max-width: ${T}; min-height: ${v}; min-width: ${T}`, H(w, Se(R));
3936
+ R = `${R}; max-height: ${v}; max-width: ${T}; min-height: ${v}; min-width: ${T}`, q(m, De(R));
3953
3937
  }
3954
- function O(v, T, F) {
3955
- H(s, `height: ${v}; width: ${T}; overflow: ${F}`);
3938
+ function ae(v, T, M) {
3939
+ q(s, `height: ${v}; width: ${T}; overflow: ${M}`);
3956
3940
  }
3957
- const ce = (v) => {
3958
- fe(i());
3941
+ const Ee = (v) => {
3942
+ ee(i());
3959
3943
  };
3960
- function We() {
3961
- a.resizeObservable.subscribe((v) => {
3962
- L.info(`Resize canvas to: ${v.desktopSize.width}x${v.desktopSize.height}`), p.width = v.desktopSize.width, p.height = v.desktopSize.height, fe(i());
3944
+ function he() {
3945
+ l.resizeObservable.subscribe((v) => {
3946
+ L.info(`Resize canvas to: ${v.desktopSize.width}x${v.desktopSize.height}`), h.width = v.desktopSize.width, h.height = v.desktopSize.height, ee(i());
3963
3947
  });
3964
3948
  }
3965
- function Te() {
3966
- window.addEventListener("resize", ce), a.scaleObservable.subscribe((v) => {
3967
- L.info("Change scale!"), fe(v);
3968
- }), a.dynamicResizeObservable.subscribe((v) => {
3969
- L.info(`Dynamic resize!, width: ${v.width}, height: ${v.height}`), A(v.height.toString() + "px", v.width.toString() + "px");
3970
- }), a.changeVisibilityObservable.subscribe((v) => {
3971
- H(c, Se(v)), v && (O("100%", "100%", "hidden"), setTimeout(() => fe(i()), 150));
3949
+ function it() {
3950
+ window.addEventListener("resize", Ee), l.scaleObservable.subscribe((v) => {
3951
+ L.info("Change scale!"), ee(v);
3952
+ }), l.dynamicResizeObservable.subscribe((v) => {
3953
+ L.info(`Dynamic resize!, width: ${v.width}, height: ${v.height}`), Q(v.height.toString() + "px", v.width.toString() + "px");
3954
+ }), l.changeVisibilityObservable.subscribe((v) => {
3955
+ q(d, De(v)), v && (ae("100%", "100%", "hidden"), clearTimeout(A), A = setTimeout(() => ee(i()), 150));
3972
3956
  });
3973
3957
  }
3974
- function de() {
3975
- fe(b);
3958
+ function rt() {
3959
+ ee(f);
3976
3960
  }
3977
- function fe(v) {
3978
- if (_(), P(c))
3961
+ function ee(v) {
3962
+ if (!$ && (O(), U(d)))
3979
3963
  switch (v) {
3980
3964
  case "fit":
3981
- case we.Fit:
3982
- L.info("Size to fit"), b = we.Fit, i("fit"), Re();
3965
+ case me.Fit:
3966
+ L.info("Size to fit"), f = me.Fit, i("fit"), At();
3983
3967
  break;
3984
3968
  case "full":
3985
- case we.Full:
3986
- L.info("Size to full"), b = we.Full, rt(), i("full");
3969
+ case me.Full:
3970
+ L.info("Size to full"), f = me.Full, Re(), i("full");
3987
3971
  break;
3988
3972
  case "real":
3989
- case we.Real:
3990
- L.info("Size to real"), b = we.Real, $e(), i("real");
3973
+ case me.Real:
3974
+ L.info("Size to real"), f = me.Real, $e(), i("real");
3991
3975
  break;
3992
3976
  }
3993
3977
  }
3994
- function rt() {
3995
- const v = Oe(), T = v.x, F = v.y;
3996
- let R = p.width, K = p.height;
3997
- const B = Math.min(T / p.width, F / p.height);
3998
- R = R * B, K = K * B, O(`${F}px`, `${T}px`, "hidden"), R = R > 0 ? R : 0, K = K > 0 ? K : 0, A(`${K}px`, `${R}px`);
3999
- }
4000
- function Re(v = false) {
4001
- const T = Le(), F = d.getBoundingClientRect(), R = T.x - F.x, K = T.y - F.y;
4002
- let B = p.width, se = p.height;
4003
- if (!v || R < p.width || K < p.height) {
4004
- const ve = Math.min(R / p.width, K / p.height);
4005
- B = B * ve, se = se * ve;
3978
+ function Re() {
3979
+ const v = qe(), T = v.x, M = v.y;
3980
+ let R = h.width, z = h.height;
3981
+ const N = Math.min(T / h.width, M / h.height);
3982
+ R = R * N, z = z * N, ae(`${M}px`, `${T}px`, "hidden"), R = R > 0 ? R : 0, z = z > 0 ? z : 0, Q(`${z}px`, `${R}px`);
3983
+ }
3984
+ function At(v = false) {
3985
+ const T = Le(), M = p.getBoundingClientRect(), R = T.x - M.x, z = T.y - M.y;
3986
+ let N = h.width, ve = h.height;
3987
+ if (!v || R < h.width || z < h.height) {
3988
+ const Ne = Math.min(R / h.width, z / h.height);
3989
+ N = N * Ne, ve = ve * Ne;
4006
3990
  }
4007
- B = B > 0 ? B : 0, se = se > 0 ? se : 0, O("initial", "initial", "hidden"), A(`${se}px`, `${B}px`), m();
3991
+ N = N > 0 ? N : 0, ve = ve > 0 ? ve : 0, ae("initial", "initial", "hidden"), Q(`${ve}px`, `${N}px`), F();
4008
3992
  }
4009
3993
  function $e() {
4010
- const v = Le(), T = d.getBoundingClientRect(), F = v.x - T.x, R = v.y - T.y;
4011
- F < p.width || R < p.height ? O(`${Math.min(R, p.height)}px`, `${Math.min(F, p.width)}px`, "auto") : O("initial", "initial", "initial"), A(`${p.height}px`, `${p.width}px`), m();
3994
+ const v = Le(), T = p.getBoundingClientRect(), M = v.x - T.x, R = v.y - T.y;
3995
+ M < h.width || R < h.height ? ae(`${Math.min(R, h.height)}px`, `${Math.min(M, h.width)}px`, "auto") : ae("initial", "initial", "initial"), Q(`${h.height}px`, `${h.width}px`), F();
4012
3996
  }
4013
- function At(v) {
4014
- const T = p == null ? void 0 : p.getBoundingClientRect(), F = (p == null ? void 0 : p.width) / T.width, R = (p == null ? void 0 : p.height) / T.height, K = {
4015
- x: Math.round((v.clientX - T.left) * F),
3997
+ function Ae(v) {
3998
+ const T = h == null ? void 0 : h.getBoundingClientRect(), M = (h == null ? void 0 : h.width) / T.width, R = (h == null ? void 0 : h.height) / T.height, z = {
3999
+ x: Math.round((v.clientX - T.left) * M),
4016
4000
  y: Math.round((v.clientY - T.top) * R)
4017
4001
  };
4018
- a.updateMousePosition(K);
4019
- }
4020
- function Ee(v, T) {
4021
- a.mouseButtonState(v, T, true);
4002
+ l.updateMousePosition(z);
4022
4003
  }
4023
- function Ae(v) {
4024
- a.mouseWheel(v);
4004
+ function We(v, T) {
4005
+ l.mouseButtonState(v, T, true);
4025
4006
  }
4026
4007
  function nt(v) {
4027
- p.focus({ preventScroll: true }), a.mouseIn(v);
4028
- }
4029
- function st(v) {
4030
- a.mouseOut(v);
4008
+ l.mouseWheel(v);
4031
4009
  }
4032
4010
  function Ot(v) {
4033
- return a.sendKeyboardEvent(v), true;
4011
+ h.focus({ preventScroll: true }), l.mouseIn(v);
4012
+ }
4013
+ function Oe(v) {
4014
+ l.mouseOut(v);
4034
4015
  }
4035
- function Oe() {
4036
- return ar();
4016
+ function Ve(v) {
4017
+ return l.sendKeyboardEvent(v), true;
4018
+ }
4019
+ function qe() {
4020
+ return tr();
4037
4021
  }
4038
4022
  function Le() {
4039
- return Vn(e.$$host);
4023
+ return Nn(e.$$host);
4040
4024
  }
4041
- async function Ve() {
4042
- L.info("Start canvas initialization..."), p.width = 800, p.height = 600, a.setCanvas(p), a.setOnCanvasResized(de), M();
4025
+ async function st() {
4026
+ L.info("Start canvas initialization..."), h.width = 800, h.height = 600, l.setCanvas(h), l.setOnCanvasResized(rt), _();
4043
4027
  }
4044
- function qe() {
4028
+ function ke() {
4045
4029
  let v = {
4046
4030
  irgUserInteraction: u.getExposedFunctions()
4047
4031
  };
4048
- L.info("Component ready"), L.info("Dispatching ready event"), h.dispatchEvent(new CustomEvent("ready", {
4032
+ L.info("Component ready"), L.info("Dispatching ready event"), c.dispatchEvent(new CustomEvent("ready", {
4049
4033
  detail: v,
4050
4034
  bubbles: true,
4051
4035
  composed: true
4052
4036
  }));
4053
4037
  }
4054
- function He() {
4055
- var _a2;
4056
- try {
4057
- for (; Gt.length() > 0; )
4058
- (_a2 = Gt.shift()) == null ? void 0 : _a2();
4059
- } catch (v) {
4060
- console.error("Failed to run the function queued for execution when the window received focus: " + v);
4061
- }
4038
+ function be() {
4039
+ a.flushFocused();
4062
4040
  }
4063
- function he() {
4064
- a.focusLost();
4041
+ function pe() {
4042
+ l.focusLost();
4065
4043
  }
4066
- function Me() {
4067
- document.visibilityState === "hidden" && a.focusLost();
4044
+ function He() {
4045
+ document.visibilityState === "hidden" && l.focusLost();
4068
4046
  }
4069
- tr(async () => {
4070
- jt.set(false), L.verbose = r() === "true", L.info("Dom ready"), await Ve();
4071
- try {
4072
- await l.initClipboard();
4073
- } catch (v) {
4074
- L.error("Clipboard initialization failed: " + v);
4047
+ Zi(async () => {
4048
+ if (L.verbose = r() === "true", L.info("Dom ready"), await st(), !$) {
4049
+ try {
4050
+ await a.initClipboard();
4051
+ } catch (v) {
4052
+ L.error("Clipboard initialization failed: " + v);
4053
+ }
4054
+ $ || ke();
4075
4055
  }
4076
- qe();
4077
- }), xn(() => {
4078
- window.removeEventListener("resize", ce), window.removeEventListener("keydown", $, false), window.removeEventListener("keyup", $, false), window.removeEventListener("focus", He), window.removeEventListener("blur", he), document.removeEventListener("visibilitychange", Me), jt.set(true);
4056
+ }), pn(() => {
4057
+ $ = true, clearTimeout(A), a.dispose(), window.removeEventListener("resize", Ee), window.removeEventListener("keydown", w, false), window.removeEventListener("keyup", w, false), window.removeEventListener("focus", be), window.removeEventListener("focusin", be), window.removeEventListener("blur", pe), document.removeEventListener("visibilitychange", He);
4079
4058
  });
4080
- var J = Gn(), be = Pt(J);
4081
- let pe;
4082
- var ke = Pt(be), I = Pt(ke);
4083
- return I.__mousemove = At, I.__mousedown = [qn, Ee], I.__mouseup = [Hn, Ee], I.__contextmenu = [jn], Ut(I, (v) => p = v, () => p), Nt(ke), Nt(be), Ut(be, (v) => d = v, () => d), Nt(J), Ut(J, (v) => h = v, () => h), tn(() => {
4084
- pe = gn(be, 1, `screen-wrapper scale-${i() ?? ""}`, "svelte-1103xra", pe, {
4085
- hidden: !P(c),
4086
- "capturing-inputs": f
4087
- }), fi(be, "style", P(s)), fi(ke, "style", P(w));
4088
- }), lt("mouseleave", I, (v) => {
4089
- st(v);
4090
- }), lt("mouseenter", I, (v) => {
4091
- nt(v);
4092
- }), lt("wheel", I, Ae), lt("selectstart", I, (v) => {
4059
+ var te = zn(), le = Nt(te);
4060
+ let Fe;
4061
+ var Me = Nt(le), j = Nt(Me);
4062
+ return j.__mousemove = Ae, j.__mousedown = [Pn, We], j.__mouseup = [Un, We], j.__contextmenu = [Bn], Pt(j, (v) => h = v, () => h), Mt(Me), Mt(le), Pt(le, (v) => p = v, () => p), Mt(te), Pt(te, (v) => c = v, () => c), Yr(() => {
4063
+ Fe = hn(le, 1, `screen-wrapper scale-${i() ?? ""}`, "svelte-1103xra", Fe, {
4064
+ hidden: !U(d),
4065
+ "capturing-inputs": b
4066
+ }), ui(le, "style", U(s)), ui(Me, "style", U(m));
4067
+ }), lt("mouseleave", j, (v) => {
4068
+ Oe(v);
4069
+ }), lt("mouseenter", j, (v) => {
4070
+ Ot(v);
4071
+ }), lt("wheel", j, nt), lt("selectstart", j, (v) => {
4093
4072
  v.preventDefault();
4094
- }), Qi(t, J), Yi({
4073
+ }), Gi(t, te), qi({
4095
4074
  get scale() {
4096
4075
  return i();
4097
4076
  },
@@ -4118,14 +4097,14 @@ function lr(t, e) {
4118
4097
  }
4119
4098
  });
4120
4099
  }
4121
- fn([
4100
+ on([
4122
4101
  "mousemove",
4123
4102
  "mousedown",
4124
4103
  "mouseup",
4125
4104
  "contextmenu"
4126
4105
  ]);
4127
- customElements.define("iron-remote-desktop", Sn(
4128
- lr,
4106
+ customElements.define("iron-remote-desktop", gn(
4107
+ ir,
4129
4108
  {
4130
4109
  scale: {},
4131
4110
  verbose: {},
@@ -4141,12 +4120,12 @@ customElements.define("iron-remote-desktop", Sn(
4141
4120
  }
4142
4121
  }
4143
4122
  ));
4144
- const Xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4123
+ const Kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4145
4124
  __proto__: null,
4146
- default: lr
4125
+ default: ir
4147
4126
  }, Symbol.toStringTag, { value: "Module" }));
4148
4127
  export {
4149
- Pn as Config,
4150
- Un as ConfigBuilder,
4151
- Xn as default
4128
+ $n as Config,
4129
+ An as ConfigBuilder,
4130
+ Kn as default
4152
4131
  };