@cloudflare/realtimekit 1.2.4-staging.4 → 1.2.4-staging.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es5.js CHANGED
@@ -5604,7 +5604,7 @@ var AP = /* @__PURE__ */ function() {
5604
5604
  Object.keys(Ll).forEach(function(o) {
5605
5605
  Ll[o] = "{".concat(IP[o.slice(0, 2)], "} ").concat(Ll[o]);
5606
5606
  });
5607
- var j = /* @__PURE__ */ function(o) {
5607
+ var F = /* @__PURE__ */ function(o) {
5608
5608
  function t(e, r) {
5609
5609
  var n, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0, i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
5610
5610
  P(this, t), n = R(this, t, [e]), n.code = void 0, n.code = r, n.name = "ClientError", n.message = "[ERR".concat(n.code, "]: ").concat(Ll[n.code], `
@@ -5628,10 +5628,10 @@ var j = /* @__PURE__ */ function(o) {
5628
5628
  return A(t, o), S(t);
5629
5629
  }(/* @__PURE__ */ Ws(Error));
5630
5630
  function Pl(o, t, e, r) {
5631
- if (r instanceof j)
5631
+ if (r instanceof F)
5632
5632
  throw r;
5633
5633
  if (r instanceof t) {
5634
- var n = new j(r.message, e);
5634
+ var n = new F(r.message, e);
5635
5635
  throw n.stack = r.stack, n;
5636
5636
  } else
5637
5637
  throw r;
@@ -5726,9 +5726,9 @@ function OP() {
5726
5726
  }, o);
5727
5727
  })));
5728
5728
  }
5729
- var F = /* @__PURE__ */ function(o) {
5729
+ var j = /* @__PURE__ */ function(o) {
5730
5730
  return o.NEW_PRODUCER = "NEW_PRODUCER", o.ROOM_NODE_CONNECTION_ERROR = "ROOM_NODE_CONNECTION_ERROR", o.SOCKET_SERVICE_ROOM_JOINED = "SOCKET_SERVICE_ROOM_JOINED", o.SOCKET_SERVICE_RECONNECTED = "SOCKET_SERVICE_RECONNECTED", o.SOCKET_SERVICE_DISCONNECTED = "SOCKET_SERVICE_DISCONNECTED", o.SOCKET_SERVICE_FAILED = "SOCKET_SERVICE_FAILED", o.SOCKET_STATE_UPDATE = "SOCKET_STATE_UPDATE", o.ROOM_NODE_RECONNECTED = "ROOM_NODE_RECONNECTED", o.ROOM_NODE_DISCONNECTED = "ROOM_NODE_DISCONNECTED", o.ROOM_NODE_FAILED = "ROOM_NODE_FAILED", o.TRANSPORT_STATE_UPDATE = "TRANSPORT_STATE_UPDATE", o.PRODUCER_SCORE_UPDATE = "PRODUCER_SCORE_UPDATE", o.CONSUMER_SCORE_UPDATE = "CONSUMER_SCORE_UPDATE", o.PRODUCER_STATUS_UPDATE = "PRODUCER_STATUS_UPDATE", o.CONSUMER_STATUS_UPDATE = "CONSUMER_STATUS_UPDATE", o.LOW_CONSUMER_SCORE = "LOW_CONSUMER_SCORE", o.MEDIA_PERMISSION_ERROR = "MEDIA_PERMISSION_ERROR", o.MEDIA_PERMISSION_UPDATE = "MEDIA_PERMISSION_UPDATE", o.MESSAGE = "websocket/message", o.ROOM_MESSAGE = "websocket/room-message", o.PEER_JOINED_INTERNAL = "peer/joined-internal", o.PEER_CLOSED = "websocket/peer-closed", o.CONSUMER_CLOSED = "websocket/consumer-closed", o.CONSUMER_PAUSED = "websocket/consumer-paused", o.CONSUMER_RESUMED = "websocket/consumer-resumed", o.PRODUCER_CLOSED = "websocket/producer-closed", o.NEW_CONSUMER = "websocket/new-consumer", o.PRODUCER_SCORE = "websocket/producer-score", o.CONSUMER_SCORE = "websocket/consumer-score", o.PRODUCER_TOGGLE = "cf/producer-toggle", o.UPDATE_ACTIVE = "media/update-active", o.RESET_PRODUCER_STATE = "cf/reset-producer-state", o.ROOM_STATE = "sockethub/room-state", o.GET_STAGE_REQUESTS = "GET_STAGE_REQUESTS", o.UPDATE_STAGE_REQUESTS = "UPDATE_STAGE_REQUESTS", o.KICK_PEER = "KICK_PEER", o.UPDATE_PEER_STAGE_STATUS = "UPDATE_PEER_STAGE_STATUS", o.JOIN_MEDIA_ROOM = "JOIN_MEDIA_ROOM", o.LEAVE_MEDIA_ROOM = "LEAVE_MEDIA_ROOM", o.PIP_HANGUP = "PIP_HANGUP", o.E2EE_ACTIVE_PRODUCER = "E2EE_ACTIVE_PRODUCER", o.E2EE_INACTIVE_PRODUCER = "E2EE_INACTIVE_PRODUCER", o.E2EE_ACTIVE_CONSUMER = "E2EE_ACTIVE_CONSUMER", o.E2EE_INACTIVE_CONSUMER = "E2EE_INACTIVE_CONSUMER", o.SOCKET_PEERS = "SOCKET_PEERS", o.UPDATE_PERMISSIONS = "UPDATE_PERMISSIONS", o.MAX_SPATIAL_LAYER_CHANGE = "MAX_SPATIAL_LAYER_CHANGE", o.MUTE_SELF = "MUTE_SELF", o.MUTE_SELF_VIDEO = "MUTE_SELF_VIDEO", o;
5731
- }(F || {}), Fo = /* @__PURE__ */ function(o) {
5731
+ }(j || {}), Fo = /* @__PURE__ */ function(o) {
5732
5732
  function t(e) {
5733
5733
  var r;
5734
5734
  return P(this, t), r = R(this, t), r.logger = void 0, r.logger = e, Ce(t, "setMaxListeners", r, 3)([25]), r;
@@ -5850,7 +5850,7 @@ var Hh = 1080, Bh = 1920, LP = function(t, e, r, n, a, i) {
5850
5850
  }, i.handlePipMediaControls = function(u) {
5851
5851
  u === "ON_STAGE" ? i.enablePipMediaControls() : i.unmountEvents();
5852
5852
  }, i.eventCallback = function(u) {
5853
- u === "CAMERA" && (l(i, De)[De].videoEnabled ? l(i, De)[De].disableVideo() : l(i, De)[De].enableVideo(), i.emit("cameraToggled")), u === "MIC" && (l(i, De)[De].audioEnabled ? l(i, De)[De].disableAudio() : l(i, De)[De].enableAudio(), i.emit("micToggled")), u === "END" && (l(i, pa)[pa].getValue("peerSessionStore").emit(F.PIP_HANGUP), i.cleanupEventListeners(), i.emit("hangup"), i.cleanup());
5853
+ u === "CAMERA" && (l(i, De)[De].videoEnabled ? l(i, De)[De].disableVideo() : l(i, De)[De].enableVideo(), i.emit("cameraToggled")), u === "MIC" && (l(i, De)[De].audioEnabled ? l(i, De)[De].disableAudio() : l(i, De)[De].enableAudio(), i.emit("micToggled")), u === "END" && (l(i, pa)[pa].getValue("peerSessionStore").emit(j.PIP_HANGUP), i.cleanupEventListeners(), i.emit("hangup"), i.cleanup());
5854
5854
  }, i.unmountEvents = function() {
5855
5855
  navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || (navigator.mediaSession.setActionHandler("togglemicrophone", void 0), navigator.mediaSession.setActionHandler("togglecamera", void 0));
5856
5856
  }, i.animate = function() {
@@ -11181,9 +11181,9 @@ var pv = /* @__PURE__ */ function() {
11181
11181
  L.next = 14;
11182
11182
  break;
11183
11183
  }
11184
- throw new j("Unknown network error occurred", "0011");
11184
+ throw new F("Unknown network error occurred", "0011");
11185
11185
  case 14:
11186
- throw ((O = L.t0.config) === null || O === void 0 ? void 0 : O.url) !== T.logsEndpoint && r.logger.error("xhr::fetch", { error: L.t0, networkCall: { status: L.t0.status, statusText: L.t0.statusText, baseURL: ((I = L.t0.config) === null || I === void 0 ? void 0 : I.baseURL) || r.requests.defaults.baseURL, url: (_ = L.t0.config) === null || _ === void 0 ? void 0 : _.url, retries: (V = L.t0.config) === null || V === void 0 ? void 0 : V.retry, method: (U = L.t0.config) === null || U === void 0 ? void 0 : U.method, isOnline: navigator.onLine ? "online" : "offline" } }), new j(L.t0.message || "Network request failed", "0011");
11186
+ throw ((O = L.t0.config) === null || O === void 0 ? void 0 : O.url) !== T.logsEndpoint && r.logger.error("xhr::fetch", { error: L.t0, networkCall: { status: L.t0.status, statusText: L.t0.statusText, baseURL: ((I = L.t0.config) === null || I === void 0 ? void 0 : I.baseURL) || r.requests.defaults.baseURL, url: (_ = L.t0.config) === null || _ === void 0 ? void 0 : _.url, retries: (V = L.t0.config) === null || V === void 0 ? void 0 : V.retry, method: (U = L.t0.config) === null || U === void 0 ? void 0 : U.method, isOnline: navigator.onLine ? "online" : "offline" } }), new F(L.t0.message || "Network request failed", "0011");
11187
11187
  case 16:
11188
11188
  case "end":
11189
11189
  return L.stop();
@@ -11583,7 +11583,7 @@ var pv = /* @__PURE__ */ function() {
11583
11583
  case 6:
11584
11584
  return i = u.sent, u.abrupt("return", { transcript: i.data });
11585
11585
  case 10:
11586
- throw u.prev = 10, u.t0 = u.catch(3), new j("Cant fetch transcript s3 url", "1801");
11586
+ throw u.prev = 10, u.t0 = u.catch(3), new F("Cant fetch transcript s3 url", "1801");
11587
11587
  case 13:
11588
11588
  case "end":
11589
11589
  return u.stop();
@@ -11656,7 +11656,7 @@ function $t(o, t) {
11656
11656
  return n.value = function() {
11657
11657
  var u = Date.now(), c = t ? this[t] : o;
11658
11658
  if (u - s > c.period * 1e3 && (s = u, i = 0), i >= c.maxInvocations)
11659
- throw new j("Method rate limit ".concat(c.maxInvocations, " invocations/").concat(c.period, "sec exceeded"), "0013");
11659
+ throw new F("Method rate limit ".concat(c.maxInvocations, " invocations/").concat(c.period, "sec exceeded"), "0013");
11660
11660
  i += 1;
11661
11661
  for (var d = arguments.length, p = new Array(d), v = 0; v < d; v++)
11662
11662
  p[v] = arguments[v];
@@ -11736,7 +11736,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
11736
11736
  g.next = 2;
11737
11737
  break;
11738
11738
  }
11739
- throw new j("Max character limit breached", "0503");
11739
+ throw new F("Max character limit breached", "0503");
11740
11740
  case 2:
11741
11741
  if (!(i && i.length > 0)) {
11742
11742
  g.next = 8;
@@ -11746,7 +11746,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
11746
11746
  g.next = 6;
11747
11747
  break;
11748
11748
  }
11749
- throw this.logger.error("sendTextMessage::private_chat_permission_denied"), new j("Could not send message to private chat.", "0501");
11749
+ throw this.logger.error("sendTextMessage::private_chat_permission_denied"), new F("Could not send message to private chat.", "0501");
11750
11750
  case 6:
11751
11751
  g.next = 11;
11752
11752
  break;
@@ -11755,13 +11755,13 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
11755
11755
  g.next = 11;
11756
11756
  break;
11757
11757
  }
11758
- throw this.logger.error("sendTextMessage::public_chat_permission_denied"), new j("Could not send message to public chat.", "0501");
11758
+ throw this.logger.error("sendTextMessage::public_chat_permission_denied"), new F("Could not send message to public chat.", "0501");
11759
11759
  case 11:
11760
11760
  if (a) {
11761
11761
  g.next = 14;
11762
11762
  break;
11763
11763
  }
11764
- throw this.logger.error("sendTextMessage::message_can_not_be_empty"), new j("Message can not be empty.", "0502");
11764
+ throw this.logger.error("sendTextMessage::message_can_not_be_empty"), new F("Message can not be empty.", "0502");
11765
11765
  case 14:
11766
11766
  if (!s) {
11767
11767
  g.next = 17;
@@ -11839,7 +11839,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
11839
11839
  }), b.push(l(this, z)[z].userId)), l(this, Ae)[Ae].sendMessage(k, St.IMAGE, i), T.next = 36;
11840
11840
  break;
11841
11841
  case 33:
11842
- throw T.prev = 33, T.t0 = T.catch(16), new j("Error sending image message.", "0500", this.logger);
11842
+ throw T.prev = 33, T.t0 = T.catch(16), new F("Error sending image message.", "0500", this.logger);
11843
11843
  case 36:
11844
11844
  case "end":
11845
11845
  return T.stop();
@@ -11899,7 +11899,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
11899
11899
  }), y.push(l(this, z)[z].userId)), b = JSON.stringify({ link: g, name: a.name, size: "size" in a ? a.size : 0 }), l(this, Ae)[Ae].sendMessage(b, St.FILE, i), T.next = 33;
11900
11900
  break;
11901
11901
  case 30:
11902
- throw T.prev = 30, T.t0 = T.catch(12), new j("Error sending file message.", "0500", this.logger);
11902
+ throw T.prev = 30, T.t0 = T.catch(12), new F("Error sending file message.", "0500", this.logger);
11903
11903
  case 33:
11904
11904
  case "end":
11905
11905
  return T.stop();
@@ -11991,7 +11991,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
11991
11991
  case 11:
11992
11992
  return x.abrupt("return", { link: Y, type: $.type, name: $.name, size: $.size });
11993
11993
  case 14:
11994
- throw x.prev = 14, x.t0 = x.catch(0), new j("Error sending image message.", "0500", d.logger);
11994
+ throw x.prev = 14, x.t0 = x.catch(0), new F("Error sending image message.", "0500", d.logger);
11995
11995
  case 17:
11996
11996
  case "end":
11997
11997
  return x.stop();
@@ -12128,7 +12128,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
12128
12128
  v.next = 2;
12129
12129
  break;
12130
12130
  }
12131
- throw new j("Not permitted to edit messages", "0501");
12131
+ throw new F("Not permitted to edit messages", "0501");
12132
12132
  case 2:
12133
12133
  if (!(!((c = l(this, z)[z].permissions) !== null && c !== void 0 && (c = c.chatPublic) !== null && c !== void 0 && c.canSend) || !((d = l(this, z)[z].permissions) !== null && d !== void 0 && (d = d.chatPublic) !== null && d !== void 0 && d.text))) {
12134
12134
  v.next = 5;
@@ -12185,7 +12185,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
12185
12185
  l(this, Ae)[Ae].editMessage(a, f, St.IMAGE, s), y.next = 25;
12186
12186
  break;
12187
12187
  case 22:
12188
- throw y.prev = 22, y.t0 = y.catch(10), new j("Error editing image message.", "0500", this.logger);
12188
+ throw y.prev = 22, y.t0 = y.catch(10), new F("Error editing image message.", "0500", this.logger);
12189
12189
  case 25:
12190
12190
  case "end":
12191
12191
  return y.stop();
@@ -12222,7 +12222,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
12222
12222
  l(this, Ae)[Ae].editMessage(a, JSON.stringify({ link: v, name: i.name, size: "size" in i ? i.size : 0 }), St.FILE, s), k.next = 21;
12223
12223
  break;
12224
12224
  case 18:
12225
- throw k.prev = 18, k.t0 = k.catch(6), new j("Error editing file message.", "0500", this.logger);
12225
+ throw k.prev = 18, k.t0 = k.catch(6), new F("Error editing file message.", "0500", this.logger);
12226
12226
  case 21:
12227
12227
  case "end":
12228
12228
  return k.stop();
@@ -12272,7 +12272,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
12272
12272
  c.next = 2;
12273
12273
  break;
12274
12274
  }
12275
- throw new j("Not permitted to delete messages", "0501");
12275
+ throw new F("Not permitted to delete messages", "0501");
12276
12276
  case 2:
12277
12277
  l(this, Ae)[Ae].deleteMessage(a, i);
12278
12278
  case 3:
@@ -12331,24 +12331,18 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
12331
12331
  u.next = 2;
12332
12332
  break;
12333
12333
  }
12334
- throw new j("Can`t pin message without joining room", "0505");
12334
+ throw new F("Can`t pin message without joining room", "0505");
12335
12335
  case 2:
12336
- if (l(this, z)[z].permissions.pinParticipant) {
12337
- u.next = 4;
12338
- break;
12339
- }
12340
- throw new j("You do not have permission to pin messages.", "0501");
12341
- case 4:
12342
12336
  if (i = this.messages.find(function(c) {
12343
12337
  return c.id === a;
12344
12338
  }), !i) {
12345
- u.next = 8;
12339
+ u.next = 6;
12346
12340
  break;
12347
12341
  }
12348
12342
  return l(this, Ae)[Ae].setPinState(i, !0), u.abrupt("return");
12349
- case 8:
12350
- throw new j("No message found with id: ".concat(a), "0504");
12351
- case 9:
12343
+ case 6:
12344
+ throw new F("No message found with id: ".concat(a), "0504");
12345
+ case 7:
12352
12346
  case "end":
12353
12347
  return u.stop();
12354
12348
  }
@@ -12369,24 +12363,18 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
12369
12363
  u.next = 2;
12370
12364
  break;
12371
12365
  }
12372
- throw new j("Can`t unpin message without joining room", "0505");
12366
+ throw new F("Can`t unpin message without joining room", "0505");
12373
12367
  case 2:
12374
- if (l(this, z)[z].permissions.pinParticipant) {
12375
- u.next = 4;
12376
- break;
12377
- }
12378
- throw new j("You do not have permission to unpin messages.", "0501");
12379
- case 4:
12380
12368
  if (i = this.messages.find(function(c) {
12381
12369
  return c.id === a;
12382
12370
  }), !i) {
12383
- u.next = 8;
12371
+ u.next = 6;
12384
12372
  break;
12385
12373
  }
12386
12374
  return l(this, Ae)[Ae].setPinState(i, !1), u.abrupt("return");
12387
- case 8:
12388
- throw new j("No message found with id: ".concat(a), "0504");
12389
- case 9:
12375
+ case 6:
12376
+ throw new F("No message found with id: ".concat(a), "0504");
12377
+ case 7:
12390
12378
  case "end":
12391
12379
  return u.stop();
12392
12380
  }
@@ -12481,25 +12469,25 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
12481
12469
  g.next = 5;
12482
12470
  break;
12483
12471
  }
12484
- throw new j("Not permitted to create channels", "0501");
12472
+ throw new F("Not permitted to create channels", "0501");
12485
12473
  case 5:
12486
12474
  if (!(u.visibility === "public" && !(c.canCreate === "PUBLIC" || c.canCreate === "ALL"))) {
12487
12475
  g.next = 7;
12488
12476
  break;
12489
12477
  }
12490
- throw new j("Not permitted to create public channels", "0501");
12478
+ throw new F("Not permitted to create public channels", "0501");
12491
12479
  case 7:
12492
12480
  if (!(u.visibility === "private" && !(c.canCreate === "PRIVATE" || c.canCreate === "ALL"))) {
12493
12481
  g.next = 9;
12494
12482
  break;
12495
12483
  }
12496
- throw new j("Not permitted to create private channels", "0501");
12484
+ throw new F("Not permitted to create private channels", "0501");
12497
12485
  case 9:
12498
12486
  if (!(!a || a.trim().length === 0)) {
12499
12487
  g.next = 11;
12500
12488
  break;
12501
12489
  }
12502
- throw new j("channel name cannot be empty.", "0510");
12490
+ throw new F("channel name cannot be empty.", "0510");
12503
12491
  case 11:
12504
12492
  return d = Pe(/* @__PURE__ */ new Set([].concat(Pe(i), [l(this, z)[z].userId]))), g.next = 14, l(this, Jn)[Jn].createChannel(a.trim(), d, u.displayPictureUrl, u.visibility, u.isDirectMessage);
12505
12493
  case 14:
@@ -12520,11 +12508,11 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
12520
12508
  }), p = (a = l(this, z)[z].permissions) === null || a === void 0 ? void 0 : a.chatChannel;
12521
12509
  if (p) {
12522
12510
  if (p.canUpdate === "NONE")
12523
- throw new j("Not permitted to update channels", "0501");
12511
+ throw new F("Not permitted to update channels", "0501");
12524
12512
  if (d.visibility === "public" && !(p.canUpdate === "PUBLIC" || p.canUpdate === "ALL"))
12525
- throw new j("Not permitted to update public channels", "0501");
12513
+ throw new F("Not permitted to update public channels", "0501");
12526
12514
  if (d.visibility === "private" && !(p.canUpdate === "PRIVATE" || p.canUpdate === "ALL"))
12527
- throw new j("Not permitted to update private channels", "0501");
12515
+ throw new F("Not permitted to update private channels", "0501");
12528
12516
  }
12529
12517
  var v = { memberIds: (i = n.memberIds) !== null && i !== void 0 ? i : d.memberIds, displayName: (s = n.displayName) !== null && s !== void 0 ? s : d.displayName, displayPictureUrl: (u = n.displayPictureUrl) !== null && u !== void 0 ? u : d.displayPictureUrl, visibility: (c = n.visibility) !== null && c !== void 0 ? c : d.visibility };
12530
12518
  return l(this, Jn)[Jn].updateChannel(r, v);
@@ -12573,7 +12561,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
12573
12561
  for (; ; )
12574
12562
  switch (u.prev = u.next) {
12575
12563
  case 0:
12576
- throw new j("searchMessages is disabled! Please use `fetchMessages` method instead.", "0506");
12564
+ throw new F("searchMessages is disabled! Please use `fetchMessages` method instead.", "0506");
12577
12565
  case 1:
12578
12566
  case "end":
12579
12567
  return u.stop();
@@ -12703,7 +12691,7 @@ var mI = Object.defineProperty, yI = Object.getOwnPropertyDescriptor, kI = funct
12703
12691
  return e;
12704
12692
  }() }, { key: "setupEvents", value: function() {
12705
12693
  var e = this;
12706
- l(this, Kn)[Kn].getValue("peerSessionStore").on(F.SOCKET_SERVICE_ROOM_JOINED, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
12694
+ l(this, Kn)[Kn].getValue("peerSessionStore").on(j.SOCKET_SERVICE_ROOM_JOINED, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
12707
12695
  return h().wrap(function(a) {
12708
12696
  for (; ; )
12709
12697
  switch (a.prev = a.next) {
@@ -12842,7 +12830,7 @@ var bI = Object.defineProperty, TI = Object.getOwnPropertyDescriptor, wI = funct
12842
12830
  p.next = 4;
12843
12831
  break;
12844
12832
  }
12845
- throw new j("Can't create polls without joining room", "0705");
12833
+ throw new F("Can't create polls without joining room", "0705");
12846
12834
  case 4:
12847
12835
  if (l(this, Za)[Za].permissions.polls.canCreate) {
12848
12836
  p.next = 7;
@@ -12941,13 +12929,13 @@ var EI = Object.defineProperty, CI = Object.getOwnPropertyDescriptor, RI = funct
12941
12929
  }, [$a.votePoll]: function(i) {
12942
12930
  i.poll && e.updatePoll(To.formatSocketServicePoll(i.poll));
12943
12931
  } }, n = function() {
12944
- l(e, dn)[dn].getValue("peerSessionStore").on(F.SOCKET_SERVICE_ROOM_JOINED, function() {
12932
+ l(e, dn)[dn].getValue("peerSessionStore").on(j.SOCKET_SERVICE_ROOM_JOINED, function() {
12945
12933
  e.getPolls();
12946
12934
  }), Object.keys(r).map(Number).forEach(function(s) {
12947
12935
  l(e, zn)[zn].on(s, r[s]);
12948
12936
  });
12949
12937
  }, a = function() {
12950
- l(e, dn)[dn].getValue("peerSessionStore").on(F.SOCKET_SERVICE_ROOM_JOINED, function() {
12938
+ l(e, dn)[dn].getValue("peerSessionStore").on(j.SOCKET_SERVICE_ROOM_JOINED, function() {
12951
12939
  e.getPolls();
12952
12940
  }), Object.keys(r).map(Number).forEach(function(s) {
12953
12941
  l(e, zn)[zn].removeListeners(s);
@@ -13083,7 +13071,7 @@ var AI = Object.defineProperty, II = Object.getOwnPropertyDescriptor, MI = funct
13083
13071
  key: "setBroadcastTabChanges",
13084
13072
  value: function(r) {
13085
13073
  if (!l(this, Yn)[Yn].permissions.canSpotlight)
13086
- throw this.logger.error("Spotlight::setSpotlighted::permission_denied"), new j("User does not have permission to toggle spotlight", "0801");
13074
+ throw this.logger.error("Spotlight::setSpotlighted::permission_denied"), new F("User does not have permission to toggle spotlight", "0801");
13087
13075
  this.broadcastTabChanges = r, this.emit("broadcastTabChangesUpdate", this.broadcastTabChanges), this.broadcastTabChanges && this.assertActiveTabToRoom();
13088
13076
  }
13089
13077
  /**
@@ -13274,20 +13262,20 @@ var $I = Object.defineProperty, NI = Object.getOwnPropertyDescriptor, VI = funct
13274
13262
  e != null && e.currentTab && ((r = this.meta.selfActiveTab) === null || r === void 0 ? void 0 : r.id) !== e.currentTab.id && (this.meta.setSelfActiveTab(e.currentTab, hg.Meeting), this.meta.emit("activeTabUpdate", e.currentTab));
13275
13263
  } }, { key: "setupEvents", value: function() {
13276
13264
  var e = this;
13277
- l(this, Or)[Or].getValue("peerSessionStore").on(F.TRANSPORT_STATE_UPDATE, function(r) {
13265
+ l(this, Or)[Or].getValue("peerSessionStore").on(j.TRANSPORT_STATE_UPDATE, function(r) {
13278
13266
  e.meta.emit("mediaConnectionUpdate", r);
13279
- }), l(this, Or)[Or].getValue("peerSessionStore").on(F.SOCKET_STATE_UPDATE, function(r) {
13267
+ }), l(this, Or)[Or].getValue("peerSessionStore").on(j.SOCKET_STATE_UPDATE, function(r) {
13280
13268
  e.meta.emit("socketConnectionUpdate", r);
13281
- }), l(this, Or)[Or].getValue("peerSessionStore").on(F.ROOM_STATE, function(r) {
13269
+ }), l(this, Or)[Or].getValue("peerSessionStore").on(j.ROOM_STATE, function(r) {
13282
13270
  var n = r.createdAt, a = r.roomUuid, i = e.meta.meetingStartedTimestamp;
13283
13271
  if (a && (e.meta.sessionId = a), n && !i) {
13284
13272
  var s = new Date(n * 1e3);
13285
13273
  e.meta.meetingStartedTimestamp = s, e.meta.emit("meetingStartTimeUpdate", { meetingStartedTimestamp: e.meta.meetingStartedTimestamp });
13286
13274
  }
13287
- }), l(this, Or)[Or].getValue("peerSessionStore").on(F.PRODUCER_SCORE_UPDATE, function(r) {
13275
+ }), l(this, Or)[Or].getValue("peerSessionStore").on(j.PRODUCER_SCORE_UPDATE, function(r) {
13288
13276
  var n = r.score;
13289
13277
  n < 5 && e.meta.emit("poorConnection", { score: n });
13290
- }), l(this, pn)[pn].permissions.canSpotlight && (this.logger.info("MetaController::Asserting Spotlight"), this.meta.selfActiveTab && l(this, ri)[ri].broadcastMessage("spotlight", { userId: l(this, pn)[pn].userId, currentTab: this.meta.selfActiveTab })), l(this, Or)[Or].getValue("peerSessionStore").on(F.PEER_JOINED_INTERNAL, /* @__PURE__ */ function() {
13278
+ }), l(this, pn)[pn].permissions.canSpotlight && (this.logger.info("MetaController::Asserting Spotlight"), this.meta.selfActiveTab && l(this, ri)[ri].broadcastMessage("spotlight", { userId: l(this, pn)[pn].userId, currentTab: this.meta.selfActiveTab })), l(this, Or)[Or].getValue("peerSessionStore").on(j.PEER_JOINED_INTERNAL, /* @__PURE__ */ function() {
13291
13279
  var r = m(/* @__PURE__ */ h().mark(function n(a) {
13292
13280
  return h().wrap(function(s) {
13293
13281
  for (; ; )
@@ -13303,7 +13291,7 @@ var $I = Object.defineProperty, NI = Object.getOwnPropertyDescriptor, VI = funct
13303
13291
  return function(n) {
13304
13292
  return r.apply(this, arguments);
13305
13293
  };
13306
- }()), l(this, Or)[Or].getValue("peerSessionStore").on(F.ROOM_MESSAGE, function(r) {
13294
+ }()), l(this, Or)[Or].getValue("peerSessionStore").on(j.ROOM_MESSAGE, function(r) {
13307
13295
  var n, a, i;
13308
13296
  if ("type" in r) {
13309
13297
  if (r.type !== "spotlight")
@@ -13316,7 +13304,7 @@ var $I = Object.defineProperty, NI = Object.getOwnPropertyDescriptor, VI = funct
13316
13304
  } else
13317
13305
  return;
13318
13306
  e.logger.info("Spotlight Assertion Received", { spotlight: { spotlighter: { id: i.userId }, currentTab: { id: (n = i.currentTab) === null || n === void 0 ? void 0 : n.id, type: (a = i.currentTab) === null || a === void 0 ? void 0 : a.type } } }), e.conditionallySetActiveTab(i);
13319
- }), l(this, Or)[Or].getValue("peerSessionStore").on(F.MESSAGE, function(r) {
13307
+ }), l(this, Or)[Or].getValue("peerSessionStore").on(j.MESSAGE, function(r) {
13320
13308
  var n, a, i;
13321
13309
  if ("type" in r) {
13322
13310
  if (r.type !== "spotlight")
@@ -13437,7 +13425,7 @@ var Zo = {}, Ka = {
13437
13425
  /**
13438
13426
  * NOTE(ishita1805): Update stageRequests when socket sends them.
13439
13427
  */
13440
- [F.GET_STAGE_REQUESTS]: function() {
13428
+ [j.GET_STAGE_REQUESTS]: function() {
13441
13429
  var s = m(/* @__PURE__ */ h().mark(function u(c) {
13442
13430
  return h().wrap(function(p) {
13443
13431
  for (; ; )
@@ -13458,7 +13446,7 @@ var Zo = {}, Ka = {
13458
13446
  * NOTE(ishita1805): Update stageRequests when a peer
13459
13447
  * who has requested leaves/joins the meeting
13460
13448
  */
13461
- [F.UPDATE_STAGE_REQUESTS]: function() {
13449
+ [j.UPDATE_STAGE_REQUESTS]: function() {
13462
13450
  var s = m(/* @__PURE__ */ h().mark(function u(c) {
13463
13451
  var d, p, v, f;
13464
13452
  return h().wrap(function(k) {
@@ -13493,9 +13481,9 @@ var Zo = {}, Ka = {
13493
13481
  }), l(this, oe)[oe].permissions.acceptStageRequests && a();
13494
13482
  } }, { key: "getAccessRequests", value: function() {
13495
13483
  if (!l(this, oe)[oe].permissions.stageEnabled)
13496
- throw this.logger.error("Stage::stage_disabled"), new j("Stage is disabled", "2003");
13484
+ throw this.logger.error("Stage::stage_disabled"), new F("Stage is disabled", "2003");
13497
13485
  if (!l(this, oe)[oe].permissions.acceptStageRequests)
13498
- throw this.logger.error("Stage::get_access_request::permission_denied"), new j("You do not have permission to perform this action", "2001");
13486
+ throw this.logger.error("Stage::get_access_request::permission_denied"), new F("You do not have permission to perform this action", "2001");
13499
13487
  var r = l(this, xo)[xo].joined.toArray().filter(function(n) {
13500
13488
  return n.stageStatus === "REQUESTED_TO_JOIN_STAGE";
13501
13489
  }).map(function(n) {
@@ -13512,13 +13500,13 @@ var Zo = {}, Ka = {
13512
13500
  i.next = 3;
13513
13501
  break;
13514
13502
  }
13515
- throw this.logger.error("Stage::stage_disabled"), new j("Stage is disabled", "2003");
13503
+ throw this.logger.error("Stage::stage_disabled"), new F("Stage is disabled", "2003");
13516
13504
  case 3:
13517
13505
  if (this.status === "OFF_STAGE") {
13518
13506
  i.next = 5;
13519
13507
  break;
13520
13508
  }
13521
- throw new j("Unable to request access you are currently ".concat(this.status), "2006");
13509
+ throw new F("Unable to request access you are currently ".concat(this.status), "2006");
13522
13510
  case 5:
13523
13511
  if (l(this, oe)[oe].permissions.stageAccess !== te.Allowed) {
13524
13512
  i.next = 8;
@@ -13549,7 +13537,7 @@ var Zo = {}, Ka = {
13549
13537
  i.next = 3;
13550
13538
  break;
13551
13539
  }
13552
- throw this.logger.error("Stage::stage_disabled"), new j("Stage is disabled", "2003");
13540
+ throw this.logger.error("Stage::stage_disabled"), new F("Stage is disabled", "2003");
13553
13541
  case 3:
13554
13542
  l(this, Qr)[Qr].cancelRequestAccess(), l(this, cs)[cs]("OFF_STAGE");
13555
13543
  case 5:
@@ -13570,11 +13558,11 @@ var Zo = {}, Ka = {
13570
13558
  key: "grantAccess",
13571
13559
  value: function(r) {
13572
13560
  if (!l(this, oe)[oe].roomJoined)
13573
- throw new j("Can`t grant for participant without joining room");
13561
+ throw new F("Can`t grant for participant without joining room");
13574
13562
  if (!l(this, oe)[oe].permissions.stageEnabled)
13575
- throw this.logger.error("Stage::stage_disabled"), new j("Stage is disabled", "2003");
13563
+ throw this.logger.error("Stage::stage_disabled"), new F("Stage is disabled", "2003");
13576
13564
  if (!l(this, oe)[oe].permissions.acceptStageRequests)
13577
- throw this.logger.error("Stage::grant_access::permission_denied"), new j("You do not have permission to perform this action", "2001");
13565
+ throw this.logger.error("Stage::grant_access::permission_denied"), new F("You do not have permission to perform this action", "2001");
13578
13566
  return l(this, Qr)[Qr].grantAccess(r);
13579
13567
  }
13580
13568
  /**
@@ -13584,11 +13572,11 @@ var Zo = {}, Ka = {
13584
13572
  key: "denyAccess",
13585
13573
  value: function(r) {
13586
13574
  if (!l(this, oe)[oe].roomJoined)
13587
- throw new j("Can`t rejectRequestToJoinStage for participant without joining room", "2005");
13575
+ throw new F("Can`t rejectRequestToJoinStage for participant without joining room", "2005");
13588
13576
  if (!l(this, oe)[oe].permissions.stageEnabled)
13589
- throw this.logger.error("Stage::stage_disabled"), new j("Stage is disabled", "2003");
13577
+ throw this.logger.error("Stage::stage_disabled"), new F("Stage is disabled", "2003");
13590
13578
  if (!l(this, oe)[oe].permissions.acceptStageRequests)
13591
- throw this.logger.error("Stage::deny_access::permission_denied"), new j("You do not have permission to perform this action", "2001");
13579
+ throw this.logger.error("Stage::deny_access::permission_denied"), new F("You do not have permission to perform this action", "2001");
13592
13580
  return l(this, Qr)[Qr].denyAccess(r);
13593
13581
  }
13594
13582
  /**
@@ -13607,13 +13595,13 @@ var Zo = {}, Ka = {
13607
13595
  s.next = 3;
13608
13596
  break;
13609
13597
  }
13610
- throw new j("You are already on stage.", "2006");
13598
+ throw new F("You are already on stage.", "2006");
13611
13599
  case 3:
13612
13600
  if (!(this.status !== "ACCEPTED_TO_JOIN_STAGE" || l(this, oe)[oe].permissions.stageAccess === te.NotAllowed)) {
13613
13601
  s.next = 5;
13614
13602
  break;
13615
13603
  }
13616
- throw new j("Unable to join stage you are currently ".concat(this.status), "2006");
13604
+ throw new F("Unable to join stage you are currently ".concat(this.status), "2006");
13617
13605
  case 5:
13618
13606
  return l(this, Ge)[Ge].setValue("stageStatus", "ON_STAGE", !1), s.next = 8, l(this, Qr)[Qr].joinStage();
13619
13607
  case 8:
@@ -13648,17 +13636,17 @@ var Zo = {}, Ka = {
13648
13636
  i.next = 3;
13649
13637
  break;
13650
13638
  }
13651
- throw this.logger.error("Stage::stage_disabled"), new j("Stage is disabled", "2003");
13639
+ throw this.logger.error("Stage::stage_disabled"), new F("Stage is disabled", "2003");
13652
13640
  case 3:
13653
13641
  if (this.status === "ON_STAGE" || this.status === "ACCEPTED_TO_JOIN_STAGE") {
13654
13642
  i.next = 5;
13655
13643
  break;
13656
13644
  }
13657
- throw new j("Unable to leave stage you are currently ".concat(this.status), "2006");
13645
+ throw new F("Unable to leave stage you are currently ".concat(this.status), "2006");
13658
13646
  case 5:
13659
13647
  return l(this, oe)[oe].setIsPinned(!1), l(this, Ge)[Ge].setValue("stageStatus", "OFF_STAGE", !1), i.next = 9, l(this, Qr)[Qr].leaveStage(l(this, oe)[oe].userId);
13660
13648
  case 9:
13661
- return i.prev = 9, i.next = 12, l(this, Ge)[Ge].getValue("peerSessionStore").emitAsync(F.LEAVE_MEDIA_ROOM, "stageLeft");
13649
+ return i.prev = 9, i.next = 12, l(this, Ge)[Ge].getValue("peerSessionStore").emitAsync(j.LEAVE_MEDIA_ROOM, "stageLeft");
13662
13650
  case 12:
13663
13651
  i.next = 17;
13664
13652
  break;
@@ -13693,19 +13681,19 @@ var Zo = {}, Ka = {
13693
13681
  s.next = 2;
13694
13682
  break;
13695
13683
  }
13696
- throw new j("Can`t kick participant without joining room", "2005");
13684
+ throw new F("Can`t kick participant without joining room", "2005");
13697
13685
  case 2:
13698
13686
  if (l(this, oe)[oe].permissions.stageEnabled) {
13699
13687
  s.next = 5;
13700
13688
  break;
13701
13689
  }
13702
- throw this.logger.error("Stage::stage_disabled"), new j("Stage is disabled", "2003");
13690
+ throw this.logger.error("Stage::stage_disabled"), new F("Stage is disabled", "2003");
13703
13691
  case 5:
13704
13692
  if (l(this, oe)[oe].permissions.acceptStageRequests) {
13705
13693
  s.next = 8;
13706
13694
  break;
13707
13695
  }
13708
- throw this.logger.error("Stage::kick::permission_denied"), new j("You do not have permissions for kick", "2001");
13696
+ throw this.logger.error("Stage::kick::permission_denied"), new F("You do not have permissions for kick", "2001");
13709
13697
  case 8:
13710
13698
  return s.abrupt("return", l(this, Qr)[Qr].kick(a));
13711
13699
  case 9:
@@ -13820,7 +13808,7 @@ var qI = Object.defineProperty, GI = Object.getOwnPropertyDescriptor, WI = funct
13820
13808
  }
13821
13809
  return c.abrupt("return");
13822
13810
  case 2:
13823
- return s = (i = a == null ? void 0 : a.stageRequests) !== null && i !== void 0 ? i : [], c.next = 5, l(e, gr)[gr].getValue("peerSessionStore").emitAsync(F.GET_STAGE_REQUESTS, s);
13811
+ return s = (i = a == null ? void 0 : a.stageRequests) !== null && i !== void 0 ? i : [], c.next = 5, l(e, gr)[gr].getValue("peerSessionStore").emitAsync(j.GET_STAGE_REQUESTS, s);
13824
13812
  case 5:
13825
13813
  l(e, ru)[ru] < s.length && s.length > 0 && e.stage.emit("newStageRequest", { count: s.length }), l(e, ru)[ru] = s.length, e.stage.emit("stageAccessRequestUpdate", s);
13826
13814
  case 8:
@@ -13910,15 +13898,15 @@ var qI = Object.defineProperty, GI = Object.getOwnPropertyDescriptor, WI = funct
13910
13898
  u.t0 = n.stageType, u.next = u.t0 === 1 ? 8 : u.t0 === 2 ? 11 : u.t0 === 3 ? 13 : (u.t0 === 0 || u.t0 === 4, 15);
13911
13899
  break;
13912
13900
  case 8:
13913
- return a.setStageStatus("ON_STAGE"), i && l(this, gr)[gr].getValue("peerSessionStore").emit(F.UPDATE_ACTIVE, { viewMode: l(this, ot)[ot].viewMode, page: l(this, ot)[ot].currentPage }), u.abrupt("break", 18);
13901
+ return a.setStageStatus("ON_STAGE"), i && l(this, gr)[gr].getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: l(this, ot)[ot].viewMode, page: l(this, ot)[ot].currentPage }), u.abrupt("break", 18);
13914
13902
  case 11:
13915
13903
  return a.setStageStatus("ACCEPTED_TO_JOIN_STAGE"), u.abrupt("break", 18);
13916
13904
  case 13:
13917
13905
  return a.setStageStatus("REQUESTED_TO_JOIN_STAGE"), u.abrupt("break", 18);
13918
13906
  case 15:
13919
- return a.setStageStatus("OFF_STAGE"), i && l(this, gr)[gr].getValue("peerSessionStore").emit(F.UPDATE_ACTIVE, { viewMode: l(this, ot)[ot].viewMode, page: l(this, ot)[ot].currentPage }), u.abrupt("break", 18);
13907
+ return a.setStageStatus("OFF_STAGE"), i && l(this, gr)[gr].getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: l(this, ot)[ot].viewMode, page: l(this, ot)[ot].currentPage }), u.abrupt("break", 18);
13920
13908
  case 18:
13921
- l(this, gr)[gr].getValue("peerSessionStore").emit(F.UPDATE_PEER_STAGE_STATUS, { id: a.id, status: a.stageStatus });
13909
+ l(this, gr)[gr].getValue("peerSessionStore").emit(j.UPDATE_PEER_STAGE_STATUS, { id: a.id, status: a.stageStatus });
13922
13910
  case 19:
13923
13911
  case "end":
13924
13912
  return u.stop();
@@ -14063,9 +14051,9 @@ var JI = Object.defineProperty, KI = Object.getOwnPropertyDescriptor, Sc = funct
14063
14051
  value: function(r) {
14064
14052
  var n, a = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default";
14065
14053
  if (!l(this, ai)[ai])
14066
- throw this.logger.error("Plugin::addPluginView::no_auth_token_set_for_plugin"), new j("No auth token set for plugin.", "0602");
14054
+ throw this.logger.error("Plugin::addPluginView::no_auth_token_set_for_plugin"), new F("No auth token set for plugin.", "0602");
14067
14055
  if (!r)
14068
- throw this.logger.error("Plugin::addPluginView::iframe_was_not_provided"), new j("Iframe was not provided.", "0603");
14056
+ throw this.logger.error("Plugin::addPluginView::iframe_was_not_provided"), new F("Iframe was not provided.", "0603");
14069
14057
  this.removePluginView(i);
14070
14058
  var s = r, u = new URL(this.baseURL), c = { auth: l(this, ai)[ai], parent: navigator.isReactNative ? this.baseURL : window.location.origin, backend: l(this, hn)[hn].getValue("apiBase"), pluginId: this.id, roomName: (n = l(this, hn)[hn].getValue("meetingId")) !== null && n !== void 0 ? n : "", displayTitle: l(this, ii)[ii] };
14071
14059
  if (Object.keys(c).forEach(function(p) {
@@ -14445,7 +14433,7 @@ var XI = Object.defineProperty, ZI = Object.getOwnPropertyDescriptor, Ec = funct
14445
14433
  return;
14446
14434
  }
14447
14435
  e.plugins.active.delete(a);
14448
- }), l(this, et)[et].getValue("peerSessionStore").onAsync(F.SOCKET_SERVICE_ROOM_JOINED, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
14436
+ }), l(this, et)[et].getValue("peerSessionStore").onAsync(j.SOCKET_SERVICE_ROOM_JOINED, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
14449
14437
  return h().wrap(function(a) {
14450
14438
  for (; ; )
14451
14439
  switch (a.prev = a.next) {
@@ -14602,12 +14590,12 @@ var XI = Object.defineProperty, ZI = Object.getOwnPropertyDescriptor, Ec = funct
14602
14590
  }), l(this, si)[si].on(Ir.sendMessageToRoom, function(r) {
14603
14591
  var n = yn == null ? void 0 : yn.formatSocketPeerMessage(r.message);
14604
14592
  e.broadcastIframeEvent(Lr.chatMessage, { message: n });
14605
- }), l(this, et)[et].getValue("peerSessionStore").on(F.PEER_JOINED_INTERNAL, function(r) {
14593
+ }), l(this, et)[et].getValue("peerSessionStore").on(j.PEER_JOINED_INTERNAL, function(r) {
14606
14594
  var n = rc(r);
14607
14595
  e.broadcastIframeEvent(Lr.peerJoined, n);
14608
- }), l(this, et)[et].getValue("peerSessionStore").on(F.PEER_CLOSED, function(r) {
14596
+ }), l(this, et)[et].getValue("peerSessionStore").on(j.PEER_CLOSED, function(r) {
14609
14597
  e.broadcastIframeEvent(Lr.peerLeft, r);
14610
- }), l(this, et)[et].getValue("peerSessionStore").on(F.UPDATE_PEER_STAGE_STATUS, function(r) {
14598
+ }), l(this, et)[et].getValue("peerSessionStore").on(j.UPDATE_PEER_STAGE_STATUS, function(r) {
14611
14599
  e.broadcastIframeEvent(Lr.peerStageStatusUpdate, r);
14612
14600
  }), l(this, et)[et].subscribe("stageStatus", function(r) {
14613
14601
  e.broadcastIframeEvent(Lr.stageStatusUpdate, r);
@@ -14669,7 +14657,7 @@ var tu = /* @__PURE__ */ C("context"), xI = /* @__PURE__ */ function() {
14669
14657
  n = { state: "failed", reconnected: a, reconnectionAttempt: void 0 }, this.socketJoined = !1;
14670
14658
  break;
14671
14659
  }
14672
- n && (l(this, tu)[tu].getValue("peerSessionStore").emit(F.SOCKET_STATE_UPDATE, n), this.socketState = n);
14660
+ n && (l(this, tu)[tu].getValue("peerSessionStore").emit(j.SOCKET_STATE_UPDATE, n), this.socketState = n);
14673
14661
  } }]);
14674
14662
  }(), eM = Object.defineProperty, rM = Object.getOwnPropertyDescriptor, sl = function(t, e, r, n) {
14675
14663
  for (var a = n > 1 ? void 0 : n ? rM(e, r) : e, i = t.length - 1, s; i >= 0; i--)
@@ -14707,20 +14695,20 @@ var tu = /* @__PURE__ */ C("context"), xI = /* @__PURE__ */ function() {
14707
14695
  v.next = 3;
14708
14696
  break;
14709
14697
  }
14710
- throw this.logger.error("Recording::start::permission_denied"), new j("User does not have permission to start recording", "1001");
14698
+ throw this.logger.error("Recording::start::permission_denied"), new F("User does not have permission to start recording", "1001");
14711
14699
  case 3:
14712
14700
  if (!((a == null ? void 0 : a.allowMultiple) !== !0 && (this.recordingState === "STARTING" || this.recordingState === "RECORDING" || this.recordingState === "STOPPING"))) {
14713
14701
  v.next = 6;
14714
14702
  break;
14715
14703
  }
14716
- throw this.logger.error("Recording::start::recording_in_progress", { recording: { state: this.recordingState } }), new j("Cant start recording, recordingState irregular: ".concat(this.recordingState), "1005");
14704
+ throw this.logger.error("Recording::start::recording_in_progress", { recording: { state: this.recordingState } }), new F("Cant start recording, recordingState irregular: ".concat(this.recordingState), "1005");
14717
14705
  case 6:
14718
14706
  return v.prev = 6, i = ht(), s = l(this, oi)[oi].getValue("defaults"), u = s.recording, c = u === void 0 ? {} : u, v.next = 11, i.startRecording(c, a == null ? void 0 : a.allowMultiple);
14719
14707
  case 11:
14720
14708
  d = v.sent, this.updateRecordings([].concat(Pe(this.recordings), [{ id: d, state: "STARTING", type: "BROWSER" }])), v.next = 19;
14721
14709
  break;
14722
14710
  case 15:
14723
- throw v.prev = 15, v.t0 = v.catch(6), this.logger.error("Recording::stop::recording_failed_to_start", { error: v.t0 }), new j("Error while starting recording", "1000", this.logger);
14711
+ throw v.prev = 15, v.t0 = v.catch(6), this.logger.error("Recording::stop::recording_failed_to_start", { error: v.t0 }), new F("Error while starting recording", "1000", this.logger);
14724
14712
  case 19:
14725
14713
  case "end":
14726
14714
  return v.stop();
@@ -14798,7 +14786,7 @@ function jd() {
14798
14786
  u.next = 3;
14799
14787
  break;
14800
14788
  }
14801
- throw this.logger.error("Recording::stop::permission_denied"), new j("User does not have permission to stop recording", "1001");
14789
+ throw this.logger.error("Recording::stop::permission_denied"), new F("User does not have permission to stop recording", "1001");
14802
14790
  case 3:
14803
14791
  if (a = [], r === void 0) {
14804
14792
  u.next = 14;
@@ -14810,7 +14798,7 @@ function jd() {
14810
14798
  u.next = 8;
14811
14799
  break;
14812
14800
  }
14813
- throw new j("Could not find the specified recording", "1004");
14801
+ throw new F("Could not find the specified recording", "1004");
14814
14802
  case 8:
14815
14803
  if (!e.includes(i.state)) {
14816
14804
  u.next = 11;
@@ -14837,7 +14825,7 @@ function jd() {
14837
14825
  k.next = 13;
14838
14826
  break;
14839
14827
  case 8:
14840
- throw k.prev = 8, k.t0 = k.catch(2), n.logger.error("Recording::stop::recording_failed_to_stop", { error: k.t0 }), p.state !== v && (p.state = v, n.emit("recordingUpdate", v)), new j("Error while stopping recording", "1000", n.logger);
14828
+ throw k.prev = 8, k.t0 = k.catch(2), n.logger.error("Recording::stop::recording_failed_to_stop", { error: k.t0 }), p.state !== v && (p.state = v, n.emit("recordingUpdate", v)), new F("Error while stopping recording", "1000", n.logger);
14841
14829
  case 13:
14842
14830
  case "end":
14843
14831
  return k.stop();
@@ -14903,7 +14891,7 @@ var nM = Object.defineProperty, aM = Object.getOwnPropertyDescriptor, iM = funct
14903
14891
  return r;
14904
14892
  } }, { key: "setupEvents", value: function() {
14905
14893
  var e = this;
14906
- l(this, va)[va].getValue("peerSessionStore").on(F.ROOM_STATE, function(r) {
14894
+ l(this, va)[va].getValue("peerSessionStore").on(j.ROOM_STATE, function(r) {
14907
14895
  r.activeRecordings.length !== 0 ? e.recording.updateRecordings(r.activeRecordings.map(function(n) {
14908
14896
  var a = e.getRecordingTypeFromProtoType(n.recordingType);
14909
14897
  return { id: n.recordingId, state: n.recordingStatus, type: a };
@@ -16002,7 +15990,7 @@ var ma = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
16002
15990
  return r;
16003
15991
  }() }, { key: "handlePermissionErrors", value: function(r, n) {
16004
15992
  var a = Al(r, n.name, n.message);
16005
- return this.permissions[r] = a, l(this, Ie)[Ie].getValue("peerSessionStore").emit(F.MEDIA_PERMISSION_ERROR, { message: a, constraints: n.constraints, kind: r }), a;
15993
+ return this.permissions[r] = a, l(this, Ie)[Ie].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_ERROR, { message: a, constraints: n.constraints, kind: r }), a;
16006
15994
  } }, { key: "getAudioAndVideoTrack", value: function() {
16007
15995
  var e = m(/* @__PURE__ */ h().mark(function n(a, i) {
16008
15996
  var s, u, c, d, p, v, f, g, k, y, b, E, T, w, O, I, _;
@@ -16032,9 +16020,9 @@ var ma = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
16032
16020
  case 29:
16033
16021
  w = U.sent;
16034
16022
  case 30:
16035
- return l(this, Ie)[Ie].getValue("peerSessionStore").emit(F.MEDIA_PERMISSION_UPDATE, { message: this.permissions.audio, kind: "audio" }), l(this, Ie)[Ie].getValue("peerSessionStore").emit(F.MEDIA_PERMISSION_UPDATE, { message: this.permissions.video, kind: "video" }), U.abrupt("return", { audioTrack: T, videoTrack: w });
16023
+ return l(this, Ie)[Ie].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_UPDATE, { message: this.permissions.audio, kind: "audio" }), l(this, Ie)[Ie].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_UPDATE, { message: this.permissions.video, kind: "video" }), U.abrupt("return", { audioTrack: T, videoTrack: w });
16036
16024
  case 35:
16037
- throw U.prev = 35, U.t0 = U.catch(0), this.logger.error("WebMediaInterface.getAudioAndVideoTrack", { error: U.t0 }), new j("Couldnt fetch audio and video track", "1605");
16025
+ throw U.prev = 35, U.t0 = U.catch(0), this.logger.error("WebMediaInterface.getAudioAndVideoTrack", { error: U.t0 }), new F("Couldnt fetch audio and video track", "1605");
16038
16026
  case 39:
16039
16027
  case "end":
16040
16028
  return U.stop();
@@ -16058,7 +16046,7 @@ var ma = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
16058
16046
  E.next = 7;
16059
16047
  break;
16060
16048
  }
16061
- throw this.permissions.audio = "NO_DEVICES_AVAILABLE", l(this, Ie)[Ie].getValue("peerSessionStore").emit(F.MEDIA_PERMISSION_UPDATE, { message: this.permissions.audio, kind: "audio" }), new j("No audio devices available", "1606");
16049
+ throw this.permissions.audio = "NO_DEVICES_AVAILABLE", l(this, Ie)[Ie].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_UPDATE, { message: this.permissions.audio, kind: "audio" }), new F("No audio devices available", "1606");
16062
16050
  case 7:
16063
16051
  return v = !!((u = p) !== null && u !== void 0 && u.find(function(T) {
16064
16052
  return T.deviceId === i;
@@ -16099,9 +16087,9 @@ var ma = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
16099
16087
  };
16100
16088
  }(), E.prev = 10, E.next = 13, k(f);
16101
16089
  case 13:
16102
- return y = E.sent, y.enabled = !a, this.permissions.audio !== "ACCEPTED" && (this.permissions.audio = "ACCEPTED", l(this, Ie)[Ie].getValue("peerSessionStore").emit(F.MEDIA_PERMISSION_UPDATE, { message: this.permissions.audio, kind: "audio" })), E.abrupt("return", y);
16090
+ return y = E.sent, y.enabled = !a, this.permissions.audio !== "ACCEPTED" && (this.permissions.audio = "ACCEPTED", l(this, Ie)[Ie].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_UPDATE, { message: this.permissions.audio, kind: "audio" })), E.abrupt("return", y);
16103
16091
  case 19:
16104
- throw E.prev = 19, E.t0 = E.catch(10), E.t0.constraints && this.handlePermissionErrors("audio", E.t0), new j(E.t0.message, "1601");
16092
+ throw E.prev = 19, E.t0 = E.catch(10), E.t0.constraints && this.handlePermissionErrors("audio", E.t0), new F(E.t0.message, "1601");
16105
16093
  case 23:
16106
16094
  case "end":
16107
16095
  return E.stop();
@@ -16142,7 +16130,7 @@ var ma = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
16142
16130
  w.next = 21;
16143
16131
  break;
16144
16132
  }
16145
- throw this.permissions.video = "NO_DEVICES_AVAILABLE", l(this, Ie)[Ie].getValue("peerSessionStore").emit(F.MEDIA_PERMISSION_UPDATE, { message: this.permissions.video, kind: "video" }), new j("No video devices available", "1607");
16133
+ throw this.permissions.video = "NO_DEVICES_AVAILABLE", l(this, Ie)[Ie].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_UPDATE, { message: this.permissions.video, kind: "video" }), new F("No video devices available", "1607");
16146
16134
  case 21:
16147
16135
  return f = !!(v != null && v.find(function(O) {
16148
16136
  return O.deviceId === a;
@@ -16181,9 +16169,9 @@ var ma = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
16181
16169
  };
16182
16170
  }(), w.prev = 24, b = l(this, Gr)[Gr].getVideoConstraints(g), w.next = 28, y(b);
16183
16171
  case 28:
16184
- return E = w.sent, this.permissions.video !== "ACCEPTED" && (this.permissions.video = "ACCEPTED", l(this, Ie)[Ie].getValue("peerSessionStore").emit(F.MEDIA_PERMISSION_UPDATE, { message: this.permissions.video, kind: "video" })), w.abrupt("return", E);
16172
+ return E = w.sent, this.permissions.video !== "ACCEPTED" && (this.permissions.video = "ACCEPTED", l(this, Ie)[Ie].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_UPDATE, { message: this.permissions.video, kind: "video" })), w.abrupt("return", E);
16185
16173
  case 33:
16186
- throw w.prev = 33, w.t3 = w.catch(24), w.t3.constraints && this.handlePermissionErrors("video", w.t3), new j(w.t3.message, "1602");
16174
+ throw w.prev = 33, w.t3 = w.catch(24), w.t3.constraints && this.handlePermissionErrors("video", w.t3), new F(w.t3.message, "1602");
16187
16175
  case 37:
16188
16176
  case "end":
16189
16177
  return w.stop();
@@ -16236,9 +16224,9 @@ var ma = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
16236
16224
  };
16237
16225
  }(), d.prev = 1, s = l(this, Gr)[Gr].getScreenShareConstraints(), d.next = 5, i(s);
16238
16226
  case 5:
16239
- return u = d.sent, this.permissions.screenshare !== "ACCEPTED" && (this.permissions.screenshare = "ACCEPTED", l(this, Ie)[Ie].getValue("peerSessionStore").emit(F.MEDIA_PERMISSION_UPDATE, { message: this.permissions.screenshare, kind: "screenshare" })), d.abrupt("return", { audioTrack: u.getAudioTracks()[0], videoTrack: u.getVideoTracks()[0] });
16227
+ return u = d.sent, this.permissions.screenshare !== "ACCEPTED" && (this.permissions.screenshare = "ACCEPTED", l(this, Ie)[Ie].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_UPDATE, { message: this.permissions.screenshare, kind: "screenshare" })), d.abrupt("return", { audioTrack: u.getAudioTracks()[0], videoTrack: u.getVideoTracks()[0] });
16240
16228
  case 10:
16241
- throw d.prev = 10, d.t0 = d.catch(1), d.t0.constraints && this.handlePermissionErrors("screenshare", d.t0), new j(d.t0.message, "1612");
16229
+ throw d.prev = 10, d.t0 = d.catch(1), d.t0.constraints && this.handlePermissionErrors("screenshare", d.t0), new F(d.t0.message, "1612");
16242
16230
  case 14:
16243
16231
  case "end":
16244
16232
  return d.stop();
@@ -16354,7 +16342,7 @@ var ma = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
16354
16342
  return a === c;
16355
16343
  }));
16356
16344
  case 6:
16357
- throw s.prev = 6, s.t0 = s.catch(0), this.logger.error("enumerate_devices_failed", { error: s.t0 }), new j("Failed to get available devices by kind", "1609");
16345
+ throw s.prev = 6, s.t0 = s.catch(0), this.logger.error("enumerate_devices_failed", { error: s.t0 }), new F("Failed to get available devices by kind", "1609");
16358
16346
  case 10:
16359
16347
  case "end":
16360
16348
  return s.stop();
@@ -16378,7 +16366,7 @@ var ma = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"
16378
16366
  return c.deviceId === a;
16379
16367
  })[0]);
16380
16368
  case 7:
16381
- throw u.prev = 7, u.t0 = u.catch(0), this.logger.error("enumerate_devices_failed", { error: u.t0 }), new j("Failed to get device", "1609");
16369
+ throw u.prev = 7, u.t0 = u.catch(0), this.logger.error("enumerate_devices_failed", { error: u.t0 }), new F("Failed to get device", "1609");
16382
16370
  case 11:
16383
16371
  case "end":
16384
16372
  return u.stop();
@@ -16675,7 +16663,7 @@ var IM = Object.defineProperty, MM = Object.getOwnPropertyDescriptor, wg = funct
16675
16663
  i.next = 14;
16676
16664
  break;
16677
16665
  case 9:
16678
- throw i.prev = 9, i.t0 = i.catch(0), this.logger.error("".concat(this.constructorName, ".unmuteTrack.error"), { error: i.t0 }), this.disableTrack(), new j("Failed to unmute track", "1611");
16666
+ throw i.prev = 9, i.t0 = i.catch(0), this.logger.error("".concat(this.constructorName, ".unmuteTrack.error"), { error: i.t0 }), this.disableTrack(), new F("Failed to unmute track", "1611");
16679
16667
  case 14:
16680
16668
  case "end":
16681
16669
  return i.stop();
@@ -16753,7 +16741,7 @@ var IM = Object.defineProperty, MM = Object.getOwnPropertyDescriptor, wg = funct
16753
16741
  c.next = 4;
16754
16742
  break;
16755
16743
  }
16756
- throw this.logger.warn("".concat(this.constructorName, ".setDevice No device received")), new j("No device received!", "1603");
16744
+ throw this.logger.warn("".concat(this.constructorName, ".setDevice No device received")), new F("No device received!", "1603");
16757
16745
  case 4:
16758
16746
  return this.userSelectedDevice = a.deviceId, s && this.setUserPreferredDevice(a.deviceId), c.next = 8, this.onSetDevice(a);
16759
16747
  case 8:
@@ -16892,13 +16880,13 @@ var Pg = nc, _M = Object.defineProperty, OM = Object.getOwnPropertyDescriptor, W
16892
16880
  u.next = 3;
16893
16881
  break;
16894
16882
  }
16895
- throw this.logger.warn("AudioMediaHandler.setDevice No device received"), new j("No device received!", "1603");
16883
+ throw this.logger.warn("AudioMediaHandler.setDevice No device received"), new F("No device received!", "1603");
16896
16884
  case 3:
16897
16885
  if (a.kind === "audioinput") {
16898
16886
  u.next = 6;
16899
16887
  break;
16900
16888
  }
16901
- throw this.logger.warn("AudioMediaHandler.setDevice Received non audio device"), new j("Non audio device received while setting device!", "1603");
16889
+ throw this.logger.warn("AudioMediaHandler.setDevice Received non audio device"), new F("Non audio device received while setting device!", "1603");
16902
16890
  case 6:
16903
16891
  return u.prev = 6, i = this.trackEnabled, this.disableTrack(), u.t0 = this, u.next = 12, this.mediaInterface.getAudioTrack(!i, this.userSelectedDevice);
16904
16892
  case 12:
@@ -16907,7 +16895,7 @@ var Pg = nc, _M = Object.defineProperty, OM = Object.getOwnPropertyDescriptor, W
16907
16895
  u.next = 22;
16908
16896
  break;
16909
16897
  case 17:
16910
- throw u.prev = 17, u.t2 = u.catch(6), this.logger.error("AudioMediaHandler.setDevice.error", { error: u.t2 }), this.disableTrack(), new j(u.t2.message, "1604");
16898
+ throw u.prev = 17, u.t2 = u.catch(6), this.logger.error("AudioMediaHandler.setDevice.error", { error: u.t2 }), this.disableTrack(), new F(u.t2.message, "1604");
16911
16899
  case 22:
16912
16900
  case "end":
16913
16901
  return u.stop();
@@ -17163,7 +17151,7 @@ var DM = Cc, ya = /* @__PURE__ */ C("mediaInterface"), LM = /* @__PURE__ */ func
17163
17151
  y.next = 13;
17164
17152
  break;
17165
17153
  }
17166
- throw new j("No speaker found", "1608");
17154
+ throw new F("No speaker found", "1608");
17167
17155
  case 13:
17168
17156
  if (((i = this.currentDevice) === null || i === void 0 ? void 0 : i.deviceId) !== d.deviceId) {
17169
17157
  y.next = 15;
@@ -17238,7 +17226,7 @@ var DM = Cc, ya = /* @__PURE__ */ C("mediaInterface"), LM = /* @__PURE__ */ func
17238
17226
  }
17239
17227
  return d.abrupt("return");
17240
17228
  case 11:
17241
- this.mediaInterface.permissions && (this.mediaInterface.permissions.screenshare = "ACCEPTED", l(this, iu)[iu].getValue("peerSessionStore").emit(F.MEDIA_PERMISSION_UPDATE, { message: this.mediaInterface.permissions.screenshare, kind: "screenshare" })), d.next = 16;
17229
+ this.mediaInterface.permissions && (this.mediaInterface.permissions.screenshare = "ACCEPTED", l(this, iu)[iu].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_UPDATE, { message: this.mediaInterface.permissions.screenshare, kind: "screenshare" })), d.next = 16;
17242
17230
  break;
17243
17231
  case 14:
17244
17232
  d.prev = 14, d.t0 = d.catch(0);
@@ -17266,13 +17254,13 @@ var DM = Cc, ya = /* @__PURE__ */ C("mediaInterface"), LM = /* @__PURE__ */ func
17266
17254
  u.next = 2;
17267
17255
  break;
17268
17256
  }
17269
- throw new j("No media track enabled!", "1610");
17257
+ throw new F("No media track enabled!", "1610");
17270
17258
  case 2:
17271
17259
  if (i = this.mediaInterface, i.constraintsBuilder) {
17272
17260
  u.next = 5;
17273
17261
  break;
17274
17262
  }
17275
- throw new j("update constraints not supported for non web clients", "1100", this.logger);
17263
+ throw new F("update constraints not supported for non web clients", "1100", this.logger);
17276
17264
  case 5:
17277
17265
  try {
17278
17266
  this.videoMediaTrack.applyConstraints(i.constraintsBuilder.getUpdatedVideoConstraints(a)), this.addMediaTrackListeners();
@@ -17320,13 +17308,13 @@ var DM = Cc, ya = /* @__PURE__ */ C("mediaInterface"), LM = /* @__PURE__ */ func
17320
17308
  s.next = 3;
17321
17309
  break;
17322
17310
  }
17323
- throw this.logger.warn("VideoMediaHandler.setDevice No device received"), new j("No device received!", "1603");
17311
+ throw this.logger.warn("VideoMediaHandler.setDevice No device received"), new F("No device received!", "1603");
17324
17312
  case 3:
17325
17313
  if (a.kind === "videoinput") {
17326
17314
  s.next = 6;
17327
17315
  break;
17328
17316
  }
17329
- throw this.logger.warn("VideoMediaHandler.setDevice Received non video device", { devices: [a] }), new j("Non video device received while setting video device!", "1603");
17317
+ throw this.logger.warn("VideoMediaHandler.setDevice Received non video device", { devices: [a] }), new F("Non video device received while setting video device!", "1603");
17330
17318
  case 6:
17331
17319
  if (this.mediaTrack && this.mediaTrack.enabled) {
17332
17320
  s.next = 10;
@@ -17341,7 +17329,7 @@ var DM = Cc, ya = /* @__PURE__ */ C("mediaInterface"), LM = /* @__PURE__ */ func
17341
17329
  s.next = 25;
17342
17330
  break;
17343
17331
  case 20:
17344
- throw s.prev = 20, s.t2 = s.catch(10), this.logger.error("VideoMediaHandler.setDevice.error", { error: s.t2 }), this.disableTrack(), new j("Failed to change device", "1600", this.logger);
17332
+ throw s.prev = 20, s.t2 = s.catch(10), this.logger.error("VideoMediaHandler.setDevice.error", { error: s.t2 }), this.disableTrack(), new F("Failed to change device", "1600", this.logger);
17345
17333
  case 25:
17346
17334
  case "end":
17347
17335
  return s.stop();
@@ -17443,13 +17431,13 @@ var DM = Cc, ya = /* @__PURE__ */ C("mediaInterface"), LM = /* @__PURE__ */ func
17443
17431
  u.next = 2;
17444
17432
  break;
17445
17433
  }
17446
- throw new j("No media track enabled!", "1610");
17434
+ throw new F("No media track enabled!", "1610");
17447
17435
  case 2:
17448
17436
  if (i = this.mediaInterface, i.constraintsBuilder) {
17449
17437
  u.next = 5;
17450
17438
  break;
17451
17439
  }
17452
- throw new j("update constraints not supported for non web clients", "1100", this.logger);
17440
+ throw new F("update constraints not supported for non web clients", "1100", this.logger);
17453
17441
  case 5:
17454
17442
  return u.prev = 5, this._mediaTrack.applyConstraints(i.constraintsBuilder.getUpdatedVideoConstraints(a)), u.next = 9, this.setTransformedTrack();
17455
17443
  case 9:
@@ -17555,7 +17543,7 @@ Rc([D.trace("VideoMediaHandler.conditionallyChangeTrack")], ol.prototype, "condi
17555
17543
  var FM = ol, mv = Un(Np()), Rr = /* @__PURE__ */ C("config"), ka = /* @__PURE__ */ C("theme"), ou = /* @__PURE__ */ C("name"), ps = /* @__PURE__ */ C("pluginsConfig"), HM = /* @__PURE__ */ function() {
17556
17544
  function o(t) {
17557
17545
  if (P(this, o), Object.defineProperty(this, Rr, { writable: !0, value: void 0 }), Object.defineProperty(this, ka, { writable: !0, value: void 0 }), Object.defineProperty(this, ou, { writable: !0, value: void 0 }), Object.defineProperty(this, ps, { writable: !0, value: void 0 }), !t)
17558
- throw new j("Could not load preset.", "0904");
17546
+ throw new F("Could not load preset.", "0904");
17559
17547
  l(this, Rr)[Rr] = t.config, l(this, ou)[ou] = t.name, l(this, ka)[ka] = t.ui || Un(Np().ui), l(this, ps)[ps] = t.permissions.plugins.config;
17560
17548
  }
17561
17549
  return S(o, [{
@@ -17731,14 +17719,14 @@ var FM = ol, mv = Un(Np()), Rr = /* @__PURE__ */ C("config"), ka = /* @__PURE__
17731
17719
  v.next = 4;
17732
17720
  break;
17733
17721
  }
17734
- throw this.logger.error("Livestream::start::permission_denied"), new j("User does not have permission to start livestreaming", "1901");
17722
+ throw this.logger.error("Livestream::start::permission_denied"), new F("User does not have permission to start livestreaming", "1901");
17735
17723
  case 4:
17736
17724
  return this.setLivestreamState("STARTING"), v.prev = 5, i = ht(), v.next = 9, i.startLivestreaming(a);
17737
17725
  case 9:
17738
17726
  s = v.sent, u = s.playbackUrl, c = s.ingestionCredentials, this.playbackUrl = u, this.ingestionCredentials = c, a != null && a.manualIngestion && this.setLivestreamState("WAITING_ON_MANUAL_INGESTION"), v.next = 22;
17739
17727
  break;
17740
17728
  case 17:
17741
- throw v.prev = 17, v.t0 = v.catch(5), this.logger.error("Recording::stop::livestream_failed_to_start", { error: v.t0 }), this.setLivestreamState("IDLE"), new j("Error while starting livestream", "1900", this.logger);
17729
+ throw v.prev = 17, v.t0 = v.catch(5), this.logger.error("Recording::stop::livestream_failed_to_start", { error: v.t0 }), this.setLivestreamState("IDLE"), new F("Error while starting livestream", "1900", this.logger);
17742
17730
  case 22:
17743
17731
  case "end":
17744
17732
  return v.stop();
@@ -17760,20 +17748,20 @@ var FM = ol, mv = Un(Np()), Rr = /* @__PURE__ */ C("config"), ka = /* @__PURE__
17760
17748
  s.next = 3;
17761
17749
  break;
17762
17750
  }
17763
- throw this.logger.error("Livestream::stop::permission_denied"), new j("User does not have permission to stop livestreaming", "1901");
17751
+ throw this.logger.error("Livestream::stop::permission_denied"), new F("User does not have permission to stop livestreaming", "1901");
17764
17752
  case 3:
17765
17753
  if (!(this.state !== "LIVESTREAMING" && this.state !== "WAITING_ON_MANUAL_INGESTION")) {
17766
17754
  s.next = 6;
17767
17755
  break;
17768
17756
  }
17769
- throw this.logger.error("Livestream::stop::inconsistent_state"), new j("Livestream not started yet", "1902");
17757
+ throw this.logger.error("Livestream::stop::inconsistent_state"), new F("Livestream not started yet", "1902");
17770
17758
  case 6:
17771
17759
  return s.prev = 6, this.setLivestreamState("STOPPING"), a = ht(), s.next = 11, a.stopLivestreaming();
17772
17760
  case 11:
17773
17761
  s.next = 18;
17774
17762
  break;
17775
17763
  case 13:
17776
- throw s.prev = 13, s.t0 = s.catch(6), this.logger.error("Livestream::stop::livestream_failed_to_stop", { error: s.t0 }), this.setLivestreamState("STOPPING"), new j("Error while stopping livestream", "1900", this.logger);
17764
+ throw s.prev = 13, s.t0 = s.catch(6), this.logger.error("Livestream::stop::livestream_failed_to_stop", { error: s.t0 }), this.setLivestreamState("STOPPING"), new F("Error while stopping livestream", "1900", this.logger);
17777
17765
  case 18:
17778
17766
  case "end":
17779
17767
  return s.stop();
@@ -17897,7 +17885,7 @@ var GM = Object.defineProperty, WM = Object.getOwnPropertyDescriptor, JM = funct
17897
17885
  e.livestream.setLivestreamState("IDLE"), e.livestream.playbackUrl = void 0;
17898
17886
  }), l(this, Jt)[Jt].on(Q.roomPeerCount, function(r) {
17899
17887
  e.livestream.viewerCount = r.count, e.livestream.emit("viewerCountUpdate", r.count);
17900
- }), l(this, bt)[bt].getValue("peerSessionStore").on(F.PEER_JOINED_INTERNAL, /* @__PURE__ */ function() {
17888
+ }), l(this, bt)[bt].getValue("peerSessionStore").on(j.PEER_JOINED_INTERNAL, /* @__PURE__ */ function() {
17901
17889
  var r = m(/* @__PURE__ */ h().mark(function n(a) {
17902
17890
  var i;
17903
17891
  return h().wrap(function(u) {
@@ -17914,9 +17902,9 @@ var GM = Object.defineProperty, WM = Object.getOwnPropertyDescriptor, JM = funct
17914
17902
  return function(n) {
17915
17903
  return r.apply(this, arguments);
17916
17904
  };
17917
- }()), l(this, bt)[bt].getValue("peerSessionStore").on(F.PEER_CLOSED, function(r) {
17905
+ }()), l(this, bt)[bt].getValue("peerSessionStore").on(j.PEER_CLOSED, function(r) {
17918
17906
  r.id === l(e, vs)[vs] && (l(e, vs)[vs] = void 0, e.livestream.setLivestreamState("IDLE"));
17919
- }), l(this, bt)[bt].getValue("peerSessionStore").onAsync(F.LEAVE_MEDIA_ROOM, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
17907
+ }), l(this, bt)[bt].getValue("peerSessionStore").onAsync(j.LEAVE_MEDIA_ROOM, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
17920
17908
  return h().wrap(function(a) {
17921
17909
  for (; ; )
17922
17910
  switch (a.prev = a.next) {
@@ -17938,7 +17926,7 @@ var GM = Object.defineProperty, WM = Object.getOwnPropertyDescriptor, JM = funct
17938
17926
  return a.stop();
17939
17927
  }
17940
17928
  }, r, null, [[3, 8]]);
17941
- }))), l(this, bt)[bt].getValue("peerSessionStore").on(F.SOCKET_SERVICE_ROOM_JOINED, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
17929
+ }))), l(this, bt)[bt].getValue("peerSessionStore").on(j.SOCKET_SERVICE_ROOM_JOINED, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
17942
17930
  return h().wrap(function(a) {
17943
17931
  for (; ; )
17944
17932
  switch (a.prev = a.next) {
@@ -18289,7 +18277,7 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
18289
18277
  var $ = U.clientWidth, L = U.clientHeight, H = i.videoTrack.getSettings(), Y = H.width, q = H.height;
18290
18278
  if (!(!Y || !q)) {
18291
18279
  var B = q / L, x = Y / $, we = Math.max(B, x);
18292
- we > t_ && l(i, _t)[_t] === 1 ? (l(i, _t)[_t] = 0, l(i, Nr)[Nr].getValue("peerSessionStore").emit(F.MAX_SPATIAL_LAYER_CHANGE, { peerId: i.id, maxSpatialLayer: l(i, _t)[_t] })) : we < r_ && l(i, _t)[_t] === 0 && (l(i, _t)[_t] = 1, l(i, Nr)[Nr].getValue("peerSessionStore").emit(F.MAX_SPATIAL_LAYER_CHANGE, { peerId: i.id, maxSpatialLayer: l(i, _t)[_t] }));
18280
+ we > t_ && l(i, _t)[_t] === 1 ? (l(i, _t)[_t] = 0, l(i, Nr)[Nr].getValue("peerSessionStore").emit(j.MAX_SPATIAL_LAYER_CHANGE, { peerId: i.id, maxSpatialLayer: l(i, _t)[_t] })) : we < r_ && l(i, _t)[_t] === 0 && (l(i, _t)[_t] = 1, l(i, Nr)[Nr].getValue("peerSessionStore").emit(j.MAX_SPATIAL_LAYER_CHANGE, { peerId: i.id, maxSpatialLayer: l(i, _t)[_t] }));
18293
18281
  }
18294
18282
  }
18295
18283
  }, 2e3) }), l(i, Nr)[Nr] = e;
@@ -18359,13 +18347,13 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
18359
18347
  i.next = 2;
18360
18348
  break;
18361
18349
  }
18362
- throw new j("Can`t pin participant without joining room", "1205");
18350
+ throw new F("Can`t pin participant without joining room", "1205");
18363
18351
  case 2:
18364
18352
  if (l(this, Mt)[Mt].permissions.pinParticipant) {
18365
18353
  i.next = 4;
18366
18354
  break;
18367
18355
  }
18368
- throw new j("You do not have permission to pin participants.", "1201");
18356
+ throw new F("You do not have permission to pin participants.", "1201");
18369
18357
  case 4:
18370
18358
  return i.abrupt("return", l(this, Qn)[Qn].pinPeer(this.id));
18371
18359
  case 5:
@@ -18388,13 +18376,13 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
18388
18376
  i.next = 2;
18389
18377
  break;
18390
18378
  }
18391
- throw new j("Can`t unpin participant without joining room", "1205");
18379
+ throw new F("Can`t unpin participant without joining room", "1205");
18392
18380
  case 2:
18393
18381
  if (l(this, Mt)[Mt].permissions.pinParticipant) {
18394
18382
  i.next = 4;
18395
18383
  break;
18396
18384
  }
18397
- throw new j("You do not have permission to unpin participants.", "1201");
18385
+ throw new F("You do not have permission to unpin participants.", "1201");
18398
18386
  case 4:
18399
18387
  return i.abrupt("return", l(this, Qn)[Qn].pinPeer(null));
18400
18388
  case 5:
@@ -18423,7 +18411,7 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
18423
18411
  s.next = 4;
18424
18412
  break;
18425
18413
  }
18426
- throw new j("Can`t disable participant audio without joining room", "1205");
18414
+ throw new F("Can`t disable participant audio without joining room", "1205");
18427
18415
  case 4:
18428
18416
  if (!l(this, Mt)[Mt].permissions.canDisableParticipantAudio) {
18429
18417
  s.next = 6;
@@ -18431,7 +18419,7 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
18431
18419
  }
18432
18420
  return s.abrupt("return", l(this, Qn)[Qn].disableAudio(a));
18433
18421
  case 6:
18434
- throw this.logger.error("Participant::unauthorized_disable_audio", { participant: { id: a } }), new j("Unauthorized: User does not have permission to disable participant audio.", "1201");
18422
+ throw this.logger.error("Participant::unauthorized_disable_audio", { participant: { id: a } }), new F("Unauthorized: User does not have permission to disable participant audio.", "1201");
18435
18423
  case 8:
18436
18424
  case "end":
18437
18425
  return s.stop();
@@ -18453,17 +18441,17 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
18453
18441
  s.next = 4;
18454
18442
  break;
18455
18443
  }
18456
- throw new j("Can`t kick participant without joining room", "1205");
18444
+ throw new F("Can`t kick participant without joining room", "1205");
18457
18445
  case 4:
18458
18446
  if (!l(this, Mt)[Mt].permissions.kickParticipant) {
18459
18447
  s.next = 8;
18460
18448
  break;
18461
18449
  }
18462
- return s.next = 7, l(this, Nr)[Nr].getValue("peerSessionStore").emitAsync(F.KICK_PEER, { peerId: a });
18450
+ return s.next = 7, l(this, Nr)[Nr].getValue("peerSessionStore").emitAsync(j.KICK_PEER, { peerId: a });
18463
18451
  case 7:
18464
18452
  return s.abrupt("return");
18465
18453
  case 8:
18466
- throw this.logger.error("Participant::unauthorized_kick", { participant: { id: a } }), new j("Unauthorized: User does not have permission to kick participants.", "1201");
18454
+ throw this.logger.error("Participant::unauthorized_kick", { participant: { id: a } }), new F("Unauthorized: User does not have permission to kick participants.", "1201");
18467
18455
  case 10:
18468
18456
  case "end":
18469
18457
  return s.stop();
@@ -18485,7 +18473,7 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
18485
18473
  s.next = 4;
18486
18474
  break;
18487
18475
  }
18488
- throw new j("Can`t disable participant video without joining room", "1205");
18476
+ throw new F("Can`t disable participant video without joining room", "1205");
18489
18477
  case 4:
18490
18478
  if (!l(this, Mt)[Mt].permissions.canDisableParticipantVideo) {
18491
18479
  s.next = 6;
@@ -18493,7 +18481,7 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
18493
18481
  }
18494
18482
  return s.abrupt("return", l(this, Qn)[Qn].disableVideo(a));
18495
18483
  case 6:
18496
- throw this.logger.error("Participant::unauthorized_disable_video", { participant: { id: a } }), new j("Unauthorized: User does not have permission to disable participant video.", "1201");
18484
+ throw this.logger.error("Participant::unauthorized_disable_video", { participant: { id: a } }), new F("Unauthorized: User does not have permission to disable participant video.", "1201");
18497
18485
  case 8:
18498
18486
  case "end":
18499
18487
  return s.stop();
@@ -18767,7 +18755,7 @@ var lu = /* @__PURE__ */ function(o) {
18767
18755
  key: "setupEvents",
18768
18756
  value: function() {
18769
18757
  var r = this;
18770
- l(this, me)[me].getValue("peerSessionStore").on(F.E2EE_ACTIVE_CONSUMER, function(a) {
18758
+ l(this, me)[me].getValue("peerSessionStore").on(j.E2EE_ACTIVE_CONSUMER, function(a) {
18771
18759
  var i, s = a.peerId;
18772
18760
  ((i = l(r, me)[me].getValue("modules").e2ee) === null || i === void 0 ? void 0 : i.enabled) !== !0 && r.emit("media_decode_error", { reason: "Got encrypted media for participantId ".concat(s, ", but encryption wasn't enabled in init.defaults"), code: "1702" });
18773
18761
  });
@@ -18804,8 +18792,8 @@ var lu = /* @__PURE__ */ function(o) {
18804
18792
  key: "setMaxActiveParticipantsCount",
18805
18793
  value: function(r) {
18806
18794
  if (r < 0 || r > 24)
18807
- throw new j("0 <= Max active participants count limit <= 24", "1203");
18808
- l(this, me)[me].setValue("maxPreferredStreams", r), l(this, pi)[pi] && l(this, me)[me].getValue("peerSessionStore").emit(F.UPDATE_ACTIVE, { viewMode: this.viewMode, page: this.currentPage });
18795
+ throw new F("0 <= Max active participants count limit <= 24", "1203");
18796
+ l(this, me)[me].setValue("maxPreferredStreams", r), l(this, pi)[pi] && l(this, me)[me].getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: this.viewMode, page: this.currentPage });
18809
18797
  }
18810
18798
  /**
18811
18799
  * Returns the number of pages that are available in the meeting in PAGINATED mode.
@@ -18832,7 +18820,7 @@ var lu = /* @__PURE__ */ function(o) {
18832
18820
  value: function(r) {
18833
18821
  var n, a;
18834
18822
  if (!l(this, xn)[xn])
18835
- throw new j("Can`t accept waiting room request without joining room", "1205");
18823
+ throw new F("Can`t accept waiting room request without joining room", "1205");
18836
18824
  var i = (n = (a = this.waitlisted.get(r)) === null || a === void 0 ? void 0 : a.userId) !== null && n !== void 0 ? n : r;
18837
18825
  return l(this, wr)[wr].acceptWaitingRoomRequest([i]);
18838
18826
  }
@@ -18874,7 +18862,7 @@ var lu = /* @__PURE__ */ function(o) {
18874
18862
  d.next = 2;
18875
18863
  break;
18876
18864
  }
18877
- throw new j("Can`t reject waiting room request without joining room", "1205");
18865
+ throw new F("Can`t reject waiting room request without joining room", "1205");
18878
18866
  case 2:
18879
18867
  u = (i = (s = this.waitlisted.get(a)) === null || s === void 0 ? void 0 : s.userId) !== null && i !== void 0 ? i : a, l(this, wr)[wr].rejectWaitingRoomRequest([u]);
18880
18868
  case 4:
@@ -18902,7 +18890,7 @@ var lu = /* @__PURE__ */ function(o) {
18902
18890
  u.next = 5;
18903
18891
  break;
18904
18892
  }
18905
- throw this.logger.error("Participants::setViewMode::invalid_view_mode", { pageNavigation: { viewMode: a, currentPage: this.currentPage, pageCount: this.pageCount, maxActiveParticipantsCount: this.maxActiveParticipantsCount } }), new j("Invalid view mode: ".concat(a, ". Try ACTIVE_GRID, PAGINATED or MANUAL."), "1207");
18893
+ throw this.logger.error("Participants::setViewMode::invalid_view_mode", { pageNavigation: { viewMode: a, currentPage: this.currentPage, pageCount: this.pageCount, maxActiveParticipantsCount: this.maxActiveParticipantsCount } }), new F("Invalid view mode: ".concat(a, ". Try ACTIVE_GRID, PAGINATED or MANUAL."), "1207");
18906
18894
  case 5:
18907
18895
  if (this.viewMode !== a) {
18908
18896
  u.next = 8;
@@ -18910,7 +18898,7 @@ var lu = /* @__PURE__ */ function(o) {
18910
18898
  }
18911
18899
  return this.logger.info("Participants::setViewMode::view_mode_same_as_previous"), u.abrupt("return");
18912
18900
  case 8:
18913
- this.viewMode = a, a === "PAGINATED" ? (this.currentPage = 1, l(this, me)[me].getValue("peerSessionStore").emit(F.UPDATE_ACTIVE, { viewMode: a, page: this.currentPage })) : a === "ACTIVE_GRID" ? (this.currentPage = 0, l(this, me)[me].getValue("peerSessionStore").emit(F.UPDATE_ACTIVE, { viewMode: a, page: this.currentPage })) : a === "MANUAL" && (this.currentPage = 0, l(this, me)[me].getValue("peerSessionStore").emit(F.UPDATE_ACTIVE, { viewMode: a, page: this.currentPage })), this.emit("viewModeChanged", { viewMode: a, currentPage: this.currentPage, pageCount: this.pageCount });
18901
+ this.viewMode = a, a === "PAGINATED" ? (this.currentPage = 1, l(this, me)[me].getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: a, page: this.currentPage })) : a === "ACTIVE_GRID" ? (this.currentPage = 0, l(this, me)[me].getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: a, page: this.currentPage })) : a === "MANUAL" && (this.currentPage = 0, l(this, me)[me].getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: a, page: this.currentPage })), this.emit("viewModeChanged", { viewMode: a, currentPage: this.currentPage, pageCount: this.pageCount });
18914
18902
  case 11:
18915
18903
  case "end":
18916
18904
  return u.stop();
@@ -18937,12 +18925,12 @@ var lu = /* @__PURE__ */ function(o) {
18937
18925
  d.next = 3;
18938
18926
  break;
18939
18927
  }
18940
- throw new j("MANUAL subscription mode was not activated.", "1206");
18928
+ throw new F("MANUAL subscription mode was not activated.", "1206");
18941
18929
  case 3:
18942
18930
  a.forEach(function(p) {
18943
18931
  var v = i.joined.get(p);
18944
18932
  v && (s.includes("audio") && (v.manualProducerConfig = N(N({}, v.manualProducerConfig), {}, { audio: !0 }), i.audioSubscribed.has(v.id) || i.audioSubscribed.add(v)), s.includes("video") && (v.manualProducerConfig = N(N({}, v.manualProducerConfig), {}, { video: !0 }), i.videoSubscribed.has(v.id) || i.videoSubscribed.add(v)), s.includes("screenshareAudio") && (v.manualProducerConfig = N(N({}, v.manualProducerConfig), {}, { screenshareAudio: !0 }), i.audioSubscribed.has(v.id) || i.audioSubscribed.add(v)), s.includes("screenshareVideo") && (v.manualProducerConfig = N(N({}, v.manualProducerConfig), {}, { screenshareVideo: !0 }), i.videoSubscribed.has(v.id) || i.videoSubscribed.add(v)));
18945
- }), l(this, me)[me].getValue("peerSessionStore").emit(F.UPDATE_ACTIVE, { viewMode: this.viewMode, page: this.currentPage });
18933
+ }), l(this, me)[me].getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: this.viewMode, page: this.currentPage });
18946
18934
  case 5:
18947
18935
  case "end":
18948
18936
  return d.stop();
@@ -18964,12 +18952,12 @@ var lu = /* @__PURE__ */ function(o) {
18964
18952
  d.next = 3;
18965
18953
  break;
18966
18954
  }
18967
- throw new j("MANUAL subscription mode was not activated.", "1206");
18955
+ throw new F("MANUAL subscription mode was not activated.", "1206");
18968
18956
  case 3:
18969
18957
  a.forEach(function(p) {
18970
18958
  var v = i.joined.get(p);
18971
18959
  v && (s.includes("audio") && (v.manualProducerConfig = N(N({}, v.manualProducerConfig), {}, { audio: !1 }), v.manualProducerConfig.screenshareAudio || i.audioSubscribed.delete(v.id)), s.includes("video") && (v.manualProducerConfig = N(N({}, v.manualProducerConfig), {}, { video: !1 }), v.manualProducerConfig.screenshareVideo || i.videoSubscribed.delete(v.id)), s.includes("screenshareAudio") && (v.manualProducerConfig = N(N({}, v.manualProducerConfig), {}, { screenshareAudio: !1 }), v.manualProducerConfig.audio || i.audioSubscribed.delete(v.id)), s.includes("screenshareVideo") && (v.manualProducerConfig = N(N({}, v.manualProducerConfig), {}, { screenshareVideo: !1 }), v.manualProducerConfig.video || i.videoSubscribed.delete(v.id)));
18972
- }), l(this, me)[me].getValue("peerSessionStore").emit(F.UPDATE_ACTIVE, { viewMode: this.viewMode, page: this.currentPage });
18960
+ }), l(this, me)[me].getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: this.viewMode, page: this.currentPage });
18973
18961
  case 5:
18974
18962
  case "end":
18975
18963
  return d.stop();
@@ -19009,9 +18997,9 @@ var lu = /* @__PURE__ */ function(o) {
19009
18997
  s.next = 6;
19010
18998
  break;
19011
18999
  }
19012
- throw this.logger.error("Participants::invalid_page_number"), new j("Invalid page: ".concat(a, ". Page must be an integer and greater than 0 and less than or equal to .pageCount"), "1202");
19000
+ throw this.logger.error("Participants::invalid_page_number"), new F("Invalid page: ".concat(a, ". Page must be an integer and greater than 0 and less than or equal to .pageCount"), "1202");
19013
19001
  case 6:
19014
- this.currentPage = a, l(this, me)[me].getValue("peerSessionStore").emit(F.UPDATE_ACTIVE, { viewMode: this.viewMode, page: a }), this.emit("pageChanged", { viewMode: this.viewMode, currentPage: this.currentPage, pageCount: this.pageCount });
19002
+ this.currentPage = a, l(this, me)[me].getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: this.viewMode, page: a }), this.emit("pageChanged", { viewMode: this.viewMode, currentPage: this.currentPage, pageCount: this.pageCount });
19015
19003
  case 9:
19016
19004
  case "end":
19017
19005
  return s.stop();
@@ -19032,7 +19020,7 @@ var lu = /* @__PURE__ */ function(o) {
19032
19020
  s.next = 3;
19033
19021
  break;
19034
19022
  }
19035
- throw new j("Can`t disable all audio without joining room", "1205");
19023
+ throw new F("Can`t disable all audio without joining room", "1205");
19036
19024
  case 3:
19037
19025
  if (!l(this, ea)[ea].permissions.canAllowParticipantAudio) {
19038
19026
  s.next = 5;
@@ -19040,7 +19028,7 @@ var lu = /* @__PURE__ */ function(o) {
19040
19028
  }
19041
19029
  return s.abrupt("return", l(this, ho)[ho].muteAll(a));
19042
19030
  case 5:
19043
- throw this.logger.error("Participants::unauthorized_disable_all_audio", { actions: { disableAllAudio: { allowUnmute: a } } }), new j("Unauthorized: User does not have permission to disable peer audio.", "1201");
19031
+ throw this.logger.error("Participants::unauthorized_disable_all_audio", { actions: { disableAllAudio: { allowUnmute: a } } }), new F("Unauthorized: User does not have permission to disable peer audio.", "1201");
19044
19032
  case 7:
19045
19033
  case "end":
19046
19034
  return s.stop();
@@ -19061,7 +19049,7 @@ var lu = /* @__PURE__ */ function(o) {
19061
19049
  i.next = 3;
19062
19050
  break;
19063
19051
  }
19064
- throw new j("Can`t disable all video without joining room", "1205");
19052
+ throw new F("Can`t disable all video without joining room", "1205");
19065
19053
  case 3:
19066
19054
  if (!l(this, ea)[ea].permissions.canAllowParticipantVideo) {
19067
19055
  i.next = 5;
@@ -19069,7 +19057,7 @@ var lu = /* @__PURE__ */ function(o) {
19069
19057
  }
19070
19058
  return i.abrupt("return", l(this, ho)[ho].muteAllVideo());
19071
19059
  case 5:
19072
- throw this.logger.error("Participants::unauthorized_disable_all_video"), new j("Unauthorized: User does not have permission to disable peer video.", "1201");
19060
+ throw this.logger.error("Participants::unauthorized_disable_all_video"), new F("Unauthorized: User does not have permission to disable peer video.", "1201");
19073
19061
  case 7:
19074
19062
  case "end":
19075
19063
  return i.stop();
@@ -19120,7 +19108,7 @@ var lu = /* @__PURE__ */ function(o) {
19120
19108
  for (; ; )
19121
19109
  switch (s.prev = s.next) {
19122
19110
  case 0:
19123
- return s.next = 2, l(this, me)[me].getValue("peerSessionStore").emitAsync(F.KICK_PEER, { peerId: a });
19111
+ return s.next = 2, l(this, me)[me].getValue("peerSessionStore").emitAsync(j.KICK_PEER, { peerId: a });
19124
19112
  case 2:
19125
19113
  case "end":
19126
19114
  return s.stop();
@@ -19142,13 +19130,13 @@ var lu = /* @__PURE__ */ function(o) {
19142
19130
  u.next = 4;
19143
19131
  break;
19144
19132
  }
19145
- throw new j("Can`t kick all without joining room", "1205");
19133
+ throw new F("Can`t kick all without joining room", "1205");
19146
19134
  case 4:
19147
19135
  if (l(this, ea)[ea].permissions.kickParticipant) {
19148
19136
  u.next = 7;
19149
19137
  break;
19150
19138
  }
19151
- throw this.logger.error("Participants::unauthorized_kick_all"), new j("Unauthorized: User does not have permission to kick peers.", "1201");
19139
+ throw this.logger.error("Participants::unauthorized_kick_all"), new F("Unauthorized: User does not have permission to kick peers.", "1201");
19152
19140
  case 7:
19153
19141
  i = l(this, me)[me].getValue("flagsmith").hasFeature(ye.PROPAGATE_KICK_ALL), l(this, wr)[wr].kickAll(i);
19154
19142
  case 9:
@@ -19172,13 +19160,13 @@ var lu = /* @__PURE__ */ function(o) {
19172
19160
  d.next = 3;
19173
19161
  break;
19174
19162
  }
19175
- throw new j("Can`t broadcast message without joining room", "1205");
19163
+ throw new F("Can`t broadcast message without joining room", "1205");
19176
19164
  case 3:
19177
19165
  if (a != null && a.trim()) {
19178
19166
  d.next = 5;
19179
19167
  break;
19180
19168
  }
19181
- throw new j("`type` must be a non-empty string.", "1209");
19169
+ throw new F("`type` must be a non-empty string.", "1209");
19182
19170
  case 5:
19183
19171
  if (!s) {
19184
19172
  d.next = 17;
@@ -19256,7 +19244,7 @@ var lu = /* @__PURE__ */ function(o) {
19256
19244
  d.next = 4;
19257
19245
  break;
19258
19246
  }
19259
- throw new j("Cannot update permissions, no valid userIDs found", "1204");
19247
+ throw new F("Cannot update permissions, no valid userIDs found", "1204");
19260
19248
  case 4:
19261
19249
  l(this, wr)[wr].updatePermissions(u, i);
19262
19250
  case 5:
@@ -19398,7 +19386,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
19398
19386
  key: "setupEvents",
19399
19387
  value: function() {
19400
19388
  var e = this;
19401
- this.roomSocketHandler.on(Q.getWaitingRoomRequests, this.waitingRoomRequestHandler.bind(this)), this.context.getValue("peerSessionStore").on(F.SOCKET_PEERS, /* @__PURE__ */ function() {
19389
+ this.roomSocketHandler.on(Q.getWaitingRoomRequests, this.waitingRoomRequestHandler.bind(this)), this.context.getValue("peerSessionStore").on(j.SOCKET_PEERS, /* @__PURE__ */ function() {
19402
19390
  var r = m(/* @__PURE__ */ h().mark(function n(a) {
19403
19391
  var i, s;
19404
19392
  return h().wrap(function(c) {
@@ -19437,18 +19425,18 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
19437
19425
  return e.onParticipantMediaJoined(v, f, g);
19438
19426
  });
19439
19427
  var u = a != null ? a : {}, c = u.audioPeers, d = u.compulsoryPeers;
19440
- i.pinnedPeerIds.length !== 0 && e.onParticipantPinned(i.pinnedPeerIds[0]), e.computeActivateParticipants(c != null ? c : [], d), e.logger.info("selfJoinComplete: Emitting UPDATE_ACTIVE with createAllConsumers=true"), e.context.getValue("peerSessionStore").emit(F.UPDATE_ACTIVE, { createAllConsumers: !0 });
19441
- }), this.context.getValue("peerSessionStore").on(F.MAX_SPATIAL_LAYER_CHANGE, function(r) {
19428
+ i.pinnedPeerIds.length !== 0 && e.onParticipantPinned(i.pinnedPeerIds[0]), e.computeActivateParticipants(c != null ? c : [], d), e.logger.info("selfJoinComplete: Emitting UPDATE_ACTIVE with createAllConsumers=true"), e.context.getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { createAllConsumers: !0 });
19429
+ }), this.context.getValue("peerSessionStore").on(j.MAX_SPATIAL_LAYER_CHANGE, function(r) {
19442
19430
  var n = r.peerId, a = r.maxSpatialLayer, i = e.videoPeerConsumerMap.get(n);
19443
19431
  i && (e.context.getValue("flagsmith").hasFeature(ye.DISABLE_LAYER_SWITCH) || (e.maxSpatialLayerUpdates.set(i, a), e.updateConsumerSpatialLayers()));
19444
- }), this.context.getValue("peerSessionStore").on(F.NEW_PRODUCER, function(r) {
19432
+ }), this.context.getValue("peerSessionStore").on(j.NEW_PRODUCER, function(r) {
19445
19433
  var n = r.peerId, a = r.producer, i = e.participants.joined.get(n);
19446
19434
  if (!i) {
19447
19435
  e.logger.warn("ParticipantController::NEW_PRODUCER::participant not found", { producer: { id: a == null ? void 0 : a.producerId, kind: a == null ? void 0 : a.kind, status: "not_initialized", appData: { screenShare: a == null ? void 0 : a.screenShare } }, participant: { id: n } });
19448
19436
  return;
19449
19437
  }
19450
19438
  i.producers.push(a), e.logger.info("ParticipantController::NEW_PRODUCER::producer_added_to_participant", { producer: { id: a == null ? void 0 : a.producerId, peerId: n, kind: a == null ? void 0 : a.kind, status: "not_initialized", appData: { screenShare: a == null ? void 0 : a.screenShare } } }), (a == null ? void 0 : a.kind) === "audio" && e.participants.audioSubscribed.get(n) || (a == null ? void 0 : a.kind) === "video" && e.participants.videoSubscribed.get(n) || a != null && a.screenShare ? (e.logger.info("NEW_PRODUCER: scheduling syncConsumer (AUTO mode) - Producer: ".concat(a.producerId, ", Peer: ").concat(n, ", Kind: ").concat(a.kind, ", ScreenShare: ").concat(a.screenShare, ", ConsumersSyncing: ").concat(l(e, rt)[rt], ", VideoSub: ").concat(a.kind === "video" ? e.participants.videoSubscribed.has(n) : "N/A", ", AudioSub: ").concat(a.kind === "audio" ? e.participants.audioSubscribed.has(n) : "N/A")), e.scheduleSyncConsumers({ source: "NEW_PRODUCER_AUTO" })) : e.logger.info("ParticipantController::NEW_PRODUCER::not_consuming_producer_auto", { producer: { id: a == null ? void 0 : a.producerId, peerId: n, kind: a == null ? void 0 : a.kind, status: "UNKNOWN", appData: { screenShare: a == null ? void 0 : a.screenShare } } });
19451
- }), this.context.getValue("peerSessionStore").on(F.PRODUCER_CLOSED, function(r) {
19439
+ }), this.context.getValue("peerSessionStore").on(j.PRODUCER_CLOSED, function(r) {
19452
19440
  var n = r.peerId, a = r.producerId, i = e.participants.joined.get(n);
19453
19441
  if (!i) {
19454
19442
  e.logger.warn("ParticipantController::NEW_PRODUCER::participant not found", { participant: { id: n } });
@@ -19457,14 +19445,14 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
19457
19445
  i.producers = i.producers.filter(function(s) {
19458
19446
  return s.producerId !== a;
19459
19447
  });
19460
- }), this.context.getValue("peerSessionStore").on(F.PRODUCER_TOGGLE, function(r) {
19448
+ }), this.context.getValue("peerSessionStore").on(j.PRODUCER_TOGGLE, function(r) {
19461
19449
  var n = r.peerId, a = r.producerId, i = r.paused, s = r.kind, u = e.participants.joined.get(n);
19462
19450
  if (u) {
19463
19451
  s === "audio" && u.setAudioEnabled(!i);
19464
19452
  var c = u.producers.find(function(d) {
19465
19453
  return d.producerId === a;
19466
19454
  });
19467
- c && (c.pause = i), s === "video" && e.context.getValue("peerSessionStore").emit(F.UPDATE_ACTIVE, { viewMode: e.participants.viewMode, page: e.participants.currentPage });
19455
+ c && (c.pause = i), s === "video" && e.context.getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: e.participants.viewMode, page: e.participants.currentPage });
19468
19456
  }
19469
19457
  }), this.roomSocketHandler.on(this.events.globalPeerPinBroadcast, function(r) {
19470
19458
  var n;
@@ -19744,7 +19732,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
19744
19732
  return u % 2 ? "*" : s;
19745
19733
  }).join("") } }), this.logger.info("onParticipantMediaJoined: peer ".concat(e, " has joined media room. Processing.")), r.forEach(function(s) {
19746
19734
  s.kind === la.AUDIO && !s.screenShare ? i.setAudioEnabled(!s.pause) : s.kind === la.VIDEO && !s.screenShare && (i.setVideoEnabled(!s.pause), a.updatePipSource(i.id, !s.pause)), i.producers.push(N(N({}, s), {}, { producingTransportId: s.producingTransportId, kind: s.kind === la.AUDIO ? "audio" : "video", producingPeerId: e, mimeType: s.mimeType }));
19747
- }), this.roomNodeClient.handlePeerCapabilities(e, n), this.context.getValue("flagsmith").hasFeature(ye.FORCE_VIDEO_CODEC) || this.roomNodeClient.shareWebcam(this.self.videoTrack), this.logger.info("onParticipantMediaJoined: Emitting UPDATE_ACTIVE for peer ".concat(e)), this.context.getValue("peerSessionStore").emit(F.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: this.participants.currentPage });
19735
+ }), this.roomNodeClient.handlePeerCapabilities(e, n), this.context.getValue("flagsmith").hasFeature(ye.FORCE_VIDEO_CODEC) || this.roomNodeClient.shareWebcam(this.self.videoTrack), this.logger.info("onParticipantMediaJoined: Emitting UPDATE_ACTIVE for peer ".concat(e)), this.context.getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: this.participants.currentPage });
19748
19736
  }
19749
19737
  }
19750
19738
  /**
@@ -19801,26 +19789,26 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
19801
19789
  }), this.roomSocketHandler.on(Q.leaveRoom, function(r) {
19802
19790
  var n = r.peer.peerId;
19803
19791
  e.selectedPeers.delete(n, e.context), e.onParticipantLeave(n);
19804
- }), this.context.getValue("peerSessionStore").on(F.SOCKET_SERVICE_ROOM_JOINED, function() {
19792
+ }), this.context.getValue("peerSessionStore").on(j.SOCKET_SERVICE_ROOM_JOINED, function() {
19805
19793
  e.self.permissions.acceptWaitingRequests && e.roomSocketHandler.getWaitingRoomRequests();
19806
19794
  }), this.self.permissions.on("permissionsUpdate", function(r) {
19807
19795
  var n = r.acceptWaitingRequests;
19808
19796
  n !== void 0 && (n ? e.roomSocketHandler.getWaitingRoomRequests() : e.participants.waitlisted.clear());
19809
- }), this.context.getValue("peerSessionStore").on(F.SOCKET_SERVICE_DISCONNECTED, function() {
19797
+ }), this.context.getValue("peerSessionStore").on(j.SOCKET_SERVICE_DISCONNECTED, function() {
19810
19798
  e.participants.joined.clear(), e.participants.videoSubscribed.clear(), e.participants.audioSubscribed.clear(), e.participants.pinned.clear(), e.participants.currentPage = 0, e.participants.viewMode = "ACTIVE_GRID", e.participants.emit("viewModeChanged", { viewMode: "ACTIVE_GRID", currentPage: e.participants.currentPage, pageCount: e.participants.pageCount });
19811
- }), this.context.getValue("peerSessionStore").on(F.CONSUMER_PAUSED, function(r) {
19799
+ }), this.context.getValue("peerSessionStore").on(j.CONSUMER_PAUSED, function(r) {
19812
19800
  var n = r.id;
19813
19801
  e.processConsumerPaused(n);
19814
- }), this.context.getValue("peerSessionStore").on(F.CONSUMER_RESUMED, function(r) {
19802
+ }), this.context.getValue("peerSessionStore").on(j.CONSUMER_RESUMED, function(r) {
19815
19803
  var n = r.id;
19816
19804
  e.processConsumerResumed(n);
19817
- }), this.context.getValue("peerSessionStore").on(F.NEW_CONSUMER, function(r) {
19805
+ }), this.context.getValue("peerSessionStore").on(j.NEW_CONSUMER, function(r) {
19818
19806
  var n = r.id;
19819
19807
  e.processNewConsumer(n);
19820
- }), this.context.getValue("peerSessionStore").on(F.CONSUMER_CLOSED, function(r) {
19808
+ }), this.context.getValue("peerSessionStore").on(j.CONSUMER_CLOSED, function(r) {
19821
19809
  var n = r.id;
19822
19810
  e.processConsumerClosed(n);
19823
- }), this.context.getValue("peerSessionStore").on(F.ROOM_MESSAGE, /* @__PURE__ */ function() {
19811
+ }), this.context.getValue("peerSessionStore").on(j.ROOM_MESSAGE, /* @__PURE__ */ function() {
19824
19812
  var r = m(/* @__PURE__ */ h().mark(function n(a) {
19825
19813
  var i, s, u;
19826
19814
  return h().wrap(function(d) {
@@ -19837,7 +19825,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
19837
19825
  return function(n) {
19838
19826
  return r.apply(this, arguments);
19839
19827
  };
19840
- }()), this.context.getValue("peerSessionStore").on(F.MESSAGE, /* @__PURE__ */ function() {
19828
+ }()), this.context.getValue("peerSessionStore").on(j.MESSAGE, /* @__PURE__ */ function() {
19841
19829
  var r = m(/* @__PURE__ */ h().mark(function n(a) {
19842
19830
  var i, s, u;
19843
19831
  return h().wrap(function(d) {
@@ -19860,13 +19848,13 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
19860
19848
  return function(n) {
19861
19849
  return r.apply(this, arguments);
19862
19850
  };
19863
- }()), this.context.getValue("peerSessionStore").on(F.LOW_CONSUMER_SCORE, function(r) {
19851
+ }()), this.context.getValue("peerSessionStore").on(j.LOW_CONSUMER_SCORE, function(r) {
19864
19852
  var n = r.peerId, a = r.score, i = r.kind, s = e.participants.joined.get(n);
19865
19853
  s && (s.emit("poorConnection", { score: a, kind: i }), e.participants.emit("poorConnection", { participantId: n, score: a, kind: i }));
19866
- }), this.context.getValue("peerSessionStore").on(F.CONSUMER_SCORE_UPDATE, function(r) {
19854
+ }), this.context.getValue("peerSessionStore").on(j.CONSUMER_SCORE_UPDATE, function(r) {
19867
19855
  var n, a = r.score, i = r.kind, s = r.appData, u = r.peerId, c = r.scoreStats, d = i === "video" && ((n = s == null ? void 0 : s.screenShare) !== null && n !== void 0 ? n : !1), p = e.participants.joined.get(u);
19868
19856
  p && (p.emit("mediaScoreUpdate", { kind: i, isScreenshare: d, score: a, participantId: u, scoreStats: c }), e.participants.emit("mediaScoreUpdate", { kind: i, isScreenshare: d, score: a, participantId: u, scoreStats: c }));
19869
- }), this.context.getValue("peerSessionStore").onAsync(F.KICK_PEER, /* @__PURE__ */ function() {
19857
+ }), this.context.getValue("peerSessionStore").onAsync(j.KICK_PEER, /* @__PURE__ */ function() {
19870
19858
  var r = m(/* @__PURE__ */ h().mark(function n(a) {
19871
19859
  var i, s;
19872
19860
  return h().wrap(function(c) {
@@ -19885,7 +19873,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
19885
19873
  return function(n) {
19886
19874
  return r.apply(this, arguments);
19887
19875
  };
19888
- }()), this.context.getValue("peerSessionStore").on(F.UPDATE_ACTIVE, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
19876
+ }()), this.context.getValue("peerSessionStore").on(j.UPDATE_ACTIVE, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
19889
19877
  var n, a, i, s, u = arguments;
19890
19878
  return h().wrap(function(d) {
19891
19879
  for (; ; )
@@ -19945,7 +19933,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
19945
19933
  for (; ; )
19946
19934
  switch (c.prev = c.next) {
19947
19935
  case 0:
19948
- this.logger.info("onParticipantSocketJoined: peer ".concat(n.id, " has joined socket edge. Processing.")), this.self.id !== n.id && !((a = n.flags) !== null && a !== void 0 && a.recorder) && !((i = n.flags) !== null && i !== void 0 && i.hidden_participant) && !((s = n.flags) !== null && s !== void 0 && s.hiddenParticipant) && (this.participants.videoSubscribed.delete(n.id), this.participants.audioSubscribed.delete(n.id), this.participants.joined.add(n), this.participants.waitlisted.delete(n.id), n.stageStatus === "REQUESTED_TO_JOIN_STAGE" && this.context.getValue("peerSessionStore").emit(F.UPDATE_STAGE_REQUESTS, { request: { displayName: n.name, userId: n.userId, peerId: n.id }, add: !0 })), this.context.getValue("peerSessionStore").emit(F.PEER_JOINED_INTERNAL, n);
19936
+ this.logger.info("onParticipantSocketJoined: peer ".concat(n.id, " has joined socket edge. Processing.")), this.self.id !== n.id && !((a = n.flags) !== null && a !== void 0 && a.recorder) && !((i = n.flags) !== null && i !== void 0 && i.hidden_participant) && !((s = n.flags) !== null && s !== void 0 && s.hiddenParticipant) && (this.participants.videoSubscribed.delete(n.id), this.participants.audioSubscribed.delete(n.id), this.participants.joined.add(n), this.participants.waitlisted.delete(n.id), n.stageStatus === "REQUESTED_TO_JOIN_STAGE" && this.context.getValue("peerSessionStore").emit(j.UPDATE_STAGE_REQUESTS, { request: { displayName: n.name, userId: n.userId, peerId: n.id }, add: !0 })), this.context.getValue("peerSessionStore").emit(j.PEER_JOINED_INTERNAL, n);
19949
19937
  case 3:
19950
19938
  case "end":
19951
19939
  return c.stop();
@@ -19963,7 +19951,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
19963
19951
  for (; ; )
19964
19952
  switch (d.prev = d.next) {
19965
19953
  case 0:
19966
- a = this.participants.joined.get(n), this.participants.joined.delete(n, !0, !0), this.participants.pinned.delete(n, !0, !0), this.participants.waitlisted.delete(n, !0, !0), this.roomNodeClient && (this.roomNodeClient.handlePeerLeaving(n), this.roomNodeClient.closeConsumers(a == null ? void 0 : a.producers)), a && a.stageStatus === "REQUESTED_TO_JOIN_STAGE" && this.context.getValue("peerSessionStore").emit(F.UPDATE_STAGE_REQUESTS, { request: { displayName: a.name, userId: a.userId, peerId: a.id }, add: !1 }), i = this.participants.currentPage, s = this.maxPreferredStreams * (i - 1), u = this.participants.videoSubscribed.get(n), this.participants.viewMode === "MANUAL" ? this.context.getValue("peerSessionStore").emit(F.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: i }) : s === 0 ? this.participants.setViewMode("ACTIVE_GRID") : this.participants.joined.size <= s ? i === 2 ? this.participants.setViewMode("ACTIVE_GRID") : this.participants.setPage(i - 1) : u && this.context.getValue("peerSessionStore").emit(F.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: i });
19954
+ a = this.participants.joined.get(n), this.participants.joined.delete(n, !0, !0), this.participants.pinned.delete(n, !0, !0), this.participants.waitlisted.delete(n, !0, !0), this.roomNodeClient && (this.roomNodeClient.handlePeerLeaving(n), this.roomNodeClient.closeConsumers(a == null ? void 0 : a.producers)), a && a.stageStatus === "REQUESTED_TO_JOIN_STAGE" && this.context.getValue("peerSessionStore").emit(j.UPDATE_STAGE_REQUESTS, { request: { displayName: a.name, userId: a.userId, peerId: a.id }, add: !1 }), i = this.participants.currentPage, s = this.maxPreferredStreams * (i - 1), u = this.participants.videoSubscribed.get(n), this.participants.viewMode === "MANUAL" ? this.context.getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: i }) : s === 0 ? this.participants.setViewMode("ACTIVE_GRID") : this.participants.joined.size <= s ? i === 2 ? this.participants.setViewMode("ACTIVE_GRID") : this.participants.setPage(i - 1) : u && this.context.getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: i });
19967
19955
  case 10:
19968
19956
  case "end":
19969
19957
  return d.stop();
@@ -19989,7 +19977,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
19989
19977
  p && (p.consumer = { id: e, peerId: a, kind: void 0, appData: s, paused: u, producerId: c, rtpReceiver: void 0, localId: void 0 });
19990
19978
  var v = [];
19991
19979
  s && s.screenShare ? (d.setScreenShareEnabled(!1), this.context.getValue("callstats").consumerSharedMediaState(e, { screen: !1 }), d.screenShareTracks.video && v.push(d.screenShareTracks.video.id), d.screenShareTracks.audio && v.push(d.screenShareTracks.audio.id), d.screenShareTracks = { audio: void 0, video: void 0 }) : i === "audio" ? (d.setAudioEnabled(!1), d.audioTrack && v.push(d.audioTrack.id), this.context.getValue("callstats").consumerSharedMediaState(e, { audio: !1 }), d.audioTrack = void 0) : i === "video" && (d.setVideoEnabled(!1), this.updatePipSource(d.id, !1), d.videoTrack && v.push(d.videoTrack.id), this.context.getValue("callstats").consumerSharedMediaState(e, { video: !1 }), d.videoTrack = void 0), s.e2ee && v.forEach(function(f) {
19992
- r.context.getValue("peerSessionStore").emit(F.E2EE_INACTIVE_CONSUMER, { peerId: a, trackId: f });
19980
+ r.context.getValue("peerSessionStore").emit(j.E2EE_INACTIVE_CONSUMER, { peerId: a, trackId: f });
19993
19981
  });
19994
19982
  }
19995
19983
  } }, { key: "processConsumerResumed", value: function(e) {
@@ -20001,7 +19989,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
20001
19989
  var f = v.producers.find(function(k) {
20002
19990
  return k.producerId === c;
20003
19991
  });
20004
- if (f && (f.consumer = { id: e, peerId: n, kind: a, appData: i, paused: u, producerId: c, rtpReceiver: d, localId: p }), i.e2ee && this.context.getValue("peerSessionStore").emit(F.E2EE_ACTIVE_CONSUMER, { peerId: n, rtpReceiver: d, track: s }), i.screenShare) {
19992
+ if (f && (f.consumer = { id: e, peerId: n, kind: a, appData: i, paused: u, producerId: c, rtpReceiver: d, localId: p }), i.e2ee && this.context.getValue("peerSessionStore").emit(j.E2EE_ACTIVE_CONSUMER, { peerId: n, rtpReceiver: d, track: s }), i.screenShare) {
20005
19993
  var g;
20006
19994
  a === "video" ? v.screenShareTracks.video = s : a === "audio" && (v.screenShareTracks.audio = s), v.setScreenShareEnabled(!0), (g = this.context) === null || g === void 0 || g.getValue("callstats").consumerSharedMediaState(e, { screen: !0 });
20007
19995
  return;
@@ -20019,7 +20007,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
20019
20007
  var f = v.producers.find(function(g) {
20020
20008
  return g.producerId === c;
20021
20009
  });
20022
- f && (f.consumer = { id: e, peerId: n, kind: a, appData: s, paused: u, producerId: c, rtpReceiver: d, localId: p }), i && s.e2ee && this.context.getValue("peerSessionStore").emit(F.E2EE_INACTIVE_CONSUMER, { peerId: n, trackId: i.id }), a === "video" ? (v.videoTrack = i, v.setVideoEnabled(!1), this.updatePipSource(v.id, !1), this.context.getValue("callstats").consumerSharedMediaState(e, { video: !1 })) : a === "audio" && (v.audioTrack = i, v.setAudioEnabled(v.audioEnabled), this.context.getValue("callstats").consumerSharedMediaState(e, { audio: v.audioEnabled }));
20010
+ f && (f.consumer = { id: e, peerId: n, kind: a, appData: s, paused: u, producerId: c, rtpReceiver: d, localId: p }), i && s.e2ee && this.context.getValue("peerSessionStore").emit(j.E2EE_INACTIVE_CONSUMER, { peerId: n, trackId: i.id }), a === "video" ? (v.videoTrack = i, v.setVideoEnabled(!1), this.updatePipSource(v.id, !1), this.context.getValue("callstats").consumerSharedMediaState(e, { video: !1 })) : a === "audio" && (v.audioTrack = i, v.setAudioEnabled(v.audioEnabled), this.context.getValue("callstats").consumerSharedMediaState(e, { audio: v.audioEnabled }));
20023
20011
  }
20024
20012
  }
20025
20013
  } }, { key: "processNewConsumer", value: function(e) {
@@ -20035,7 +20023,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
20035
20023
  a === "video" ? v.screenShareTracks.video = s : a === "audio" && (v.screenShareTracks.audio = s), (!i || this.self.permissions.isRecorder || this.context.getValue("flagsmith").hasFeature(ye.SCREEENSHARE_ERR_HACK)) && v.setScreenShareEnabled(!0), u.supportsRemoteControl && (v.supportsRemoteControl = !0), this.participants.broadcastMessage("screenshareConsumerCreated", { producerId: c, peerId: n, screenShare: !0, consumerId: e, consumerPeerId: this.self.id }), this.logger.info("ParticipantController::newScreenshareConsumer::screenshareConsumerCreated", { consumer: { id: e, peerId: n, kind: a, remotelyPaused: i, appData: u, producerId: c } });
20036
20024
  return;
20037
20025
  }
20038
- a === "video" ? (v.videoTrack = s, i || (v.setVideoEnabled(!0), this.updatePipSource(v.id, !0)), this.context.getValue("callstats").consumerSharedMediaState(e, { video: !i })) : a === "audio" && (v.audioTrack = s, i || v.setAudioEnabled(!0), this.context.getValue("callstats").consumerSharedMediaState(e, { audio: !i })), !i && u.e2ee && this.context.getValue("peerSessionStore").emit(F.E2EE_ACTIVE_CONSUMER, { peerId: n, rtpReceiver: d, track: s });
20026
+ a === "video" ? (v.videoTrack = s, i || (v.setVideoEnabled(!0), this.updatePipSource(v.id, !0)), this.context.getValue("callstats").consumerSharedMediaState(e, { video: !i })) : a === "audio" && (v.audioTrack = s, i || v.setAudioEnabled(!0), this.context.getValue("callstats").consumerSharedMediaState(e, { audio: !i })), !i && u.e2ee && this.context.getValue("peerSessionStore").emit(j.E2EE_ACTIVE_CONSUMER, { peerId: n, rtpReceiver: d, track: s });
20039
20027
  }
20040
20028
  }
20041
20029
  } }, { key: "onSelectedPeers", value: (
@@ -20079,7 +20067,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
20079
20067
  peerId: a,
20080
20068
  volume: 1
20081
20069
  // priority
20082
- })), n && this.context.getValue("peerSessionStore").emit(F.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: this.participants.currentPage });
20070
+ })), n && this.context.getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: this.participants.currentPage });
20083
20071
  }
20084
20072
  } }], [{ key: "formatSocketPeerMessage", value: function(e) {
20085
20073
  var r, n, a, i, s, u;
@@ -20122,13 +20110,13 @@ var ar = Un(Np().permissions), G = /* @__PURE__ */ C("permissions"), gs = /* @__
20122
20110
  }
20123
20111
  v && (yi(l(a, G)[G].plugins, v), a.emit("pluginsUpdate")), f && (yi(l(a, G)[G].polls, f), a.emit("pollsUpdate")), Object.keys(k).length !== 0 && yi(l(a, G)[G], k), a.emit("permissionsUpdate", c);
20124
20112
  } }), !r)
20125
- throw a.logger.error("PermissionPreset::load_preset_permissions_failed"), new j("Could not load preset permissions.", "0904");
20113
+ throw a.logger.error("PermissionPreset::load_preset_permissions_failed"), new F("Could not load preset permissions.", "0904");
20126
20114
  return l(a, Ms)[Ms] = e, l(a, gs)[gs] = n, l(a, G)[G] = r, i && a.setupEvents(), a;
20127
20115
  }
20128
20116
  return A(t, o), S(t, [{
20129
20117
  key: "setupEvents",
20130
20118
  value: function() {
20131
- l(this, Ms)[Ms].getValue("peerSessionStore").on(F.UPDATE_PERMISSIONS, l(this, rd)[rd]);
20119
+ l(this, Ms)[Ms].getValue("peerSessionStore").on(j.UPDATE_PERMISSIONS, l(this, rd)[rd]);
20132
20120
  }
20133
20121
  /** @deprecated. Use init() */
20134
20122
  }, {
@@ -20559,7 +20547,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
20559
20547
  if (u = function(b, E) {
20560
20548
  a.mediaPermissions[b] = E;
20561
20549
  var T = { message: a.mediaPermissions[b], kind: b };
20562
- E === "DENIED" ? l(a, jr)[jr].getValue("peerSessionStore").emit(F.MEDIA_PERMISSION_ERROR, T) : l(a, jr)[jr].getValue("peerSessionStore").emit(F.MEDIA_PERMISSION_UPDATE, T);
20550
+ E === "DENIED" ? l(a, jr)[jr].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_ERROR, T) : l(a, jr)[jr].getValue("peerSessionStore").emit(j.MEDIA_PERMISSION_UPDATE, T);
20563
20551
  }, br.getName() !== "firefox") {
20564
20552
  k.next = 3;
20565
20553
  break;
@@ -20670,7 +20658,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
20670
20658
  case 21:
20671
20659
  this.localMediaHandler = new Nt(u, i.constraints, u == null || (f = u.getValue("defaults")) === null || f === void 0 ? void 0 : f.isNonPreferredDevice, u == null || (g = u.getValue("defaults")) === null || g === void 0 ? void 0 : g.autoSwitchAudioDevice);
20672
20660
  case 22:
20673
- if (u == null || u.getValue("peerSessionStore").on(F.MEDIA_PERMISSION_UPDATE, /* @__PURE__ */ function() {
20661
+ if (u == null || u.getValue("peerSessionStore").on(j.MEDIA_PERMISSION_UPDATE, /* @__PURE__ */ function() {
20674
20662
  var _ = m(/* @__PURE__ */ h().mark(function V(U) {
20675
20663
  return h().wrap(function(L) {
20676
20664
  for (; ; )
@@ -20699,7 +20687,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
20699
20687
  return function(V) {
20700
20688
  return _.apply(this, arguments);
20701
20689
  };
20702
- }()), u == null || u.getValue("peerSessionStore").on(F.MEDIA_PERMISSION_ERROR, /* @__PURE__ */ function() {
20690
+ }()), u == null || u.getValue("peerSessionStore").on(j.MEDIA_PERMISSION_ERROR, /* @__PURE__ */ function() {
20703
20691
  var _ = m(/* @__PURE__ */ h().mark(function V(U) {
20704
20692
  var $, L, H;
20705
20693
  return h().wrap(function(q) {
@@ -21423,7 +21411,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
21423
21411
  */
21424
21412
  function(r) {
21425
21413
  if (!r)
21426
- throw new j("Name cannot be empty.", "1103");
21414
+ throw new F("Name cannot be empty.", "1103");
21427
21415
  this.name = r;
21428
21416
  }
21429
21417
  ) }, { key: "setupTracks", value: function() {
@@ -21610,7 +21598,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
21610
21598
  s.next = 2;
21611
21599
  break;
21612
21600
  }
21613
- throw new j("Unsupported", "1102");
21601
+ throw new F("Unsupported", "1102");
21614
21602
  case 2:
21615
21603
  return s.next = 4, this.localMediaHandler.updateVideoConstraints(a);
21616
21604
  case 4:
@@ -21633,7 +21621,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
21633
21621
  i.next = 2;
21634
21622
  break;
21635
21623
  }
21636
- throw new j("Can`t enable screenshare without joining room", "1105");
21624
+ throw new F("Can`t enable screenshare without joining room", "1105");
21637
21625
  case 2:
21638
21626
  if (l(this, ur)[ur].canProduceScreenshare !== te.NotAllowed) {
21639
21627
  i.next = 4;
@@ -21691,7 +21679,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
21691
21679
  s.next = 2;
21692
21680
  break;
21693
21681
  }
21694
- throw new j("Unsupported", "1102");
21682
+ throw new F("Unsupported", "1102");
21695
21683
  case 2:
21696
21684
  return s.next = 4, this.localMediaHandler.updateScreenshareConstraints(a);
21697
21685
  case 4:
@@ -21836,7 +21824,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
21836
21824
  i.next = 2;
21837
21825
  break;
21838
21826
  }
21839
- throw new j("Can`t pin participants without joining room", "1105");
21827
+ throw new F("Can`t pin participants without joining room", "1105");
21840
21828
  case 2:
21841
21829
  return this.show(), i.abrupt("return", l(this, Ve)[Ve].pinPeer(this.id));
21842
21830
  case 4:
@@ -21859,7 +21847,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
21859
21847
  i.next = 2;
21860
21848
  break;
21861
21849
  }
21862
- throw new j("Can`t unpin participants without joining room", "1105");
21850
+ throw new F("Can`t unpin participants without joining room", "1105");
21863
21851
  case 2:
21864
21852
  return i.abrupt("return", l(this, Ve)[Ve].pinPeer(null));
21865
21853
  case 3:
@@ -21882,7 +21870,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
21882
21870
  i.next = 2;
21883
21871
  break;
21884
21872
  }
21885
- throw new j("Can`t toggle participant tile without joining room", "1105");
21873
+ throw new F("Can`t toggle participant tile without joining room", "1105");
21886
21874
  case 2:
21887
21875
  this.hidden = !0, this.emit("toggleTile", { hidden: this.hidden });
21888
21876
  case 4:
@@ -21897,7 +21885,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
21897
21885
  return r;
21898
21886
  }() }, { key: "show", value: function() {
21899
21887
  if (!l(this, Me)[Me])
21900
- throw new j("Can`t toggle participant tile without joining room", "1105");
21888
+ throw new F("Can`t toggle participant tile without joining room", "1105");
21901
21889
  this.hidden = !1, this.emit("toggleTile", { hidden: this.hidden });
21902
21890
  } }, { key: "setDevice", value: function() {
21903
21891
  var e = m(/* @__PURE__ */ h().mark(function n(a) {
@@ -21910,7 +21898,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
21910
21898
  p.next = 2;
21911
21899
  break;
21912
21900
  }
21913
- throw new j("No device selected", "1104");
21901
+ throw new F("No device selected", "1104");
21914
21902
  case 2:
21915
21903
  if (c = this.getCurrentDevices(), !(a.deviceId && ((c == null || (i = c.audio) === null || i === void 0 ? void 0 : i.deviceId) === a.deviceId || (c == null || (s = c.video) === null || s === void 0 ? void 0 : s.deviceId) === a.deviceId || (c == null || (u = c.speaker) === null || u === void 0 ? void 0 : u.deviceId) === a.deviceId))) {
21916
21904
  p.next = 7;
@@ -21920,7 +21908,7 @@ var jr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
21920
21908
  p.next = 7;
21921
21909
  break;
21922
21910
  }
21923
- throw new j("Cannot set device currently in use", "1106");
21911
+ throw new F("Cannot set device currently in use", "1106");
21924
21912
  case 7:
21925
21913
  p.t0 = a.kind, p.next = p.t0 === "audioinput" ? 10 : p.t0 === "audiooutput" ? 22 : p.t0 === "videoinput" ? 25 : 37;
21926
21914
  break;
@@ -22204,19 +22192,19 @@ var qd = /* @__PURE__ */ function(o) {
22204
22192
  return P(this, t), r = R(this, t, [e]), r.name = "UnsupportedError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(r, t) : r.stack = new Error(e).stack, r;
22205
22193
  }
22206
22194
  return A(t, o), S(t);
22207
- }(j), kn = /* @__PURE__ */ function(o) {
22195
+ }(F), kn = /* @__PURE__ */ function(o) {
22208
22196
  function t(e) {
22209
22197
  var r;
22210
22198
  return P(this, t), r = R(this, t, [e]), r.name = "InvalidStateError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(r, t) : r.stack = new Error(e).stack, r;
22211
22199
  }
22212
22200
  return A(t, o), S(t);
22213
- }(j), qs = /* @__PURE__ */ function(o) {
22201
+ }(F), qs = /* @__PURE__ */ function(o) {
22214
22202
  function t(e) {
22215
22203
  var r;
22216
22204
  return P(this, t), r = R(this, t, [e]), r.name = "TransportConnectionError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(r, kn) : r.stack = new Error(e).stack, r;
22217
22205
  }
22218
22206
  return A(t, o), S(t);
22219
- }(j), yv = function(t) {
22207
+ }(F), yv = function(t) {
22220
22208
  return new Promise(function(e) {
22221
22209
  return setTimeout(e, t);
22222
22210
  });
@@ -24887,9 +24875,9 @@ function ep() {
24887
24875
  n.t0 = t, n.next = n.t0 === "send" ? 9 : n.t0 === "recv" ? 12 : 15;
24888
24876
  break;
24889
24877
  case 9:
24890
- return this.logger.info("Transport reconnected", { transport: l(this, sr)[sr] }), this.context.getValue("peerSessionStore").emit(F.RESET_PRODUCER_STATE), n.abrupt("break", 16);
24878
+ return this.logger.info("Transport reconnected", { transport: l(this, sr)[sr] }), this.context.getValue("peerSessionStore").emit(j.RESET_PRODUCER_STATE), n.abrupt("break", 16);
24891
24879
  case 12:
24892
- return this.logger.info("Transport reconnected", { transport: l(this, or)[or] }), this.context.getValue("peerSessionStore").emit(F.UPDATE_ACTIVE, { createAllConsumers: !0 }), n.abrupt("break", 16);
24880
+ return this.logger.info("Transport reconnected", { transport: l(this, or)[or] }), this.context.getValue("peerSessionStore").emit(j.UPDATE_ACTIVE, { createAllConsumers: !0 }), n.abrupt("break", 16);
24893
24881
  case 15:
24894
24882
  this.logger.warn("Unknown transport direction", { transport: { type: t } });
24895
24883
  case 16:
@@ -24903,7 +24891,7 @@ function ep() {
24903
24891
  }
24904
24892
  function dO(o) {
24905
24893
  var t = o.state, e = o.direction;
24906
- l(this, Ns)[Ns].mediaState[e] = { state: t }, this.context.getValue("peerSessionStore").emit(F.TRANSPORT_STATE_UPDATE, N({ transport: e }, l(this, Ns)[Ns].mediaState[e]));
24894
+ l(this, Ns)[Ns].mediaState[e] = { state: t }, this.context.getValue("peerSessionStore").emit(j.TRANSPORT_STATE_UPDATE, N({ transport: e }, l(this, Ns)[Ns].mediaState[e]));
24907
24895
  }
24908
24896
  var yu = /* @__PURE__ */ C("context"), xr = /* @__PURE__ */ C("logger"), pO = /* @__PURE__ */ function() {
24909
24897
  function o(t, e, r, n, a) {
@@ -25152,7 +25140,7 @@ var yu = /* @__PURE__ */ C("context"), xr = /* @__PURE__ */ C("logger"), pO = /*
25152
25140
  case 2:
25153
25141
  return d.prev = 2, d.next = 5, this.sendTransport.produce(a, l(this, ld)[ld].bind(this));
25154
25142
  case 5:
25155
- return u = d.sent, (s = a.appData) !== null && s !== void 0 && s.e2ee && this.context.getValue("peerSessionStore").emit(F.E2EE_ACTIVE_PRODUCER, u), l(this, cd)[cd](u, i), d.abrupt("return", u);
25143
+ return u = d.sent, (s = a.appData) !== null && s !== void 0 && s.e2ee && this.context.getValue("peerSessionStore").emit(j.E2EE_ACTIVE_PRODUCER, u), l(this, cd)[cd](u, i), d.abrupt("return", u);
25156
25144
  case 11:
25157
25145
  throw d.prev = 11, d.t0 = d.catch(2), this.logger.error("Failed to create producer", { error: d.t0 }), l(this, ud)[ud].producerCreationFailureCount += 1, d.t0;
25158
25146
  case 16:
@@ -25180,7 +25168,7 @@ var yu = /* @__PURE__ */ C("context"), xr = /* @__PURE__ */ C("logger"), pO = /*
25180
25168
  case 4:
25181
25169
  return i != null && i.stopTrack && s.track.stop(), d.prev = 5, d.next = 8, this.sendTransport.closeProducer(s);
25182
25170
  case 8:
25183
- (u = this.context.getValue("modules").e2ee) !== null && u !== void 0 && u.enabled && this.context.getValue("peerSessionStore").emit(F.E2EE_INACTIVE_PRODUCER, s), d.next = 14;
25171
+ (u = this.context.getValue("modules").e2ee) !== null && u !== void 0 && u.enabled && this.context.getValue("peerSessionStore").emit(j.E2EE_INACTIVE_PRODUCER, s), d.next = 14;
25184
25172
  break;
25185
25173
  case 11:
25186
25174
  d.prev = 11, d.t0 = d.catch(5), this.logger.error("Failed to close producer on server", { error: d.t0, producer: s });
@@ -25399,7 +25387,7 @@ function kO(o) {
25399
25387
  for (; ; )
25400
25388
  switch (i.prev = i.next) {
25401
25389
  case 0:
25402
- t.logger.debug("consumer closed", { consumer: { closureReason: n, id: o.id, kind: o.kind, appData: o.appData } }), l(t, $n)[$n].delete(o.id), t.context.getValue("peerSessionStore").emit(F.CONSUMER_CLOSED, { id: o.id });
25390
+ t.logger.debug("consumer closed", { consumer: { closureReason: n, id: o.id, kind: o.kind, appData: o.appData } }), l(t, $n)[$n].delete(o.id), t.context.getValue("peerSessionStore").emit(j.CONSUMER_CLOSED, { id: o.id });
25403
25391
  case 3:
25404
25392
  case "end":
25405
25393
  return i.stop();
@@ -25409,7 +25397,7 @@ function kO(o) {
25409
25397
  return function(r) {
25410
25398
  return e.apply(this, arguments);
25411
25399
  };
25412
- }()), l(this, $n)[$n].set(o.id, o), this.producerIdToConsumerIdMap.set(o.producerId, o.id), this.context.getValue("peerSessionStore").emit(F.NEW_CONSUMER, { id: o.id, appData: o.appData, peerId: o.peerId });
25400
+ }()), l(this, $n)[$n].set(o.id, o), this.producerIdToConsumerIdMap.set(o.producerId, o.id), this.context.getValue("peerSessionStore").emit(j.NEW_CONSUMER, { id: o.id, appData: o.appData, peerId: o.peerId });
25413
25401
  }
25414
25402
  var ku = /* @__PURE__ */ C("zeroCrossingThreshold"), bu = /* @__PURE__ */ C("minVoiceDuration"), Tu = /* @__PURE__ */ C("hangoverFrames"), Ts = /* @__PURE__ */ C("initialEnergyThreshold"), Vs = /* @__PURE__ */ C("noiseAdaptationRate"), Us = /* @__PURE__ */ C("voiceAdaptationRate"), Vu = /* @__PURE__ */ C("minEnergyThreshold"), Uu = /* @__PURE__ */ C("maxEnergyThreshold"), ws = /* @__PURE__ */ C("energyRatioThreshold"), Mr = /* @__PURE__ */ C("currentEnergyThreshold"), dt = /* @__PURE__ */ C("backgroundNoiseEnergy"), ct = /* @__PURE__ */ C("voiceDetected"), Ea = /* @__PURE__ */ C("consecutiveVoiceFrames"), Ca = /* @__PURE__ */ C("hangoverCount"), en = /* @__PURE__ */ C("noiseEnergyHistory"), ju = /* @__PURE__ */ C("noiseHistorySize"), dd = /* @__PURE__ */ C("updateEnergyThreshold"), pd = /* @__PURE__ */ C("updateNoiseEstimate"), ip = /* @__PURE__ */ C("calculateEnergy"), sp = /* @__PURE__ */ C("calculateZeroCrossingRate"), Yp = /* @__PURE__ */ function() {
25415
25403
  function o() {
@@ -25714,7 +25702,7 @@ var _O = function() {
25714
25702
  case 2:
25715
25703
  return p.next = 4, a.joinRoom(l(a, Ro)[Ro], l(a, Co)[Co], !0, !0);
25716
25704
  case 4:
25717
- u = p.sent, c = u.roomJoined, c && (a.context.getValue("peerSessionStore").emit(F.RESET_PRODUCER_STATE), a.context.getValue("peerSessionStore").emit(F.ROOM_NODE_RECONNECTED));
25705
+ u = p.sent, c = u.roomJoined, c && (a.context.getValue("peerSessionStore").emit(j.RESET_PRODUCER_STATE), a.context.getValue("peerSessionStore").emit(j.ROOM_NODE_RECONNECTED));
25718
25706
  case 7:
25719
25707
  case "end":
25720
25708
  return p.stop();
@@ -25761,7 +25749,7 @@ var _O = function() {
25761
25749
  case 9:
25762
25750
  return d = f.sent, f.abrupt("return", d);
25763
25751
  case 13:
25764
- return f.prev = 13, f.t0 = f.catch(6), this.logger.error("Error in room joining process", { error: f.t0 }), this.context.getValue("peerSessionStore").emit(F.ROOM_NODE_FAILED), f.abrupt("return", { roomJoined: !1 });
25752
+ return f.prev = 13, f.t0 = f.catch(6), this.logger.error("Error in room joining process", { error: f.t0 }), this.context.getValue("peerSessionStore").emit(j.ROOM_NODE_FAILED), f.abrupt("return", { roomJoined: !1 });
25765
25753
  case 18:
25766
25754
  case "end":
25767
25755
  return f.stop();
@@ -26088,7 +26076,7 @@ var _O = function() {
26088
26076
  f.next = 33;
26089
26077
  break;
26090
26078
  case 30:
26091
- throw f.prev = 30, f.t0 = f.catch(0), new j(f.t0);
26079
+ throw f.prev = 30, f.t0 = f.catch(0), new F(f.t0);
26092
26080
  case 33:
26093
26081
  case "end":
26094
26082
  return f.stop();
@@ -26183,7 +26171,7 @@ var _O = function() {
26183
26171
  }
26184
26172
  return this.logger.info("resumeMic::mic_producer_already_resumed"), u.abrupt("return");
26185
26173
  case 10:
26186
- a.resume(), a.appData.e2ee && this.context.getValue("peerSessionStore").emit(F.E2EE_ACTIVE_PRODUCER, a), i = { producerId: a.id, pause: !1 }, l(this, Xe)[Xe].sendMessage(l(this, lr)[lr].toggleProducer, Sl.toBinary(i));
26174
+ a.resume(), a.appData.e2ee && this.context.getValue("peerSessionStore").emit(j.E2EE_ACTIVE_PRODUCER, a), i = { producerId: a.id, pause: !1 }, l(this, Xe)[Xe].sendMessage(l(this, lr)[lr].toggleProducer, Sl.toBinary(i));
26187
26175
  case 14:
26188
26176
  case "end":
26189
26177
  return u.stop();
@@ -26215,7 +26203,7 @@ var _O = function() {
26215
26203
  }
26216
26204
  return this.logger.info("resumeWebcam::webcam_producer_already_resumed"), d.abrupt("return");
26217
26205
  case 11:
26218
- i.resume(), i.appData.e2ee && this.context.getValue("peerSessionStore").emit(F.E2EE_ACTIVE_PRODUCER, i), s = { producerId: i.id, pause: !1 }, l(this, Xe)[Xe].sendMessage(l(this, lr)[lr].toggleProducer, Sl.toBinary(s));
26206
+ i.resume(), i.appData.e2ee && this.context.getValue("peerSessionStore").emit(j.E2EE_ACTIVE_PRODUCER, i), s = { producerId: i.id, pause: !1 }, l(this, Xe)[Xe].sendMessage(l(this, lr)[lr].toggleProducer, Sl.toBinary(s));
26219
26207
  case 15:
26220
26208
  case "end":
26221
26209
  return d.stop();
@@ -26567,7 +26555,7 @@ var _O = function() {
26567
26555
  return;
26568
26556
  }
26569
26557
  }
26570
- n.logger.info("producer created broadcast: ".concat(d, ", producer state: ").concat(p)), n.context.getValue("peerSessionStore").emit(F.NEW_PRODUCER, { peerId: d, producer: N(N({}, p), {}, { kind: p.kind === la.AUDIO ? "audio" : "video", producingPeerId: d }) });
26558
+ n.logger.info("producer created broadcast: ".concat(d, ", producer state: ").concat(p)), n.context.getValue("peerSessionStore").emit(j.NEW_PRODUCER, { peerId: d, producer: N(N({}, p), {}, { kind: p.kind === la.AUDIO ? "audio" : "video", producingPeerId: d }) });
26571
26559
  } catch (f) {
26572
26560
  n.logger.error("error in peer-producer-create-broadcast", { error: f });
26573
26561
  }
@@ -26579,14 +26567,14 @@ var _O = function() {
26579
26567
  if (y)
26580
26568
  return;
26581
26569
  var b = f === la.AUDIO ? "audio" : "video";
26582
- if (n.logger.info("producer toggle broadcast: ".concat(d, ", producerId: ").concat(k, ", kind:").concat(b, ", paused:").concat(g, " payload: ").concat(JSON.stringify(zh.fromBinary(u)))), d === n.peerId && p !== n.peerId && g && n.context.getValue("peerSessionStore").emit(b === "audio" ? F.MUTE_SELF : F.MUTE_SELF_VIDEO), d === n.peerId)
26570
+ if (n.logger.info("producer toggle broadcast: ".concat(d, ", producerId: ").concat(k, ", kind:").concat(b, ", paused:").concat(g, " payload: ").concat(JSON.stringify(zh.fromBinary(u)))), d === n.peerId && p !== n.peerId && g && n.context.getValue("peerSessionStore").emit(b === "audio" ? j.MUTE_SELF : j.MUTE_SELF_VIDEO), d === n.peerId)
26583
26571
  return;
26584
- n.context.getValue("peerSessionStore").emit(F.PRODUCER_TOGGLE, { peerId: d, producerId: k, paused: g, kind: b });
26572
+ n.context.getValue("peerSessionStore").emit(j.PRODUCER_TOGGLE, { peerId: d, producerId: k, paused: g, kind: b });
26585
26573
  var E = Array.from(n.getConsumers().values()).filter(function(T) {
26586
26574
  return T.producerId === k;
26587
26575
  });
26588
26576
  E.forEach(function(T) {
26589
- T.kind === "video" && g || T.paused !== g && (n.logger.debug("consumer state mismatched for ".concat(T.id, ". updating consumer pause state ").concat(T.paused, " to ").concat(g)), g ? (T.pause(), n.context.getValue("peerSessionStore").emit(F.CONSUMER_PAUSED, { id: T.id })) : (T.resume(), n.context.getValue("peerSessionStore").emit(F.CONSUMER_RESUMED, { id: T.id })));
26577
+ T.kind === "video" && g || T.paused !== g && (n.logger.debug("consumer state mismatched for ".concat(T.id, ". updating consumer pause state ").concat(T.paused, " to ").concat(g)), g ? (T.pause(), n.context.getValue("peerSessionStore").emit(j.CONSUMER_PAUSED, { id: T.id })) : (T.resume(), n.context.getValue("peerSessionStore").emit(j.CONSUMER_RESUMED, { id: T.id })));
26590
26578
  });
26591
26579
  } catch (T) {
26592
26580
  n.logger.error("error in producer toggle broadcast handler", { error: T });
@@ -26600,7 +26588,7 @@ var _O = function() {
26600
26588
  return;
26601
26589
  n.logger.info("peer left broadcast:".concat(d)), l(n, Dt)[Dt].delete(d), l(n, W)[W].consumers.forEach(function(p) {
26602
26590
  p.peerId === d && p.close();
26603
- }), n.context.getValue("peerSessionStore").emit(F.PEER_CLOSED, { id: d });
26591
+ }), n.context.getValue("peerSessionStore").emit(j.PEER_CLOSED, { id: d });
26604
26592
  } catch (p) {
26605
26593
  n.logger.error("error in peer left broadcast", { error: p });
26606
26594
  }
@@ -26611,14 +26599,14 @@ var _O = function() {
26611
26599
  var c = HE.fromBinary(u), d = c.participantId, p = c.producerState.producerId;
26612
26600
  if (d === n.peerId)
26613
26601
  return;
26614
- n.logger.info("producer closed broadcast:".concat(d)), n.context.getValue("peerSessionStore").emit(F.PRODUCER_CLOSED, { peerId: d, producerId: p });
26602
+ n.logger.info("producer closed broadcast:".concat(d)), n.context.getValue("peerSessionStore").emit(j.PRODUCER_CLOSED, { peerId: d, producerId: p });
26615
26603
  var v = l(n, W)[W].producerIdToConsumerIdMap.get(p);
26616
26604
  if (!v) {
26617
26605
  n.logger.warn("no consumer found for producer:".concat(p));
26618
26606
  return;
26619
26607
  }
26620
26608
  n.logger.info("closing consumer ".concat(v, ", producer id: ").concat(p)), l(n, W)[W].closeConsumer(v).then(function() {
26621
- n.logger.info("closed consumer: ".concat(v)), l(n, W)[W].producerIdToConsumerIdMap.delete(p), n.context.getValue("peerSessionStore").emit(F.CONSUMER_CLOSED, { id: v });
26609
+ n.logger.info("closed consumer: ".concat(v)), l(n, W)[W].producerIdToConsumerIdMap.delete(p), n.context.getValue("peerSessionStore").emit(j.CONSUMER_CLOSED, { id: v });
26622
26610
  }).catch(function(f) {
26623
26611
  n.logger.error("error closing consumer", { error: f });
26624
26612
  });
@@ -26626,7 +26614,7 @@ var _O = function() {
26626
26614
  n.logger.error("error on producer close broadcast", { error: f });
26627
26615
  }
26628
26616
  }), l(this, Xe)[Xe].on(l(this, lr)[lr].mediaRoomTerminationBroadcastResponse, function() {
26629
- !n.mediaJoined && !l(n, oa)[oa] && !l(n, ua)[ua] || (n.logger.warn("media hub termination broadcast received, rejoining room"), n.context.getValue("peerSessionStore").emit(F.ROOM_NODE_DISCONNECTED), l(n, fo)[fo]());
26617
+ !n.mediaJoined && !l(n, oa)[oa] && !l(n, ua)[ua] || (n.logger.warn("media hub termination broadcast received, rejoining room"), n.context.getValue("peerSessionStore").emit(j.ROOM_NODE_DISCONNECTED), l(n, fo)[fo]());
26630
26618
  });
26631
26619
  case 5:
26632
26620
  case "end":
@@ -26643,14 +26631,14 @@ var _O = function() {
26643
26631
  this.context.getValue("callstats").onConsumerScore(function(r) {
26644
26632
  r.forEach(function(n, a) {
26645
26633
  var i = l(e, W)[W].consumers.get(a);
26646
- i && e.context.getValue("peerSessionStore").emit(F.CONSUMER_SCORE_UPDATE, { id: a, kind: i.kind, peerId: i.peerId, score: n.score, scoreStats: n });
26634
+ i && e.context.getValue("peerSessionStore").emit(j.CONSUMER_SCORE_UPDATE, { id: a, kind: i.kind, peerId: i.peerId, score: n.score, scoreStats: n });
26647
26635
  });
26648
26636
  }), this.context.getValue("callstats").onProducerScore(function(r) {
26649
26637
  r.forEach(function(n, a) {
26650
26638
  var i = Array.from(l(e, W)[W].producers.values()).find(function(s) {
26651
26639
  return s.id === a;
26652
26640
  });
26653
- i && e.context.getValue("peerSessionStore").emit(F.PRODUCER_SCORE_UPDATE, { id: a, kind: i.kind, appData: i.appData, score: n.score, scoreStats: n });
26641
+ i && e.context.getValue("peerSessionStore").emit(j.PRODUCER_SCORE_UPDATE, { id: a, kind: i.kind, appData: i.appData, score: n.score, scoreStats: n });
26654
26642
  });
26655
26643
  });
26656
26644
  } }, { key: "handlePeerCapabilities", value: function(e, r) {
@@ -27084,7 +27072,7 @@ var YO = Object.defineProperty, QO = Object.getOwnPropertyDescriptor, ao = funct
27084
27072
  return e;
27085
27073
  }() }, { key: "setupEvents", value: function() {
27086
27074
  var e = this;
27087
- l(this, Z)[Z].getValue("peerSessionStore").on(F.RESET_PRODUCER_STATE, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
27075
+ l(this, Z)[Z].getValue("peerSessionStore").on(j.RESET_PRODUCER_STATE, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
27088
27076
  return h().wrap(function(a) {
27089
27077
  for (; ; )
27090
27078
  switch (a.prev = a.next) {
@@ -27101,16 +27089,16 @@ var YO = Object.defineProperty, QO = Object.getOwnPropertyDescriptor, ao = funct
27101
27089
  return a.stop();
27102
27090
  }
27103
27091
  }, r);
27104
- }))), l(this, Z)[Z].getValue("peerSessionStore").on(F.ROOM_NODE_RECONNECTED, function() {
27092
+ }))), l(this, Z)[Z].getValue("peerSessionStore").on(j.ROOM_NODE_RECONNECTED, function() {
27105
27093
  e.self.roomState = "joined", e.self.emit("roomJoined", { reconnected: !0 });
27106
- }), l(this, Z)[Z].getValue("peerSessionStore").on(F.ROOM_NODE_DISCONNECTED, function() {
27094
+ }), l(this, Z)[Z].getValue("peerSessionStore").on(j.ROOM_NODE_DISCONNECTED, function() {
27107
27095
  e.self.roomState !== "disconnected" && (e.self.roomState = "disconnected", e.self.emit("roomLeft", { state: "disconnected" }));
27108
- }), l(this, Z)[Z].getValue("peerSessionStore").on(F.ROOM_NODE_FAILED, function() {
27096
+ }), l(this, Z)[Z].getValue("peerSessionStore").on(j.ROOM_NODE_FAILED, function() {
27109
27097
  e.self.roomState = "failed", e.self.emit("roomLeft", { state: "failed" });
27110
- }), l(this, Z)[Z].getValue("peerSessionStore").on(F.SOCKET_SERVICE_RECONNECTED, function(r) {
27098
+ }), l(this, Z)[Z].getValue("peerSessionStore").on(j.SOCKET_SERVICE_RECONNECTED, function(r) {
27111
27099
  var n = r.wasJoinAttempted;
27112
27100
  n === !1 && (e.self.roomState = "init"), e.resetSelf(n);
27113
- }), l(this, Z)[Z].getValue("peerSessionStore").on(F.SOCKET_SERVICE_DISCONNECTED, function(r) {
27101
+ }), l(this, Z)[Z].getValue("peerSessionStore").on(j.SOCKET_SERVICE_DISCONNECTED, function(r) {
27114
27102
  var n = r.joinAttempted;
27115
27103
  if (e.self.roomState !== "disconnected") {
27116
27104
  var a = e.peerId;
@@ -27120,13 +27108,13 @@ var YO = Object.defineProperty, QO = Object.getOwnPropertyDescriptor, ao = funct
27120
27108
  var s = ht();
27121
27109
  s.setHeader("tracing-id", a), Ha.remapContext(a, l(e, Z)[Z]), e.self.roomState = "disconnected", e.self.emit("roomLeft", { state: "disconnected" });
27122
27110
  }
27123
- }), l(this, Z)[Z].getValue("peerSessionStore").on(F.SOCKET_SERVICE_FAILED, function() {
27111
+ }), l(this, Z)[Z].getValue("peerSessionStore").on(j.SOCKET_SERVICE_FAILED, function() {
27124
27112
  e.self.roomState = "failed", e.self.emit("roomLeft", { state: "failed" });
27125
27113
  }), l(this, tt)[tt].on(Q.waitingRoomRequestAccepted, function() {
27126
27114
  e.waitlistAcceptHandler();
27127
27115
  }), l(this, tt)[tt].on($l.updateUserPreset, function(r) {
27128
27116
  r.updatePeersPresets.forEach(function(n) {
27129
- n.userIds === e.self.userId && l(e, Z)[Z].getValue("peerSessionStore").emit(F.UPDATE_PERMISSIONS, n.patch);
27117
+ n.userIds === e.self.userId && l(e, Z)[Z].getValue("peerSessionStore").emit(j.UPDATE_PERMISSIONS, n.patch);
27130
27118
  });
27131
27119
  }), l(this, tt)[tt].on(Q.waitingRoomRequestDenied, function() {
27132
27120
  e.waitlistRejectedHandler();
@@ -27134,10 +27122,10 @@ var YO = Object.defineProperty, QO = Object.getOwnPropertyDescriptor, ao = funct
27134
27122
  e.kickHandler({ kickType: "kick" });
27135
27123
  }), l(this, tt)[tt].on(Q.kickAll, function() {
27136
27124
  e.kickHandler({ kickType: "kickAll" });
27137
- }), l(this, Z)[Z].getValue("peerSessionStore").onAsync(F.JOIN_MEDIA_ROOM, this.joinMediaRoom.bind(this)), l(this, Z)[Z].getValue("peerSessionStore").on(F.PRODUCER_SCORE_UPDATE, function(r) {
27125
+ }), l(this, Z)[Z].getValue("peerSessionStore").onAsync(j.JOIN_MEDIA_ROOM, this.joinMediaRoom.bind(this)), l(this, Z)[Z].getValue("peerSessionStore").on(j.PRODUCER_SCORE_UPDATE, function(r) {
27138
27126
  var n, a = r.score, i = r.kind, s = r.appData, u = r.scoreStats, c = (n = s == null ? void 0 : s.screenShare) !== null && n !== void 0 ? n : !1;
27139
27127
  e.self.emit("mediaScoreUpdate", { kind: i, isScreenshare: c, score: a, participantId: e.self.id, scoreStats: u });
27140
- }), l(this, Z)[Z].getValue("peerSessionStore").on(F.MUTE_SELF, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
27128
+ }), l(this, Z)[Z].getValue("peerSessionStore").on(j.MUTE_SELF, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
27141
27129
  return h().wrap(function(a) {
27142
27130
  for (; ; )
27143
27131
  switch (a.prev = a.next) {
@@ -27154,7 +27142,7 @@ var YO = Object.defineProperty, QO = Object.getOwnPropertyDescriptor, ao = funct
27154
27142
  return a.stop();
27155
27143
  }
27156
27144
  }, r);
27157
- }))), l(this, Z)[Z].getValue("peerSessionStore").on(F.MUTE_SELF_VIDEO, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
27145
+ }))), l(this, Z)[Z].getValue("peerSessionStore").on(j.MUTE_SELF_VIDEO, /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
27158
27146
  return h().wrap(function(a) {
27159
27147
  for (; ; )
27160
27148
  switch (a.prev = a.next) {
@@ -27171,7 +27159,7 @@ var YO = Object.defineProperty, QO = Object.getOwnPropertyDescriptor, ao = funct
27171
27159
  return a.stop();
27172
27160
  }
27173
27161
  }, r);
27174
- }))), l(this, Z)[Z].getValue("peerSessionStore").onAsync(F.LEAVE_MEDIA_ROOM, this.leaveMediaRoom.bind(this)), l(this, Z)[Z].getValue("peerSessionStore").on(F.PIP_HANGUP, this.leaveRoom.bind(this));
27162
+ }))), l(this, Z)[Z].getValue("peerSessionStore").onAsync(j.LEAVE_MEDIA_ROOM, this.leaveMediaRoom.bind(this)), l(this, Z)[Z].getValue("peerSessionStore").on(j.PIP_HANGUP, this.leaveRoom.bind(this));
27175
27163
  } }, { key: "joinRoom", value: function() {
27176
27164
  var t = m(/* @__PURE__ */ h().mark(function r() {
27177
27165
  var n, a, i, s, u = arguments;
@@ -27286,7 +27274,7 @@ var YO = Object.defineProperty, QO = Object.getOwnPropertyDescriptor, ao = funct
27286
27274
  this.self.roomState = "joined", this.self.emit("roomJoined", { reconnected: n }), w.next = 36;
27287
27275
  break;
27288
27276
  case 32:
27289
- throw w.prev = 32, w.t3 = w.catch(2), this.logger.error("Error:SelfController.mediaRoomJoin", { error: w.t3 }), new j("Error: could not join media room", "0002");
27277
+ throw w.prev = 32, w.t3 = w.catch(2), this.logger.error("Error:SelfController.mediaRoomJoin", { error: w.t3 }), new F("Error: could not join media room", "0002");
27290
27278
  case 36:
27291
27279
  case "end":
27292
27280
  return w.stop();
@@ -27576,11 +27564,11 @@ var tD = Object.defineProperty, nD = Object.getOwnPropertyDescriptor, aD = funct
27576
27564
  case 0:
27577
27565
  return this.socket.joinAttempted = !0, i = { capabilities: [], peer: { displayName: (a = n.name) !== null && a !== void 0 ? a : "Participant", customParticipantId: n.customParticipantId, peerId: n.id, userId: n.userId, displayPictureUrl: n.picture, waitlisted: !1 }, roomUuid: "" }, s = this.socket.sendMessagePromise(Q.joinRoom, gC.toBinary(i)), b.prev = 3, b.t0 = bo, b.next = 7, s;
27578
27566
  case 7:
27579
- return b.t1 = b.sent.payload, u = b.t0.fromBinary.call(b.t0, b.t1), c = u.peer, l(this, Hr)[Hr].getValue("connectionHandler").socketJoined = !0, l(this, Hr)[Hr].getValue("peerSessionStore").emit(F.SOCKET_SERVICE_ROOM_JOINED, { peer: c }), d = this.getRoomState(), p = this.getRoomPeersNonPaginated(), b.next = 16, Promise.all([d, p]);
27567
+ return b.t1 = b.sent.payload, u = b.t0.fromBinary.call(b.t0, b.t1), c = u.peer, l(this, Hr)[Hr].getValue("connectionHandler").socketJoined = !0, l(this, Hr)[Hr].getValue("peerSessionStore").emit(j.SOCKET_SERVICE_ROOM_JOINED, { peer: c }), d = this.getRoomState(), p = this.getRoomPeersNonPaginated(), b.next = 16, Promise.all([d, p]);
27580
27568
  case 16:
27581
- return v = b.sent, f = He(v, 2), g = f[0].room, k = f[1].peers, l(this, Hr)[Hr].getValue("peerSessionStore").emit(F.ROOM_STATE, g), l(this, Hr)[Hr].getValue("peerSessionStore").emit(F.SOCKET_PEERS, k), b.abrupt("return", { peer: c });
27569
+ return v = b.sent, f = He(v, 2), g = f[0].room, k = f[1].peers, l(this, Hr)[Hr].getValue("peerSessionStore").emit(j.ROOM_STATE, g), l(this, Hr)[Hr].getValue("peerSessionStore").emit(j.SOCKET_PEERS, k), b.abrupt("return", { peer: c });
27582
27570
  case 25:
27583
- throw b.prev = 25, b.t2 = b.catch(3), this.logger.error("RoomSocketHandler.joinRoom.failed", { error: b.t2 }), new j("Error: RoomSocketHandler.joinRoom failed.", "0002", this.logger, b.t2);
27571
+ throw b.prev = 25, b.t2 = b.catch(3), this.logger.error("RoomSocketHandler.joinRoom.failed", { error: b.t2 }), new F("Error: RoomSocketHandler.joinRoom failed.", "0002", this.logger, b.t2);
27584
27572
  case 29:
27585
27573
  case "end":
27586
27574
  return b.stop();
@@ -27941,7 +27929,7 @@ var tD = Object.defineProperty, nD = Object.getOwnPropertyDescriptor, aD = funct
27941
27929
  var n = r.payload;
27942
27930
  try {
27943
27931
  var a = Xo.fromBinary(n);
27944
- l(e, Hr)[Hr].getValue("peerSessionStore").emit(F.ROOM_MESSAGE, { payload: JSON.parse(new TextDecoder().decode(a.payload)), type: a.type, timestamp: a.timestamp });
27932
+ l(e, Hr)[Hr].getValue("peerSessionStore").emit(j.ROOM_MESSAGE, { payload: JSON.parse(new TextDecoder().decode(a.payload)), type: a.type, timestamp: a.timestamp });
27945
27933
  } catch (i) {
27946
27934
  e.logger.error("failed to decode broadcast message:", i);
27947
27935
  }
@@ -27949,7 +27937,7 @@ var tD = Object.defineProperty, nD = Object.getOwnPropertyDescriptor, aD = funct
27949
27937
  var n = r.payload;
27950
27938
  try {
27951
27939
  var a = Xo.fromBinary(n);
27952
- l(e, Hr)[Hr].getValue("peerSessionStore").emit(F.MESSAGE, { payload: JSON.parse(new TextDecoder().decode(a.payload)), type: a.type, timestamp: a.timestamp });
27940
+ l(e, Hr)[Hr].getValue("peerSessionStore").emit(j.MESSAGE, { payload: JSON.parse(new TextDecoder().decode(a.payload)), type: a.type, timestamp: a.timestamp });
27953
27941
  } catch (i) {
27954
27942
  e.logger.error("failed to decode peer broadcast message:", i);
27955
27943
  }
@@ -28952,7 +28940,7 @@ var SD = Object.defineProperty, ED = Object.getOwnPropertyDescriptor, Dc = funct
28952
28940
  function o(t, e) {
28953
28941
  var r, n = e.peerId, a = e.meetingId, i = e.authToken, s = e.capabilities;
28954
28942
  if (P(this, o), Object.defineProperty(this, mo, { value: ID }), Object.defineProperty(this, go, { value: AD }), Object.defineProperty(this, Te, { get: RD, set: void 0 }), Object.defineProperty(this, fn, { writable: !0, value: void 0 }), Object.defineProperty(this, be, { writable: !0, value: void 0 }), this.roomName = void 0, this.authToken = void 0, this.capabilities = void 0, Object.defineProperty(this, Jr, { writable: !0, value: void 0 }), Object.defineProperty(this, Je, { writable: !0, value: void 0 }), !n || !a || !i)
28955
- throw new j("peerId, meetingId, or authToken can not be empty", "0404");
28943
+ throw new F("peerId, meetingId, or authToken can not be empty", "0404");
28956
28944
  l(this, Jr)[Jr] = void 0, l(this, Je)[Je] = t, this.capabilities = s, this.roomName = a, this.authToken = i, l(this, fn)[fn] = l(this, go)[go](n), l(this, be)[be] = new PD(l(this, fn)[fn], { autoReconnect: !0, disconnectOnPingTimeout: (r = s.includes("PING")) !== null && r !== void 0 ? r : !1, queueOnDisconnect: !0, flushOnReconnect: !1, logger: this.logger }), this.handleSocketConnectionEvents();
28957
28945
  }
28958
28946
  return S(o, [{ key: "joinAttempted", get: function() {
@@ -29075,8 +29063,8 @@ var SD = Object.defineProperty, ED = Object.getOwnPropertyDescriptor, Dc = funct
29075
29063
  var n, a = r.code, i = r.reason;
29076
29064
  e.logger.info("SocketService::Disconnected from socket-edge", { error: { code: a, reason: i }, country: D.location.country });
29077
29065
  var s = (n = l(e, Te)[Te].mediaState) !== null && n !== void 0 ? n : {}, u = s.recv, c = s.send;
29078
- u != null && u.state && (u == null ? void 0 : u.state) !== Uo.CONNECTED || c != null && c.state && (c == null ? void 0 : c.state) !== Uo.CONNECTED ? l(e, Je)[Je].getValue("peerSessionStore").emit(F.SOCKET_SERVICE_DISCONNECTED, { joinAttempted: l(e, Te)[Te].joinAttempted }) : l(e, Jr)[Jr] = setTimeout(function() {
29079
- l(e, Je)[Je].getValue("peerSessionStore").emit(F.SOCKET_SERVICE_DISCONNECTED, { joinAttempted: l(e, Te)[Te].joinAttempted }), l(e, Jr)[Jr] = void 0;
29066
+ u != null && u.state && (u == null ? void 0 : u.state) !== Uo.CONNECTED || c != null && c.state && (c == null ? void 0 : c.state) !== Uo.CONNECTED ? l(e, Je)[Je].getValue("peerSessionStore").emit(j.SOCKET_SERVICE_DISCONNECTED, { joinAttempted: l(e, Te)[Te].joinAttempted }) : l(e, Jr)[Jr] = setTimeout(function() {
29067
+ l(e, Je)[Je].getValue("peerSessionStore").emit(j.SOCKET_SERVICE_DISCONNECTED, { joinAttempted: l(e, Te)[Te].joinAttempted }), l(e, Jr)[Jr] = void 0;
29080
29068
  }, CD), l(e, Te)[Te].updateSocketConnectionState("disconnected");
29081
29069
  }), this.onStateEvent("reconnecting", /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function r() {
29082
29070
  return h().wrap(function(a) {
@@ -29114,7 +29102,7 @@ var SD = Object.defineProperty, ED = Object.getOwnPropertyDescriptor, Dc = funct
29114
29102
  for (; ; )
29115
29103
  switch (a.prev = a.next) {
29116
29104
  case 0:
29117
- e.logger.info("SocketService::Reconnected to socket-edge", { connectionState: { joinAttempted: l(e, Te)[Te].mediaJoinAttempted } }), l(e, Jr)[Jr] && (clearTimeout(l(e, Jr)[Jr]), l(e, Jr)[Jr] = void 0), l(e, Je)[Je].getValue("peerSessionStore").emit(F.SOCKET_SERVICE_RECONNECTED, { wasJoinAttempted: l(e, Te)[Te].mediaJoinAttempted }), l(e, Te)[Te].updateSocketConnectionState("reconnected");
29105
+ e.logger.info("SocketService::Reconnected to socket-edge", { connectionState: { joinAttempted: l(e, Te)[Te].mediaJoinAttempted } }), l(e, Jr)[Jr] && (clearTimeout(l(e, Jr)[Jr]), l(e, Jr)[Jr] = void 0), l(e, Je)[Je].getValue("peerSessionStore").emit(j.SOCKET_SERVICE_RECONNECTED, { wasJoinAttempted: l(e, Te)[Te].mediaJoinAttempted }), l(e, Te)[Te].updateSocketConnectionState("reconnected");
29118
29106
  case 4:
29119
29107
  case "end":
29120
29108
  return a.stop();
@@ -29125,7 +29113,7 @@ var SD = Object.defineProperty, ED = Object.getOwnPropertyDescriptor, Dc = funct
29125
29113
  for (; ; )
29126
29114
  switch (a.prev = a.next) {
29127
29115
  case 0:
29128
- e.logger.info("SocketService::Failed to connect to socket-edge", { country: D.location.country }), l(e, Je)[Je].getValue("peerSessionStore").emit(F.SOCKET_SERVICE_FAILED), l(e, Te)[Te].updateSocketConnectionState("failed");
29116
+ e.logger.info("SocketService::Failed to connect to socket-edge", { country: D.location.country }), l(e, Je)[Je].getValue("peerSessionStore").emit(j.SOCKET_SERVICE_FAILED), l(e, Te)[Te].updateSocketConnectionState("failed");
29129
29117
  case 3:
29130
29118
  case "end":
29131
29119
  return a.stop();
@@ -29644,7 +29632,7 @@ var ND = Object.defineProperty, VD = Object.getOwnPropertyDescriptor, $c = funct
29644
29632
  B.next = 4;
29645
29633
  break;
29646
29634
  }
29647
- throw new j("Browser not supported", "0010", f, !0);
29635
+ throw new F("Browser not supported", "0010", f, !0);
29648
29636
  case 4:
29649
29637
  return g = cI(n, { authToken: c, baseURL: u, cachedUserDetails: v }), g.setRoomName(d), g.setRoomUUID(d), g.setOrganizationId(p), g.setHeader("tracing-id", s), n.setValue("apiClient", g), k = new xI(n), n.setValue("connectionHandler", k), y = So.createSocketService(n), b = y.connect(), E = g.getUserDetails(), T = g.getPlugins(), O = "", B.prev = 17, B.next = 20, So.setupFlagsmith(n);
29650
29638
  case 20:
@@ -29763,7 +29751,7 @@ var ND = Object.defineProperty, VD = Object.getOwnPropertyDescriptor, $c = funct
29763
29751
  Re.next = 46;
29764
29752
  break;
29765
29753
  }
29766
- throw new j("The plugin module cannot be initialized without the `participant` module", "0102");
29754
+ throw new F("The plugin module cannot be initialized without the `participant` module", "0102");
29767
29755
  case 46:
29768
29756
  return Re.next = 48, s;
29769
29757
  case 48:
@@ -29866,7 +29854,7 @@ function jD(o, t) {
29866
29854
  var s = "https://".concat(Fs({ servicePrefix: "api", baseURI: i }));
29867
29855
  return { meetingId: r, orgId: n, participantId: a, baseURI: i, apiBase: s };
29868
29856
  } catch (u) {
29869
- throw new j("Invalid auth token", "0004");
29857
+ throw new F("Invalid auth token", "0004");
29870
29858
  }
29871
29859
  }
29872
29860
  var _n = /* @__PURE__ */ C("audioEl"), Ra = /* @__PURE__ */ C("stream"), Aa = /* @__PURE__ */ C("tracks"), Gu = /* @__PURE__ */ C("onError"), fd = /* @__PURE__ */ C("runErrorCallbacks"), FD = /* @__PURE__ */ function() {