liveroom-client-element 0.0.35 → 0.0.36

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.
@@ -1,7 +1,7 @@
1
1
  var Mo = Object.defineProperty;
2
2
  var Uo = (i, e, t) => e in i ? Mo(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var N = (i, e, t) => (Uo(i, typeof e != "symbol" ? e + "" : e, t), t);
4
- import { a as Fo, c as Bo } from "./constants-351e7840.js";
3
+ var x = (i, e, t) => (Uo(i, typeof e != "symbol" ? e + "" : e, t), t);
4
+ import { a as Fo, c as Bo } from "./constants-0103de6d.js";
5
5
  function Gi() {
6
6
  }
7
7
  function $r(i) {
@@ -22,7 +22,7 @@ function Jo(i, e) {
22
22
  function jo(i) {
23
23
  return Object.keys(i).length === 0;
24
24
  }
25
- function Le(i, e) {
25
+ function Ne(i, e) {
26
26
  i.appendChild(e);
27
27
  }
28
28
  function Vo(i, e, t) {
@@ -43,13 +43,13 @@ function $o(i) {
43
43
  ) : i.ownerDocument;
44
44
  }
45
45
  function qo(i, e) {
46
- return Le(
46
+ return Ne(
47
47
  /** @type {Document} */
48
48
  i.head || i,
49
49
  e
50
50
  ), e.sheet;
51
51
  }
52
- function Ln(i, e, t) {
52
+ function Nn(i, e, t) {
53
53
  i.insertBefore(e, t || null);
54
54
  }
55
55
  function nn(i) {
@@ -170,16 +170,16 @@ function ic(i, e, t, n, s, r, a, o, c, u, d, h) {
170
170
  const w = [], _ = /* @__PURE__ */ new Map(), M = /* @__PURE__ */ new Map(), Q = [];
171
171
  for (b = p; b--; ) {
172
172
  const q = h(s, r, b), K = t(q);
173
- let x = a.get(K);
174
- x ? n && Q.push(() => x.p(q, e)) : (x = u(K, q), x.c()), _.set(K, w[b] = x), K in T && M.set(K, Math.abs(b - T[K]));
173
+ let A = a.get(K);
174
+ A ? n && Q.push(() => A.p(q, e)) : (A = u(K, q), A.c()), _.set(K, w[b] = A), K in T && M.set(K, Math.abs(b - T[K]));
175
175
  }
176
176
  const j = /* @__PURE__ */ new Set(), he = /* @__PURE__ */ new Set();
177
177
  function ae(q) {
178
178
  Gr(q, 1), q.m(o, d), a.set(q.key, q), d = q.first, p--;
179
179
  }
180
180
  for (; f && p; ) {
181
- const q = w[p - 1], K = i[f - 1], x = q.key, F = K.key;
182
- q === K ? (d = q.first, f--, p--) : _.has(F) ? !a.has(x) || j.has(x) ? ae(q) : he.has(F) ? f-- : M.get(x) > M.get(F) ? (he.add(x), ae(q)) : (j.add(F), f--) : (c(K, a), f--);
181
+ const q = w[p - 1], K = i[f - 1], A = q.key, F = K.key;
182
+ q === K ? (d = q.first, f--, p--) : _.has(F) ? !a.has(A) || j.has(A) ? ae(q) : he.has(F) ? f-- : M.get(A) > M.get(F) ? (he.add(A), ae(q)) : (j.add(F), f--) : (c(K, a), f--);
183
183
  }
184
184
  for (; f--; ) {
185
185
  const q = i[f];
@@ -247,23 +247,23 @@ typeof HTMLElement == "function" && (zr = class extends HTMLElement {
247
247
  constructor(e, t, n) {
248
248
  super();
249
249
  /** The Svelte component constructor */
250
- N(this, "$$ctor");
250
+ x(this, "$$ctor");
251
251
  /** Slots */
252
- N(this, "$$s");
252
+ x(this, "$$s");
253
253
  /** The Svelte component instance */
254
- N(this, "$$c");
254
+ x(this, "$$c");
255
255
  /** Whether or not the custom element is connected */
256
- N(this, "$$cn", !1);
256
+ x(this, "$$cn", !1);
257
257
  /** Component props data */
258
- N(this, "$$d", {});
258
+ x(this, "$$d", {});
259
259
  /** `true` if currently in the process of reflecting component props back to attributes */
260
- N(this, "$$r", !1);
260
+ x(this, "$$r", !1);
261
261
  /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
262
- N(this, "$$p_d", {});
262
+ x(this, "$$p_d", {});
263
263
  /** @type {Record<string, Function[]>} Event listeners */
264
- N(this, "$$l", {});
264
+ x(this, "$$l", {});
265
265
  /** @type {Map<Function, Function>} Event listener unsubscribe functions */
266
- N(this, "$$l_u", /* @__PURE__ */ new Map());
266
+ x(this, "$$l_u", /* @__PURE__ */ new Map());
267
267
  this.$$ctor = e, this.$$s = t, n && this.attachShadow({ mode: "open" });
268
268
  }
269
269
  addEventListener(e, t, n) {
@@ -293,7 +293,7 @@ typeof HTMLElement == "function" && (zr = class extends HTMLElement {
293
293
  * @param {HTMLElement} [anchor]
294
294
  */
295
295
  m: function(u, d) {
296
- Ln(u, a, d);
296
+ Nn(u, a, d);
297
297
  },
298
298
  d: function(u) {
299
299
  u && nn(a);
@@ -430,7 +430,7 @@ class cc {
430
430
  *
431
431
  * @type {any}
432
432
  */
433
- N(this, "$$");
433
+ x(this, "$$");
434
434
  /**
435
435
  * ### PRIVATE API
436
436
  *
@@ -438,7 +438,7 @@ class cc {
438
438
  *
439
439
  * @type {any}
440
440
  */
441
- N(this, "$$set");
441
+ x(this, "$$set");
442
442
  }
443
443
  /** @returns {void} */
444
444
  $destroy() {
@@ -489,8 +489,8 @@ const { isArray: dc } = Array, lc = Object.keys, Ki = (i) => {
489
489
  };
490
490
  class Ue {
491
491
  constructor(e) {
492
- N(this, "path");
493
- N(this, "from");
492
+ x(this, "path");
493
+ x(this, "from");
494
494
  this.path = e;
495
495
  }
496
496
  }
@@ -534,11 +534,11 @@ const { isArray: Kr } = Array, te = (i, e) => {
534
534
  else
535
535
  throw new Error("NOT_FOUND");
536
536
  return { val: i, obj: n, key: s };
537
- }, sn = (i) => Kr(i.obj) && typeof i.key == "number", Nn = (i) => typeof i.obj == "object" && typeof i.key == "string";
537
+ }, sn = (i) => Kr(i.obj) && typeof i.key == "number", xn = (i) => typeof i.obj == "object" && typeof i.key == "string";
538
538
  class Is extends Ue {
539
539
  constructor(t, n) {
540
540
  super(t);
541
- N(this, "value");
541
+ x(this, "value");
542
542
  this.value = n;
543
543
  }
544
544
  op() {
@@ -582,7 +582,7 @@ class Is extends Ue {
582
582
  class Yr extends Ue {
583
583
  constructor(t, n) {
584
584
  super(t);
585
- N(this, "oldValue");
585
+ x(this, "oldValue");
586
586
  this.oldValue = n;
587
587
  }
588
588
  op() {
@@ -595,7 +595,7 @@ class Yr extends Ue {
595
595
  const n = te(t, this.path);
596
596
  if (n.val === void 0)
597
597
  throw new Error("NOT_FOUND");
598
- return Nn(n) ? delete n.obj[n.key] : sn(n) ? n.val !== void 0 && n.obj.splice(n.key, 1) : t = null, { doc: t, old: n.val };
598
+ return xn(n) ? delete n.obj[n.key] : sn(n) ? n.val !== void 0 && n.obj.splice(n.key, 1) : t = null, { doc: t, old: n.val };
599
599
  }
600
600
  toJson(t) {
601
601
  const n = {
@@ -616,8 +616,8 @@ class Yr extends Ue {
616
616
  class Sc extends Ue {
617
617
  constructor(t, n, s) {
618
618
  super(t);
619
- N(this, "value");
620
- N(this, "oldValue");
619
+ x(this, "value");
620
+ x(this, "oldValue");
621
621
  this.value = n, this.oldValue = s;
622
622
  }
623
623
  op() {
@@ -630,7 +630,7 @@ class Sc extends Ue {
630
630
  const n = te(t, this.path);
631
631
  if (n.val === void 0)
632
632
  throw new Error("NOT_FOUND");
633
- return Nn(n) ? n.obj[n.key] = this.value : sn(n) ? n.obj[n.key] = this.value : t = this.value, { doc: t, old: n.val };
633
+ return xn(n) ? n.obj[n.key] = this.value : sn(n) ? n.obj[n.key] = this.value : t = this.value, { doc: t, old: n.val };
634
634
  }
635
635
  toJson(t) {
636
636
  const n = {
@@ -652,7 +652,7 @@ class Sc extends Ue {
652
652
  class Cc extends Ue {
653
653
  constructor(t, n) {
654
654
  super(t);
655
- N(this, "from");
655
+ x(this, "from");
656
656
  this.from = n;
657
657
  }
658
658
  op() {
@@ -682,7 +682,7 @@ class Cc extends Ue {
682
682
  class wc extends Ue {
683
683
  constructor(t, n) {
684
684
  super(t);
685
- N(this, "from");
685
+ x(this, "from");
686
686
  this.from = n;
687
687
  }
688
688
  op() {
@@ -747,8 +747,8 @@ const Pn = (i, e) => {
747
747
  class Ec extends Ce {
748
748
  constructor(t, n, s) {
749
749
  super(t);
750
- N(this, "value");
751
- N(this, "not");
750
+ x(this, "value");
751
+ x(this, "not");
752
752
  this.value = n, this.not = s;
753
753
  }
754
754
  op() {
@@ -810,7 +810,7 @@ class Pc extends Ue {
810
810
  class Rc extends Ue {
811
811
  constructor(t, n) {
812
812
  super(t);
813
- N(this, "inc");
813
+ x(this, "inc");
814
814
  this.inc = n;
815
815
  }
816
816
  op() {
@@ -840,8 +840,8 @@ class Rc extends Ue {
840
840
  class _c extends Ue {
841
841
  constructor(t, n, s) {
842
842
  super(t);
843
- N(this, "pos");
844
- N(this, "str");
843
+ x(this, "pos");
844
+ x(this, "str");
845
845
  this.pos = n, this.str = s;
846
846
  }
847
847
  op() {
@@ -879,9 +879,9 @@ class _c extends Ue {
879
879
  class Ic extends Ue {
880
880
  constructor(t, n, s, r) {
881
881
  super(t);
882
- N(this, "pos");
883
- N(this, "str");
884
- N(this, "len");
882
+ x(this, "pos");
883
+ x(this, "str");
884
+ x(this, "len");
885
885
  this.pos = n, this.str = s, this.len = r;
886
886
  }
887
887
  op() {
@@ -922,15 +922,15 @@ class Ic extends Ue {
922
922
  t.encodeArrayHeader(s ? 4 : 5), t.writer.u8(7), t.encodeArray(this.path), t.encodeNumber(this.pos), s ? t.encodeString(this.str) : (t.writer.u8(0), t.encodeNumber(this.len));
923
923
  }
924
924
  }
925
- const { isArray: xc } = Array, rs = (i) => !!i && typeof i == "object" && typeof i.text == "string", as = (i) => !!i && typeof i == "object" && xc(i.children), Ac = (i, e) => {
925
+ const { isArray: Ac } = Array, rs = (i) => !!i && typeof i == "object" && typeof i.text == "string", as = (i) => !!i && typeof i == "object" && Ac(i.children), Oc = (i, e) => {
926
926
  const t = new RegExp(i, e ? "i" : void 0);
927
927
  return (n) => t.test(n);
928
928
  };
929
- class Oc extends Ue {
929
+ class Lc extends Ue {
930
930
  constructor(t, n, s) {
931
931
  super(t);
932
- N(this, "pos");
933
- N(this, "props");
932
+ x(this, "pos");
933
+ x(this, "props");
934
934
  this.pos = n, this.props = s;
935
935
  }
936
936
  op() {
@@ -944,7 +944,7 @@ class Oc extends Ue {
944
944
  if (n.val === void 0)
945
945
  throw new Error("NOT_FOUND");
946
946
  const s = this.split(n.val);
947
- return Nn(n) ? n.obj[n.key] = s : sn(n) ? (n.obj[n.key] = s[0], n.obj.splice(n.key + 1, 0, s[1])) : t = s, { doc: t, old: n.val };
947
+ return xn(n) ? n.obj[n.key] = s : sn(n) ? (n.obj[n.key] = s[0], n.obj.splice(n.key + 1, 0, s[1])) : t = s, { doc: t, old: n.val };
948
948
  }
949
949
  split(t) {
950
950
  if (typeof t == "string") {
@@ -1009,11 +1009,11 @@ class Oc extends Ue {
1009
1009
  t.encodeArrayHeader(this.props ? 4 : 3), t.writer.u8(10), t.encodeArray(this.path), t.encodeNumber(this.pos), this.props && t.encodeObject(this.props);
1010
1010
  }
1011
1011
  }
1012
- class Lc extends Ue {
1012
+ class Nc extends Ue {
1013
1013
  constructor(t, n, s) {
1014
1014
  super(t);
1015
- N(this, "pos");
1016
- N(this, "props");
1015
+ x(this, "pos");
1016
+ x(this, "props");
1017
1017
  this.pos = n, this.props = s;
1018
1018
  }
1019
1019
  op() {
@@ -1050,12 +1050,12 @@ class Lc extends Ue {
1050
1050
  t.encodeArrayHeader(this.props ? 4 : 3), t.writer.u8(11), t.encodeArray(this.path), t.encodeNumber(this.pos), this.props && t.encodeAny(this.props);
1051
1051
  }
1052
1052
  }
1053
- const { isArray: Nc } = Array;
1053
+ const { isArray: xc } = Array;
1054
1054
  class Dc extends Ue {
1055
1055
  constructor(t, n, s) {
1056
1056
  super(t);
1057
- N(this, "props");
1058
- N(this, "deleteNull");
1057
+ x(this, "props");
1058
+ x(this, "deleteNull");
1059
1059
  this.props = n, this.deleteNull = s;
1060
1060
  }
1061
1061
  op() {
@@ -1066,10 +1066,10 @@ class Dc extends Ue {
1066
1066
  }
1067
1067
  apply(t) {
1068
1068
  const n = te(t, this.path);
1069
- return sn(n) ? n.val !== void 0 && (n.obj[n.key] = this.extend(n.val)) : Nn(n) ? n.obj[n.key] = this.extend(n.val) : t = this.extend(t), { doc: t };
1069
+ return sn(n) ? n.val !== void 0 && (n.obj[n.key] = this.extend(n.val)) : xn(n) ? n.obj[n.key] = this.extend(n.val) : t = this.extend(t), { doc: t };
1070
1070
  }
1071
1071
  extend(t) {
1072
- if (Nc(t) || typeof t != "object" || !t)
1072
+ if (xc(t) || typeof t != "object" || !t)
1073
1073
  return t;
1074
1074
  for (const [n, s] of Object.entries(this.props)) {
1075
1075
  if (n === "__proto__")
@@ -1163,7 +1163,7 @@ const { isArray: Fc } = Array;
1163
1163
  class Bc extends Ce {
1164
1164
  constructor(t, n) {
1165
1165
  super(t);
1166
- N(this, "type");
1166
+ x(this, "type");
1167
1167
  this.type = n;
1168
1168
  }
1169
1169
  op() {
@@ -1193,9 +1193,9 @@ class Bc extends Ce {
1193
1193
  class Jc extends Ce {
1194
1194
  constructor(t, n, s, r) {
1195
1195
  super(t);
1196
- N(this, "pos");
1197
- N(this, "str");
1198
- N(this, "not");
1196
+ x(this, "pos");
1197
+ x(this, "str");
1198
+ x(this, "not");
1199
1199
  this.pos = n, this.str = s, this.not = r;
1200
1200
  }
1201
1201
  op() {
@@ -1231,8 +1231,8 @@ class Jc extends Ce {
1231
1231
  class jc extends Ce {
1232
1232
  constructor(t, n, s) {
1233
1233
  super(t);
1234
- N(this, "len");
1235
- N(this, "not");
1234
+ x(this, "len");
1235
+ x(this, "not");
1236
1236
  this.len = n, this.not = s;
1237
1237
  }
1238
1238
  op() {
@@ -1267,8 +1267,8 @@ class jc extends Ce {
1267
1267
  class Vc extends Ce {
1268
1268
  constructor(t, n, s) {
1269
1269
  super(t);
1270
- N(this, "value");
1271
- N(this, "ignore_case");
1270
+ x(this, "value");
1271
+ x(this, "ignore_case");
1272
1272
  this.value = n, this.ignore_case = s;
1273
1273
  }
1274
1274
  op() {
@@ -1304,8 +1304,8 @@ class Vc extends Ce {
1304
1304
  class $c extends Ce {
1305
1305
  constructor(t, n, s) {
1306
1306
  super(t);
1307
- N(this, "value");
1308
- N(this, "ignore_case");
1307
+ x(this, "value");
1308
+ x(this, "ignore_case");
1309
1309
  this.value = n, this.ignore_case = s;
1310
1310
  }
1311
1311
  op() {
@@ -1341,8 +1341,8 @@ class $c extends Ce {
1341
1341
  class qc extends Ce {
1342
1342
  constructor(t, n, s) {
1343
1343
  super(t);
1344
- N(this, "value");
1345
- N(this, "ignore_case");
1344
+ x(this, "value");
1345
+ x(this, "ignore_case");
1346
1346
  this.value = n, this.ignore_case = s;
1347
1347
  }
1348
1348
  op() {
@@ -1378,7 +1378,7 @@ class qc extends Ce {
1378
1378
  class Hc extends Ce {
1379
1379
  constructor(t, n) {
1380
1380
  super(t);
1381
- N(this, "value");
1381
+ x(this, "value");
1382
1382
  this.value = n;
1383
1383
  }
1384
1384
  op() {
@@ -1411,7 +1411,7 @@ class Hc extends Ce {
1411
1411
  class Wc extends Ce {
1412
1412
  constructor(t, n) {
1413
1413
  super(t);
1414
- N(this, "value");
1414
+ x(this, "value");
1415
1415
  this.value = n;
1416
1416
  }
1417
1417
  op() {
@@ -1441,7 +1441,7 @@ class Wc extends Ce {
1441
1441
  class Gc extends Ce {
1442
1442
  constructor(t, n) {
1443
1443
  super(t);
1444
- N(this, "value");
1444
+ x(this, "value");
1445
1445
  this.value = n;
1446
1446
  }
1447
1447
  op() {
@@ -1468,17 +1468,17 @@ class Gc extends Ce {
1468
1468
  t.encodeArrayHeader(3), t.writer.u8(36), t.encodeArray(n ? this.path.slice(n.path.length) : this.path), t.encodeNumber(this.value);
1469
1469
  }
1470
1470
  }
1471
- class xs extends Ce {
1471
+ class As extends Ce {
1472
1472
  constructor(t, n) {
1473
1473
  super(t);
1474
- N(this, "ops");
1474
+ x(this, "ops");
1475
1475
  this.ops = n;
1476
1476
  }
1477
1477
  }
1478
- class zc extends xs {
1478
+ class zc extends As {
1479
1479
  constructor(t, n) {
1480
1480
  super(t, n);
1481
- N(this, "ops");
1481
+ x(this, "ops");
1482
1482
  this.ops = n;
1483
1483
  }
1484
1484
  op() {
@@ -1516,10 +1516,10 @@ class zc extends xs {
1516
1516
  this.ops[a].encode(t, this);
1517
1517
  }
1518
1518
  }
1519
- class Kc extends xs {
1519
+ class Kc extends As {
1520
1520
  constructor(t, n) {
1521
1521
  super(t, n);
1522
- N(this, "ops");
1522
+ x(this, "ops");
1523
1523
  this.ops = n;
1524
1524
  }
1525
1525
  op() {
@@ -1556,10 +1556,10 @@ class Kc extends xs {
1556
1556
  this.ops[r].encode(t, this);
1557
1557
  }
1558
1558
  }
1559
- class Yc extends xs {
1559
+ class Yc extends As {
1560
1560
  constructor(t, n) {
1561
1561
  super(t, n);
1562
- N(this, "ops");
1562
+ x(this, "ops");
1563
1563
  this.ops = n;
1564
1564
  }
1565
1565
  op() {
@@ -1599,9 +1599,9 @@ class Yc extends xs {
1599
1599
  class Xc extends Ce {
1600
1600
  constructor(t, n, s, r) {
1601
1601
  super(t);
1602
- N(this, "value");
1603
- N(this, "ignore_case");
1604
- N(this, "matcher");
1602
+ x(this, "value");
1603
+ x(this, "ignore_case");
1604
+ x(this, "matcher");
1605
1605
  this.value = n, this.ignore_case = s, this.matcher = r(n, s);
1606
1606
  }
1607
1607
  op() {
@@ -1635,7 +1635,7 @@ const { isArray: Qc } = Array;
1635
1635
  class Zc extends Ce {
1636
1636
  constructor(t, n) {
1637
1637
  super(t);
1638
- N(this, "value");
1638
+ x(this, "value");
1639
1639
  this.value = n;
1640
1640
  }
1641
1641
  op() {
@@ -1683,9 +1683,9 @@ const eu = (i, e) => {
1683
1683
  case "str_del":
1684
1684
  return new Ic($(i.path), i.pos, i.str, i.len);
1685
1685
  case "split":
1686
- return new Oc($(i.path), i.pos, i.props || null);
1687
- case "merge":
1688
1686
  return new Lc($(i.path), i.pos, i.props || null);
1687
+ case "merge":
1688
+ return new Nc($(i.path), i.pos, i.props || null);
1689
1689
  case "extend":
1690
1690
  return new Dc($(i.path), i.props, !!i.deleteNull);
1691
1691
  default:
@@ -1714,7 +1714,7 @@ const eu = (i, e) => {
1714
1714
  case "starts":
1715
1715
  return new qc($(i.path), i.value, !!i.ignore_case);
1716
1716
  case "matches":
1717
- return new Xc($(i.path), i.value, !!i.ignore_case, e.createMatcher || Ac);
1717
+ return new Xc($(i.path), i.value, !!i.ignore_case, e.createMatcher || Oc);
1718
1718
  case "in":
1719
1719
  return new Hc($(i.path), i.value);
1720
1720
  case "less":
@@ -1748,7 +1748,7 @@ function tu(i, e, t) {
1748
1748
  }
1749
1749
  var Bi = (i) => typeof i == "function" ? i : function() {
1750
1750
  return i;
1751
- }, iu = typeof self < "u" ? self : null, Di = typeof window < "u" ? window : null, Ji = iu || Di || Ji, nu = "2.0.0", Xe = { connecting: 0, open: 1, closing: 2, closed: 3 }, su = 1e4, ru = 1e3, Oe = {
1751
+ }, iu = typeof self < "u" ? self : null, Di = typeof window < "u" ? window : null, Ji = iu || Di || Ji, nu = "2.0.0", Xe = { connecting: 0, open: 1, closing: 2, closed: 3 }, su = 1e4, ru = 1e3, Le = {
1752
1752
  closed: "closed",
1753
1753
  errored: "errored",
1754
1754
  joined: "joined",
@@ -1825,20 +1825,20 @@ var Bi = (i) => typeof i == "function" ? i : function() {
1825
1825
  }
1826
1826
  }, ou = class {
1827
1827
  constructor(i, e, t) {
1828
- this.state = Oe.closed, this.topic = i, this.params = Bi(e || {}), this.socket = t, this.bindings = [], this.bindingRef = 0, this.timeout = this.socket.timeout, this.joinedOnce = !1, this.joinPush = new un(this, yt.join, this.params, this.timeout), this.pushBuffer = [], this.stateChangeRefs = [], this.rejoinTimer = new Xr(() => {
1828
+ this.state = Le.closed, this.topic = i, this.params = Bi(e || {}), this.socket = t, this.bindings = [], this.bindingRef = 0, this.timeout = this.socket.timeout, this.joinedOnce = !1, this.joinPush = new un(this, yt.join, this.params, this.timeout), this.pushBuffer = [], this.stateChangeRefs = [], this.rejoinTimer = new Xr(() => {
1829
1829
  this.socket.isConnected() && this.rejoin();
1830
1830
  }, this.socket.rejoinAfterMs), this.stateChangeRefs.push(this.socket.onError(() => this.rejoinTimer.reset())), this.stateChangeRefs.push(this.socket.onOpen(() => {
1831
1831
  this.rejoinTimer.reset(), this.isErrored() && this.rejoin();
1832
1832
  })), this.joinPush.receive("ok", () => {
1833
- this.state = Oe.joined, this.rejoinTimer.reset(), this.pushBuffer.forEach((n) => n.send()), this.pushBuffer = [];
1833
+ this.state = Le.joined, this.rejoinTimer.reset(), this.pushBuffer.forEach((n) => n.send()), this.pushBuffer = [];
1834
1834
  }), this.joinPush.receive("error", () => {
1835
- this.state = Oe.errored, this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
1835
+ this.state = Le.errored, this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
1836
1836
  }), this.onClose(() => {
1837
- this.rejoinTimer.reset(), this.socket.hasLogger() && this.socket.log("channel", `close ${this.topic} ${this.joinRef()}`), this.state = Oe.closed, this.socket.remove(this);
1837
+ this.rejoinTimer.reset(), this.socket.hasLogger() && this.socket.log("channel", `close ${this.topic} ${this.joinRef()}`), this.state = Le.closed, this.socket.remove(this);
1838
1838
  }), this.onError((n) => {
1839
- this.socket.hasLogger() && this.socket.log("channel", `error ${this.topic}`, n), this.isJoining() && this.joinPush.reset(), this.state = Oe.errored, this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
1839
+ this.socket.hasLogger() && this.socket.log("channel", `error ${this.topic}`, n), this.isJoining() && this.joinPush.reset(), this.state = Le.errored, this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
1840
1840
  }), this.joinPush.receive("timeout", () => {
1841
- this.socket.hasLogger() && this.socket.log("channel", `timeout ${this.topic} (${this.joinRef()})`, this.joinPush.timeout), new un(this, yt.leave, Bi({}), this.timeout).send(), this.state = Oe.errored, this.joinPush.reset(), this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
1841
+ this.socket.hasLogger() && this.socket.log("channel", `timeout ${this.topic} (${this.joinRef()})`, this.joinPush.timeout), new un(this, yt.leave, Bi({}), this.timeout).send(), this.state = Le.errored, this.joinPush.reset(), this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
1842
1842
  }), this.on(yt.reply, (n, s) => {
1843
1843
  this.trigger(this.replyEventName(s), n);
1844
1844
  });
@@ -1873,7 +1873,7 @@ var Bi = (i) => typeof i == "function" ? i : function() {
1873
1873
  return this.canPush() ? n.send() : (n.startTimeout(), this.pushBuffer.push(n)), n;
1874
1874
  }
1875
1875
  leave(i = this.timeout) {
1876
- this.rejoinTimer.reset(), this.joinPush.cancelTimeout(), this.state = Oe.leaving;
1876
+ this.rejoinTimer.reset(), this.joinPush.cancelTimeout(), this.state = Le.leaving;
1877
1877
  let e = () => {
1878
1878
  this.socket.hasLogger() && this.socket.log("channel", `leave ${this.topic}`), this.trigger(yt.close, "leave");
1879
1879
  }, t = new un(this, yt.leave, Bi({}), i);
@@ -1889,7 +1889,7 @@ var Bi = (i) => typeof i == "function" ? i : function() {
1889
1889
  return this.joinPush.ref;
1890
1890
  }
1891
1891
  rejoin(i = this.timeout) {
1892
- this.isLeaving() || (this.socket.leaveOpenTopic(this.topic), this.state = Oe.joining, this.joinPush.resend(i));
1892
+ this.isLeaving() || (this.socket.leaveOpenTopic(this.topic), this.state = Le.joining, this.joinPush.resend(i));
1893
1893
  }
1894
1894
  trigger(i, e, t, n) {
1895
1895
  let s = this.onMessage(i, e, t, n);
@@ -1903,19 +1903,19 @@ var Bi = (i) => typeof i == "function" ? i : function() {
1903
1903
  return `chan_reply_${i}`;
1904
1904
  }
1905
1905
  isClosed() {
1906
- return this.state === Oe.closed;
1906
+ return this.state === Le.closed;
1907
1907
  }
1908
1908
  isErrored() {
1909
- return this.state === Oe.errored;
1909
+ return this.state === Le.errored;
1910
1910
  }
1911
1911
  isJoined() {
1912
- return this.state === Oe.joined;
1912
+ return this.state === Le.joined;
1913
1913
  }
1914
1914
  isJoining() {
1915
- return this.state === Oe.joining;
1915
+ return this.state === Le.joining;
1916
1916
  }
1917
1917
  isLeaving() {
1918
- return this.state === Oe.leaving;
1918
+ return this.state === Le.leaving;
1919
1919
  }
1920
1920
  }, Rn = class {
1921
1921
  static request(i, e, t, n, s, r, a) {
@@ -2423,7 +2423,7 @@ var zs;
2423
2423
  } : function(v, y) {
2424
2424
  return v[y];
2425
2425
  }
2426
- }, d = Object.getPrototypeOf(Function), h = typeof process == "object" && process.env && process.env.REFLECT_METADATA_USE_MAP_POLYFILL === "true", f = !h && typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map : Lo(), p = !h && typeof Set == "function" && typeof Set.prototype.entries == "function" ? Set : No(), b = !h && typeof WeakMap == "function" ? WeakMap : Do(), T = new b();
2426
+ }, d = Object.getPrototypeOf(Function), h = typeof process == "object" && process.env && process.env.REFLECT_METADATA_USE_MAP_POLYFILL === "true", f = !h && typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map : No(), p = !h && typeof Set == "function" && typeof Set.prototype.entries == "function" ? Set : xo(), b = !h && typeof WeakMap == "function" ? WeakMap : Do(), T = new b();
2427
2427
  function w(v, y, S, E) {
2428
2428
  if (Z(S)) {
2429
2429
  if (!Bs(v))
@@ -2480,7 +2480,7 @@ var zs;
2480
2480
  function ae(v, y, S) {
2481
2481
  if (!ie(y))
2482
2482
  throw new TypeError();
2483
- return Z(S) || (S = vt(S)), A(v, y, S);
2483
+ return Z(S) || (S = vt(S)), O(v, y, S);
2484
2484
  }
2485
2485
  e("getOwnMetadata", ae);
2486
2486
  function q(v, y) {
@@ -2492,10 +2492,10 @@ var zs;
2492
2492
  function K(v, y) {
2493
2493
  if (!ie(v))
2494
2494
  throw new TypeError();
2495
- return Z(y) || (y = vt(y)), xe(v, y);
2495
+ return Z(y) || (y = vt(y)), Ae(v, y);
2496
2496
  }
2497
2497
  e("getOwnMetadataKeys", K);
2498
- function x(v, y, S) {
2498
+ function A(v, y, S) {
2499
2499
  if (!ie(y))
2500
2500
  throw new TypeError();
2501
2501
  Z(S) || (S = vt(S));
@@ -2512,7 +2512,7 @@ var zs;
2512
2512
  var D = T.get(y);
2513
2513
  return D.delete(S), D.size > 0 || T.delete(y), !0;
2514
2514
  }
2515
- e("deleteMetadata", x);
2515
+ e("deleteMetadata", A);
2516
2516
  function F(v, y) {
2517
2517
  for (var S = v.length - 1; S >= 0; --S) {
2518
2518
  var E = v[S], D = E(y);
@@ -2569,12 +2569,12 @@ var zs;
2569
2569
  function an(v, y, S) {
2570
2570
  var E = di(v, y, S);
2571
2571
  if (E)
2572
- return A(v, y, S);
2572
+ return O(v, y, S);
2573
2573
  var D = jn(y);
2574
2574
  if (!gt(D))
2575
2575
  return an(v, D, S);
2576
2576
  }
2577
- function A(v, y, S) {
2577
+ function O(v, y, S) {
2578
2578
  var E = Ie(
2579
2579
  y,
2580
2580
  S,
@@ -2594,7 +2594,7 @@ var zs;
2594
2594
  D.set(v, y);
2595
2595
  }
2596
2596
  function ce(v, y) {
2597
- var S = xe(v, y), E = jn(v);
2597
+ var S = Ae(v, y), E = jn(v);
2598
2598
  if (E === null)
2599
2599
  return S;
2600
2600
  var D = ce(E, y);
@@ -2612,7 +2612,7 @@ var zs;
2612
2612
  }
2613
2613
  return B;
2614
2614
  }
2615
- function xe(v, y) {
2615
+ function Ae(v, y) {
2616
2616
  var S = [], E = Ie(
2617
2617
  v,
2618
2618
  y,
@@ -2622,15 +2622,15 @@ var zs;
2622
2622
  if (Z(E))
2623
2623
  return S;
2624
2624
  for (var D = E.keys(), de = Io(D), B = 0; ; ) {
2625
- var J = Ao(de);
2625
+ var J = Oo(de);
2626
2626
  if (!J)
2627
2627
  return S.length = B, S;
2628
- var U = xo(J);
2628
+ var U = Ao(J);
2629
2629
  try {
2630
2630
  S[B] = U;
2631
2631
  } catch (H) {
2632
2632
  try {
2633
- Oo(de);
2633
+ Lo(de);
2634
2634
  } finally {
2635
2635
  throw H;
2636
2636
  }
@@ -2638,7 +2638,7 @@ var zs;
2638
2638
  B++;
2639
2639
  }
2640
2640
  }
2641
- function Ae(v) {
2641
+ function Oe(v) {
2642
2642
  if (v === null)
2643
2643
  return 1;
2644
2644
  switch (typeof v) {
@@ -2671,7 +2671,7 @@ var zs;
2671
2671
  return typeof v == "object" ? v !== null : typeof v == "function";
2672
2672
  }
2673
2673
  function Jn(v, y) {
2674
- switch (Ae(v)) {
2674
+ switch (Oe(v)) {
2675
2675
  case 0:
2676
2676
  return v;
2677
2677
  case 1:
@@ -2748,7 +2748,7 @@ var zs;
2748
2748
  return typeof v == "function";
2749
2749
  }
2750
2750
  function _o(v) {
2751
- switch (Ae(v)) {
2751
+ switch (Oe(v)) {
2752
2752
  case 3:
2753
2753
  return !0;
2754
2754
  case 4:
@@ -2774,14 +2774,14 @@ var zs;
2774
2774
  throw new TypeError();
2775
2775
  return S;
2776
2776
  }
2777
- function xo(v) {
2777
+ function Ao(v) {
2778
2778
  return v.value;
2779
2779
  }
2780
- function Ao(v) {
2780
+ function Oo(v) {
2781
2781
  var y = v.next();
2782
2782
  return y.done ? !1 : y;
2783
2783
  }
2784
- function Oo(v) {
2784
+ function Lo(v) {
2785
2785
  var y = v.return;
2786
2786
  y && y.call(v);
2787
2787
  }
@@ -2795,7 +2795,7 @@ var zs;
2795
2795
  var D = E.constructor;
2796
2796
  return typeof D != "function" || D === v ? y : D;
2797
2797
  }
2798
- function Lo() {
2798
+ function No() {
2799
2799
  var v = {}, y = [], S = (
2800
2800
  /** @class */
2801
2801
  function() {
@@ -2891,7 +2891,7 @@ var zs;
2891
2891
  return [B, J];
2892
2892
  }
2893
2893
  }
2894
- function No() {
2894
+ function xo() {
2895
2895
  return (
2896
2896
  /** @class */
2897
2897
  function() {
@@ -3069,8 +3069,8 @@ var Qr = { exports: {} };
3069
3069
  w = w ?? "WARN";
3070
3070
  var j = "loglevel";
3071
3071
  typeof T == "string" ? j += ":" + T : typeof T == "symbol" && (j = void 0);
3072
- function he(x) {
3073
- var F = (s[x] || "silent").toUpperCase();
3072
+ function he(A) {
3073
+ var F = (s[A] || "silent").toUpperCase();
3074
3074
  if (!(typeof window === t || !j)) {
3075
3075
  try {
3076
3076
  window.localStorage[j] = F;
@@ -3084,19 +3084,19 @@ var Qr = { exports: {} };
3084
3084
  }
3085
3085
  }
3086
3086
  function ae() {
3087
- var x;
3087
+ var A;
3088
3088
  if (!(typeof window === t || !j)) {
3089
3089
  try {
3090
- x = window.localStorage[j];
3090
+ A = window.localStorage[j];
3091
3091
  } catch {
3092
3092
  }
3093
- if (typeof x === t)
3093
+ if (typeof A === t)
3094
3094
  try {
3095
3095
  var F = window.document.cookie, fe = F.indexOf(encodeURIComponent(j) + "=");
3096
- fe !== -1 && (x = /^([^;]+)/.exec(F.slice(fe))[1]);
3096
+ fe !== -1 && (A = /^([^;]+)/.exec(F.slice(fe))[1]);
3097
3097
  } catch {
3098
3098
  }
3099
- return M.levels[x] === void 0 && (x = void 0), x;
3099
+ return M.levels[A] === void 0 && (A = void 0), A;
3100
3100
  }
3101
3101
  }
3102
3102
  function q() {
@@ -3121,20 +3121,20 @@ var Qr = { exports: {} };
3121
3121
  SILENT: 5
3122
3122
  }, M.methodFactory = _ || d, M.getLevel = function() {
3123
3123
  return Q;
3124
- }, M.setLevel = function(x, F) {
3125
- if (typeof x == "string" && M.levels[x.toUpperCase()] !== void 0 && (x = M.levels[x.toUpperCase()]), typeof x == "number" && x >= 0 && x <= M.levels.SILENT) {
3126
- if (Q = x, F !== !1 && he(x), c.call(M, x, T), typeof console === t && x < M.levels.SILENT)
3124
+ }, M.setLevel = function(A, F) {
3125
+ if (typeof A == "string" && M.levels[A.toUpperCase()] !== void 0 && (A = M.levels[A.toUpperCase()]), typeof A == "number" && A >= 0 && A <= M.levels.SILENT) {
3126
+ if (Q = A, F !== !1 && he(A), c.call(M, A, T), typeof console === t && A < M.levels.SILENT)
3127
3127
  return "No console available for logging";
3128
3128
  } else
3129
- throw "log.setLevel() called with invalid level: " + x;
3130
- }, M.setDefaultLevel = function(x) {
3131
- w = x, ae() || M.setLevel(x, !1);
3129
+ throw "log.setLevel() called with invalid level: " + A;
3130
+ }, M.setDefaultLevel = function(A) {
3131
+ w = A, ae() || M.setLevel(A, !1);
3132
3132
  }, M.resetLevel = function() {
3133
3133
  M.setLevel(w, !1), q();
3134
- }, M.enableAll = function(x) {
3135
- M.setLevel(M.levels.TRACE, x);
3136
- }, M.disableAll = function(x) {
3137
- M.setLevel(M.levels.SILENT, x);
3134
+ }, M.enableAll = function(A) {
3135
+ M.setLevel(M.levels.TRACE, A);
3136
+ }, M.disableAll = function(A) {
3137
+ M.setLevel(M.levels.SILENT, A);
3138
3138
  };
3139
3139
  var K = ae();
3140
3140
  K == null && (K = w), M.setLevel(K, !1);
@@ -3411,10 +3411,10 @@ function Ks(i) {
3411
3411
  const c = Number(i.slice(a, o));
3412
3412
  s *= t, n = n * t + c, n >= vn && (s = s + (n / vn | 0), n = n % vn);
3413
3413
  }
3414
- return r(-24, -18), r(-18, -12), r(-12, -6), r(-6), e ? aa(n, s) : As(n, s);
3414
+ return r(-24, -18), r(-18, -12), r(-12, -6), r(-6), e ? aa(n, s) : Os(n, s);
3415
3415
  }
3416
3416
  function Cu(i, e) {
3417
- let t = As(i, e);
3417
+ let t = Os(i, e);
3418
3418
  const n = t.hi & 2147483648;
3419
3419
  n && (t = aa(t.lo, t.hi));
3420
3420
  const s = ra(t.lo, t.hi);
@@ -3437,14 +3437,14 @@ function wu(i, e) {
3437
3437
  hi: e >>> 0
3438
3438
  };
3439
3439
  }
3440
- function As(i, e) {
3440
+ function Os(i, e) {
3441
3441
  return {
3442
3442
  lo: i | 0,
3443
3443
  hi: e | 0
3444
3444
  };
3445
3445
  }
3446
3446
  function aa(i, e) {
3447
- return e = ~e, i ? i = ~i + 1 : e += 1, As(i, e);
3447
+ return e = ~e, i ? i = ~i + 1 : e += 1, Os(i, e);
3448
3448
  }
3449
3449
  const Ys = (i) => {
3450
3450
  const e = String(i);
@@ -3946,13 +3946,13 @@ const pi = Symbol("@bufbuild/protobuf/unknown-fields"), Qs = {
3946
3946
  function Iu(i) {
3947
3947
  return i ? Object.assign(Object.assign({}, Qs), i) : Qs;
3948
3948
  }
3949
- function xu(i) {
3949
+ function Au(i) {
3950
3950
  return i ? Object.assign(Object.assign({}, Zs), i) : Zs;
3951
3951
  }
3952
- function Au() {
3952
+ function Ou() {
3953
3953
  return {
3954
3954
  makeReadOptions: Iu,
3955
- makeWriteOptions: xu,
3955
+ makeWriteOptions: Au,
3956
3956
  listUnknownFields(i) {
3957
3957
  var e;
3958
3958
  return (e = i[pi]) !== null && e !== void 0 ? e : [];
@@ -4004,7 +4004,7 @@ function Au() {
4004
4004
  d ? u[h].push(yn(e, new p(), n)) : u[h] instanceof I ? yn(e, u[h], n) : (u[h] = yn(e, new p(), n), p.fieldWrapper && !c.oneof && !c.repeated && (u[h] = p.fieldWrapper.unwrapField(u[h])));
4005
4005
  break;
4006
4006
  case "map":
4007
- let [b, T] = Ou(c, e, n);
4007
+ let [b, T] = Lu(c, e, n);
4008
4008
  u[h][b] = T;
4009
4009
  break;
4010
4010
  }
@@ -4015,7 +4015,7 @@ function Au() {
4015
4015
  function yn(i, e, t) {
4016
4016
  return e.getType().runtime.bin.readMessage(e, i, i.uint32(), t), e;
4017
4017
  }
4018
- function Ou(i, e, t) {
4018
+ function Lu(i, e, t) {
4019
4019
  const n = e.uint32(), s = e.pos + n;
4020
4020
  let r, a;
4021
4021
  for (; e.pos < s; ) {
@@ -4091,7 +4091,7 @@ function ji(i, e) {
4091
4091
  return i.sint32();
4092
4092
  }
4093
4093
  }
4094
- function Lu(i, e, t, n, s) {
4094
+ function Nu(i, e, t, n, s) {
4095
4095
  i.tag(t.no, se.LengthDelimited), i.fork();
4096
4096
  let r = n;
4097
4097
  switch (t.K) {
@@ -4129,7 +4129,7 @@ function Vi(i, e, t, n, s) {
4129
4129
  let [r, a, o] = oa(e, n);
4130
4130
  (!o || s) && i.tag(t, r)[a](n);
4131
4131
  }
4132
- function Nu(i, e, t, n) {
4132
+ function xu(i, e, t, n) {
4133
4133
  if (!n.length)
4134
4134
  return;
4135
4135
  i.tag(t, se.LengthDelimited).fork();
@@ -4139,7 +4139,7 @@ function Nu(i, e, t, n) {
4139
4139
  i.join();
4140
4140
  }
4141
4141
  function Du() {
4142
- return Object.assign(Object.assign({}, Au()), {
4142
+ return Object.assign(Object.assign({}, Ou()), {
4143
4143
  writeMessage(i, e, t) {
4144
4144
  const n = i.getType();
4145
4145
  for (const s of n.fields.byNumber()) {
@@ -4157,7 +4157,7 @@ function Du() {
4157
4157
  let c = s.kind == "enum" ? k.INT32 : s.T;
4158
4158
  if (a)
4159
4159
  if (s.packed)
4160
- Nu(e, c, s.no, r);
4160
+ xu(e, c, s.no, r);
4161
4161
  else
4162
4162
  for (const u of r)
4163
4163
  Vi(e, c, s.no, u, !0);
@@ -4173,7 +4173,7 @@ function Du() {
4173
4173
  break;
4174
4174
  case "map":
4175
4175
  for (const [u, d] of Object.entries(r))
4176
- Lu(e, t, s, u, d);
4176
+ Nu(e, t, s, u, d);
4177
4177
  break;
4178
4178
  }
4179
4179
  }
@@ -4621,7 +4621,7 @@ function ju() {
4621
4621
  continue;
4622
4622
  const c = n.findField(o);
4623
4623
  let u = a[s].value;
4624
- c && c.kind == "message" && !(u instanceof c.T) ? u = new c.T(u) : c && c.kind === "scalar" && c.T === k.BYTES && (u = xi(u)), r[s] = {
4624
+ c && c.kind == "message" && !(u instanceof c.T) ? u = new c.T(u) : c && c.kind === "scalar" && c.T === k.BYTES && (u = Ai(u)), r[s] = {
4625
4625
  case: o,
4626
4626
  value: u
4627
4627
  };
@@ -4629,7 +4629,7 @@ function ju() {
4629
4629
  case "scalar":
4630
4630
  case "enum":
4631
4631
  let d = a[s];
4632
- n.T === k.BYTES && (d = n.repeated ? d.map(xi) : xi(d)), r[s] = d;
4632
+ n.T === k.BYTES && (d = n.repeated ? d.map(Ai) : Ai(d)), r[s] = d;
4633
4633
  break;
4634
4634
  case "map":
4635
4635
  switch (n.V.kind) {
@@ -4637,7 +4637,7 @@ function ju() {
4637
4637
  case "enum":
4638
4638
  if (n.V.T === k.BYTES)
4639
4639
  for (const [p, b] of Object.entries(a[s]))
4640
- r[s][p] = xi(b);
4640
+ r[s][p] = Ai(b);
4641
4641
  else
4642
4642
  Object.assign(r[s], a[s]);
4643
4643
  break;
@@ -4656,7 +4656,7 @@ function ju() {
4656
4656
  r[s] = a[s].map((f) => f instanceof h ? f : new h(f));
4657
4657
  else if (a[s] !== void 0) {
4658
4658
  const f = a[s];
4659
- h.fieldWrapper ? /* We can't use BytesValue.typeName as that will create a circular import */ h.typeName === "google.protobuf.BytesValue" ? r[s] = xi(f) : r[s] = f : r[s] = f instanceof h ? f : new h(f);
4659
+ h.fieldWrapper ? /* We can't use BytesValue.typeName as that will create a circular import */ h.typeName === "google.protobuf.BytesValue" ? r[s] = Ai(f) : r[s] = f : r[s] = f instanceof h ? f : new h(f);
4660
4660
  }
4661
4661
  break;
4662
4662
  }
@@ -4751,7 +4751,7 @@ function ln(i) {
4751
4751
  }
4752
4752
  return i;
4753
4753
  }
4754
- function xi(i) {
4754
+ function Ai(i) {
4755
4755
  return i instanceof Uint8Array ? i : new Uint8Array(i);
4756
4756
  }
4757
4757
  class Vu {
@@ -6505,7 +6505,7 @@ Xt.fields = l.util.newFieldList(() => [{
6505
6505
  T: 5
6506
6506
  /* ScalarType.INT32 */
6507
6507
  }]);
6508
- const Ai = 7e3, Xu = [0, 300, 2 * 2 * 300, 3 * 3 * 300, 4 * 4 * 300, Ai, Ai, Ai, Ai, Ai];
6508
+ const Oi = 7e3, Xu = [0, 300, 2 * 2 * 300, 3 * 3 * 300, 4 * 4 * 300, Oi, Oi, Oi, Oi, Oi];
6509
6509
  class Qu {
6510
6510
  constructor(e) {
6511
6511
  this._retryDelays = e !== void 0 ? [...e] : Xu;
@@ -6576,7 +6576,7 @@ function gi(i) {
6576
6576
  }, a);
6577
6577
  }
6578
6578
  }
6579
- var Os = { exports: {} }, bi = typeof Reflect == "object" ? Reflect : null, sr = bi && typeof bi.apply == "function" ? bi.apply : function(e, t, n) {
6579
+ var Ls = { exports: {} }, bi = typeof Reflect == "object" ? Reflect : null, sr = bi && typeof bi.apply == "function" ? bi.apply : function(e, t, n) {
6580
6580
  return Function.prototype.apply.call(e, t, n);
6581
6581
  }, bn;
6582
6582
  bi && typeof bi.ownKeys == "function" ? bn = bi.ownKeys : Object.getOwnPropertySymbols ? bn = function(e) {
@@ -6593,8 +6593,8 @@ var fa = Number.isNaN || function(e) {
6593
6593
  function X() {
6594
6594
  X.init.call(this);
6595
6595
  }
6596
- Os.exports = X;
6597
- Os.exports.once = nd;
6596
+ Ls.exports = X;
6597
+ Ls.exports.once = nd;
6598
6598
  X.EventEmitter = X;
6599
6599
  X.prototype._events = void 0;
6600
6600
  X.prototype._eventsCount = 0;
@@ -6806,7 +6806,7 @@ function ka(i, e, t, n) {
6806
6806
  else
6807
6807
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof i);
6808
6808
  }
6809
- var mt = Os.exports;
6809
+ var mt = Ls.exports;
6810
6810
  let Ta = !0, Sa = !0;
6811
6811
  function kn(i, e, t) {
6812
6812
  const n = i.match(e);
@@ -6857,7 +6857,7 @@ function Ca() {
6857
6857
  typeof console < "u" && typeof console.log == "function" && console.log.apply(console, arguments);
6858
6858
  }
6859
6859
  }
6860
- function Ls(i, e) {
6860
+ function Ns(i, e) {
6861
6861
  Sa && console.warn(i + " is deprecated, please use " + e + " instead.");
6862
6862
  }
6863
6863
  function od(i) {
@@ -7171,7 +7171,7 @@ function Ia(i) {
7171
7171
  }).then(s, r);
7172
7172
  };
7173
7173
  }
7174
- function xa(i) {
7174
+ function Aa(i) {
7175
7175
  if (!(typeof i == "object" && i.RTCPeerConnection && i.RTCRtpSender && i.RTCRtpReceiver))
7176
7176
  return;
7177
7177
  if (!("getStats" in i.RTCRtpSender.prototype)) {
@@ -7219,7 +7219,7 @@ function xa(i) {
7219
7219
  return e.apply(this, arguments);
7220
7220
  };
7221
7221
  }
7222
- function Aa(i) {
7222
+ function Oa(i) {
7223
7223
  i.RTCPeerConnection.prototype.getLocalStreams = function() {
7224
7224
  return this._shimmedLocalStreams = this._shimmedLocalStreams || {}, Object.keys(this._shimmedLocalStreams).map((a) => this._shimmedLocalStreams[a][0]);
7225
7225
  };
@@ -7254,11 +7254,11 @@ function Aa(i) {
7254
7254
  }), s.apply(this, arguments);
7255
7255
  };
7256
7256
  }
7257
- function Oa(i, e) {
7257
+ function La(i, e) {
7258
7258
  if (!i.RTCPeerConnection)
7259
7259
  return;
7260
7260
  if (i.RTCPeerConnection.prototype.addTrack && e.version >= 65)
7261
- return Aa(i);
7261
+ return Oa(i);
7262
7262
  const t = i.RTCPeerConnection.prototype.getLocalStreams;
7263
7263
  i.RTCPeerConnection.prototype.getLocalStreams = function() {
7264
7264
  const d = t.apply(this);
@@ -7366,7 +7366,7 @@ function gs(i, e) {
7366
7366
  i.RTCPeerConnection.prototype[t] = s[t];
7367
7367
  });
7368
7368
  }
7369
- function La(i, e) {
7369
+ function Na(i, e) {
7370
7370
  ui(i, "negotiationneeded", (t) => {
7371
7371
  const n = t.target;
7372
7372
  if (!((e.version < 72 || n.getConfiguration && n.getConfiguration().sdpSemantics === "plan-b") && n.signalingState !== "stable"))
@@ -7375,9 +7375,9 @@ function La(i, e) {
7375
7375
  }
7376
7376
  var ur = /* @__PURE__ */ Object.freeze({
7377
7377
  __proto__: null,
7378
- fixNegotiationNeeded: La,
7379
- shimAddTrackRemoveTrack: Oa,
7380
- shimAddTrackRemoveTrackWithNative: Aa,
7378
+ fixNegotiationNeeded: Na,
7379
+ shimAddTrackRemoveTrack: La,
7380
+ shimAddTrackRemoveTrackWithNative: Oa,
7381
7381
  shimGetDisplayMedia: cd,
7382
7382
  shimGetSendersWithDtmf: _a,
7383
7383
  shimGetStats: Ia,
@@ -7385,12 +7385,12 @@ var ur = /* @__PURE__ */ Object.freeze({
7385
7385
  shimMediaStream: Pa,
7386
7386
  shimOnTrack: Ra,
7387
7387
  shimPeerConnection: gs,
7388
- shimSenderReceiverGetStats: xa
7388
+ shimSenderReceiverGetStats: Aa
7389
7389
  });
7390
- function Na(i, e) {
7390
+ function xa(i, e) {
7391
7391
  const t = i && i.navigator, n = i && i.MediaStreamTrack;
7392
7392
  if (t.getUserMedia = function(s, r, a) {
7393
- Ls("navigator.getUserMedia", "navigator.mediaDevices.getUserMedia"), t.mediaDevices.getUserMedia(s).then(r, a);
7393
+ Ns("navigator.getUserMedia", "navigator.mediaDevices.getUserMedia"), t.mediaDevices.getUserMedia(s).then(r, a);
7394
7394
  }, !(e.version > 55 && "autoGainControl" in t.mediaDevices.getSupportedConstraints())) {
7395
7395
  const s = function(a, o, c) {
7396
7396
  o in a && !(c in a) && (a[c] = a[o], delete a[o]);
@@ -7500,7 +7500,7 @@ function Ua(i) {
7500
7500
  }
7501
7501
  function Fa(i) {
7502
7502
  !i.RTCPeerConnection || "removeStream" in i.RTCPeerConnection.prototype || (i.RTCPeerConnection.prototype.removeStream = function(t) {
7503
- Ls("removeStream", "removeTrack"), this.getSenders().forEach((n) => {
7503
+ Ns("removeStream", "removeTrack"), this.getSenders().forEach((n) => {
7504
7504
  n.track && t.getTracks().includes(n.track) && this.removeTrack(n);
7505
7505
  });
7506
7506
  });
@@ -7576,7 +7576,7 @@ var dr = /* @__PURE__ */ Object.freeze({
7576
7576
  shimCreateOffer: Va,
7577
7577
  shimGetDisplayMedia: ud,
7578
7578
  shimGetParameters: ja,
7579
- shimGetUserMedia: Na,
7579
+ shimGetUserMedia: xa,
7580
7580
  shimOnTrack: Da,
7581
7581
  shimPeerConnection: vs,
7582
7582
  shimRTCDataChannel: Ba,
@@ -7695,7 +7695,7 @@ function Ka(i) {
7695
7695
  const r = [];
7696
7696
  for (let a = 0; a < n.iceServers.length; a++) {
7697
7697
  let o = n.iceServers[a];
7698
- o.urls === void 0 && o.url ? (Ls("RTCIceServer.url", "RTCIceServer.urls"), o = JSON.parse(JSON.stringify(o)), o.urls = o.url, delete o.url, r.push(o)) : r.push(n.iceServers[a]);
7698
+ o.urls === void 0 && o.url ? (Ns("RTCIceServer.url", "RTCIceServer.urls"), o = JSON.parse(JSON.stringify(o)), o.urls = o.url, delete o.url, r.push(o)) : r.push(n.iceServers[a]);
7699
7699
  }
7700
7700
  n.iceServers = r;
7701
7701
  }
@@ -8357,12 +8357,12 @@ function hd() {
8357
8357
  return t("Chrome shim is not included in this adapter release."), s;
8358
8358
  if (n.version === null)
8359
8359
  return t("Chrome shim can not determine version, not shimming."), s;
8360
- t("adapter.js shimming chrome."), s.browserShim = ur, wn(i, n), En(i), Ea(i, n), Pa(i), gs(i, n), Ra(i), Oa(i, n), _a(i), Ia(i), xa(i), La(i, n), Tn(i), ys(i), bs(i), Sn(i, n), Cn(i), ks(i, n);
8360
+ t("adapter.js shimming chrome."), s.browserShim = ur, wn(i, n), En(i), Ea(i, n), Pa(i), gs(i, n), Ra(i), La(i, n), _a(i), Ia(i), Aa(i), Na(i, n), Tn(i), ys(i), bs(i), Sn(i, n), Cn(i), ks(i, n);
8361
8361
  break;
8362
8362
  case "firefox":
8363
8363
  if (!dr || !vs || !e.shimFirefox)
8364
8364
  return t("Firefox shim is not included in this adapter release."), s;
8365
- t("adapter.js shimming firefox."), s.browserShim = dr, wn(i, n), En(i), Na(i, n), vs(i, n), Da(i), Fa(i), Ma(i), Ua(i), Ba(i), Ja(i), ja(i), Va(i), $a(i), Tn(i), bs(i), Sn(i, n), Cn(i);
8365
+ t("adapter.js shimming firefox."), s.browserShim = dr, wn(i, n), En(i), xa(i, n), vs(i, n), Da(i), Fa(i), Ma(i), Ua(i), Ba(i), Ja(i), ja(i), Va(i), $a(i), Tn(i), bs(i), Sn(i, n), Cn(i);
8366
8366
  break;
8367
8367
  case "safari":
8368
8368
  if (!lr || !e.shimSafari)
@@ -8575,7 +8575,7 @@ rt.fields = l.util.newFieldList(() => [{
8575
8575
  no: 5,
8576
8576
  name: "update",
8577
8577
  kind: "message",
8578
- T: Ot,
8578
+ T: Lt,
8579
8579
  oneof: "message"
8580
8580
  }, {
8581
8581
  no: 6,
@@ -8599,13 +8599,13 @@ rt.fields = l.util.newFieldList(() => [{
8599
8599
  no: 10,
8600
8600
  name: "speakers_changed",
8601
8601
  kind: "message",
8602
- T: Lt,
8602
+ T: Nt,
8603
8603
  oneof: "message"
8604
8604
  }, {
8605
8605
  no: 11,
8606
8606
  name: "room_update",
8607
8607
  kind: "message",
8608
- T: Nt,
8608
+ T: xt,
8609
8609
  oneof: "message"
8610
8610
  }, {
8611
8611
  no: 12,
@@ -8641,7 +8641,7 @@ rt.fields = l.util.newFieldList(() => [{
8641
8641
  no: 17,
8642
8642
  name: "track_unpublished",
8643
8643
  kind: "message",
8644
- T: At,
8644
+ T: Ot,
8645
8645
  oneof: "message"
8646
8646
  }, {
8647
8647
  no: 18,
@@ -8653,7 +8653,7 @@ rt.fields = l.util.newFieldList(() => [{
8653
8653
  no: 19,
8654
8654
  name: "reconnect",
8655
8655
  kind: "message",
8656
- T: xt,
8656
+ T: At,
8657
8657
  oneof: "message"
8658
8658
  }, {
8659
8659
  no: 20,
@@ -8970,26 +8970,26 @@ It.fields = l.util.newFieldList(() => [{
8970
8970
  T: 12
8971
8971
  /* ScalarType.BYTES */
8972
8972
  }]);
8973
- class xt extends I {
8973
+ class At extends I {
8974
8974
  constructor(e) {
8975
8975
  super(), this.iceServers = [], l.util.initPartial(e, this);
8976
8976
  }
8977
8977
  static fromBinary(e, t) {
8978
- return new xt().fromBinary(e, t);
8978
+ return new At().fromBinary(e, t);
8979
8979
  }
8980
8980
  static fromJson(e, t) {
8981
- return new xt().fromJson(e, t);
8981
+ return new At().fromJson(e, t);
8982
8982
  }
8983
8983
  static fromJsonString(e, t) {
8984
- return new xt().fromJsonString(e, t);
8984
+ return new At().fromJsonString(e, t);
8985
8985
  }
8986
8986
  static equals(e, t) {
8987
- return l.util.equals(xt, e, t);
8987
+ return l.util.equals(At, e, t);
8988
8988
  }
8989
8989
  }
8990
- xt.runtime = l;
8991
- xt.typeName = "livekit.ReconnectResponse";
8992
- xt.fields = l.util.newFieldList(() => [{
8990
+ At.runtime = l;
8991
+ At.typeName = "livekit.ReconnectResponse";
8992
+ At.fields = l.util.newFieldList(() => [{
8993
8993
  no: 1,
8994
8994
  name: "ice_servers",
8995
8995
  kind: "message",
@@ -9032,26 +9032,26 @@ Ge.fields = l.util.newFieldList(() => [{
9032
9032
  kind: "message",
9033
9033
  T: Pe
9034
9034
  }]);
9035
- class At extends I {
9035
+ class Ot extends I {
9036
9036
  constructor(e) {
9037
9037
  super(), this.trackSid = "", l.util.initPartial(e, this);
9038
9038
  }
9039
9039
  static fromBinary(e, t) {
9040
- return new At().fromBinary(e, t);
9040
+ return new Ot().fromBinary(e, t);
9041
9041
  }
9042
9042
  static fromJson(e, t) {
9043
- return new At().fromJson(e, t);
9043
+ return new Ot().fromJson(e, t);
9044
9044
  }
9045
9045
  static fromJsonString(e, t) {
9046
- return new At().fromJsonString(e, t);
9046
+ return new Ot().fromJsonString(e, t);
9047
9047
  }
9048
9048
  static equals(e, t) {
9049
- return l.util.equals(At, e, t);
9049
+ return l.util.equals(Ot, e, t);
9050
9050
  }
9051
9051
  }
9052
- At.runtime = l;
9053
- At.typeName = "livekit.TrackUnpublishedResponse";
9054
- At.fields = l.util.newFieldList(() => [{
9052
+ Ot.runtime = l;
9053
+ Ot.typeName = "livekit.TrackUnpublishedResponse";
9054
+ Ot.fields = l.util.newFieldList(() => [{
9055
9055
  no: 1,
9056
9056
  name: "track_sid",
9057
9057
  kind: "scalar",
@@ -9090,26 +9090,26 @@ Se.fields = l.util.newFieldList(() => [{
9090
9090
  T: 9
9091
9091
  /* ScalarType.STRING */
9092
9092
  }]);
9093
- class Ot extends I {
9093
+ class Lt extends I {
9094
9094
  constructor(e) {
9095
9095
  super(), this.participants = [], l.util.initPartial(e, this);
9096
9096
  }
9097
9097
  static fromBinary(e, t) {
9098
- return new Ot().fromBinary(e, t);
9098
+ return new Lt().fromBinary(e, t);
9099
9099
  }
9100
9100
  static fromJson(e, t) {
9101
- return new Ot().fromJson(e, t);
9101
+ return new Lt().fromJson(e, t);
9102
9102
  }
9103
9103
  static fromJsonString(e, t) {
9104
- return new Ot().fromJsonString(e, t);
9104
+ return new Lt().fromJsonString(e, t);
9105
9105
  }
9106
9106
  static equals(e, t) {
9107
- return l.util.equals(Ot, e, t);
9107
+ return l.util.equals(Lt, e, t);
9108
9108
  }
9109
9109
  }
9110
- Ot.runtime = l;
9111
- Ot.typeName = "livekit.ParticipantUpdate";
9112
- Ot.fields = l.util.newFieldList(() => [{
9110
+ Lt.runtime = l;
9111
+ Lt.typeName = "livekit.ParticipantUpdate";
9112
+ Lt.fields = l.util.newFieldList(() => [{
9113
9113
  no: 1,
9114
9114
  name: "participants",
9115
9115
  kind: "message",
@@ -9348,52 +9348,52 @@ ut.fields = l.util.newFieldList(() => [{
9348
9348
  T: 9
9349
9349
  /* ScalarType.STRING */
9350
9350
  }]);
9351
- class Lt extends I {
9351
+ class Nt extends I {
9352
9352
  constructor(e) {
9353
9353
  super(), this.speakers = [], l.util.initPartial(e, this);
9354
9354
  }
9355
9355
  static fromBinary(e, t) {
9356
- return new Lt().fromBinary(e, t);
9356
+ return new Nt().fromBinary(e, t);
9357
9357
  }
9358
9358
  static fromJson(e, t) {
9359
- return new Lt().fromJson(e, t);
9359
+ return new Nt().fromJson(e, t);
9360
9360
  }
9361
9361
  static fromJsonString(e, t) {
9362
- return new Lt().fromJsonString(e, t);
9362
+ return new Nt().fromJsonString(e, t);
9363
9363
  }
9364
9364
  static equals(e, t) {
9365
- return l.util.equals(Lt, e, t);
9365
+ return l.util.equals(Nt, e, t);
9366
9366
  }
9367
9367
  }
9368
- Lt.runtime = l;
9369
- Lt.typeName = "livekit.SpeakersChanged";
9370
- Lt.fields = l.util.newFieldList(() => [{
9368
+ Nt.runtime = l;
9369
+ Nt.typeName = "livekit.SpeakersChanged";
9370
+ Nt.fields = l.util.newFieldList(() => [{
9371
9371
  no: 1,
9372
9372
  name: "speakers",
9373
9373
  kind: "message",
9374
9374
  T: et,
9375
9375
  repeated: !0
9376
9376
  }]);
9377
- class Nt extends I {
9377
+ class xt extends I {
9378
9378
  constructor(e) {
9379
9379
  super(), l.util.initPartial(e, this);
9380
9380
  }
9381
9381
  static fromBinary(e, t) {
9382
- return new Nt().fromBinary(e, t);
9382
+ return new xt().fromBinary(e, t);
9383
9383
  }
9384
9384
  static fromJson(e, t) {
9385
- return new Nt().fromJson(e, t);
9385
+ return new xt().fromJson(e, t);
9386
9386
  }
9387
9387
  static fromJsonString(e, t) {
9388
- return new Nt().fromJsonString(e, t);
9388
+ return new xt().fromJsonString(e, t);
9389
9389
  }
9390
9390
  static equals(e, t) {
9391
- return l.util.equals(Nt, e, t);
9391
+ return l.util.equals(xt, e, t);
9392
9392
  }
9393
9393
  }
9394
- Nt.runtime = l;
9395
- Nt.typeName = "livekit.RoomUpdate";
9396
- Nt.fields = l.util.newFieldList(() => [{
9394
+ xt.runtime = l;
9395
+ xt.typeName = "livekit.RoomUpdate";
9396
+ xt.fields = l.util.newFieldList(() => [{
9397
9397
  no: 1,
9398
9398
  name: "room",
9399
9399
  kind: "message",
@@ -10051,7 +10051,7 @@ class ne extends Pi {
10051
10051
  super(1, e), this.status = n, this.reason = t;
10052
10052
  }
10053
10053
  }
10054
- class Ns extends Pi {
10054
+ class xs extends Pi {
10055
10055
  constructor(e) {
10056
10056
  super(21, e ?? "device is unsupported");
10057
10057
  }
@@ -10183,7 +10183,7 @@ function kd(i) {
10183
10183
  function hr(i, e) {
10184
10184
  return (i == null ? void 0 : i.toLowerCase().replace(/audio\/|video\//y, "")) === (e == null ? void 0 : e.toLowerCase().replace(/audio\/|video\//y, ""));
10185
10185
  }
10186
- var xn;
10186
+ var An;
10187
10187
  (function(i) {
10188
10188
  i.telephone = {
10189
10189
  maxBitrate: 12e3
@@ -10198,7 +10198,7 @@ var xn;
10198
10198
  }, i.musicHighQualityStereo = {
10199
10199
  maxBitrate: 96e3
10200
10200
  };
10201
- })(xn || (xn = {}));
10201
+ })(An || (An = {}));
10202
10202
  const Xi = {
10203
10203
  h90: new ee(160, 90, 9e4, 20),
10204
10204
  h180: new ee(320, 180, 16e4, 20),
@@ -10231,19 +10231,19 @@ var P;
10231
10231
  (function(i) {
10232
10232
  i.Connected = "connected", i.Reconnecting = "reconnecting", i.Reconnected = "reconnected", i.Disconnected = "disconnected", i.ConnectionStateChanged = "connectionStateChanged", i.StateChanged = "connectionStateChanged", i.MediaDevicesChanged = "mediaDevicesChanged", i.ParticipantConnected = "participantConnected", i.ParticipantDisconnected = "participantDisconnected", i.TrackPublished = "trackPublished", i.TrackSubscribed = "trackSubscribed", i.TrackSubscriptionFailed = "trackSubscriptionFailed", i.TrackUnpublished = "trackUnpublished", i.TrackUnsubscribed = "trackUnsubscribed", i.TrackMuted = "trackMuted", i.TrackUnmuted = "trackUnmuted", i.LocalTrackPublished = "localTrackPublished", i.LocalTrackUnpublished = "localTrackUnpublished", i.LocalAudioSilenceDetected = "localAudioSilenceDetected", i.ActiveSpeakersChanged = "activeSpeakersChanged", i.ParticipantMetadataChanged = "participantMetadataChanged", i.ParticipantNameChanged = "participantNameChanged", i.RoomMetadataChanged = "roomMetadataChanged", i.DataReceived = "dataReceived", i.ConnectionQualityChanged = "connectionQualityChanged", i.TrackStreamStateChanged = "trackStreamStateChanged", i.TrackSubscriptionPermissionChanged = "trackSubscriptionPermissionChanged", i.TrackSubscriptionStatusChanged = "trackSubscriptionStatusChanged", i.AudioPlaybackStatusChanged = "audioPlaybackChanged", i.MediaDevicesError = "mediaDevicesError", i.ParticipantPermissionsChanged = "participantPermissionsChanged", i.SignalConnected = "signalConnected", i.RecordingStatusChanged = "recordingStatusChanged", i.ParticipantEncryptionStatusChanged = "participantEncryptionStatusChanged", i.EncryptionError = "encryptionError", i.DCBufferStatusChanged = "dcBufferStatusChanged", i.ActiveDeviceChanged = "activeDeviceChanged";
10233
10233
  })(P || (P = {}));
10234
- var O;
10234
+ var L;
10235
10235
  (function(i) {
10236
10236
  i.TrackPublished = "trackPublished", i.TrackSubscribed = "trackSubscribed", i.TrackSubscriptionFailed = "trackSubscriptionFailed", i.TrackUnpublished = "trackUnpublished", i.TrackUnsubscribed = "trackUnsubscribed", i.TrackMuted = "trackMuted", i.TrackUnmuted = "trackUnmuted", i.LocalTrackPublished = "localTrackPublished", i.LocalTrackUnpublished = "localTrackUnpublished", i.ParticipantMetadataChanged = "participantMetadataChanged", i.ParticipantNameChanged = "participantNameChanged", i.DataReceived = "dataReceived", i.IsSpeakingChanged = "isSpeakingChanged", i.ConnectionQualityChanged = "connectionQualityChanged", i.TrackStreamStateChanged = "trackStreamStateChanged", i.TrackSubscriptionPermissionChanged = "trackSubscriptionPermissionChanged", i.TrackSubscriptionStatusChanged = "trackSubscriptionStatusChanged", i.MediaDevicesError = "mediaDevicesError", i.ParticipantPermissionsChanged = "participantPermissionsChanged", i.PCTrackAdded = "pcTrackAdded";
10237
- })(O || (O = {}));
10238
- var L;
10237
+ })(L || (L = {}));
10238
+ var N;
10239
10239
  (function(i) {
10240
10240
  i.TransportsCreated = "transportsCreated", i.Connected = "connected", i.Disconnected = "disconnected", i.Resuming = "resuming", i.Resumed = "resumed", i.Restarting = "restarting", i.Restarted = "restarted", i.SignalResumed = "signalResumed", i.SignalRestarted = "signalRestarted", i.Closing = "closing", i.MediaTrackAdded = "mediaTrackAdded", i.ActiveSpeakersUpdate = "activeSpeakersUpdate", i.DataPacketReceived = "dataPacketReceived", i.RTPVideoMapUpdate = "rtpVideoMapUpdate", i.DCBufferStatusChanged = "dcBufferStatusChanged", i.ParticipantUpdate = "participantUpdate", i.RoomUpdate = "roomUpdate", i.SpeakersChanged = "speakersChanged", i.StreamStateChanged = "streamStateChanged", i.ConnectionQualityUpdate = "connectionQualityUpdate", i.SubscriptionError = "subscriptionError", i.SubscriptionPermissionUpdate = "subscriptionPermissionUpdate";
10241
- })(L || (L = {}));
10241
+ })(N || (N = {}));
10242
10242
  var R;
10243
10243
  (function(i) {
10244
10244
  i.Message = "message", i.Muted = "muted", i.Unmuted = "unmuted", i.Restarted = "restarted", i.Ended = "ended", i.Subscribed = "subscribed", i.Unsubscribed = "unsubscribed", i.UpdateSettings = "updateSettings", i.UpdateSubscription = "updateSubscription", i.AudioPlaybackStarted = "audioPlaybackStarted", i.AudioPlaybackFailed = "audioPlaybackFailed", i.AudioSilenceDetected = "audioSilenceDetected", i.VisibilityChanged = "visibilityChanged", i.VideoDimensionsChanged = "videoDimensionsChanged", i.ElementAttached = "elementAttached", i.ElementDetached = "elementDetached", i.UpstreamPaused = "upstreamPaused", i.UpstreamResumed = "upstreamResumed", i.SubscriptionPermissionChanged = "subscriptionPermissionChanged", i.SubscriptionStatusChanged = "subscriptionStatusChanged", i.SubscriptionFailed = "subscriptionFailed";
10245
10245
  })(R || (R = {}));
10246
- const Td = 5e3, Oi = [];
10246
+ const Td = 5e3, Li = [];
10247
10247
  class C extends mt.EventEmitter {
10248
10248
  constructor(e, t) {
10249
10249
  super(), this.attachedElements = [], this.isMuted = !1, this.streamState = C.StreamState.Active, this.isInBackground = !1, this._currentBitrate = 0, this.appVisibilityChangedListener = () => {
@@ -10267,9 +10267,9 @@ class C extends mt.EventEmitter {
10267
10267
  }
10268
10268
  attach(e) {
10269
10269
  let t = "audio";
10270
- this.kind === C.Kind.Video && (t = "video"), this.attachedElements.length === 0 && C.Kind.Video && this.addAppVisibilityListener(), e || (t === "audio" && (Oi.forEach((s) => {
10270
+ this.kind === C.Kind.Video && (t = "video"), this.attachedElements.length === 0 && C.Kind.Video && this.addAppVisibilityListener(), e || (t === "audio" && (Li.forEach((s) => {
10271
10271
  s.parentElement === null && !e && (e = s);
10272
- }), e && Oi.splice(Oi.indexOf(e), 1)), e || (e = document.createElement(t))), this.attachedElements.includes(e) || this.attachedElements.push(e), vi(this.mediaStreamTrack, e);
10272
+ }), e && Li.splice(Li.indexOf(e), 1)), e || (e = document.createElement(t))), this.attachedElements.includes(e) || this.attachedElements.push(e), vi(this.mediaStreamTrack, e);
10273
10273
  const n = e.srcObject.getTracks();
10274
10274
  return n.some((s) => s.kind === "audio") && e.play().then(() => {
10275
10275
  this.emit(R.AudioPlaybackStarted);
@@ -10309,9 +10309,9 @@ class C extends mt.EventEmitter {
10309
10309
  recycleElement(e) {
10310
10310
  if (e instanceof HTMLAudioElement) {
10311
10311
  let t = !0;
10312
- e.pause(), Oi.forEach((n) => {
10312
+ e.pause(), Li.forEach((n) => {
10313
10313
  n.parentElement || (t = !1);
10314
- }), t && Oi.push(e);
10314
+ }), t && Li.push(e);
10315
10315
  }
10316
10316
  }
10317
10317
  handleAppVisibilityChanged() {
@@ -10561,7 +10561,7 @@ const Id = {
10561
10561
  Safari: "15",
10562
10562
  Firefox: "100"
10563
10563
  };
10564
- function xd(i) {
10564
+ function Ad(i) {
10565
10565
  if (!_e() || !("setCodecPreferences" in i))
10566
10566
  return !1;
10567
10567
  const e = Ri();
@@ -10574,7 +10574,7 @@ function Qi() {
10574
10574
  var i;
10575
10575
  return ((i = Ri()) === null || i === void 0 ? void 0 : i.name) === "Firefox";
10576
10576
  }
10577
- function Ad() {
10577
+ function Od() {
10578
10578
  var i;
10579
10579
  return ((i = Ri()) === null || i === void 0 ? void 0 : i.name) === "Chrome";
10580
10580
  }
@@ -10628,22 +10628,22 @@ function oo(i, e) {
10628
10628
  }
10629
10629
  return i === "" && e !== "" ? -1 : e === "" ? 1 : t.length == n.length ? 0 : t.length < n.length ? -1 : 1;
10630
10630
  }
10631
- function Od(i) {
10631
+ function Ld(i) {
10632
10632
  for (const e of i)
10633
10633
  e.target.handleResize(e);
10634
10634
  }
10635
- function Ld(i) {
10635
+ function Nd(i) {
10636
10636
  for (const e of i)
10637
10637
  e.target.handleVisibilityChanged(e);
10638
10638
  }
10639
10639
  let Kn = null;
10640
- const vr = () => (Kn || (Kn = new ResizeObserver(Od)), Kn);
10640
+ const vr = () => (Kn || (Kn = new ResizeObserver(Ld)), Kn);
10641
10641
  let Yn = null;
10642
- const yr = () => (Yn || (Yn = new IntersectionObserver(Ld, {
10642
+ const yr = () => (Yn || (Yn = new IntersectionObserver(Nd, {
10643
10643
  root: null,
10644
10644
  rootMargin: "0px"
10645
10645
  })), Yn);
10646
- function Nd() {
10646
+ function xd() {
10647
10647
  var i;
10648
10648
  const e = new Pt({
10649
10649
  sdk: wi.JS,
@@ -10663,17 +10663,17 @@ function br() {
10663
10663
  throw Error("Could not get empty media stream video track");
10664
10664
  return o.enabled = t, o;
10665
10665
  }
10666
- let Li;
10666
+ let Ni;
10667
10667
  function Xn() {
10668
- if (!Li) {
10668
+ if (!Ni) {
10669
10669
  const i = new AudioContext(), e = i.createOscillator(), t = i.createGain();
10670
10670
  t.gain.setValueAtTime(0, 0);
10671
10671
  const n = i.createMediaStreamDestination();
10672
- if (e.connect(t), t.connect(n), e.start(), [Li] = n.stream.getAudioTracks(), !Li)
10672
+ if (e.connect(t), t.connect(n), e.start(), [Ni] = n.stream.getAudioTracks(), !Ni)
10673
10673
  throw Error("Could not get empty media stream audio track");
10674
- Li.enabled = !1;
10674
+ Ni.enabled = !1;
10675
10675
  }
10676
- return Li.clone();
10676
+ return Ni.clone();
10677
10677
  }
10678
10678
  class co {
10679
10679
  constructor(e, t) {
@@ -10790,7 +10790,7 @@ class Ms {
10790
10790
  }
10791
10791
  connect(e, t, n, s) {
10792
10792
  this.connectOptions = n, e = Md(e), e = e.replace(/\/$/, ""), e += "/rtc";
10793
- const r = Nd(), a = Jd(t, r, n);
10793
+ const r = xd(), a = Jd(t, r, n);
10794
10794
  return new Promise((o, c) => g(this, void 0, void 0, function* () {
10795
10795
  const u = () => g(this, void 0, void 0, function* () {
10796
10796
  this.close(), clearTimeout(d), c(new ne("room connection has been cancelled (signal)"));
@@ -10869,14 +10869,14 @@ class Ms {
10869
10869
  sendOffer(e) {
10870
10870
  m.debug("sending offer", e), this.sendRequest({
10871
10871
  case: "offer",
10872
- value: An(e)
10872
+ value: On(e)
10873
10873
  });
10874
10874
  }
10875
10875
  // answer a server-initiated offer
10876
10876
  sendAnswer(e) {
10877
10877
  return m.debug("sending answer"), this.sendRequest({
10878
10878
  case: "answer",
10879
- value: An(e)
10879
+ value: On(e)
10880
10880
  });
10881
10881
  }
10882
10882
  sendIceCandidate(e, t) {
@@ -11084,7 +11084,7 @@ function Tr(i) {
11084
11084
  }
11085
11085
  return e;
11086
11086
  }
11087
- function An(i) {
11087
+ function On(i) {
11088
11088
  return new Se({
11089
11089
  sdp: i.sdp,
11090
11090
  type: i.type
@@ -11424,7 +11424,7 @@ class Zi extends C {
11424
11424
  this._isUpstreamPaused = !0, this.emit(R.UpstreamPaused, this);
11425
11425
  const t = Ri();
11426
11426
  if ((t == null ? void 0 : t.name) === "Safari" && oo(t.version, "12.0") < 0)
11427
- throw new Ns("pauseUpstream is not supported on Safari < 12.");
11427
+ throw new xs("pauseUpstream is not supported on Safari < 12.");
11428
11428
  yield this.sender.replaceTrack(null);
11429
11429
  } finally {
11430
11430
  e();
@@ -11557,7 +11557,7 @@ class zd extends mt.EventEmitter {
11557
11557
  */
11558
11558
  setup(e) {
11559
11559
  if (!qd())
11560
- throw new Ns("tried to setup end-to-end encryption on an unsupported browser");
11560
+ throw new xs("tried to setup end-to-end encryption on an unsupported browser");
11561
11561
  if (m.info("setting up e2ee"), e !== this.room) {
11562
11562
  this.room = e, this.setupEventListeners(e, this.keyProvider);
11563
11563
  const t = {
@@ -11584,7 +11584,7 @@ class zd extends mt.EventEmitter {
11584
11584
  !e || e.length === 0 ? m.warn("ignoring server sent trailer as it's empty") : this.postSifTrailer(e);
11585
11585
  }
11586
11586
  setupEngine(e) {
11587
- e.on(L.RTPVideoMapUpdate, (t) => {
11587
+ e.on(N.RTPVideoMapUpdate, (t) => {
11588
11588
  this.postRTPMap(t);
11589
11589
  });
11590
11590
  }
@@ -11613,7 +11613,7 @@ class zd extends mt.EventEmitter {
11613
11613
  this.setParticipantCryptorEnabled(this.room.localParticipant.isE2EEEnabled, this.room.localParticipant.identity), t.getKeys().forEach((n) => {
11614
11614
  this.postKey(n);
11615
11615
  });
11616
- }), e.localParticipant.on(O.LocalTrackPublished, (n) => g(this, void 0, void 0, function* () {
11616
+ }), e.localParticipant.on(L.LocalTrackPublished, (n) => g(this, void 0, void 0, function* () {
11617
11617
  this.setupE2EESender(n.track, n.track.sender);
11618
11618
  })), t.on(ti.SetKey, (n) => this.postKey(n)).on(ti.RatchetRequest, (n, s) => this.postRatchetRequest(n, s));
11619
11619
  }
@@ -12326,7 +12326,7 @@ var Qn = ho, Kd = /%[sdv%]/g, Yd = function(i) {
12326
12326
  return "";
12327
12327
  }
12328
12328
  });
12329
- }, Ni = function(i, e, t) {
12329
+ }, xi = function(i, e, t) {
12330
12330
  var n = e.format instanceof Function ? e.format(e.push ? t : t[e.name]) : e.format, s = [i + "=" + n];
12331
12331
  if (e.names)
12332
12332
  for (var r = 0; r < e.names.length; r += 1) {
@@ -12343,15 +12343,15 @@ var Qn = ho, Kd = /%[sdv%]/g, Yd = function(i) {
12343
12343
  var t = e.outerOrder || Xd, n = e.innerOrder || Qd, s = [];
12344
12344
  return t.forEach(function(r) {
12345
12345
  Qn[r].forEach(function(a) {
12346
- a.name in i && i[a.name] != null ? s.push(Ni(r, a, i)) : a.push in i && i[a.push] != null && i[a.push].forEach(function(o) {
12347
- s.push(Ni(r, a, o));
12346
+ a.name in i && i[a.name] != null ? s.push(xi(r, a, i)) : a.push in i && i[a.push] != null && i[a.push].forEach(function(o) {
12347
+ s.push(xi(r, a, o));
12348
12348
  });
12349
12349
  });
12350
12350
  }), i.media.forEach(function(r) {
12351
- s.push(Ni("m", Qn.m[0], r)), n.forEach(function(a) {
12351
+ s.push(xi("m", Qn.m[0], r)), n.forEach(function(a) {
12352
12352
  Qn[a].forEach(function(o) {
12353
- o.name in r && r[o.name] != null ? s.push(Ni(a, o, r)) : o.push in r && r[o.push] != null && r[o.push].forEach(function(c) {
12354
- s.push(Ni(a, o, c));
12353
+ o.name in r && r[o.name] != null ? s.push(xi(a, o, r)) : o.push in r && r[o.push] != null && r[o.push].forEach(function(c) {
12354
+ s.push(xi(a, o, c));
12355
12355
  });
12356
12356
  });
12357
12357
  });
@@ -12382,7 +12382,7 @@ class Rr extends mt.EventEmitter {
12382
12382
  else
12383
12383
  throw s;
12384
12384
  }
12385
- }, 100), this._pc = Ad() ? (
12385
+ }, 100), this._pc = Od() ? (
12386
12386
  // @ts-expect-error chrome allows additional media constraints to be passed into the RTCPeerConnection constructor
12387
12387
  new RTCPeerConnection(e, t)
12388
12388
  ) : new RTCPeerConnection(e);
@@ -12554,8 +12554,8 @@ const sl = {
12554
12554
  /**
12555
12555
  * @deprecated
12556
12556
  */
12557
- audioBitrate: xn.music.maxBitrate,
12558
- audioPreset: xn.music,
12557
+ audioBitrate: An.music.maxBitrate,
12558
+ audioPreset: An.music,
12559
12559
  dtx: !0,
12560
12560
  red: !0,
12561
12561
  forceStereo: !1,
@@ -12582,23 +12582,23 @@ const sl = {
12582
12582
  maxRetries: 1,
12583
12583
  peerConnectionTimeout: 15e3,
12584
12584
  websocketTimeout: 15e3
12585
- }, Ir = "_lossy", xr = "_reliable", al = 2 * 1e3, Ar = "leave-reconnect";
12586
- var Ne;
12585
+ }, Ir = "_lossy", Ar = "_reliable", al = 2 * 1e3, Or = "leave-reconnect";
12586
+ var xe;
12587
12587
  (function(i) {
12588
12588
  i[i.New = 0] = "New", i[i.Connected = 1] = "Connected", i[i.Disconnected = 2] = "Disconnected", i[i.Reconnecting = 3] = "Reconnecting", i[i.Closed = 4] = "Closed";
12589
- })(Ne || (Ne = {}));
12589
+ })(xe || (xe = {}));
12590
12590
  class ol extends mt.EventEmitter {
12591
12591
  get isClosed() {
12592
12592
  return this._isClosed;
12593
12593
  }
12594
12594
  constructor(e) {
12595
- super(), this.options = e, this.rtcConfig = {}, this.peerConnectionTimeout = mo.peerConnectionTimeout, this.fullReconnectOnNext = !1, this.subscriberPrimary = !1, this.pcState = Ne.New, this._isClosed = !0, this.pendingTrackResolvers = {}, this.hasPublished = !1, this.reconnectAttempts = 0, this.reconnectStart = 0, this.attemptingReconnect = !1, this.joinAttempts = 0, this.maxJoinAttempts = 1, this.shouldFailNext = !1, this.handleDataChannel = (t) => {
12595
+ super(), this.options = e, this.rtcConfig = {}, this.peerConnectionTimeout = mo.peerConnectionTimeout, this.fullReconnectOnNext = !1, this.subscriberPrimary = !1, this.pcState = xe.New, this._isClosed = !0, this.pendingTrackResolvers = {}, this.hasPublished = !1, this.reconnectAttempts = 0, this.reconnectStart = 0, this.attemptingReconnect = !1, this.joinAttempts = 0, this.maxJoinAttempts = 1, this.shouldFailNext = !1, this.handleDataChannel = (t) => {
12596
12596
  let {
12597
12597
  channel: n
12598
12598
  } = t;
12599
12599
  return g(this, void 0, void 0, function* () {
12600
12600
  if (n) {
12601
- if (n.label === xr)
12601
+ if (n.label === Ar)
12602
12602
  this.reliableDCSub = n;
12603
12603
  else if (n.label === Ir)
12604
12604
  this.lossyDCSub = n;
@@ -12621,7 +12621,7 @@ class ol extends mt.EventEmitter {
12621
12621
  return;
12622
12622
  }
12623
12623
  const o = Ze.fromBinary(new Uint8Array(a));
12624
- ((n = o.value) === null || n === void 0 ? void 0 : n.case) === "speaker" ? this.emit(L.ActiveSpeakersUpdate, o.value.value.speakers) : ((s = o.value) === null || s === void 0 ? void 0 : s.case) === "user" && this.emit(L.DataPacketReceived, o.value.value, o.kind);
12624
+ ((n = o.value) === null || n === void 0 ? void 0 : n.case) === "speaker" ? this.emit(N.ActiveSpeakersUpdate, o.value.value.speakers) : ((s = o.value) === null || s === void 0 ? void 0 : s.case) === "user" && this.emit(N.DataPacketReceived, o.value.value, o.kind);
12625
12625
  } finally {
12626
12626
  r();
12627
12627
  }
@@ -12642,7 +12642,7 @@ class ol extends mt.EventEmitter {
12642
12642
  return;
12643
12643
  m.warn("".concat(t, " disconnected")), this.reconnectAttempts === 0 && (this.reconnectStart = Date.now());
12644
12644
  const s = (o) => {
12645
- m.warn("could not recover connection after ".concat(this.reconnectAttempts, " attempts, ").concat(o, "ms. giving up")), this.emit(L.Disconnected), this.close();
12645
+ m.warn("could not recover connection after ".concat(this.reconnectAttempts, " attempts, ").concat(o, "ms. giving up")), this.emit(N.Disconnected), this.close();
12646
12646
  }, r = Date.now() - this.reconnectStart;
12647
12647
  let a = this.getNextRetryDelay({
12648
12648
  elapsedMs: r,
@@ -12652,25 +12652,25 @@ class ol extends mt.EventEmitter {
12652
12652
  s(r);
12653
12653
  return;
12654
12654
  }
12655
- t === Ar && (a = 0), m.debug("reconnecting in ".concat(a, "ms")), this.clearReconnectTimeout(), this.token && this.regionUrlProvider && this.regionUrlProvider.updateToken(this.token), this.reconnectTimeout = ve.setTimeout(() => this.attemptReconnect(n), a);
12655
+ t === Or && (a = 0), m.debug("reconnecting in ".concat(a, "ms")), this.clearReconnectTimeout(), this.token && this.regionUrlProvider && this.regionUrlProvider.updateToken(this.token), this.reconnectTimeout = ve.setTimeout(() => this.attemptReconnect(n), a);
12656
12656
  }, this.waitForRestarted = () => new Promise((t, n) => {
12657
- this.pcState === Ne.Connected && t();
12657
+ this.pcState === xe.Connected && t();
12658
12658
  const s = () => {
12659
- this.off(L.Disconnected, r), t();
12659
+ this.off(N.Disconnected, r), t();
12660
12660
  }, r = () => {
12661
- this.off(L.Restarted, s), n();
12661
+ this.off(N.Restarted, s), n();
12662
12662
  };
12663
- this.once(L.Restarted, s), this.once(L.Disconnected, r);
12663
+ this.once(N.Restarted, s), this.once(N.Disconnected, r);
12664
12664
  }), this.updateAndEmitDCBufferStatus = (t) => {
12665
12665
  const n = this.isBufferStatusLow(t);
12666
- typeof n < "u" && n !== this.dcBufferStatus.get(t) && (this.dcBufferStatus.set(t, n), this.emit(L.DCBufferStatusChanged, n, t));
12666
+ typeof n < "u" && n !== this.dcBufferStatus.get(t) && (this.dcBufferStatus.set(t, n), this.emit(N.DCBufferStatusChanged, n, t));
12667
12667
  }, this.isBufferStatusLow = (t) => {
12668
12668
  const n = this.dataChannelForKind(t);
12669
12669
  if (n)
12670
12670
  return n.bufferedAmount <= n.bufferedAmountLowThreshold;
12671
12671
  }, this.handleBrowserOnLine = () => {
12672
12672
  this.client.isReconnecting && (this.clearReconnectTimeout(), this.attemptReconnect(Fe.RR_SIGNAL_DISCONNECTED));
12673
- }, this.client = new Ms(), this.client.signalLatency = this.options.expSignalLatency, this.reconnectPolicy = this.options.reconnectPolicy, this.registerOnLineListener(), this.closingLock = new Wt(), this.dataProcessLock = new Wt(), this.dcBufferStatus = /* @__PURE__ */ new Map([[le.LOSSY, !0], [le.RELIABLE, !0]]), this.client.onParticipantUpdate = (t) => this.emit(L.ParticipantUpdate, t), this.client.onConnectionQuality = (t) => this.emit(L.ConnectionQualityUpdate, t), this.client.onRoomUpdate = (t) => this.emit(L.RoomUpdate, t), this.client.onSubscriptionError = (t) => this.emit(L.SubscriptionError, t), this.client.onSubscriptionPermissionUpdate = (t) => this.emit(L.SubscriptionPermissionUpdate, t), this.client.onSpeakersChanged = (t) => this.emit(L.SpeakersChanged, t), this.client.onStreamStateUpdate = (t) => this.emit(L.StreamStateChanged, t);
12673
+ }, this.client = new Ms(), this.client.signalLatency = this.options.expSignalLatency, this.reconnectPolicy = this.options.reconnectPolicy, this.registerOnLineListener(), this.closingLock = new Wt(), this.dataProcessLock = new Wt(), this.dcBufferStatus = /* @__PURE__ */ new Map([[le.LOSSY, !0], [le.RELIABLE, !0]]), this.client.onParticipantUpdate = (t) => this.emit(N.ParticipantUpdate, t), this.client.onConnectionQuality = (t) => this.emit(N.ConnectionQualityUpdate, t), this.client.onRoomUpdate = (t) => this.emit(N.RoomUpdate, t), this.client.onSubscriptionError = (t) => this.emit(N.SubscriptionError, t), this.client.onSubscriptionPermissionUpdate = (t) => this.emit(N.SubscriptionPermissionUpdate, t), this.client.onSpeakersChanged = (t) => this.emit(N.SpeakersChanged, t), this.client.onStreamStateUpdate = (t) => this.emit(N.StreamStateChanged, t);
12674
12674
  }
12675
12675
  join(e, t, n, s) {
12676
12676
  return g(this, void 0, void 0, function* () {
@@ -12694,7 +12694,7 @@ class ol extends mt.EventEmitter {
12694
12694
  return;
12695
12695
  }
12696
12696
  try {
12697
- this._isClosed = !0, this.emit(L.Closing), this.removeAllListeners(), this.deregisterOnLineListener(), this.clearPendingReconnect(), yield this.cleanupPeerConnections(), yield this.cleanupClient();
12697
+ this._isClosed = !0, this.emit(N.Closing), this.removeAllListeners(), this.deregisterOnLineListener(), this.clearPendingReconnect(), yield this.cleanupPeerConnections(), yield this.cleanupClient();
12698
12698
  } finally {
12699
12699
  e();
12700
12700
  }
@@ -12793,7 +12793,7 @@ class ol extends mt.EventEmitter {
12793
12793
  googDscp: !0
12794
12794
  }]
12795
12795
  };
12796
- this.publisher = new Rr(s, r), this.subscriber = new Rr(s), this.emit(L.TransportsCreated, this.publisher, this.subscriber), this.publisher.pc.onicecandidate = (u) => {
12796
+ this.publisher = new Rr(s, r), this.subscriber = new Rr(s), this.emit(N.TransportsCreated, this.publisher, this.subscriber), this.publisher.pc.onicecandidate = (u) => {
12797
12797
  u.candidate && (m.trace("adding ICE candidate for peer", u.candidate), this.client.sendIceCandidate(u.candidate, Re.PUBLISHER));
12798
12798
  }, this.subscriber.pc.onicecandidate = (u) => {
12799
12799
  u.candidate && this.client.sendIceCandidate(u.candidate, Re.SUBSCRIBER);
@@ -12803,14 +12803,14 @@ class ol extends mt.EventEmitter {
12803
12803
  let a = this.publisher.pc, o = this.subscriber.pc, c = e.subscriberPrimary;
12804
12804
  c && (a = this.subscriber.pc, o = this.publisher.pc, this.subscriber.pc.ondatachannel = this.handleDataChannel), this.primaryPC = a, a.onconnectionstatechange = () => g(this, void 0, void 0, function* () {
12805
12805
  if (m.debug("primary PC state changed ".concat(a.connectionState)), a.connectionState === "connected") {
12806
- const u = this.pcState === Ne.New;
12807
- this.pcState = Ne.Connected, u && this.emit(L.Connected, e);
12806
+ const u = this.pcState === xe.New;
12807
+ this.pcState = xe.Connected, u && this.emit(N.Connected, e);
12808
12808
  } else
12809
- a.connectionState === "failed" && this.pcState === Ne.Connected && (this.pcState = Ne.Disconnected, this.handleDisconnect("primary peerconnection", c ? Fe.RR_SUBSCRIBER_FAILED : Fe.RR_PUBLISHER_FAILED));
12809
+ a.connectionState === "failed" && this.pcState === xe.Connected && (this.pcState = xe.Disconnected, this.handleDisconnect("primary peerconnection", c ? Fe.RR_SUBSCRIBER_FAILED : Fe.RR_PUBLISHER_FAILED));
12810
12810
  }), o.onconnectionstatechange = () => g(this, void 0, void 0, function* () {
12811
12811
  m.debug("secondary PC state changed ".concat(o.connectionState)), o.connectionState === "failed" && this.handleDisconnect("secondary peerconnection", c ? Fe.RR_PUBLISHER_FAILED : Fe.RR_SUBSCRIBER_FAILED);
12812
12812
  }), this.subscriber.pc.ontrack = (u) => {
12813
- this.emit(L.MediaTrackAdded, u.track, u.streams[0], u.receiver);
12813
+ this.emit(N.MediaTrackAdded, u.track, u.streams[0], u.receiver);
12814
12814
  }, this.createDataChannels();
12815
12815
  }
12816
12816
  setupSignalClientCallbacks() {
@@ -12847,7 +12847,7 @@ class ol extends mt.EventEmitter {
12847
12847
  }, this.client.onClose = () => {
12848
12848
  this.handleDisconnect("signal", Fe.RR_SIGNAL_DISCONNECTED);
12849
12849
  }, this.client.onLeave = (e) => {
12850
- e != null && e.canReconnect ? (this.fullReconnectOnNext = !0, this.primaryPC = void 0, this.handleDisconnect(Ar)) : (this.emit(L.Disconnected, e == null ? void 0 : e.reason), this.close()), m.trace("leave request", {
12850
+ e != null && e.canReconnect ? (this.fullReconnectOnNext = !0, this.primaryPC = void 0, this.handleDisconnect(Or)) : (this.emit(N.Disconnected, e == null ? void 0 : e.reason), this.close()), m.trace("leave request", {
12851
12851
  leave: e
12852
12852
  });
12853
12853
  };
@@ -12870,7 +12870,7 @@ class ol extends mt.EventEmitter {
12870
12870
  // will drop older packets that arrive
12871
12871
  ordered: !0,
12872
12872
  maxRetransmits: 0
12873
- }), this.reliableDC = this.publisher.pc.createDataChannel(xr, {
12873
+ }), this.reliableDC = this.publisher.pc.createDataChannel(Ar, {
12874
12874
  ordered: !0
12875
12875
  }), this.lossyDC.onmessage = this.handleDataMessage, this.reliableDC.onmessage = this.handleDataMessage, this.lossyDC.onerror = this.handleDataError, this.reliableDC.onerror = this.handleDataError, this.lossyDC.bufferedAmountLowThreshold = 65535, this.reliableDC.bufferedAmountLowThreshold = 65535, this.lossyDC.onbufferedamountlow = this.handleBufferedAmountLow, this.reliableDC.onbufferedamountlow = this.handleBufferedAmountLow);
12876
12876
  }
@@ -12897,7 +12897,7 @@ class ol extends mt.EventEmitter {
12897
12897
  return;
12898
12898
  }
12899
12899
  r.push(c);
12900
- }), xd(e) && e.setCodecPreferences(r.concat(a, o));
12900
+ }), Ad(e) && e.setCodecPreferences(r.concat(a, o));
12901
12901
  }
12902
12902
  createSender(e, t, n) {
12903
12903
  return g(this, void 0, void 0, function* () {
@@ -12966,7 +12966,7 @@ class ol extends mt.EventEmitter {
12966
12966
  let a = !0;
12967
12967
  r instanceof pe ? (m.debug("received unrecoverable error", {
12968
12968
  error: r
12969
- }), a = !1) : r instanceof fn || (this.fullReconnectOnNext = !0), a ? this.handleDisconnect("reconnect", Fe.RR_UNKNOWN) : (m.info("could not recover connection after ".concat(this.reconnectAttempts, " attempts, ").concat(Date.now() - this.reconnectStart, "ms. giving up")), this.emit(L.Disconnected), yield this.close());
12969
+ }), a = !1) : r instanceof fn || (this.fullReconnectOnNext = !0), a ? this.handleDisconnect("reconnect", Fe.RR_UNKNOWN) : (m.info("could not recover connection after ".concat(this.reconnectAttempts, " attempts, ").concat(Date.now() - this.reconnectStart, "ms. giving up")), this.emit(N.Disconnected), yield this.close());
12970
12970
  } finally {
12971
12971
  this.attemptingReconnect = !1;
12972
12972
  }
@@ -12989,7 +12989,7 @@ class ol extends mt.EventEmitter {
12989
12989
  try {
12990
12990
  if (!this.url || !this.token)
12991
12991
  throw new pe("could not reconnect, url or token not saved");
12992
- m.info("reconnecting, attempt: ".concat(this.reconnectAttempts)), this.emit(L.Restarting), this.client.isConnected && (yield this.client.sendLeave()), yield this.cleanupPeerConnections(), yield this.cleanupClient();
12992
+ m.info("reconnecting, attempt: ".concat(this.reconnectAttempts)), this.emit(N.Restarting), this.client.isConnected && (yield this.client.sendLeave()), yield this.cleanupPeerConnections(), yield this.cleanupClient();
12993
12993
  let r;
12994
12994
  try {
12995
12995
  if (!this.signalOpts)
@@ -13000,7 +13000,7 @@ class ol extends mt.EventEmitter {
13000
13000
  }
13001
13001
  if (this.shouldFailNext)
13002
13002
  throw this.shouldFailNext = !1, new Error("simulated failure");
13003
- this.client.setReconnected(), this.emit(L.SignalRestarted, r), yield this.waitForPCReconnected(), (t = this.regionUrlProvider) === null || t === void 0 || t.resetAttempts(), this.emit(L.Restarted);
13003
+ this.client.setReconnected(), this.emit(N.SignalRestarted, r), yield this.waitForPCReconnected(), (t = this.regionUrlProvider) === null || t === void 0 || t.resetAttempts(), this.emit(N.Restarted);
13004
13004
  } catch (r) {
13005
13005
  const a = yield (n = this.regionUrlProvider) === null || n === void 0 ? void 0 : n.getNextBestRegionUrl();
13006
13006
  if (a) {
@@ -13018,7 +13018,7 @@ class ol extends mt.EventEmitter {
13018
13018
  throw new pe("could not reconnect, url or token not saved");
13019
13019
  if (!this.publisher || !this.subscriber)
13020
13020
  throw new pe("publisher and subscriber connections unset");
13021
- m.info("resuming signal connection, attempt ".concat(this.reconnectAttempts)), this.emit(L.Resuming);
13021
+ m.info("resuming signal connection, attempt ".concat(this.reconnectAttempts)), this.emit(N.Resuming);
13022
13022
  try {
13023
13023
  this.setupSignalClientCallbacks();
13024
13024
  const n = yield this.client.reconnect(this.url, this.token, this.participantSid, e);
@@ -13030,17 +13030,17 @@ class ol extends mt.EventEmitter {
13030
13030
  let s = "";
13031
13031
  throw n instanceof Error && (s = n.message), n instanceof ne && n.reason === 0 ? new pe("could not reconnect, token might be expired") : new fn(s);
13032
13032
  }
13033
- if (this.emit(L.SignalResumed), this.shouldFailNext)
13033
+ if (this.emit(N.SignalResumed), this.shouldFailNext)
13034
13034
  throw this.shouldFailNext = !1, new Error("simulated failure");
13035
13035
  this.subscriber.restartingIce = !0, this.hasPublished && (yield this.publisher.createAndSendOffer({
13036
13036
  iceRestart: !0
13037
- })), yield this.waitForPCReconnected(), this.client.setReconnected(), ((t = this.reliableDC) === null || t === void 0 ? void 0 : t.readyState) === "open" && this.reliableDC.id === null && this.createDataChannels(), this.emit(L.Resumed);
13037
+ })), yield this.waitForPCReconnected(), this.client.setReconnected(), ((t = this.reliableDC) === null || t === void 0 ? void 0 : t.readyState) === "open" && this.reliableDC.id === null && this.createDataChannels(), this.emit(N.Resumed);
13038
13038
  });
13039
13039
  }
13040
13040
  waitForPCInitialConnection(e, t) {
13041
13041
  return g(this, void 0, void 0, function* () {
13042
- if (this.pcState !== Ne.Connected) {
13043
- if (this.pcState !== Ne.New)
13042
+ if (this.pcState !== xe.Connected) {
13043
+ if (this.pcState !== xe.New)
13044
13044
  throw new pe("Expected peer connection to be new on initial connection");
13045
13045
  return new Promise((n, s) => {
13046
13046
  const r = () => {
@@ -13054,9 +13054,9 @@ class ol extends mt.EventEmitter {
13054
13054
  const a = () => {
13055
13055
  ve.clearTimeout(o), t == null || t.signal.removeEventListener("abort", r), n();
13056
13056
  }, o = ve.setTimeout(() => {
13057
- this.off(L.Connected, a), s(new ne("could not establish pc connection"));
13057
+ this.off(N.Connected, a), s(new ne("could not establish pc connection"));
13058
13058
  }, e ?? this.peerConnectionTimeout);
13059
- this.once(L.Connected, a);
13059
+ this.once(N.Connected, a);
13060
13060
  });
13061
13061
  }
13062
13062
  });
@@ -13066,12 +13066,12 @@ class ol extends mt.EventEmitter {
13066
13066
  return g(this, void 0, void 0, function* () {
13067
13067
  const n = Date.now();
13068
13068
  let s = n;
13069
- for (this.pcState = Ne.Reconnecting, m.debug("waiting for peer connection to reconnect"); s - n < this.peerConnectionTimeout && this.primaryPC !== void 0; ) {
13069
+ for (this.pcState = xe.Reconnecting, m.debug("waiting for peer connection to reconnect"); s - n < this.peerConnectionTimeout && this.primaryPC !== void 0; ) {
13070
13070
  if (
13071
13071
  // on Safari, we don't get a connectionstatechanged event during ICE restart
13072
13072
  // this means we'd have to check its status manually and update address
13073
13073
  // manually
13074
- s - n > al && ((e = this.primaryPC) === null || e === void 0 ? void 0 : e.connectionState) === "connected" && (!this.hasPublished || ((t = this.publisher) === null || t === void 0 ? void 0 : t.pc.connectionState) === "connected") && (this.pcState = Ne.Connected), this.pcState === Ne.Connected
13074
+ s - n > al && ((e = this.primaryPC) === null || e === void 0 ? void 0 : e.connectionState) === "connected" && (!this.hasPublished || ((t = this.publisher) === null || t === void 0 ? void 0 : t.pc.connectionState) === "connected") && (this.pcState = xe.Connected), this.pcState === xe.Connected
13075
13075
  )
13076
13076
  return;
13077
13077
  yield si(100), s = Date.now();
@@ -13131,11 +13131,11 @@ class ol extends mt.EventEmitter {
13131
13131
  const n = () => {
13132
13132
  m.debug("engine disconnected while negotiation was ongoing"), r(), e();
13133
13133
  };
13134
- this.isClosed && t("cannot negotiate on closed engine"), this.on(L.Closing, n);
13134
+ this.isClosed && t("cannot negotiate on closed engine"), this.on(N.Closing, n);
13135
13135
  const s = setTimeout(() => {
13136
13136
  t("negotiation timed out"), this.handleDisconnect("negotiation", Fe.RR_SIGNAL_DISCONNECTED);
13137
13137
  }, this.peerConnectionTimeout), r = () => {
13138
- clearTimeout(s), this.off(L.Closing, n);
13138
+ clearTimeout(s), this.off(N.Closing, n);
13139
13139
  };
13140
13140
  this.publisher.once(Si.NegotiationStarted, () => {
13141
13141
  var a;
@@ -13147,7 +13147,7 @@ class ol extends mt.EventEmitter {
13147
13147
  a.forEach((c) => {
13148
13148
  const u = c.codec.toLowerCase();
13149
13149
  Dd(u) && o.set(c.payload, u);
13150
- }), this.emit(L.RTPVideoMapUpdate, o);
13150
+ }), this.emit(N.RTPVideoMapUpdate, o);
13151
13151
  }), this.publisher.negotiate((a) => {
13152
13152
  r(), t(a), a instanceof Ts && (this.fullReconnectOnNext = !0), this.handleDisconnect("negotiation", Fe.RR_UNKNOWN);
13153
13153
  });
@@ -13209,7 +13209,7 @@ function cl(i) {
13209
13209
  }
13210
13210
  class fn extends Error {
13211
13211
  }
13212
- class Or {
13212
+ class Lr {
13213
13213
  constructor(e, t) {
13214
13214
  this.lastUpdateAt = 0, this.settingsCacheTime = 3e3, this.attemptedRegions = [], this.serverUrl = new URL(e), this.token = t;
13215
13215
  }
@@ -13454,7 +13454,7 @@ function vo(i, e, t, n) {
13454
13454
  if (!o)
13455
13455
  return [a];
13456
13456
  let h = [];
13457
- i ? h = (s = Dr(n == null ? void 0 : n.screenShareSimulcastLayers)) !== null && s !== void 0 ? s : Nr(i, d) : h = (r = Dr(n == null ? void 0 : n.videoSimulcastLayers)) !== null && r !== void 0 ? r : Nr(i, d);
13457
+ i ? h = (s = Dr(n == null ? void 0 : n.screenShareSimulcastLayers)) !== null && s !== void 0 ? s : xr(i, d) : h = (r = Dr(n == null ? void 0 : n.videoSimulcastLayers)) !== null && r !== void 0 ? r : xr(i, d);
13458
13458
  let f;
13459
13459
  if (h.length > 0) {
13460
13460
  const p = h[0];
@@ -13467,7 +13467,7 @@ function vo(i, e, t, n) {
13467
13467
  }
13468
13468
  return es(e, t, [d]);
13469
13469
  }
13470
- function Lr(i, e, t) {
13470
+ function Nr(i, e, t) {
13471
13471
  var n, s, r, a;
13472
13472
  if (!t.backupCodec || t.backupCodec.codec === t.videoCodec)
13473
13473
  return;
@@ -13506,7 +13506,7 @@ function vl(i, e, t) {
13506
13506
  const n = e > t ? e / t : t / e;
13507
13507
  return Math.abs(n - 16 / 9) < Math.abs(n - 4 / 3) ? dl : ll;
13508
13508
  }
13509
- function Nr(i, e) {
13509
+ function xr(i, e) {
13510
13510
  if (i)
13511
13511
  return ml(e);
13512
13512
  const {
@@ -14379,7 +14379,7 @@ class bt extends mt.EventEmitter {
14379
14379
  e.Allowed = "allowed", e.NotAllowed = "not_allowed";
14380
14380
  }(i.PermissionStatus || (i.PermissionStatus = {}));
14381
14381
  })(bt || (bt = {}));
14382
- class On extends bt {
14382
+ class Ln extends bt {
14383
14383
  get isUpstreamPaused() {
14384
14384
  var e;
14385
14385
  return (e = this.track) === null || e === void 0 ? void 0 : e.isUpstreamPaused;
@@ -14523,11 +14523,11 @@ class To extends mt.EventEmitter {
14523
14523
  **/
14524
14524
  _setMetadata(e) {
14525
14525
  const t = this.metadata !== e, n = this.metadata;
14526
- this.metadata = e, t && this.emit(O.ParticipantMetadataChanged, n);
14526
+ this.metadata = e, t && this.emit(L.ParticipantMetadataChanged, n);
14527
14527
  }
14528
14528
  _setName(e) {
14529
14529
  const t = this.name !== e;
14530
- this.name = e, t && this.emit(O.ParticipantNameChanged, e);
14530
+ this.name = e, t && this.emit(L.ParticipantNameChanged, e);
14531
14531
  }
14532
14532
  /** @internal */
14533
14533
  setPermissions(e) {
@@ -14536,16 +14536,16 @@ class To extends mt.EventEmitter {
14536
14536
  var h;
14537
14537
  return u !== ((h = this.permissions) === null || h === void 0 ? void 0 : h.canPublishSources[d]);
14538
14538
  });
14539
- return this.permissions = e, c && this.emit(O.ParticipantPermissionsChanged, o), c;
14539
+ return this.permissions = e, c && this.emit(L.ParticipantPermissionsChanged, o), c;
14540
14540
  }
14541
14541
  /** @internal */
14542
14542
  setIsSpeaking(e) {
14543
- e !== this.isSpeaking && (this.isSpeaking = e, e && (this.lastSpokeAt = /* @__PURE__ */ new Date()), this.emit(O.IsSpeakingChanged, e));
14543
+ e !== this.isSpeaking && (this.isSpeaking = e, e && (this.lastSpokeAt = /* @__PURE__ */ new Date()), this.emit(L.IsSpeakingChanged, e));
14544
14544
  }
14545
14545
  /** @internal */
14546
14546
  setConnectionQuality(e) {
14547
14547
  const t = this._connectionQuality;
14548
- this._connectionQuality = kl(e), t !== this._connectionQuality && this.emit(O.ConnectionQualityChanged, this._connectionQuality);
14548
+ this._connectionQuality = kl(e), t !== this._connectionQuality && this.emit(L.ConnectionQualityChanged, this._connectionQuality);
14549
14549
  }
14550
14550
  /**
14551
14551
  * @internal
@@ -14555,9 +14555,9 @@ class To extends mt.EventEmitter {
14555
14555
  }
14556
14556
  addTrackPublication(e) {
14557
14557
  e.on(R.Muted, () => {
14558
- this.emit(O.TrackMuted, e);
14558
+ this.emit(L.TrackMuted, e);
14559
14559
  }), e.on(R.Unmuted, () => {
14560
- this.emit(O.TrackUnmuted, e);
14560
+ this.emit(L.TrackUnmuted, e);
14561
14561
  });
14562
14562
  const t = e;
14563
14563
  switch (t.track && (t.track.sid = e.trackSid), this.tracks.set(e.trackSid, e), e.kind) {
@@ -14726,15 +14726,15 @@ class en extends To {
14726
14726
  n.participantSid = this.sid;
14727
14727
  }), this.signalClient.sendUpdateSubscription(t);
14728
14728
  }), e.on(R.SubscriptionPermissionChanged, (t) => {
14729
- this.emit(O.TrackSubscriptionPermissionChanged, e, t);
14729
+ this.emit(L.TrackSubscriptionPermissionChanged, e, t);
14730
14730
  }), e.on(R.SubscriptionStatusChanged, (t) => {
14731
- this.emit(O.TrackSubscriptionStatusChanged, e, t);
14731
+ this.emit(L.TrackSubscriptionStatusChanged, e, t);
14732
14732
  }), e.on(R.Subscribed, (t) => {
14733
- this.emit(O.TrackSubscribed, t, e);
14733
+ this.emit(L.TrackSubscribed, t, e);
14734
14734
  }), e.on(R.Unsubscribed, (t) => {
14735
- this.emit(O.TrackUnsubscribed, t, e);
14735
+ this.emit(L.TrackUnsubscribed, t, e);
14736
14736
  }), e.on(R.SubscriptionFailed, (t) => {
14737
- this.emit(O.TrackSubscriptionFailed, e.trackSid, t);
14737
+ this.emit(L.TrackSubscriptionFailed, e.trackSid, t);
14738
14738
  });
14739
14739
  }
14740
14740
  getTrack(e) {
@@ -14777,7 +14777,7 @@ class en extends To {
14777
14777
  m.error("could not find published track", {
14778
14778
  participant: this.sid,
14779
14779
  trackSid: t
14780
- }), this.emit(O.TrackSubscriptionFailed, t);
14780
+ }), this.emit(L.TrackSubscriptionFailed, t);
14781
14781
  return;
14782
14782
  }
14783
14783
  a === void 0 && (a = 20), setTimeout(() => {
@@ -14789,7 +14789,7 @@ class en extends To {
14789
14789
  m.error("unable to subscribe because MediaStreamTrack is ended. Do not call MediaStreamTrack.stop()", {
14790
14790
  participant: this.sid,
14791
14791
  trackSid: t
14792
- }), this.emit(O.TrackSubscriptionFailed, t);
14792
+ }), this.emit(L.TrackSubscriptionFailed, t);
14793
14793
  return;
14794
14794
  }
14795
14795
  const c = e.kind === "video";
@@ -14833,7 +14833,7 @@ class en extends To {
14833
14833
  participantSid: this.sid
14834
14834
  }), this.unpublishTrack(s.trackSid, !0));
14835
14835
  }), n.forEach((s) => {
14836
- this.emit(O.TrackPublished, s);
14836
+ this.emit(L.TrackPublished, s);
14837
14837
  }), !0;
14838
14838
  }
14839
14839
  /** @internal */
@@ -14852,7 +14852,7 @@ class en extends To {
14852
14852
  this.videoTracks.delete(e);
14853
14853
  break;
14854
14854
  }
14855
- t && this.emit(O.TrackUnpublished, n);
14855
+ t && this.emit(L.TrackUnpublished, n);
14856
14856
  }
14857
14857
  /**
14858
14858
  * @internal
@@ -15006,7 +15006,7 @@ class Br extends To {
15006
15006
  this.engine = e, this.engine.client.onRemoteMuteChanged = (t, n) => {
15007
15007
  const s = this.tracks.get(t);
15008
15008
  !s || !s.track || (n ? s.mute() : s.unmute());
15009
- }, this.engine.client.onSubscribedQualityUpdate = this.handleSubscribedQualityUpdate, this.engine.client.onLocalTrackUnpublished = this.handleLocalTrackUnpublished, this.engine.on(L.Connected, this.handleReconnected).on(L.SignalRestarted, this.handleReconnected).on(L.SignalResumed, this.handleReconnected).on(L.Restarting, this.handleReconnecting).on(L.Resuming, this.handleReconnecting).on(L.Disconnected, this.handleDisconnected);
15009
+ }, this.engine.client.onSubscribedQualityUpdate = this.handleSubscribedQualityUpdate, this.engine.client.onLocalTrackUnpublished = this.handleLocalTrackUnpublished, this.engine.on(N.Connected, this.handleReconnected).on(N.SignalRestarted, this.handleReconnected).on(N.SignalResumed, this.handleReconnected).on(N.Restarting, this.handleReconnecting).on(N.Resuming, this.handleReconnecting).on(N.Disconnected, this.handleDisconnected);
15010
15010
  }
15011
15011
  /**
15012
15012
  * Sets and updates the metadata of the local participant.
@@ -15058,7 +15058,7 @@ class Br extends To {
15058
15058
  /** @internal */
15059
15059
  setPermissions(e) {
15060
15060
  const t = this.permissions, n = super.setPermissions(e);
15061
- return n && t && this.emit(O.ParticipantPermissionsChanged, t), n;
15061
+ return n && t && this.emit(L.ParticipantPermissionsChanged, t), n;
15062
15062
  }
15063
15063
  /** @internal */
15064
15064
  setE2EEEnabled(e) {
@@ -15113,7 +15113,7 @@ class Br extends To {
15113
15113
  } catch (u) {
15114
15114
  throw c == null || c.forEach((d) => {
15115
15115
  d.stop();
15116
- }), u instanceof Error && !(u instanceof Qe) && this.emit(O.MediaDevicesError, u), u;
15116
+ }), u instanceof Error && !(u instanceof Qe) && this.emit(L.MediaDevicesError, u), u;
15117
15117
  } finally {
15118
15118
  this.pendingPublishing.delete(e);
15119
15119
  }
@@ -15182,7 +15182,7 @@ class Br extends To {
15182
15182
  createScreenTracks(e) {
15183
15183
  return g(this, void 0, void 0, function* () {
15184
15184
  if (e === void 0 && (e = {}), e.resolution === void 0 && (e.resolution = Ds.h1080fps15.resolution), navigator.mediaDevices.getDisplayMedia === void 0)
15185
- throw new Ns("getDisplayMedia not supported");
15185
+ throw new xs("getDisplayMedia not supported");
15186
15186
  const t = wd(e), n = yield navigator.mediaDevices.getDisplayMedia(t), s = n.getVideoTracks();
15187
15187
  if (s.length === 0)
15188
15188
  throw new Qe("no video track found");
@@ -15301,7 +15301,7 @@ class Br extends To {
15301
15301
  if ($i(t.videoCodec) && (t.scalabilityMode = (c = t.scalabilityMode) !== null && c !== void 0 ? c : "L3T3_KEY"), t.videoCodec && t.backupCodec && t.videoCodec !== t.backupCodec.codec) {
15302
15302
  this.roomOptions.dynacast || (this.roomOptions.dynacast = !0);
15303
15303
  const fe = Object.assign({}, t);
15304
- fe.simulcast = !0, he = Lr(e, t.backupCodec.codec, fe), Q.simulcastCodecs = [new Be({
15304
+ fe.simulcast = !0, he = Nr(e, t.backupCodec.codec, fe), Q.simulcastCodecs = [new Be({
15305
15305
  codec: t.videoCodec,
15306
15306
  cid: e.mediaStreamTrack.id,
15307
15307
  enableSimulcastLayers: !0
@@ -15337,8 +15337,8 @@ class Br extends To {
15337
15337
  t = Object.assign({}, t), m.debug("primary codec ".concat(t.videoCodec, " not supported, fallback to ").concat(F.codec)), t.videoCodec = F.codec, t.videoEncoding = F.encoding, j = he;
15338
15338
  }
15339
15339
  }
15340
- const x = new On(e.kind, ae, e);
15341
- if (x.options = t, e.sid = ae.sid, !this.engine.publisher)
15340
+ const A = new Ln(e.kind, ae, e);
15341
+ if (A.options = t, e.sid = ae.sid, !this.engine.publisher)
15342
15342
  throw new pe("publisher is closed");
15343
15343
  if (m.debug("publishing ".concat(e.kind, " with encodings"), {
15344
15344
  encodings: j,
@@ -15362,7 +15362,7 @@ class Br extends To {
15362
15362
  codec: e.codec,
15363
15363
  maxbr: j[0].maxBitrate / 1e3
15364
15364
  });
15365
- return yield this.engine.negotiate(), e instanceof De ? e.startMonitor(this.engine.client) : e instanceof we && e.startMonitor(), this.addTrackPublication(x), this.emit(O.LocalTrackPublished, x), x;
15365
+ return yield this.engine.negotiate(), e instanceof De ? e.startMonitor(this.engine.client) : e instanceof we && e.startMonitor(), this.addTrackPublication(A), this.emit(L.LocalTrackPublished, A), A;
15366
15366
  });
15367
15367
  }
15368
15368
  get isLocal() {
@@ -15381,7 +15381,7 @@ class Br extends To {
15381
15381
  throw new Qe("track is not published");
15382
15382
  if (!(e instanceof De))
15383
15383
  throw new Qe("track is not a video track");
15384
- const a = Object.assign(Object.assign({}, (s = this.roomOptions) === null || s === void 0 ? void 0 : s.publishDefaults), n), o = Lr(e, t, a);
15384
+ const a = Object.assign(Object.assign({}, (s = this.roomOptions) === null || s === void 0 ? void 0 : s.publishDefaults), n), o = Nr(e, t, a);
15385
15385
  if (!o) {
15386
15386
  m.info("backup codec has been disabled, ignoring request to add additional codec for track");
15387
15387
  return;
@@ -15447,12 +15447,12 @@ class Br extends To {
15447
15447
  this.videoTracks.delete(r.trackSid);
15448
15448
  break;
15449
15449
  }
15450
- return this.emit(O.LocalTrackUnpublished, r), r.setTrack(void 0), a && (yield this.engine.negotiate()), r;
15450
+ return this.emit(L.LocalTrackUnpublished, r), r.setTrack(void 0), a && (yield this.engine.negotiate()), r;
15451
15451
  });
15452
15452
  }
15453
15453
  unpublishTracks(e) {
15454
15454
  return g(this, void 0, void 0, function* () {
15455
- return (yield Promise.all(e.map((n) => this.unpublishTrack(n)))).filter((n) => n instanceof On);
15455
+ return (yield Promise.all(e.map((n) => this.unpublishTrack(n)))).filter((n) => n instanceof Ln);
15456
15456
  });
15457
15457
  }
15458
15458
  republishAllTracks(e) {
@@ -15574,7 +15574,7 @@ class Co extends mt.EventEmitter {
15574
15574
  return m.info("already connected to room ".concat(this.name)), c(), Promise.resolve();
15575
15575
  if (this.connectFuture)
15576
15576
  return c(), this.connectFuture.promise;
15577
- this.setAndEmitConnectionState(Y.Connecting), ((o = this.regionUrlProvider) === null || o === void 0 ? void 0 : o.getServerUrl().toString()) !== s && (this.regionUrl = void 0, this.regionUrlProvider = void 0), Es(new URL(s)) && (this.regionUrlProvider === void 0 ? this.regionUrlProvider = new Or(s, r) : this.regionUrlProvider.updateToken(r), this.regionUrlProvider.fetchRegionSettings().catch((h) => {
15577
+ this.setAndEmitConnectionState(Y.Connecting), ((o = this.regionUrlProvider) === null || o === void 0 ? void 0 : o.getServerUrl().toString()) !== s && (this.regionUrl = void 0, this.regionUrlProvider = void 0), Es(new URL(s)) && (this.regionUrlProvider === void 0 ? this.regionUrlProvider = new Lr(s, r) : this.regionUrlProvider.updateToken(r), this.regionUrlProvider.fetchRegionSettings().catch((h) => {
15578
15578
  m.warn("could not fetch region settings", {
15579
15579
  error: h
15580
15580
  });
@@ -15745,7 +15745,7 @@ class Co extends mt.EventEmitter {
15745
15745
  if (!a)
15746
15746
  return;
15747
15747
  const o = a.getTrackPublication(r.trackSid);
15748
- !o || !o.track || (o.track.streamState = C.streamStateFromProto(r.state), a.emit(O.TrackStreamStateChanged, o, o.track.streamState), this.emitWhenConnected(P.TrackStreamStateChanged, o, o.track.streamState, a));
15748
+ !o || !o.track || (o.track.streamState = C.streamStateFromProto(r.state), a.emit(L.TrackStreamStateChanged, o, o.track.streamState), this.emitWhenConnected(P.TrackStreamStateChanged, o, o.track.streamState, a));
15749
15749
  });
15750
15750
  }, this.handleSubscriptionPermissionUpdate = (s) => {
15751
15751
  const r = this.participants.get(s.participantSid);
@@ -15761,7 +15761,7 @@ class Co extends mt.EventEmitter {
15761
15761
  a && a.setSubscriptionError(s.err);
15762
15762
  }, this.handleDataPacket = (s, r) => {
15763
15763
  const a = this.participants.get(s.participantSid);
15764
- this.emit(P.DataReceived, s.payload, a, r, s.topic), a == null || a.emit(O.DataReceived, s.payload, r);
15764
+ this.emit(P.DataReceived, s.payload, a, r, s.topic), a == null || a.emit(L.DataReceived, s.payload, r);
15765
15765
  }, this.handleAudioPlaybackStarted = () => {
15766
15766
  this.canPlaybackAudio || (this.audioEnabled = !0, this.emit(P.AudioPlaybackStatusChanged, !0));
15767
15767
  }, this.handleAudioPlaybackFailed = (s) => {
@@ -15851,17 +15851,17 @@ class Co extends mt.EventEmitter {
15851
15851
  return (t = (e = this.roomInfo) === null || e === void 0 ? void 0 : e.numPublishers) !== null && t !== void 0 ? t : 0;
15852
15852
  }
15853
15853
  maybeCreateEngine() {
15854
- this.engine && !this.engine.isClosed || (this.engine = new ol(this.options), this.engine.on(L.ParticipantUpdate, this.handleParticipantUpdates).on(L.RoomUpdate, this.handleRoomUpdate).on(L.SpeakersChanged, this.handleSpeakersChanged).on(L.StreamStateChanged, this.handleStreamStateUpdate).on(L.ConnectionQualityUpdate, this.handleConnectionQualityUpdate).on(L.SubscriptionError, this.handleSubscriptionError).on(L.SubscriptionPermissionUpdate, this.handleSubscriptionPermissionUpdate).on(L.MediaTrackAdded, (e, t, n) => {
15854
+ this.engine && !this.engine.isClosed || (this.engine = new ol(this.options), this.engine.on(N.ParticipantUpdate, this.handleParticipantUpdates).on(N.RoomUpdate, this.handleRoomUpdate).on(N.SpeakersChanged, this.handleSpeakersChanged).on(N.StreamStateChanged, this.handleStreamStateUpdate).on(N.ConnectionQualityUpdate, this.handleConnectionQualityUpdate).on(N.SubscriptionError, this.handleSubscriptionError).on(N.SubscriptionPermissionUpdate, this.handleSubscriptionPermissionUpdate).on(N.MediaTrackAdded, (e, t, n) => {
15855
15855
  this.onTrackAdded(e, t, n);
15856
- }).on(L.Disconnected, (e) => {
15856
+ }).on(N.Disconnected, (e) => {
15857
15857
  this.handleDisconnect(this.options.stopLocalTrackOnUnpublish, e);
15858
- }).on(L.ActiveSpeakersUpdate, this.handleActiveSpeakersUpdate).on(L.DataPacketReceived, this.handleDataPacket).on(L.Resuming, () => {
15858
+ }).on(N.ActiveSpeakersUpdate, this.handleActiveSpeakersUpdate).on(N.DataPacketReceived, this.handleDataPacket).on(N.Resuming, () => {
15859
15859
  this.clearConnectionReconcile(), this.setAndEmitConnectionState(Y.Reconnecting) && this.emit(P.Reconnecting), this.cachedParticipantSids = Array.from(this.participants.keys());
15860
- }).on(L.Resumed, () => {
15860
+ }).on(N.Resumed, () => {
15861
15861
  this.setAndEmitConnectionState(Y.Connected), this.emit(P.Reconnected), this.registerConnectionReconcile(), this.updateSubscriptions(), Array.from(this.participants.values()).filter((t) => !this.cachedParticipantSids.includes(t.sid)).forEach((t) => this.emit(P.ParticipantConnected, t)), this.cachedParticipantSids = [];
15862
- }).on(L.SignalResumed, () => {
15862
+ }).on(N.SignalResumed, () => {
15863
15863
  this.state === Y.Reconnecting && this.sendSyncState();
15864
- }).on(L.Restarting, this.handleRestarting).on(L.SignalRestarted, this.handleSignalRestarted).on(L.DCBufferStatusChanged, (e, t) => {
15864
+ }).on(N.Restarting, this.handleRestarting).on(N.SignalRestarted, this.handleSignalRestarted).on(N.DCBufferStatusChanged, (e, t) => {
15865
15865
  this.emit(P.DCBufferStatusChanged, e, t);
15866
15866
  }), this.localParticipant && this.localParticipant.setupEngine(this.engine), this.e2eeManager && this.e2eeManager.setupEngine(this.engine));
15867
15867
  }
@@ -15892,7 +15892,7 @@ class Co extends mt.EventEmitter {
15892
15892
  m.debug("prepareConnection to ".concat(e));
15893
15893
  try {
15894
15894
  if (Es(new URL(e)) && t) {
15895
- this.regionUrlProvider = new Or(e, t);
15895
+ this.regionUrlProvider = new Lr(e, t);
15896
15896
  const n = yield this.regionUrlProvider.getNextBestRegionUrl();
15897
15897
  n && this.state === Y.Disconnected && (this.regionUrl = n, yield fetch(kr(n), {
15898
15898
  method: "HEAD"
@@ -16120,7 +16120,7 @@ class Co extends mt.EventEmitter {
16120
16120
  });
16121
16121
  }
16122
16122
  setupLocalParticipantEvents() {
16123
- this.localParticipant.on(O.ParticipantMetadataChanged, this.onLocalParticipantMetadataChanged).on(O.ParticipantNameChanged, this.onLocalParticipantNameChanged).on(O.TrackMuted, this.onLocalTrackMuted).on(O.TrackUnmuted, this.onLocalTrackUnmuted).on(O.LocalTrackPublished, this.onLocalTrackPublished).on(O.LocalTrackUnpublished, this.onLocalTrackUnpublished).on(O.ConnectionQualityChanged, this.onLocalConnectionQualityChanged).on(O.MediaDevicesError, this.onMediaDevicesError).on(O.ParticipantPermissionsChanged, this.onLocalParticipantPermissionsChanged);
16123
+ this.localParticipant.on(L.ParticipantMetadataChanged, this.onLocalParticipantMetadataChanged).on(L.ParticipantNameChanged, this.onLocalParticipantNameChanged).on(L.TrackMuted, this.onLocalTrackMuted).on(L.TrackUnmuted, this.onLocalTrackUnmuted).on(L.LocalTrackPublished, this.onLocalTrackPublished).on(L.LocalTrackUnpublished, this.onLocalTrackUnpublished).on(L.ConnectionQualityChanged, this.onLocalConnectionQualityChanged).on(L.MediaDevicesError, this.onMediaDevicesError).on(L.ParticipantPermissionsChanged, this.onLocalParticipantPermissionsChanged);
16124
16124
  }
16125
16125
  recreateEngine() {
16126
16126
  var e;
@@ -16167,7 +16167,7 @@ class Co extends mt.EventEmitter {
16167
16167
  }), this.localParticipant.tracks.forEach((s) => {
16168
16168
  var r, a;
16169
16169
  s.track && this.localParticipant.unpublishTrack(s.track, e), e && ((r = s.track) === null || r === void 0 || r.detach(), (a = s.track) === null || a === void 0 || a.stop());
16170
- }), this.localParticipant.off(O.ParticipantMetadataChanged, this.onLocalParticipantMetadataChanged).off(O.ParticipantNameChanged, this.onLocalParticipantNameChanged).off(O.TrackMuted, this.onLocalTrackMuted).off(O.TrackUnmuted, this.onLocalTrackUnmuted).off(O.LocalTrackPublished, this.onLocalTrackPublished).off(O.LocalTrackUnpublished, this.onLocalTrackUnpublished).off(O.ConnectionQualityChanged, this.onLocalConnectionQualityChanged).off(O.MediaDevicesError, this.onMediaDevicesError).off(O.ParticipantPermissionsChanged, this.onLocalParticipantPermissionsChanged), this.localParticipant.tracks.clear(), this.localParticipant.videoTracks.clear(), this.localParticipant.audioTracks.clear(), this.participants.clear(), this.activeSpeakers = [], this.audioContext && typeof this.options.expWebAudioMix == "boolean" && (this.audioContext.close(), this.audioContext = void 0), _e() && (window.removeEventListener("beforeunload", this.onPageLeave), window.removeEventListener("pagehide", this.onPageLeave), window.removeEventListener("freeze", this.onPageLeave), (n = navigator.mediaDevices) === null || n === void 0 || n.removeEventListener("devicechange", this.handleDeviceChange));
16170
+ }), this.localParticipant.off(L.ParticipantMetadataChanged, this.onLocalParticipantMetadataChanged).off(L.ParticipantNameChanged, this.onLocalParticipantNameChanged).off(L.TrackMuted, this.onLocalTrackMuted).off(L.TrackUnmuted, this.onLocalTrackUnmuted).off(L.LocalTrackPublished, this.onLocalTrackPublished).off(L.LocalTrackUnpublished, this.onLocalTrackUnpublished).off(L.ConnectionQualityChanged, this.onLocalConnectionQualityChanged).off(L.MediaDevicesError, this.onMediaDevicesError).off(L.ParticipantPermissionsChanged, this.onLocalParticipantPermissionsChanged), this.localParticipant.tracks.clear(), this.localParticipant.videoTracks.clear(), this.localParticipant.audioTracks.clear(), this.participants.clear(), this.activeSpeakers = [], this.audioContext && typeof this.options.expWebAudioMix == "boolean" && (this.audioContext.close(), this.audioContext = void 0), _e() && (window.removeEventListener("beforeunload", this.onPageLeave), window.removeEventListener("pagehide", this.onPageLeave), window.removeEventListener("freeze", this.onPageLeave), (n = navigator.mediaDevices) === null || n === void 0 || n.removeEventListener("devicechange", this.handleDeviceChange));
16171
16171
  } finally {
16172
16172
  this.setAndEmitConnectionState(Y.Disconnected), this.emit(P.Disconnected, t);
16173
16173
  }
@@ -16200,33 +16200,33 @@ class Co extends mt.EventEmitter {
16200
16200
  if (this.participants.has(e))
16201
16201
  return this.participants.get(e);
16202
16202
  const n = this.createParticipant(e, t);
16203
- return this.participants.set(e, n), this.identityToSid.set(t.identity, t.sid), this.emitWhenConnected(P.ParticipantConnected, n), n.on(O.TrackPublished, (s) => {
16203
+ return this.participants.set(e, n), this.identityToSid.set(t.identity, t.sid), this.emitWhenConnected(P.ParticipantConnected, n), n.on(L.TrackPublished, (s) => {
16204
16204
  this.emitWhenConnected(P.TrackPublished, s, n);
16205
- }).on(O.TrackSubscribed, (s, r) => {
16205
+ }).on(L.TrackSubscribed, (s, r) => {
16206
16206
  s.kind === C.Kind.Audio && (s.on(R.AudioPlaybackStarted, this.handleAudioPlaybackStarted), s.on(R.AudioPlaybackFailed, this.handleAudioPlaybackFailed)), this.emit(P.TrackSubscribed, s, r, n);
16207
- }).on(O.TrackUnpublished, (s) => {
16207
+ }).on(L.TrackUnpublished, (s) => {
16208
16208
  this.emit(P.TrackUnpublished, s, n);
16209
- }).on(O.TrackUnsubscribed, (s, r) => {
16209
+ }).on(L.TrackUnsubscribed, (s, r) => {
16210
16210
  this.emit(P.TrackUnsubscribed, s, r, n);
16211
- }).on(O.TrackSubscriptionFailed, (s) => {
16211
+ }).on(L.TrackSubscriptionFailed, (s) => {
16212
16212
  this.emit(P.TrackSubscriptionFailed, s, n);
16213
- }).on(O.TrackMuted, (s) => {
16213
+ }).on(L.TrackMuted, (s) => {
16214
16214
  this.emitWhenConnected(P.TrackMuted, s, n);
16215
- }).on(O.TrackUnmuted, (s) => {
16215
+ }).on(L.TrackUnmuted, (s) => {
16216
16216
  this.emitWhenConnected(P.TrackUnmuted, s, n);
16217
- }).on(O.ParticipantMetadataChanged, (s) => {
16217
+ }).on(L.ParticipantMetadataChanged, (s) => {
16218
16218
  this.emitWhenConnected(P.ParticipantMetadataChanged, s, n);
16219
- }).on(O.ParticipantNameChanged, (s) => {
16219
+ }).on(L.ParticipantNameChanged, (s) => {
16220
16220
  this.emitWhenConnected(P.ParticipantNameChanged, s, n);
16221
- }).on(O.ConnectionQualityChanged, (s) => {
16221
+ }).on(L.ConnectionQualityChanged, (s) => {
16222
16222
  this.emitWhenConnected(P.ConnectionQualityChanged, s, n);
16223
- }).on(O.ParticipantPermissionsChanged, (s) => {
16223
+ }).on(L.ParticipantPermissionsChanged, (s) => {
16224
16224
  this.emitWhenConnected(P.ParticipantPermissionsChanged, s, n);
16225
- }).on(O.TrackSubscriptionStatusChanged, (s, r) => {
16225
+ }).on(L.TrackSubscriptionStatusChanged, (s, r) => {
16226
16226
  this.emitWhenConnected(P.TrackSubscriptionStatusChanged, s, r, n);
16227
- }).on(O.TrackSubscriptionFailed, (s, r) => {
16227
+ }).on(L.TrackSubscriptionFailed, (s, r) => {
16228
16228
  this.emit(P.TrackSubscriptionFailed, s, n, r);
16229
- }).on(O.TrackSubscriptionPermissionChanged, (s, r) => {
16229
+ }).on(L.TrackSubscriptionPermissionChanged, (s, r) => {
16230
16230
  this.emitWhenConnected(P.TrackSubscriptionPermissionChanged, s, r, n);
16231
16231
  }), t && n.updateInfo(t), n;
16232
16232
  }
@@ -16240,11 +16240,11 @@ class Co extends mt.EventEmitter {
16240
16240
  c.isDesired !== r && a.push(c.trackSid);
16241
16241
  });
16242
16242
  }), this.engine.client.sendSyncState(new ht({
16243
- answer: An({
16243
+ answer: On({
16244
16244
  sdp: n.sdp,
16245
16245
  type: n.type
16246
16246
  }),
16247
- offer: s ? An({
16247
+ offer: s ? On({
16248
16248
  sdp: s.sdp,
16249
16249
  type: s.type
16250
16250
  }) : void 0,
@@ -16326,7 +16326,7 @@ class Co extends mt.EventEmitter {
16326
16326
  identity: "simulated-local",
16327
16327
  name: "local-name"
16328
16328
  })), this.setupLocalParticipantEvents(), this.emit(P.SignalConnected), this.emit(P.Connected), this.setAndEmitConnectionState(Y.Connected), s.video) {
16329
- const a = new On(C.Kind.Video, new Pe({
16329
+ const a = new Ln(C.Kind.Video, new Pe({
16330
16330
  source: re.CAMERA,
16331
16331
  sid: Math.floor(Math.random() * 1e4).toString(),
16332
16332
  type: ge.AUDIO,
@@ -16334,17 +16334,17 @@ class Co extends mt.EventEmitter {
16334
16334
  }), new De(s.useRealTracks ? (yield window.navigator.mediaDevices.getUserMedia({
16335
16335
  video: !0
16336
16336
  })).getVideoTracks()[0] : br((t = 160 * r.aspectRatios[0]) !== null && t !== void 0 ? t : 1, 160, !0, !0)));
16337
- this.localParticipant.addTrackPublication(a), this.localParticipant.emit(O.LocalTrackPublished, a);
16337
+ this.localParticipant.addTrackPublication(a), this.localParticipant.emit(L.LocalTrackPublished, a);
16338
16338
  }
16339
16339
  if (s.audio) {
16340
- const a = new On(C.Kind.Audio, new Pe({
16340
+ const a = new Ln(C.Kind.Audio, new Pe({
16341
16341
  source: re.MICROPHONE,
16342
16342
  sid: Math.floor(Math.random() * 1e4).toString(),
16343
16343
  type: ge.AUDIO
16344
16344
  }), new we(s.useRealTracks ? (yield navigator.mediaDevices.getUserMedia({
16345
16345
  audio: !0
16346
16346
  })).getAudioTracks()[0] : Xn()));
16347
- this.localParticipant.addTrackPublication(a), this.localParticipant.emit(O.LocalTrackPublished, a);
16347
+ this.localParticipant.addTrackPublication(a), this.localParticipant.emit(L.LocalTrackPublished, a);
16348
16348
  }
16349
16349
  for (let a = 0; a < r.count - 1; a += 1) {
16350
16350
  let o = new Me({
@@ -16599,7 +16599,7 @@ class Il extends _i {
16599
16599
  if (s.candidate) {
16600
16600
  const a = new RTCIceCandidate(s);
16601
16601
  let o = "".concat(a.protocol, " ").concat(a.address, ":").concat(a.port, " ").concat(a.type);
16602
- a.address && (xl(a.address) ? o += " (private)" : a.protocol === "tcp" && a.tcpType === "passive" ? (e = !0, o += " (passive)") : a.protocol === "udp" && (t = !0)), this.appendMessage(o);
16602
+ a.address && (Al(a.address) ? o += " (private)" : a.protocol === "tcp" && a.tcpType === "passive" ? (e = !0, o += " (passive)") : a.protocol === "udp" && (t = !0)), this.appendMessage(o);
16603
16603
  }
16604
16604
  n && n(s, r);
16605
16605
  }, this.room.engine.subscriber && (this.room.engine.subscriber.pc.onicecandidateerror = (s) => {
@@ -16615,7 +16615,7 @@ class Il extends _i {
16615
16615
  });
16616
16616
  }
16617
16617
  }
16618
- function xl(i) {
16618
+ function Al(i) {
16619
16619
  const e = i.split(".");
16620
16620
  if (e.length === 4) {
16621
16621
  if (e[0] === "10")
@@ -16630,7 +16630,7 @@ function xl(i) {
16630
16630
  }
16631
16631
  return !1;
16632
16632
  }
16633
- class Al extends _i {
16633
+ class Ol extends _i {
16634
16634
  get description() {
16635
16635
  return "Connecting to signal connection via WebSocket";
16636
16636
  }
@@ -16683,7 +16683,7 @@ class jl extends mt.EventEmitter {
16683
16683
  }
16684
16684
  checkWebsocket() {
16685
16685
  return g(this, void 0, void 0, function* () {
16686
- return this.createAndRunCheck(Al);
16686
+ return this.createAndRunCheck(Ol);
16687
16687
  });
16688
16688
  }
16689
16689
  checkWebRTC() {
@@ -16712,7 +16712,7 @@ class jl extends mt.EventEmitter {
16712
16712
  });
16713
16713
  }
16714
16714
  }
16715
- function Ol() {
16715
+ function Ll() {
16716
16716
  const i = document.createElement("style");
16717
16717
  return i.textContent = `
16718
16718
  * {
@@ -16720,7 +16720,7 @@ function Ol() {
16720
16720
  }
16721
16721
  `, i;
16722
16722
  }
16723
- function Ll() {
16723
+ function Nl() {
16724
16724
  const i = document.createElement("style");
16725
16725
  return i.textContent = `
16726
16726
  * {
@@ -16729,8 +16729,8 @@ function Ll() {
16729
16729
  }
16730
16730
  `, i;
16731
16731
  }
16732
- function Nl(i) {
16733
- Vo(i, "svelte-xrxt5b", '#liveroom-client-element.svelte-xrxt5b.svelte-xrxt5b{font-family:Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}#users-container.svelte-xrxt5b.svelte-xrxt5b{z-index:99999;position:fixed;inset:0;overflow:hidden;pointer-events:none}.user.svelte-xrxt5b.svelte-xrxt5b{z-index:10;position:absolute;top:0;left:0;user-select:none;transform:translate(var(--x), var(--y));transition:transform 100ms linear;will-change:transform}.user.svelte-xrxt5b .cursor.svelte-xrxt5b{position:absolute;top:0;left:0;color:var(--color);transform-origin:top left;transform:rotate(6deg)}.user[data-isself="true"].svelte-xrxt5b .cursor.svelte-xrxt5b{display:none}.user-label.svelte-xrxt5b.svelte-xrxt5b{font-weight:600;color:black;background-color:var(--color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:9999px;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-xrxt5b .user-label.svelte-xrxt5b{display:flex;flex-direction:column;justify-content:center;align-items:center}.user.svelte-xrxt5b .user-label[data-hidevideo="true"].svelte-xrxt5b{position:absolute;top:20px;left:16px}.user.svelte-xrxt5b .user-label[data-hidevideo="false"].svelte-xrxt5b{position:relative;margin:0.5rem 0 0 0.5rem}.user[data-isself="true"].svelte-xrxt5b .user-label.svelte-xrxt5b{display:none}.user-label.svelte-xrxt5b .user-name.svelte-xrxt5b{display:flex;justify-content:center;align-items:center;background-color:var(--color);font-size:0.7rem}.user.svelte-xrxt5b .user-label[data-hidevideo="true"] .user-name.svelte-xrxt5b{padding:0.15rem 0.5rem}.user.svelte-xrxt5b .user-label[data-hidevideo="false"] .user-name.svelte-xrxt5b{position:absolute;inset-inline:0;bottom:-2px;padding:0.15rem 0.5rem 0.35rem 0.5rem}.user.svelte-xrxt5b .user-label #video-container.svelte-xrxt5b{height:7rem;width:7rem;overflow:hidden;display:flex;justify-content:center;align-items:center}.user.svelte-xrxt5b .user-label[data-hidevideo="true"] #video-container.svelte-xrxt5b{display:none}.user.svelte-xrxt5b .user-label #video-container video.svelte-xrxt5b{height:100%;aspect-ratio:16 / 9;transform:scaleX(-1)}.user.svelte-xrxt5b .halo.svelte-xrxt5b{transform:scale(0);z-index:-1;position:absolute;top:-60px;left:-60px;width:120px;height:120px;border-radius:9999px;background-color:var(--color);opacity:0.25;transition:transform 100ms ease-out;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-xrxt5b .halo[data-show="true"].svelte-xrxt5b{transform:scale(1)}');
16732
+ function xl(i) {
16733
+ Vo(i, "svelte-uiimm6", '#liveroom-client-element.svelte-uiimm6.svelte-uiimm6{font-family:Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}#users-container.svelte-uiimm6.svelte-uiimm6{z-index:99999;position:fixed;inset:0;overflow:hidden;pointer-events:none}.user.svelte-uiimm6.svelte-uiimm6{z-index:10;position:absolute;top:0;left:0;user-select:none;transform:translate(var(--x), var(--y));transition:transform 100ms linear;will-change:transform}.user.svelte-uiimm6 .cursor.svelte-uiimm6{position:absolute;top:0;left:0;color:var(--color);transform-origin:top left;transform:rotate(6deg)}.user[data-isself="true"].svelte-uiimm6 .cursor.svelte-uiimm6{display:none}.user-label.svelte-uiimm6.svelte-uiimm6{font-weight:600;color:black;background-color:var(--color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:9999px;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-uiimm6 .user-label.svelte-uiimm6{display:flex;flex-direction:column;justify-content:center;align-items:center}.user.svelte-uiimm6 .user-label[data-hidevideo="true"].svelte-uiimm6{position:absolute;top:20px;left:16px}.user.svelte-uiimm6 .user-label[data-hidevideo="false"].svelte-uiimm6{position:relative;margin:12px 6px}.user[data-isself="true"].svelte-uiimm6 .user-label.svelte-uiimm6{display:none}.user-label.svelte-uiimm6 .user-name.svelte-uiimm6{display:flex;justify-content:center;align-items:center;background-color:var(--color);font-size:0.7rem}.user.svelte-uiimm6 .user-label[data-hidevideo="true"] .user-name.svelte-uiimm6{padding:0.15rem 0.5rem}.user.svelte-uiimm6 .user-label[data-hidevideo="false"] .user-name.svelte-uiimm6{position:absolute;inset-inline:0;bottom:-2px;padding:0.15rem 0.5rem 0.35rem 0.5rem}.user.svelte-uiimm6 .user-label #video-container.svelte-uiimm6{height:7rem;width:7rem;overflow:hidden;display:flex;justify-content:center;align-items:center}.user.svelte-uiimm6 .user-label[data-hidevideo="true"] #video-container.svelte-uiimm6{display:none}.user.svelte-uiimm6 .user-label #video-container video.svelte-uiimm6{height:100%;aspect-ratio:16 / 9;transform:scaleX(-1)}.user.svelte-uiimm6 .halo.svelte-uiimm6{transform:scale(0);z-index:-1;position:absolute;top:-60px;left:-60px;width:120px;height:120px;border-radius:9999px;background-color:var(--color);opacity:0.25;transition:transform 100ms ease-out;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-uiimm6 .halo[data-show="true"].svelte-uiimm6{transform:scale(1)}');
16734
16734
  }
16735
16735
  function Jr(i, e, t) {
16736
16736
  const n = i.slice();
@@ -16754,10 +16754,10 @@ function jr(i) {
16754
16754
  e = Ye("div");
16755
16755
  for (let a = 0; a < t.length; a += 1)
16756
16756
  t[a].c();
16757
- z(e, "id", "users-container"), z(e, "class", "svelte-xrxt5b");
16757
+ z(e, "id", "users-container"), z(e, "class", "svelte-uiimm6");
16758
16758
  },
16759
16759
  m(a, o) {
16760
- Ln(a, e, o);
16760
+ Nn(a, e, o);
16761
16761
  for (let c = 0; c < t.length; c += 1)
16762
16762
  t[c] && t[c].m(e, null);
16763
16763
  },
@@ -16794,9 +16794,9 @@ function Vr(i, e) {
16794
16794
  key: i,
16795
16795
  first: null,
16796
16796
  c() {
16797
- t = Ye("div"), n = qs("svg"), s = qs("path"), r = cn(), a = Ye("div"), o = Ye("div"), c = Ye("video"), h = cn(), f = Ye("div"), b = Hr(p), w = cn(), _ = Ye("div"), Q = cn(), z(s, "d", "M2.2706 0.0593359L25.4277 8.05957H25.45926C25.65896 8.13153 25.83096 8.25952 25.95221 8.42653C26.07357 8.59354 26.13851 8.79166 26.13851 8.99459C26.13851 9.19751 26.07357 9.39564 25.95221 9.56265C25.83096 9.72966 25.65896 9.85765 25.45926 9.92962L15.3543 13.7698L11.3124 23.37C11.2344 23.5561 11.0994 23.7156 10.9248 23.828C10.7503 23.9402 10.5443 24.0002 10.3335 24C10.1172 24 9.9061 23.9365 9.7291 23.8184C9.552 23.7004 9.4176 23.5332 9.344 23.34L0.9233 1.33937C0.8555 1.16076 0.8426 0.967504 0.8861 0.782189C0.9297 0.596873 1.0278 0.427163 1.1691 0.292901C1.3105 0.158639 1.4891 0.0653762 1.6841 0.0240151C1.8792 -0.0173461 2.0826 -0.00509504 2.2706 0.0593359Z"), z(n, "width", "23"), z(n, "viewBox", "0 0 27 24"), z(n, "fill", "currentColor"), z(n, "aria-hidden", "true"), z(n, "xmlns", "http://www.w3.org/2000/svg"), z(n, "class", "cursor svelte-xrxt5b"), z(c, "id", u = `user-video-${/*user*/
16798
- e[29].id}`), z(c, "class", "svelte-xrxt5b"), z(o, "id", "video-container"), z(o, "class", "svelte-xrxt5b"), z(f, "class", "user-name svelte-xrxt5b"), z(a, "class", "user-label svelte-xrxt5b"), z(a, "data-hidevideo", T = !/*user*/
16799
- e[29].camera_enabled), z(_, "class", "halo svelte-xrxt5b"), z(_, "data-show", M = /*user*/
16797
+ t = Ye("div"), n = qs("svg"), s = qs("path"), r = cn(), a = Ye("div"), o = Ye("div"), c = Ye("video"), h = cn(), f = Ye("div"), b = Hr(p), w = cn(), _ = Ye("div"), Q = cn(), z(s, "d", "M2.2706 0.0593359L25.4277 8.05957H25.45926C25.65896 8.13153 25.83096 8.25952 25.95221 8.42653C26.07357 8.59354 26.13851 8.79166 26.13851 8.99459C26.13851 9.19751 26.07357 9.39564 25.95221 9.56265C25.83096 9.72966 25.65896 9.85765 25.45926 9.92962L15.3543 13.7698L11.3124 23.37C11.2344 23.5561 11.0994 23.7156 10.9248 23.828C10.7503 23.9402 10.5443 24.0002 10.3335 24C10.1172 24 9.9061 23.9365 9.7291 23.8184C9.552 23.7004 9.4176 23.5332 9.344 23.34L0.9233 1.33937C0.8555 1.16076 0.8426 0.967504 0.8861 0.782189C0.9297 0.596873 1.0278 0.427163 1.1691 0.292901C1.3105 0.158639 1.4891 0.0653762 1.6841 0.0240151C1.8792 -0.0173461 2.0826 -0.00509504 2.2706 0.0593359Z"), z(n, "width", "23"), z(n, "viewBox", "0 0 27 24"), z(n, "fill", "currentColor"), z(n, "aria-hidden", "true"), z(n, "xmlns", "http://www.w3.org/2000/svg"), z(n, "class", "cursor svelte-uiimm6"), z(c, "id", u = `user-video-${/*user*/
16798
+ e[29].id}`), z(c, "class", "svelte-uiimm6"), z(o, "id", "video-container"), z(o, "class", "svelte-uiimm6"), z(f, "class", "user-name svelte-uiimm6"), z(a, "class", "user-label svelte-uiimm6"), z(a, "data-hidevideo", T = !/*user*/
16799
+ e[29].camera_enabled), z(_, "class", "halo svelte-uiimm6"), z(_, "data-show", M = /*user*/
16800
16800
  (e[29].id == /*me*/
16801
16801
  e[0].id && /*user*/
16802
16802
  e[29].is_shift_key_down || /*user*/
@@ -16805,7 +16805,7 @@ function Vr(i, e) {
16805
16805
  (e[29].is_shift_key_down || /*user*/
16806
16806
  e[29].is_mouse_down)) && /*users_count*/
16807
16807
  e[3] > 1), z(t, "id", j = "user-" + /*user*/
16808
- e[29].id), z(t, "class", "user svelte-xrxt5b"), z(t, "data-isself", he = /*user*/
16808
+ e[29].id), z(t, "class", "user svelte-uiimm6"), z(t, "data-isself", he = /*user*/
16809
16809
  e[29].id == /*me*/
16810
16810
  e[0].id), hi(
16811
16811
  t,
@@ -16820,19 +16820,19 @@ function Vr(i, e) {
16820
16820
  e[29].y
16821
16821
  ) + "vh"), this.first = t;
16822
16822
  },
16823
- m(K, x) {
16824
- Ln(K, t, x), Le(t, n), Le(n, s), Le(t, r), Le(t, a), Le(a, o), Le(o, c), ae(), Le(a, h), Le(a, f), Le(f, b), Le(t, w), Le(t, _), Le(t, Q);
16823
+ m(K, A) {
16824
+ Nn(K, t, A), Ne(t, n), Ne(n, s), Ne(t, r), Ne(t, a), Ne(a, o), Ne(o, c), ae(), Ne(a, h), Ne(a, f), Ne(f, b), Ne(t, w), Ne(t, _), Ne(t, Q);
16825
16825
  },
16826
- p(K, x) {
16827
- e = K, x[0] & /*users*/
16826
+ p(K, A) {
16827
+ e = K, A[0] & /*users*/
16828
16828
  2 && u !== (u = `user-video-${/*user*/
16829
16829
  e[29].id}`) && z(c, "id", u), d !== /*user*/
16830
16830
  e[29] && (q(), d = /*user*/
16831
- e[29], ae()), x[0] & /*users*/
16831
+ e[29], ae()), A[0] & /*users*/
16832
16832
  2 && p !== (p = /*user*/
16833
- e[29].name + "") && Wo(b, p), x[0] & /*users*/
16833
+ e[29].name + "") && Wo(b, p), A[0] & /*users*/
16834
16834
  2 && T !== (T = !/*user*/
16835
- e[29].camera_enabled) && z(a, "data-hidevideo", T), x[0] & /*users, me, users_count*/
16835
+ e[29].camera_enabled) && z(a, "data-hidevideo", T), A[0] & /*users, me, users_count*/
16836
16836
  11 && M !== (M = /*user*/
16837
16837
  (e[29].id == /*me*/
16838
16838
  e[0].id && /*user*/
@@ -16841,22 +16841,22 @@ function Vr(i, e) {
16841
16841
  e[0].id && /*user*/
16842
16842
  (e[29].is_shift_key_down || /*user*/
16843
16843
  e[29].is_mouse_down)) && /*users_count*/
16844
- e[3] > 1) && z(_, "data-show", M), x[0] & /*users*/
16844
+ e[3] > 1) && z(_, "data-show", M), A[0] & /*users*/
16845
16845
  2 && j !== (j = "user-" + /*user*/
16846
- e[29].id) && z(t, "id", j), x[0] & /*users, me*/
16846
+ e[29].id) && z(t, "id", j), A[0] & /*users, me*/
16847
16847
  3 && he !== (he = /*user*/
16848
16848
  e[29].id == /*me*/
16849
- e[0].id) && z(t, "data-isself", he), x[0] & /*users*/
16849
+ e[0].id) && z(t, "data-isself", he), A[0] & /*users*/
16850
16850
  2 && hi(
16851
16851
  t,
16852
16852
  "--color",
16853
16853
  /*user*/
16854
16854
  e[29].color
16855
- ), x[0] & /*users*/
16855
+ ), A[0] & /*users*/
16856
16856
  2 && hi(t, "--x", parseFloat(
16857
16857
  /*user*/
16858
16858
  e[29].x
16859
- ) + "vw"), x[0] & /*users*/
16859
+ ) + "vw"), A[0] & /*users*/
16860
16860
  2 && hi(t, "--y", parseFloat(
16861
16861
  /*user*/
16862
16862
  e[29].y
@@ -16875,10 +16875,10 @@ function Dl(i) {
16875
16875
  );
16876
16876
  return {
16877
16877
  c() {
16878
- e = Ye("div"), t && t.c(), z(e, "id", "liveroom-client-element"), z(e, "class", "svelte-xrxt5b");
16878
+ e = Ye("div"), t && t.c(), z(e, "id", "liveroom-client-element"), z(e, "class", "svelte-uiimm6");
16879
16879
  },
16880
16880
  m(n, s) {
16881
- Ln(n, e, s), t && t.m(e, null);
16881
+ Nn(n, e, s), t && t.m(e, null);
16882
16882
  },
16883
16883
  p(n, s) {
16884
16884
  /*me*/
@@ -16899,21 +16899,21 @@ function _s(i, e) {
16899
16899
  return e === "vertical" && ["auto", "scroll"].includes(t) && i.scrollHeight > i.clientHeight || e === "horizontal" && ["auto", "scroll"].includes(n) && i.scrollWidth > i.clientWidth ? i : i.parentElement ? _s(i.parentElement, e) : window;
16900
16900
  }
16901
16901
  function Ml(i, e, t) {
16902
- let { version: n } = e, { url: s } = e, { room_id: r } = e, { user_name: a = void 0 } = e, { user_color: o = void 0 } = e, c, u, d = !1, h = Ol(), f = Ll(), p, b, T, w, _ = {}, M;
16902
+ let { version: n } = e, { url: s } = e, { room_id: r } = e, { user_name: a = void 0 } = e, { user_color: o = void 0 } = e, c, u, d = !1, h = Ll(), f = Nl(), p, b, T, w, _ = {}, M;
16903
16903
  zo(async () => {
16904
16904
  console.log(`[Liveroom] Starting in room '${r}' (user name: '${a}')... (v${n})`), j();
16905
16905
  }), Ko(() => {
16906
16906
  he(), di();
16907
16907
  });
16908
16908
  async function Q() {
16909
- if (console.log("[LiveKit] Beginning setup..."), t(9, u = new Co({ dynacast: !0 }).on(P.TrackSubscribed, async (A, oe, ce) => {
16910
- switch (console.log("[LiveKit] Track Subscribed", A, oe, ce), console.table({
16909
+ if (console.log("[LiveKit] Beginning setup..."), t(9, u = new Co({ dynacast: !0 }).on(P.TrackSubscribed, async (O, oe, ce) => {
16910
+ switch (console.log("[LiveKit] Track Subscribed", O, oe, ce), console.table({
16911
16911
  identity: ce.identity,
16912
16912
  source: oe.source
16913
16913
  }), oe.source) {
16914
16914
  case C.Source.Camera: {
16915
- const xe = _[ce.identity];
16916
- xe && (console.log(`[LiveKit] Attaching user camera (identity ${ce.identity})`), A.attach(xe));
16915
+ const Ae = _[ce.identity];
16916
+ Ae && (console.log(`[LiveKit] Attaching user camera (identity ${ce.identity})`), O.attach(Ae));
16917
16917
  break;
16918
16918
  }
16919
16919
  }
@@ -16923,8 +16923,8 @@ function Ml(i, e, t) {
16923
16923
  throw new Error("LiveKit token not set");
16924
16924
  console.log(`[LiveKit] Connecting to '${T}'...`), await u.connect(T, w, { autoSubscribe: !0 }), console.log("[LiveKit] Connected to room", u.name), await Promise.all([
16925
16925
  u.localParticipant.enableCameraAndMicrophone().then(() => console.log("[LiveKit] Local camera & mic enabled")).then(async () => {
16926
- var xe, Ae, Z;
16927
- const A = (Ae = (xe = u == null ? void 0 : u.localParticipant) == null ? void 0 : xe.videoTracks) == null ? void 0 : Ae.values(), oe = A && ((Z = Array.from(A)[0]) == null ? void 0 : Z.track), ce = p && _[p.id];
16926
+ var Ae, Oe, Z;
16927
+ const O = (Oe = (Ae = u == null ? void 0 : u.localParticipant) == null ? void 0 : Ae.videoTracks) == null ? void 0 : Oe.values(), oe = O && ((Z = Array.from(O)[0]) == null ? void 0 : Z.track), ce = p && _[p.id];
16928
16928
  ce && oe && (console.log("[LiveKit] Attaching local user camera"), oe.attach(ce));
16929
16929
  })
16930
16930
  ]);
@@ -16945,62 +16945,62 @@ function Ml(i, e, t) {
16945
16945
  user_agent: window.navigator.userAgent
16946
16946
  },
16947
16947
  socketOptions: { logger: null }
16948
- }), c.addEventListener("wheel-from-another-user", ({ detail: { delta_x: A, delta_y: oe, x: ce, y: xe } }) => {
16949
- const Ae = parseInt(A), Z = parseInt(oe), gt = new WheelEvent(
16948
+ }), c.addEventListener("wheel-from-another-user", ({ detail: { delta_x: O, delta_y: oe, x: ce, y: Ae } }) => {
16949
+ const Oe = parseInt(O), Z = parseInt(oe), gt = new WheelEvent(
16950
16950
  "wheel",
16951
16951
  {
16952
16952
  view: window,
16953
16953
  bubbles: !0,
16954
16954
  cancelable: !0,
16955
16955
  clientX: window.innerWidth * parseFloat(ce) / 100,
16956
- clientY: window.innerHeight * parseFloat(xe) / 100,
16957
- deltaX: Ae,
16956
+ clientY: window.innerHeight * parseFloat(Ae) / 100,
16957
+ deltaX: Oe,
16958
16958
  deltaY: Z,
16959
16959
  deltaMode: 0
16960
16960
  }
16961
16961
  ), on = document.head.contains(f);
16962
16962
  on && document.head.removeChild(f);
16963
16963
  const ie = document.elementFromPoint(gt.clientX, gt.clientY);
16964
- on && document.head.appendChild(f), (ie instanceof HTMLElement || ie instanceof SVGElement) && (Math.abs(Z) >= Math.abs(Ae) ? _s(ie, "vertical").scrollBy({
16964
+ on && document.head.appendChild(f), (ie instanceof HTMLElement || ie instanceof SVGElement) && (Math.abs(Z) >= Math.abs(Oe) ? _s(ie, "vertical").scrollBy({
16965
16965
  top: Z,
16966
16966
  left: 0,
16967
16967
  behavior: "instant"
16968
16968
  }) : _s(ie, "horizontal").scrollBy({
16969
16969
  top: 0,
16970
- left: Ae,
16970
+ left: Oe,
16971
16971
  behavior: "instant"
16972
16972
  }));
16973
- }), c.addEventListener("click-from-another-user", ({ detail: { x: A, y: oe } }) => {
16973
+ }), c.addEventListener("click-from-another-user", ({ detail: { x: O, y: oe } }) => {
16974
16974
  const ce = new MouseEvent(
16975
16975
  "click",
16976
16976
  {
16977
16977
  view: window,
16978
16978
  bubbles: !0,
16979
16979
  cancelable: !0,
16980
- clientX: window.innerWidth * parseFloat(A) / 100,
16980
+ clientX: window.innerWidth * parseFloat(O) / 100,
16981
16981
  clientY: window.innerHeight * parseFloat(oe) / 100
16982
16982
  }
16983
- ), xe = document.head.contains(f);
16984
- xe && document.head.removeChild(f);
16985
- const Ae = document.elementFromPoint(ce.clientX, ce.clientY);
16986
- xe && document.head.appendChild(f), (Ae instanceof HTMLElement || Ae instanceof SVGElement) && Ae.dispatchEvent(ce);
16987
- }), c.addEventListener("livestate-change", ({ detail: { state: A } }) => {
16983
+ ), Ae = document.head.contains(f);
16984
+ Ae && document.head.removeChild(f);
16985
+ const Oe = document.elementFromPoint(ce.clientX, ce.clientY);
16986
+ Ae && document.head.appendChild(f), (Oe instanceof HTMLElement || Oe instanceof SVGElement) && Oe.dispatchEvent(ce);
16987
+ }), c.addEventListener("livestate-change", ({ detail: { state: O } }) => {
16988
16988
  var oe, ce;
16989
- (oe = A == null ? void 0 : A.me) != null && oe.name && A.me.name != (p == null ? void 0 : p.name) && (sessionStorage == null || sessionStorage.setItem(Fo, A.me.name)), (ce = A == null ? void 0 : A.me) != null && ce.color && A.me.color != (p == null ? void 0 : p.color) && (sessionStorage == null || sessionStorage.setItem(Bo, A.me.color)), t(4, r = A.room_id), t(0, p = A.me), t(1, b = A.users), t(11, T = A.livekit_ws_url), t(12, w = A.livekit_token);
16989
+ (oe = O == null ? void 0 : O.me) != null && oe.name && O.me.name != (p == null ? void 0 : p.name) && (sessionStorage == null || sessionStorage.setItem(Fo, O.me.name)), (ce = O == null ? void 0 : O.me) != null && ce.color && O.me.color != (p == null ? void 0 : p.color) && (sessionStorage == null || sessionStorage.setItem(Bo, O.me.color)), t(4, r = O.room_id), t(0, p = O.me), t(1, b = O.users), t(11, T = O.livekit_ws_url), t(12, w = O.livekit_token);
16990
16990
  }), c.connect(), window.addEventListener("mousemove", ae), window.addEventListener("mousedown", q), window.addEventListener("mouseup", K), window.addEventListener("keydown", F), window.addEventListener("keyup", fe), window.addEventListener("resize", Ie);
16991
16991
  }
16992
16992
  function he() {
16993
16993
  window.removeEventListener("resize", Ie), window.removeEventListener("keyup", fe), window.removeEventListener("keydown", F), window.removeEventListener("mouseup", K), window.removeEventListener("mousedown", q), window.removeEventListener("mousemove", ae), c == null || c.disconnect(), c = void 0, u == null || u.disconnect(), t(9, u = void 0);
16994
16994
  }
16995
- function ae(A) {
16995
+ function ae(O) {
16996
16996
  c && (p != null && p.id) && c.dispatchEvent(new CustomEvent(
16997
16997
  "mouse_move",
16998
16998
  {
16999
16999
  detail: {
17000
17000
  user_id: p.id,
17001
- x: Number(A.clientX / window.innerWidth * 100).toFixed(2),
17001
+ x: Number(O.clientX / window.innerWidth * 100).toFixed(2),
17002
17002
  // in %
17003
- y: Number(A.clientY / window.innerHeight * 100).toFixed(2)
17003
+ y: Number(O.clientY / window.innerHeight * 100).toFixed(2)
17004
17004
  }
17005
17005
  // in %
17006
17006
  }
@@ -17012,12 +17012,12 @@ function Ml(i, e, t) {
17012
17012
  function K() {
17013
17013
  c && (p != null && p.id) && c.dispatchEvent(new CustomEvent("mouse_up", { detail: { user_id: p.id } }));
17014
17014
  }
17015
- const x = ["Shift"];
17016
- function F(A) {
17017
- !A.repeat && x.includes(A.key) && c && (p != null && p.id) && c.dispatchEvent(new CustomEvent("key_down", { detail: { key: A.key, user_id: p.id } }));
17015
+ const A = ["Shift"];
17016
+ function F(O) {
17017
+ !O.repeat && A.includes(O.key) && c && (p != null && p.id) && c.dispatchEvent(new CustomEvent("key_down", { detail: { key: O.key, user_id: p.id } }));
17018
17018
  }
17019
- function fe(A) {
17020
- x.includes(A.key) && c && (p != null && p.id) && c.dispatchEvent(new CustomEvent("key_up", { detail: { key: A.key, user_id: p.id } }));
17019
+ function fe(O) {
17020
+ A.includes(O.key) && c && (p != null && p.id) && c.dispatchEvent(new CustomEvent("key_up", { detail: { key: O.key, user_id: p.id } }));
17021
17021
  }
17022
17022
  function Ie() {
17023
17023
  c && (p != null && p.id) && c.dispatchEvent(new CustomEvent(
@@ -17037,19 +17037,19 @@ function Ml(i, e, t) {
17037
17037
  function di() {
17038
17038
  document.head.removeChild(h), document.head.removeChild(f), t(10, d = !1);
17039
17039
  }
17040
- function an(A, oe) {
17041
- is[A ? "unshift" : "push"](() => {
17042
- _[oe.id] = A, t(2, _);
17040
+ function an(O, oe) {
17041
+ is[O ? "unshift" : "push"](() => {
17042
+ _[oe.id] = O, t(2, _);
17043
17043
  });
17044
17044
  }
17045
- return i.$$set = (A) => {
17046
- "version" in A && t(5, n = A.version), "url" in A && t(6, s = A.url), "room_id" in A && t(4, r = A.room_id), "user_name" in A && t(7, a = A.user_name), "user_color" in A && t(8, o = A.user_color);
17045
+ return i.$$set = (O) => {
17046
+ "version" in O && t(5, n = O.version), "url" in O && t(6, s = O.url), "room_id" in O && t(4, r = O.room_id), "user_name" in O && t(7, a = O.user_name), "user_color" in O && t(8, o = O.user_color);
17047
17047
  }, i.$$.update = () => {
17048
17048
  i.$$.dirty[0] & /*livekitRoom, me, users, livekit_ws_url, livekit_token*/
17049
17049
  6659 && !u && p && b && T && w && Q(), i.$$.dirty[0] & /*users*/
17050
17050
  2 && t(3, M = Object.keys(b || {}).length), i.$$.dirty[0] & /*isClickBlocked, users*/
17051
- 1026 && !d && b && Object.values(b).some((A) => A.type == "admin" && A.is_space_key_down) && rn(), i.$$.dirty[0] & /*isClickBlocked, users*/
17052
- 1026 && d && b && Object.values(b).filter((A) => A.type == "admin").every((A) => !A.is_space_key_down) && di();
17051
+ 1026 && !d && b && Object.values(b).some((O) => O.type == "admin" && O.is_space_key_down) && rn(), i.$$.dirty[0] & /*isClickBlocked, users*/
17052
+ 1026 && d && b && Object.values(b).filter((O) => O.type == "admin").every((O) => !O.is_space_key_down) && di();
17053
17053
  }, [
17054
17054
  p,
17055
17055
  b,
@@ -17082,7 +17082,7 @@ class Ul extends cc {
17082
17082
  user_name: 7,
17083
17083
  user_color: 8
17084
17084
  },
17085
- Nl,
17085
+ xl,
17086
17086
  [-1, -1]
17087
17087
  );
17088
17088
  }