@cloudflare/realtimekit 2.0.3-staging.8 → 2.0.3-staging.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es5.js CHANGED
@@ -2,8 +2,8 @@ import { v4 as Oo, validate as Fv } from "uuid";
2
2
  import Hv from "bowser";
3
3
  import { MessageType as A, PbLong as Jo, typeofJsonValue as Cm } from "@protobuf-ts/runtime";
4
4
  import * as Mu from "worker-timers";
5
- import * as Cn from "sdp-transform";
6
- var um = ["chat", "connectedMeetings", "plugins", "polls", "media"], cm = ["id"], lm = ["meetingId"], x, $n, qe, da, Wc, Ys, Un, Gc, yc, Ki, zi, To, Zr, Qi, jn, ha, Xs, Fn, Zs, xs, xr, Yi, Et, Hn, kr, eo, to, Bn, Xt, ya, tn, Yn, kc, bo, wo, Po, pa, Xi, Zi, xi, Ut, De, ea, ta, _t, qn, ln, Wn, Tc, Tr, ro, rn, Gn, br, bc, no, wc, Pc, ye, io, Jn, ra, Kn, mt, jt, Kt, en, na, it, ia, Ne, wr, Le, aa, we, va, fa, ao, pl, so, Ft, Z, yt, Ul, ar, ga, ge, Ve, Zn, on, Xn, xn, an, Qt, sr, un, ei, st, dn, ot, Ae, oo, Jc, Kc, Sc, So, Eo, Qn, zc, Qc, uo, Mo, co, Yc, lo, ho, de, Re, zn;
5
+ import * as Rn from "sdp-transform";
6
+ var um = ["chat", "connectedMeetings", "plugins", "polls", "media"], cm = ["id"], lm = ["meetingId"], x, Un, qe, da, Wc, Ys, jn, Gc, yc, Ki, zi, To, Zr, Qi, Fn, ha, Xs, Hn, Zs, xs, xr, Yi, Et, Bn, kr, eo, to, qn, Xt, ya, tn, Xn, kc, bo, wo, Po, pa, Xi, Zi, xi, Ut, De, ea, ta, _t, Wn, ln, Gn, Tc, Tr, ro, rn, Jn, br, bc, no, wc, Pc, ye, io, Kn, ra, zn, mt, jt, Kt, en, na, it, ia, Ne, wr, Le, aa, we, va, fa, ao, pl, so, Ft, Z, yt, Ul, ar, ga, ge, Ve, dn, on, Zn, xn, an, Qt, sr, un, ei, st, hn, ot, Ae, oo, Jc, Kc, Sc, So, Eo, Yn, zc, Qc, uo, Mo, co, Yc, lo, ho, de, Re, Qn;
7
7
  function Ah(s, r) {
8
8
  if (s == null)
9
9
  return {};
@@ -27,9 +27,9 @@ function dm(s, r) {
27
27
  }
28
28
  return e;
29
29
  }
30
- function Dn(s) {
30
+ function Ln(s) {
31
31
  var r = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
32
- return Dn = function(t) {
32
+ return Ln = function(t) {
33
33
  if (t === null || !pm(t))
34
34
  return t;
35
35
  if (typeof t != "function")
@@ -43,7 +43,7 @@ function Dn(s) {
43
43
  return hm(t, arguments, Fs(this).constructor);
44
44
  }
45
45
  return n.prototype = Object.create(t.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), Xu(n, t);
46
- }, Dn(s);
46
+ }, Ln(s);
47
47
  }
48
48
  function hm(s, r, e) {
49
49
  if (Mh())
@@ -108,7 +108,7 @@ function N(s) {
108
108
  function ym(s, r, e) {
109
109
  return (r = jv(r)) in s ? Object.defineProperty(s, r, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : s[r] = e, s;
110
110
  }
111
- function Mn(s, r) {
111
+ function On(s, r) {
112
112
  var e = typeof Symbol != "undefined" && s[Symbol.iterator] || s["@@iterator"];
113
113
  if (!e) {
114
114
  if (Array.isArray(s) || (e = Ih(s)) || r && s && typeof s.length == "number") {
@@ -1673,7 +1673,7 @@ var yf = /* @__PURE__ */ P(function s() {
1673
1673
  case 0:
1674
1674
  return a = v.length > 1 && v[1] !== void 0 ? v[1] : !1, y.n = 1, i.getStats();
1675
1675
  case 1:
1676
- o = y.v, c = a ? this.getProducerStatsFromReport(this.parseRTCReport(o, ["outbound-rtp", "remote-inbound-rtp"], !1, i.id))[0] : void 0, l = Mn(o.values()), y.p = 2, l.s();
1676
+ o = y.v, c = a ? this.getProducerStatsFromReport(this.parseRTCReport(o, ["outbound-rtp", "remote-inbound-rtp"], !1, i.id))[0] : void 0, l = On(o.values()), y.p = 2, l.s();
1677
1677
  case 3:
1678
1678
  if ((d = l.n()).done) {
1679
1679
  y.n = 6;
@@ -1711,7 +1711,7 @@ var yf = /* @__PURE__ */ P(function s() {
1711
1711
  case 0:
1712
1712
  return a = v.length > 1 && v[1] !== void 0 ? v[1] : !1, y.n = 1, i.getStats();
1713
1713
  case 1:
1714
- o = y.v, c = a ? this.getConsumerStatsFromReport(this.parseRTCReport(o, ["inbound-rtp"], !1, i.id))[0] : void 0, l = Mn(o.values()), y.p = 2, l.s();
1714
+ o = y.v, c = a ? this.getConsumerStatsFromReport(this.parseRTCReport(o, ["inbound-rtp"], !1, i.id))[0] : void 0, l = On(o.values()), y.p = 2, l.s();
1715
1715
  case 3:
1716
1716
  if ((d = l.n()).done) {
1717
1717
  y.n = 6;
@@ -1768,7 +1768,7 @@ var yf = /* @__PURE__ */ P(function s() {
1768
1768
  });
1769
1769
  return n || t[t.length - 1];
1770
1770
  } }, { key: "parseRTCReport", value: function(t) {
1771
- var n = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0, c = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0, l = t, d = new yf(), p = i.length ? new Set(i) : void 0, v = [], f = [], g = [], y = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map(), b = Mn(l.values()), T;
1771
+ var n = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0, c = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0, l = t, d = new yf(), p = i.length ? new Set(i) : void 0, v = [], f = [], g = [], y = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map(), b = On(l.values()), T;
1772
1772
  try {
1773
1773
  for (b.s(); !(T = b.n()).done; ) {
1774
1774
  var E = T.value;
@@ -2358,7 +2358,7 @@ var yf = /* @__PURE__ */ P(function s() {
2358
2358
  case 0:
2359
2359
  return a = g.length > 1 && g[1] !== void 0 ? g[1] : !1, b.n = 1, i.getStats();
2360
2360
  case 1:
2361
- o = b.v, c = this.parseRTCReport(o, ["inbound-rtp"], !1, i.id), l = _e(c.consumerStreamMap.values())[0], d = a ? this.getConsumerStatsFromParsedConsumerStats(c, l, i.id) : void 0, p = Mn(o.values()), b.p = 2, p.s();
2361
+ o = b.v, c = this.parseRTCReport(o, ["inbound-rtp"], !1, i.id), l = _e(c.consumerStreamMap.values())[0], d = a ? this.getConsumerStatsFromParsedConsumerStats(c, l, i.id) : void 0, p = On(o.values()), b.p = 2, p.s();
2362
2362
  case 3:
2363
2363
  if ((v = p.n()).done) {
2364
2364
  b.n = 6;
@@ -2405,7 +2405,7 @@ var yf = /* @__PURE__ */ P(function s() {
2405
2405
  var n;
2406
2406
  return { id: t.id, type: t.candidateType || t.type, address: t.address, port: t.port, url: t.url, protocol: (n = t.relayProtocol) !== null && n !== void 0 ? n : t.protocol, networkType: t.networkType, relatedAddress: t.relatedAddress, relatedPort: t.relatedPort };
2407
2407
  } }, { key: "parseRTCReport", value: function(t) {
2408
- var n = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0, c = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0, l = t, d = new yf(), p = i.length ? new Set(i) : void 0, v = [], f = [], g = [], y = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map(), b = Mn(l.values()), T;
2408
+ var n = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0, c = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0, l = t, d = new yf(), p = i.length ? new Set(i) : void 0, v = [], f = [], g = [], y = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map(), b = On(l.values()), T;
2409
2409
  try {
2410
2410
  for (b.s(); !(T = b.n()).done; ) {
2411
2411
  var E = T.value;
@@ -2695,7 +2695,7 @@ var le = function(r, e) {
2695
2695
  return function(t, n, i) {
2696
2696
  if (i)
2697
2697
  return kp(i, r, e);
2698
- var a = Mn(Reflect.ownKeys(t.prototype).filter(function(p) {
2698
+ var a = On(Reflect.ownKeys(t.prototype).filter(function(p) {
2699
2699
  return p !== "constructor";
2700
2700
  })), o;
2701
2701
  try {
@@ -2840,7 +2840,7 @@ var le = function(r, e) {
2840
2840
  for (; ; )
2841
2841
  switch (E.p = E.n) {
2842
2842
  case 0:
2843
- p = [], E.p = 1, v = Mn(t), E.p = 2, v.s();
2843
+ p = [], E.p = 1, v = On(t), E.p = 2, v.s();
2844
2844
  case 3:
2845
2845
  if ((f = v.n()).done) {
2846
2846
  E.n = 9;
@@ -3740,7 +3740,7 @@ var $o = /* @__PURE__ */ function(s) {
3740
3740
  }, { key: "reset", value: function() {
3741
3741
  u(this, Ar)[Ar] = /* @__PURE__ */ new Map(), u(this, Ir)[Ir] = /* @__PURE__ */ new Map(), Ie(r, "removeAllListeners", this, 3)([]);
3742
3742
  } }]);
3743
- }(mr.EventEmitter), py = (typeof global == "undefined" ? "undefined" : me(global)) == "object" && global && global.Object === Object && global, wf = py, vy = (typeof self == "undefined" ? "undefined" : me(self)) == "object" && self && self.Object === Object && self, fy = wf || vy || Function("return this")(), Ln = fy, gy = Ln.Symbol, ri = gy, Pf = Object.prototype, my = Pf.hasOwnProperty, yy = Pf.toString, zo = ri ? ri.toStringTag : void 0;
3743
+ }(mr.EventEmitter), py = (typeof global == "undefined" ? "undefined" : me(global)) == "object" && global && global.Object === Object && global, wf = py, vy = (typeof self == "undefined" ? "undefined" : me(self)) == "object" && self && self.Object === Object && self, fy = wf || vy || Function("return this")(), Nn = fy, gy = Nn.Symbol, ri = gy, Pf = Object.prototype, my = Pf.hasOwnProperty, yy = Pf.toString, zo = ri ? ri.toStringTag : void 0;
3744
3744
  function ky(s) {
3745
3745
  var r = my.call(s, zo), e = s[zo];
3746
3746
  try {
@@ -3792,7 +3792,7 @@ var My = /^\s+/;
3792
3792
  function Oy(s) {
3793
3793
  return s && s.slice(0, Iy(s) + 1).replace(My, "");
3794
3794
  }
3795
- function hn(s) {
3795
+ function pn(s) {
3796
3796
  var r = me(s);
3797
3797
  return s != null && (r == "object" || r == "function");
3798
3798
  }
@@ -3802,9 +3802,9 @@ function Ep(s) {
3802
3802
  return s;
3803
3803
  if (yl(s))
3804
3804
  return Sp;
3805
- if (hn(s)) {
3805
+ if (pn(s)) {
3806
3806
  var r = typeof s.valueOf == "function" ? s.valueOf() : s;
3807
- s = hn(r) ? r + "" : r;
3807
+ s = pn(r) ? r + "" : r;
3808
3808
  }
3809
3809
  if (typeof s != "string")
3810
3810
  return s === 0 ? s : +s;
@@ -3817,12 +3817,12 @@ function Lh(s) {
3817
3817
  }
3818
3818
  var $y = "[object AsyncFunction]", Uy = "[object Function]", jy = "[object GeneratorFunction]", Fy = "[object Proxy]";
3819
3819
  function Nh(s) {
3820
- if (!hn(s))
3820
+ if (!pn(s))
3821
3821
  return !1;
3822
3822
  var r = Ws(s);
3823
3823
  return r == Uy || r == jy || r == $y || r == Fy;
3824
3824
  }
3825
- var Hy = Ln["__core-js_shared__"], jl = Hy, Cp = function() {
3825
+ var Hy = Nn["__core-js_shared__"], jl = Hy, Cp = function() {
3826
3826
  var s = /[^.]+$/.exec(jl && jl.keys && jl.keys.IE_PROTO || "");
3827
3827
  return s ? "Symbol(src)_1." + s : "";
3828
3828
  }();
@@ -3845,7 +3845,7 @@ function Gs(s) {
3845
3845
  }
3846
3846
  var Gy = /[\\^$.*+?()[\]{}|]/g, Jy = /^\[object .+?Constructor\]$/, Ky = Function.prototype, zy = Object.prototype, Qy = Ky.toString, Yy = zy.hasOwnProperty, Xy = RegExp("^" + Qy.call(Yy).replace(Gy, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
3847
3847
  function Zy(s) {
3848
- if (!hn(s) || By(s))
3848
+ if (!pn(s) || By(s))
3849
3849
  return !1;
3850
3850
  var r = Nh(s) ? Xy : Jy;
3851
3851
  return r.test(Gs(s));
@@ -3857,11 +3857,11 @@ function Js(s, r) {
3857
3857
  var e = xy(s, r);
3858
3858
  return Zy(e) ? e : void 0;
3859
3859
  }
3860
- var ek = Js(Ln, "WeakMap"), Pd = ek, Rp = Object.create, tk = function() {
3860
+ var ek = Js(Nn, "WeakMap"), Pd = ek, Rp = Object.create, tk = function() {
3861
3861
  function s() {
3862
3862
  }
3863
3863
  return function(r) {
3864
- if (!hn(r))
3864
+ if (!pn(r))
3865
3865
  return {};
3866
3866
  if (Rp)
3867
3867
  return Rp(r);
@@ -3992,7 +3992,7 @@ function cc(s) {
3992
3992
  return s != null && Uh(s.length) && !Nh(s);
3993
3993
  }
3994
3994
  function _k(s, r, e) {
3995
- if (!hn(e))
3995
+ if (!pn(e))
3996
3996
  return !1;
3997
3997
  var t = me(r);
3998
3998
  return (t == "number" ? cc(e) && Vh(r, e.length) : t == "string" && r in e) ? oc(e[r], s) : !1;
@@ -4029,7 +4029,7 @@ var Rf = Object.prototype, Dk = Rf.hasOwnProperty, Lk = Rf.propertyIsEnumerable,
4029
4029
  function Vk() {
4030
4030
  return !1;
4031
4031
  }
4032
- var _f = (typeof exports == "undefined" ? "undefined" : me(exports)) == "object" && exports && !exports.nodeType && exports, Ip = _f && (typeof module == "undefined" ? "undefined" : me(module)) == "object" && module && !module.nodeType && module, $k = Ip && Ip.exports === _f, Mp = $k ? Ln.Buffer : void 0, Uk = Mp ? Mp.isBuffer : void 0, jk = Uk || Vk, Do = jk, Fk = "[object Arguments]", Hk = "[object Array]", Bk = "[object Boolean]", qk = "[object Date]", Wk = "[object Error]", Gk = "[object Function]", Jk = "[object Map]", Kk = "[object Number]", zk = "[object Object]", Qk = "[object RegExp]", Yk = "[object Set]", Xk = "[object String]", Zk = "[object WeakMap]", xk = "[object ArrayBuffer]", eT = "[object DataView]", tT = "[object Float32Array]", rT = "[object Float64Array]", nT = "[object Int8Array]", iT = "[object Int16Array]", aT = "[object Int32Array]", sT = "[object Uint8Array]", oT = "[object Uint8ClampedArray]", uT = "[object Uint16Array]", cT = "[object Uint32Array]", ft = {};
4032
+ var _f = (typeof exports == "undefined" ? "undefined" : me(exports)) == "object" && exports && !exports.nodeType && exports, Ip = _f && (typeof module == "undefined" ? "undefined" : me(module)) == "object" && module && !module.nodeType && module, $k = Ip && Ip.exports === _f, Mp = $k ? Nn.Buffer : void 0, Uk = Mp ? Mp.isBuffer : void 0, jk = Uk || Vk, Do = jk, Fk = "[object Arguments]", Hk = "[object Array]", Bk = "[object Boolean]", qk = "[object Date]", Wk = "[object Error]", Gk = "[object Function]", Jk = "[object Map]", Kk = "[object Number]", zk = "[object Object]", Qk = "[object RegExp]", Yk = "[object Set]", Xk = "[object String]", Zk = "[object WeakMap]", xk = "[object ArrayBuffer]", eT = "[object DataView]", tT = "[object Float32Array]", rT = "[object Float64Array]", nT = "[object Int8Array]", iT = "[object Int16Array]", aT = "[object Int32Array]", sT = "[object Uint8Array]", oT = "[object Uint8ClampedArray]", uT = "[object Uint16Array]", cT = "[object Uint32Array]", ft = {};
4033
4033
  ft[tT] = ft[rT] = ft[nT] = ft[iT] = ft[aT] = ft[sT] = ft[oT] = ft[uT] = ft[cT] = !0;
4034
4034
  ft[Fk] = ft[Hk] = ft[xk] = ft[Bk] = ft[eT] = ft[qk] = ft[Wk] = ft[Gk] = ft[Jk] = ft[Kk] = ft[zk] = ft[Qk] = ft[Yk] = ft[Xk] = ft[Zk] = !1;
4035
4035
  function lT(s) {
@@ -4083,7 +4083,7 @@ function TT(s) {
4083
4083
  }
4084
4084
  var bT = Object.prototype, wT = bT.hasOwnProperty;
4085
4085
  function PT(s) {
4086
- if (!hn(s))
4086
+ if (!pn(s))
4087
4087
  return TT(s);
4088
4088
  var r = kl(s), e = [];
4089
4089
  for (var t in s)
@@ -4179,7 +4179,7 @@ Hi.prototype.delete = HT;
4179
4179
  Hi.prototype.get = BT;
4180
4180
  Hi.prototype.has = qT;
4181
4181
  Hi.prototype.set = WT;
4182
- var GT = Js(Ln, "Map"), rc = GT;
4182
+ var GT = Js(Nn, "Map"), rc = GT;
4183
4183
  function JT() {
4184
4184
  this.size = 0, this.__data__ = { hash: new Hs(), map: new (rc || Hi)(), string: new Hs() };
4185
4185
  }
@@ -4306,22 +4306,22 @@ function T0(s, r) {
4306
4306
  }
4307
4307
  return e.set(s, r), this.size = e.size, this;
4308
4308
  }
4309
- function On(s) {
4309
+ function Dn(s) {
4310
4310
  var r = this.__data__ = new Hi(s);
4311
4311
  this.size = r.size;
4312
4312
  }
4313
- On.prototype.clear = f0;
4314
- On.prototype.delete = g0;
4315
- On.prototype.get = m0;
4316
- On.prototype.has = y0;
4317
- On.prototype.set = T0;
4313
+ Dn.prototype.clear = f0;
4314
+ Dn.prototype.delete = g0;
4315
+ Dn.prototype.get = m0;
4316
+ Dn.prototype.has = y0;
4317
+ Dn.prototype.set = T0;
4318
4318
  function b0(s, r) {
4319
4319
  return s && uc(r, bl(r), s);
4320
4320
  }
4321
4321
  function w0(s, r) {
4322
4322
  return s && uc(r, lc(r), s);
4323
4323
  }
4324
- var $f = (typeof exports == "undefined" ? "undefined" : me(exports)) == "object" && exports && !exports.nodeType && exports, Dp = $f && (typeof module == "undefined" ? "undefined" : me(module)) == "object" && module && !module.nodeType && module, P0 = Dp && Dp.exports === $f, Lp = P0 ? Ln.Buffer : void 0, Np = Lp ? Lp.allocUnsafe : void 0;
4324
+ var $f = (typeof exports == "undefined" ? "undefined" : me(exports)) == "object" && exports && !exports.nodeType && exports, Dp = $f && (typeof module == "undefined" ? "undefined" : me(module)) == "object" && module && !module.nodeType && module, P0 = Dp && Dp.exports === $f, Lp = P0 ? Nn.Buffer : void 0, Np = Lp ? Lp.allocUnsafe : void 0;
4325
4325
  function Uf(s, r) {
4326
4326
  if (r)
4327
4327
  return s.slice();
@@ -4364,7 +4364,7 @@ function Sd(s) {
4364
4364
  function O0(s) {
4365
4365
  return Hf(s, lc, Ff);
4366
4366
  }
4367
- var D0 = Js(Ln, "DataView"), Ed = D0, L0 = Js(Ln, "Promise"), Cd = L0, N0 = Js(Ln, "Set"), Ro = N0, $p = "[object Map]", V0 = "[object Object]", Up = "[object Promise]", jp = "[object Set]", Fp = "[object WeakMap]", Hp = "[object DataView]", $0 = Gs(Ed), U0 = Gs(rc), j0 = Gs(Cd), F0 = Gs(Ro), H0 = Gs(Pd), Ps = Ws;
4367
+ var D0 = Js(Nn, "DataView"), Ed = D0, L0 = Js(Nn, "Promise"), Cd = L0, N0 = Js(Nn, "Set"), Ro = N0, $p = "[object Map]", V0 = "[object Object]", Up = "[object Promise]", jp = "[object Set]", Fp = "[object WeakMap]", Hp = "[object DataView]", $0 = Gs(Ed), U0 = Gs(rc), j0 = Gs(Cd), F0 = Gs(Ro), H0 = Gs(Pd), Ps = Ws;
4368
4368
  (Ed && Ps(new Ed(new ArrayBuffer(1))) != Hp || rc && Ps(new rc()) != $p || Cd && Ps(Cd.resolve()) != Up || Ro && Ps(new Ro()) != jp || Pd && Ps(new Pd()) != Fp) && (Ps = function(r) {
4369
4369
  var e = Ws(r), t = e == V0 ? r.constructor : void 0, n = t ? Gs(t) : "";
4370
4370
  if (n)
@@ -4387,7 +4387,7 @@ function W0(s) {
4387
4387
  var r = s.length, e = new s.constructor(r);
4388
4388
  return r && typeof s[0] == "string" && q0.call(s, "index") && (e.index = s.index, e.input = s.input), e;
4389
4389
  }
4390
- var G0 = Ln.Uint8Array, rl = G0;
4390
+ var G0 = Nn.Uint8Array, rl = G0;
4391
4391
  function Wh(s) {
4392
4392
  var r = new s.constructor(s.byteLength);
4393
4393
  return new rl(r).set(new rl(s)), r;
@@ -4461,7 +4461,7 @@ function Du(s, r, e, t, n, i) {
4461
4461
  var a, o = r & Sb, c = r & Eb, l = r & Cb;
4462
4462
  if (e && (a = n ? e(s, t, n, i) : e(s)), a !== void 0)
4463
4463
  return a;
4464
- if (!hn(s))
4464
+ if (!pn(s))
4465
4465
  return s;
4466
4466
  var d = Kr(s);
4467
4467
  if (d) {
@@ -4480,7 +4480,7 @@ function Du(s, r, e, t, n, i) {
4480
4480
  a = fb(s, p, o);
4481
4481
  }
4482
4482
  }
4483
- i || (i = new On());
4483
+ i || (i = new Dn());
4484
4484
  var f = i.get(s);
4485
4485
  if (f)
4486
4486
  return f;
@@ -4650,15 +4650,15 @@ function Rw(s, r, e, t, n, i) {
4650
4650
  a = !0, d = !1;
4651
4651
  }
4652
4652
  if (v && !d)
4653
- return i || (i = new On()), a || Tl(s) ? zf(s, r, e, t, n, i) : Tw(s, r, c, e, t, n, i);
4653
+ return i || (i = new Dn()), a || Tl(s) ? zf(s, r, e, t, n, i) : Tw(s, r, c, e, t, n, i);
4654
4654
  if (!(e & Ew)) {
4655
4655
  var f = d && Qp.call(s, "__wrapped__"), g = p && Qp.call(r, "__wrapped__");
4656
4656
  if (f || g) {
4657
4657
  var y = f ? s.value() : s, k = g ? r.value() : r;
4658
- return i || (i = new On()), n(y, k, e, t, i);
4658
+ return i || (i = new Dn()), n(y, k, e, t, i);
4659
4659
  }
4660
4660
  }
4661
- return v ? (i || (i = new On()), Sw(s, r, e, t, n, i)) : !1;
4661
+ return v ? (i || (i = new Dn()), Sw(s, r, e, t, n, i)) : !1;
4662
4662
  }
4663
4663
  function El(s, r, e, t, n) {
4664
4664
  return s === r ? !0 : s == null || r == null || !ni(s) && !ni(r) ? s !== s && r !== r : Rw(s, r, e, t, El, n);
@@ -4680,7 +4680,7 @@ function Iw(s, r, e, t) {
4680
4680
  if (l === void 0 && !(c in s))
4681
4681
  return !1;
4682
4682
  } else {
4683
- var p = new On();
4683
+ var p = new Dn();
4684
4684
  if (t)
4685
4685
  var v = t(l, d, c, s, r, p);
4686
4686
  if (!(v === void 0 ? El(d, l, _w | Aw, t, p) : v))
@@ -4690,7 +4690,7 @@ function Iw(s, r, e, t) {
4690
4690
  return !0;
4691
4691
  }
4692
4692
  function Qf(s) {
4693
- return s === s && !hn(s);
4693
+ return s === s && !pn(s);
4694
4694
  }
4695
4695
  function Mw(s) {
4696
4696
  for (var r = bl(s), e = r.length; e--; ) {
@@ -4760,13 +4760,13 @@ function qw(s) {
4760
4760
  };
4761
4761
  }
4762
4762
  var Ww = qw(), Gw = Ww, Jw = function() {
4763
- return Ln.Date.now();
4763
+ return Nn.Date.now();
4764
4764
  }, Bl = Jw, Kw = "Expected a function", zw = Math.max, Qw = Math.min;
4765
4765
  function Kh(s, r, e) {
4766
4766
  var t, n, i, a, o, c, l = 0, d = !1, p = !1, v = !0;
4767
4767
  if (typeof s != "function")
4768
4768
  throw new TypeError(Kw);
4769
- r = Ep(r) || 0, hn(e) && (d = !!e.leading, p = "maxWait" in e, i = p ? zw(Ep(e.maxWait) || 0, r) : i, v = "trailing" in e ? !!e.trailing : v);
4769
+ r = Ep(r) || 0, pn(e) && (d = !!e.leading, p = "maxWait" in e, i = p ? zw(Ep(e.maxWait) || 0, r) : i, v = "trailing" in e ? !!e.trailing : v);
4770
4770
  function f(_) {
4771
4771
  var O = t, L = n;
4772
4772
  return t = n = void 0, l = _, a = s.apply(L, O), a;
@@ -4831,13 +4831,13 @@ function Zw(s, r, e, t, n, i, a) {
4831
4831
  var d = i ? i(o, c, e + "", s, r, a) : void 0, p = d === void 0;
4832
4832
  if (p) {
4833
4833
  var v = Kr(c), f = !v && Do(c), g = !v && !f && Tl(c);
4834
- d = c, v || f || g ? Kr(o) ? d = o : Yw(o) ? d = Ef(o) : f ? (p = !1, d = Uf(c, !0)) : g ? (p = !1, d = Bf(c, !0)) : d = [] : v0(c) || ec(c) ? (d = o, ec(o) ? d = Xw(o) : (!hn(o) || Nh(o)) && (d = qf(c))) : p = !1;
4834
+ d = c, v || f || g ? Kr(o) ? d = o : Yw(o) ? d = Ef(o) : f ? (p = !1, d = Uf(c, !0)) : g ? (p = !1, d = Bf(c, !0)) : d = [] : v0(c) || ec(c) ? (d = o, ec(o) ? d = Xw(o) : (!pn(o) || Nh(o)) && (d = qf(c))) : p = !1;
4835
4835
  }
4836
4836
  p && (a.set(c, d), n(d, c, t, i, a), a.delete(c)), Rd(s, e, d);
4837
4837
  }
4838
4838
  function Xf(s, r, e, t, n) {
4839
4839
  s !== r && Gw(r, function(i, a) {
4840
- if (n || (n = new On()), hn(i))
4840
+ if (n || (n = new Dn()), pn(i))
4841
4841
  Zw(s, r, a, e, Xf, t, n);
4842
4842
  else {
4843
4843
  var o = t ? t(_d(s, a), i, a + "", s, r, n) : void 0;
@@ -5371,7 +5371,7 @@ var U = /* @__PURE__ */ function(s) {
5371
5371
  return n;
5372
5372
  }
5373
5373
  return R(r, s), P(r);
5374
- }(/* @__PURE__ */ Dn(Error));
5374
+ }(/* @__PURE__ */ Ln(Error));
5375
5375
  function Rc(s, r, e, t) {
5376
5376
  if (t instanceof U)
5377
5377
  throw t;
@@ -5417,7 +5417,7 @@ function EP(s, r) {
5417
5417
  return function(e, t, n) {
5418
5418
  if (n)
5419
5419
  return Zp(n, s, r);
5420
- var i = Mn(Reflect.ownKeys(e.prototype).filter(function(d) {
5420
+ var i = On(Reflect.ownKeys(e.prototype).filter(function(d) {
5421
5421
  return d !== "constructor";
5422
5422
  })), a;
5423
5423
  try {
@@ -5494,7 +5494,7 @@ var _P = function(r, e, t) {
5494
5494
  });
5495
5495
  if (k === -1)
5496
5496
  throw new Error("Invalid reducer provided, it must contain atleast one zero");
5497
- var b = 5 - k, T = k + 1, E = (100 - y) / b, I = y / T, M = Mn(e), _;
5497
+ var b = 5 - k, T = k + 1, E = (100 - y) / b, I = y / T, M = On(e), _;
5498
5498
  try {
5499
5499
  for (M.s(); !(_ = M.n()).done; ) {
5500
5500
  var O = _.value, L = void 0;
@@ -6164,7 +6164,7 @@ var GP = /* @__PURE__ */ function(s) {
6164
6164
  }]]);
6165
6165
  }
6166
6166
  return R(r, s), P(r);
6167
- }(A), Nn = new GP(), JP = /* @__PURE__ */ function(s) {
6167
+ }(A), Vn = new GP(), JP = /* @__PURE__ */ function(s) {
6168
6168
  function r() {
6169
6169
  return w(this, r), C(this, r, ["media.ProducerPayload", [{
6170
6170
  no: 1,
@@ -6223,7 +6223,7 @@ var GP = /* @__PURE__ */ function(s) {
6223
6223
  T: 8
6224
6224
  /*ScalarType.BOOL*/
6225
6225
  }, { no: 3, name: "description", kind: "message", T: function() {
6226
- return Nn;
6226
+ return Vn;
6227
6227
  } }, {
6228
6228
  no: 4,
6229
6229
  name: "private_ice",
@@ -6268,7 +6268,7 @@ var GP = /* @__PURE__ */ function(s) {
6268
6268
  T: 9
6269
6269
  /*ScalarType.STRING*/
6270
6270
  }, { no: 2, name: "description", kind: "message", T: function() {
6271
- return Nn;
6271
+ return Vn;
6272
6272
  } }, {
6273
6273
  no: 3,
6274
6274
  name: "transcription_enabled",
@@ -6295,7 +6295,7 @@ var GP = /* @__PURE__ */ function(s) {
6295
6295
  T: 9
6296
6296
  /*ScalarType.STRING*/
6297
6297
  }, { no: 2, name: "description", kind: "message", T: function() {
6298
- return Nn;
6298
+ return Vn;
6299
6299
  } }]]);
6300
6300
  }
6301
6301
  return R(r, s), P(r);
@@ -6308,7 +6308,7 @@ var GP = /* @__PURE__ */ function(s) {
6308
6308
  T: 9
6309
6309
  /*ScalarType.STRING*/
6310
6310
  }, { no: 2, name: "description", kind: "message", T: function() {
6311
- return Nn;
6311
+ return Vn;
6312
6312
  } }]]);
6313
6313
  }
6314
6314
  return R(r, s), P(r);
@@ -6781,7 +6781,7 @@ var RS = /* @__PURE__ */ function(s) {
6781
6781
  T: 8
6782
6782
  /*ScalarType.BOOL*/
6783
6783
  }, { no: 4, name: "description", kind: "message", T: function() {
6784
- return Nn;
6784
+ return Vn;
6785
6785
  } }, {
6786
6786
  no: 5,
6787
6787
  name: "msid",
@@ -6875,7 +6875,7 @@ var BS = /* @__PURE__ */ function(s) {
6875
6875
  T: 9
6876
6876
  /*ScalarType.STRING*/
6877
6877
  }, { no: 2, name: "description", kind: "message", T: function() {
6878
- return Nn;
6878
+ return Vn;
6879
6879
  } }, {
6880
6880
  no: 3,
6881
6881
  name: "producing_transport_id",
@@ -6896,7 +6896,7 @@ var BS = /* @__PURE__ */ function(s) {
6896
6896
  T: 9
6897
6897
  /*ScalarType.STRING*/
6898
6898
  }, { no: 2, name: "description", kind: "message", T: function() {
6899
- return Nn;
6899
+ return Vn;
6900
6900
  } }, {
6901
6901
  no: 3,
6902
6902
  name: "consuming_transport_id",
@@ -7214,7 +7214,7 @@ var vE = /* @__PURE__ */ function(s) {
7214
7214
  }, { no: 2, name: "consumer_ids_map", kind: "message", T: function() {
7215
7215
  return sg;
7216
7216
  } }, { no: 3, name: "description", kind: "message", T: function() {
7217
- return Nn;
7217
+ return Vn;
7218
7218
  } }]]);
7219
7219
  }
7220
7220
  return R(r, s), P(r);
@@ -7233,7 +7233,7 @@ var vE = /* @__PURE__ */ function(s) {
7233
7233
  T: 9
7234
7234
  /*ScalarType.STRING*/
7235
7235
  }, { no: 4, name: "description", kind: "message", T: function() {
7236
- return Nn;
7236
+ return Vn;
7237
7237
  } }]]);
7238
7238
  }
7239
7239
  return R(r, s), P(r);
@@ -7295,14 +7295,14 @@ new wE();
7295
7295
  var PE = /* @__PURE__ */ function(s) {
7296
7296
  function r() {
7297
7297
  return w(this, r), C(this, r, ["media.edge.ProducerClosingResponse", [{ no: 1, name: "description", kind: "message", T: function() {
7298
- return Nn;
7298
+ return Vn;
7299
7299
  } }]]);
7300
7300
  }
7301
7301
  return R(r, s), P(r);
7302
7302
  }(A), SE = new PE(), EE = /* @__PURE__ */ function(s) {
7303
7303
  function r() {
7304
7304
  return w(this, r), C(this, r, ["media.edge.ConsumerClosingResponse", [{ no: 1, name: "description", kind: "message", T: function() {
7305
- return Nn;
7305
+ return Vn;
7306
7306
  } }]]);
7307
7307
  }
7308
7308
  return R(r, s), P(r);
@@ -7376,7 +7376,14 @@ var IE = /* @__PURE__ */ function(s) {
7376
7376
  function r() {
7377
7377
  return w(this, r), C(this, r, ["media.edge.PeerJoinBroadcastResponse", [{ no: 1, name: "participant", kind: "message", T: function() {
7378
7378
  return lg;
7379
- } }]]);
7379
+ } }, {
7380
+ no: 2,
7381
+ name: "producer_handover_from_peer_id",
7382
+ kind: "scalar",
7383
+ opt: !0,
7384
+ T: 9
7385
+ /*ScalarType.STRING*/
7386
+ }]]);
7380
7387
  }
7381
7388
  return R(r, s), P(r);
7382
7389
  }(A), av = new VE(), $E = /* @__PURE__ */ function(s) {
@@ -10619,7 +10626,7 @@ function kg(s, r) {
10619
10626
  return e[t] = r | s[t], e;
10620
10627
  }, {});
10621
10628
  }
10622
- var Q = pc(D_, U_), zt = pc(L_, j_), Ii = pc(N_, F_), Mi = pc(V_, H_), ma = kg(yg, 16777216), An = kg(yg, 50331648), $c = pc($_, B_), q_ = Object.defineProperty, W_ = Object.getOwnPropertyDescriptor, _a = function(r, e, t, n) {
10629
+ var Q = pc(D_, U_), zt = pc(L_, j_), Ii = pc(N_, F_), Mi = pc(V_, H_), ma = kg(yg, 16777216), In = kg(yg, 50331648), $c = pc($_, B_), q_ = Object.defineProperty, W_ = Object.getOwnPropertyDescriptor, _a = function(r, e, t, n) {
10623
10630
  for (var i = n > 1 ? void 0 : n ? W_(e, t) : e, a = r.length - 1, o; a >= 0; a--)
10624
10631
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
10625
10632
  return n && i && q_(e, t, i), i;
@@ -10861,7 +10868,7 @@ var al = /* @__PURE__ */ function(s) {
10861
10868
  }, { key: "isNetworkError", get: function() {
10862
10869
  return this.status === void 0 && !this.isTimeout;
10863
10870
  } }]);
10864
- }(/* @__PURE__ */ Dn(Error)), wv = /* @__PURE__ */ function() {
10871
+ }(/* @__PURE__ */ Ln(Error)), wv = /* @__PURE__ */ function() {
10865
10872
  function s(r) {
10866
10873
  w(this, s), this.defaults = void 0, this.defaults = { baseURL: r.baseURL, headers: { common: {} }, timeout: r.timeout, retry: r.retry, retryDelay: r.retryDelay };
10867
10874
  }
@@ -11318,12 +11325,12 @@ var eA = Object.defineProperty, tA = Object.getOwnPropertyDescriptor, ai = funct
11318
11325
  for (var i = n > 1 ? void 0 : n ? tA(e, t) : e, a = r.length - 1, o; a >= 0; a--)
11319
11326
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
11320
11327
  return n && i && eA(e, t, i), i;
11321
- }, rA = ["text", "image", "file", "custom", "poll"], Uc = { maxInvocations: 180, period: 60 }, pn = (x = /* @__PURE__ */ S("self"), $n = /* @__PURE__ */ S("participants"), qe = /* @__PURE__ */ S("chatSocketHandler"), da = /* @__PURE__ */ S("context"), Wc = /* @__PURE__ */ S("connectionHandler"), Ys = /* @__PURE__ */ S("socketJoined"), /* @__PURE__ */ function(s) {
11328
+ }, rA = ["text", "image", "file", "custom", "poll"], Uc = { maxInvocations: 180, period: 60 }, vn = (x = /* @__PURE__ */ S("self"), Un = /* @__PURE__ */ S("participants"), qe = /* @__PURE__ */ S("chatSocketHandler"), da = /* @__PURE__ */ S("context"), Wc = /* @__PURE__ */ S("connectionHandler"), Ys = /* @__PURE__ */ S("socketJoined"), /* @__PURE__ */ function(s) {
11322
11329
  function r(e, t, n, i) {
11323
11330
  var a;
11324
11331
  w(this, r);
11325
11332
  var o = e.getValue("logger");
11326
- return a = C(this, r, [o]), Object.defineProperty(a, Ys, { get: iA, set: void 0 }), Object.defineProperty(a, Wc, { get: nA, set: void 0 }), a.messages = void 0, Object.defineProperty(a, x, { writable: !0, value: void 0 }), Object.defineProperty(a, $n, { writable: !0, value: void 0 }), Object.defineProperty(a, qe, { writable: !0, value: void 0 }), Object.defineProperty(a, da, { writable: !0, value: void 0 }), a.maxTextLimit = 2e3, u(a, da)[da] = e, u(a, qe)[qe] = t, u(a, x)[x] = n, u(a, $n)[$n] = i, a.messages = [], a;
11333
+ return a = C(this, r, [o]), Object.defineProperty(a, Ys, { get: iA, set: void 0 }), Object.defineProperty(a, Wc, { get: nA, set: void 0 }), a.messages = void 0, Object.defineProperty(a, x, { writable: !0, value: void 0 }), Object.defineProperty(a, Un, { writable: !0, value: void 0 }), Object.defineProperty(a, qe, { writable: !0, value: void 0 }), Object.defineProperty(a, da, { writable: !0, value: void 0 }), a.maxTextLimit = 2e3, u(a, da)[da] = e, u(a, qe)[qe] = t, u(a, x)[x] = n, u(a, Un)[Un] = i, a.messages = [], a;
11327
11334
  }
11328
11335
  return R(r, s), P(r, [{
11329
11336
  key: "telemetry",
@@ -11412,7 +11419,7 @@ var eA = Object.defineProperty, tA = Object.getOwnPropertyDescriptor, ai = funct
11412
11419
  }
11413
11420
  throw this.logger.error("sendTextMessage::message_can_not_be_empty"), new U("Message can not be empty.", "0502");
11414
11421
  case 5:
11415
- p = [], a && a.length > 0 && (a.push(u(this, x)[x].id), p = u(this, $n)[$n].joined.toArray().filter(function(f) {
11422
+ p = [], a && a.length > 0 && (a.push(u(this, x)[x].id), p = u(this, Un)[Un].joined.toArray().filter(function(f) {
11416
11423
  return a.includes(f.id);
11417
11424
  }).map(function(f) {
11418
11425
  return f.userId;
@@ -11468,7 +11475,7 @@ var eA = Object.defineProperty, tA = Object.getOwnPropertyDescriptor, ai = funct
11468
11475
  case 6:
11469
11476
  return f = T.v, g = f.getLocation, y = f.putLocation, T.n = 7, v.uploadFile(i, y);
11470
11477
  case 7:
11471
- k = [], a && a.length > 0 && (a.push(u(this, x)[x].id), k = u(this, $n)[$n].joined.toArray().filter(function(E) {
11478
+ k = [], a && a.length > 0 && (a.push(u(this, x)[x].id), k = u(this, Un)[Un].joined.toArray().filter(function(E) {
11472
11479
  return a.includes(E.id);
11473
11480
  }).map(function(E) {
11474
11481
  return E.userId;
@@ -11521,7 +11528,7 @@ var eA = Object.defineProperty, tA = Object.getOwnPropertyDescriptor, ai = funct
11521
11528
  case 5:
11522
11529
  return v = T.v, f = v.getLocation, g = v.putLocation, T.n = 6, p.uploadFile(i, g);
11523
11530
  case 6:
11524
- y = [], a && a.length > 0 && (a.push(u(this, x)[x].id), y = u(this, $n)[$n].joined.toArray().filter(function(E) {
11531
+ y = [], a && a.length > 0 && (a.push(u(this, x)[x].id), y = u(this, Un)[Un].joined.toArray().filter(function(E) {
11525
11532
  return a.includes(E.id);
11526
11533
  }).map(function(E) {
11527
11534
  return E.userId;
@@ -11999,23 +12006,23 @@ function nA() {
11999
12006
  function iA() {
12000
12007
  return u(this, Wc)[Wc].socketJoined === !0;
12001
12008
  }
12002
- ai([D.trace("Chat.sendTextMessage"), Yr(Uc)], pn.prototype, "sendTextMessage", 1);
12003
- ai([D.trace("Chat.sendImageMessage"), Yr({ maxInvocations: 20, period: 60 })], pn.prototype, "sendImageMessage", 1);
12004
- ai([D.trace("Chat.sendFileMessage"), Yr({ maxInvocations: 20, period: 60 })], pn.prototype, "sendFileMessage", 1);
12005
- ai([D.trace("Chat.sendMessage"), Yr({ maxInvocations: 180, period: 60 })], pn.prototype, "sendMessage", 1);
12006
- ai([D.trace("Chat.editTextMessage")], pn.prototype, "editTextMessage", 1);
12007
- ai([D.trace("Chat.editImageMessage")], pn.prototype, "editImageMessage", 1);
12008
- ai([D.trace("Chat.editFileMessage")], pn.prototype, "editFileMessage", 1);
12009
- ai([D.trace("Chat.editMessage")], pn.prototype, "editMessage", 1);
12010
- ai([D.trace("Chat.deleteMessage")], pn.prototype, "deleteMessage", 1);
12011
- pn = ai([or("0500")], pn);
12009
+ ai([D.trace("Chat.sendTextMessage"), Yr(Uc)], vn.prototype, "sendTextMessage", 1);
12010
+ ai([D.trace("Chat.sendImageMessage"), Yr({ maxInvocations: 20, period: 60 })], vn.prototype, "sendImageMessage", 1);
12011
+ ai([D.trace("Chat.sendFileMessage"), Yr({ maxInvocations: 20, period: 60 })], vn.prototype, "sendFileMessage", 1);
12012
+ ai([D.trace("Chat.sendMessage"), Yr({ maxInvocations: 180, period: 60 })], vn.prototype, "sendMessage", 1);
12013
+ ai([D.trace("Chat.editTextMessage")], vn.prototype, "editTextMessage", 1);
12014
+ ai([D.trace("Chat.editImageMessage")], vn.prototype, "editImageMessage", 1);
12015
+ ai([D.trace("Chat.editFileMessage")], vn.prototype, "editFileMessage", 1);
12016
+ ai([D.trace("Chat.editMessage")], vn.prototype, "editMessage", 1);
12017
+ ai([D.trace("Chat.deleteMessage")], vn.prototype, "deleteMessage", 1);
12018
+ vn = ai([or("0500")], vn);
12012
12019
  var aA = Object.defineProperty, sA = Object.getOwnPropertyDescriptor, oA = function(r, e, t, n) {
12013
12020
  for (var i = n > 1 ? void 0 : n ? sA(e, t) : e, a = r.length - 1, o; a >= 0; a--)
12014
12021
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
12015
12022
  return n && i && aA(e, t, i), i;
12016
- }, ua = (Un = /* @__PURE__ */ S("context"), /* @__PURE__ */ function() {
12023
+ }, ua = (jn = /* @__PURE__ */ S("context"), /* @__PURE__ */ function() {
12017
12024
  function s(r, e, t, n) {
12018
- w(this, s), this.chat = void 0, this.chatSocketHandler = void 0, this.self = void 0, Object.defineProperty(this, Un, { writable: !0, value: void 0 }), u(this, Un)[Un] = r, this.chatSocketHandler = e, this.chat = new pn(r, e, t, n), this.self = t, this.setupEvents();
12025
+ w(this, s), this.chat = void 0, this.chatSocketHandler = void 0, this.self = void 0, Object.defineProperty(this, jn, { writable: !0, value: void 0 }), u(this, jn)[jn] = r, this.chatSocketHandler = e, this.chat = new vn(r, e, t, n), this.self = t, this.setupEvents();
12019
12026
  }
12020
12027
  return P(s, [{
12021
12028
  key: "telemetry",
@@ -12025,7 +12032,7 @@ var aA = Object.defineProperty, sA = Object.getOwnPropertyDescriptor, oA = funct
12025
12032
  * Not for external use
12026
12033
  */
12027
12034
  function() {
12028
- return u(this, Un)[Un].getValue("telemetry");
12035
+ return u(this, jn)[jn].getValue("telemetry");
12029
12036
  }
12030
12037
  )
12031
12038
  /**
@@ -12033,7 +12040,7 @@ var aA = Object.defineProperty, sA = Object.getOwnPropertyDescriptor, oA = funct
12033
12040
  * Not for external use
12034
12041
  */
12035
12042
  }, { key: "logger", get: function() {
12036
- return u(this, Un)[Un].getValue("logger");
12043
+ return u(this, jn)[jn].getValue("logger");
12037
12044
  } }, { key: "getChatMessages", value: function() {
12038
12045
  var r = m(/* @__PURE__ */ h().m(function t() {
12039
12046
  var n, i;
@@ -12069,7 +12076,7 @@ var aA = Object.defineProperty, sA = Object.getOwnPropertyDescriptor, oA = funct
12069
12076
  return e;
12070
12077
  }() }, { key: "setupEvents", value: function() {
12071
12078
  var e = this;
12072
- u(this, Un)[Un].getValue("peerSessionStore").on($.SOCKET_SERVICE_ROOM_JOINED, /* @__PURE__ */ m(/* @__PURE__ */ h().m(function t() {
12079
+ u(this, jn)[jn].getValue("peerSessionStore").on($.SOCKET_SERVICE_ROOM_JOINED, /* @__PURE__ */ m(/* @__PURE__ */ h().m(function t() {
12073
12080
  return h().w(function(n) {
12074
12081
  for (; ; )
12075
12082
  switch (n.n) {
@@ -12247,9 +12254,9 @@ var pA = Object.defineProperty, vA = Object.getOwnPropertyDescriptor, fA = funct
12247
12254
  for (var i = n > 1 ? void 0 : n ? vA(e, t) : e, a = r.length - 1, o; a >= 0; a--)
12248
12255
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
12249
12256
  return n && i && pA(e, t, i), i;
12250
- }, go = (Zr = /* @__PURE__ */ S("context"), Qi = /* @__PURE__ */ S("self"), jn = /* @__PURE__ */ S("pollSocketHandler"), /* @__PURE__ */ function() {
12257
+ }, go = (Zr = /* @__PURE__ */ S("context"), Qi = /* @__PURE__ */ S("self"), Fn = /* @__PURE__ */ S("pollSocketHandler"), /* @__PURE__ */ function() {
12251
12258
  function s(r, e, t) {
12252
- w(this, s), this.polls = void 0, Object.defineProperty(this, Zr, { writable: !0, value: void 0 }), Object.defineProperty(this, Qi, { writable: !0, value: void 0 }), Object.defineProperty(this, jn, { writable: !0, value: void 0 }), this.polls = new $d(r, e, t), u(this, Qi)[Qi] = e, u(this, Zr)[Zr] = r, u(this, jn)[jn] = t, this.setupEvents();
12259
+ w(this, s), this.polls = void 0, Object.defineProperty(this, Zr, { writable: !0, value: void 0 }), Object.defineProperty(this, Qi, { writable: !0, value: void 0 }), Object.defineProperty(this, Fn, { writable: !0, value: void 0 }), this.polls = new $d(r, e, t), u(this, Qi)[Qi] = e, u(this, Zr)[Zr] = r, u(this, Fn)[Fn] = t, this.setupEvents();
12253
12260
  }
12254
12261
  return P(s, [{
12255
12262
  key: "telemetry",
@@ -12281,13 +12288,13 @@ var pA = Object.defineProperty, vA = Object.getOwnPropertyDescriptor, fA = funct
12281
12288
  u(e, Zr)[Zr].getValue("peerSessionStore").on($.SOCKET_SERVICE_ROOM_JOINED, function() {
12282
12289
  e.getPolls();
12283
12290
  }), Object.keys(t).map(Number).forEach(function(o) {
12284
- u(e, jn)[jn].on(o, t[o]);
12291
+ u(e, Fn)[Fn].on(o, t[o]);
12285
12292
  });
12286
12293
  }, i = function() {
12287
12294
  u(e, Zr)[Zr].getValue("peerSessionStore").on($.SOCKET_SERVICE_ROOM_JOINED, function() {
12288
12295
  e.getPolls();
12289
12296
  }), Object.keys(t).map(Number).forEach(function(o) {
12290
- u(e, jn)[jn].removeListeners(o);
12297
+ u(e, Fn)[Fn].removeListeners(o);
12291
12298
  });
12292
12299
  };
12293
12300
  u(this, Qi)[Qi].permissions.on("permissionsUpdate", /* @__PURE__ */ function() {
@@ -12341,7 +12348,7 @@ var pA = Object.defineProperty, vA = Object.getOwnPropertyDescriptor, fA = funct
12341
12348
  for (; ; )
12342
12349
  switch (o.n) {
12343
12350
  case 0:
12344
- return o.n = 1, u(this, jn)[jn].getPolls();
12351
+ return o.n = 1, u(this, Fn)[Fn].getPolls();
12345
12352
  case 1:
12346
12353
  if (n = o.v, n != null && n.payload) {
12347
12354
  o.n = 2;
@@ -12391,12 +12398,12 @@ var gA = Object.defineProperty, mA = Object.getOwnPropertyDescriptor, yA = funct
12391
12398
  return n && i && gA(e, t, i), i;
12392
12399
  }, wg = /* @__PURE__ */ function(s) {
12393
12400
  return s[s.User = 0] = "User", s[s.Meeting = 1] = "Meeting", s;
12394
- }(wg || {}), Ud = (ha = /* @__PURE__ */ S("context"), Xs = /* @__PURE__ */ S("connectionHandler"), Fn = /* @__PURE__ */ S("self"), Zs = /* @__PURE__ */ S("roomSocketHandler"), /* @__PURE__ */ function(s) {
12401
+ }(wg || {}), Ud = (ha = /* @__PURE__ */ S("context"), Xs = /* @__PURE__ */ S("connectionHandler"), Hn = /* @__PURE__ */ S("self"), Zs = /* @__PURE__ */ S("roomSocketHandler"), /* @__PURE__ */ function(s) {
12395
12402
  function r(e, t, n, i, a) {
12396
12403
  var o;
12397
12404
  w(this, r);
12398
12405
  var c = e.getValue("logger");
12399
- return o = C(this, r, [c]), Object.defineProperty(o, Xs, { get: kA, set: void 0 }), o.selfActiveTab = void 0, o.broadcastTabChanges = void 0, Object.defineProperty(o, ha, { writable: !0, value: void 0 }), Object.defineProperty(o, Fn, { writable: !0, value: void 0 }), Object.defineProperty(o, Zs, { writable: !0, value: void 0 }), o.viewType = void 0, o.meetingStartedTimestamp = void 0, o.meetingTitle = void 0, o.sessionId = void 0, u(o, ha)[ha] = e, u(o, Fn)[Fn] = t, o.viewType = n, u(o, Zs)[Zs] = i, o.meetingTitle = a, o.broadcastTabChanges = t.permissions.canSpotlight, o;
12406
+ return o = C(this, r, [c]), Object.defineProperty(o, Xs, { get: kA, set: void 0 }), o.selfActiveTab = void 0, o.broadcastTabChanges = void 0, Object.defineProperty(o, ha, { writable: !0, value: void 0 }), Object.defineProperty(o, Hn, { writable: !0, value: void 0 }), Object.defineProperty(o, Zs, { writable: !0, value: void 0 }), o.viewType = void 0, o.meetingStartedTimestamp = void 0, o.meetingTitle = void 0, o.sessionId = void 0, u(o, ha)[ha] = e, u(o, Hn)[Hn] = t, o.viewType = n, u(o, Zs)[Zs] = i, o.meetingTitle = a, o.broadcastTabChanges = t.permissions.canSpotlight, o;
12400
12407
  }
12401
12408
  return R(r, s), P(r, [{ key: "socketState", get: function() {
12402
12409
  return u(this, Xs)[Xs].socketState;
@@ -12414,7 +12421,7 @@ var gA = Object.defineProperty, mA = Object.getOwnPropertyDescriptor, yA = funct
12414
12421
  }, {
12415
12422
  key: "setBroadcastTabChanges",
12416
12423
  value: function(t) {
12417
- if (!u(this, Fn)[Fn].permissions.canSpotlight)
12424
+ if (!u(this, Hn)[Hn].permissions.canSpotlight)
12418
12425
  throw this.logger.error("Spotlight::setSpotlighted::permission_denied"), new U("User does not have permission to toggle spotlight", "0801");
12419
12426
  this.broadcastTabChanges = t, this.emit("broadcastTabChangesUpdate", this.broadcastTabChanges), this.broadcastTabChanges && this.assertActiveTabToRoom();
12420
12427
  }
@@ -12427,11 +12434,11 @@ var gA = Object.defineProperty, mA = Object.getOwnPropertyDescriptor, yA = funct
12427
12434
  key: "setSelfActiveTab",
12428
12435
  value: function(t, n) {
12429
12436
  var i;
12430
- this.logger.info("Spotlight::setActiveTab", { spotlight: { currentTab: { id: t.id, type: t.type } } }), this.selfActiveTab = t, n === 0 && this.emit("selfTabUpdate", t), (i = u(this, Fn)[Fn].permissions) !== null && i !== void 0 && i.canSpotlight && this.broadcastTabChanges && n === 0 && this.assertActiveTabToRoom();
12437
+ this.logger.info("Spotlight::setActiveTab", { spotlight: { currentTab: { id: t.id, type: t.type } } }), this.selfActiveTab = t, n === 0 && this.emit("selfTabUpdate", t), (i = u(this, Hn)[Hn].permissions) !== null && i !== void 0 && i.canSpotlight && this.broadcastTabChanges && n === 0 && this.assertActiveTabToRoom();
12431
12438
  }
12432
12439
  /** @access private */
12433
12440
  }, { key: "assertActiveTabToRoom", value: function() {
12434
- u(this, Zs)[Zs].broadcastMessage("spotlight", { userId: u(this, Fn)[Fn].userId, currentTab: this.selfActiveTab });
12441
+ u(this, Zs)[Zs].broadcastMessage("spotlight", { userId: u(this, Hn)[Hn].userId, currentTab: this.selfActiveTab });
12435
12442
  } }]);
12436
12443
  }(Qr));
12437
12444
  function kA() {
@@ -12439,7 +12446,7 @@ function kA() {
12439
12446
  }
12440
12447
  Ud = yA([or("0800")], Ud);
12441
12448
  function TA(s) {
12442
- var r = "", e = [""], t = [e], n = 0, i = 0, a = !0, o, c = Mn(s), l;
12449
+ var r = "", e = [""], t = [e], n = 0, i = 0, a = !0, o, c = On(s), l;
12443
12450
  try {
12444
12451
  for (c.s(); !(l = c.n()).done; )
12445
12452
  o = l.value, o === '"' ? (a && o === r && (e[n] += o), a = !a) : o === "," && a ? o = e[++n] = "" : o === `
@@ -13097,9 +13104,9 @@ var MA = Object.defineProperty, OA = Object.getOwnPropertyDescriptor, DA = funct
13097
13104
  for (var i = n > 1 ? void 0 : n ? OA(e, t) : e, a = r.length - 1, o; a >= 0; a--)
13098
13105
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
13099
13106
  return n && i && MA(e, t, i), i;
13100
- }, fn = /* @__PURE__ */ S("self"), er = /* @__PURE__ */ S("participants"), gn = /* @__PURE__ */ S("stageSocketHandler"), xo = /* @__PURE__ */ S("stageRequestCount"), lt = /* @__PURE__ */ S("context"), Cg = /* @__PURE__ */ function() {
13107
+ }, gn = /* @__PURE__ */ S("self"), er = /* @__PURE__ */ S("participants"), mn = /* @__PURE__ */ S("stageSocketHandler"), xo = /* @__PURE__ */ S("stageRequestCount"), lt = /* @__PURE__ */ S("context"), Cg = /* @__PURE__ */ function() {
13101
13108
  function s(r, e, t, n, i) {
13102
- w(this, s), this.stage = void 0, Object.defineProperty(this, fn, { writable: !0, value: void 0 }), Object.defineProperty(this, er, { writable: !0, value: void 0 }), Object.defineProperty(this, gn, { writable: !0, value: void 0 }), Object.defineProperty(this, xo, { writable: !0, value: 0 }), Object.defineProperty(this, lt, { writable: !0, value: void 0 }), u(this, lt)[lt] = r, this.stage = new Aa(r, n, i, e, t), u(this, gn)[gn] = e, u(this, fn)[fn] = n, u(this, er)[er] = i, this.setupEvents();
13109
+ w(this, s), this.stage = void 0, Object.defineProperty(this, gn, { writable: !0, value: void 0 }), Object.defineProperty(this, er, { writable: !0, value: void 0 }), Object.defineProperty(this, mn, { writable: !0, value: void 0 }), Object.defineProperty(this, xo, { writable: !0, value: 0 }), Object.defineProperty(this, lt, { writable: !0, value: void 0 }), u(this, lt)[lt] = r, this.stage = new Aa(r, n, i, e, t), u(this, mn)[mn] = e, u(this, gn)[gn] = n, u(this, er)[er] = i, this.setupEvents();
13103
13110
  }
13104
13111
  return P(s, [{
13105
13112
  key: "telemetry",
@@ -13122,20 +13129,20 @@ var MA = Object.defineProperty, OA = Object.getOwnPropertyDescriptor, DA = funct
13122
13129
  var e = this;
13123
13130
  u(this, lt)[lt].subscribe("stageStatus", function(t) {
13124
13131
  e.stage.emit("stageStatusUpdate", t);
13125
- }), u(this, gn)[gn].on(Q.grantStageAccess, function() {
13126
- u(e, fn)[fn].permissions.stageAccess !== se.Allowed && (e.stage.emit("stageRequestApproved"), e.setStageStatus("ACCEPTED_TO_JOIN_STAGE"));
13127
- }), u(this, gn)[gn].on(Q.peerStageStatusUpdate, function(t) {
13128
- t !== void 0 && (t.peerId === u(e, fn)[fn].id ? e.selfStageStatusHandler(t) : e.peerStageStatusHandler(t));
13129
- }), u(this, gn)[gn].on(Q.denyStageAccess, function() {
13130
- u(e, fn)[fn].permissions.stageAccess !== se.Allowed && (e.stage.emit("stageRequestRejected"), e.setStageStatus("OFF_STAGE"));
13131
- }), u(this, gn)[gn].on(Q.getStageRequests, /* @__PURE__ */ function() {
13132
+ }), u(this, mn)[mn].on(Q.grantStageAccess, function() {
13133
+ u(e, gn)[gn].permissions.stageAccess !== se.Allowed && (e.stage.emit("stageRequestApproved"), e.setStageStatus("ACCEPTED_TO_JOIN_STAGE"));
13134
+ }), u(this, mn)[mn].on(Q.peerStageStatusUpdate, function(t) {
13135
+ t !== void 0 && (t.peerId === u(e, gn)[gn].id ? e.selfStageStatusHandler(t) : e.peerStageStatusHandler(t));
13136
+ }), u(this, mn)[mn].on(Q.denyStageAccess, function() {
13137
+ u(e, gn)[gn].permissions.stageAccess !== se.Allowed && (e.stage.emit("stageRequestRejected"), e.setStageStatus("OFF_STAGE"));
13138
+ }), u(this, mn)[mn].on(Q.getStageRequests, /* @__PURE__ */ function() {
13132
13139
  var t = m(/* @__PURE__ */ h().m(function n(i) {
13133
13140
  var a, o;
13134
13141
  return h().w(function(c) {
13135
13142
  for (; ; )
13136
13143
  switch (c.n) {
13137
13144
  case 0:
13138
- if (u(e, fn)[fn].permissions.stageAccess === se.Allowed) {
13145
+ if (u(e, gn)[gn].permissions.stageAccess === se.Allowed) {
13139
13146
  c.n = 1;
13140
13147
  break;
13141
13148
  }
@@ -13254,14 +13261,14 @@ var LA = Object.defineProperty, NA = Object.getOwnPropertyDescriptor, tp = funct
13254
13261
  for (var i = n > 1 ? void 0 : n ? NA(e, t) : e, a = r.length - 1, o; a >= 0; a--)
13255
13262
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
13256
13263
  return n && i && LA(e, t, i), i;
13257
- }, ic = (Hn = /* @__PURE__ */ S("self"), kr = /* @__PURE__ */ S("activePluginsStore"), eo = /* @__PURE__ */ S("context"), to = /* @__PURE__ */ S("component"), Bn = /* @__PURE__ */ S("startedAt"), /* @__PURE__ */ function(s) {
13264
+ }, ic = (Bn = /* @__PURE__ */ S("self"), kr = /* @__PURE__ */ S("activePluginsStore"), eo = /* @__PURE__ */ S("context"), to = /* @__PURE__ */ S("component"), qn = /* @__PURE__ */ S("startedAt"), /* @__PURE__ */ function(s) {
13258
13265
  function r(e, t, n, i) {
13259
13266
  var a;
13260
13267
  w(this, r);
13261
13268
  var o = e.getValue("logger");
13262
- a = C(this, r, [o]), a.name = void 0, a.icon = void 0, a.id = void 0, a.permissions = void 0, Object.defineProperty(a, Hn, { writable: !0, value: void 0 }), Object.defineProperty(a, kr, { writable: !0, value: void 0 }), Object.defineProperty(a, eo, { writable: !0, value: void 0 }), Object.defineProperty(a, to, { writable: !0, value: void 0 }), Object.defineProperty(a, Bn, { writable: !0, value: void 0 }), a.active = void 0, a.enabledBy = void 0, u(a, eo)[eo] = e;
13269
+ a = C(this, r, [o]), a.name = void 0, a.icon = void 0, a.id = void 0, a.permissions = void 0, Object.defineProperty(a, Bn, { writable: !0, value: void 0 }), Object.defineProperty(a, kr, { writable: !0, value: void 0 }), Object.defineProperty(a, eo, { writable: !0, value: void 0 }), Object.defineProperty(a, to, { writable: !0, value: void 0 }), Object.defineProperty(a, qn, { writable: !0, value: void 0 }), a.active = void 0, a.enabledBy = void 0, u(a, eo)[eo] = e;
13263
13270
  var c = e.getValue("meetingId");
13264
- return a.id = "".concat(c, ":").concat(t.id), a.name = t.name, a.icon = t.icon, u(a, to)[to] = t.component, a.permissions = t.permissions, u(a, Hn)[Hn] = i, u(a, kr)[kr] = n, a.active = !1, a.enabledBy = "", a;
13271
+ return a.id = "".concat(c, ":").concat(t.id), a.name = t.name, a.icon = t.icon, u(a, to)[to] = t.component, a.permissions = t.permissions, u(a, Bn)[Bn] = i, u(a, kr)[kr] = n, a.active = !1, a.enabledBy = "", a;
13265
13272
  }
13266
13273
  return R(r, s), P(r, [{
13267
13274
  key: "component",
@@ -13284,7 +13291,7 @@ var LA = Object.defineProperty, NA = Object.getOwnPropertyDescriptor, tp = funct
13284
13291
  } }, {
13285
13292
  key: "activateForSelf",
13286
13293
  value: function() {
13287
- u(this, Bn)[Bn] = new Date(), this.active = !0, this.emit("stateUpdate", { active: this.active, pluginId: this.id }), this.emit("enabled");
13294
+ u(this, qn)[qn] = new Date(), this.active = !0, this.emit("stateUpdate", { active: this.active, pluginId: this.id }), this.emit("enabled");
13288
13295
  }
13289
13296
  /**
13290
13297
  * @access private
@@ -13292,7 +13299,7 @@ var LA = Object.defineProperty, NA = Object.getOwnPropertyDescriptor, tp = funct
13292
13299
  */
13293
13300
  // NOTE: Disable this plugin for the current user.
13294
13301
  }, { key: "deactivateForSelf", value: function() {
13295
- u(this, Bn)[Bn] = void 0, this.active = !1, this.emit("stateUpdate", { active: this.active, pluginId: this.id }), this.emit("closed");
13302
+ u(this, qn)[qn] = void 0, this.active = !1, this.emit("stateUpdate", { active: this.active, pluginId: this.id }), this.emit("closed");
13296
13303
  } }, { key: "activate", value: function() {
13297
13304
  var e = m(/* @__PURE__ */ h().m(function n() {
13298
13305
  var i;
@@ -13318,9 +13325,9 @@ var LA = Object.defineProperty, NA = Object.getOwnPropertyDescriptor, tp = funct
13318
13325
  }
13319
13326
  throw new U("Cannot activate plugin: active plugins store is not available yet.", "0604");
13320
13327
  case 3:
13321
- return a.n = 4, u(this, kr)[kr].set(this.id, { name: this.name, icon: this.icon, id: this.id, enabledBy: u(this, Hn)[Hn].id });
13328
+ return a.n = 4, u(this, kr)[kr].set(this.id, { name: this.name, icon: this.icon, id: this.id, enabledBy: u(this, Bn)[Bn].id });
13322
13329
  case 4:
13323
- this.enabledBy = u(this, Hn)[Hn].id, this.activateForSelf(), this.logger.info("plugin::activated", { plugin: { id: this.id, enabledBy: this.enabledBy, name: this.name } });
13330
+ this.enabledBy = u(this, Bn)[Bn].id, this.activateForSelf(), this.logger.info("plugin::activated", { plugin: { id: this.id, enabledBy: this.enabledBy, name: this.name } });
13324
13331
  case 5:
13325
13332
  return a.a(2);
13326
13333
  }
@@ -13343,7 +13350,7 @@ var LA = Object.defineProperty, NA = Object.getOwnPropertyDescriptor, tp = funct
13343
13350
  }
13344
13351
  return o.a(2);
13345
13352
  case 1:
13346
- if (!(!((i = this.permissions) !== null && i !== void 0 && i.canDeactivate) && this.enabledBy !== u(this, Hn)[Hn].id)) {
13353
+ if (!(!((i = this.permissions) !== null && i !== void 0 && i.canDeactivate) && this.enabledBy !== u(this, Bn)[Bn].id)) {
13347
13354
  o.n = 2;
13348
13355
  break;
13349
13356
  }
@@ -13355,7 +13362,7 @@ var LA = Object.defineProperty, NA = Object.getOwnPropertyDescriptor, tp = funct
13355
13362
  }
13356
13363
  throw new U("Cannot deactivate plugin: active plugins store is not available yet.", "0604");
13357
13364
  case 3:
13358
- return a = u(this, Bn)[Bn] ? new Date().getTime() - u(this, Bn)[Bn].getTime() : 0, o.n = 4, u(this, kr)[kr].set(this.id, null);
13365
+ return a = u(this, qn)[qn] ? new Date().getTime() - u(this, qn)[qn].getTime() : 0, o.n = 4, u(this, kr)[kr].set(this.id, null);
13359
13366
  case 4:
13360
13367
  this.deactivateForSelf(), this.logger.info("plugin::deactivated", { plugin: { id: this.id, name: this.name, duration: a } });
13361
13368
  case 5:
@@ -13436,7 +13443,7 @@ var Ce = /* @__PURE__ */ S("eventEmitter"), ui = /* @__PURE__ */ S("listeners"),
13436
13443
  } }, { key: "toArray", value: function() {
13437
13444
  return Array.from(this.values());
13438
13445
  } }]);
13439
- }(/* @__PURE__ */ Dn(Map)), Pv = /* @__PURE__ */ function(s) {
13446
+ }(/* @__PURE__ */ Ln(Map)), Pv = /* @__PURE__ */ function(s) {
13440
13447
  function r(e) {
13441
13448
  return w(this, r), C(this, r, [{ onAddEvent: "pluginAdded", onDeleteEvent: "pluginDeleted" }, e]);
13442
13449
  }
@@ -13459,9 +13466,9 @@ var jA = Object.defineProperty, FA = Object.getOwnPropertyDescriptor, HA = funct
13459
13466
  for (var i = n > 1 ? void 0 : n ? FA(e, t) : e, a = r.length - 1, o; a >= 0; a--)
13460
13467
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
13461
13468
  return n && i && jA(e, t, i), i;
13462
- }, _g = (Xt = /* @__PURE__ */ S("activePluginsStore"), ya = /* @__PURE__ */ S("storesManager"), tn = /* @__PURE__ */ S("context"), Yn = /* @__PURE__ */ S("socketStateCleanup"), kc = /* @__PURE__ */ S("createStoreOnSocketConnected"), bo = /* @__PURE__ */ S("removeSocketStateListener"), wo = /* @__PURE__ */ S("syncActivePlugins"), Po = /* @__PURE__ */ S("subscribeToStore"), /* @__PURE__ */ function() {
13469
+ }, _g = (Xt = /* @__PURE__ */ S("activePluginsStore"), ya = /* @__PURE__ */ S("storesManager"), tn = /* @__PURE__ */ S("context"), Xn = /* @__PURE__ */ S("socketStateCleanup"), kc = /* @__PURE__ */ S("createStoreOnSocketConnected"), bo = /* @__PURE__ */ S("removeSocketStateListener"), wo = /* @__PURE__ */ S("syncActivePlugins"), Po = /* @__PURE__ */ S("subscribeToStore"), /* @__PURE__ */ function() {
13463
13470
  function s(r, e, t, n) {
13464
- w(this, s), Object.defineProperty(this, Po, { value: GA }), Object.defineProperty(this, wo, { value: WA }), Object.defineProperty(this, bo, { value: qA }), Object.defineProperty(this, kc, { value: BA }), this.plugins = void 0, Object.defineProperty(this, Xt, { writable: !0, value: void 0 }), Object.defineProperty(this, ya, { writable: !0, value: void 0 }), Object.defineProperty(this, tn, { writable: !0, value: void 0 }), Object.defineProperty(this, Yn, { writable: !0, value: null }), u(this, tn)[tn] = r, this.plugins = e, u(this, ya)[ya] = t, u(this, Xt)[Xt] = n, this.setupEvents();
13471
+ w(this, s), Object.defineProperty(this, Po, { value: GA }), Object.defineProperty(this, wo, { value: WA }), Object.defineProperty(this, bo, { value: qA }), Object.defineProperty(this, kc, { value: BA }), this.plugins = void 0, Object.defineProperty(this, Xt, { writable: !0, value: void 0 }), Object.defineProperty(this, ya, { writable: !0, value: void 0 }), Object.defineProperty(this, tn, { writable: !0, value: void 0 }), Object.defineProperty(this, Xn, { writable: !0, value: null }), u(this, tn)[tn] = r, this.plugins = e, u(this, ya)[ya] = t, u(this, Xt)[Xt] = n, this.setupEvents();
13465
13472
  }
13466
13473
  return P(s, [{
13467
13474
  key: "telemetry",
@@ -13583,12 +13590,12 @@ function BA() {
13583
13590
  return t.apply(this, arguments);
13584
13591
  };
13585
13592
  }();
13586
- r.on($.SOCKET_STATE_UPDATE, e), u(this, Yn)[Yn] = function() {
13593
+ r.on($.SOCKET_STATE_UPDATE, e), u(this, Xn)[Xn] = function() {
13587
13594
  r.off($.SOCKET_STATE_UPDATE, e);
13588
13595
  };
13589
13596
  }
13590
13597
  function qA() {
13591
- u(this, Yn)[Yn] && (u(this, Yn)[Yn](), u(this, Yn)[Yn] = null);
13598
+ u(this, Xn)[Xn] && (u(this, Xn)[Xn](), u(this, Xn)[Xn] = null);
13592
13599
  }
13593
13600
  function WA() {
13594
13601
  return Hd.apply(this, arguments);
@@ -14837,7 +14844,7 @@ var hi = /* @__PURE__ */ S("mediaConstraints"), Xl = /* @__PURE__ */ S("context"
14837
14844
  return w(this, r), i = C(this, r, [t]), i.constraints = void 0, i.name = void 0, i.name = e, i.constraints = n, i;
14838
14845
  }
14839
14846
  return R(r, s), P(r);
14840
- }(/* @__PURE__ */ Dn(Error)), pI = /* @__PURE__ */ function() {
14847
+ }(/* @__PURE__ */ Ln(Error)), pI = /* @__PURE__ */ function() {
14841
14848
  function s() {
14842
14849
  w(this, s), this.permissions = void 0, this.permissions = { audio: "NOT_REQUESTED", video: "NOT_REQUESTED", screenshare: "NOT_REQUESTED" };
14843
14850
  }
@@ -14917,7 +14924,7 @@ var hi = /* @__PURE__ */ S("mediaConstraints"), Xl = /* @__PURE__ */ S("context"
14917
14924
  }
14918
14925
  return e;
14919
14926
  }() }]);
14920
- }(), vI = Object.defineProperty, fI = Object.getOwnPropertyDescriptor, Vn = function(r, e, t, n) {
14927
+ }(), vI = Object.defineProperty, fI = Object.getOwnPropertyDescriptor, $n = function(r, e, t, n) {
14921
14928
  for (var i = n > 1 ? void 0 : n ? fI(e, t) : e, a = r.length - 1, o; a >= 0; a--)
14922
14929
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
14923
14930
  return n && i && vI(e, t, i), i;
@@ -15399,17 +15406,17 @@ var hi = /* @__PURE__ */ S("mediaConstraints"), Xl = /* @__PURE__ */ S("context"
15399
15406
  return t;
15400
15407
  }() }]);
15401
15408
  }(pI));
15402
- Vn([D.trace("WebMediaInterface.destruct")], zr.prototype, "destruct", 1);
15403
- Vn([D.trace("WebMediaInterface.handlePermissionErrors")], zr.prototype, "handlePermissionErrors", 1);
15404
- Vn([D.trace("WebMediaInterface.getAudioAndVideoTrack")], zr.prototype, "getAudioAndVideoTrack", 1);
15405
- Vn([D.trace("WebMediaInterface.getAudioTrack")], zr.prototype, "getAudioTrack", 1);
15406
- Vn([D.trace("WebMediaInterface.getVideoTrack")], zr.prototype, "getVideoTrack", 1);
15407
- Vn([D.trace("WebMediaInterface.getScreenShareTracks")], zr.prototype, "getScreenShareTracks", 1);
15408
- Vn([D.trace("WebMediaInterface.getAvailableDevices")], zr.prototype, "getAvailableDevices", 1);
15409
- Vn([D.trace("WebMediaInterface.getAvailableDevicesByKind")], zr.prototype, "getAvailableDevicesByKind", 1);
15410
- Vn([D.trace("WebMediaInterface.getDevice")], zr.prototype, "getDevice", 1);
15411
- Vn([D.trace("WebMediaInterface.onDeviceChange")], zr.prototype, "onDeviceChange", 1);
15412
- zr = Vn([or("1600")], zr);
15409
+ $n([D.trace("WebMediaInterface.destruct")], zr.prototype, "destruct", 1);
15410
+ $n([D.trace("WebMediaInterface.handlePermissionErrors")], zr.prototype, "handlePermissionErrors", 1);
15411
+ $n([D.trace("WebMediaInterface.getAudioAndVideoTrack")], zr.prototype, "getAudioAndVideoTrack", 1);
15412
+ $n([D.trace("WebMediaInterface.getAudioTrack")], zr.prototype, "getAudioTrack", 1);
15413
+ $n([D.trace("WebMediaInterface.getVideoTrack")], zr.prototype, "getVideoTrack", 1);
15414
+ $n([D.trace("WebMediaInterface.getScreenShareTracks")], zr.prototype, "getScreenShareTracks", 1);
15415
+ $n([D.trace("WebMediaInterface.getAvailableDevices")], zr.prototype, "getAvailableDevices", 1);
15416
+ $n([D.trace("WebMediaInterface.getAvailableDevicesByKind")], zr.prototype, "getAvailableDevicesByKind", 1);
15417
+ $n([D.trace("WebMediaInterface.getDevice")], zr.prototype, "getDevice", 1);
15418
+ $n([D.trace("WebMediaInterface.onDeviceChange")], zr.prototype, "onDeviceChange", 1);
15419
+ zr = $n([or("1600")], zr);
15413
15420
  var Mg = zr, Us = { setItem: function(r, e, t) {
15414
15421
  try {
15415
15422
  localStorage.setItem(r, e);
@@ -16874,10 +16881,10 @@ var HI = Object.defineProperty, BI = Object.getOwnPropertyDescriptor, gc = funct
16874
16881
  for (var i = n > 1 ? void 0 : n ? BI(e, t) : e, a = r.length - 1, o; a >= 0; a--)
16875
16882
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
16876
16883
  return n && i && HI(e, t, i), i;
16877
- }, ze = /* @__PURE__ */ S("data"), mn = /* @__PURE__ */ S("meetingId"), yn = /* @__PURE__ */ S("socketHandler"), ed = /* @__PURE__ */ S("update"), jo = /* @__PURE__ */ function() {
16884
+ }, ze = /* @__PURE__ */ S("data"), yn = /* @__PURE__ */ S("meetingId"), kn = /* @__PURE__ */ S("socketHandler"), ed = /* @__PURE__ */ S("update"), jo = /* @__PURE__ */ function() {
16878
16885
  function s(r) {
16879
16886
  var e = r.name, t = r.socketHandler, n = r.meetingId;
16880
- w(this, s), Object.defineProperty(this, ed, { value: qI }), this.name = "", Object.defineProperty(this, ze, { writable: !0, value: {} }), Object.defineProperty(this, mn, { writable: !0, value: "" }), Object.defineProperty(this, yn, { writable: !0, value: void 0 }), this.rateLimitConfig = { maxInvocations: 5, period: 1 }, this.bulkRateLimitConfig = { maxInvocations: 5, period: 1 }, this.listeners = {}, this.name = e, u(this, yn)[yn] = t, u(this, mn)[mn] = n;
16887
+ w(this, s), Object.defineProperty(this, ed, { value: qI }), this.name = "", Object.defineProperty(this, ze, { writable: !0, value: {} }), Object.defineProperty(this, yn, { writable: !0, value: "" }), Object.defineProperty(this, kn, { writable: !0, value: void 0 }), this.rateLimitConfig = { maxInvocations: 5, period: 1 }, this.bulkRateLimitConfig = { maxInvocations: 5, period: 1 }, this.listeners = {}, this.name = e, u(this, kn)[kn] = t, u(this, yn)[yn] = n;
16881
16888
  }
16882
16889
  return P(s, [{ key: "set", value: function() {
16883
16890
  var r = m(/* @__PURE__ */ h().m(function t(n, i) {
@@ -16901,7 +16908,7 @@ var HI = Object.defineProperty, BI = Object.getOwnPropertyDescriptor, gc = funct
16901
16908
  }
16902
16909
  return e;
16903
16910
  }() }, { key: "remoteSet", value: function(e, t) {
16904
- u(this, yn)[yn].storeInsertKeys(u(this, mn)[mn], this.name, [{ key: e, payload: t }]);
16911
+ u(this, kn)[kn].storeInsertKeys(u(this, yn)[yn], this.name, [{ key: e, payload: t }]);
16905
16912
  } }, { key: "bulkSet", value: function() {
16906
16913
  var r = m(/* @__PURE__ */ h().m(function t(n) {
16907
16914
  var i = this;
@@ -16912,7 +16919,7 @@ var HI = Object.defineProperty, BI = Object.getOwnPropertyDescriptor, gc = funct
16912
16919
  n.forEach(function(o) {
16913
16920
  var c = o.key, l = o.payload;
16914
16921
  u(i, ze)[ze][c] = l;
16915
- }), u(this, yn)[yn].storeInsertKeys(u(this, mn)[mn], this.name, n);
16922
+ }), u(this, kn)[kn].storeInsertKeys(u(this, yn)[yn], this.name, n);
16916
16923
  case 1:
16917
16924
  return a.a(2);
16918
16925
  }
@@ -16954,7 +16961,7 @@ var HI = Object.defineProperty, BI = Object.getOwnPropertyDescriptor, gc = funct
16954
16961
  c.n = 1;
16955
16962
  break;
16956
16963
  }
16957
- return c.a(2, u(this, yn)[yn].storeDeleteKeys(u(this, mn)[mn], this.name, [{ key: n }]));
16964
+ return c.a(2, u(this, kn)[kn].storeDeleteKeys(u(this, yn)[yn], this.name, [{ key: n }]));
16958
16965
  case 1:
16959
16966
  a && (this.listeners[n] && (this.listeners[n].forEach(function(l) {
16960
16967
  return l({ [n]: void 0 });
@@ -16982,7 +16989,7 @@ var HI = Object.defineProperty, BI = Object.getOwnPropertyDescriptor, gc = funct
16982
16989
  return n.forEach(function(o) {
16983
16990
  var c = o.key;
16984
16991
  u(i, ze)[ze][c] && delete u(i, ze)[ze][c];
16985
- }), a.a(2, u(this, yn)[yn].storeDeleteKeys(u(this, mn)[mn], this.name, n));
16992
+ }), a.a(2, u(this, kn)[kn].storeDeleteKeys(u(this, yn)[yn], this.name, n));
16986
16993
  }
16987
16994
  }, t, this);
16988
16995
  }));
@@ -17113,16 +17120,16 @@ gc([Yr(Uo, "bulkRateLimitConfig")], jo.prototype, "bulkSet", 1);
17113
17120
  gc([Yr(Uo, "rateLimitConfig")], jo.prototype, "update", 1);
17114
17121
  gc([Yr(Uo, "rateLimitConfig")], jo.prototype, "delete", 1);
17115
17122
  gc([Yr(Uo, "bulkRateLimitConfig")], jo.prototype, "bulkDelete", 1);
17116
- var Sn = /* @__PURE__ */ S("storesSocketHandler"), En = /* @__PURE__ */ S("meetingId"), Ru = /* @__PURE__ */ S("peerId"), Nu = /* @__PURE__ */ S("context"), nr = /* @__PURE__ */ S("pendingInit"), td = /* @__PURE__ */ S("setup"), WI = /* @__PURE__ */ function() {
17123
+ var En = /* @__PURE__ */ S("storesSocketHandler"), Cn = /* @__PURE__ */ S("meetingId"), Ru = /* @__PURE__ */ S("peerId"), Nu = /* @__PURE__ */ S("context"), nr = /* @__PURE__ */ S("pendingInit"), td = /* @__PURE__ */ S("setup"), WI = /* @__PURE__ */ function() {
17117
17124
  function s(r, e) {
17118
- w(this, s), Object.defineProperty(this, td, { value: JI }), Object.defineProperty(this, Ru, { get: GI, set: void 0 }), this.stores = /* @__PURE__ */ new Map(), Object.defineProperty(this, Sn, { writable: !0, value: void 0 }), Object.defineProperty(this, En, { writable: !0, value: "" }), Object.defineProperty(this, Nu, { writable: !0, value: void 0 }), Object.defineProperty(this, nr, { writable: !0, value: /* @__PURE__ */ new Map() }), u(this, Sn)[Sn] = e, u(this, En)[En] = r.getValue("meetingId"), u(this, Nu)[Nu] = r, u(this, td)[td]();
17125
+ w(this, s), Object.defineProperty(this, td, { value: JI }), Object.defineProperty(this, Ru, { get: GI, set: void 0 }), this.stores = /* @__PURE__ */ new Map(), Object.defineProperty(this, En, { writable: !0, value: void 0 }), Object.defineProperty(this, Cn, { writable: !0, value: "" }), Object.defineProperty(this, Nu, { writable: !0, value: void 0 }), Object.defineProperty(this, nr, { writable: !0, value: /* @__PURE__ */ new Map() }), u(this, En)[En] = e, u(this, Cn)[Cn] = r.getValue("meetingId"), u(this, Nu)[Nu] = r, u(this, td)[td]();
17119
17126
  }
17120
17127
  return P(s, [{ key: "create", value: function(e) {
17121
17128
  var t = this, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
17122
17129
  if (TP.includes(e) && !n)
17123
17130
  throw new U("'".concat(e, "' is a reserved store name."), "0601");
17124
- var i = new jo({ name: e, socketHandler: u(this, Sn)[Sn], meetingId: u(this, En)[En] });
17125
- u(this, Sn)[Sn].storeGetKeys(u(this, En)[En], e, []);
17131
+ var i = new jo({ name: e, socketHandler: u(this, En)[En], meetingId: u(this, Cn)[Cn] });
17132
+ u(this, En)[En].storeGetKeys(u(this, Cn)[Cn], e, []);
17126
17133
  var a = new Promise(function(o, c) {
17127
17134
  var l = setTimeout(function() {
17128
17135
  u(t, nr)[nr].delete(e), c(Error("Failed"));
@@ -17134,7 +17141,7 @@ var Sn = /* @__PURE__ */ S("storesSocketHandler"), En = /* @__PURE__ */ S("meeti
17134
17141
  var t = this, n = this.stores.get(e);
17135
17142
  if (!n)
17136
17143
  return Promise.reject(Error("Store '".concat(e, "' does not exist")));
17137
- n.clear(), u(this, Sn)[Sn].storeGetKeys(u(this, En)[En], e, []);
17144
+ n.clear(), u(this, En)[En].storeGetKeys(u(this, Cn)[Cn], e, []);
17138
17145
  var i = new Promise(function(a, o) {
17139
17146
  var c = setTimeout(function() {
17140
17147
  u(t, nr)[nr].delete(e), o(Error("Store refresh timed out"));
@@ -17150,14 +17157,14 @@ function GI() {
17150
17157
  function JI() {
17151
17158
  var s = this;
17152
17159
  [Ii.storeInsertKeys, Ii.storeGetKeys, Ii.storeDeleteKeys].forEach(function(r) {
17153
- u(s, Sn)[Sn].on(r, /* @__PURE__ */ function() {
17160
+ u(s, En)[En].on(r, /* @__PURE__ */ function() {
17154
17161
  var e = m(/* @__PURE__ */ h().m(function t(n) {
17155
17162
  var i, a, o, c, l, d;
17156
17163
  return h().w(function(p) {
17157
17164
  for (; ; )
17158
17165
  switch (p.n) {
17159
17166
  case 0:
17160
- if (n.pluginId === u(s, En)[En]) {
17167
+ if (n.pluginId === u(s, Cn)[Cn]) {
17161
17168
  p.n = 1;
17162
17169
  break;
17163
17170
  }
@@ -17212,12 +17219,12 @@ var KI = Object.defineProperty, zI = Object.getOwnPropertyDescriptor, Fo = funct
17212
17219
  for (var i = n > 1 ? void 0 : n ? zI(e, t) : e, a = r.length - 1, o; a >= 0; a--)
17213
17220
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
17214
17221
  return n && i && KI(e, t, i), i;
17215
- }, QI = 0.8, YI = 1.2, Fi = (ea = /* @__PURE__ */ S("isPinned"), ta = /* @__PURE__ */ S("stageStatus"), _t = /* @__PURE__ */ S("context"), qn = /* @__PURE__ */ S("roomNodeClient"), ln = /* @__PURE__ */ S("audioPlayback"), Wn = /* @__PURE__ */ S("mediaJoined"), Tc = /* @__PURE__ */ S("socketJoined"), Tr = /* @__PURE__ */ S("self"), ro = /* @__PURE__ */ S("roomSocketHandler"), rn = /* @__PURE__ */ S("videoElements"), Gn = /* @__PURE__ */ S("pip"), br = /* @__PURE__ */ S("maxSpatialLayer"), bc = /* @__PURE__ */ S("videoDimensionsUpdated"), no = /* @__PURE__ */ S("updateVideos"), wc = /* @__PURE__ */ S("updateAudio"), Pc = /* @__PURE__ */ S("updateScreenShare"), /* @__PURE__ */ function(s) {
17222
+ }, QI = 0.8, YI = 1.2, Fi = (ea = /* @__PURE__ */ S("isPinned"), ta = /* @__PURE__ */ S("stageStatus"), _t = /* @__PURE__ */ S("context"), Wn = /* @__PURE__ */ S("roomNodeClient"), ln = /* @__PURE__ */ S("audioPlayback"), Gn = /* @__PURE__ */ S("mediaJoined"), Tc = /* @__PURE__ */ S("socketJoined"), Tr = /* @__PURE__ */ S("self"), ro = /* @__PURE__ */ S("roomSocketHandler"), rn = /* @__PURE__ */ S("videoElements"), Jn = /* @__PURE__ */ S("pip"), br = /* @__PURE__ */ S("maxSpatialLayer"), bc = /* @__PURE__ */ S("videoDimensionsUpdated"), no = /* @__PURE__ */ S("updateVideos"), wc = /* @__PURE__ */ S("updateAudio"), Pc = /* @__PURE__ */ S("updateScreenShare"), /* @__PURE__ */ function(s) {
17216
17223
  function r(e, t, n, i) {
17217
17224
  var a;
17218
17225
  w(this, r);
17219
17226
  var o = e.getValue("logger");
17220
- a = C(this, r, [o]), Object.defineProperty(a, Pc, { value: iM }), Object.defineProperty(a, wc, { value: nM }), Object.defineProperty(a, no, { value: rM }), Object.defineProperty(a, Gn, { get: tM, set: void 0 }), Object.defineProperty(a, Tc, { get: eM, set: void 0 }), Object.defineProperty(a, Wn, { get: xI, set: void 0 }), Object.defineProperty(a, ln, { get: ZI, set: void 0 }), Object.defineProperty(a, qn, { get: XI, set: void 0 }), a.id = void 0, a.userId = void 0, a.name = void 0, a.picture = void 0, a.isHost = void 0, a.customParticipantId = void 0, a.flags = void 0, a.device = void 0, a.videoTrack = void 0, a.audioTrack = void 0, a.screenShareTracks = void 0, a.videoEnabled = void 0, a.audioEnabled = void 0, a.screenShareEnabled = void 0, a.producers = void 0, a.manualProducerConfig = void 0, Object.defineProperty(a, ea, { writable: !0, value: void 0 }), a.supportsRemoteControl = !1, Object.defineProperty(a, ta, { writable: !0, value: void 0 }), a.presetName = void 0, Object.defineProperty(a, _t, { writable: !0, value: void 0 }), Object.defineProperty(a, Tr, { writable: !0, value: void 0 }), Object.defineProperty(a, ro, { writable: !0, value: void 0 }), Object.defineProperty(a, rn, { writable: !0, value: /* @__PURE__ */ new Map() }), Object.defineProperty(a, br, { writable: !0, value: 1 }), Object.defineProperty(a, bc, { writable: !0, value: Kh(function(L) {
17227
+ a = C(this, r, [o]), Object.defineProperty(a, Pc, { value: iM }), Object.defineProperty(a, wc, { value: nM }), Object.defineProperty(a, no, { value: rM }), Object.defineProperty(a, Jn, { get: tM, set: void 0 }), Object.defineProperty(a, Tc, { get: eM, set: void 0 }), Object.defineProperty(a, Gn, { get: xI, set: void 0 }), Object.defineProperty(a, ln, { get: ZI, set: void 0 }), Object.defineProperty(a, Wn, { get: XI, set: void 0 }), a.id = void 0, a.userId = void 0, a.name = void 0, a.picture = void 0, a.isHost = void 0, a.customParticipantId = void 0, a.flags = void 0, a.device = void 0, a.videoTrack = void 0, a.audioTrack = void 0, a.screenShareTracks = void 0, a.videoEnabled = void 0, a.audioEnabled = void 0, a.screenShareEnabled = void 0, a.producers = void 0, a.manualProducerConfig = void 0, Object.defineProperty(a, ea, { writable: !0, value: void 0 }), a.supportsRemoteControl = !1, Object.defineProperty(a, ta, { writable: !0, value: void 0 }), a.presetName = void 0, Object.defineProperty(a, _t, { writable: !0, value: void 0 }), Object.defineProperty(a, Tr, { writable: !0, value: void 0 }), Object.defineProperty(a, ro, { writable: !0, value: void 0 }), Object.defineProperty(a, rn, { writable: !0, value: /* @__PURE__ */ new Map() }), Object.defineProperty(a, br, { writable: !0, value: 1 }), Object.defineProperty(a, bc, { writable: !0, value: Kh(function(L) {
17221
17228
  if (a.videoTrack) {
17222
17229
  var F = L.clientWidth, W = L.clientHeight, G = a.videoTrack.getSettings(), H = G.width, Y = G.height;
17223
17230
  if (!(!H || !Y)) {
@@ -17286,7 +17293,7 @@ var KI = Object.defineProperty, zI = Object.getOwnPropertyDescriptor, Fo = funct
17286
17293
  for (; ; )
17287
17294
  switch (i.n) {
17288
17295
  case 0:
17289
- if (u(this, Wn)[Wn]) {
17296
+ if (u(this, Gn)[Gn]) {
17290
17297
  i.n = 1;
17291
17298
  break;
17292
17299
  }
@@ -17298,7 +17305,7 @@ var KI = Object.defineProperty, zI = Object.getOwnPropertyDescriptor, Fo = funct
17298
17305
  }
17299
17306
  throw new U("You do not have permission to pin participants.", "1201");
17300
17307
  case 2:
17301
- return i.a(2, u(this, qn)[qn].pinPeer(this.id));
17308
+ return i.a(2, u(this, Wn)[Wn].pinPeer(this.id));
17302
17309
  }
17303
17310
  }, n, this);
17304
17311
  }));
@@ -17312,7 +17319,7 @@ var KI = Object.defineProperty, zI = Object.getOwnPropertyDescriptor, Fo = funct
17312
17319
  for (; ; )
17313
17320
  switch (i.n) {
17314
17321
  case 0:
17315
- if (u(this, Wn)[Wn]) {
17322
+ if (u(this, Gn)[Gn]) {
17316
17323
  i.n = 1;
17317
17324
  break;
17318
17325
  }
@@ -17324,7 +17331,7 @@ var KI = Object.defineProperty, zI = Object.getOwnPropertyDescriptor, Fo = funct
17324
17331
  }
17325
17332
  throw new U("You do not have permission to unpin participants.", "1201");
17326
17333
  case 2:
17327
- return i.a(2, u(this, qn)[qn].pinPeer(null));
17334
+ return i.a(2, u(this, Wn)[Wn].pinPeer(null));
17328
17335
  }
17329
17336
  }, n, this);
17330
17337
  }));
@@ -17336,7 +17343,7 @@ var KI = Object.defineProperty, zI = Object.getOwnPropertyDescriptor, Fo = funct
17336
17343
  var n, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
17337
17344
  u(this, ea)[ea] = t;
17338
17345
  var a = t ? "pinned" : "unpinned";
17339
- (n = u(this, Gn)[Gn]) === null || n === void 0 || n.updateSource(this.id, { pinned: t }), i && this.emit(a, this);
17346
+ (n = u(this, Jn)[Jn]) === null || n === void 0 || n.updateSource(this.id, { pinned: t }), i && this.emit(a, this);
17340
17347
  } }, { key: "disableAudio", value: function() {
17341
17348
  var e = m(/* @__PURE__ */ h().m(function n() {
17342
17349
  var i;
@@ -17344,7 +17351,7 @@ var KI = Object.defineProperty, zI = Object.getOwnPropertyDescriptor, Fo = funct
17344
17351
  for (; ; )
17345
17352
  switch (a.n) {
17346
17353
  case 0:
17347
- if (i = this.id, this.logger.info("Participant::disable_audio", { participant: { id: i } }), u(this, Wn)[Wn]) {
17354
+ if (i = this.id, this.logger.info("Participant::disable_audio", { participant: { id: i } }), u(this, Gn)[Gn]) {
17348
17355
  a.n = 1;
17349
17356
  break;
17350
17357
  }
@@ -17354,7 +17361,7 @@ var KI = Object.defineProperty, zI = Object.getOwnPropertyDescriptor, Fo = funct
17354
17361
  a.n = 2;
17355
17362
  break;
17356
17363
  }
17357
- return a.a(2, u(this, qn)[qn].disableAudio(i));
17364
+ return a.a(2, u(this, Wn)[Wn].disableAudio(i));
17358
17365
  case 2:
17359
17366
  throw this.logger.error("Participant::unauthorized_disable_audio", { participant: { id: i } }), new U("Unauthorized: User does not have permission to disable participant audio.", "1201");
17360
17367
  case 3:
@@ -17404,7 +17411,7 @@ var KI = Object.defineProperty, zI = Object.getOwnPropertyDescriptor, Fo = funct
17404
17411
  for (; ; )
17405
17412
  switch (a.n) {
17406
17413
  case 0:
17407
- if (i = this.id, this.logger.info("Participant::disable_video", { participant: { id: i } }), u(this, Wn)[Wn]) {
17414
+ if (i = this.id, this.logger.info("Participant::disable_video", { participant: { id: i } }), u(this, Gn)[Gn]) {
17408
17415
  a.n = 1;
17409
17416
  break;
17410
17417
  }
@@ -17414,7 +17421,7 @@ var KI = Object.defineProperty, zI = Object.getOwnPropertyDescriptor, Fo = funct
17414
17421
  a.n = 2;
17415
17422
  break;
17416
17423
  }
17417
- return a.a(2, u(this, qn)[qn].disableVideo(i));
17424
+ return a.a(2, u(this, Wn)[Wn].disableVideo(i));
17418
17425
  case 2:
17419
17426
  throw this.logger.error("Participant::unauthorized_disable_video", { participant: { id: i } }), new U("Unauthorized: User does not have permission to disable participant video.", "1201");
17420
17427
  case 3:
@@ -17468,7 +17475,7 @@ var KI = Object.defineProperty, zI = Object.getOwnPropertyDescriptor, Fo = funct
17468
17475
  var c;
17469
17476
  (n = u(this, rn)[rn].get(t)) === null || n === void 0 || (n = n.observer) === null || n === void 0 || n.disconnect(), "ResizeObserver" in window && (c = new ResizeObserver(function() {
17470
17477
  return u(i, bc)[bc](t);
17471
- }), c.observe(t)), u(this, rn)[rn].set(t, { observer: c }), this.updateVideo(t), (a = u(this, Gn)[Gn]) === null || a === void 0 || a.addSource(this.id, t, this.videoEnabled, this.isPinned, this.name, this.picture, (o = this.raised) !== null && o !== void 0 ? o : !1);
17478
+ }), c.observe(t)), u(this, rn)[rn].set(t, { observer: c }), this.updateVideo(t), (a = u(this, Jn)[Jn]) === null || a === void 0 || a.addSource(this.id, t, this.videoEnabled, this.isPinned, this.name, this.picture, (o = this.raised) !== null && o !== void 0 ? o : !1);
17472
17479
  }
17473
17480
  }
17474
17481
  )
@@ -17479,10 +17486,10 @@ var KI = Object.defineProperty, zI = Object.getOwnPropertyDescriptor, Fo = funct
17479
17486
  var n, i;
17480
17487
  if (!t) {
17481
17488
  var a;
17482
- (a = u(this, Gn)[Gn]) === null || a === void 0 || a.removeSource(this.id);
17489
+ (a = u(this, Jn)[Jn]) === null || a === void 0 || a.removeSource(this.id);
17483
17490
  return;
17484
17491
  }
17485
- t.srcObject = void 0, (n = u(this, rn)[rn].get(t)) === null || n === void 0 || (n = n.observer) === null || n === void 0 || n.disconnect(), u(this, rn)[rn].delete(t), (i = u(this, Gn)[Gn]) === null || i === void 0 || i.removeSource(this.id);
17492
+ t.srcObject = void 0, (n = u(this, rn)[rn].get(t)) === null || n === void 0 || (n = n.observer) === null || n === void 0 || n.disconnect(), u(this, rn)[rn].delete(t), (i = u(this, Jn)[Jn]) === null || i === void 0 || i.removeSource(this.id);
17486
17493
  } }, { key: "updateVideo", value: (
17487
17494
  /**
17488
17495
  * Internal method, do not use
@@ -17578,25 +17585,25 @@ var ou = /* @__PURE__ */ function(s) {
17578
17585
  var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
17579
17586
  return Ie(r, "delete", this, 3)([t, n, i]);
17580
17587
  } }]);
17581
- }(Rg), kn = /* @__PURE__ */ S("map"), aM = /* @__PURE__ */ function(s) {
17588
+ }(Rg), Tn = /* @__PURE__ */ S("map"), aM = /* @__PURE__ */ function(s) {
17582
17589
  function r(e) {
17583
17590
  var t;
17584
- return w(this, r), t = C(this, r, [e]), Object.defineProperty(t, kn, { writable: !0, value: void 0 }), u(t, kn)[kn] = /* @__PURE__ */ new Map(), t;
17591
+ return w(this, r), t = C(this, r, [e]), Object.defineProperty(t, Tn, { writable: !0, value: void 0 }), u(t, Tn)[Tn] = /* @__PURE__ */ new Map(), t;
17585
17592
  }
17586
17593
  return R(r, s), P(r, [{
17587
17594
  key: "__set",
17588
17595
  value: function(t, n) {
17589
- return u(this, kn)[kn].set(t, n);
17596
+ return u(this, Tn)[Tn].set(t, n);
17590
17597
  }
17591
17598
  /**
17592
17599
  * @private
17593
17600
  */
17594
17601
  }, { key: "__clear", value: function() {
17595
- return u(this, kn)[kn].clear();
17602
+ return u(this, Tn)[Tn].clear();
17596
17603
  } }, { key: "get", value: function(t) {
17597
- return u(this, kn)[kn].get(t);
17604
+ return u(this, Tn)[Tn].get(t);
17598
17605
  } }, { key: "toArray", value: function() {
17599
- return Array.from(u(this, kn)[kn].values());
17606
+ return Array.from(u(this, Tn)[Tn].values());
17600
17607
  } }]);
17601
17608
  }($o), sM = /* @__PURE__ */ function() {
17602
17609
  function s() {
@@ -17663,12 +17670,12 @@ var ou = /* @__PURE__ */ function(s) {
17663
17670
  for (var i = n > 1 ? void 0 : n ? cM(e, t) : e, a = r.length - 1, o; a >= 0; a--)
17664
17671
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
17665
17672
  return n && i && uM(e, t, i), i;
17666
- }, lM = ["ACTIVE_GRID", "PAGINATED", "MANUAL"], vn = (ye = /* @__PURE__ */ S("context"), io = /* @__PURE__ */ S("roomNodeClient"), Jn = /* @__PURE__ */ S("socketJoined"), ra = /* @__PURE__ */ S("mediaJoined"), Kn = /* @__PURE__ */ S("self"), mt = /* @__PURE__ */ S("roomSocketHandler"), /* @__PURE__ */ function(s) {
17673
+ }, lM = ["ACTIVE_GRID", "PAGINATED", "MANUAL"], fn = (ye = /* @__PURE__ */ S("context"), io = /* @__PURE__ */ S("roomNodeClient"), Kn = /* @__PURE__ */ S("socketJoined"), ra = /* @__PURE__ */ S("mediaJoined"), zn = /* @__PURE__ */ S("self"), mt = /* @__PURE__ */ S("roomSocketHandler"), /* @__PURE__ */ function(s) {
17667
17674
  function r(e, t, n) {
17668
17675
  var i;
17669
17676
  w(this, r);
17670
17677
  var a = e.getValue("logger");
17671
- return i = C(this, r, [a]), Object.defineProperty(i, ra, { get: pM, set: void 0 }), Object.defineProperty(i, Jn, { get: hM, set: void 0 }), Object.defineProperty(i, io, { get: dM, set: void 0 }), i.waitlisted = void 0, i.joined = void 0, i.active = void 0, i.videoSubscribed = void 0, i.audioSubscribed = void 0, i.pinned = void 0, i.all = void 0, Object.defineProperty(i, ye, { writable: !0, value: void 0 }), Object.defineProperty(i, Kn, { writable: !0, value: void 0 }), Object.defineProperty(i, mt, { writable: !0, value: void 0 }), i.rateLimitConfig = { maxInvocations: 5, period: 1 }, i.viewMode = void 0, i.currentPage = void 0, i.lastActiveSpeaker = void 0, i.selectedPeers = Vg, u(i, ye)[ye] = e, u(i, Kn)[Kn] = t, u(i, mt)[mt] = n, i.waitlisted = new ou(a), i.joined = new ou(a), i.videoSubscribed = new ou(a), i.audioSubscribed = new ou(a), i.active = i.videoSubscribed, i.pinned = new ou(a), i.all = new aM(a), i.viewMode = "ACTIVE_GRID", i.currentPage = 0, i.setupEvents(), i;
17678
+ return i = C(this, r, [a]), Object.defineProperty(i, ra, { get: pM, set: void 0 }), Object.defineProperty(i, Kn, { get: hM, set: void 0 }), Object.defineProperty(i, io, { get: dM, set: void 0 }), i.waitlisted = void 0, i.joined = void 0, i.active = void 0, i.videoSubscribed = void 0, i.audioSubscribed = void 0, i.pinned = void 0, i.all = void 0, Object.defineProperty(i, ye, { writable: !0, value: void 0 }), Object.defineProperty(i, zn, { writable: !0, value: void 0 }), Object.defineProperty(i, mt, { writable: !0, value: void 0 }), i.rateLimitConfig = { maxInvocations: 5, period: 1 }, i.viewMode = void 0, i.currentPage = void 0, i.lastActiveSpeaker = void 0, i.selectedPeers = Vg, u(i, ye)[ye] = e, u(i, zn)[zn] = t, u(i, mt)[mt] = n, i.waitlisted = new ou(a), i.joined = new ou(a), i.videoSubscribed = new ou(a), i.audioSubscribed = new ou(a), i.active = i.videoSubscribed, i.pinned = new ou(a), i.all = new aM(a), i.viewMode = "ACTIVE_GRID", i.currentPage = 0, i.setupEvents(), i;
17672
17679
  }
17673
17680
  return R(r, s), P(r, [{ key: "pip", get: (
17674
17681
  /**
@@ -17758,7 +17765,7 @@ var ou = /* @__PURE__ */ function(s) {
17758
17765
  key: "acceptWaitingRoomRequest",
17759
17766
  value: function(t) {
17760
17767
  var n, i;
17761
- if (!u(this, Jn)[Jn])
17768
+ if (!u(this, Kn)[Kn])
17762
17769
  throw new U("Can`t accept waiting room request without joining room", "1205");
17763
17770
  var a = (n = (i = this.waitlisted.get(t)) === null || i === void 0 ? void 0 : i.userId) !== null && n !== void 0 ? n : t;
17764
17771
  return u(this, mt)[mt].acceptWaitingRoomRequest([a]);
@@ -17794,7 +17801,7 @@ var ou = /* @__PURE__ */ function(s) {
17794
17801
  for (; ; )
17795
17802
  switch (l.n) {
17796
17803
  case 0:
17797
- if (u(this, Jn)[Jn]) {
17804
+ if (u(this, Kn)[Kn]) {
17798
17805
  l.n = 1;
17799
17806
  break;
17800
17807
  }
@@ -17953,7 +17960,7 @@ var ou = /* @__PURE__ */ function(s) {
17953
17960
  }
17954
17961
  throw new U("Can`t disable all audio without joining room", "1205");
17955
17962
  case 1:
17956
- if (!u(this, Kn)[Kn].permissions.canAllowParticipantAudio) {
17963
+ if (!u(this, zn)[zn].permissions.canAllowParticipantAudio) {
17957
17964
  a.n = 2;
17958
17965
  break;
17959
17966
  }
@@ -17981,7 +17988,7 @@ var ou = /* @__PURE__ */ function(s) {
17981
17988
  }
17982
17989
  throw new U("Can`t disable all video without joining room", "1205");
17983
17990
  case 1:
17984
- if (!u(this, Kn)[Kn].permissions.canAllowParticipantVideo) {
17991
+ if (!u(this, zn)[zn].permissions.canAllowParticipantVideo) {
17985
17992
  i.n = 2;
17986
17993
  break;
17987
17994
  }
@@ -18004,13 +18011,13 @@ var ou = /* @__PURE__ */ function(s) {
18004
18011
  for (; ; )
18005
18012
  switch (o.n) {
18006
18013
  case 0:
18007
- if (this.logger.info("Participants::kick_all"), i = u(this, ye)[ye].getValue("viewType"), !(i !== "LIVESTREAM" && !u(this, Jn)[Jn])) {
18014
+ if (this.logger.info("Participants::kick_all"), i = u(this, ye)[ye].getValue("viewType"), !(i !== "LIVESTREAM" && !u(this, Kn)[Kn])) {
18008
18015
  o.n = 1;
18009
18016
  break;
18010
18017
  }
18011
18018
  throw new U("Can`t kick all without joining room", "1205");
18012
18019
  case 1:
18013
- if (u(this, Kn)[Kn].permissions.kickParticipant) {
18020
+ if (u(this, zn)[zn].permissions.kickParticipant) {
18014
18021
  o.n = 2;
18015
18022
  break;
18016
18023
  }
@@ -18033,7 +18040,7 @@ var ou = /* @__PURE__ */ function(s) {
18033
18040
  for (; ; )
18034
18041
  switch (l.n) {
18035
18042
  case 0:
18036
- if (this.logger.info("Participants::broadcastMessage"), u(this, Jn)[Jn]) {
18043
+ if (this.logger.info("Participants::broadcastMessage"), u(this, Kn)[Kn]) {
18037
18044
  l.n = 1;
18038
18045
  break;
18039
18046
  }
@@ -18156,16 +18163,16 @@ function pM() {
18156
18163
  var s;
18157
18164
  return ((s = u(this, ye)[ye].getValue("connectionHandler")) === null || s === void 0 ? void 0 : s.mediaJoined) === !0;
18158
18165
  }
18159
- si([D.trace("Participants.setViewMode")], vn.prototype, "setViewMode", 1);
18160
- si([D.trace("Participants.setPage")], vn.prototype, "setPage", 1);
18161
- si([D.trace("Participants.disableAllAudio")], vn.prototype, "disableAllAudio", 1);
18162
- si([D.trace("Participants.disableAllVideo")], vn.prototype, "disableAllVideo", 1);
18163
- si([D.trace("Participants.kickAll")], vn.prototype, "kickAll", 1);
18164
- si([D.trace("Participants.broadcastMessage"), Yr(Uo, "rateLimitConfig")], vn.prototype, "broadcastMessage", 1);
18165
- si([D.trace("Participants.getAllJoinedPeers"), Yr({ maxInvocations: 10, period: 60 })], vn.prototype, "getAllJoinedPeers", 1);
18166
- si([D.trace("Participant.updatePermissions"), Yr({ maxInvocations: 1e3, period: 60 })], vn.prototype, "updatePermissions", 1);
18167
- si([D.trace("Participants.getParticipantsInMeetingPreJoin")], vn.prototype, "getParticipantsInMeetingPreJoin", 1);
18168
- vn = si([or("1200")], vn);
18166
+ si([D.trace("Participants.setViewMode")], fn.prototype, "setViewMode", 1);
18167
+ si([D.trace("Participants.setPage")], fn.prototype, "setPage", 1);
18168
+ si([D.trace("Participants.disableAllAudio")], fn.prototype, "disableAllAudio", 1);
18169
+ si([D.trace("Participants.disableAllVideo")], fn.prototype, "disableAllVideo", 1);
18170
+ si([D.trace("Participants.kickAll")], fn.prototype, "kickAll", 1);
18171
+ si([D.trace("Participants.broadcastMessage"), Yr(Uo, "rateLimitConfig")], fn.prototype, "broadcastMessage", 1);
18172
+ si([D.trace("Participants.getAllJoinedPeers"), Yr({ maxInvocations: 10, period: 60 })], fn.prototype, "getAllJoinedPeers", 1);
18173
+ si([D.trace("Participant.updatePermissions"), Yr({ maxInvocations: 1e3, period: 60 })], fn.prototype, "updatePermissions", 1);
18174
+ si([D.trace("Participants.getParticipantsInMeetingPreJoin")], fn.prototype, "getParticipantsInMeetingPreJoin", 1);
18175
+ fn = si([or("1200")], fn);
18169
18176
  var vM = Object.defineProperty, fM = Object.getOwnPropertyDescriptor, zs = function(r, e, t, n) {
18170
18177
  for (var i = n > 1 ? void 0 : n ? fM(e, t) : e, a = r.length - 1, o; a >= 0; a--)
18171
18178
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
@@ -18241,7 +18248,7 @@ var vM = Object.defineProperty, fM = Object.getOwnPropertyDescriptor, zs = funct
18241
18248
  return function(a, o) {
18242
18249
  return i.apply(this, arguments);
18243
18250
  };
18244
- }(), this.context = r, this.roomSocketHandler = t, this.participants = new vn(r, e, this.roomSocketHandler), this.self = e, this.consumerPeerMap = /* @__PURE__ */ new Map(), this.events = An, e.config.viewType !== "CHAT" && this.setupEventsGlobal(), this.setupEvents();
18251
+ }(), this.context = r, this.roomSocketHandler = t, this.participants = new fn(r, e, this.roomSocketHandler), this.self = e, this.consumerPeerMap = /* @__PURE__ */ new Map(), this.events = In, e.config.viewType !== "CHAT" && this.setupEventsGlobal(), this.setupEvents();
18245
18252
  }
18246
18253
  return P(s, [{ key: "roomNodeClient", get: function() {
18247
18254
  return this.context.getValue("roomNodeClient");
@@ -18261,21 +18268,32 @@ var vM = Object.defineProperty, fM = Object.getOwnPropertyDescriptor, zs = funct
18261
18268
  */
18262
18269
  }, { key: "logger", get: function() {
18263
18270
  return this.context.getValue("logger");
18271
+ } }, { key: "handleSocketPeers", value: function(e) {
18272
+ var t = this, n = this.participants.joined.size > 0;
18273
+ this.participants.videoSubscribed.clear(), this.participants.audioSubscribed.clear(), this.participants.pinned.clear(), this.participants.joined.clear(), this.participants.currentPage = 0, this.participants.viewMode = "ACTIVE_GRID", n && this.participants.emit("viewModeChanged", { viewMode: "ACTIVE_GRID", currentPage: this.participants.currentPage, pageCount: this.participants.pageCount });
18274
+ var i = new Set(this.roomSocketHandler.socket.replacedPeerIds);
18275
+ e == null || e.forEach(function(a) {
18276
+ !a.waitlisted && !i.has(a.peerId) && t.onParticipantSocketJoined(t.createParticipantObjFromSocketPeer(a));
18277
+ });
18278
+ } }, { key: "handlePeerJoinedBroadcast", value: function(e) {
18279
+ var t, n = e.participant, i = e.producerHandoverFromPeerId;
18280
+ if (n) {
18281
+ var a = (t = n.producerStates) !== null && t !== void 0 ? t : [];
18282
+ this.logger.info("peer ".concat(n.peerId, " has joined media room with producerStates: ").concat(JSON.stringify(a)), { participant: { id: n.peerId, maskedName: _e(n.displayName || "").map(function(o, c) {
18283
+ return c % 2 ? "*" : o;
18284
+ }).join("") } }), i && i !== n.peerId && a.length > 0 && (this.logger.info("Producer handover detected from ".concat(i, " to ").concat(n.peerId, " for producer ids ").concat(a.map(function(o) {
18285
+ var c = o.producerId;
18286
+ return c;
18287
+ }).join(","))), this.context.getValue("peerSessionStore").emit($.PRODUCER_HANDOVER, { oldPeerId: i, newPeerId: n.peerId, producerIds: a.map(function(o) {
18288
+ var c = o.producerId;
18289
+ return c;
18290
+ }) })), this.onParticipantMediaJoined(n.peerId, a);
18291
+ }
18264
18292
  } }, {
18265
18293
  key: "setupEvents",
18266
18294
  value: function() {
18267
18295
  var e = this;
18268
- this.roomSocketHandler.on(Q.getWaitingRoomRequests, this.waitingRoomRequestHandler.bind(this)), this.context.getValue("peerSessionStore").on($.SOCKET_PEERS, function(t) {
18269
- var n = e.participants.joined.size > 0;
18270
- e.participants.videoSubscribed.clear(), e.participants.audioSubscribed.clear(), e.participants.pinned.clear(), e.participants.joined.clear(), e.participants.currentPage = 0, e.participants.viewMode = "ACTIVE_GRID", n && e.participants.emit("viewModeChanged", { viewMode: "ACTIVE_GRID", currentPage: e.participants.currentPage, pageCount: e.participants.pageCount }), t == null || t.forEach(function(i) {
18271
- i.waitlisted || e.onParticipantSocketJoined(e.createParticipantObjFromSocketPeer(i));
18272
- });
18273
- }), this.roomSocketHandler.on(this.events.peerJoinedBroadcast, function(t) {
18274
- var n = t.participant;
18275
- e.logger.info("PEER_INFO:::MEDIA_JOIN", { participant: { id: n.peerId, maskedName: _e((n == null ? void 0 : n.displayName) || "").map(function(i, a) {
18276
- return a % 2 ? "*" : i;
18277
- }).join("") } }), e.onParticipantMediaJoined(n.peerId, n.producerStates);
18278
- }), this.roomSocketHandler.on(this.events.selfJoinComplete, function(t) {
18296
+ this.roomSocketHandler.on(Q.getWaitingRoomRequests, this.waitingRoomRequestHandler.bind(this)), this.context.getValue("peerSessionStore").on($.SOCKET_PEERS, this.handleSocketPeers.bind(this)), this.roomSocketHandler.on(this.events.peerJoinedBroadcast, this.handlePeerJoinedBroadcast.bind(this)), this.roomSocketHandler.on(this.events.selfJoinComplete, function(t) {
18279
18297
  var n = t.participants, i = t.selectedPeers, a = t.roomState;
18280
18298
  n.forEach(function(d) {
18281
18299
  var p = d.peerId, v = d.producerStates;
@@ -18615,7 +18633,12 @@ var vM = Object.defineProperty, fM = Object.getOwnPropertyDescriptor, zs = funct
18615
18633
  this.logger.info("PEER_INFO:::SOCKET_ON_MEDIA_JOIN", { participant: { id: i.id, maskedName: _e((i == null ? void 0 : i.name) || "").map(function(a, o) {
18616
18634
  return o % 2 ? "*" : a;
18617
18635
  }).join("") } }), this.logger.info("onParticipantMediaJoined: peer ".concat(e, " has joined media room. Processing.")), t.forEach(function(a) {
18618
- a.kind === Ui.AUDIO && !a.screenShare ? i.setAudioEnabled(!a.pause) : a.kind === Ui.VIDEO && !a.screenShare && (i.setVideoEnabled(!a.pause), n.updatePipSource(i.id, !a.pause)), i.producers.push(N(N({}, a), {}, { producingTransportId: a.producingTransportId, kind: a.kind === Ui.AUDIO ? "audio" : "video", producingPeerId: e, mimeType: a.mimeType }));
18636
+ a.kind === Ui.AUDIO && !a.screenShare ? i.setAudioEnabled(!a.pause) : a.kind === Ui.VIDEO && !a.screenShare && (i.setVideoEnabled(!a.pause), n.updatePipSource(i.id, !a.pause));
18637
+ var o = N(N({}, a), {}, { producingTransportId: a.producingTransportId, kind: a.kind === Ui.AUDIO ? "audio" : "video", producingPeerId: e, mimeType: a.mimeType }), c = i.producers.find(function(l) {
18638
+ var d = l.producerId;
18639
+ return d === o.producerId;
18640
+ });
18641
+ c ? Object.assign(c, o) : i.producers.push(o);
18619
18642
  }), this.logger.info("onParticipantMediaJoined: Emitting UPDATE_ACTIVE for peer ".concat(e)), this.context.getValue("peerSessionStore").emit($.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: this.participants.currentPage });
18620
18643
  }
18621
18644
  }
@@ -18699,6 +18722,8 @@ var vM = Object.defineProperty, fM = Object.getOwnPropertyDescriptor, zs = funct
18699
18722
  var v = this.roomNodeClient.handoverPeerProducers(i, a);
18700
18723
  v.forEach(function(f) {
18701
18724
  f.kind === "video" && f.appData.screenShare !== !0 && t.videoPeerConsumerMap.get(n) === f.id && (t.videoPeerConsumerMap.delete(n), t.updatePipSource(n, !1)), t.context.getValue("peerSessionStore").emit($.NEW_CONSUMER_CREATED, { id: f.id, appData: f.appData, peerId: i });
18725
+ }), this.logger.info("Removing old peer ".concat(n, " locally after handover.")), this.onParticipantLeave(n).catch(function(f) {
18726
+ t.logger.error("Failed to remove old peer locally after handover", { error: f });
18702
18727
  });
18703
18728
  }
18704
18729
  }
@@ -20780,13 +20805,13 @@ var EM = /* @__PURE__ */ function(s) {
20780
20805
  return w(this, r), t = C(this, r, [e != null ? e : "AwaitQueue stopped"]), t.name = "AwaitQueueStoppedError", typeof Error.captureStackTrace == "function" && Error.captureStackTrace(t, r), t;
20781
20806
  }
20782
20807
  return R(r, s), P(r);
20783
- }(/* @__PURE__ */ Dn(Error)), CM = /* @__PURE__ */ function(s) {
20808
+ }(/* @__PURE__ */ Ln(Error)), CM = /* @__PURE__ */ function(s) {
20784
20809
  function r(e) {
20785
20810
  var t;
20786
20811
  return w(this, r), t = C(this, r, [e != null ? e : "AwaitQueue task removed"]), t.name = "AwaitQueueRemovedTaskError", typeof Error.captureStackTrace == "function" && Error.captureStackTrace(t, r), t;
20787
20812
  }
20788
20813
  return R(r, s), P(r);
20789
- }(/* @__PURE__ */ Dn(Error)), uu = /* @__PURE__ */ S("logger"), Gd = /* @__PURE__ */ function() {
20814
+ }(/* @__PURE__ */ Ln(Error)), uu = /* @__PURE__ */ S("logger"), Gd = /* @__PURE__ */ function() {
20790
20815
  function s(r) {
20791
20816
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
20792
20817
  w(this, s), this.pendingTasks = /* @__PURE__ */ new Map(), this.nextTaskId = 0, this.stopping = !1, Object.defineProperty(this, uu, { writable: !0, value: void 0 }), this.log = e, u(this, uu)[uu] = { info: e && r ? r.info : function() {
@@ -20836,7 +20861,7 @@ var EM = /* @__PURE__ */ function(s) {
20836
20861
  return e;
20837
20862
  }() }, { key: "stop", value: function() {
20838
20863
  this.stopping = !0;
20839
- var e = Mn(this.pendingTasks.values()), t;
20864
+ var e = On(this.pendingTasks.values()), t;
20840
20865
  try {
20841
20866
  for (e.s(); !(t = e.n()).done; ) {
20842
20867
  var n = t.value;
@@ -20893,19 +20918,19 @@ var EM = /* @__PURE__ */ function(s) {
20893
20918
  return w(this, r), t = C(this, r, [e]), t.name = "UnsupportedError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(t, r) : t.stack = new Error(e).stack, t;
20894
20919
  }
20895
20920
  return R(r, s), P(r);
20896
- }(/* @__PURE__ */ Dn(Error)), cn = /* @__PURE__ */ function(s) {
20921
+ }(/* @__PURE__ */ Ln(Error)), cn = /* @__PURE__ */ function(s) {
20897
20922
  function r(e) {
20898
20923
  var t;
20899
20924
  return w(this, r), t = C(this, r, [e]), t.name = "InvalidStateError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(t, r) : t.stack = new Error(e).stack, t;
20900
20925
  }
20901
20926
  return R(r, s), P(r);
20902
- }(/* @__PURE__ */ Dn(Error)), Sa = /* @__PURE__ */ function(s) {
20927
+ }(/* @__PURE__ */ Ln(Error)), Sa = /* @__PURE__ */ function(s) {
20903
20928
  function r(e) {
20904
20929
  var t;
20905
20930
  return w(this, r), t = C(this, r, [e]), t.name = "TransportConnectionError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(t, cn) : t.stack = new Error(e).stack, t;
20906
20931
  }
20907
20932
  return R(r, s), P(r);
20908
- }(/* @__PURE__ */ Dn(Error)), _v = function(r) {
20933
+ }(/* @__PURE__ */ Ln(Error)), _v = function(r) {
20909
20934
  return new Promise(function(e) {
20910
20935
  return setTimeout(e, r);
20911
20936
  });
@@ -21167,10 +21192,10 @@ function NM() {
21167
21192
  this.logger.error("Consumer::destroyTrack()", N(N({}, u(this, vr)[vr]), {}, { error: s }));
21168
21193
  }
21169
21194
  }
21170
- var tr = /* @__PURE__ */ S("handler"), vs = /* @__PURE__ */ S("stopTracks"), fs = /* @__PURE__ */ S("disableTrackOnPause"), gi = /* @__PURE__ */ S("zeroRtpOnPause"), Gt = /* @__PURE__ */ S("closed"), Je = /* @__PURE__ */ S("track"), Tn = /* @__PURE__ */ S("paused"), gs = /* @__PURE__ */ S("maxSpatialLayer"), sd = /* @__PURE__ */ S("context"), Lt = /* @__PURE__ */ S("metadata"), VM = /* @__PURE__ */ function(s) {
21195
+ var tr = /* @__PURE__ */ S("handler"), vs = /* @__PURE__ */ S("stopTracks"), fs = /* @__PURE__ */ S("disableTrackOnPause"), gi = /* @__PURE__ */ S("zeroRtpOnPause"), Gt = /* @__PURE__ */ S("closed"), Je = /* @__PURE__ */ S("track"), bn = /* @__PURE__ */ S("paused"), gs = /* @__PURE__ */ S("maxSpatialLayer"), sd = /* @__PURE__ */ S("context"), Lt = /* @__PURE__ */ S("metadata"), VM = /* @__PURE__ */ function(s) {
21171
21196
  function r(e, t) {
21172
21197
  var n, i, a;
21173
- return w(this, r), a = C(this, r, [e]), Object.defineProperty(a, Lt, { get: $M, set: void 0 }), a.id = void 0, a.localId = void 0, Object.defineProperty(a, tr, { writable: !0, value: void 0 }), a.kind = void 0, a.appData = void 0, a.rtpSender = void 0, Object.defineProperty(a, vs, { writable: !0, value: void 0 }), Object.defineProperty(a, fs, { writable: !0, value: void 0 }), Object.defineProperty(a, gi, { writable: !0, value: void 0 }), Object.defineProperty(a, Gt, { writable: !0, value: !1 }), Object.defineProperty(a, Je, { writable: !0, value: void 0 }), Object.defineProperty(a, Tn, { writable: !0, value: void 0 }), Object.defineProperty(a, gs, { writable: !0, value: void 0 }), Object.defineProperty(a, sd, { writable: !0, value: void 0 }), a.id = t.id, a.localId = t.localId, u(a, Je)[Je] = t.track, a.kind = (n = t.track) === null || n === void 0 ? void 0 : n.kind, u(a, Tn)[Tn] = t.disableTrackOnPause ? !((i = t.track) !== null && i !== void 0 && i.enabled) : !1, u(a, gs)[gs] = void 0, u(a, vs)[vs] = t.stopTracks, u(a, fs)[fs] = t.disableTrackOnPause, u(a, gi)[gi] = t.zeroRtpOnPause, a.appData = t.appData || {}, a._onTrackEnded = a._onTrackEnded.bind(a), u(a, tr)[tr] = t.handler, a.rtpSender = t.rtpSender, a._handleTrack(), u(a, sd)[sd] = e, a;
21198
+ return w(this, r), a = C(this, r, [e]), Object.defineProperty(a, Lt, { get: $M, set: void 0 }), a.id = void 0, a.localId = void 0, Object.defineProperty(a, tr, { writable: !0, value: void 0 }), a.kind = void 0, a.appData = void 0, a.rtpSender = void 0, Object.defineProperty(a, vs, { writable: !0, value: void 0 }), Object.defineProperty(a, fs, { writable: !0, value: void 0 }), Object.defineProperty(a, gi, { writable: !0, value: void 0 }), Object.defineProperty(a, Gt, { writable: !0, value: !1 }), Object.defineProperty(a, Je, { writable: !0, value: void 0 }), Object.defineProperty(a, bn, { writable: !0, value: void 0 }), Object.defineProperty(a, gs, { writable: !0, value: void 0 }), Object.defineProperty(a, sd, { writable: !0, value: void 0 }), a.id = t.id, a.localId = t.localId, u(a, Je)[Je] = t.track, a.kind = (n = t.track) === null || n === void 0 ? void 0 : n.kind, u(a, bn)[bn] = t.disableTrackOnPause ? !((i = t.track) !== null && i !== void 0 && i.enabled) : !1, u(a, gs)[gs] = void 0, u(a, vs)[vs] = t.stopTracks, u(a, fs)[fs] = t.disableTrackOnPause, u(a, gi)[gi] = t.zeroRtpOnPause, a.appData = t.appData || {}, a._onTrackEnded = a._onTrackEnded.bind(a), u(a, tr)[tr] = t.handler, a.rtpSender = t.rtpSender, a._handleTrack(), u(a, sd)[sd] = e, a;
21174
21199
  }
21175
21200
  return R(r, s), P(r, [{
21176
21201
  key: "closed",
@@ -21191,7 +21216,7 @@ var tr = /* @__PURE__ */ S("handler"), vs = /* @__PURE__ */ S("stopTracks"), fs
21191
21216
  }, {
21192
21217
  key: "paused",
21193
21218
  get: function() {
21194
- return u(this, Tn)[Tn];
21219
+ return u(this, bn)[bn];
21195
21220
  }
21196
21221
  /**
21197
21222
  * Max spatial layer.
@@ -21261,7 +21286,7 @@ var tr = /* @__PURE__ */ S("handler"), vs = /* @__PURE__ */ S("stopTracks"), fs
21261
21286
  }() }, {
21262
21287
  key: "pause",
21263
21288
  value: function() {
21264
- this.logger.debug("Producer::pause()", u(this, Lt)[Lt]), u(this, Gt)[Gt] && this.logger.error("Producer::pause() | Producer closed", u(this, Lt)[Lt]), u(this, Tn)[Tn] = !0, u(this, Je)[Je] && u(this, fs)[fs] && (u(this, Je)[Je].enabled = !1), u(this, gi)[gi] && u(this, tr)[tr].replaceTrack(this.localId, null), this.emit("pause");
21289
+ this.logger.debug("Producer::pause()", u(this, Lt)[Lt]), u(this, Gt)[Gt] && this.logger.error("Producer::pause() | Producer closed", u(this, Lt)[Lt]), u(this, bn)[bn] = !0, u(this, Je)[Je] && u(this, fs)[fs] && (u(this, Je)[Je].enabled = !1), u(this, gi)[gi] && u(this, tr)[tr].replaceTrack(this.localId, null), this.emit("pause");
21265
21290
  }
21266
21291
  /**
21267
21292
  * Resumes sending media.
@@ -21273,7 +21298,7 @@ var tr = /* @__PURE__ */ S("handler"), vs = /* @__PURE__ */ S("stopTracks"), fs
21273
21298
  this.logger.error("Producer::resume() | Producer closed", u(this, Lt)[Lt]);
21274
21299
  return;
21275
21300
  }
21276
- u(this, Tn)[Tn] = !1, u(this, Je)[Je] && u(this, fs)[fs] && (u(this, Je)[Je].enabled = !0), u(this, gi)[gi] && u(this, tr)[tr].replaceTrack(this.localId, u(this, Je)[Je]), this.emit("resume");
21301
+ u(this, bn)[bn] = !1, u(this, Je)[Je] && u(this, fs)[fs] && (u(this, Je)[Je].enabled = !0), u(this, gi)[gi] && u(this, tr)[tr].replaceTrack(this.localId, u(this, Je)[Je]), this.emit("resume");
21277
21302
  }
21278
21303
  /**
21279
21304
  * Replaces the current track with a new one or null.
@@ -21309,7 +21334,7 @@ var tr = /* @__PURE__ */ S("handler"), vs = /* @__PURE__ */ S("stopTracks"), fs
21309
21334
  }
21310
21335
  return this.logger.debug("replaceTrack() | same track, ignored trackId: ".concat(a.id), u(this, Lt)[Lt]), o.a(2);
21311
21336
  case 3:
21312
- if (!(!u(this, gi)[gi] || !u(this, Tn)[Tn])) {
21337
+ if (!(!u(this, gi)[gi] || !u(this, bn)[bn])) {
21313
21338
  o.n = 4;
21314
21339
  break;
21315
21340
  }
@@ -21792,7 +21817,7 @@ var ul = "transport closed", ms = /* @__PURE__ */ S("context"), UM = /* @__PURE_
21792
21817
  case 1:
21793
21818
  return l.n = 2, this.handler.pc.createAnswer();
21794
21819
  case 2:
21795
- return a = l.v, this.logger.info("[SDP] Created answer corresponding to received offer", { sdp: a.sdp }), o = Cn.parse(a.sdp), o.media = o.media.map(function(d) {
21820
+ return a = l.v, this.logger.info("[SDP] Created answer corresponding to received offer", { sdp: a.sdp }), o = Rn.parse(a.sdp), o.media = o.media.map(function(d) {
21796
21821
  if (d.type === "audio") {
21797
21822
  var p = N({}, d), v = p.fmtp.find(function(g) {
21798
21823
  return g.payload === 111;
@@ -21804,7 +21829,7 @@ var ul = "transport closed", ms = /* @__PURE__ */ S("context"), UM = /* @__PURE_
21804
21829
  return f || p.rtcpFb.push({ payload: parseInt(p.payloads, 10), type: "nack" }), p;
21805
21830
  }
21806
21831
  return d;
21807
- }), a.sdp = Cn.write(o), this.logger.info("[SDP] Setting munged SDP", { sdp: a.sdp }), l.n = 3, this.setLocalDescription(a);
21832
+ }), a.sdp = Rn.write(o), this.logger.info("[SDP] Setting munged SDP", { sdp: a.sdp }), l.n = 3, this.setLocalDescription(a);
21808
21833
  case 3:
21809
21834
  return this.logger.info("[SDP] Successfully set local description", { sdp: a.sdp }), l.a(2, a);
21810
21835
  case 4:
@@ -21908,12 +21933,12 @@ var ul = "transport closed", ms = /* @__PURE__ */ S("context"), UM = /* @__PURE_
21908
21933
  }
21909
21934
  return t;
21910
21935
  }() }], [{ key: "parseCodecAndFmtpMappings", value: function(t, n) {
21911
- var i = Cn.parse(t.sdp), a = {};
21936
+ var i = Rn.parse(t.sdp), a = {};
21912
21937
  return i.media.forEach(function(o) {
21913
21938
  n.includes(o.mid.toString()) && (a[o.mid.toString()] = { rtp: o.rtp, fmtp: o.fmtp, payloads: o.payloads, rtcpFb: o.rtcpFb });
21914
21939
  }), a;
21915
21940
  } }, { key: "setCodecAndFmtpMappings", value: function(t, n, i) {
21916
- var a = Cn.parse(t.sdp);
21941
+ var a = Rn.parse(t.sdp);
21917
21942
  a.media = a.media.map(function(c) {
21918
21943
  if (n.includes(c.mid.toString())) {
21919
21944
  var l = N({}, c);
@@ -21921,25 +21946,25 @@ var ul = "transport closed", ms = /* @__PURE__ */ S("context"), UM = /* @__PURE_
21921
21946
  }
21922
21947
  return c;
21923
21948
  });
21924
- var o = N(N({}, t), {}, { sdp: Cn.write(a) });
21949
+ var o = N(N({}, t), {}, { sdp: Rn.write(a) });
21925
21950
  return o;
21926
21951
  } }, { key: "parseHeaderExtensionMappings", value: function(t) {
21927
- var n = Cn.parse(t.sdp), i = {};
21952
+ var n = Rn.parse(t.sdp), i = {};
21928
21953
  return n.media.forEach(function(a) {
21929
21954
  i[a.mid] = a.ext;
21930
21955
  }), i;
21931
21956
  } }, { key: "setHeaderExtensionMappings", value: function(t, n) {
21932
- var i = Cn.parse(t.sdp);
21957
+ var i = Rn.parse(t.sdp);
21933
21958
  i.media = i.media.map(function(o) {
21934
21959
  var c = N({}, o);
21935
21960
  return c.ext = n[o.mid], c;
21936
21961
  });
21937
- var a = N(N({}, t), {}, { sdp: Cn.write(i) });
21962
+ var a = N(N({}, t), {}, { sdp: Rn.write(i) });
21938
21963
  return a;
21939
21964
  } }]);
21940
21965
  }(Al), Ue = /* @__PURE__ */ S("socket"), jM = /* @__PURE__ */ function() {
21941
21966
  function s(r) {
21942
- w(this, s), Object.defineProperty(this, Ue, { writable: !0, value: void 0 }), this.events = void 0, u(this, Ue)[Ue] = r, this.events = An;
21967
+ w(this, s), Object.defineProperty(this, Ue, { writable: !0, value: void 0 }), this.events = void 0, u(this, Ue)[Ue] = r, this.events = In;
21943
21968
  }
21944
21969
  return P(s, [{ key: "joinRoom", value: function() {
21945
21970
  var r = m(/* @__PURE__ */ h().m(function t(n, i, a) {
@@ -22606,7 +22631,7 @@ var ul = "transport closed", ms = /* @__PURE__ */ S("context"), UM = /* @__PURE_
22606
22631
  return c.reverse(), f = v.sender.getParameters(), f.encodings = c, I.n = 1, v.sender.setParameters(f);
22607
22632
  case 1:
22608
22633
  return g = function(_, O) {
22609
- var L, F = Cn.parse(_), W = F.media[F.media.length - 1], G = W.rtp.filter(function(B) {
22634
+ var L, F = Rn.parse(_), W = F.media[F.media.length - 1], G = W.rtp.filter(function(B) {
22610
22635
  return O.some(function(ee) {
22611
22636
  return ee.name === B.codec;
22612
22637
  });
@@ -22621,7 +22646,7 @@ var ul = "transport closed", ms = /* @__PURE__ */ S("context"), UM = /* @__PURE_
22621
22646
  }), V = G.map(function(B) {
22622
22647
  return B.payload;
22623
22648
  });
22624
- return F.media[F.media.length - 1].rtp = G, F.media[F.media.length - 1].fmtp = H, F.media[F.media.length - 1].rtcpFb = Y, F.media[F.media.length - 1].payloads = V.join(" "), Cn.write(F);
22649
+ return F.media[F.media.length - 1].rtp = G, F.media[F.media.length - 1].fmtp = H, F.media[F.media.length - 1].rtcpFb = Y, F.media[F.media.length - 1].payloads = V.join(" "), Rn.write(F);
22625
22650
  }, I.n = 2, this.pc.createOffer();
22626
22651
  case 2:
22627
22652
  return y = I.v, y.sdp = g(y.sdp, l), this.logger.debug("[SDP] send() | calling pc.setLocalDescription() [offer:".concat(JSON.stringify(y), "]")), I.n = 3, this.pc.setLocalDescription(y);
@@ -22826,10 +22851,10 @@ var Nr = /* @__PURE__ */ S("context"), mi = /* @__PURE__ */ S("logger"), qM = /*
22826
22851
  var t = Oo(), n = new UM(u(this, Nr)[Nr], N(N({ id: t }, e), {}, { handlerFactory: this.handlerFactory }));
22827
22852
  return n;
22828
22853
  } }]);
22829
- }(), WM = 2e3, js = /* @__PURE__ */ S("device"), He = /* @__PURE__ */ S("sendTransport"), Be = /* @__PURE__ */ S("recvTransport"), du = /* @__PURE__ */ S("sendTransportConnectedCallback"), hu = /* @__PURE__ */ S("recvTransportConnectedCallback"), Li = /* @__PURE__ */ S("socket"), _s = /* @__PURE__ */ S("socketHandler"), pu = /* @__PURE__ */ S("events"), qs = /* @__PURE__ */ S("metrics"), Oi = /* @__PURE__ */ S("transportDisconnectedTimer"), gr = /* @__PURE__ */ S("iceTransportPolicy"), Os = /* @__PURE__ */ S("connectionHandler"), vu = /* @__PURE__ */ S("reset"), od = /* @__PURE__ */ S("createTransports"), fu = /* @__PURE__ */ S("connectTransportWithRetry"), zd = /* @__PURE__ */ S("connectTransport"), Qd = /* @__PURE__ */ S("createSendTransport"), Yd = /* @__PURE__ */ S("createRecvTransport"), Xd = /* @__PURE__ */ S("setTransportEventHandlers"), Zd = /* @__PURE__ */ S("transportConnectionRequest"), _u = /* @__PURE__ */ S("reconnectTransport"), In = /* @__PURE__ */ S("updateTransportState"), GM = /* @__PURE__ */ function(s) {
22854
+ }(), WM = 2e3, js = /* @__PURE__ */ S("device"), He = /* @__PURE__ */ S("sendTransport"), Be = /* @__PURE__ */ S("recvTransport"), du = /* @__PURE__ */ S("sendTransportConnectedCallback"), hu = /* @__PURE__ */ S("recvTransportConnectedCallback"), Li = /* @__PURE__ */ S("socket"), _s = /* @__PURE__ */ S("socketHandler"), pu = /* @__PURE__ */ S("events"), qs = /* @__PURE__ */ S("metrics"), Oi = /* @__PURE__ */ S("transportDisconnectedTimer"), gr = /* @__PURE__ */ S("iceTransportPolicy"), Os = /* @__PURE__ */ S("connectionHandler"), vu = /* @__PURE__ */ S("reset"), od = /* @__PURE__ */ S("createTransports"), fu = /* @__PURE__ */ S("connectTransportWithRetry"), zd = /* @__PURE__ */ S("connectTransport"), Qd = /* @__PURE__ */ S("createSendTransport"), Yd = /* @__PURE__ */ S("createRecvTransport"), Xd = /* @__PURE__ */ S("setTransportEventHandlers"), Zd = /* @__PURE__ */ S("transportConnectionRequest"), _u = /* @__PURE__ */ S("reconnectTransport"), Mn = /* @__PURE__ */ S("updateTransportState"), GM = /* @__PURE__ */ function(s) {
22830
22855
  function r(e, t) {
22831
22856
  var n;
22832
- w(this, r), n = C(this, r), Object.defineProperty(n, In, { value: rO }), Object.defineProperty(n, _u, { value: tO }), Object.defineProperty(n, Zd, { value: eO }), Object.defineProperty(n, Xd, { value: xM }), Object.defineProperty(n, Yd, { value: ZM }), Object.defineProperty(n, Qd, { value: XM }), Object.defineProperty(n, zd, { value: YM }), Object.defineProperty(n, fu, { value: QM }), Object.defineProperty(n, od, { value: zM }), Object.defineProperty(n, vu, { value: KM }), Object.defineProperty(n, Os, { get: JM, set: void 0 }), n.context = void 0, Object.defineProperty(n, js, { writable: !0, value: void 0 }), Object.defineProperty(n, He, { writable: !0, value: void 0 }), Object.defineProperty(n, Be, { writable: !0, value: void 0 }), Object.defineProperty(n, du, { writable: !0, value: void 0 }), Object.defineProperty(n, hu, { writable: !0, value: void 0 }), Object.defineProperty(n, Li, { writable: !0, value: void 0 }), Object.defineProperty(n, _s, { writable: !0, value: void 0 }), Object.defineProperty(n, pu, { writable: !0, value: void 0 }), Object.defineProperty(n, qs, { writable: !0, value: { transportFailureCount: { send: 0, recv: 0 }, lastConnectionTime: 0 } }), Object.defineProperty(n, Oi, { writable: !0, value: void 0 }), Object.defineProperty(n, gr, { writable: !0, value: "all" }), n.context = e, u(n, Li)[Li] = t, u(n, js)[js] = new qM(e), u(n, _s)[_s] = new jM(t), u(n, pu)[pu] = An, u(n, Os)[Os].mediaState = { send: { state: Ea.NEW }, recv: { state: Ea.NEW } };
22857
+ w(this, r), n = C(this, r), Object.defineProperty(n, Mn, { value: rO }), Object.defineProperty(n, _u, { value: tO }), Object.defineProperty(n, Zd, { value: eO }), Object.defineProperty(n, Xd, { value: xM }), Object.defineProperty(n, Yd, { value: ZM }), Object.defineProperty(n, Qd, { value: XM }), Object.defineProperty(n, zd, { value: YM }), Object.defineProperty(n, fu, { value: QM }), Object.defineProperty(n, od, { value: zM }), Object.defineProperty(n, vu, { value: KM }), Object.defineProperty(n, Os, { get: JM, set: void 0 }), n.context = void 0, Object.defineProperty(n, js, { writable: !0, value: void 0 }), Object.defineProperty(n, He, { writable: !0, value: void 0 }), Object.defineProperty(n, Be, { writable: !0, value: void 0 }), Object.defineProperty(n, du, { writable: !0, value: void 0 }), Object.defineProperty(n, hu, { writable: !0, value: void 0 }), Object.defineProperty(n, Li, { writable: !0, value: void 0 }), Object.defineProperty(n, _s, { writable: !0, value: void 0 }), Object.defineProperty(n, pu, { writable: !0, value: void 0 }), Object.defineProperty(n, qs, { writable: !0, value: { transportFailureCount: { send: 0, recv: 0 }, lastConnectionTime: 0 } }), Object.defineProperty(n, Oi, { writable: !0, value: void 0 }), Object.defineProperty(n, gr, { writable: !0, value: "all" }), n.context = e, u(n, Li)[Li] = t, u(n, js)[js] = new qM(e), u(n, _s)[_s] = new jM(t), u(n, pu)[pu] = In, u(n, Os)[Os].mediaState = { send: { state: Ea.NEW }, recv: { state: Ea.NEW } };
22833
22858
  var i = dc(n.context, "forceRelay");
22834
22859
  return i && (u(n, gr)[gr] = "relay"), n.logger.info("ICE Transport Policy initially set to ".concat(u(n, gr)[gr])), u(n, vu)[vu](), n;
22835
22860
  }
@@ -23046,7 +23071,7 @@ function XM(s) {
23046
23071
  this.logger.info("Transport send is already connected", { transport: { id: (r = u(this, He)[He]) === null || r === void 0 ? void 0 : r.id, serverId: (e = u(this, He)[He]) === null || e === void 0 ? void 0 : e.serverId, type: "send" } });
23047
23072
  return;
23048
23073
  }
23049
- u(this, He)[He] = u(this, js)[js].createTransport(N(N({}, s), {}, { direction: "send" })), u(this, In)[In]({ state: Ea.NEW, direction: "send", sfuSessionId: u(this, He)[He].serverId }), this.context.getValue("callstats").configureSendTransport(u(this, He)[He]);
23074
+ u(this, He)[He] = u(this, js)[js].createTransport(N(N({}, s), {}, { direction: "send" })), u(this, Mn)[Mn]({ state: Ea.NEW, direction: "send", sfuSessionId: u(this, He)[He].serverId }), this.context.getValue("callstats").configureSendTransport(u(this, He)[He]);
23050
23075
  }
23051
23076
  function ZM(s) {
23052
23077
  if (u(this, Be)[Be] && u(this, Be)[Be].connected) {
@@ -23054,12 +23079,12 @@ function ZM(s) {
23054
23079
  this.logger.info("Transport recv is already connected", { transport: { id: (r = u(this, Be)[Be]) === null || r === void 0 ? void 0 : r.id, serverId: (e = u(this, Be)[Be]) === null || e === void 0 ? void 0 : e.serverId, type: "recv" } });
23055
23080
  return;
23056
23081
  }
23057
- u(this, Be)[Be] = u(this, js)[js].createTransport(N(N({}, s), {}, { direction: "recv" })), u(this, In)[In]({ state: Ea.NEW, direction: "recv", sfuSessionId: u(this, Be)[Be].serverId }), this.context.getValue("callstats").configureRecvTransport(u(this, Be)[Be]);
23082
+ u(this, Be)[Be] = u(this, js)[js].createTransport(N(N({}, s), {}, { direction: "recv" })), u(this, Mn)[Mn]({ state: Ea.NEW, direction: "recv", sfuSessionId: u(this, Be)[Be].serverId }), this.context.getValue("callstats").configureRecvTransport(u(this, Be)[Be]);
23058
23083
  }
23059
23084
  function xM(s) {
23060
23085
  var r = this, e = s.direction, t = s.id;
23061
23086
  s.on("serveridchange", function(n) {
23062
- u(r, In)[In]({ state: s.connectionState, direction: e, sfuSessionId: n });
23087
+ u(r, Mn)[Mn]({ state: s.connectionState, direction: e, sfuSessionId: n });
23063
23088
  }), s.on("connectionstatechange", /* @__PURE__ */ function() {
23064
23089
  var n = m(/* @__PURE__ */ h().m(function i(a) {
23065
23090
  var o, c;
@@ -23067,7 +23092,7 @@ function xM(s) {
23067
23092
  for (; ; )
23068
23093
  switch (l.n) {
23069
23094
  case 0:
23070
- u(r, In)[In]({ state: a, direction: e, sfuSessionId: s.serverId }), r.logger.info("Transport connection state changed for ".concat(e, " transport"), { transport: { id: t, serverId: s.serverId, type: e, status: a } }), o = function() {
23095
+ u(r, Mn)[Mn]({ state: a, direction: e, sfuSessionId: s.serverId }), r.logger.info("Transport connection state changed for ".concat(e, " transport"), { transport: { id: t, serverId: s.serverId, type: e, status: a } }), o = function() {
23071
23096
  var p = u(r, Oi)[Oi][e];
23072
23097
  p !== void 0 && (clearTimeout(p), u(r, Oi)[Oi][e] = void 0);
23073
23098
  }, c = a, l.n = c === "connected" ? 1 : c === "disconnected" ? 2 : c === "failed" ? 3 : 6;
@@ -23161,7 +23186,7 @@ function nh() {
23161
23186
  case 4:
23162
23187
  this.logger.warn("Unknown transport direction", { transport: { type: r } });
23163
23188
  case 5:
23164
- e = r === "send" ? u(this, He)[He] : u(this, Be)[Be], u(this, In)[In]({ state: Ea.CONNECTED, direction: r, sfuSessionId: e.serverId });
23189
+ e = r === "send" ? u(this, He)[He] : u(this, Be)[Be], u(this, Mn)[Mn]({ state: Ea.CONNECTED, direction: r, sfuSessionId: e.serverId });
23165
23190
  case 6:
23166
23191
  return n.a(2);
23167
23192
  }
@@ -23332,7 +23357,7 @@ var ud = /* @__PURE__ */ S("context"), Jt = /* @__PURE__ */ S("logger"), nO = /*
23332
23357
  }
23333
23358
  return e;
23334
23359
  }() }], [{ key: "getMSIDFromSDP", value: function(e, t) {
23335
- var n = Cn.parse(e), i = n.media.filter(function(a) {
23360
+ var n = Rn.parse(e), i = n.media.filter(function(a) {
23336
23361
  return t === "video" ? a.type === "video" : a.type === "audio";
23337
23362
  }).at(-1).msid;
23338
23363
  return i;
@@ -23349,10 +23374,10 @@ function aO(s) {
23349
23374
  return {};
23350
23375
  }
23351
23376
  }
23352
- var Ci = /* @__PURE__ */ S("producers"), Rn = /* @__PURE__ */ S("consumers"), ys = /* @__PURE__ */ S("producerIdToConsumerIdMap"), Vu = /* @__PURE__ */ S("producerStrategy"), fr = /* @__PURE__ */ S("consumerStrategy"), cd = /* @__PURE__ */ S("metrics"), Wr = /* @__PURE__ */ S("producersToConsume"), As = /* @__PURE__ */ S("processConsumerTimeout"), $u = /* @__PURE__ */ S("processConsumers"), ld = /* @__PURE__ */ S("producerCreationRequest"), dd = /* @__PURE__ */ S("handleProducer"), ih = /* @__PURE__ */ S("consumerCreationRequest"), ah = /* @__PURE__ */ S("handleConsumer"), sO = /* @__PURE__ */ function(s) {
23377
+ var Ci = /* @__PURE__ */ S("producers"), _n = /* @__PURE__ */ S("consumers"), ys = /* @__PURE__ */ S("producerIdToConsumerIdMap"), Vu = /* @__PURE__ */ S("producerStrategy"), fr = /* @__PURE__ */ S("consumerStrategy"), cd = /* @__PURE__ */ S("metrics"), Wr = /* @__PURE__ */ S("producersToConsume"), As = /* @__PURE__ */ S("processConsumerTimeout"), $u = /* @__PURE__ */ S("processConsumers"), ld = /* @__PURE__ */ S("producerCreationRequest"), dd = /* @__PURE__ */ S("handleProducer"), ih = /* @__PURE__ */ S("consumerCreationRequest"), ah = /* @__PURE__ */ S("handleConsumer"), sO = /* @__PURE__ */ function(s) {
23353
23378
  function r(e, t) {
23354
23379
  var n;
23355
- return w(this, r), n = C(this, r, [e, t]), Object.defineProperty(n, ah, { value: dO }), Object.defineProperty(n, ih, { value: lO }), Object.defineProperty(n, dd, { value: cO }), Object.defineProperty(n, ld, { value: uO }), Object.defineProperty(n, $u, { value: oO }), Object.defineProperty(n, Ci, { writable: !0, value: void 0 }), Object.defineProperty(n, Rn, { writable: !0, value: void 0 }), Object.defineProperty(n, ys, { writable: !0, value: void 0 }), Object.defineProperty(n, Vu, { writable: !0, value: void 0 }), Object.defineProperty(n, fr, { writable: !0, value: void 0 }), Object.defineProperty(n, cd, { writable: !0, value: { producerCreationFailureCount: 0, consumerCreationFailureCount: 0, producerNotReadyFailureCount: 0 } }), Object.defineProperty(n, Wr, { writable: !0, value: [] }), Object.defineProperty(n, As, { writable: !0, value: void 0 }), n.context = e, n.sendTransportConnectedCallback = /* @__PURE__ */ m(/* @__PURE__ */ h().m(function i() {
23380
+ return w(this, r), n = C(this, r, [e, t]), Object.defineProperty(n, ah, { value: dO }), Object.defineProperty(n, ih, { value: lO }), Object.defineProperty(n, dd, { value: cO }), Object.defineProperty(n, ld, { value: uO }), Object.defineProperty(n, $u, { value: oO }), Object.defineProperty(n, Ci, { writable: !0, value: void 0 }), Object.defineProperty(n, _n, { writable: !0, value: void 0 }), Object.defineProperty(n, ys, { writable: !0, value: void 0 }), Object.defineProperty(n, Vu, { writable: !0, value: void 0 }), Object.defineProperty(n, fr, { writable: !0, value: void 0 }), Object.defineProperty(n, cd, { writable: !0, value: { producerCreationFailureCount: 0, consumerCreationFailureCount: 0, producerNotReadyFailureCount: 0 } }), Object.defineProperty(n, Wr, { writable: !0, value: [] }), Object.defineProperty(n, As, { writable: !0, value: void 0 }), n.context = e, n.sendTransportConnectedCallback = /* @__PURE__ */ m(/* @__PURE__ */ h().m(function i() {
23356
23381
  return h().w(function(a) {
23357
23382
  for (; ; )
23358
23383
  switch (a.n) {
@@ -23384,7 +23409,7 @@ var Ci = /* @__PURE__ */ S("producers"), Rn = /* @__PURE__ */ S("consumers"), ys
23384
23409
  } }, { key: "producers", get: function() {
23385
23410
  return u(this, Ci)[Ci];
23386
23411
  } }, { key: "consumers", get: function() {
23387
- return u(this, Rn)[Rn];
23412
+ return u(this, _n)[_n];
23388
23413
  } }, {
23389
23414
  key: "producerIdToConsumerIdMap",
23390
23415
  get: function() {
@@ -23397,7 +23422,7 @@ var Ci = /* @__PURE__ */ S("producers"), Rn = /* @__PURE__ */ S("consumers"), ys
23397
23422
  }, { key: "logger", get: function() {
23398
23423
  return this.context.getValue("logger");
23399
23424
  } }, { key: "reset", value: function() {
23400
- u(this, Ci)[Ci] = /* @__PURE__ */ new Map(), u(this, Rn)[Rn] = /* @__PURE__ */ new Map(), u(this, ys)[ys] = /* @__PURE__ */ new Map();
23425
+ u(this, Ci)[Ci] = /* @__PURE__ */ new Map(), u(this, _n)[_n] = /* @__PURE__ */ new Map(), u(this, ys)[ys] = /* @__PURE__ */ new Map();
23401
23426
  } }, { key: "createProducer", value: function() {
23402
23427
  var e = m(/* @__PURE__ */ h().m(function n(i, a) {
23403
23428
  var o, c, l, d;
@@ -23512,7 +23537,7 @@ var Ci = /* @__PURE__ */ S("producers"), Rn = /* @__PURE__ */ S("consumers"), ys
23512
23537
  }
23513
23538
  return t;
23514
23539
  }() }, { key: "closeAllConsumers", value: function() {
23515
- return this.closeConsumers(Array.from(u(this, Rn)[Rn].keys()));
23540
+ return this.closeConsumers(Array.from(u(this, _n)[_n].keys()));
23516
23541
  } }, { key: "switchConsumersToLayer", value: function() {
23517
23542
  var e = m(/* @__PURE__ */ h().m(function n(i, a) {
23518
23543
  return h().w(function(o) {
@@ -23650,7 +23675,7 @@ function dO(s) {
23650
23675
  for (; ; )
23651
23676
  switch (i.n) {
23652
23677
  case 0:
23653
- r.logger.debug("consumer closed", { consumer: { closureReason: n, id: s.id, kind: s.kind, appData: s.appData } }), u(r, Rn)[Rn].delete(s.id), r.context.getValue("peerSessionStore").emit($.CONSUMER_CLOSED, { id: s.id });
23678
+ r.logger.debug("consumer closed", { consumer: { closureReason: n, id: s.id, kind: s.kind, appData: s.appData } }), u(r, _n)[_n].delete(s.id), r.context.getValue("peerSessionStore").emit($.CONSUMER_CLOSED, { id: s.id });
23654
23679
  case 1:
23655
23680
  return i.a(2);
23656
23681
  }
@@ -23659,7 +23684,7 @@ function dO(s) {
23659
23684
  return function(t) {
23660
23685
  return e.apply(this, arguments);
23661
23686
  };
23662
- }()), u(this, Rn)[Rn].set(s.id, s), this.producerIdToConsumerIdMap.set(s.producerId, s.id), this.context.getValue("peerSessionStore").emit($.NEW_CONSUMER_CREATED, { id: s.id, appData: s.appData, peerId: s.peerId });
23687
+ }()), u(this, _n)[_n].set(s.id, s), this.producerIdToConsumerIdMap.set(s.producerId, s.id), this.context.getValue("peerSessionStore").emit($.NEW_CONSUMER_CREATED, { id: s.id, appData: s.appData, peerId: s.peerId });
23663
23688
  }
23664
23689
  var gu = /* @__PURE__ */ S("zeroCrossingThreshold"), mu = /* @__PURE__ */ S("minVoiceDuration"), yu = /* @__PURE__ */ S("hangoverFrames"), ks = /* @__PURE__ */ S("initialEnergyThreshold"), Ds = /* @__PURE__ */ S("noiseAdaptationRate"), Ls = /* @__PURE__ */ S("voiceAdaptationRate"), Uu = /* @__PURE__ */ S("minEnergyThreshold"), ju = /* @__PURE__ */ S("maxEnergyThreshold"), Ts = /* @__PURE__ */ S("energyRatioThreshold"), St = /* @__PURE__ */ S("currentEnergyThreshold"), ir = /* @__PURE__ */ S("backgroundNoiseEnergy"), rr = /* @__PURE__ */ S("voiceDetected"), yi = /* @__PURE__ */ S("consecutiveVoiceFrames"), ki = /* @__PURE__ */ S("hangoverCount"), qr = /* @__PURE__ */ S("noiseEnergyHistory"), Fu = /* @__PURE__ */ S("noiseHistorySize"), hd = /* @__PURE__ */ S("updateEnergyThreshold"), pd = /* @__PURE__ */ S("updateNoiseEstimate"), uh = /* @__PURE__ */ S("calculateEnergy"), ch = /* @__PURE__ */ S("calculateZeroCrossingRate"), ap = /* @__PURE__ */ function() {
23665
23690
  function s() {
@@ -23803,9 +23828,9 @@ var ku = /* @__PURE__ */ S("context"), Iv = /* @__PURE__ */ function() {
23803
23828
  } }, { key: "clearTimeout", value: function(e) {
23804
23829
  return navigator && navigator.RNBackgroundTimerImpl ? navigator.RNBackgroundTimerImpl.clearTimeout(e) : global.clearTimeout(e);
23805
23830
  } }]);
23806
- }(), gO = 60, mO = 400, Vr = /* @__PURE__ */ S("interval"), $r = /* @__PURE__ */ S("reportInterval"), Gr = /* @__PURE__ */ S("producerId"), Hu = /* @__PURE__ */ S("audioTrack"), Ns = /* @__PURE__ */ S("energy"), Is = /* @__PURE__ */ S("vad"), Pn = /* @__PURE__ */ S("minEnergy"), Ei = /* @__PURE__ */ S("maxEnergy"), Vs = /* @__PURE__ */ S("previousState"), Ti = /* @__PURE__ */ S("context"), Fr = /* @__PURE__ */ S("audioSampler"), hr = /* @__PURE__ */ S("timer"), bu = /* @__PURE__ */ S("sample"), lh = /* @__PURE__ */ S("getAudioCharacteristics"), sc = /* @__PURE__ */ S("isSilent"), wu = /* @__PURE__ */ S("report"), dh = /* @__PURE__ */ S("logScale"), Il = /* @__PURE__ */ function() {
23831
+ }(), gO = 60, mO = 400, Vr = /* @__PURE__ */ S("interval"), $r = /* @__PURE__ */ S("reportInterval"), Gr = /* @__PURE__ */ S("producerId"), Hu = /* @__PURE__ */ S("audioTrack"), Ns = /* @__PURE__ */ S("energy"), Is = /* @__PURE__ */ S("vad"), Sn = /* @__PURE__ */ S("minEnergy"), Ei = /* @__PURE__ */ S("maxEnergy"), Vs = /* @__PURE__ */ S("previousState"), Ti = /* @__PURE__ */ S("context"), Fr = /* @__PURE__ */ S("audioSampler"), hr = /* @__PURE__ */ S("timer"), bu = /* @__PURE__ */ S("sample"), lh = /* @__PURE__ */ S("getAudioCharacteristics"), sc = /* @__PURE__ */ S("isSilent"), wu = /* @__PURE__ */ S("report"), dh = /* @__PURE__ */ S("logScale"), Il = /* @__PURE__ */ function() {
23807
23832
  function s(r, e) {
23808
- w(this, s), Object.defineProperty(this, wu, { value: bO }), Object.defineProperty(this, lh, { value: kO }), Object.defineProperty(this, bu, { value: yO }), Object.defineProperty(this, Vr, { writable: !0, value: void 0 }), Object.defineProperty(this, $r, { writable: !0, value: void 0 }), Object.defineProperty(this, Gr, { writable: !0, value: void 0 }), Object.defineProperty(this, Hu, { writable: !0, value: void 0 }), Object.defineProperty(this, Ns, { writable: !0, value: void 0 }), Object.defineProperty(this, Is, { writable: !0, value: void 0 }), Object.defineProperty(this, Pn, { writable: !0, value: void 0 }), Object.defineProperty(this, Ei, { writable: !0, value: void 0 }), Object.defineProperty(this, Vs, { writable: !0, value: void 0 }), Object.defineProperty(this, Ti, { writable: !0, value: void 0 }), Object.defineProperty(this, Fr, { writable: !0, value: void 0 }), Object.defineProperty(this, hr, { writable: !0, value: void 0 }), this.reportRequest = e, u(this, Ti)[Ti] = r, u(this, Is)[Is] = new ap();
23833
+ w(this, s), Object.defineProperty(this, wu, { value: bO }), Object.defineProperty(this, lh, { value: kO }), Object.defineProperty(this, bu, { value: yO }), Object.defineProperty(this, Vr, { writable: !0, value: void 0 }), Object.defineProperty(this, $r, { writable: !0, value: void 0 }), Object.defineProperty(this, Gr, { writable: !0, value: void 0 }), Object.defineProperty(this, Hu, { writable: !0, value: void 0 }), Object.defineProperty(this, Ns, { writable: !0, value: void 0 }), Object.defineProperty(this, Is, { writable: !0, value: void 0 }), Object.defineProperty(this, Sn, { writable: !0, value: void 0 }), Object.defineProperty(this, Ei, { writable: !0, value: void 0 }), Object.defineProperty(this, Vs, { writable: !0, value: void 0 }), Object.defineProperty(this, Ti, { writable: !0, value: void 0 }), Object.defineProperty(this, Fr, { writable: !0, value: void 0 }), Object.defineProperty(this, hr, { writable: !0, value: void 0 }), this.reportRequest = e, u(this, Ti)[Ti] = r, u(this, Is)[Is] = new ap();
23809
23834
  var t = navigator, n = t.isReactNative;
23810
23835
  u(this, Fr)[Fr] = n ? new Iv(u(this, Ti)[Ti]) : new Mv(u(this, Ti)[Ti]), u(this, hr)[hr] = n ? Fg : Mu;
23811
23836
  }
@@ -23843,8 +23868,8 @@ function kO() {
23843
23868
  var s = u(this, Fr)[Fr].samples, r = u(this, Is)[Is].processAudioChunk(s), e = r.energy, t = r.isVoice, n = u(pl, dh)[dh](e);
23844
23869
  if (n === -1 / 0 || e < 1e-6)
23845
23870
  return { energy: 0, isVoice: !1 };
23846
- (!u(this, Pn)[Pn] || n < u(this, Pn)[Pn]) && (u(this, Pn)[Pn] = n), (!u(this, Ei)[Ei] || n > u(this, Ei)[Ei]) && (u(this, Ei)[Ei] = n);
23847
- var i = (n - u(this, Pn)[Pn]) / (u(this, Ei)[Ei] - u(this, Pn)[Pn]) * 10 || 0;
23871
+ (!u(this, Sn)[Sn] || n < u(this, Sn)[Sn]) && (u(this, Sn)[Sn] = n), (!u(this, Ei)[Ei] || n > u(this, Ei)[Ei]) && (u(this, Ei)[Ei] = n);
23872
+ var i = (n - u(this, Sn)[Sn]) / (u(this, Ei)[Ei] - u(this, Sn)[Sn]) * 10 || 0;
23848
23873
  return { energy: i, isVoice: t };
23849
23874
  }
23850
23875
  function TO(s) {
@@ -24955,10 +24980,14 @@ function LO(s) {
24955
24980
  return u(this, vt)[vt].delete(s);
24956
24981
  }
24957
24982
  function NO(s) {
24958
- var r, e = s.participantId, t = s.producerState, n = s.producerHandoverFromPeerId, i = n;
24959
- if (i && i !== e && t !== null && t !== void 0 && t.producerId && (this.logger.info("Producer handover detected from ".concat(i, " to ").concat(e, " for producer id ").concat(t.producerId)), this.context.getValue("peerSessionStore").emit($.PRODUCER_HANDOVER, { oldPeerId: i, newPeerId: e, producerIds: [t.producerId] })), !(e === this.peerId || !t)) {
24960
- var a = (r = t.mimeType) !== null && r !== void 0 ? r : t.kind === Ui.AUDIO ? "audio/opus" : "video/VP8";
24961
- this.logger.info("producer created broadcast: ".concat(e, ", producer state: ").concat(t)), this.context.getValue("peerSessionStore").emit($.NEW_PRODUCER, { peerId: e, producer: N(N({}, t), {}, { mimeType: a, kind: t.kind === Ui.AUDIO ? "audio" : "video", producingPeerId: e }) });
24983
+ var r, e = s.participantId, t = s.producerState, n = s.producerHandoverFromPeerId;
24984
+ if (this.logger.info("producer created broadcast: ".concat(e, ", producer state: ").concat(JSON.stringify(t), ".")), n) {
24985
+ this.logger.info("Producer handover received in peerProducerCreateBroadcast. Skipping event.");
24986
+ return;
24987
+ }
24988
+ if (!(e === this.peerId || !t)) {
24989
+ var i = (r = t.mimeType) !== null && r !== void 0 ? r : t.kind === Ui.AUDIO ? "audio/opus" : "video/VP8";
24990
+ this.context.getValue("peerSessionStore").emit($.NEW_PRODUCER, { peerId: e, producer: N(N({}, t), {}, { mimeType: i, kind: t.kind === Ui.AUDIO ? "audio" : "video", producingPeerId: e }) });
24962
24991
  }
24963
24992
  }
24964
24993
  function VO(s) {
@@ -26025,32 +26054,32 @@ var JO = Object.defineProperty, KO = Object.getOwnPropertyDescriptor, zO = funct
26025
26054
  i = gv.fromBinary.bind(gv);
26026
26055
  break;
26027
26056
  }
26028
- case An.peerJoinedBroadcast:
26057
+ case In.peerJoinedBroadcast:
26029
26058
  case ma.peerJoinedBroadcast: {
26030
26059
  i = av.fromBinary.bind(av);
26031
26060
  break;
26032
26061
  }
26033
- case An.selfJoinComplete:
26062
+ case In.selfJoinComplete:
26034
26063
  case ma.selfJoinComplete: {
26035
26064
  i = Id.fromBinary.bind(Id);
26036
26065
  break;
26037
26066
  }
26038
- case An.globalPeerPinBroadcast:
26067
+ case In.globalPeerPinBroadcast:
26039
26068
  case ma.globalPeerPinBroadcast: {
26040
26069
  i = uv.fromBinary.bind(uv);
26041
26070
  break;
26042
26071
  }
26043
- case An.selectedPeer:
26072
+ case In.selectedPeer:
26044
26073
  case ma.selectedPeer: {
26045
26074
  i = Ad.fromBinary.bind(Ad);
26046
26075
  break;
26047
26076
  }
26048
- case An.selectedPeerDiff:
26077
+ case In.selectedPeerDiff:
26049
26078
  case ma.selectedPeerDiff: {
26050
26079
  i = iv.fromBinary.bind(iv);
26051
26080
  break;
26052
26081
  }
26053
- case An.leaveRoom:
26082
+ case In.leaveRoom:
26054
26083
  case ma.leaveRoom: {
26055
26084
  i = Md.fromBinary.bind(Md);
26056
26085
  break;
@@ -26206,9 +26235,9 @@ var wt = /* @__PURE__ */ S("socket"), QO = /* @__PURE__ */ function() {
26206
26235
  }
26207
26236
  return e;
26208
26237
  }() }]);
26209
- }(), bn = /* @__PURE__ */ S("socket"), ws = /* @__PURE__ */ S("context"), YO = /* @__PURE__ */ function() {
26238
+ }(), wn = /* @__PURE__ */ S("socket"), ws = /* @__PURE__ */ S("context"), YO = /* @__PURE__ */ function() {
26210
26239
  function s(r, e) {
26211
- w(this, s), Object.defineProperty(this, bn, { writable: !0, value: void 0 }), Object.defineProperty(this, ws, { writable: !0, value: void 0 }), u(this, bn)[bn] = e, u(this, ws)[ws] = r;
26240
+ w(this, s), Object.defineProperty(this, wn, { writable: !0, value: void 0 }), Object.defineProperty(this, ws, { writable: !0, value: void 0 }), u(this, wn)[wn] = e, u(this, ws)[ws] = r;
26212
26241
  }
26213
26242
  return P(s, [{
26214
26243
  key: "logger",
@@ -26225,20 +26254,20 @@ var wt = /* @__PURE__ */ S("socket"), QO = /* @__PURE__ */ function() {
26225
26254
  var a = { pluginId: e, storeName: t, insertKeys: n.map(function(o) {
26226
26255
  return { storeKey: o.key, payload: new TextEncoder().encode(JSON.stringify(o.payload)) };
26227
26256
  }) };
26228
- u(this, bn)[bn].sendMessage(Ii.storeInsertKeys, J1.toBinary(a), i);
26257
+ u(this, wn)[wn].sendMessage(Ii.storeInsertKeys, J1.toBinary(a), i);
26229
26258
  } }, { key: "storeGetKeys", value: function(e, t, n, i) {
26230
26259
  var a = { pluginId: e, storeName: t, getKeys: n.map(function(o) {
26231
26260
  return { storeKey: o.key };
26232
26261
  }) };
26233
- u(this, bn)[bn].sendMessage(Ii.storeGetKeys, z1.toBinary(a), i);
26262
+ u(this, wn)[wn].sendMessage(Ii.storeGetKeys, z1.toBinary(a), i);
26234
26263
  } }, { key: "storeDeleteKeys", value: function(e, t, n, i) {
26235
26264
  var a = { pluginId: e, storeName: t, deleteKeys: n.map(function(o) {
26236
26265
  return { storeKey: o.key };
26237
26266
  }) };
26238
- u(this, bn)[bn].sendMessage(Ii.storeDeleteKeys, Y1.toBinary(a), i);
26267
+ u(this, wn)[wn].sendMessage(Ii.storeDeleteKeys, Y1.toBinary(a), i);
26239
26268
  } }, { key: "on", value: function(e, t) {
26240
26269
  var n = mv.fromBinary.bind(mv);
26241
- u(this, bn)[bn].on(e, function(i) {
26270
+ u(this, wn)[wn].on(e, function(i) {
26242
26271
  var a = i.payload, o = i.id, c = n(a);
26243
26272
  return t(c, o);
26244
26273
  });
@@ -26581,12 +26610,12 @@ var sa = { debug: 0, info: 1, warn: 2, error: 3 }, Ss, Es, l2 = /* @__PURE__ */
26581
26610
  Ss = /* @__PURE__ */ new WeakMap(), Es = /* @__PURE__ */ new WeakMap();
26582
26611
  var xg = /* @__PURE__ */ function(s) {
26583
26612
  return s[s.CONNECTING = 0] = "CONNECTING", s[s.OPEN = 1] = "OPEN", s[s.CLOSING = 2] = "CLOSING", s[s.CLOSED = 3] = "CLOSED", s;
26584
- }(xg || {}), Nv = "2", Vv = "3", Rt, mo, Ze, Pt, la, Yt, Ni, Ta, _n, yo, ko, Ai, bh, em, Au, Fc, wh, tm, Hc, kd, ll, Ph, Sh, rm, Gu, Bc, Ao, Ju, dl, Eh, Io, Ku, Ch, nm, zu, qc, Qu, hl, d2 = /* @__PURE__ */ function() {
26613
+ }(xg || {}), Nv = "2", Vv = "3", Rt, mo, Ze, Pt, la, Yt, Ni, Ta, An, yo, ko, Ai, bh, em, Au, Fc, wh, tm, Hc, kd, ll, Ph, Sh, rm, Gu, Bc, Ao, Ju, dl, Eh, Io, Ku, Ch, nm, zu, qc, Qu, hl, d2 = /* @__PURE__ */ function() {
26585
26614
  function s(r, e) {
26586
26615
  var t, n, i, a, o, c, l, d, p, v, f, g;
26587
- w(this, s), Xe(this, bh), Xe(this, Au), Xe(this, wh), Xe(this, Hc), Xe(this, ll), Xe(this, Sh), Xe(this, Gu), Xe(this, Ao), Xe(this, dl), Xe(this, Io), Xe(this, Ch), Xe(this, zu), Xe(this, Qu), Xe(this, Rt, void 0), Xe(this, mo, void 0), Xe(this, Ze, void 0), Xe(this, Pt, void 0), Xe(this, la, void 0), Xe(this, Yt, void 0), Xe(this, Ni, void 0), Xe(this, Ta, void 0), Xe(this, _n, void 0), Xe(this, yo, void 0), Xe(this, ko, void 0), Xe(this, Ai, void 0);
26616
+ w(this, s), Xe(this, bh), Xe(this, Au), Xe(this, wh), Xe(this, Hc), Xe(this, ll), Xe(this, Sh), Xe(this, Gu), Xe(this, Ao), Xe(this, dl), Xe(this, Io), Xe(this, Ch), Xe(this, zu), Xe(this, Qu), Xe(this, Rt, void 0), Xe(this, mo, void 0), Xe(this, Ze, void 0), Xe(this, Pt, void 0), Xe(this, la, void 0), Xe(this, Yt, void 0), Xe(this, Ni, void 0), Xe(this, Ta, void 0), Xe(this, An, void 0), Xe(this, yo, void 0), Xe(this, ko, void 0), Xe(this, Ai, void 0);
26588
26617
  var y, k, b, T, E, I, M, _, O, L, F;
26589
- Fe(this, mo, r), Fe(this, la, []), Fe(this, Yt, new cl()), Fe(this, Ni, !0), Fe(this, _n, !1), Fe(this, Ze, e != null ? e : {}), (t = (y = j(this, Ze)).autoReconnect) !== null && t !== void 0 || (y.autoReconnect = !0), (n = (k = j(this, Ze)).retryConnectionInterval) !== null && n !== void 0 || (k.retryConnectionInterval = 1e3), (i = (b = j(this, Ze)).pingTimeout) !== null && i !== void 0 || (b.pingTimeout = 3e4), (a = (T = j(this, Ze)).connectionTimeout) !== null && a !== void 0 || (T.connectionTimeout = 5e3), (o = (E = j(this, Ze)).debug) !== null && o !== void 0 || (E.debug = !0), (c = (I = j(this, Ze)).maxReconnectionAttempts) !== null && c !== void 0 || (I.maxReconnectionAttempts = 10), (l = (M = j(this, Ze)).disconnectOnPingTimeout) !== null && l !== void 0 || (M.disconnectOnPingTimeout = !0), (d = (_ = j(this, Ze)).queueOnDisconnect) !== null && d !== void 0 || (_.queueOnDisconnect = !1), (p = (O = j(this, Ze)).flushOnReconnect) !== null && p !== void 0 || (O.flushOnReconnect = !1), (v = (L = j(this, Ze)).clientInitiatedPings) !== null && v !== void 0 || (L.clientInitiatedPings = !1), (f = (F = j(this, Ze)).clientInitiatedPingInterval) !== null && f !== void 0 || (F.clientInitiatedPingInterval = 3e4), Fe(this, Ta, { code: void 0, reason: void 0 }), Fe(this, Pt, (g = j(this, Ze).logger) !== null && g !== void 0 ? g : new l2(j(this, Ze).debug ? "debug" : "info")), Fe(this, Ai, new c2());
26618
+ Fe(this, mo, r), Fe(this, la, []), Fe(this, Yt, new cl()), Fe(this, Ni, !0), Fe(this, An, !1), Fe(this, Ze, e != null ? e : {}), (t = (y = j(this, Ze)).autoReconnect) !== null && t !== void 0 || (y.autoReconnect = !0), (n = (k = j(this, Ze)).retryConnectionInterval) !== null && n !== void 0 || (k.retryConnectionInterval = 1e3), (i = (b = j(this, Ze)).pingTimeout) !== null && i !== void 0 || (b.pingTimeout = 3e4), (a = (T = j(this, Ze)).connectionTimeout) !== null && a !== void 0 || (T.connectionTimeout = 5e3), (o = (E = j(this, Ze)).debug) !== null && o !== void 0 || (E.debug = !0), (c = (I = j(this, Ze)).maxReconnectionAttempts) !== null && c !== void 0 || (I.maxReconnectionAttempts = 10), (l = (M = j(this, Ze)).disconnectOnPingTimeout) !== null && l !== void 0 || (M.disconnectOnPingTimeout = !0), (d = (_ = j(this, Ze)).queueOnDisconnect) !== null && d !== void 0 || (_.queueOnDisconnect = !1), (p = (O = j(this, Ze)).flushOnReconnect) !== null && p !== void 0 || (O.flushOnReconnect = !1), (v = (L = j(this, Ze)).clientInitiatedPings) !== null && v !== void 0 || (L.clientInitiatedPings = !1), (f = (F = j(this, Ze)).clientInitiatedPingInterval) !== null && f !== void 0 || (F.clientInitiatedPingInterval = 3e4), Fe(this, Ta, { code: void 0, reason: void 0 }), Fe(this, Pt, (g = j(this, Ze).logger) !== null && g !== void 0 ? g : new l2(j(this, Ze).debug ? "debug" : "info")), Fe(this, Ai, new c2());
26590
26619
  }
26591
26620
  return P(s, [{
26592
26621
  key: "readyState",
@@ -26667,7 +26696,7 @@ var xg = /* @__PURE__ */ function(s) {
26667
26696
  try {
26668
26697
  Fe(n, Rt, new WebSocket(We(n, bh, em).call(n, j(n, mo)))), j(n, Rt).binaryType = "arraybuffer", j(n, Pt).debug("Connecting");
26669
26698
  var d = setTimeout(function() {
26670
- j(n, Pt).debug("Connection timeout. Closing socket"), Fe(n, Ni, !0), We(n, Qu, hl).call(n), j(n, Rt).close(3001, "Connection Timeout"), j(n, Ze).autoReconnect && !j(n, _n) && (j(n, Yt).emit(
26699
+ j(n, Pt).debug("Connection timeout. Closing socket"), Fe(n, Ni, !0), We(n, Qu, hl).call(n), j(n, Rt).close(3001, "Connection Timeout"), j(n, Ze).autoReconnect && !j(n, An) && (j(n, Yt).emit(
26671
26700
  "reconnecting"
26672
26701
  /* reconnecting */
26673
26702
  ), We(n, Gu, Bc).call(n)), l(new Error("Connection timed out!"));
@@ -26681,7 +26710,7 @@ var xg = /* @__PURE__ */ function(s) {
26681
26710
  try {
26682
26711
  d && clearTimeout(d);
26683
26712
  var v = p.code, f = p.reason;
26684
- l(f), j(n, Pt).debug("Socket closed. Close event:", { event: p }), j(n, Pt).debug("Connection closed code: ".concat(v)), j(n, Pt).debug("Connection closed reason: ".concat(f)), j(n, _n) || We(n, ll, Ph).call(n, v, f);
26713
+ l(f), j(n, Pt).debug("Socket closed. Close event:", { event: p }), j(n, Pt).debug("Connection closed code: ".concat(v)), j(n, Pt).debug("Connection closed reason: ".concat(f)), j(n, An) || We(n, ll, Ph).call(n, v, f);
26685
26714
  } catch (g) {
26686
26715
  We(n, Au, Fc).call(n, g);
26687
26716
  }
@@ -26803,7 +26832,7 @@ var xg = /* @__PURE__ */ function(s) {
26803
26832
  Fe(this, Ni, !1), We(this, Io, Ku).call(this), We(this, zu, qc).call(this), this.removeAllListeners(), Fe(this, Ta, { code: 1e3, reason: "Sockrates disconnect method called" }), j(this, Rt).close(1e3, "Sockrates disconnect method called.");
26804
26833
  } }]);
26805
26834
  }();
26806
- Rt = /* @__PURE__ */ new WeakMap(), mo = /* @__PURE__ */ new WeakMap(), Ze = /* @__PURE__ */ new WeakMap(), Pt = /* @__PURE__ */ new WeakMap(), la = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), Ni = /* @__PURE__ */ new WeakMap(), Ta = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), yo = /* @__PURE__ */ new WeakMap(), ko = /* @__PURE__ */ new WeakMap(), Ai = /* @__PURE__ */ new WeakMap(), bh = /* @__PURE__ */ new WeakSet(), em = function(r) {
26835
+ Rt = /* @__PURE__ */ new WeakMap(), mo = /* @__PURE__ */ new WeakMap(), Ze = /* @__PURE__ */ new WeakMap(), Pt = /* @__PURE__ */ new WeakMap(), la = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), Ni = /* @__PURE__ */ new WeakMap(), Ta = /* @__PURE__ */ new WeakMap(), An = /* @__PURE__ */ new WeakMap(), yo = /* @__PURE__ */ new WeakMap(), ko = /* @__PURE__ */ new WeakMap(), Ai = /* @__PURE__ */ new WeakMap(), bh = /* @__PURE__ */ new WeakSet(), em = function(r) {
26807
26836
  if (r.startsWith("ws://") || r.startsWith("wss://"))
26808
26837
  return r;
26809
26838
  if (r.startsWith("https://"))
@@ -26830,7 +26859,7 @@ Rt = /* @__PURE__ */ new WeakMap(), mo = /* @__PURE__ */ new WeakMap(), Ze = /*
26830
26859
  Fe(this, Ta, { reason: e, code: r }), j(this, Yt).emit("disconnected", { code: r, reason: e });
26831
26860
  }, Sh = /* @__PURE__ */ new WeakSet(), rm = function() {
26832
26861
  var r = j(this, Ta), e = r.reason, t = r.code;
26833
- t && t !== 1e3 && j(this, Ni) && j(this, Ze).autoReconnect && !j(this, _n) && (j(this, Pt).debug("Triggering reconnection due to ".concat(e, ".")), j(this, Yt).emit(
26862
+ t && t !== 1e3 && j(this, Ni) && j(this, Ze).autoReconnect && !j(this, An) && (j(this, Pt).debug("Triggering reconnection due to ".concat(e, ".")), j(this, Yt).emit(
26834
26863
  "reconnecting"
26835
26864
  /* reconnecting */
26836
26865
  ), We(this, Gu, Bc).call(this));
@@ -26841,22 +26870,22 @@ Rt = /* @__PURE__ */ new WeakMap(), mo = /* @__PURE__ */ new WeakMap(), Ze = /*
26841
26870
  for (; ; )
26842
26871
  switch (i.p = i.n) {
26843
26872
  case 0:
26844
- if (e = t.length > 0 && t[0] !== void 0 ? t[0] : !0, !(e && j(this, _n))) {
26873
+ if (e = t.length > 0 && t[0] !== void 0 ? t[0] : !0, !(e && j(this, An))) {
26845
26874
  i.n = 1;
26846
26875
  break;
26847
26876
  }
26848
26877
  return j(this, Pt).debug("Reconnect called when already in a reconnect loop. Ignoring."), i.a(2);
26849
26878
  case 1:
26850
- if (j(this, _n) || j(this, Ai).reset(), !(j(this, Ze).maxReconnectionAttempts !== null && j(this, Ai).getAttempts() >= j(this, Ze).maxReconnectionAttempts)) {
26879
+ if (j(this, An) || j(this, Ai).reset(), !(j(this, Ze).maxReconnectionAttempts !== null && j(this, Ai).getAttempts() >= j(this, Ze).maxReconnectionAttempts)) {
26851
26880
  i.n = 2;
26852
26881
  break;
26853
26882
  }
26854
26883
  return j(this, Yt).emit(
26855
26884
  "failed"
26856
26885
  /* failed */
26857
- ), Fe(this, _n, !1), i.a(2);
26886
+ ), Fe(this, An, !1), i.a(2);
26858
26887
  case 2:
26859
- return Fe(this, _n, !0), We(this, Qu, hl).call(this), We(this, Io, Ku).call(this), i.p = 3, i.n = 4, j(this, Ai).wait();
26888
+ return Fe(this, An, !0), We(this, Qu, hl).call(this), We(this, Io, Ku).call(this), i.p = 3, i.n = 4, j(this, Ai).wait();
26860
26889
  case 4:
26861
26890
  if (j(this, Ni) !== !1) {
26862
26891
  i.n = 5;
@@ -26872,7 +26901,7 @@ Rt = /* @__PURE__ */ new WeakMap(), mo = /* @__PURE__ */ new WeakMap(), Ze = /*
26872
26901
  }
26873
26902
  throw Error("Reconnect Failed");
26874
26903
  case 7:
26875
- Fe(this, _n, !1), Fe(this, Ta, { code: void 0, reason: void 0 }), j(this, Yt).emit(
26904
+ Fe(this, An, !1), Fe(this, Ta, { code: void 0, reason: void 0 }), j(this, Yt).emit(
26876
26905
  "reconnected"
26877
26906
  /* reconnected */
26878
26907
  ), i.n = 9;
@@ -26934,10 +26963,10 @@ var p2 = Object.defineProperty, v2 = Object.getOwnPropertyDescriptor, Dl = funct
26934
26963
  for (var i = n > 1 ? void 0 : n ? v2(e, t) : e, a = r.length - 1, o; a >= 0; a--)
26935
26964
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
26936
26965
  return n && i && p2(e, t, i), i;
26937
- }, $v = 65535, f2 = 3, g2 = 15e3, m2 = 8e3, y2 = 50, k2 = 1e3, T2 = 1e4, am = (ar = /* @__PURE__ */ S("url"), ga = /* @__PURE__ */ S("urlPeerId"), ge = /* @__PURE__ */ S("sockrates"), Ve = /* @__PURE__ */ S("connectionHandler"), Zn = /* @__PURE__ */ S("oldPeerIds"), on = /* @__PURE__ */ S("apiPingTimer"), Xn = /* @__PURE__ */ S("apiPingInFlight"), xn = /* @__PURE__ */ S("apiPingAbortController"), an = /* @__PURE__ */ S("apiPingRequest"), Qt = /* @__PURE__ */ S("lastConnectedPeerId"), sr = /* @__PURE__ */ S("timer"), un = /* @__PURE__ */ S("reconnectTimer"), ei = /* @__PURE__ */ S("resolveReconnectWait"), st = /* @__PURE__ */ S("connectionRunNumber"), dn = /* @__PURE__ */ S("reconnectLoopRunNumber"), ot = /* @__PURE__ */ S("shouldReconnect"), Ae = /* @__PURE__ */ S("context"), oo = /* @__PURE__ */ S("getSocketURL"), Jc = /* @__PURE__ */ S("getPingURL"), Kc = /* @__PURE__ */ S("sendAPIPing"), Sc = /* @__PURE__ */ S("startAPIPing"), So = /* @__PURE__ */ S("stopAPIPing"), Eo = /* @__PURE__ */ S("recordConnectedPeerId"), Qn = /* @__PURE__ */ S("redactedURL"), zc = /* @__PURE__ */ S("getReconnectDelay"), Qc = /* @__PURE__ */ S("waitForReconnect"), uo = /* @__PURE__ */ S("cancelReconnectWait"), Mo = /* @__PURE__ */ S("handleReconnectExhausted"), co = /* @__PURE__ */ S("startReconnectLoop"), Yc = /* @__PURE__ */ S("runReconnectLoop"), lo = /* @__PURE__ */ S("canSendMessage"), ho = /* @__PURE__ */ S("generateId"), Ul = /* @__PURE__ */ function() {
26966
+ }, $v = 65535, f2 = 3, g2 = 15e3, m2 = 8e3, y2 = 50, k2 = 1e3, T2 = 1e4, am = (ar = /* @__PURE__ */ S("url"), ga = /* @__PURE__ */ S("urlPeerId"), ge = /* @__PURE__ */ S("sockrates"), Ve = /* @__PURE__ */ S("connectionHandler"), dn = /* @__PURE__ */ S("oldPeerIds"), on = /* @__PURE__ */ S("apiPingTimer"), Zn = /* @__PURE__ */ S("apiPingInFlight"), xn = /* @__PURE__ */ S("apiPingAbortController"), an = /* @__PURE__ */ S("apiPingRequest"), Qt = /* @__PURE__ */ S("lastConnectedPeerId"), sr = /* @__PURE__ */ S("timer"), un = /* @__PURE__ */ S("reconnectTimer"), ei = /* @__PURE__ */ S("resolveReconnectWait"), st = /* @__PURE__ */ S("connectionRunNumber"), hn = /* @__PURE__ */ S("reconnectLoopRunNumber"), ot = /* @__PURE__ */ S("shouldReconnect"), Ae = /* @__PURE__ */ S("context"), oo = /* @__PURE__ */ S("getSocketURL"), Jc = /* @__PURE__ */ S("getPingURL"), Kc = /* @__PURE__ */ S("sendAPIPing"), Sc = /* @__PURE__ */ S("startAPIPing"), So = /* @__PURE__ */ S("stopAPIPing"), Eo = /* @__PURE__ */ S("recordConnectedPeerId"), Yn = /* @__PURE__ */ S("redactedURL"), zc = /* @__PURE__ */ S("getReconnectDelay"), Qc = /* @__PURE__ */ S("waitForReconnect"), uo = /* @__PURE__ */ S("cancelReconnectWait"), Mo = /* @__PURE__ */ S("handleReconnectExhausted"), co = /* @__PURE__ */ S("startReconnectLoop"), Yc = /* @__PURE__ */ S("runReconnectLoop"), lo = /* @__PURE__ */ S("canSendMessage"), ho = /* @__PURE__ */ S("generateId"), Ul = /* @__PURE__ */ function() {
26938
26967
  function s(r, e) {
26939
26968
  var t = e.peerId, n = e.meetingId, i = e.authToken, a = e.capabilities;
26940
- if (w(this, s), Object.defineProperty(this, ho, { value: V2 }), Object.defineProperty(this, lo, { get: N2, set: void 0 }), Object.defineProperty(this, Yc, { value: L2 }), Object.defineProperty(this, co, { value: D2 }), Object.defineProperty(this, Mo, { value: O2 }), Object.defineProperty(this, uo, { value: M2 }), Object.defineProperty(this, Qc, { value: I2 }), Object.defineProperty(this, Qn, { get: _2, set: void 0 }), Object.defineProperty(this, Eo, { value: R2 }), Object.defineProperty(this, So, { value: C2 }), Object.defineProperty(this, Sc, { value: E2 }), Object.defineProperty(this, Kc, { value: S2 }), Object.defineProperty(this, Jc, { value: P2 }), Object.defineProperty(this, oo, { value: w2 }), Object.defineProperty(this, Ve, { get: b2, set: void 0 }), Object.defineProperty(this, ar, { writable: !0, value: void 0 }), Object.defineProperty(this, ga, { writable: !0, value: void 0 }), Object.defineProperty(this, ge, { writable: !0, value: void 0 }), this.roomName = void 0, this.authToken = void 0, this.capabilities = void 0, Object.defineProperty(this, Zn, { writable: !0, value: [] }), Object.defineProperty(this, on, { writable: !0, value: void 0 }), Object.defineProperty(this, Xn, { writable: !0, value: !1 }), Object.defineProperty(this, xn, { writable: !0, value: void 0 }), Object.defineProperty(this, an, { writable: !0, value: void 0 }), Object.defineProperty(this, Qt, { writable: !0, value: void 0 }), Object.defineProperty(this, sr, { writable: !0, value: void 0 }), Object.defineProperty(this, un, { writable: !0, value: void 0 }), Object.defineProperty(this, ei, { writable: !0, value: void 0 }), Object.defineProperty(this, st, { writable: !0, value: 0 }), Object.defineProperty(this, dn, { writable: !0, value: void 0 }), Object.defineProperty(this, ot, { writable: !0, value: !0 }), Object.defineProperty(this, Ae, { writable: !0, value: void 0 }), !t || !n || !i)
26969
+ if (w(this, s), Object.defineProperty(this, ho, { value: V2 }), Object.defineProperty(this, lo, { get: N2, set: void 0 }), Object.defineProperty(this, Yc, { value: L2 }), Object.defineProperty(this, co, { value: D2 }), Object.defineProperty(this, Mo, { value: O2 }), Object.defineProperty(this, uo, { value: M2 }), Object.defineProperty(this, Qc, { value: I2 }), Object.defineProperty(this, Yn, { get: _2, set: void 0 }), Object.defineProperty(this, Eo, { value: R2 }), Object.defineProperty(this, So, { value: C2 }), Object.defineProperty(this, Sc, { value: E2 }), Object.defineProperty(this, Kc, { value: S2 }), Object.defineProperty(this, Jc, { value: P2 }), Object.defineProperty(this, oo, { value: w2 }), Object.defineProperty(this, Ve, { get: b2, set: void 0 }), Object.defineProperty(this, ar, { writable: !0, value: void 0 }), Object.defineProperty(this, ga, { writable: !0, value: void 0 }), Object.defineProperty(this, ge, { writable: !0, value: void 0 }), this.roomName = void 0, this.authToken = void 0, this.capabilities = void 0, Object.defineProperty(this, dn, { writable: !0, value: [] }), Object.defineProperty(this, on, { writable: !0, value: void 0 }), Object.defineProperty(this, Zn, { writable: !0, value: !1 }), Object.defineProperty(this, xn, { writable: !0, value: void 0 }), Object.defineProperty(this, an, { writable: !0, value: void 0 }), Object.defineProperty(this, Qt, { writable: !0, value: void 0 }), Object.defineProperty(this, sr, { writable: !0, value: void 0 }), Object.defineProperty(this, un, { writable: !0, value: void 0 }), Object.defineProperty(this, ei, { writable: !0, value: void 0 }), Object.defineProperty(this, st, { writable: !0, value: 0 }), Object.defineProperty(this, hn, { writable: !0, value: void 0 }), Object.defineProperty(this, ot, { writable: !0, value: !0 }), Object.defineProperty(this, Ae, { writable: !0, value: void 0 }), !t || !n || !i)
26941
26970
  throw new U("peerId, meetingId, or authToken can not be empty", "0404");
26942
26971
  u(this, Ae)[Ae] = r, u(this, sr)[sr] = navigator.isReactNative ? Fg : Mu, this.capabilities = a, this.roomName = n, this.authToken = i, u(this, ar)[ar] = u(this, oo)[oo](t), u(this, ga)[ga] = t;
26943
26972
  var o = a.includes("PING");
@@ -26975,12 +27004,17 @@ var p2 = Object.defineProperty, v2 = Object.getOwnPropertyDescriptor, Dl = funct
26975
27004
  return u(this, Ae)[Ae].getValue("logger");
26976
27005
  } }, { key: "peerId", get: function() {
26977
27006
  return u(this, Ae)[Ae].getValue("peerId");
27007
+ } }, { key: "replacedPeerIds", get: function() {
27008
+ var e = this;
27009
+ return u(this, dn)[dn].filter(function(t) {
27010
+ return t !== e.peerId;
27011
+ });
26978
27012
  } }, { key: "updateCallstatsPeerId", value: function(e) {
26979
27013
  var t = u(this, Ae)[Ae].getValue("callstats");
26980
27014
  t.peerId = e, t.backend && (t.backend.peerId = e, t.backend.eventHandler && Object.assign(t.backend.eventHandler, { peerId: e }));
26981
27015
  } }, { key: "updateURL", value: function(e) {
26982
27016
  var t;
26983
- u(this, ar)[ar] = u(this, oo)[oo](e), u(this, ga)[ga] = e, u(this, Ae)[Ae].getValue("telemetry").resetPeerId(e), (t = u(this, Ae)[Ae].getValue("apiClient")) === null || t === void 0 || t.setHeader("tracing-id", e), this.updateCallstatsPeerId(e), wa.remapContext(e, u(this, Ae)[Ae]), this.logger.info("Attempting websocket connection with URL: ".concat(u(this, Qn)[Qn])), u(this, ge)[ge].updateURL(u(this, ar)[ar]);
27017
+ u(this, ar)[ar] = u(this, oo)[oo](e), u(this, ga)[ga] = e, u(this, Ae)[Ae].getValue("telemetry").resetPeerId(e), (t = u(this, Ae)[Ae].getValue("apiClient")) === null || t === void 0 || t.setHeader("tracing-id", e), this.updateCallstatsPeerId(e), wa.remapContext(e, u(this, Ae)[Ae]), this.logger.info("Attempting websocket connection with URL: ".concat(u(this, Yn)[Yn])), u(this, ge)[ge].updateURL(u(this, ar)[ar]);
26984
27018
  } }, { key: "url", get: function() {
26985
27019
  return u(this, ar)[ar];
26986
27020
  } }, { key: "connect", value: function() {
@@ -27001,7 +27035,7 @@ var p2 = Object.defineProperty, v2 = Object.getOwnPropertyDescriptor, Dl = funct
27001
27035
  u(this, Eo)[Eo](this.peerId), (a = (i = u(this, Qt))[Qt]) !== null && a !== void 0 || (i[Qt] = this.peerId), u(this, Ve)[Ve].socketState = { state: "connected", reconnected: !1, reconnectionAttempt: void 0 }, c.n = 5;
27002
27036
  break;
27003
27037
  case 4:
27004
- throw c.p = 4, o = c.v, this.logger.error("Websocket connection failed with URL: ".concat(u(this, Qn)[Qn]), { error: o }), u(this, ot)[ot] && n === u(this, st)[st] && u(this, co)[co](n), o;
27038
+ throw c.p = 4, o = c.v, this.logger.error("Websocket connection failed with URL: ".concat(u(this, Yn)[Yn]), { error: o }), u(this, ot)[ot] && n === u(this, st)[st] && u(this, co)[co](n), o;
27005
27039
  case 5:
27006
27040
  return c.a(2);
27007
27041
  }
@@ -27034,7 +27068,7 @@ var p2 = Object.defineProperty, v2 = Object.getOwnPropertyDescriptor, Dl = funct
27034
27068
  var l = c != null ? c : n;
27035
27069
  return new Promise(function(d, p) {
27036
27070
  var v, f = function(M, _) {
27037
- v && clearTimeout(v), u(t, ge)[ge].removeListener(l, M), u(t, ge)[ge].removeListener($v, _), u(t, ge)[ge].removeListener(ma.errorResponse, _), u(t, ge)[ge].removeListener(An.errorResponse, _);
27071
+ v && clearTimeout(v), u(t, ge)[ge].removeListener(l, M), u(t, ge)[ge].removeListener($v, _), u(t, ge)[ge].removeListener(ma.errorResponse, _), u(t, ge)[ge].removeListener(In.errorResponse, _);
27038
27072
  }, g = o != null ? o : u(t, ho)[ho](), y = {}, k = u(t, Ae)[Ae].getValue("telemetry");
27039
27073
  k.injectContext(y);
27040
27074
  var b = function(M) {
@@ -27059,7 +27093,7 @@ var p2 = Object.defineProperty, v2 = Object.getOwnPropertyDescriptor, Dl = funct
27059
27093
  var _ = M.id, O = M.payload;
27060
27094
  g === _ && (d({ id: _, payload: O }), f(T, b));
27061
27095
  };
27062
- u(t, ge)[ge].on(l, T), u(t, ge)[ge].on($v, b), u(t, ge)[ge].on(ma.errorResponse, b), u(t, ge)[ge].on(An.errorResponse, b), v = setTimeout(function() {
27096
+ u(t, ge)[ge].on(l, T), u(t, ge)[ge].on($v, b), u(t, ge)[ge].on(ma.errorResponse, b), u(t, ge)[ge].on(In.errorResponse, b), v = setTimeout(function() {
27063
27097
  f(T, b), p(new Error("request timeout for callback eventId:".concat(n)));
27064
27098
  }, i);
27065
27099
  var E = u(t, ge)[ge].send(n, g, a, new TextEncoder().encode(JSON.stringify(y)));
@@ -27083,14 +27117,14 @@ var p2 = Object.defineProperty, v2 = Object.getOwnPropertyDescriptor, Dl = funct
27083
27117
  for (; ; )
27084
27118
  switch (a.n) {
27085
27119
  case 0:
27086
- e.logger.info("Websocket connected with URL: ".concat(u(e, Qn)[Qn])), (i = (n = u(e, Qt))[Qt]) !== null && i !== void 0 || (n[Qt] = e.peerId), u(e, Ve)[Ve].updateSocketConnectionState("connected");
27120
+ e.logger.info("Websocket connected with URL: ".concat(u(e, Yn)[Yn])), (i = (n = u(e, Qt))[Qt]) !== null && i !== void 0 || (n[Qt] = e.peerId), u(e, Ve)[Ve].updateSocketConnectionState("connected");
27087
27121
  case 1:
27088
27122
  return a.a(2);
27089
27123
  }
27090
27124
  }, t);
27091
27125
  }))), this.onStateEvent("disconnected", function(t) {
27092
27126
  var n = t.code, i = t.reason;
27093
- !u(e, ot)[ot] || u(e, dn)[dn] === u(e, st)[st] || (e.logger.info("SocketService::Disconnected from socket-edge", { error: { code: n, reason: i } }), u(e, Ve)[Ve].updateSocketConnectionState("disconnected"), u(e, Ae)[Ae].getValue("peerSessionStore").emit($.SOCKET_SERVICE_DISCONNECTED, { joinAttempted: u(e, Ve)[Ve].joinAttempted }), u(e, co)[co](u(e, st)[st]));
27127
+ !u(e, ot)[ot] || u(e, hn)[hn] === u(e, st)[st] || (e.logger.info("SocketService::Disconnected from socket-edge", { error: { code: n, reason: i } }), u(e, Ve)[Ve].updateSocketConnectionState("disconnected"), u(e, Ae)[Ae].getValue("peerSessionStore").emit($.SOCKET_SERVICE_DISCONNECTED, { joinAttempted: u(e, Ve)[Ve].joinAttempted }), u(e, co)[co](u(e, st)[st]));
27094
27128
  });
27095
27129
  } }]);
27096
27130
  }(), Object.defineProperty(Ul, zc, { value: A2 }), Ul);
@@ -27103,7 +27137,7 @@ function w2(s) {
27103
27137
  var t = /^(http|ws):\/\//i.test(e), n = e.replace(/^(https?|wss?):\/\//i, "").replace(/\/+$/, "");
27104
27138
  r = "".concat(t ? "ws" : "wss", "://").concat(n, "/ws");
27105
27139
  }
27106
- var i = new URL(r), a = N(N({ roomID: this.roomName, peerID: s, authToken: this.authToken, useMediaV2: !0 }, u(this, Zn)[Zn].length > 0 && { oldPeerIds: u(this, Zn)[Zn].join(",") }), {}, { ping: this.capabilities.includes("PING"), capabilities: this.capabilities.map(function(o) {
27140
+ var i = new URL(r), a = N(N({ roomID: this.roomName, peerID: s, authToken: this.authToken, useMediaV2: !0 }, u(this, dn)[dn].length > 0 && { oldPeerIds: u(this, dn)[dn].join(",") }), {}, { ping: this.capabilities.includes("PING"), capabilities: this.capabilities.map(function(o) {
27107
27141
  return il[o];
27108
27142
  }).join(" "), joinWithDetails: !0, useCfWorker: !0, useStartSession: !0, apiVersion: "23-09-2026" });
27109
27143
  return Object.entries(a).forEach(function(o) {
@@ -27127,13 +27161,13 @@ function Rh() {
27127
27161
  for (; ; )
27128
27162
  switch (o.p = o.n) {
27129
27163
  case 0:
27130
- if (r = u(this, Jc)[Jc](), !(!r || u(this, Xn)[Xn])) {
27164
+ if (r = u(this, Jc)[Jc](), !(!r || u(this, Zn)[Zn])) {
27131
27165
  o.n = 1;
27132
27166
  break;
27133
27167
  }
27134
27168
  return o.a(2);
27135
27169
  case 1:
27136
- return e = {}, t = typeof AbortController == "function" ? new AbortController() : void 0, u(this, Xn)[Xn] = !0, u(this, an)[an] = e, u(this, xn)[xn] = t, o.p = 2, t && (n = u(this, sr)[sr].setTimeout(function() {
27170
+ return e = {}, t = typeof AbortController == "function" ? new AbortController() : void 0, u(this, Zn)[Zn] = !0, u(this, an)[an] = e, u(this, xn)[xn] = t, o.p = 2, t && (n = u(this, sr)[sr].setTimeout(function() {
27137
27171
  return t.abort();
27138
27172
  }, m2)), o.n = 3, fetch(r, N({ method: "GET", headers: { Authorization: "Bearer ".concat(this.authToken) } }, t && { signal: t.signal }));
27139
27173
  case 3:
@@ -27142,7 +27176,7 @@ function Rh() {
27142
27176
  case 4:
27143
27177
  o.p = 4, a = o.v, u(this, an)[an] === e && this.logger.warn("SocketService::API ping request failed", { error: a, networkCall: { url: r } });
27144
27178
  case 5:
27145
- return o.p = 5, n !== void 0 && u(this, sr)[sr].clearTimeout(n), u(this, an)[an] === e && (u(this, Xn)[Xn] = !1, u(this, an)[an] = void 0, u(this, xn)[xn] = void 0), o.f(5);
27179
+ return o.p = 5, n !== void 0 && u(this, sr)[sr].clearTimeout(n), u(this, an)[an] === e && (u(this, Zn)[Zn] = !1, u(this, an)[an] = void 0, u(this, xn)[xn] = void 0), o.f(5);
27146
27180
  case 6:
27147
27181
  return o.a(2);
27148
27182
  }
@@ -27157,10 +27191,10 @@ function E2() {
27157
27191
  }
27158
27192
  function C2() {
27159
27193
  var s;
27160
- u(this, on)[on] !== void 0 && u(this, sr)[sr].clearInterval(u(this, on)[on]), (s = u(this, xn)[xn]) === null || s === void 0 || s.abort(), u(this, on)[on] = void 0, u(this, Xn)[Xn] = !1, u(this, an)[an] = void 0, u(this, xn)[xn] = void 0;
27194
+ u(this, on)[on] !== void 0 && u(this, sr)[sr].clearInterval(u(this, on)[on]), (s = u(this, xn)[xn]) === null || s === void 0 || s.abort(), u(this, on)[on] = void 0, u(this, Zn)[Zn] = !1, u(this, an)[an] = void 0, u(this, xn)[xn] = void 0;
27161
27195
  }
27162
27196
  function R2(s) {
27163
- u(this, Zn)[Zn] = [s].concat(_e(u(this, Zn)[Zn].filter(function(r) {
27197
+ u(this, dn)[dn] = [s].concat(_e(u(this, dn)[dn].filter(function(r) {
27164
27198
  return r !== s;
27165
27199
  }))).slice(0, f2);
27166
27200
  }
@@ -27189,7 +27223,7 @@ function O2(s, r) {
27189
27223
  }
27190
27224
  function D2(s) {
27191
27225
  var r = this;
27192
- !u(this, ot)[ot] || u(this, dn)[dn] === s || (u(this, dn)[dn] = s, u(this, Ve)[Ve].updateSocketConnectionState("reconnecting"), u(this, Yc)[Yc](s).catch(function(e) {
27226
+ !u(this, ot)[ot] || u(this, hn)[hn] === s || (u(this, hn)[hn] = s, u(this, Ve)[Ve].updateSocketConnectionState("reconnecting"), u(this, Yc)[Yc](s).catch(function(e) {
27193
27227
  return u(r, Mo)[Mo](s, e);
27194
27228
  }));
27195
27229
  }
@@ -27245,14 +27279,14 @@ function _h() {
27245
27279
  }
27246
27280
  return n.a(2);
27247
27281
  case 10:
27248
- this.logger.error("Websocket connection retry attempt ".concat(e, " failed with URL: ").concat(u(this, Qn)[Qn]), { error: t, socket: { retryAttempt: e } }), u(this, Ve)[Ve].updateSocketConnectionState("reconnectFailure", e);
27282
+ this.logger.error("Websocket connection retry attempt ".concat(e, " failed with URL: ").concat(u(this, Yn)[Yn]), { error: t, socket: { retryAttempt: e } }), u(this, Ve)[Ve].updateSocketConnectionState("reconnectFailure", e);
27249
27283
  case 11:
27250
27284
  e += 1, n.n = 1;
27251
27285
  break;
27252
27286
  case 12:
27253
27287
  u(this, Mo)[Mo](r);
27254
27288
  case 13:
27255
- return n.p = 13, u(this, dn)[dn] === r && (u(this, dn)[dn] = void 0), n.f(13);
27289
+ return n.p = 13, u(this, hn)[hn] === r && (u(this, hn)[hn] = void 0), n.f(13);
27256
27290
  case 14:
27257
27291
  return n.a(2);
27258
27292
  }
@@ -27946,9 +27980,9 @@ var G2 = /* @__PURE__ */ P(function s() {
27946
27980
  (e = r.battery) === null || e === void 0 || e.removeEventListener("chargingchange", r.updateChargeInfo), (t = r.battery) === null || t === void 0 || t.removeEventListener("levelchange", r.updateLevelInfo);
27947
27981
  }
27948
27982
  };
27949
- }), Uv = new G2(), wn = /* @__PURE__ */ S("audioEl"), Pi = /* @__PURE__ */ S("stream"), Si = /* @__PURE__ */ S("tracks"), Yu = /* @__PURE__ */ S("onError"), Td = /* @__PURE__ */ S("runErrorCallbacks"), J2 = /* @__PURE__ */ function() {
27983
+ }), Uv = new G2(), Pn = /* @__PURE__ */ S("audioEl"), Pi = /* @__PURE__ */ S("stream"), Si = /* @__PURE__ */ S("tracks"), Yu = /* @__PURE__ */ S("onError"), Td = /* @__PURE__ */ S("runErrorCallbacks"), J2 = /* @__PURE__ */ function() {
27950
27984
  function s() {
27951
- w(this, s), Object.defineProperty(this, Td, { value: K2 }), Object.defineProperty(this, wn, { writable: !0, value: new Audio() }), Object.defineProperty(this, Pi, { writable: !0, value: new MediaStream() }), Object.defineProperty(this, Si, { writable: !0, value: /* @__PURE__ */ new Map() }), Object.defineProperty(this, Yu, { writable: !0, value: void 0 }), u(this, wn)[wn].srcObject = u(this, Pi)[Pi], u(this, wn)[wn].autoplay = !0;
27985
+ w(this, s), Object.defineProperty(this, Td, { value: K2 }), Object.defineProperty(this, Pn, { writable: !0, value: new Audio() }), Object.defineProperty(this, Pi, { writable: !0, value: new MediaStream() }), Object.defineProperty(this, Si, { writable: !0, value: /* @__PURE__ */ new Map() }), Object.defineProperty(this, Yu, { writable: !0, value: void 0 }), u(this, Pn)[Pn].srcObject = u(this, Pi)[Pi], u(this, Pn)[Pn].autoplay = !0;
27952
27986
  }
27953
27987
  return P(s, [{ key: "playTracks", value: function() {
27954
27988
  var r = m(/* @__PURE__ */ h().m(function t(n) {
@@ -27968,7 +28002,7 @@ var G2 = /* @__PURE__ */ P(function s() {
27968
28002
  }
27969
28003
  return e;
27970
28004
  }() }, { key: "setSpeakerDevice", value: function(e) {
27971
- typeof HTMLAudioElement.prototype.setSinkId == "function" && u(this, wn)[wn].setSinkId(e);
28005
+ typeof HTMLAudioElement.prototype.setSinkId == "function" && u(this, Pn)[Pn].setSinkId(e);
27972
28006
  } }, { key: "removeTrack", value: function(e) {
27973
28007
  var t = u(this, Si)[Si].get(e);
27974
28008
  t && (u(this, Pi)[Pi].removeTrack(t), u(this, Si)[Si].delete(e));
@@ -27979,7 +28013,7 @@ var G2 = /* @__PURE__ */ P(function s() {
27979
28013
  for (; ; )
27980
28014
  switch (i.n) {
27981
28015
  case 0:
27982
- return u(this, wn)[wn].srcObject = u(this, Pi)[Pi], i.a(2, u(this, wn)[wn].play().catch(function(a) {
28016
+ return u(this, Pn)[Pn].srcObject = u(this, Pi)[Pi], i.a(2, u(this, Pn)[Pn].play().catch(function(a) {
27983
28017
  u(n, Td)[Td](a);
27984
28018
  }));
27985
28019
  }
@@ -28015,14 +28049,14 @@ var pr = /* @__PURE__ */ S("trackMap"), z2 = /* @__PURE__ */ function(s) {
28015
28049
  for (var i = n > 1 ? void 0 : n ? Y2(e, t) : e, a = r.length - 1, o; a >= 0; a--)
28016
28050
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
28017
28051
  return n && i && Q2(e, t, i), i;
28018
- }, Ca = (Re = /* @__PURE__ */ S("controller"), zn = /* @__PURE__ */ S("context"), /* @__PURE__ */ function() {
28052
+ }, Ca = (Re = /* @__PURE__ */ S("controller"), Qn = /* @__PURE__ */ S("context"), /* @__PURE__ */ function() {
28019
28053
  function s(r, e) {
28020
- w(this, s), Object.defineProperty(this, Re, { writable: !0, value: void 0 }), Object.defineProperty(this, zn, { writable: !0, value: void 0 }), u(this, zn)[zn] = r, u(this, Re)[Re] = e;
28054
+ w(this, s), Object.defineProperty(this, Re, { writable: !0, value: void 0 }), Object.defineProperty(this, Qn, { writable: !0, value: void 0 }), u(this, Qn)[Qn] = r, u(this, Re)[Re] = e;
28021
28055
  }
28022
28056
  return P(s, [{
28023
28057
  key: "peerId",
28024
28058
  get: function() {
28025
- return u(this, zn)[zn].getValue("peerId");
28059
+ return u(this, Qn)[Qn].getValue("peerId");
28026
28060
  }
28027
28061
  /**
28028
28062
  * @param {Object} [options]
@@ -28066,7 +28100,7 @@ var pr = /* @__PURE__ */ S("trackMap"), z2 = /* @__PURE__ */ function(s) {
28066
28100
  for (; ; )
28067
28101
  switch (o.n) {
28068
28102
  case 0:
28069
- return Uv.cleanup(), u(this, zn)[zn].getValue("peerSessionStore").reset(), (i = u(this, Re)[Re].pluginController) === null || i === void 0 || i.cleanup(), a = u(this, Re)[Re].selfController, o.a(2, a.leaveRoom(n));
28103
+ return Uv.cleanup(), u(this, Qn)[Qn].getValue("peerSessionStore").reset(), (i = u(this, Re)[Re].pluginController) === null || i === void 0 || i.cleanup(), a = u(this, Re)[Re].selfController, o.a(2, a.leaveRoom(n));
28070
28104
  }
28071
28105
  }, t, this);
28072
28106
  }));
@@ -28170,7 +28204,7 @@ var pr = /* @__PURE__ */ S("trackMap"), z2 = /* @__PURE__ */ function(s) {
28170
28204
  } }, {
28171
28205
  key: "audio",
28172
28206
  get: function() {
28173
- return u(this, zn)[zn].getValue("audioPlayback");
28207
+ return u(this, Qn)[Qn].getValue("audioPlayback");
28174
28208
  }
28175
28209
  /**
28176
28210
  * The __internals__ object exposes the internal tools & utilities such as features and logger
@@ -28234,7 +28268,7 @@ var pr = /* @__PURE__ */ S("trackMap"), z2 = /* @__PURE__ */ function(s) {
28234
28268
  }, { key: "setupContext", value: function(e, t, n, i) {
28235
28269
  var a, o, c = wa.createContext(e, t), l = N(N({}, vP), t == null ? void 0 : t.modules), d = t.defaults || { audio: !0, video: !0 };
28236
28270
  return c.setValue("options", t), c.setValue("peerId", e), c.setValue("modules", l), c.setValue("sdkName", "web-core"), c.setValue("meetingId", n), c.setValue("apiBase", i.apiBase), c.setValue("baseURI", i.baseURI), c.setValue("userId", i.participantId), c.setValue("organizationId", i.orgId), c.setValue("authToken", t.authToken), c.setValue("overrides", (a = t.overrides) !== null && a !== void 0 ? a : {}), c.setValue("env", fP({ baseURI: i.baseURI })), c.setValue("defaults", d), c.setValue("onError", t.onError || function() {
28237
- }), c.setValue("cachedUserDetails", ti(t.cachedUserDetails)), c.setValue("sdkVersion", "2.0.3-staging.8"), (o = t.modules) !== null && o !== void 0 && o.experimentalAudioPlayback && c.setValue("audioPlayback", new z2()), c;
28271
+ }), c.setValue("cachedUserDetails", ti(t.cachedUserDetails)), c.setValue("sdkVersion", "2.0.3-staging.9"), (o = t.modules) !== null && o !== void 0 && o.experimentalAudioPlayback && c.setValue("audioPlayback", new z2()), c;
28238
28272
  } }]);
28239
28273
  }());
28240
28274
  Vl([or("0002"), Gi.executeWithLock({ methodName: "meeting.join", lockName: "Client.join", timeout: 3e3 })], Ca.prototype, "join", 1);