@cloudflare/realtimekit 2.0.2-staging.2 → 2.0.2-staging.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var VS = Object.defineProperty, xS = Object.defineProperties;
2
2
  var US = Object.getOwnPropertyDescriptors;
3
3
  var Oc = Object.getOwnPropertySymbols, $S = Object.getPrototypeOf, Uh = Object.prototype.hasOwnProperty, $h = Object.prototype.propertyIsEnumerable, BS = Reflect.get;
4
- var Bh = Math.pow, $l = (s, t, e) => t in s ? VS(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, N = (s, t) => {
4
+ var Bh = Math.pow, $l = (s, t, e) => t in s ? VS(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, D = (s, t) => {
5
5
  for (var e in t || (t = {}))
6
6
  Uh.call(t, e) && $l(s, e, t[e]);
7
7
  if (Oc)
@@ -799,62 +799,62 @@ var J;
799
799
  (function(s) {
800
800
  s[s.MAJOR_EVENT = 0] = "MAJOR_EVENT", s[s.MINOR_EVENT = 1] = "MINOR_EVENT";
801
801
  })(J || (J = {}));
802
- var O;
802
+ var N;
803
803
  (function(s) {
804
804
  s.PRECALL_TEST_BEGIN = "precall_begin", s.PRECALL_TEST_COMPLETE = "precall_end", s.CALL_JOIN_BEGIN = "call_join", s.NET_QUALITY_TEST_BEGIN = "net_quality_test_begin", s.NET_QUALITY_TEST_END = "net_quality_test_end", s.WEBSOCKET_CONNECTED = "websocket_connected", s.TRANSPORT_CONNECTED = "transport_connected", s.AUDIO_ON = "audio_on", s.AUDIO_OFF = "audio_off", s.VIDEO_ON = "video_on", s.VIDEO_OFF = "video_off", s.PARTICIPANT_ROLE = "participant_role", s.PING_STAT = "ping_stat", s.DISCONNECT = "disconnect", s.RECONNECT_ATTEMPT = "reconnect_attempt", s.SCREENSHARE_START_REQUESTED = "screenshare_start_requested", s.SCREENSHARE_STARTED = "screenshare_started", s.SCREENSHARE_STOPPED = "screenshare_stopped", s.TAB_CHANGE = "tab_change", s.BROWSER_BACKGROUNDED = "browser_backgrounded", s.BROWSER_FOREGROUNDED = "browser_foregrounded", s.DOMINANT_SPEAKER = "dominant_speaker", s.AUDIO_DEVICES_UPDATES = "audio_devices_updates", s.VIDEO_DEVICES_UPDATES = "video_devices_updates", s.SPEAKER_DEVICES_UPDATES = "speaker_devices_updates", s.SELECTED_MICROHPONE_UPDATE = "selected_microphone_update", s.SELECTED_CAMERA_UPDATE = "selected_camera_update", s.SELECTED_SPEAKER_UPDATE = "selected_speaker_update", s.EXPECTED_VIDEO_RESOLUTION = "expected_video_resolution", s.EXPECTED_SCREENSHARE_RESOLUTION = "expected_screenshare_resolution", s.MEDIA_PERMISSION = "media_permission", s.LEGACY_SWITCH = "legacy_switch", s.AUDIO_PLAY_FAILED = "audio_play_failed", s.VIDEO_PLAY_FAILED = "video_play_failed", s.AUDIO_TRACK_MUTED = "audio_track_muted", s.VIDEO_TRACK_MUTED = "video_track_muted", s.IVS_PLAYER_REBUFFERING = "ivs_player_rebuffering", s.IVS_PLAYER_AUDIO_BLOCKED = "ivs_player_audio_blocked", s.IVS_PLAYER_PLAYBACK_BLOCKED = "ivs_player_playback_blocked", s.IVS_PLAYER_ERROR = "ivs_player_error", s.IVS_PLAYER_RECOVERABLE_ERROR = "ivs_player_recoverable_error", s.IVS_PLAYER_WORKER_ERROR = "ivs_player_worker_error", s.IVS_PLAYER_NETWORK_UNAVAILABLE = "ivs_player_network_unavailable", s.LIVESTREAM_LATENCY = "livestream_latency", s.IVS_PLAYER_ANALYTICS_EVENT = "ivs_player_analytics_event", s.IVS_PLAYER_PLAYBACK_RATE_CHANGED = "ivs_player_playback_rate_changed", s.IVS_PLAYER_QUALITY_CHANGED = "ivs_player_quality_changed", s.IVS_PLAYER_INITIALIZED = "ivs_player_initialized";
805
- })(O || (O = {}));
805
+ })(N || (N = {}));
806
806
  const nv = /* @__PURE__ */ new Map([
807
- [O.PRECALL_TEST_BEGIN, J.MINOR_EVENT],
808
- [O.PRECALL_TEST_COMPLETE, J.MINOR_EVENT],
809
- [O.CALL_JOIN_BEGIN, J.MAJOR_EVENT],
810
- [O.NET_QUALITY_TEST_BEGIN, J.MINOR_EVENT],
811
- [O.NET_QUALITY_TEST_END, J.MINOR_EVENT],
812
- [O.WEBSOCKET_CONNECTED, J.MINOR_EVENT],
813
- [O.TRANSPORT_CONNECTED, J.MAJOR_EVENT],
814
- [O.AUDIO_ON, J.MINOR_EVENT],
815
- [O.AUDIO_OFF, J.MINOR_EVENT],
816
- [O.VIDEO_ON, J.MINOR_EVENT],
817
- [O.VIDEO_OFF, J.MINOR_EVENT],
818
- [O.PARTICIPANT_ROLE, J.MINOR_EVENT],
819
- [O.PING_STAT, J.MAJOR_EVENT],
820
- [O.DISCONNECT, J.MAJOR_EVENT],
821
- [O.RECONNECT_ATTEMPT, J.MAJOR_EVENT],
822
- [O.SCREENSHARE_START_REQUESTED, J.MINOR_EVENT],
823
- [O.SCREENSHARE_STARTED, J.MINOR_EVENT],
824
- [O.SCREENSHARE_STOPPED, J.MINOR_EVENT],
825
- [O.TAB_CHANGE, J.MINOR_EVENT],
826
- [O.BROWSER_BACKGROUNDED, J.MINOR_EVENT],
827
- [O.BROWSER_FOREGROUNDED, J.MINOR_EVENT],
828
- [O.DOMINANT_SPEAKER, J.MINOR_EVENT],
829
- [O.AUDIO_DEVICES_UPDATES, J.MINOR_EVENT],
830
- [O.VIDEO_DEVICES_UPDATES, J.MINOR_EVENT],
831
- [O.SPEAKER_DEVICES_UPDATES, J.MINOR_EVENT],
832
- [O.SELECTED_MICROHPONE_UPDATE, J.MINOR_EVENT],
833
- [O.SELECTED_CAMERA_UPDATE, J.MINOR_EVENT],
834
- [O.SELECTED_SPEAKER_UPDATE, J.MINOR_EVENT],
835
- [O.MEDIA_PERMISSION, J.MINOR_EVENT],
836
- [O.LEGACY_SWITCH, J.MINOR_EVENT],
837
- [O.AUDIO_PLAY_FAILED, J.MINOR_EVENT],
838
- [O.VIDEO_PLAY_FAILED, J.MINOR_EVENT],
839
- [O.AUDIO_TRACK_MUTED, J.MINOR_EVENT],
840
- [O.VIDEO_TRACK_MUTED, J.MINOR_EVENT],
807
+ [N.PRECALL_TEST_BEGIN, J.MINOR_EVENT],
808
+ [N.PRECALL_TEST_COMPLETE, J.MINOR_EVENT],
809
+ [N.CALL_JOIN_BEGIN, J.MAJOR_EVENT],
810
+ [N.NET_QUALITY_TEST_BEGIN, J.MINOR_EVENT],
811
+ [N.NET_QUALITY_TEST_END, J.MINOR_EVENT],
812
+ [N.WEBSOCKET_CONNECTED, J.MINOR_EVENT],
813
+ [N.TRANSPORT_CONNECTED, J.MAJOR_EVENT],
814
+ [N.AUDIO_ON, J.MINOR_EVENT],
815
+ [N.AUDIO_OFF, J.MINOR_EVENT],
816
+ [N.VIDEO_ON, J.MINOR_EVENT],
817
+ [N.VIDEO_OFF, J.MINOR_EVENT],
818
+ [N.PARTICIPANT_ROLE, J.MINOR_EVENT],
819
+ [N.PING_STAT, J.MAJOR_EVENT],
820
+ [N.DISCONNECT, J.MAJOR_EVENT],
821
+ [N.RECONNECT_ATTEMPT, J.MAJOR_EVENT],
822
+ [N.SCREENSHARE_START_REQUESTED, J.MINOR_EVENT],
823
+ [N.SCREENSHARE_STARTED, J.MINOR_EVENT],
824
+ [N.SCREENSHARE_STOPPED, J.MINOR_EVENT],
825
+ [N.TAB_CHANGE, J.MINOR_EVENT],
826
+ [N.BROWSER_BACKGROUNDED, J.MINOR_EVENT],
827
+ [N.BROWSER_FOREGROUNDED, J.MINOR_EVENT],
828
+ [N.DOMINANT_SPEAKER, J.MINOR_EVENT],
829
+ [N.AUDIO_DEVICES_UPDATES, J.MINOR_EVENT],
830
+ [N.VIDEO_DEVICES_UPDATES, J.MINOR_EVENT],
831
+ [N.SPEAKER_DEVICES_UPDATES, J.MINOR_EVENT],
832
+ [N.SELECTED_MICROHPONE_UPDATE, J.MINOR_EVENT],
833
+ [N.SELECTED_CAMERA_UPDATE, J.MINOR_EVENT],
834
+ [N.SELECTED_SPEAKER_UPDATE, J.MINOR_EVENT],
835
+ [N.MEDIA_PERMISSION, J.MINOR_EVENT],
836
+ [N.LEGACY_SWITCH, J.MINOR_EVENT],
837
+ [N.AUDIO_PLAY_FAILED, J.MINOR_EVENT],
838
+ [N.VIDEO_PLAY_FAILED, J.MINOR_EVENT],
839
+ [N.AUDIO_TRACK_MUTED, J.MINOR_EVENT],
840
+ [N.VIDEO_TRACK_MUTED, J.MINOR_EVENT],
841
841
  // IVS Player Events
842
- [O.IVS_PLAYER_REBUFFERING, J.MAJOR_EVENT],
843
- [O.IVS_PLAYER_AUDIO_BLOCKED, J.MAJOR_EVENT],
844
- [O.IVS_PLAYER_PLAYBACK_BLOCKED, J.MAJOR_EVENT],
845
- [O.IVS_PLAYER_ERROR, J.MAJOR_EVENT],
846
- [O.IVS_PLAYER_RECOVERABLE_ERROR, J.MAJOR_EVENT],
847
- [O.IVS_PLAYER_WORKER_ERROR, J.MAJOR_EVENT],
848
- [O.IVS_PLAYER_NETWORK_UNAVAILABLE, J.MAJOR_EVENT],
842
+ [N.IVS_PLAYER_REBUFFERING, J.MAJOR_EVENT],
843
+ [N.IVS_PLAYER_AUDIO_BLOCKED, J.MAJOR_EVENT],
844
+ [N.IVS_PLAYER_PLAYBACK_BLOCKED, J.MAJOR_EVENT],
845
+ [N.IVS_PLAYER_ERROR, J.MAJOR_EVENT],
846
+ [N.IVS_PLAYER_RECOVERABLE_ERROR, J.MAJOR_EVENT],
847
+ [N.IVS_PLAYER_WORKER_ERROR, J.MAJOR_EVENT],
848
+ [N.IVS_PLAYER_NETWORK_UNAVAILABLE, J.MAJOR_EVENT],
849
849
  // We are keeping live latency as major, so that it
850
850
  // acts as a ping alternative for livestream viewer
851
- [O.LIVESTREAM_LATENCY, J.MAJOR_EVENT],
852
- [O.IVS_PLAYER_ANALYTICS_EVENT, J.MINOR_EVENT],
853
- [O.IVS_PLAYER_PLAYBACK_RATE_CHANGED, J.MINOR_EVENT],
854
- [O.IVS_PLAYER_QUALITY_CHANGED, J.MINOR_EVENT],
855
- [O.IVS_PLAYER_INITIALIZED, J.MINOR_EVENT],
856
- [O.EXPECTED_VIDEO_RESOLUTION, J.MINOR_EVENT],
857
- [O.EXPECTED_SCREENSHARE_RESOLUTION, J.MINOR_EVENT]
851
+ [N.LIVESTREAM_LATENCY, J.MAJOR_EVENT],
852
+ [N.IVS_PLAYER_ANALYTICS_EVENT, J.MINOR_EVENT],
853
+ [N.IVS_PLAYER_PLAYBACK_RATE_CHANGED, J.MINOR_EVENT],
854
+ [N.IVS_PLAYER_QUALITY_CHANGED, J.MINOR_EVENT],
855
+ [N.IVS_PLAYER_INITIALIZED, J.MINOR_EVENT],
856
+ [N.EXPECTED_VIDEO_RESOLUTION, J.MINOR_EVENT],
857
+ [N.EXPECTED_SCREENSHARE_RESOLUTION, J.MINOR_EVENT]
858
858
  ]);
859
859
  class av {
860
860
  constructor() {
@@ -1535,7 +1535,7 @@ class lm extends st {
1535
1535
  }) || e[e.length - 1];
1536
1536
  }
1537
1537
  parseRTCReport(e, r = [], i = !1, n = void 0, o = void 0) {
1538
- var _, w, R, D, U, B, F, H, X, Le, yt, Qt, Yr;
1538
+ var _, w, R, O, U, B, F, H, X, Le, yt, Qt, Yr;
1539
1539
  const c = e, d = new dm(), l = r.length ? new Set(r) : void 0, h = [], g = [], f = [], v = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
1540
1540
  for (const I of c.values()) {
1541
1541
  if (l) {
@@ -1658,7 +1658,7 @@ class lm extends st {
1658
1658
  totalPacketSendDelay: y.totalPacketSendDelay || 0
1659
1659
  };
1660
1660
  if (y.mediaType === "video" || y.kind === "video") {
1661
- const A = y, Ae = N({
1661
+ const A = y, Ae = D({
1662
1662
  frameHeight: A.frameHeight,
1663
1663
  frameWidth: A.frameWidth,
1664
1664
  framesEncoded: A.framesEncoded,
@@ -1685,7 +1685,7 @@ class lm extends st {
1685
1685
  }, L);
1686
1686
  d.outboundVideoRtp.set(I.id, Ae), d.producerStreamMap.get(C).outboundVideoRtpId.push(I.id), this.processOutboundProducerVideoStats(C, ve, Ae);
1687
1687
  } else if (y.mediaType === "audio" || y.kind === "audio") {
1688
- const A = y, Ae = N({
1688
+ const A = y, Ae = D({
1689
1689
  retransmittedBytesSent: A.retransmittedBytesSent,
1690
1690
  retransmittedPacketsSent: A.retransmittedPacketsSent
1691
1691
  }, L);
@@ -1740,7 +1740,7 @@ class lm extends st {
1740
1740
  jitterBufferTargetDelay: y.jitterBufferTargetDelay || 0
1741
1741
  };
1742
1742
  if (y.mediaType === "video" || y.kind === "video") {
1743
- const L = y, A = N({
1743
+ const L = y, A = D({
1744
1744
  frameHeight: L.frameHeight,
1745
1745
  frameWidth: L.frameWidth,
1746
1746
  framesDecoded: L.framesDecoded,
@@ -1768,7 +1768,7 @@ class lm extends st {
1768
1768
  framesDecoded: (A.framesDecoded || 0) - (((w = this.videoConsumerToStatsMap.get(C)) == null ? void 0 : w.framesDecoded) || 0),
1769
1769
  framesPerSecond: A.framesPerSecond || 0,
1770
1770
  packetsLost: (A.packetsLost || 0) - (((R = this.videoConsumerToStatsMap.get(C)) == null ? void 0 : R.packetsLost) || 0),
1771
- packetsReceived: (A.packetsReceived || 0) - (((D = this.videoConsumerToStatsMap.get(C)) == null ? void 0 : D.packetsReceived) || 0),
1771
+ packetsReceived: (A.packetsReceived || 0) - (((O = this.videoConsumerToStatsMap.get(C)) == null ? void 0 : O.packetsReceived) || 0),
1772
1772
  jitter: A.jitter || 0,
1773
1773
  isScreenShare: this.screenShareConsumers.has(C)
1774
1774
  }), E.set(C, {
@@ -1786,7 +1786,7 @@ class lm extends st {
1786
1786
  // Bytes received in last 7 seconds
1787
1787
  }), this.videoConsumerToStatsMap.set(C, A), d.inboundVideoRtp.set(I.id, A), d.consumerStreamMap.get(C).inboundVideoRtpId.push(I.id), this.processInboundConsumerVideoStats(C, ve, A);
1788
1788
  } else if (y.mediaType === "audio" || y.kind === "audio") {
1789
- const L = y, A = N({
1789
+ const L = y, A = D({
1790
1790
  audioLevel: L.audioLevel,
1791
1791
  concealedSamples: L.concealedSamples,
1792
1792
  concealmentEvents: L.concealmentEvents,
@@ -2189,7 +2189,7 @@ class um extends lm {
2189
2189
  };
2190
2190
  }
2191
2191
  parseRTCReport(e, r = [], i = !1, n = void 0, o = void 0) {
2192
- var _, w, R, D, U, B, F, H, X, Le, yt, Qt, Yr;
2192
+ var _, w, R, O, U, B, F, H, X, Le, yt, Qt, Yr;
2193
2193
  const c = e, d = new dm(), l = r.length ? new Set(r) : void 0, h = [], g = [], f = [], v = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
2194
2194
  for (const I of c.values()) {
2195
2195
  if (l) {
@@ -2310,7 +2310,7 @@ class um extends lm {
2310
2310
  totalPacketSendDelay: y.totalPacketSendDelay || 0
2311
2311
  };
2312
2312
  if (y.mediaType === "video" || y.kind === "video") {
2313
- const A = y, Ae = N({
2313
+ const A = y, Ae = D({
2314
2314
  frameHeight: A.frameHeight,
2315
2315
  frameWidth: A.frameWidth,
2316
2316
  framesEncoded: A.framesEncoded,
@@ -2335,7 +2335,7 @@ class um extends lm {
2335
2335
  }, L);
2336
2336
  d.outboundVideoRtp.set(I.id, Ae), d.producerStreamMap.get(C).outboundVideoRtpId.push(I.id), this.processOutboundProducerVideoStats(C, ve, Ae);
2337
2337
  } else if (y.mediaType === "audio" || y.kind === "audio") {
2338
- const A = y, Ae = N({
2338
+ const A = y, Ae = D({
2339
2339
  retransmittedBytesSent: A.retransmittedBytesSent,
2340
2340
  retransmittedPacketsSent: A.retransmittedPacketsSent
2341
2341
  }, L);
@@ -2390,7 +2390,7 @@ class um extends lm {
2390
2390
  jitterBufferTargetDelay: y.jitterBufferTargetDelay || 0
2391
2391
  };
2392
2392
  if (y.mediaType === "video" || y.kind === "video") {
2393
- const L = y, A = N({
2393
+ const L = y, A = D({
2394
2394
  frameHeight: L.frameHeight,
2395
2395
  frameWidth: L.frameWidth,
2396
2396
  framesDecoded: L.framesDecoded,
@@ -2418,7 +2418,7 @@ class um extends lm {
2418
2418
  framesDecoded: (A.framesDecoded || 0) - (((w = this.videoConsumerToStatsMap.get(C)) == null ? void 0 : w.framesDecoded) || 0),
2419
2419
  framesPerSecond: A.framesPerSecond || 0,
2420
2420
  packetsLost: (A.packetsLost || 0) - (((R = this.videoConsumerToStatsMap.get(C)) == null ? void 0 : R.packetsLost) || 0),
2421
- packetsReceived: (A.packetsReceived || 0) - (((D = this.videoConsumerToStatsMap.get(C)) == null ? void 0 : D.packetsReceived) || 0),
2421
+ packetsReceived: (A.packetsReceived || 0) - (((O = this.videoConsumerToStatsMap.get(C)) == null ? void 0 : O.packetsReceived) || 0),
2422
2422
  jitter: A.jitter || 0,
2423
2423
  isScreenShare: this.screenShareConsumers.has(C)
2424
2424
  }), E.set(C, {
@@ -2436,7 +2436,7 @@ class um extends lm {
2436
2436
  // Bytes received in last 7 seconds
2437
2437
  }), this.videoConsumerToStatsMap.set(C, A), d.inboundVideoRtp.set(I.id, A), d.consumerStreamMap.get(C).inboundVideoRtpId.push(I.id), this.processInboundConsumerVideoStats(C, ve, A);
2438
2438
  } else if (y.mediaType === "audio" || y.kind === "audio") {
2439
- const L = y, A = N({
2439
+ const L = y, A = D({
2440
2440
  audioLevel: L.audioLevel,
2441
2441
  concealedSamples: L.concealedSamples,
2442
2442
  concealmentEvents: L.concealmentEvents,
@@ -2749,11 +2749,11 @@ let G = class extends st {
2749
2749
  }
2750
2750
  sendPreCallTestBeginEvent(e = !1, r) {
2751
2751
  this.connectionInfoPromise = this.measurements.getNetworkInfo(this.iceServers, e), this.eventHandler.callEvent({
2752
- event: O.PRECALL_TEST_BEGIN,
2752
+ event: N.PRECALL_TEST_BEGIN,
2753
2753
  timestamp: r
2754
2754
  }), this.connectionInfoPromise && this.connectionInfoPromise.then((i) => {
2755
2755
  this.eventHandler.callEvent({
2756
- event: O.PRECALL_TEST_COMPLETE,
2756
+ event: N.PRECALL_TEST_COMPLETE,
2757
2757
  metaData: {
2758
2758
  connectionInfo: i
2759
2759
  },
@@ -2763,7 +2763,7 @@ let G = class extends st {
2763
2763
  }
2764
2764
  sendScreenShareToggleEvent(e, r = null, i) {
2765
2765
  this.currentUserMediaStates.screen = e, this.eventHandler.callEvent({
2766
- event: e ? O.SCREENSHARE_STARTED : O.SCREENSHARE_STOPPED,
2766
+ event: e ? N.SCREENSHARE_STARTED : N.SCREENSHARE_STOPPED,
2767
2767
  metaData: {
2768
2768
  ssrc: r
2769
2769
  },
@@ -2772,13 +2772,13 @@ let G = class extends st {
2772
2772
  }
2773
2773
  sendScreenShareRequestedEvent(e) {
2774
2774
  this.eventHandler.callEvent({
2775
- event: O.SCREENSHARE_START_REQUESTED,
2775
+ event: N.SCREENSHARE_START_REQUESTED,
2776
2776
  timestamp: e
2777
2777
  });
2778
2778
  }
2779
2779
  sendActiveSpeakerEvent(e, r) {
2780
2780
  this.eventHandler.callEvent({
2781
- event: O.DOMINANT_SPEAKER,
2781
+ event: N.DOMINANT_SPEAKER,
2782
2782
  metaData: {
2783
2783
  peerId: e
2784
2784
  },
@@ -2787,7 +2787,7 @@ let G = class extends st {
2787
2787
  }
2788
2788
  devices(e, r, i) {
2789
2789
  this.eventHandler.callEvent({
2790
- event: e === xt.AUDIO && O.AUDIO_DEVICES_UPDATES || e === xt.VIDEO && O.VIDEO_DEVICES_UPDATES || e === xt.SPEAKER && O.SPEAKER_DEVICES_UPDATES,
2790
+ event: e === xt.AUDIO && N.AUDIO_DEVICES_UPDATES || e === xt.VIDEO && N.VIDEO_DEVICES_UPDATES || e === xt.SPEAKER && N.SPEAKER_DEVICES_UPDATES,
2791
2791
  metaData: {
2792
2792
  deviceList: r
2793
2793
  },
@@ -2796,7 +2796,7 @@ let G = class extends st {
2796
2796
  }
2797
2797
  selectedDevice(e, r, i) {
2798
2798
  this.eventHandler.callEvent({
2799
- event: e === xt.AUDIO && O.SELECTED_MICROHPONE_UPDATE || e === xt.VIDEO && O.SELECTED_CAMERA_UPDATE || e === xt.SPEAKER && O.SELECTED_SPEAKER_UPDATE,
2799
+ event: e === xt.AUDIO && N.SELECTED_MICROHPONE_UPDATE || e === xt.VIDEO && N.SELECTED_CAMERA_UPDATE || e === xt.SPEAKER && N.SELECTED_SPEAKER_UPDATE,
2800
2800
  metaData: {
2801
2801
  device: r
2802
2802
  },
@@ -2805,7 +2805,7 @@ let G = class extends st {
2805
2805
  }
2806
2806
  mediaPermission(e, r, i) {
2807
2807
  this.eventHandler.callEvent({
2808
- event: O.MEDIA_PERMISSION,
2808
+ event: N.MEDIA_PERMISSION,
2809
2809
  metaData: {
2810
2810
  deviceType: e,
2811
2811
  permission: r
@@ -2815,7 +2815,7 @@ let G = class extends st {
2815
2815
  }
2816
2816
  mediaPlaybackFailed(e, r) {
2817
2817
  this.eventHandler.callEvent({
2818
- event: e === xt.AUDIO && O.AUDIO_PLAY_FAILED || e === xt.VIDEO && O.VIDEO_PLAY_FAILED,
2818
+ event: e === xt.AUDIO && N.AUDIO_PLAY_FAILED || e === xt.VIDEO && N.VIDEO_PLAY_FAILED,
2819
2819
  metaData: {
2820
2820
  deviceType: e
2821
2821
  },
@@ -2824,7 +2824,7 @@ let G = class extends st {
2824
2824
  }
2825
2825
  mediaTrackMuted(e, r) {
2826
2826
  this.eventHandler.callEvent({
2827
- event: e === xt.AUDIO && O.AUDIO_TRACK_MUTED || e === xt.VIDEO && O.VIDEO_TRACK_MUTED,
2827
+ event: e === xt.AUDIO && N.AUDIO_TRACK_MUTED || e === xt.VIDEO && N.VIDEO_TRACK_MUTED,
2828
2828
  metaData: {
2829
2829
  deviceType: e
2830
2830
  },
@@ -2833,26 +2833,26 @@ let G = class extends st {
2833
2833
  }
2834
2834
  tabChanged(e, r) {
2835
2835
  this.eventHandler.callEvent({
2836
- event: O.TAB_CHANGE,
2836
+ event: N.TAB_CHANGE,
2837
2837
  metaData: { isMeetingsTabActive: e },
2838
2838
  timestamp: r
2839
2839
  });
2840
2840
  }
2841
2841
  browserBackgrounded(e) {
2842
2842
  this.eventHandler.callEvent({
2843
- event: O.BROWSER_BACKGROUNDED,
2843
+ event: N.BROWSER_BACKGROUNDED,
2844
2844
  timestamp: e
2845
2845
  });
2846
2846
  }
2847
2847
  browserForegrounded(e) {
2848
2848
  this.eventHandler.callEvent({
2849
- event: O.BROWSER_FOREGROUNDED,
2849
+ event: N.BROWSER_FOREGROUNDED,
2850
2850
  timestamp: e
2851
2851
  });
2852
2852
  }
2853
2853
  legacySwitch(e, r) {
2854
2854
  this.eventHandler.callEvent({
2855
- event: O.LEGACY_SWITCH,
2855
+ event: N.LEGACY_SWITCH,
2856
2856
  metadata: { on: e },
2857
2857
  timestamp: r
2858
2858
  });
@@ -2863,14 +2863,14 @@ let G = class extends st {
2863
2863
  });
2864
2864
  }
2865
2865
  sendCallJoinBeginEvent(e, r) {
2866
- e = j(N({}, e), {
2866
+ e = j(D({}, e), {
2867
2867
  meetingEnv: this.env
2868
- }), e.deviceInfo = j(N({}, e.deviceInfo), {
2868
+ }), e.deviceInfo = j(D({}, e.deviceInfo), {
2869
2869
  userAgent: navigator.userAgent,
2870
2870
  cpus: navigator.hardwareConcurrency,
2871
2871
  memory: navigator.deviceMemory
2872
2872
  }), this.eventHandler.callEvent({
2873
- event: O.CALL_JOIN_BEGIN,
2873
+ event: N.CALL_JOIN_BEGIN,
2874
2874
  metaData: {
2875
2875
  peerMetaData: e
2876
2876
  },
@@ -2879,7 +2879,7 @@ let G = class extends st {
2879
2879
  }
2880
2880
  sendNetworkQualityTestBeginEvent(e, r) {
2881
2881
  this.eventHandler.callEvent({
2882
- event: O.NET_QUALITY_TEST_BEGIN,
2882
+ event: N.NET_QUALITY_TEST_BEGIN,
2883
2883
  timestamp: r
2884
2884
  }), new Promise((n, o) => u(this, null, function* () {
2885
2885
  const c = [];
@@ -2888,7 +2888,7 @@ let G = class extends st {
2888
2888
  try {
2889
2889
  if (d.iceServers && d.iceServers.length > 0) {
2890
2890
  const l = yield this.measurements.getNetworkQuality(d.iceServers);
2891
- c.push(j(N({}, d), {
2891
+ c.push(j(D({}, d), {
2892
2892
  networkResults: l
2893
2893
  }));
2894
2894
  }
@@ -2903,7 +2903,7 @@ let G = class extends st {
2903
2903
  }
2904
2904
  })).then((n) => {
2905
2905
  this.eventHandler.callEvent({
2906
- event: O.NET_QUALITY_TEST_END,
2906
+ event: N.NET_QUALITY_TEST_END,
2907
2907
  timestamp: r,
2908
2908
  metaData: n
2909
2909
  });
@@ -2911,20 +2911,20 @@ let G = class extends st {
2911
2911
  }
2912
2912
  sendWebSocketConnectedEvent(e) {
2913
2913
  this.eventHandler.callEvent({
2914
- event: O.WEBSOCKET_CONNECTED,
2914
+ event: N.WEBSOCKET_CONNECTED,
2915
2915
  timestamp: e
2916
2916
  });
2917
2917
  }
2918
2918
  sendTransportConnectedEvent(e) {
2919
2919
  this.eventHandler.callEvent({
2920
- event: O.TRANSPORT_CONNECTED,
2920
+ event: N.TRANSPORT_CONNECTED,
2921
2921
  timestamp: e
2922
2922
  });
2923
2923
  }
2924
2924
  sendAudioToggleEvent(e, r) {
2925
2925
  this.currentUserMediaStates.audio = e;
2926
2926
  let i;
2927
- e ? i = O.AUDIO_ON : i = O.AUDIO_OFF, this.eventHandler.callEvent({
2927
+ e ? i = N.AUDIO_ON : i = N.AUDIO_OFF, this.eventHandler.callEvent({
2928
2928
  event: i,
2929
2929
  timestamp: r
2930
2930
  });
@@ -2932,14 +2932,14 @@ let G = class extends st {
2932
2932
  sendVideoToggleEvent(e, r) {
2933
2933
  this.currentUserMediaStates.video = e;
2934
2934
  let i;
2935
- e ? i = O.VIDEO_ON : i = O.VIDEO_OFF, this.eventHandler.callEvent({
2935
+ e ? i = N.VIDEO_ON : i = N.VIDEO_OFF, this.eventHandler.callEvent({
2936
2936
  event: i,
2937
2937
  timestamp: r
2938
2938
  });
2939
2939
  }
2940
2940
  sendParticipantRoleToggleEvent(e, r) {
2941
2941
  this.eventHandler.callEvent({
2942
- event: O.PARTICIPANT_ROLE,
2942
+ event: N.PARTICIPANT_ROLE,
2943
2943
  timestamp: r,
2944
2944
  metaData: e
2945
2945
  });
@@ -2975,7 +2975,7 @@ let G = class extends st {
2975
2975
  return;
2976
2976
  }
2977
2977
  this.eventHandler.callEvent({
2978
- event: O.PING_STAT,
2978
+ event: N.PING_STAT,
2979
2979
  metaData: o,
2980
2980
  timestamp: r
2981
2981
  });
@@ -2983,64 +2983,64 @@ let G = class extends st {
2983
2983
  }
2984
2984
  sendIVSPlayerRebufferEvent(e) {
2985
2985
  this.eventHandler.callEvent({
2986
- event: O.IVS_PLAYER_REBUFFERING,
2986
+ event: N.IVS_PLAYER_REBUFFERING,
2987
2987
  timestamp: e
2988
2988
  });
2989
2989
  }
2990
2990
  sendIVSPlayerAudioBlockEvent(e) {
2991
2991
  this.eventHandler.callEvent({
2992
- event: O.IVS_PLAYER_AUDIO_BLOCKED,
2992
+ event: N.IVS_PLAYER_AUDIO_BLOCKED,
2993
2993
  timestamp: e
2994
2994
  });
2995
2995
  }
2996
2996
  sendIVSPlayerPlaybackBlockedEvent(e) {
2997
2997
  this.eventHandler.callEvent({
2998
- event: O.IVS_PLAYER_PLAYBACK_BLOCKED,
2998
+ event: N.IVS_PLAYER_PLAYBACK_BLOCKED,
2999
2999
  timestamp: e
3000
3000
  });
3001
3001
  }
3002
3002
  sendIVSPlayerNetworkUnavailableEvent(e) {
3003
3003
  this.eventHandler.callEvent({
3004
- event: O.IVS_PLAYER_NETWORK_UNAVAILABLE,
3004
+ event: N.IVS_PLAYER_NETWORK_UNAVAILABLE,
3005
3005
  timestamp: e
3006
3006
  });
3007
3007
  }
3008
3008
  sendIVSPlayerInitializedEvent(e) {
3009
3009
  this.eventHandler.callEvent({
3010
- event: O.IVS_PLAYER_INITIALIZED,
3010
+ event: N.IVS_PLAYER_INITIALIZED,
3011
3011
  timestamp: e
3012
3012
  });
3013
3013
  }
3014
3014
  sendIVSPlayerWorkerErrorEvent(e) {
3015
3015
  this.eventHandler.callEvent({
3016
- event: O.IVS_PLAYER_WORKER_ERROR,
3016
+ event: N.IVS_PLAYER_WORKER_ERROR,
3017
3017
  timestamp: e
3018
3018
  });
3019
3019
  }
3020
3020
  sendIVSPlayerErrorEvent(e, r) {
3021
3021
  this.eventHandler.callEvent({
3022
- event: O.IVS_PLAYER_ERROR,
3022
+ event: N.IVS_PLAYER_ERROR,
3023
3023
  timestamp: r,
3024
3024
  metaData: e
3025
3025
  });
3026
3026
  }
3027
3027
  sendIVSPlayerRecoverableErrorEvent(e, r) {
3028
3028
  this.eventHandler.callEvent({
3029
- event: O.IVS_PLAYER_RECOVERABLE_ERROR,
3029
+ event: N.IVS_PLAYER_RECOVERABLE_ERROR,
3030
3030
  timestamp: r,
3031
3031
  metaData: e
3032
3032
  });
3033
3033
  }
3034
3034
  sendIVSPlayerAnalyticsEvent(e, r) {
3035
3035
  this.eventHandler.callEvent({
3036
- event: O.IVS_PLAYER_ANALYTICS_EVENT,
3036
+ event: N.IVS_PLAYER_ANALYTICS_EVENT,
3037
3037
  timestamp: r,
3038
3038
  metaData: e
3039
3039
  });
3040
3040
  }
3041
3041
  sendIVSPlayerPlaybackRateChangedEvent(e, r) {
3042
3042
  this.eventHandler.callEvent({
3043
- event: O.IVS_PLAYER_PLAYBACK_RATE_CHANGED,
3043
+ event: N.IVS_PLAYER_PLAYBACK_RATE_CHANGED,
3044
3044
  timestamp: r,
3045
3045
  metaData: {
3046
3046
  updatedPlaybackRate: e
@@ -3049,14 +3049,14 @@ let G = class extends st {
3049
3049
  }
3050
3050
  sendIVSPlayerQualityChanged(e, r) {
3051
3051
  this.eventHandler.callEvent({
3052
- event: O.IVS_PLAYER_QUALITY_CHANGED,
3052
+ event: N.IVS_PLAYER_QUALITY_CHANGED,
3053
3053
  timestamp: r,
3054
3054
  metaData: e
3055
3055
  });
3056
3056
  }
3057
3057
  sendPlayerLiveLatency(e, r) {
3058
3058
  this.eventHandler.callEvent({
3059
- event: O.LIVESTREAM_LATENCY,
3059
+ event: N.LIVESTREAM_LATENCY,
3060
3060
  timestamp: r,
3061
3061
  metaData: {
3062
3062
  latency: e
@@ -3065,19 +3065,19 @@ let G = class extends st {
3065
3065
  }
3066
3066
  sendDisconnectEvent(e) {
3067
3067
  this.eventHandler.callEvent({
3068
- event: O.DISCONNECT,
3068
+ event: N.DISCONNECT,
3069
3069
  timestamp: e
3070
3070
  });
3071
3071
  }
3072
3072
  sendReconnectEvent(e) {
3073
3073
  this.eventHandler.callEvent({
3074
- event: O.RECONNECT_ATTEMPT,
3074
+ event: N.RECONNECT_ATTEMPT,
3075
3075
  timestamp: e
3076
3076
  });
3077
3077
  }
3078
3078
  expectedVideoResolution(e, r, i) {
3079
3079
  this.eventHandler.callEvent({
3080
- event: O.EXPECTED_VIDEO_RESOLUTION,
3080
+ event: N.EXPECTED_VIDEO_RESOLUTION,
3081
3081
  timestamp: i,
3082
3082
  metaData: {
3083
3083
  frameWidth: e,
@@ -3087,7 +3087,7 @@ let G = class extends st {
3087
3087
  }
3088
3088
  expectedScreenshareResolution(e, r, i) {
3089
3089
  this.eventHandler.callEvent({
3090
- event: O.EXPECTED_SCREENSHARE_RESOLUTION,
3090
+ event: N.EXPECTED_SCREENSHARE_RESOLUTION,
3091
3091
  timestamp: i,
3092
3092
  metaData: {
3093
3093
  frameWidth: e,
@@ -4579,9 +4579,9 @@ function $m(s, t, e, r, i, n) {
4579
4579
  break;
4580
4580
  }
4581
4581
  if (v) {
4582
- if (!S_(t, function(R, D) {
4583
- if (!Um(v, D) && (E === R || i(E, R, e, r, n)))
4584
- return v.push(D);
4582
+ if (!S_(t, function(R, O) {
4583
+ if (!Um(v, O) && (E === R || i(E, R, e, r, n)))
4584
+ return v.push(O);
4585
4585
  })) {
4586
4586
  f = !1;
4587
4587
  break;
@@ -4658,10 +4658,10 @@ function U_(s, t, e, r, i, n) {
4658
4658
  n.set(s, t), n.set(t, s);
4659
4659
  for (var w = o; ++g < d; ) {
4660
4660
  f = c[g];
4661
- var R = s[f], D = t[f];
4661
+ var R = s[f], O = t[f];
4662
4662
  if (r)
4663
- var U = o ? r(D, R, f, t, s, n) : r(R, D, f, s, t, n);
4664
- if (!(U === void 0 ? R === D || i(R, D, e, r, n) : U)) {
4663
+ var U = o ? r(O, R, f, t, s, n) : r(R, O, f, s, t, n);
4664
+ if (!(U === void 0 ? R === O || i(R, O, e, r, n) : U)) {
4665
4665
  _ = !1;
4666
4666
  break;
4667
4667
  }
@@ -4823,17 +4823,17 @@ function gh(s, t, e) {
4823
4823
  function R() {
4824
4824
  var H = jl();
4825
4825
  if (w(H))
4826
- return D(H);
4826
+ return O(H);
4827
4827
  c = setTimeout(R, _(H));
4828
4828
  }
4829
- function D(H) {
4829
+ function O(H) {
4830
4830
  return c = void 0, f && r ? v(H) : (r = i = void 0, o);
4831
4831
  }
4832
4832
  function U() {
4833
4833
  c !== void 0 && clearTimeout(c), l = 0, r = d = i = c = void 0;
4834
4834
  }
4835
4835
  function B() {
4836
- return c === void 0 ? o : D(jl());
4836
+ return c === void 0 ? o : O(jl());
4837
4837
  }
4838
4838
  function F() {
4839
4839
  var H = jl(), X = w(H);
@@ -5216,7 +5216,7 @@ class P {
5216
5216
  e,
5217
5217
  r,
5218
5218
  "metadata"
5219
- ), d = new Date(), l = j(N({
5219
+ ), d = new Date(), l = j(D({
5220
5220
  message: e,
5221
5221
  level: t
5222
5222
  }, c), {
@@ -5309,7 +5309,7 @@ class P {
5309
5309
  }
5310
5310
  }
5311
5311
  function VC(s) {
5312
- const t = N({}, s), e = /* @__PURE__ */ new Map(), r = (l, h) => (e.has(l) || e.set(l, /* @__PURE__ */ new Set()), e.get(l).add(h), () => {
5312
+ const t = D({}, s), e = /* @__PURE__ */ new Map(), r = (l, h) => (e.has(l) || e.set(l, /* @__PURE__ */ new Set()), e.get(l).add(h), () => {
5313
5313
  var g;
5314
5314
  return (g = e.get(l)) == null ? void 0 : g.delete(h);
5315
5315
  }), i = (l, h) => {
@@ -5631,8 +5631,8 @@ var FC = (s, t, e) => {
5631
5631
  for (const w of t) {
5632
5632
  let R;
5633
5633
  w < 0 ? R = h + w * _ * e : w > 0 ? R = h + w * E * e : R = h;
5634
- const [D, U, B] = FC(c, d, R / 100);
5635
- r.push(jC(D, U, B));
5634
+ const [O, U, B] = FC(c, d, R / 100);
5635
+ r.push(jC(O, U, B));
5636
5636
  }
5637
5637
  return r;
5638
5638
  }, bp = {
@@ -6320,8 +6320,8 @@ const xh = class extends Ot {
6320
6320
  drawEmptyTile(e, r, i, n) {
6321
6321
  if (a(this, Ut) === void 0)
6322
6322
  return;
6323
- const o = a(this, Ut).getContext("2d"), c = a(this, Ut).width, d = 0, l = 0, h = r - d * 2, g = i - d * 2, f = Math.floor(c / h), v = Math.floor(e / f), _ = e % f * (h + d) + d, w = v * (g + d) + d, { displayText: R, image: D } = n != null ? n : {};
6324
- o.fillStyle = R || D ? a(this, es).videoBackground : a(this, es).background, o.strokeStyle = a(this, es).brand, o.beginPath(), o.moveTo(_ + l, w), o.arcTo(_ + h, w, _ + h, w + l, l), o.arcTo(
6323
+ const o = a(this, Ut).getContext("2d"), c = a(this, Ut).width, d = 0, l = 0, h = r - d * 2, g = i - d * 2, f = Math.floor(c / h), v = Math.floor(e / f), _ = e % f * (h + d) + d, w = v * (g + d) + d, { displayText: R, image: O } = n != null ? n : {};
6324
+ o.fillStyle = R || O ? a(this, es).videoBackground : a(this, es).background, o.strokeStyle = a(this, es).brand, o.beginPath(), o.moveTo(_ + l, w), o.arcTo(_ + h, w, _ + h, w + l, l), o.arcTo(
6325
6325
  _ + h,
6326
6326
  w + g,
6327
6327
  _ + h - l,
@@ -6329,8 +6329,8 @@ const xh = class extends Ot {
6329
6329
  l
6330
6330
  ), o.arcTo(_, w + g, _, w + g - l, l), o.arcTo(_, w, _ + l, w, l), o.closePath(), o.fill(), o.stroke();
6331
6331
  const U = h / 6, B = h / 2 + _, F = g / 2 + w;
6332
- o.save(), (R || D) && (o.beginPath(), o.arc(B, F, U, 0, Math.PI * 2), o.fillStyle = a(this, es).brand, o.fill(), D ? (o.clip(), o.drawImage(
6333
- D,
6332
+ o.save(), (R || O) && (o.beginPath(), o.arc(B, F, U, 0, Math.PI * 2), o.fillStyle = a(this, es).brand, o.fill(), O ? (o.clip(), o.drawImage(
6333
+ O,
6334
6334
  B - U,
6335
6335
  F - U,
6336
6336
  U * 2,
@@ -6370,7 +6370,7 @@ const xh = class extends Ot {
6370
6370
  let g = 0;
6371
6371
  for (; g < a(this, we).width - 5 && d < i; ) {
6372
6372
  if ((l = o[d]) != null && l.enabled) {
6373
- const f = o[d].element, [v, E, _, w, R, D, U, B] = ZC(
6373
+ const f = o[d].element, [v, E, _, w, R, O, U, B] = ZC(
6374
6374
  g,
6375
6375
  c,
6376
6376
  e,
@@ -6378,7 +6378,7 @@ const xh = class extends Ot {
6378
6378
  f.videoWidth,
6379
6379
  f.videoHeight
6380
6380
  );
6381
- ((h = f == null ? void 0 : f.classList) == null ? void 0 : h.contains("mirror")) ? (n.save(), n.scale(-1, 1), n.drawImage(f, v, E, _, w, -1 * R, D, -1 * U, B), n.restore()) : n.drawImage(f, v, E, _, w, R, D, U, B), this.drawIcons(o[d], R, D, Math.max(U, B));
6381
+ ((h = f == null ? void 0 : f.classList) == null ? void 0 : h.contains("mirror")) ? (n.save(), n.scale(-1, 1), n.drawImage(f, v, E, _, w, -1 * R, O, -1 * U, B), n.restore()) : n.drawImage(f, v, E, _, w, R, O, U, B), this.drawIcons(o[d], R, O, Math.max(U, B));
6382
6382
  } else
6383
6383
  this.drawEmptyTile(d, e, r, o[d]);
6384
6384
  d += 1, g += e;
@@ -6525,7 +6525,7 @@ const xh = class extends Ot {
6525
6525
  }
6526
6526
  });
6527
6527
  const i = a(this, it)[e];
6528
- i && (a(this, it)[e] = N(N({}, i), r));
6528
+ i && (a(this, it)[e] = D(D({}, i), r));
6529
6529
  }
6530
6530
  /**
6531
6531
  * Remove the video source for the participant
@@ -11740,7 +11740,7 @@ class or {
11740
11740
  }
11741
11741
  getChatMessagesPaginated(t, e, r, i) {
11742
11742
  return u(this, null, function* () {
11743
- const n = N({
11743
+ const n = D({
11744
11744
  timeStamp: t,
11745
11745
  size: e,
11746
11746
  from: 0,
@@ -11961,16 +11961,15 @@ function hf(s) {
11961
11961
  }
11962
11962
  class vu extends Error {
11963
11963
  constructor(e) {
11964
- var t = (...args) => {
11965
- super(...args);
11966
- /** HTTP status code. Present only for HTTP error responses (4xx/5xx). */
11967
- p(this, "status");
11968
- /** Full response from the server. Present only for HTTP error responses. */
11969
- p(this, "response");
11970
- /** Whether the request timed out (AbortController fired before a response arrived). */
11971
- p(this, "isTimeout");
11972
- };
11973
- e instanceof Error ? (t(e.message), this.stack = e.stack, this.isTimeout = e.name === "AbortError") : (t(`Request failed with status ${e.status}`), this.status = e.status, this.response = e, this.isTimeout = !1), this.name = "RequestError";
11964
+ const r = e instanceof Error ? e.message : `Request failed with status ${e.status}`;
11965
+ super(r);
11966
+ /** HTTP status code. Present only for HTTP error responses (4xx/5xx). */
11967
+ p(this, "status");
11968
+ /** Full response from the server. Present only for HTTP error responses. */
11969
+ p(this, "response");
11970
+ /** Whether the request timed out (AbortController fired before a response arrived). */
11971
+ p(this, "isTimeout");
11972
+ e instanceof Error ? (this.stack = e.stack, this.isTimeout = e.name === "AbortError") : (this.status = e.status, this.response = e, this.isTimeout = !1), this.name = "RequestError";
11974
11973
  }
11975
11974
  /** Whether this is an HTTP error response (server responded with 4xx/5xx). */
11976
11975
  get isHttpError() {
@@ -12005,7 +12004,7 @@ class Yp {
12005
12004
  request(t) {
12006
12005
  return u(this, null, function* () {
12007
12006
  var g;
12008
- const e = ((g = t.method) == null ? void 0 : g.toUpperCase()) || "GET", r = this.buildURL(t.url || "", t.params), i = N(N({}, this.defaults.headers.common), t.headers);
12007
+ const e = ((g = t.method) == null ? void 0 : g.toUpperCase()) || "GET", r = this.buildURL(t.url || "", t.params), i = D(D({}, this.defaults.headers.common), t.headers);
12009
12008
  e !== "GET" && e !== "HEAD" && t.data && !i["Content-Type"] && (i["Content-Type"] = "application/json");
12010
12009
  const o = i["Content-Type"] === "application/json" ? JSON.stringify(t.data) : t.data, c = {
12011
12010
  method: e,
@@ -12024,7 +12023,7 @@ class Yp {
12024
12023
  E.headers.forEach((U, B) => {
12025
12024
  R[B] = U;
12026
12025
  });
12027
- const D = {
12026
+ const O = {
12028
12027
  data: _,
12029
12028
  status: E.status,
12030
12029
  statusText: E.statusText,
@@ -12032,11 +12031,11 @@ class Yp {
12032
12031
  config: t
12033
12032
  };
12034
12033
  if (!E.ok)
12035
- throw D;
12036
- return D;
12034
+ throw O;
12035
+ return O;
12037
12036
  } catch (f) {
12038
12037
  if (f instanceof Error && l > 0)
12039
- return yield new Promise((v) => setTimeout(v, h)), this.defaults.baseURL === ii.apiBase.prod ? this.defaults.baseURL = ii.apiBase.prodAlternate : this.defaults.baseURL === ii.apiBase.prodAlternate && (this.defaults.baseURL = ii.apiBase.prod), this.request(j(N({}, t), {
12038
+ return yield new Promise((v) => setTimeout(v, h)), this.defaults.baseURL === ii.apiBase.prod ? this.defaults.baseURL = ii.apiBase.prodAlternate : this.defaults.baseURL === ii.apiBase.prodAlternate && (this.defaults.baseURL = ii.apiBase.prod), this.request(j(D({}, t), {
12040
12039
  retry: l - 1
12041
12040
  }));
12042
12041
  throw f;
@@ -12045,7 +12044,7 @@ class Yp {
12045
12044
  }
12046
12045
  get(r) {
12047
12046
  return u(this, arguments, function* (t, e = {}) {
12048
- return this.request(j(N({}, e), {
12047
+ return this.request(j(D({}, e), {
12049
12048
  method: "GET",
12050
12049
  url: t
12051
12050
  }));
@@ -12053,7 +12052,7 @@ class Yp {
12053
12052
  }
12054
12053
  post(i, n) {
12055
12054
  return u(this, arguments, function* (t, e, r = {}) {
12056
- return this.request(j(N({}, r), {
12055
+ return this.request(j(D({}, r), {
12057
12056
  method: "POST",
12058
12057
  url: t,
12059
12058
  data: e
@@ -12062,7 +12061,7 @@ class Yp {
12062
12061
  }
12063
12062
  put(i, n) {
12064
12063
  return u(this, arguments, function* (t, e, r = {}) {
12065
- return this.request(j(N({}, r), {
12064
+ return this.request(j(D({}, r), {
12066
12065
  method: "PUT",
12067
12066
  url: t,
12068
12067
  data: e
@@ -12139,8 +12138,8 @@ class c0 {
12139
12138
  isOnline: navigator.onLine ? "online" : "offline"
12140
12139
  }
12141
12140
  });
12142
- const D = R instanceof Error && R.message || "Network request failed";
12143
- throw new k(D, "0011"), new vu(R);
12141
+ const O = R instanceof Error && R.message || "Network request failed";
12142
+ throw new k(O, "0011"), new vu(R);
12144
12143
  }
12145
12144
  });
12146
12145
  }
@@ -12289,7 +12288,7 @@ class Rs extends c0 {
12289
12288
  }
12290
12289
  startRecording(e, r) {
12291
12290
  return u(this, null, function* () {
12292
- return (yield this.requests.post("/v2/recordings", j(N({}, hf(e)), {
12291
+ return (yield this.requests.post("/v2/recordings", j(D({}, hf(e)), {
12293
12292
  meeting_id: this.context.getValue("meetingId"),
12294
12293
  allow_multiple_recordings: !!r
12295
12294
  }))).data.data.id;
@@ -12575,7 +12574,7 @@ let zt = (pg = class extends Ot {
12575
12574
  */
12576
12575
  sendCustomMessage(t, e) {
12577
12576
  return u(this, null, function* () {
12578
- var n, o, c, d, l, h, g, f, v, E, _, w, R, D, U;
12577
+ var n, o, c, d, l, h, g, f, v, E, _, w, R, O, U;
12579
12578
  if (e && e.length > 0) {
12580
12579
  if (!((n = a(this, te).permissions) != null && n.chatPrivate.canSend) || !((o = a(this, te).permissions) != null && o.chatPrivate.files) || !((c = a(this, te).permissions) != null && c.chatPrivate.text)) {
12581
12580
  this.logger.error("sendCustomMessage::private_chat_permission_denied");
@@ -12599,14 +12598,14 @@ let zt = (pg = class extends Ot {
12599
12598
  } catch (F) {
12600
12599
  throw new k("Error sending image message.", "0500", this.logger);
12601
12600
  }
12602
- }), i = j(N({}, t), {
12601
+ }), i = j(D({}, t), {
12603
12602
  files: yield Promise.all((_ = (E = t.files) != null ? E : []) == null ? void 0 : _.map((B) => u(this, null, function* () {
12604
12603
  return r(B);
12605
12604
  }))),
12606
12605
  images: yield Promise.all((R = (w = t.images) != null ? w : []) == null ? void 0 : R.map((B) => u(this, null, function* () {
12607
12606
  return r(B);
12608
12607
  }))),
12609
- videos: yield Promise.all((U = (D = t.videos) != null ? D : []) == null ? void 0 : U.map((B) => u(this, null, function* () {
12608
+ videos: yield Promise.all((U = (O = t.videos) != null ? O : []) == null ? void 0 : U.map((B) => u(this, null, function* () {
12610
12609
  return r(B);
12611
12610
  })))
12612
12611
  });
@@ -12903,7 +12902,7 @@ const pr = (gg = class {
12903
12902
  });
12904
12903
  }
12905
12904
  static formatMessage(s) {
12906
- return j(N({}, s), {
12905
+ return j(D({}, s), {
12907
12906
  time: new Date(s.time),
12908
12907
  type: g0[s.type]
12909
12908
  });
@@ -13557,7 +13556,7 @@ const Tf = (Tg = class {
13557
13556
  if ("type" in s) {
13558
13557
  if (s.type !== "spotlight")
13559
13558
  return;
13560
- t = N(N({}, s), s.payload);
13559
+ t = D(D({}, s), s.payload);
13561
13560
  } else if ("roomMessageType" in s) {
13562
13561
  if (s.roomMessageType !== "spotlight")
13563
13562
  return;
@@ -13582,7 +13581,7 @@ const Tf = (Tg = class {
13582
13581
  if ("type" in s) {
13583
13582
  if (s.type !== "spotlight")
13584
13583
  return;
13585
- t = N(N({}, s), s.payload);
13584
+ t = D(D({}, s), s.payload);
13586
13585
  } else if ("roomMessageType" in s) {
13587
13586
  if (s.roomMessageType !== "spotlight")
13588
13587
  return;
@@ -15433,7 +15432,7 @@ class lM {
15433
15432
  max: i
15434
15433
  }
15435
15434
  };
15436
- return o !== void 0 && ["monitor", "browser", "window"].includes(o) && (d = j(N({}, d), { displaySurface: o })), c !== void 0 && (d = j(N({}, d), { selfBrowserSurface: c })), {
15435
+ return o !== void 0 && ["monitor", "browser", "window"].includes(o) && (d = j(D({}, d), { displaySurface: o })), c !== void 0 && (d = j(D({}, d), { selfBrowserSurface: c })), {
15437
15436
  audio: !0,
15438
15437
  video: d
15439
15438
  };
@@ -15584,8 +15583,8 @@ let Dt = (_g = class extends uM {
15584
15583
  const _ = E.getAudioTracks()[0];
15585
15584
  let w = E.getVideoTracks()[0];
15586
15585
  if (this.permissions.audio = "ACCEPTED", this.permissions.video = "ACCEPTED", w.label.includes("OBS Virtual")) {
15587
- const D = (yield this.getVideoInputDevices()).find((U) => U.label.includes("OBS Virtual"));
15588
- w = yield this.getVideoTrack(D.deviceId);
15586
+ const O = (yield this.getVideoInputDevices()).find((U) => U.label.includes("OBS Virtual"));
15587
+ w = yield this.getVideoTrack(O.deviceId);
15589
15588
  }
15590
15589
  return a(this, $e).getValue("peerSessionStore").emit(b.MEDIA_PERMISSION_UPDATE, {
15591
15590
  message: this.permissions.audio,
@@ -15959,7 +15958,7 @@ class _h {
15959
15958
  p(this, "_AudioContext");
15960
15959
  p(this, "audioContext");
15961
15960
  p(this, "_audioContextRefContainers");
15962
- const e = N({ AudioContext: fM }, t);
15961
+ const e = D({ AudioContext: fM }, t);
15963
15962
  Object.defineProperties(this, {
15964
15963
  _AudioContext: {
15965
15964
  value: e.AudioContext
@@ -16810,7 +16809,7 @@ const cn = class {
16810
16809
  return (i = (r = (e = (t = a(this, at)) == null ? void 0 : t.media) == null ? void 0 : e.video) == null ? void 0 : r.simulcast) != null ? i : !1;
16811
16810
  }
16812
16811
  get mediaConstraints() {
16813
- var t, e, r, i, n, o, c, d, l, h, g, f, v, E, _, w, R, D, U, B, F, H, X, Le;
16812
+ var t, e, r, i, n, o, c, d, l, h, g, f, v, E, _, w, R, O, U, B, F, H, X, Le;
16814
16813
  return {
16815
16814
  audio: {
16816
16815
  enableStereo: (i = (r = (e = (t = a(this, at)) == null ? void 0 : t.media) == null ? void 0 : e.audio) == null ? void 0 : r.enableStereo) != null ? i : en.audio.enableStereo,
@@ -16821,7 +16820,7 @@ const cn = class {
16821
16820
  frameRate: (w = (_ = (E = (v = a(this, at)) == null ? void 0 : v.media) == null ? void 0 : E.video) == null ? void 0 : _.frameRate) != null ? w : en.video.frameRate
16822
16821
  },
16823
16822
  screenshare: {
16824
- quality: (B = (U = (D = (R = a(this, at)) == null ? void 0 : R.media) == null ? void 0 : D.screenshare) == null ? void 0 : U.quality) != null ? B : en.screenshare.quality,
16823
+ quality: (B = (U = (O = (R = a(this, at)) == null ? void 0 : R.media) == null ? void 0 : O.screenshare) == null ? void 0 : U.quality) != null ? B : en.screenshare.quality,
16825
16824
  frameRate: (Le = (X = (H = (F = a(this, at)) == null ? void 0 : F.media) == null ? void 0 : H.screenshare) == null ? void 0 : X.frameRate) != null ? Le : en.screenshare.frameRate
16826
16825
  }
16827
16826
  };
@@ -17187,7 +17186,7 @@ Ke = new WeakMap(), Cr = new WeakMap(), wr = new WeakMap(), bd = new WeakSet(),
17187
17186
  i = [...n, ...e];
17188
17187
  break;
17189
17188
  case "[object Object]":
17190
- i = N(N({}, n), e);
17189
+ i = D(D({}, n), e);
17191
17190
  break;
17192
17191
  case "[object Map]":
17193
17192
  i = new Map([...n, ...e]);
@@ -17464,11 +17463,11 @@ let ir = (Cg = class extends Ot {
17464
17463
  audioMuted: _,
17465
17464
  audioTrack: w,
17466
17465
  videoEnabled: R = !1,
17467
- videoTrack: D,
17466
+ videoTrack: O,
17468
17467
  producers: U,
17469
17468
  metadata: B
17470
17469
  } = e;
17471
- this.id = o, this.userId = c, this.name = d, this.device = l, this.picture = h, this.isHost = g, this.flags = f, this.manualProducerConfig = bC, S(this, $n, v != null ? v : "ON_STAGE"), this.customParticipantId = E, this.audioEnabled = !_, this.audioTrack = w, this.videoEnabled = R, this.videoTrack = D, this.screenShareTracks = {
17470
+ this.id = o, this.userId = c, this.name = d, this.device = l, this.picture = h, this.isHost = g, this.flags = f, this.manualProducerConfig = bC, S(this, $n, v != null ? v : "ON_STAGE"), this.customParticipantId = E, this.audioEnabled = !_, this.audioTrack = w, this.videoEnabled = R, this.videoTrack = O, this.screenShareTracks = {
17472
17471
  audio: void 0,
17473
17472
  video: void 0
17474
17473
  }, this.producers = U != null ? U : [], this.presetName = B == null ? void 0 : B.preset_name, S(this, Un, !1), S(this, $s, r), S(this, Bo, i), this.setupEvents(), this.updateVideo = this.updateVideo.bind(this), V(this, Ho, Mu).call(this);
@@ -17490,7 +17489,7 @@ let ir = (Cg = class extends Ot {
17490
17489
  * @param {boolean} [emitEvent=true]
17491
17490
  */
17492
17491
  setVideoEnabled(t, e = !0) {
17493
- this.videoEnabled = t, e && (this.logger.info("Participant::setVideoEnabled::videoUpdate", N({}, ri(this))), this.emit("videoUpdate", {
17492
+ this.videoEnabled = t, e && (this.logger.info("Participant::setVideoEnabled::videoUpdate", D({}, ri(this))), this.emit("videoUpdate", {
17494
17493
  videoEnabled: this.videoEnabled,
17495
17494
  videoTrack: this.videoTrack
17496
17495
  }));
@@ -17501,7 +17500,7 @@ let ir = (Cg = class extends Ot {
17501
17500
  * @param {boolean} [emitEvent=true]
17502
17501
  */
17503
17502
  setAudioEnabled(t, e = !0) {
17504
- this.audioEnabled = t, e && (this.logger.info("Participant::setAudioEnabled::audioUpdate", N({}, ri(this))), this.emit("audioUpdate", {
17503
+ this.audioEnabled = t, e && (this.logger.info("Participant::setAudioEnabled::audioUpdate", D({}, ri(this))), this.emit("audioUpdate", {
17505
17504
  audioEnabled: this.audioEnabled,
17506
17505
  audioTrack: this.audioTrack
17507
17506
  }));
@@ -18110,13 +18109,13 @@ let Yt = (wg = class extends Ot {
18110
18109
  throw new k("MANUAL subscription mode was not activated.", "1206");
18111
18110
  t.forEach((i) => {
18112
18111
  const n = this.joined.get(i);
18113
- n && (e.includes("audio") && (n.manualProducerConfig = j(N({}, n.manualProducerConfig), {
18112
+ n && (e.includes("audio") && (n.manualProducerConfig = j(D({}, n.manualProducerConfig), {
18114
18113
  audio: !0
18115
- }), this.audioSubscribed.has(n.id) || this.audioSubscribed.add(n)), e.includes("video") && (n.manualProducerConfig = j(N({}, n.manualProducerConfig), {
18114
+ }), this.audioSubscribed.has(n.id) || this.audioSubscribed.add(n)), e.includes("video") && (n.manualProducerConfig = j(D({}, n.manualProducerConfig), {
18116
18115
  video: !0
18117
- }), this.videoSubscribed.has(n.id) || this.videoSubscribed.add(n)), e.includes("screenshareAudio") && (n.manualProducerConfig = j(N({}, n.manualProducerConfig), {
18116
+ }), this.videoSubscribed.has(n.id) || this.videoSubscribed.add(n)), e.includes("screenshareAudio") && (n.manualProducerConfig = j(D({}, n.manualProducerConfig), {
18118
18117
  screenshareAudio: !0
18119
- }), this.audioSubscribed.has(n.id) || this.audioSubscribed.add(n)), e.includes("screenshareVideo") && (n.manualProducerConfig = j(N({}, n.manualProducerConfig), {
18118
+ }), this.audioSubscribed.has(n.id) || this.audioSubscribed.add(n)), e.includes("screenshareVideo") && (n.manualProducerConfig = j(D({}, n.manualProducerConfig), {
18120
18119
  screenshareVideo: !0
18121
18120
  }), this.videoSubscribed.has(n.id) || this.videoSubscribed.add(n)));
18122
18121
  }), a(this, be).getValue("peerSessionStore").emit(b.UPDATE_ACTIVE, { viewMode: this.viewMode, page: this.currentPage });
@@ -18132,13 +18131,13 @@ let Yt = (wg = class extends Ot {
18132
18131
  throw new k("MANUAL subscription mode was not activated.", "1206");
18133
18132
  t.forEach((i) => {
18134
18133
  const n = this.joined.get(i);
18135
- n && (e.includes("audio") && (n.manualProducerConfig = j(N({}, n.manualProducerConfig), {
18134
+ n && (e.includes("audio") && (n.manualProducerConfig = j(D({}, n.manualProducerConfig), {
18136
18135
  audio: !1
18137
- }), n.manualProducerConfig.screenshareAudio || this.audioSubscribed.delete(n.id)), e.includes("video") && (n.manualProducerConfig = j(N({}, n.manualProducerConfig), {
18136
+ }), n.manualProducerConfig.screenshareAudio || this.audioSubscribed.delete(n.id)), e.includes("video") && (n.manualProducerConfig = j(D({}, n.manualProducerConfig), {
18138
18137
  video: !1
18139
- }), n.manualProducerConfig.screenshareVideo || this.videoSubscribed.delete(n.id)), e.includes("screenshareAudio") && (n.manualProducerConfig = j(N({}, n.manualProducerConfig), {
18138
+ }), n.manualProducerConfig.screenshareVideo || this.videoSubscribed.delete(n.id)), e.includes("screenshareAudio") && (n.manualProducerConfig = j(D({}, n.manualProducerConfig), {
18140
18139
  screenshareAudio: !1
18141
- }), n.manualProducerConfig.audio || this.audioSubscribed.delete(n.id)), e.includes("screenshareVideo") && (n.manualProducerConfig = j(N({}, n.manualProducerConfig), {
18140
+ }), n.manualProducerConfig.audio || this.audioSubscribed.delete(n.id)), e.includes("screenshareVideo") && (n.manualProducerConfig = j(D({}, n.manualProducerConfig), {
18142
18141
  screenshareVideo: !1
18143
18142
  }), n.manualProducerConfig.video || this.videoSubscribed.delete(n.id)));
18144
18143
  }), a(this, be).getValue("peerSessionStore").emit(b.UPDATE_ACTIVE, { viewMode: this.viewMode, page: this.currentPage });
@@ -18686,16 +18685,16 @@ const Uf = (Rg = class {
18686
18685
  const v = this.participants.joined.get(f.id), E = (w = (_ = f.producers) == null ? void 0 : _.filter((R) => R.kind === "video")) != null ? w : [];
18687
18686
  v && (E != null && E.length) && E.forEach((R) => {
18688
18687
  var B, F, H, X;
18689
- const D = ((F = (B = v.manualProducerConfig) == null ? void 0 : B.video) != null ? F : !0) && R.kind === "video" && !R.screenShare, U = ((X = (H = v.manualProducerConfig) == null ? void 0 : H.screenshareVideo) != null ? X : !0) && R.kind === "video" && R.screenShare;
18690
- (D || U) && (R.pause || s.push(R));
18688
+ const O = ((F = (B = v.manualProducerConfig) == null ? void 0 : B.video) != null ? F : !0) && R.kind === "video" && !R.screenShare, U = ((X = (H = v.manualProducerConfig) == null ? void 0 : H.screenshareVideo) != null ? X : !0) && R.kind === "video" && R.screenShare;
18689
+ (O || U) && (R.pause || s.push(R));
18691
18690
  });
18692
18691
  }), this.participants.audioSubscribed.forEach((f) => {
18693
18692
  var _, w;
18694
18693
  const v = this.participants.joined.get(f.id), E = (w = (_ = f.producers) == null ? void 0 : _.filter((R) => R.kind === "audio")) != null ? w : [];
18695
18694
  v && (E != null && E.length) && E.forEach((R) => {
18696
18695
  var B, F, H, X;
18697
- const D = ((F = (B = v.manualProducerConfig) == null ? void 0 : B.audio) != null ? F : !0) && R.kind === "audio" && !R.screenShare, U = ((X = (H = v.manualProducerConfig) == null ? void 0 : H.screenshareAudio) != null ? X : !0) && R.kind === "audio" && R.screenShare;
18698
- (D || U) && s.push(R);
18696
+ const O = ((F = (B = v.manualProducerConfig) == null ? void 0 : B.audio) != null ? F : !0) && R.kind === "audio" && !R.screenShare, U = ((X = (H = v.manualProducerConfig) == null ? void 0 : H.screenshareAudio) != null ? X : !0) && R.kind === "audio" && R.screenShare;
18697
+ (O || U) && s.push(R);
18699
18698
  });
18700
18699
  }), s = RC(s, (f) => f.producerId);
18701
18700
  const t = /* @__PURE__ */ new Map();
@@ -18756,7 +18755,7 @@ const Uf = (Rg = class {
18756
18755
  }
18757
18756
  createParticipantObjFromSocketPeer(s) {
18758
18757
  const t = Uf.formatSocketPeerMessage(s);
18759
- return new ir(this.context, j(N({}, t), {
18758
+ return new ir(this.context, j(D({}, t), {
18760
18759
  isHost: !1,
18761
18760
  videoEnabled: !1,
18762
18761
  audioMuted: !0,
@@ -18789,7 +18788,7 @@ const Uf = (Rg = class {
18789
18788
  maskedName: [...(e == null ? void 0 : e.name) || ""].map((r, i) => i % 2 ? "*" : r).join("")
18790
18789
  }
18791
18790
  }), this.logger.info(`onParticipantMediaJoined: peer ${s} has joined media room. Processing.`), t.forEach((r) => {
18792
- r.kind === tr.AUDIO && !r.screenShare ? e.setAudioEnabled(!r.pause) : r.kind === tr.VIDEO && !r.screenShare && (e.setVideoEnabled(!r.pause), this.updatePipSource(e.id, !r.pause)), e.producers.push(j(N({}, r), {
18791
+ r.kind === tr.AUDIO && !r.screenShare ? e.setAudioEnabled(!r.pause) : r.kind === tr.VIDEO && !r.screenShare && (e.setVideoEnabled(!r.pause), this.updatePipSource(e.id, !r.pause)), e.producers.push(j(D({}, r), {
18793
18792
  producingTransportId: r.producingTransportId,
18794
18793
  kind: r.kind === tr.AUDIO ? "audio" : "video",
18795
18794
  producingPeerId: s,
@@ -20138,7 +20137,7 @@ let We = (bg = class extends $f {
20138
20137
  t && t.onError((e) => {
20139
20138
  this.emit("autoplayError", e);
20140
20139
  }), this.localMediaHandler.on("AUDIO_TRACK_CHANGE", () => u(this, null, function* () {
20141
- if (this.logger.info("Self::setupEvents::AUDIO_TRACK_CHANGE", N({}, ri(this))), a(this, Oe, Ve) && this.audioEnabled)
20140
+ if (this.logger.info("Self::setupEvents::AUDIO_TRACK_CHANGE", D({}, ri(this))), a(this, Oe, Ve) && this.audioEnabled)
20142
20141
  try {
20143
20142
  yield a(this, He, Ye).shareMic(this.audioTrack);
20144
20143
  } catch (e) {
@@ -20151,7 +20150,7 @@ let We = (bg = class extends $f {
20151
20150
  audioTrack: this.audioTrack
20152
20151
  });
20153
20152
  })), this.localMediaHandler.on("VIDEO_TRACK_CHANGE", () => u(this, null, function* () {
20154
- if (this.logger.info("Self::setupEvents::VIDEO_TRACK_CHANGE", N({}, ri(this))), a(this, Oe, Ve) && this.rawVideoTrack === void 0)
20153
+ if (this.logger.info("Self::setupEvents::VIDEO_TRACK_CHANGE", D({}, ri(this))), a(this, Oe, Ve) && this.rawVideoTrack === void 0)
20155
20154
  this.logger.info("Self::VIDEO_TRACK_CHANGE::Forcing_disable_video"), this.disableVideo();
20156
20155
  else if (this.videoEnabled && a(this, Oe, Ve))
20157
20156
  try {
@@ -20193,12 +20192,12 @@ let We = (bg = class extends $f {
20193
20192
  }
20194
20193
  ), this.screenShareEnabled && (yield this.localMediaHandler.disableScreenShare());
20195
20194
  }
20196
- this.logger.info("Self::setupEvents::SCREENSHARE_TRACK_CHANGE", N({}, ri(this))), this.emit("screenShareUpdate", {
20195
+ this.logger.info("Self::setupEvents::SCREENSHARE_TRACK_CHANGE", D({}, ri(this))), this.emit("screenShareUpdate", {
20197
20196
  screenShareEnabled: this.screenShareEnabled,
20198
20197
  screenShareTracks: this.screenShareTracks
20199
20198
  });
20200
20199
  })), this.localMediaHandler.on("SCREENSHARE_ENDED", () => u(this, null, function* () {
20201
- this.logger.log("Disabling screenshare due to SCREENSHARE_ENDED"), yield this.disableScreenShare(), this.logger.info("Self::setupEvents::SCREENSHARE_ENDED", N({}, ri(this)));
20200
+ this.logger.log("Disabling screenshare due to SCREENSHARE_ENDED"), yield this.disableScreenShare(), this.logger.info("Self::setupEvents::SCREENSHARE_ENDED", D({}, ri(this)));
20202
20201
  })), this.localMediaHandler.on("AUDIO_TRACK_SILENT", () => {
20203
20202
  var e;
20204
20203
  (e = a(this, Be)) == null || e.getValue("callstats").mediaTrackMuted("AUDIO");
@@ -20298,7 +20297,7 @@ let We = (bg = class extends $f {
20298
20297
  this.emit("videoUpdate", {
20299
20298
  videoEnabled: this.videoEnabled,
20300
20299
  videoTrack: this.videoTrack
20301
- }), this.logger.info("Self.enableVideo", N({}, ri(this)));
20300
+ }), this.logger.info("Self.enableVideo", D({}, ri(this)));
20302
20301
  }
20303
20302
  });
20304
20303
  }
@@ -20728,7 +20727,7 @@ const tg = (s) => new Promise((t) => setTimeout(t, s));
20728
20727
  function Bf(s, t) {
20729
20728
  return u(this, null, function* () {
20730
20729
  return new Promise((e, r) => u(this, null, function* () {
20731
- const { strategy: i, maxRetryCount: n, delayTime: o } = N({
20730
+ const { strategy: i, maxRetryCount: n, delayTime: o } = D({
20732
20731
  strategy: "linear",
20733
20732
  maxRetryCount: 3,
20734
20733
  delayTime: 10
@@ -21077,7 +21076,7 @@ class kh extends Ml {
21077
21076
  onTrackHandler: c
21078
21077
  }) {
21079
21078
  this.logger.debug("HandlerInterface::init()"), this._direction = e, this.pc = new RTCPeerConnection(
21080
- N({
21079
+ D({
21081
21080
  iceServers: r || [],
21082
21081
  iceTransportPolicy: i || "all",
21083
21082
  bundlePolicy: "max-bundle",
@@ -21090,7 +21089,7 @@ class kh extends Ml {
21090
21089
  }
21091
21090
  connect() {
21092
21091
  return u(this, null, function* () {
21093
- this.pc.addTransceiver("audio", { direction: "sendonly" }), this.pc.addTransceiver("video", N({
21092
+ this.pc.addTransceiver("audio", { direction: "sendonly" }), this.pc.addTransceiver("video", D({
21094
21093
  direction: "sendonly"
21095
21094
  }, this._direction === "send" ? {
21096
21095
  sendEncodings: [
@@ -21182,7 +21181,7 @@ class kh extends Ml {
21182
21181
  const n = i.sender.getParameters();
21183
21182
  n.encodings.forEach(
21184
21183
  (o, c) => {
21185
- n.encodings[c] = N(N({}, o), r);
21184
+ n.encodings[c] = D(D({}, o), r);
21186
21185
  }
21187
21186
  ), yield i.sender.setParameters(n);
21188
21187
  });
@@ -21298,7 +21297,7 @@ class Ah extends kh {
21298
21297
  onTrackHandler: o
21299
21298
  }) {
21300
21299
  this._direction = t, this.pc = new RTCPeerConnection(
21301
- N({
21300
+ D({
21302
21301
  iceServers: e || [],
21303
21302
  iceTransportPolicy: r || "all",
21304
21303
  bundlePolicy: "max-bundle",
@@ -21405,7 +21404,7 @@ class fd extends kh {
21405
21404
  screenShare: n
21406
21405
  }) {
21407
21406
  this._assertSendDirection();
21408
- const c = this.supportsSendEncodings && r !== void 0 ? { sendEncodings: r } : {}, d = this.pc.addTransceiver(e, N({
21407
+ const c = this.supportsSendEncodings && r !== void 0 ? { sendEncodings: r } : {}, d = this.pc.addTransceiver(e, D({
21409
21408
  direction: "sendonly",
21410
21409
  streams: [
21411
21410
  n ? this._sendScreenShareStream : this._sendWebStream
@@ -21418,8 +21417,8 @@ class fd extends kh {
21418
21417
  }
21419
21418
  const l = (f, v) => {
21420
21419
  var B;
21421
- const E = Zt.parse(f), _ = E.media[E.media.length - 1], w = _.rtp.filter((F) => v.some((H) => H.name === F.codec)), R = _.fmtp.filter((F) => w.some((H) => H.payload === F.payload)), D = (B = _.rtcpFb) == null ? void 0 : B.filter((F) => w.some((H) => H.payload === F.payload)), U = w.map((F) => F.payload);
21422
- return E.media[E.media.length - 1].rtp = w, E.media[E.media.length - 1].fmtp = R, E.media[E.media.length - 1].rtcpFb = D, E.media[E.media.length - 1].payloads = U.join(" "), Zt.write(E);
21420
+ const E = Zt.parse(f), _ = E.media[E.media.length - 1], w = _.rtp.filter((F) => v.some((H) => H.name === F.codec)), R = _.fmtp.filter((F) => w.some((H) => H.payload === F.payload)), O = (B = _.rtcpFb) == null ? void 0 : B.filter((F) => w.some((H) => H.payload === F.payload)), U = w.map((F) => F.payload);
21421
+ return E.media[E.media.length - 1].rtp = w, E.media[E.media.length - 1].fmtp = R, E.media[E.media.length - 1].rtcpFb = O, E.media[E.media.length - 1].payloads = U.join(" "), Zt.write(E);
21423
21422
  }, h = yield this.pc.createOffer();
21424
21423
  if (h.sdp = l(h.sdp, i), this.logger.debug(`[SDP] send() | calling pc.setLocalDescription() [offer:${JSON.stringify(h)}]`), yield this.pc.setLocalDescription(h), e === "audio" || e.kind === "audio") {
21425
21424
  const { enableDtx: f, enableStereo: v } = this, E = this.enableHighBitrate ? v ? 128e3 : 64e3 : v ? 64e3 : 32e3;
@@ -21670,7 +21669,7 @@ Wo = new WeakMap(), wi = new WeakMap(), Ss = new WeakMap(), Ld = new WeakMap(),
21670
21669
  try {
21671
21670
  this.track.removeEventListener("ended", V(this, Jo, Vu)), this.track.stop();
21672
21671
  } catch (e) {
21673
- this.logger.error("Consumer::destroyTrack()", j(N({}, a(this, vs, gr)), {
21672
+ this.logger.error("Consumer::destroyTrack()", j(D({}, a(this, vs, gr)), {
21674
21673
  error: e
21675
21674
  }));
21676
21675
  }
@@ -21811,7 +21810,7 @@ class oD extends Ml {
21811
21810
  try {
21812
21811
  e.stop();
21813
21812
  } catch (i) {
21814
- this.logger.error("Producer::replaceTrack", j(N({}, a(this, bt, Xt)), {
21813
+ this.logger.error("Producer::replaceTrack", j(D({}, a(this, bt, Xt)), {
21815
21814
  error: i
21816
21815
  }));
21817
21816
  }
@@ -21863,7 +21862,7 @@ class oD extends Ml {
21863
21862
  try {
21864
21863
  a(this, ze).removeEventListener("ended", this._onTrackEnded), a(this, zn) && a(this, ze).stop();
21865
21864
  } catch (r) {
21866
- this.logger.error(`Producer::_destroyTrack trackId: ${(e = this.track) == null ? void 0 : e.id}`, j(N({}, a(this, bt, Xt)), {
21865
+ this.logger.error(`Producer::_destroyTrack trackId: ${(e = this.track) == null ? void 0 : e.id}`, j(D({}, a(this, bt, Xt)), {
21867
21866
  error: r
21868
21867
  }));
21869
21868
  }
@@ -21990,7 +21989,7 @@ Dr = new WeakMap(), $d = new WeakMap(), bi = new WeakMap(), p(Zr, "createRequest
21990
21989
  throw new Error("rpc fields are internal values");
21991
21990
  return {
21992
21991
  type: e.type,
21993
- payload: j(N({}, e.payload), {
21992
+ payload: j(D({}, e.payload), {
21994
21993
  _bolt: {
21995
21994
  id: eu(8),
21996
21995
  type: "REQUEST",
@@ -22004,7 +22003,7 @@ Dr = new WeakMap(), $d = new WeakMap(), bi = new WeakMap(), p(Zr, "createRequest
22004
22003
  throw new Error("rpc fields are internal values");
22005
22004
  return {
22006
22005
  type: r.type,
22007
- payload: j(N({}, r.payload), {
22006
+ payload: j(D({}, r.payload), {
22008
22007
  _bolt: {
22009
22008
  id: e,
22010
22009
  type: "RESPONSE",
@@ -22018,7 +22017,7 @@ Dr = new WeakMap(), $d = new WeakMap(), bi = new WeakMap(), p(Zr, "createRequest
22018
22017
  throw new Error("rpc fields are internal values");
22019
22018
  return {
22020
22019
  type: e.type,
22021
- payload: j(N({}, e.payload), {
22020
+ payload: j(D({}, e.payload), {
22022
22021
  bolt: {
22023
22022
  id: eu(8),
22024
22023
  type: "NOTIFY",
@@ -22095,43 +22094,43 @@ const ln = class extends Ml {
22095
22094
  proprietaryConstraints: d
22096
22095
  }), this.appData = h || {};
22097
22096
  const E = 3e4;
22098
- this.transportConnectionPromise = new Promise((D) => {
22097
+ this.transportConnectionPromise = new Promise((O) => {
22099
22098
  const U = setTimeout(() => {
22100
22099
  f.error("ICE connection timeout - possible firewall blocking WebRTC or TURN unreachable", {
22101
22100
  transport: { id: this.id, type: this.direction }
22102
- }), D(!1);
22101
+ }), O(!1);
22103
22102
  }, E);
22104
22103
  this.once("connected", () => {
22105
- clearTimeout(U), D(!0);
22104
+ clearTimeout(U), O(!0);
22106
22105
  }), this.once("disconnect", () => {
22107
- clearTimeout(U), D(!1);
22106
+ clearTimeout(U), O(!1);
22108
22107
  }), this.once("close", () => {
22109
- clearTimeout(U), D(!1);
22108
+ clearTimeout(U), O(!1);
22110
22109
  });
22111
- }), this.eventsDCReadyPromise = new Promise((D) => {
22112
- this.eventsDCReadyPromiseResolver = D;
22110
+ }), this.eventsDCReadyPromise = new Promise((O) => {
22111
+ this.eventsDCReadyPromiseResolver = O;
22113
22112
  }), this.handler.on(
22114
22113
  "@connectionstatechange",
22115
- (D) => {
22116
- D !== this.connectionState && (this.logger.debug(`connection state changed to ${D}`), this.connectionState = D, D === "connected" && (this.connected = !0, this.emit("connected")), D === "disconnected" && (this.connected = !1, this.emit("disconnect")), (D === "failed" || D === "closed") && (this.connected = !1, this.emit("close")), this.closed || this.safeEmit("connectionstatechange", D));
22114
+ (O) => {
22115
+ O !== this.connectionState && (this.logger.debug(`connection state changed to ${O}`), this.connectionState = O, O === "connected" && (this.connected = !0, this.emit("connected")), O === "disconnected" && (this.connected = !1, this.emit("disconnect")), (O === "failed" || O === "closed") && (this.connected = !1, this.emit("close")), this.closed || this.safeEmit("connectionstatechange", O));
22117
22116
  }
22118
22117
  ), this.handler.on(
22119
22118
  "@icecandidate",
22120
- ({ candidate: D }) => {
22121
- this.closed || this.safeEmit("icecandidate", D);
22119
+ ({ candidate: O }) => {
22120
+ this.closed || this.safeEmit("icecandidate", O);
22122
22121
  }
22123
- ), this.handler.on("dc_open", (D) => {
22124
- let U = this.datachannels.get(D.label);
22125
- U || (U || (U = new Zr(a(this, ki), D, D.label, this.serverId), this.datachannels.set(D.label, U)), this.eventsDCFailureTimer = setTimeout(() => {
22126
- D.label === "events" && (this.eventsDCReadyPromiseResolver(!1), this.safeEmit("dc_error", D.label));
22122
+ ), this.handler.on("dc_open", (O) => {
22123
+ let U = this.datachannels.get(O.label);
22124
+ U || (U || (U = new Zr(a(this, ki), O, O.label, this.serverId), this.datachannels.set(O.label, U)), this.eventsDCFailureTimer = setTimeout(() => {
22125
+ O.label === "events" && (this.eventsDCReadyPromiseResolver(!1), this.safeEmit("dc_error", O.label));
22127
22126
  }, 5e3));
22128
- }), this.handler.on("datachannel", (D, U) => {
22129
- D.label === "events" && (this.eventsDCReadyPromiseResolver(!0), this.eventsDCFailureTimer && clearTimeout(this.eventsDCFailureTimer));
22130
- const B = this.datachannels.get(D.label);
22127
+ }), this.handler.on("datachannel", (O, U) => {
22128
+ O.label === "events" && (this.eventsDCReadyPromiseResolver(!0), this.eventsDCFailureTimer && clearTimeout(this.eventsDCFailureTimer));
22129
+ const B = this.datachannels.get(O.label);
22131
22130
  if (!B) {
22132
22131
  this.logger.error("unregistered datachannel for message", {
22133
22132
  rtcChannel: {
22134
- label: D.label,
22133
+ label: O.label,
22135
22134
  message: U
22136
22135
  }
22137
22136
  });
@@ -22153,7 +22152,7 @@ const ln = class extends Ml {
22153
22152
  return;
22154
22153
  this.logger.debug(
22155
22154
  `datachannel message with id:${F.id} on transport:${this.serverId}complete - ${JSON.stringify(H)}`
22156
- ), this.emit(`datachannel:${D.label}`, B.label, H);
22155
+ ), this.emit(`datachannel:${O.label}`, B.label, H);
22157
22156
  } catch (F) {
22158
22157
  this.logger.error("error parsing message", {
22159
22158
  error: F
@@ -22260,7 +22259,7 @@ const ln = class extends Ml {
22260
22259
  offerSdp: _,
22261
22260
  callback: w,
22262
22261
  sender: R,
22263
- mid: D
22262
+ mid: O
22264
22263
  } = yield this.handler.send({
22265
22264
  track: n,
22266
22265
  encodings: o,
@@ -22271,7 +22270,7 @@ const ln = class extends Ml {
22271
22270
  offer: _,
22272
22271
  kind: n.kind,
22273
22272
  paused: l ? !n.enabled || Object.hasOwn(n, "fakeTracks") : !1,
22274
- appData: j(N({}, g || {}), { mid: D }),
22273
+ appData: j(D({}, g || {}), { mid: O }),
22275
22274
  codecOptions: c,
22276
22275
  producingTransportId: this.serverId
22277
22276
  }
@@ -22324,7 +22323,7 @@ const ln = class extends Ml {
22324
22323
  failedProducers: d
22325
22324
  } = yield r(e);
22326
22325
  o.forEach((h, g) => {
22327
- n[g] = this.createConsumerObjectAndWaitForTrack(j(N({}, h), {
22326
+ n[g] = this.createConsumerObjectAndWaitForTrack(j(D({}, h), {
22328
22327
  producerId: g
22329
22328
  }));
22330
22329
  }), c && (this.logger.info("Session description found, sending negotiation request"), yield i(c));
@@ -22355,11 +22354,11 @@ const ln = class extends Ml {
22355
22354
  const n = Zt.parse(e.sdp);
22356
22355
  return n.media = n.media.map((c) => {
22357
22356
  if (r.includes(c.mid.toString())) {
22358
- const d = N({}, c);
22357
+ const d = D({}, c);
22359
22358
  return d.rtp = i[c.mid.toString()].rtp, d.fmtp = i[c.mid.toString()].fmtp, d.payloads = i[c.mid.toString()].payloads, d.rtcpFb = i[c.mid.toString()].rtcpFb, d;
22360
22359
  }
22361
22360
  return c;
22362
- }), j(N({}, e), {
22361
+ }), j(D({}, e), {
22363
22362
  sdp: Zt.write(n)
22364
22363
  });
22365
22364
  }
@@ -22372,9 +22371,9 @@ const ln = class extends Ml {
22372
22371
  static setHeaderExtensionMappings(e, r) {
22373
22372
  const i = Zt.parse(e.sdp);
22374
22373
  return i.media = i.media.map((o) => {
22375
- const c = N({}, o);
22374
+ const c = D({}, o);
22376
22375
  return c.ext = r[o.mid], c;
22377
- }), j(N({}, e), {
22376
+ }), j(D({}, e), {
22378
22377
  sdp: Zt.write(i)
22379
22378
  });
22380
22379
  }
@@ -22413,7 +22412,7 @@ const ln = class extends Ml {
22413
22412
  const i = Zt.parse(r.sdp);
22414
22413
  return i.media = i.media.map((n) => {
22415
22414
  if (n.type === "audio") {
22416
- const o = N({}, n), c = o.fmtp.find(
22415
+ const o = D({}, n), c = o.fmtp.find(
22417
22416
  (l) => l.payload === 111
22418
22417
  );
22419
22418
  return c && (c.config += ";stereo=1;sprop-stereo=1"), o.rtcpFb || (o.rtcpFb = []), o.rtcpFb.some(
@@ -22469,14 +22468,14 @@ const ln = class extends Ml {
22469
22468
  appData: h,
22470
22469
  kind: g,
22471
22470
  mimeType: f
22472
- } = e, v = `${c}:${g}`, E = j(N({}, e), {
22471
+ } = e, v = `${c}:${g}`, E = j(D({}, e), {
22473
22472
  name: "consumer creation task error",
22474
22473
  message: "consumer creation failed"
22475
22474
  });
22476
22475
  return new Promise((_, w) => u(this, null, function* () {
22477
22476
  const R = setTimeout(() => {
22478
22477
  this.logger.warn(`Timed out waiting for track event ${v} producingPeerId: ${n}`), this.consumerTrackEvents.delete(v), E.isTimedout = !0, w(E);
22479
- }, 5e3), D = (B, F) => {
22478
+ }, 5e3), O = (B, F) => {
22480
22479
  try {
22481
22480
  if (B.readyState === "ended")
22482
22481
  clearTimeout(R), w(E);
@@ -22493,7 +22492,7 @@ const ln = class extends Ml {
22493
22492
  producingPeerId: n,
22494
22493
  producingTransportId: o,
22495
22494
  handler: this.handler,
22496
- appData: j(N({}, h), { screenShare: l, peerId: n }),
22495
+ appData: j(D({}, h), { screenShare: l, peerId: n }),
22497
22496
  rtpReceiver: F.receiver,
22498
22497
  mimeType: f
22499
22498
  });
@@ -22515,7 +22514,7 @@ const ln = class extends Ml {
22515
22514
  this.logger.warn("error while creating consumer:", H), clearTimeout(R), w(E);
22516
22515
  }
22517
22516
  }, U = this.unknownTracksMap.get(v);
22518
- U ? (this.logger.info(`track event already received [trackId: ${U.track.id}] [mid: ${U.transceiver.mid}]`), this.unknownTracksMap.delete(v), D(U.track, U.transceiver)) : (this.logger.info(`Registering onTrack handler for key ${v} [producingPeerId: ${n}]`), this.consumerTrackEvents.set(v, D));
22517
+ U ? (this.logger.info(`track event already received [trackId: ${U.track.id}] [mid: ${U.transceiver.mid}]`), this.unknownTracksMap.delete(v), O(U.track, U.transceiver)) : (this.logger.info(`Registering onTrack handler for key ${v} [producingPeerId: ${n}]`), this.consumerTrackEvents.set(v, O));
22519
22518
  }));
22520
22519
  });
22521
22520
  }
@@ -22633,7 +22632,7 @@ class uD {
22633
22632
  */
22634
22633
  createTransport(t) {
22635
22634
  const e = ga();
22636
- return new xu(a(this, Fs), j(N({
22635
+ return new xu(a(this, Fs), j(D({
22637
22636
  id: e
22638
22637
  }, t), {
22639
22638
  handlerFactory: this.handlerFactory
@@ -22852,7 +22851,7 @@ Xn = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), Ko = new WeakMap(),
22852
22851
  });
22853
22852
  return;
22854
22853
  }
22855
- S(this, Xe, a(this, Xn).createTransport(j(N({}, e), {
22854
+ S(this, Xe, a(this, Xn).createTransport(j(D({}, e), {
22856
22855
  direction: "send"
22857
22856
  }))), this.context.getValue("callstats").configureSendTransport(a(this, Xe));
22858
22857
  }, qd = new WeakSet(), Jf = function(e) {
@@ -22867,7 +22866,7 @@ Xn = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), Ko = new WeakMap(),
22867
22866
  });
22868
22867
  return;
22869
22868
  }
22870
- S(this, Ze, a(this, Xn).createTransport(j(N({}, e), {
22869
+ S(this, Ze, a(this, Xn).createTransport(j(D({}, e), {
22871
22870
  direction: "recv"
22872
22871
  }))), this.context.getValue("callstats").configureRecvTransport(a(this, Ze));
22873
22872
  }, jd = new WeakSet(), Kf = function(e) {
@@ -22985,7 +22984,7 @@ Xn = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), Ko = new WeakMap(),
22985
22984
  state: r
22986
22985
  }, this.context.getValue("peerSessionStore").emit(
22987
22986
  b.TRANSPORT_STATE_UPDATE,
22988
- N({
22987
+ D({
22989
22988
  transport: i
22990
22989
  }, a(this, ta, td).mediaState[i])
22991
22990
  );
@@ -23011,7 +23010,7 @@ class gD {
23011
23010
  ridNotAvailable: "asciibetical"
23012
23011
  }
23013
23012
  };
23014
- e.set(h, l), r.push(N({
23013
+ e.set(h, l), r.push(D({
23015
23014
  producingPeerId: l,
23016
23015
  producerId: h,
23017
23016
  producingTransportId: g
@@ -23030,7 +23029,7 @@ class gD {
23030
23029
  if (l.errorCode) {
23031
23030
  a(this, Gt).warn(`Consumer request failed for producer ${d}`, {
23032
23031
  error: { message: l.errorCode }
23033
- }), c.push(j(N({}, h), { errorCode: l.errorCode }));
23032
+ }), c.push(j(D({}, h), { errorCode: l.errorCode }));
23034
23033
  return;
23035
23034
  }
23036
23035
  let g = {};
@@ -23163,8 +23162,19 @@ class Mh {
23163
23162
  });
23164
23163
  }
23165
23164
  }
23165
+ function mD(s) {
23166
+ try {
23167
+ const t = JSON.parse(s.message);
23168
+ if (typeof t != "object" || t === null)
23169
+ return {};
23170
+ const { errorCode: e, errorDescription: r } = t;
23171
+ return D(D({}, typeof e == "string" && { errorCode: e }), typeof r == "string" && { errorDescription: r });
23172
+ } catch (t) {
23173
+ return {};
23174
+ }
23175
+ }
23166
23176
  var Or, Nr, sa, tc, ys, Jd, qs, ra, sc, Fu, Kd, Yf, zd, Qf, Yd, Xf, Qd, Zf;
23167
- class mD extends pD {
23177
+ class fD extends pD {
23168
23178
  constructor(e, r) {
23169
23179
  super(e, r);
23170
23180
  m(this, sc);
@@ -23337,17 +23347,20 @@ Or = new WeakMap(), Nr = new WeakMap(), sa = new WeakMap(), tc = new WeakMap(),
23337
23347
  ));
23338
23348
  }
23339
23349
  } catch (i) {
23340
- if (this.logger.error("failed to consume on transport", { error: i }), i.errorCode === "internal_error" && i.errorDescription === "Backend error" || i.errorCode === "invalid_session_description") {
23350
+ const n = i instanceof Error ? i : new Error(String(i));
23351
+ this.logger.error("failed to consume on transport", { error: n });
23352
+ const { errorCode: o, errorDescription: c } = mD(n);
23353
+ if (o === "internal_error" && c === "Backend error" || o === "invalid_session_description") {
23341
23354
  this.logger.error(
23342
23355
  "Irrecoverable error, closing current recvTransport to create a new one",
23343
23356
  {
23344
23357
  transport: this.recvTransport,
23345
- error: { code: i.errorCode, message: i.errorDescription }
23358
+ error: { code: o, message: c }
23346
23359
  }
23347
23360
  );
23348
23361
  try {
23349
23362
  this.stopTransports({ recv: !0 });
23350
- } catch (n) {
23363
+ } catch (d) {
23351
23364
  }
23352
23365
  yield this.setupTransports({ recv: !0 });
23353
23366
  }
@@ -23360,7 +23373,7 @@ Or = new WeakMap(), Nr = new WeakMap(), sa = new WeakMap(), tc = new WeakMap(),
23360
23373
  const { offer: o, reason: c } = i;
23361
23374
  if (this.logger.info("producer::closing", {
23362
23375
  debuggingHint: c,
23363
- producer: j(N({}, e), { status: "closing" })
23376
+ producer: j(D({}, e), { status: "closing" })
23364
23377
  }), c !== fo) {
23365
23378
  const d = {
23366
23379
  producerId: e.id,
@@ -23375,14 +23388,14 @@ Or = new WeakMap(), Nr = new WeakMap(), sa = new WeakMap(), tc = new WeakMap(),
23375
23388
  sdp: l == null ? void 0 : l.sdp,
23376
23389
  type: l == null ? void 0 : l.type
23377
23390
  };
23378
- this.logger.info("producer::closed", { producer: j(N({}, e), { status: "closed" }) }), n({ answer: h });
23391
+ this.logger.info("producer::closed", { producer: j(D({}, e), { status: "closed" }) }), n({ answer: h });
23379
23392
  } catch (l) {
23380
23393
  this.logger.error("producer close error", l);
23381
23394
  }
23382
23395
  }
23383
23396
  this.producers.delete(e.id), r();
23384
23397
  })), e.on("trackended", () => {
23385
- this.logger.info("producer::trackended", { producer: j(N({}, e), { status: "UNKNOWN" }) });
23398
+ this.logger.info("producer::trackended", { producer: j(D({}, e), { status: "UNKNOWN" }) });
23386
23399
  }), a(this, Or).set(e.id, e);
23387
23400
  }, Yd = new WeakSet(), Xf = function(e) {
23388
23401
  return u(this, null, function* () {
@@ -23567,7 +23580,7 @@ class ig {
23567
23580
  }
23568
23581
  }
23569
23582
  lc = new WeakMap();
23570
- class fD {
23583
+ class SD {
23571
23584
  static setInterval(t, e = 0, ...r) {
23572
23585
  return navigator && navigator.RNBackgroundTimerImpl ? navigator.RNBackgroundTimerImpl.setInterval(t, e, ...r) : global.setInterval(t, e, ...r);
23573
23586
  }
@@ -23581,7 +23594,7 @@ class fD {
23581
23594
  return navigator && navigator.RNBackgroundTimerImpl ? navigator.RNBackgroundTimerImpl.clearTimeout(t) : global.clearTimeout(t);
23582
23595
  }
23583
23596
  }
23584
- const SD = 60, vD = 400;
23597
+ const vD = 60, TD = 400;
23585
23598
  var Gs, Ws, Js, uc, ca, da, Lr, Ni, la, Li, Ks, Es, rl, iS, hc, qu, il, nS, nl, aS;
23586
23599
  const oo = class {
23587
23600
  constructor(t, e) {
@@ -23601,7 +23614,7 @@ const oo = class {
23601
23614
  m(this, Es, void 0);
23602
23615
  this.reportRequest = e, S(this, Li, t), S(this, da, new Ka());
23603
23616
  const { isReactNative: r } = navigator;
23604
- S(this, Ks, r ? new rg(a(this, Li)) : new ig(a(this, Li))), S(this, Es, r ? fD : Gc);
23617
+ S(this, Ks, r ? new rg(a(this, Li)) : new ig(a(this, Li))), S(this, Es, r ? SD : Gc);
23605
23618
  }
23606
23619
  /**
23607
23620
  * @access private
@@ -23624,9 +23637,9 @@ const oo = class {
23624
23637
  const { energy: t } = V(this, rl, iS).call(this), e = V(i = oo, hc, qu).call(i, t);
23625
23638
  let r = 0.9;
23626
23639
  a(this, la) !== e && a(this, la) ? r = 0.9 : e ? r = 0.3 : r = 0.5, S(this, ca, (a(this, ca) || 0) * (1 - r) + t * r);
23627
- }), SD)), a(this, Ws) && a(this, Es).clearInterval(a(this, Ws)), S(this, Ws, a(this, Es).setInterval(
23640
+ }), vD)), a(this, Ws) && a(this, Es).clearInterval(a(this, Ws)), S(this, Ws, a(this, Es).setInterval(
23628
23641
  V(this, il, nS).bind(this),
23629
- vD
23642
+ TD
23630
23643
  ));
23631
23644
  }
23632
23645
  stop() {
@@ -23658,10 +23671,10 @@ Gs = new WeakMap(), Ws = new WeakMap(), Js = new WeakMap(), uc = new WeakMap(),
23658
23671
  const e = Math.log10(t);
23659
23672
  return Math.round(e);
23660
23673
  }, m(za, hc), m(za, nl);
23661
- var TD = Object.defineProperty, yD = Object.getOwnPropertyDescriptor, le = (s, t, e, r) => {
23662
- for (var i = r > 1 ? void 0 : r ? yD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
23674
+ var yD = Object.defineProperty, ED = Object.getOwnPropertyDescriptor, le = (s, t, e, r) => {
23675
+ for (var i = r > 1 ? void 0 : r ? ED(t, e) : t, n = s.length - 1, o; n >= 0; n--)
23663
23676
  (o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
23664
- return r && i && TD(t, e, i), i;
23677
+ return r && i && yD(t, e, i), i;
23665
23678
  }, pc, gc, et, q, al, dt, Vi, xi, Ui, mc, kt, Ps, tt, gt, zs, ei, ol, oS, cl, cS, dl, dS, fc, ju, ll, lS, ul, uS, lt, Pt, $i, Ya, hl, hS, pl, pS, gl, gS;
23666
23679
  class ne {
23667
23680
  constructor(t, e) {
@@ -23720,7 +23733,7 @@ class ne {
23720
23733
  const {
23721
23734
  socket: r
23722
23735
  } = e;
23723
- this.mediaJoined = !1, S(this, et, r), S(this, Vi, !1), S(this, q, new mD(t, r)), S(this, dt, a(this, q).events), S(this, Ps, /* @__PURE__ */ new Set()), S(this, tt, /* @__PURE__ */ new Map()), S(this, xi, !1), S(this, Ui, new Lu(t.getValue("logger"))), S(this, gt, new za(
23736
+ this.mediaJoined = !1, S(this, et, r), S(this, Vi, !1), S(this, q, new fD(t, r)), S(this, dt, a(this, q).events), S(this, Ps, /* @__PURE__ */ new Set()), S(this, tt, /* @__PURE__ */ new Map()), S(this, xi, !1), S(this, Ui, new Lu(t.getValue("logger"))), S(this, gt, new za(
23724
23737
  this.context,
23725
23738
  a(this, q).socketHandler.audioActivity.bind(a(this, q).socketHandler)
23726
23739
  )), this.e2ee = (n = (i = t.getValue("modules").e2ee) == null ? void 0 : i.enabled) != null ? n : !1, this.handleSocketEvents(), this.handleCallstatsEvents(), S(this, mc, gh(
@@ -24166,7 +24179,7 @@ class ne {
24166
24179
  `producer created broadcast: ${e}, producer state: ${r}`
24167
24180
  ), this.context.getValue("peerSessionStore").emit(b.NEW_PRODUCER, {
24168
24181
  peerId: e,
24169
- producer: j(N({}, r), {
24182
+ producer: j(D({}, r), {
24170
24183
  kind: r.kind === tr.AUDIO ? "audio" : "video",
24171
24184
  producingPeerId: e
24172
24185
  })
@@ -24347,7 +24360,7 @@ pc = new WeakMap(), gc = new WeakMap(), et = new WeakMap(), q = new WeakMap(), a
24347
24360
  peerId: this.peerId,
24348
24361
  roomUUID: t,
24349
24362
  roomViewType: "groupCall",
24350
- deviceInfo: j(N({}, Se.getDeviceInfo()), {
24363
+ deviceInfo: j(D({}, Se.getDeviceInfo()), {
24351
24364
  userAgent: navigator.userAgent,
24352
24365
  memory: navigator.deviceMemory,
24353
24366
  cpus: navigator.hardwareConcurrency
@@ -24533,7 +24546,7 @@ function mS(s, t) {
24533
24546
  const r = new ne(s, t);
24534
24547
  return s.setValue("roomNodeClient", r), r;
24535
24548
  }
24536
- function ED(s) {
24549
+ function PD(s) {
24537
24550
  const t = s.getValue("roomNodeClient");
24538
24551
  try {
24539
24552
  t == null || t.leaveRoom();
@@ -24542,10 +24555,10 @@ function ED(s) {
24542
24555
  }
24543
24556
  s.setValue("roomNodeClient", void 0);
24544
24557
  }
24545
- var PD = Object.defineProperty, _D = Object.getOwnPropertyDescriptor, Zi = (s, t, e, r) => {
24546
- for (var i = r > 1 ? void 0 : r ? _D(t, e) : t, n = s.length - 1, o; n >= 0; n--)
24558
+ var _D = Object.defineProperty, CD = Object.getOwnPropertyDescriptor, Zi = (s, t, e, r) => {
24559
+ for (var i = r > 1 ? void 0 : r ? CD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
24547
24560
  (o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
24548
- return r && i && PD(t, e, i), i;
24561
+ return r && i && _D(t, e, i), i;
24549
24562
  }, ua, cs, ee, mt, Vt, kg;
24550
24563
  const fS = (kg = class {
24551
24564
  /**
@@ -24876,7 +24889,7 @@ Zi([
24876
24889
  P.trace("SelfController.init")
24877
24890
  ], zr, "init", 1);
24878
24891
  var Sc;
24879
- class CD {
24892
+ class wD {
24880
24893
  constructor(t) {
24881
24894
  m(this, Sc, void 0);
24882
24895
  S(this, Sc, t);
@@ -24893,7 +24906,7 @@ class CD {
24893
24906
  }
24894
24907
  Sc = new WeakMap();
24895
24908
  var vc, Tc;
24896
- class wD {
24909
+ class RD {
24897
24910
  constructor(t, e) {
24898
24911
  m(this, vc, void 0);
24899
24912
  m(this, Tc, void 0);
@@ -24934,10 +24947,10 @@ class wD {
24934
24947
  }
24935
24948
  }
24936
24949
  vc = new WeakMap(), Tc = new WeakMap();
24937
- var RD = Object.defineProperty, bD = Object.getOwnPropertyDescriptor, Dh = (s, t, e, r) => {
24938
- for (var i = r > 1 ? void 0 : r ? bD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
24950
+ var bD = Object.defineProperty, kD = Object.getOwnPropertyDescriptor, Dh = (s, t, e, r) => {
24951
+ for (var i = r > 1 ? void 0 : r ? kD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
24939
24952
  (o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
24940
- return r && i && RD(t, e, i), i;
24953
+ return r && i && bD(t, e, i), i;
24941
24954
  }, Ys, ha;
24942
24955
  class Dl {
24943
24956
  constructor(t, e) {
@@ -25020,10 +25033,10 @@ Dh([
25020
25033
  Dh([
25021
25034
  P.trace("PollSocketHandler.votePoll")
25022
25035
  ], Dl.prototype, "votePoll", 1);
25023
- var kD = Object.defineProperty, AD = Object.getOwnPropertyDescriptor, ID = (s, t, e, r) => {
25024
- for (var i = r > 1 ? void 0 : r ? AD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
25036
+ var AD = Object.defineProperty, ID = Object.getOwnPropertyDescriptor, MD = (s, t, e, r) => {
25037
+ for (var i = r > 1 ? void 0 : r ? ID(t, e) : t, n = s.length - 1, o; n >= 0; n--)
25025
25038
  (o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
25026
- return r && i && kD(t, e, i), i;
25039
+ return r && i && AD(t, e, i), i;
25027
25040
  }, At;
25028
25041
  class SS {
25029
25042
  constructor(t, e) {
@@ -25092,7 +25105,7 @@ class SS {
25092
25105
  ).participants.map(
25093
25106
  (i) => {
25094
25107
  var n = i, { id: e } = n, r = Nc(n, ["id"]);
25095
- return j(N({}, r), { userId: e });
25108
+ return j(D({}, r), { userId: e });
25096
25109
  }
25097
25110
  );
25098
25111
  } catch (t) {
@@ -25419,11 +25432,11 @@ class SS {
25419
25432
  }
25420
25433
  }
25421
25434
  At = new WeakMap();
25422
- ID([
25435
+ MD([
25423
25436
  P.trace("RoomSocketHandler.joinRoom")
25424
25437
  ], SS.prototype, "joinRoom", 1);
25425
25438
  var ft;
25426
- class MD {
25439
+ class DD {
25427
25440
  constructor(t) {
25428
25441
  m(this, ft, void 0);
25429
25442
  S(this, ft, t);
@@ -25538,7 +25551,7 @@ class MD {
25538
25551
  }
25539
25552
  ft = new WeakMap();
25540
25553
  var Vr, pa;
25541
- class DD {
25554
+ class OD {
25542
25555
  constructor(t, e) {
25543
25556
  m(this, Vr, void 0);
25544
25557
  m(this, pa, void 0);
@@ -25606,14 +25619,14 @@ class DD {
25606
25619
  }
25607
25620
  }
25608
25621
  Vr = new WeakMap(), pa = new WeakMap();
25609
- var OD = Object.defineProperty, ND = (s, t, e) => t in s ? OD(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, LD = (s, t, e) => (ND(s, typeof t != "symbol" ? t + "" : t, e), e), Oh = (s, t, e) => {
25622
+ var ND = Object.defineProperty, LD = (s, t, e) => t in s ? ND(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, VD = (s, t, e) => (LD(s, typeof t != "symbol" ? t + "" : t, e), e), Oh = (s, t, e) => {
25610
25623
  if (!t.has(s))
25611
25624
  throw TypeError("Cannot " + e);
25612
25625
  }, M = (s, t, e) => (Oh(s, t, "read from private field"), e ? e.call(s) : t.get(s)), ae = (s, t, e) => {
25613
25626
  if (t.has(s))
25614
25627
  throw TypeError("Cannot add the same private member more than once");
25615
25628
  t instanceof WeakSet ? t.add(s) : t.set(s, e);
25616
- }, se = (s, t, e, r) => (Oh(s, t, "write to private field"), r ? r.call(s, e) : t.set(s, e), e), re = (s, t, e) => (Oh(s, t, "access private method"), e), Sd = {}, VD = {
25629
+ }, se = (s, t, e, r) => (Oh(s, t, "write to private field"), r ? r.call(s, e) : t.set(s, e), e), re = (s, t, e) => (Oh(s, t, "access private method"), e), Sd = {}, xD = {
25617
25630
  get exports() {
25618
25631
  return Sd;
25619
25632
  },
@@ -25628,7 +25641,7 @@ gn && typeof gn.ownKeys == "function" ? sd = gn.ownKeys : Object.getOwnPropertyS
25628
25641
  } : sd = function(s) {
25629
25642
  return Object.getOwnPropertyNames(s);
25630
25643
  };
25631
- function xD(s) {
25644
+ function UD(s) {
25632
25645
  console && console.warn && console.warn(s);
25633
25646
  }
25634
25647
  var vS = Number.isNaN || function(s) {
@@ -25637,8 +25650,8 @@ var vS = Number.isNaN || function(s) {
25637
25650
  function de() {
25638
25651
  de.init.call(this);
25639
25652
  }
25640
- VD.exports = de;
25641
- Sd.once = HD;
25653
+ xD.exports = de;
25654
+ Sd.once = FD;
25642
25655
  de.EventEmitter = de;
25643
25656
  de.prototype._events = void 0;
25644
25657
  de.prototype._eventsCount = 0;
@@ -25709,7 +25722,7 @@ function yS(s, t, e, r) {
25709
25722
  else if (typeof o == "function" ? o = n[t] = r ? [e, o] : [o, e] : r ? o.unshift(e) : o.push(e), i = TS(s), i > 0 && o.length > i && !o.warned) {
25710
25723
  o.warned = !0;
25711
25724
  var c = new Error("Possible EventEmitter memory leak detected. " + o.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
25712
- c.name = "MaxListenersExceededWarning", c.emitter = s, c.type = t, c.count = o.length, xD(c);
25725
+ c.name = "MaxListenersExceededWarning", c.emitter = s, c.type = t, c.count = o.length, UD(c);
25713
25726
  }
25714
25727
  return s;
25715
25728
  }
@@ -25720,12 +25733,12 @@ de.prototype.on = de.prototype.addListener;
25720
25733
  de.prototype.prependListener = function(s, t) {
25721
25734
  return yS(this, s, t, !0);
25722
25735
  };
25723
- function UD() {
25736
+ function $D() {
25724
25737
  if (!this.fired)
25725
25738
  return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
25726
25739
  }
25727
25740
  function ES(s, t, e) {
25728
- var r = { fired: !1, wrapFn: void 0, target: s, type: t, listener: e }, i = UD.bind(r);
25741
+ var r = { fired: !1, wrapFn: void 0, target: s, type: t, listener: e }, i = $D.bind(r);
25729
25742
  return i.listener = e, r.wrapFn = i, i;
25730
25743
  }
25731
25744
  de.prototype.once = function(s, t) {
@@ -25750,7 +25763,7 @@ de.prototype.removeListener = function(s, t) {
25750
25763
  }
25751
25764
  if (i < 0)
25752
25765
  return this;
25753
- i === 0 ? e.shift() : $D(e, i), e.length === 1 && (r[s] = e[0]), r.removeListener !== void 0 && this.emit("removeListener", s, o || t);
25766
+ i === 0 ? e.shift() : BD(e, i), e.length === 1 && (r[s] = e[0]), r.removeListener !== void 0 && this.emit("removeListener", s, o || t);
25754
25767
  }
25755
25768
  return this;
25756
25769
  };
@@ -25779,7 +25792,7 @@ function PS(s, t, e) {
25779
25792
  if (r === void 0)
25780
25793
  return [];
25781
25794
  var i = r[t];
25782
- return i === void 0 ? [] : typeof i == "function" ? e ? [i.listener || i] : [i] : e ? BD(i) : CS(i, i.length);
25795
+ return i === void 0 ? [] : typeof i == "function" ? e ? [i.listener || i] : [i] : e ? HD(i) : CS(i, i.length);
25783
25796
  }
25784
25797
  de.prototype.listeners = function(s) {
25785
25798
  return PS(this, s, !0);
@@ -25810,17 +25823,17 @@ function CS(s, t) {
25810
25823
  e[r] = s[r];
25811
25824
  return e;
25812
25825
  }
25813
- function $D(s, t) {
25826
+ function BD(s, t) {
25814
25827
  for (; t + 1 < s.length; t++)
25815
25828
  s[t] = s[t + 1];
25816
25829
  s.pop();
25817
25830
  }
25818
- function BD(s) {
25831
+ function HD(s) {
25819
25832
  for (var t = new Array(s.length), e = 0; e < t.length; ++e)
25820
25833
  t[e] = s[e].listener || s[e];
25821
25834
  return t;
25822
25835
  }
25823
- function HD(s, t) {
25836
+ function FD(s, t) {
25824
25837
  return new Promise(function(e, r) {
25825
25838
  function i(o) {
25826
25839
  s.removeListener(t, n), r(o);
@@ -25828,10 +25841,10 @@ function HD(s, t) {
25828
25841
  function n() {
25829
25842
  typeof s.removeListener == "function" && s.removeListener("error", i), e([].slice.call(arguments));
25830
25843
  }
25831
- wS(s, t, n, { once: !0 }), t !== "error" && FD(s, i, { once: !0 });
25844
+ wS(s, t, n, { once: !0 }), t !== "error" && qD(s, i, { once: !0 });
25832
25845
  });
25833
25846
  }
25834
- function FD(s, t, e) {
25847
+ function qD(s, t, e) {
25835
25848
  typeof s.on == "function" && wS(s, "error", t, e);
25836
25849
  }
25837
25850
  function wS(s, t, e, r) {
@@ -25844,7 +25857,7 @@ function wS(s, t, e, r) {
25844
25857
  else
25845
25858
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof s);
25846
25859
  }
25847
- class qD extends T {
25860
+ class jD extends T {
25848
25861
  constructor() {
25849
25862
  super("message.v1.SocketMessage", [
25850
25863
  {
@@ -25881,7 +25894,7 @@ class qD extends T {
25881
25894
  ]);
25882
25895
  }
25883
25896
  }
25884
- const og = new qD();
25897
+ const og = new jD();
25885
25898
  class RS {
25886
25899
  static encode(t) {
25887
25900
  return og.toBinary(t);
@@ -25890,13 +25903,13 @@ class RS {
25890
25903
  return og.fromBinary(new Uint8Array(t));
25891
25904
  }
25892
25905
  }
25893
- function jD(s, t) {
25906
+ function GD(s, t) {
25894
25907
  return Math.floor(Math.random() * (t - s + 1) + s);
25895
25908
  }
25896
25909
  var mr;
25897
- class GD {
25910
+ class WD {
25898
25911
  constructor(t = {}) {
25899
- LD(this, "opts"), ae(this, mr, void 0), this.opts = {
25912
+ VD(this, "opts"), ae(this, mr, void 0), this.opts = {
25900
25913
  initialTimeout: t.initialTimeout || 1e3,
25901
25914
  maxTimeout: t.maxTimeout || 1e4,
25902
25915
  factor: t.factor || 2
@@ -25905,7 +25918,7 @@ class GD {
25905
25918
  wait() {
25906
25919
  return u(this, null, function* () {
25907
25920
  se(this, mr, M(this, mr) + 1);
25908
- const t = jD(0, Math.min(this.opts.maxTimeout, this.opts.initialTimeout * Bh(2, M(this, mr))));
25921
+ const t = GD(0, Math.min(this.opts.maxTimeout, this.opts.initialTimeout * Bh(2, M(this, mr))));
25909
25922
  yield new Promise((e) => {
25910
25923
  setTimeout(e, t);
25911
25924
  });
@@ -25926,7 +25939,7 @@ const ur = {
25926
25939
  error: 3
25927
25940
  };
25928
25941
  var ti, si;
25929
- class WD {
25942
+ class JD {
25930
25943
  constructor(t) {
25931
25944
  ae(this, ti, void 0), ae(this, si, void 0), se(this, ti, console), se(this, si, t);
25932
25945
  }
@@ -25947,15 +25960,15 @@ ti = /* @__PURE__ */ new WeakMap(), si = /* @__PURE__ */ new WeakMap();
25947
25960
  var bS = /* @__PURE__ */ ((s) => (s[s.CONNECTING = 0] = "CONNECTING", s[s.OPEN = 1] = "OPEN", s[s.CLOSING = 2] = "CLOSING", s[s.CLOSED = 3] = "CLOSED", s))(bS || {});
25948
25961
  const cg = "2", dg = "3";
25949
25962
  var ke, nn, oe, Ee, fr, Ge, Xs, Br, ds, an, on, As, Gu, kS, Qa, rd, Wu, AS, id, tu, vd, Ju, Ku, IS, so, nd, mn, ro, Td, zu, fn, io, Yu, MS, no, ad, ao, yd;
25950
- class JD {
25963
+ class KD {
25951
25964
  constructor(t, e) {
25952
- var E, _, w, R, D, U, B, F, H, X, Le, yt;
25965
+ var E, _, w, R, O, U, B, F, H, X, Le, yt;
25953
25966
  ae(this, Gu), ae(this, Qa), ae(this, Wu), ae(this, id), ae(this, vd), ae(this, Ku), ae(this, so), ae(this, mn), ae(this, Td), ae(this, fn), ae(this, Yu), ae(this, no), ae(this, ao), ae(this, ke, void 0), ae(this, nn, void 0), ae(this, oe, void 0), ae(this, Ee, void 0), ae(this, fr, void 0), ae(this, Ge, void 0), ae(this, Xs, void 0), ae(this, Br, void 0), ae(this, ds, void 0), ae(this, an, void 0), ae(this, on, void 0), ae(this, As, void 0);
25954
25967
  var r, i, n, o, c, d, l, h, g, f, v;
25955
- se(this, nn, t), se(this, fr, []), se(this, Ge, new Sd()), se(this, Xs, !0), se(this, ds, !1), se(this, oe, e != null ? e : {}), (E = (r = M(this, oe)).autoReconnect) != null || (r.autoReconnect = !0), (_ = (i = M(this, oe)).retryConnectionInterval) != null || (i.retryConnectionInterval = 1e3), (w = (n = M(this, oe)).pingTimeout) != null || (n.pingTimeout = 3e4), (R = (o = M(this, oe)).connectionTimeout) != null || (o.connectionTimeout = 5e3), (D = (c = M(this, oe)).debug) != null || (c.debug = !0), (U = (d = M(this, oe)).maxReconnectionAttempts) != null || (d.maxReconnectionAttempts = 10), (B = (l = M(this, oe)).disconnectOnPingTimeout) != null || (l.disconnectOnPingTimeout = !0), (F = (h = M(this, oe)).queueOnDisconnect) != null || (h.queueOnDisconnect = !1), (H = (g = M(this, oe)).flushOnReconnect) != null || (g.flushOnReconnect = !1), (X = (f = M(this, oe)).clientInitiatedPings) != null || (f.clientInitiatedPings = !1), (Le = (v = M(this, oe)).clientInitiatedPingInterval) != null || (v.clientInitiatedPingInterval = 3e4), se(this, Br, {
25968
+ se(this, nn, t), se(this, fr, []), se(this, Ge, new Sd()), se(this, Xs, !0), se(this, ds, !1), se(this, oe, e != null ? e : {}), (E = (r = M(this, oe)).autoReconnect) != null || (r.autoReconnect = !0), (_ = (i = M(this, oe)).retryConnectionInterval) != null || (i.retryConnectionInterval = 1e3), (w = (n = M(this, oe)).pingTimeout) != null || (n.pingTimeout = 3e4), (R = (o = M(this, oe)).connectionTimeout) != null || (o.connectionTimeout = 5e3), (O = (c = M(this, oe)).debug) != null || (c.debug = !0), (U = (d = M(this, oe)).maxReconnectionAttempts) != null || (d.maxReconnectionAttempts = 10), (B = (l = M(this, oe)).disconnectOnPingTimeout) != null || (l.disconnectOnPingTimeout = !0), (F = (h = M(this, oe)).queueOnDisconnect) != null || (h.queueOnDisconnect = !1), (H = (g = M(this, oe)).flushOnReconnect) != null || (g.flushOnReconnect = !1), (X = (f = M(this, oe)).clientInitiatedPings) != null || (f.clientInitiatedPings = !1), (Le = (v = M(this, oe)).clientInitiatedPingInterval) != null || (v.clientInitiatedPingInterval = 3e4), se(this, Br, {
25956
25969
  code: void 0,
25957
25970
  reason: void 0
25958
- }), se(this, Ee, (yt = M(this, oe).logger) != null ? yt : new WD(M(this, oe).debug ? "debug" : "info")), se(this, As, new GD());
25971
+ }), se(this, Ee, (yt = M(this, oe).logger) != null ? yt : new JD(M(this, oe).debug ? "debug" : "info")), se(this, As, new WD());
25959
25972
  }
25960
25973
  /**
25961
25974
  * Ready state of the current WebSocket.
@@ -26213,12 +26226,12 @@ ke = /* @__PURE__ */ new WeakMap(), nn = /* @__PURE__ */ new WeakMap(), oe = /*
26213
26226
  }, ao = /* @__PURE__ */ new WeakSet(), yd = function() {
26214
26227
  re(this, no, ad).call(this), M(this, ke) && (M(this, ke).onopen = void 0, M(this, ke).onerror = void 0, M(this, ke).onmessage = void 0, M(this, ke).onclose = void 0);
26215
26228
  };
26216
- var KD = Object.defineProperty, zD = Object.getOwnPropertyDescriptor, Nl = (s, t, e, r) => {
26217
- for (var i = r > 1 ? void 0 : r ? zD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
26229
+ var zD = Object.defineProperty, YD = Object.getOwnPropertyDescriptor, Nl = (s, t, e, r) => {
26230
+ for (var i = r > 1 ? void 0 : r ? YD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
26218
26231
  (o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
26219
- return r && i && KD(t, e, i), i;
26232
+ return r && i && zD(t, e, i), i;
26220
26233
  };
26221
- const lg = 65535, YD = 3e3;
26234
+ const lg = 65535, QD = 3e3;
26222
26235
  var xr, Te, ye, Ie, Wt, qe, yc, Qu, Ec, Xu, Ag;
26223
26236
  const DS = (Ag = class {
26224
26237
  constructor(s, {
@@ -26241,7 +26254,7 @@ const DS = (Ag = class {
26241
26254
  throw new k("peerId, meetingId, or authToken can not be empty", "0404");
26242
26255
  S(this, Wt, void 0), S(this, qe, s), this.capabilities = i, this.roomName = e, this.authToken = r, S(this, xr, V(this, yc, Qu).call(this, t));
26243
26256
  const n = i.includes("PING");
26244
- S(this, Te, new JD(a(this, xr), {
26257
+ S(this, Te, new KD(a(this, xr), {
26245
26258
  autoReconnect: !0,
26246
26259
  disconnectOnPingTimeout: n,
26247
26260
  queueOnDisconnect: !1,
@@ -26376,10 +26389,10 @@ const DS = (Ag = class {
26376
26389
  } catch (R) {
26377
26390
  w = new Error("failed to parse error message", { cause: R });
26378
26391
  try {
26379
- const D = Sb.fromBinary(_);
26380
- w = new Error(D.message);
26381
- } catch (D) {
26382
- w = new Error("failed to parse error message", { cause: D });
26392
+ const O = Sb.fromBinary(_);
26393
+ w = new Error(O.message);
26394
+ } catch (O) {
26395
+ w = new Error("failed to parse error message", { cause: O });
26383
26396
  }
26384
26397
  }
26385
26398
  c(w), d(v, f);
@@ -26433,7 +26446,7 @@ const DS = (Ag = class {
26433
26446
  b.SOCKET_SERVICE_DISCONNECTED,
26434
26447
  { joinAttempted: a(this, ye, Ie).joinAttempted }
26435
26448
  ), S(this, Wt, void 0);
26436
- }, YD)), a(this, ye, Ie).updateSocketConnectionState("disconnected");
26449
+ }, QD)), a(this, ye, Ie).updateSocketConnectionState("disconnected");
26437
26450
  }), this.onStateEvent("reconnecting", () => u(this, null, function* () {
26438
26451
  this.logger.info("SocketService::Reconnecting to socket-edge"), a(this, ye, Ie).updateSocketConnectionState("reconnecting");
26439
26452
  })), this.onStateEvent("reconnectAttempt", (t) => u(this, [t], function* ({ attempt: s }) {
@@ -26462,7 +26475,7 @@ const DS = (Ag = class {
26462
26475
  const t = a(this, qe).getValue("socketBaseURI") || a(this, qe).getValue("baseURI");
26463
26476
  let e = DS.getSocketEdgeDomain(t);
26464
26477
  typeof va(a(this, qe), "socket_server_base") == "string" && (e = va(a(this, qe), "socket_server_base"));
26465
- const r = `wss://${e}`, i = new URL(`${r}/ws`), n = this.peerId, o = j(N({
26478
+ const r = `wss://${e}`, i = new URL(`${r}/ws`), n = this.peerId, o = j(D({
26466
26479
  roomID: this.roomName,
26467
26480
  peerID: s,
26468
26481
  authToken: this.authToken,
@@ -26493,7 +26506,7 @@ Nl([
26493
26506
  Nl([
26494
26507
  P.trace("SocketService.sendMessagePromiseWithTimeout")
26495
26508
  ], Dc.prototype, "sendMessagePromiseWithTimeout", 1);
26496
- class QD {
26509
+ class XD {
26497
26510
  constructor(t) {
26498
26511
  p(this, "socketService");
26499
26512
  this.socketService = t;
@@ -26596,10 +26609,10 @@ class QD {
26596
26609
  });
26597
26610
  }
26598
26611
  }
26599
- var XD = Object.defineProperty, ZD = Object.getOwnPropertyDescriptor, eO = (s, t, e, r) => {
26600
- for (var i = r > 1 ? void 0 : r ? ZD(t, e) : t, n = s.length - 1, o; n >= 0; n--)
26612
+ var ZD = Object.defineProperty, eO = Object.getOwnPropertyDescriptor, tO = (s, t, e, r) => {
26613
+ for (var i = r > 1 ? void 0 : r ? eO(t, e) : t, n = s.length - 1, o; n >= 0; n--)
26601
26614
  (o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
26602
- return r && i && XD(t, e, i), i;
26615
+ return r && i && ZD(t, e, i), i;
26603
26616
  }, It;
26604
26617
  class OS extends Ot {
26605
26618
  constructor(e) {
@@ -26759,7 +26772,7 @@ class OS extends Ot {
26759
26772
  const c = o.participants.concat(
26760
26773
  i.map((d) => n.get(d))
26761
26774
  );
26762
- return j(N({}, o), {
26775
+ return j(D({}, o), {
26763
26776
  participants: c
26764
26777
  });
26765
26778
  }
@@ -26767,7 +26780,7 @@ class OS extends Ot {
26767
26780
  const c = o.participants.filter(
26768
26781
  (d) => !i.includes(d.id)
26769
26782
  );
26770
- return j(N({}, o), {
26783
+ return j(D({}, o), {
26771
26784
  participants: c
26772
26785
  });
26773
26786
  }
@@ -26776,13 +26789,13 @@ class OS extends Ot {
26776
26789
  }
26777
26790
  }
26778
26791
  It = new WeakMap();
26779
- eO([
26792
+ tO([
26780
26793
  Nt({ maxInvocations: 60, period: 60 })
26781
26794
  ], OS.prototype, "getConnectedMeetings", 1);
26782
- var tO = Object.defineProperty, sO = Object.getOwnPropertyDescriptor, Nh = (s, t, e, r) => {
26783
- for (var i = r > 1 ? void 0 : r ? sO(t, e) : t, n = s.length - 1, o; n >= 0; n--)
26795
+ var sO = Object.defineProperty, rO = Object.getOwnPropertyDescriptor, Nh = (s, t, e, r) => {
26796
+ for (var i = r > 1 ? void 0 : r ? rO(t, e) : t, n = s.length - 1, o; n >= 0; n--)
26784
26797
  (o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
26785
- return r && i && tO(t, e, i), i;
26798
+ return r && i && sO(t, e, i), i;
26786
26799
  }, pe, Ig;
26787
26800
  const NS = (Ig = class {
26788
26801
  constructor(s) {
@@ -26857,9 +26870,9 @@ const NS = (Ig = class {
26857
26870
  this.logger.error(`ConnectedMeetingsController:: switchMeeting:: issues in leaving previous meeting. Meeting Id: ${(o = (n = a(this, pe).getValue("meeting")) == null ? void 0 : n.meta) == null ? void 0 : o.meetingId}`, { error: l });
26858
26871
  }
26859
26872
  this.logger.info(`ConnectedMeetingsController::switchMeeting:: initializing new meeting. Meeting Id: ${t}`);
26860
- const i = yield uO.init(j(N({}, a(this, pe).getValue("options")), {
26873
+ const i = yield hO.init(j(D({}, a(this, pe).getValue("options")), {
26861
26874
  cachedUserDetails: null,
26862
- defaults: j(N(N({}, a(this, pe).getValue("options").defaults), r), {
26875
+ defaults: j(D(D({}, a(this, pe).getValue("options").defaults), r), {
26863
26876
  /**
26864
26877
  * NOTE(ravindra-cloudflare):
26865
26878
  * Protected methods & variables of SelfMedia,
@@ -26905,7 +26918,7 @@ const NS = (Ig = class {
26905
26918
  this.connectedMeetings.meetings.forEach((r) => {
26906
26919
  e.set(r.id, r);
26907
26920
  }), t.forEach((r) => {
26908
- e.has(r.id) ? e.get(r.id).title = r.title : e.set(r.id, j(N({}, r), { participants: [] }));
26921
+ e.has(r.id) ? e.get(r.id).title = r.title : e.set(r.id, j(D({}, r), { participants: [] }));
26909
26922
  }), this.connectedMeetings.meetings = Array.from(e.values()), this.emitStateUpdate();
26910
26923
  }
26911
26924
  handleConnectedRoomsDeleted(s) {
@@ -26931,10 +26944,10 @@ Nh([
26931
26944
  Nh([
26932
26945
  P.trace("ConnectedMeetingsController.switchMeeting")
26933
26946
  ], Ll.prototype, "switchMeeting", 1);
26934
- var rO = Object.defineProperty, iO = Object.getOwnPropertyDescriptor, Lh = (s, t, e, r) => {
26935
- for (var i = r > 1 ? void 0 : r ? iO(t, e) : t, n = s.length - 1, o; n >= 0; n--)
26947
+ var iO = Object.defineProperty, nO = Object.getOwnPropertyDescriptor, Lh = (s, t, e, r) => {
26948
+ for (var i = r > 1 ? void 0 : r ? nO(t, e) : t, n = s.length - 1, o; n >= 0; n--)
26936
26949
  (o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
26937
- return r && i && rO(t, e, i), i;
26950
+ return r && i && iO(t, e, i), i;
26938
26951
  };
26939
26952
  const Xa = class {
26940
26953
  constructor(s, t, e) {
@@ -26975,7 +26988,7 @@ const Xa = class {
26975
26988
  cachedUserDetails: o,
26976
26989
  logger: c
26977
26990
  } = s.getAllValues();
26978
- if (ED(s), Se.isSupported() === !1)
26991
+ if (PD(s), Se.isSupported() === !1)
26979
26992
  throw new k("Browser not supported", "0010", c, !0);
26980
26993
  const d = u0(
26981
26994
  s,
@@ -27032,15 +27045,15 @@ const Xa = class {
27032
27045
  { error: X }
27033
27046
  );
27034
27047
  }));
27035
- const { controllers: D } = yield R;
27036
- return QC(), new Xa(e, D, s);
27048
+ const { controllers: O } = yield R;
27049
+ return QC(), new Xa(e, O, s);
27037
27050
  });
27038
27051
  }
27039
27052
  static setupControllers(s, t, e, r, i, n) {
27040
27053
  return u(this, null, function* () {
27041
27054
  var Pe, L, A;
27042
27055
  const o = t.getValue("modules"), { participant: c } = e, d = t.getValue("defaults"), l = t.getValue("logger"), { viewType: h, mediaConstraints: { audio: g } } = i;
27043
- t.setValue("viewType", h), t.setValue("defaults", N({
27056
+ t.setValue("viewType", h), t.setValue("defaults", D({
27044
27057
  mediaConfiguration: {
27045
27058
  audio: {
27046
27059
  enableHighBitrate: (Pe = g.enableHighBitrate) != null ? Pe : !1,
@@ -27048,12 +27061,12 @@ const Xa = class {
27048
27061
  }
27049
27062
  }
27050
27063
  }, d)), t.setValue("maxPreferredStreams", Se.isMobile() ? i.maxVideoStreams.mobile : i.maxVideoStreams.desktop);
27051
- let f, v, E, _, w, R, D, U, B;
27052
- const F = new wD(t, s), H = new QD(
27064
+ let f, v, E, _, w, R, O, U, B;
27065
+ const F = new RD(t, s), H = new XD(
27053
27066
  s
27054
27067
  );
27055
27068
  t.setValue("connectedMeetingsSocketHandler", H);
27056
- const X = new Dl(t, s), Le = new or(t, s), yt = new MD(s), Qt = new SS(t, s), Yr = new DD(t, s), I = new CD(s), y = yield zr.init(
27069
+ const X = new Dl(t, s), Le = new or(t, s), yt = new DD(s), Qt = new SS(t, s), Yr = new OD(t, s), I = new wD(s), y = yield zr.init(
27057
27070
  t,
27058
27071
  Qt,
27059
27072
  c,
@@ -27077,7 +27090,7 @@ const Xa = class {
27077
27090
  Le,
27078
27091
  y.self,
27079
27092
  U.participants
27080
- )), o.internals && (w = yield Ph.init(t)), o.livestream && i.viewType === er.Livestream && (D = new Mf(
27093
+ )), o.internals && (w = yield Ph.init(t)), o.livestream && i.viewType === er.Livestream && (O = new Mf(
27081
27094
  t,
27082
27095
  y.self,
27083
27096
  I
@@ -27130,7 +27143,7 @@ const Xa = class {
27130
27143
  pluginController: _,
27131
27144
  recordingController: R,
27132
27145
  internalsController: w,
27133
- livestreamController: D,
27146
+ livestreamController: O,
27134
27147
  participantController: U,
27135
27148
  connectedMeetingsController: B
27136
27149
  }
@@ -27171,7 +27184,7 @@ Lh([
27171
27184
  Lh([
27172
27185
  P.trace("Controller.createSocketService")
27173
27186
  ], Vl, "createSocketService", 1);
27174
- class nO {
27187
+ class aO {
27175
27188
  constructor() {
27176
27189
  p(this, "battery");
27177
27190
  p(this, "logger");
@@ -27205,8 +27218,8 @@ class nO {
27205
27218
  });
27206
27219
  }
27207
27220
  }
27208
- const ug = new nO();
27209
- function aO(s, t) {
27221
+ const ug = new aO();
27222
+ function oO(s, t) {
27210
27223
  s.startsWith("eyJ") || console.error("Invalid auth token provided. Ensure you are passing a %cparticipant `authToken`%c — not an Org API Key or an incorrectly formatted token.\nYou get the participant token from the Add Participant API: https://docs.realtime.cloudflare.com/api#/operations/add_participant", "font-weight: bold", "font-weight: normal");
27211
27224
  try {
27212
27225
  const { meetingId: e, orgId: r, participantId: i } = JSON.parse(atob(s.split(".")[1]));
@@ -27227,7 +27240,7 @@ function aO(s, t) {
27227
27240
  }
27228
27241
  }
27229
27242
  var Ur, Bi, Hi, Pc, ml, LS;
27230
- class oO {
27243
+ class cO {
27231
27244
  constructor() {
27232
27245
  m(this, ml);
27233
27246
  m(this, Ur, new Audio());
@@ -27266,7 +27279,7 @@ Ur = new WeakMap(), Bi = new WeakMap(), Hi = new WeakMap(), Pc = new WeakMap(),
27266
27279
  (e = a(this, Pc)) == null || e.call(this, t);
27267
27280
  };
27268
27281
  var Fi;
27269
- class cO extends oO {
27282
+ class dO extends cO {
27270
27283
  constructor() {
27271
27284
  super();
27272
27285
  /** Maps participantId to trackId */
@@ -27282,10 +27295,10 @@ class cO extends oO {
27282
27295
  }
27283
27296
  }
27284
27297
  Fi = new WeakMap();
27285
- var dO = Object.defineProperty, lO = Object.getOwnPropertyDescriptor, xl = (s, t, e, r) => {
27286
- for (var i = r > 1 ? void 0 : r ? lO(t, e) : t, n = s.length - 1, o; n >= 0; n--)
27298
+ var lO = Object.defineProperty, uO = Object.getOwnPropertyDescriptor, xl = (s, t, e, r) => {
27299
+ for (var i = r > 1 ? void 0 : r ? uO(t, e) : t, n = s.length - 1, o; n >= 0; n--)
27287
27300
  (o = s[n]) && (i = (r ? o(t, e, i) : o(i)) || i);
27288
- return r && i && dO(t, e, i), i;
27301
+ return r && i && lO(t, e, i), i;
27289
27302
  }, Ne, qi, Mg;
27290
27303
  let Gr = (Mg = class {
27291
27304
  constructor(t, e) {
@@ -27317,9 +27330,9 @@ let Gr = (Mg = class {
27317
27330
  }
27318
27331
  static init(t) {
27319
27332
  return u(this, null, function* () {
27320
- var f, v, _, w, R, D, U, B, F;
27333
+ var f, v, _, w, R, O, U, B, F;
27321
27334
  Se.init();
27322
- const e = (v = (f = t == null ? void 0 : t.cachedUserDetails) == null ? void 0 : f.peerId) != null ? v : ga(), { authToken: r, baseURI: i } = t, E = aO(r, i), { meetingId: n } = E, o = Nc(E, ["meetingId"]);
27335
+ const e = (v = (f = t == null ? void 0 : t.cachedUserDetails) == null ? void 0 : f.peerId) != null ? v : ga(), { authToken: r, baseURI: i } = t, E = oO(r, i), { meetingId: n } = E, o = Nc(E, ["meetingId"]);
27323
27336
  if ((_ = o.baseURI) != null && _.includes("dyte.io"))
27324
27337
  throw new k("Dyte Base URIs are no longer supported. Use RealtimeKit Base URIs.", "0001");
27325
27338
  window.__zone_symbol__DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION = !0;
@@ -27338,9 +27351,9 @@ let Gr = (Mg = class {
27338
27351
  peerId: e
27339
27352
  },
27340
27353
  (R = (w = t.modules) == null ? void 0 : w.tracing) != null ? R : !0,
27341
- (U = (D = t == null ? void 0 : t.modules) == null ? void 0 : D.devTools) == null ? void 0 : U.logLevel
27354
+ (U = (O = t == null ? void 0 : t.modules) == null ? void 0 : O.devTools) == null ? void 0 : U.logLevel
27342
27355
  ), l.init(c), l.info("Client::init::options", {
27343
- clientInitOptions: j(N({}, t), {
27356
+ clientInitOptions: j(D({}, t), {
27344
27357
  authToken: `${(B = t.authToken) == null ? void 0 : B.slice(0, 10)}...
27345
27358
  ${(F = t.authToken) == null ? void 0 : F.slice(-10)}`
27346
27359
  })
@@ -27358,12 +27371,12 @@ let Gr = (Mg = class {
27358
27371
  */
27359
27372
  static setupContext(t, e, r, i) {
27360
27373
  var d, l;
27361
- const n = Fr.createContext(t, e), o = N(N({}, kC), e == null ? void 0 : e.modules), c = e.defaults || {
27374
+ const n = Fr.createContext(t, e), o = D(D({}, kC), e == null ? void 0 : e.modules), c = e.defaults || {
27362
27375
  audio: !0,
27363
27376
  video: !0
27364
27377
  };
27365
27378
  return n.setValue("options", e), n.setValue("peerId", t), n.setValue("modules", o), n.setValue("sdkName", "web-core"), n.setValue("meetingId", r), n.setValue("apiBase", i.apiBase), n.setValue("baseURI", i.baseURI), n.setValue("userId", i.participantId), n.setValue("organizationId", i.orgId), n.setValue("authToken", e.authToken), n.setValue("overrides", (d = e.overrides) != null ? d : {}), n.setValue("env", AC({ baseURI: i.baseURI })), n.setValue("defaults", c), n.setValue("onError", e.onError || (() => {
27366
- })), n.setValue("cachedUserDetails", _s(e.cachedUserDetails)), n.setValue("sdkVersion", "2.0.2-staging.2"), (l = e.modules) != null && l.experimentalAudioPlayback && n.setValue("audioPlayback", new cO()), n;
27379
+ })), n.setValue("cachedUserDetails", _s(e.cachedUserDetails)), n.setValue("sdkVersion", "2.0.2-staging.4"), (l = e.modules) != null && l.experimentalAudioPlayback && n.setValue("audioPlayback", new dO()), n;
27367
27380
  }
27368
27381
  join() {
27369
27382
  return u(this, null, function* () {
@@ -27504,7 +27517,7 @@ xl([
27504
27517
  Gr = xl([
27505
27518
  rt("0000")
27506
27519
  ], Gr);
27507
- const uO = Gr;
27520
+ const hO = Gr;
27508
27521
  export {
27509
- uO as default
27522
+ hO as default
27510
27523
  };