@realsee/live 0.6.1 → 0.6.3

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
@@ -80,8 +80,8 @@ class ae {
80
80
  let n = !1;
81
81
  const a = ge(this)[s] || [];
82
82
  for (let u of a.slice()) {
83
- const [f, _ = !1] = u, g = f(...e);
84
- _ && this.off(s, f), g === !1 && (n = !0);
83
+ const [f, v = !1] = u, h = f(...e);
84
+ v && this.off(s, f), h === !1 && (n = !0);
85
85
  }
86
86
  return n;
87
87
  }
@@ -108,7 +108,7 @@ const Kt = () => {
108
108
  info: Gt,
109
109
  error: Ht,
110
110
  warn: Jt
111
- }, A = zt;
111
+ }, L = zt;
112
112
  function X() {
113
113
  return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
114
114
  }
@@ -173,8 +173,8 @@ class tt extends De {
173
173
  u.id = a, this.$dom.appendChild(u), typeof this._autoPlayConfirm == "function" ? (n.play(a).catch((f) => {
174
174
  }), n.on("error", (f) => {
175
175
  if (f.getCode() === 16451) {
176
- const g = () => n.resume();
177
- this._autoPlayConfirm({ onConfirm: g });
176
+ const h = () => n.resume();
177
+ this._autoPlayConfirm({ onConfirm: h });
178
178
  }
179
179
  })) : n.play(a);
180
180
  });
@@ -194,7 +194,7 @@ class tt extends De {
194
194
  const n = { audio: !0, video: !1 };
195
195
  try {
196
196
  navigator.mediaDevices.getUserMedia(n).then(() => e(!0)).catch((i) => {
197
- A.error(i.message), e(!1);
197
+ L.error(i.message), e(!1);
198
198
  });
199
199
  } catch (i) {
200
200
  console.error(i), e(!1);
@@ -216,9 +216,9 @@ class tt extends De {
216
216
  "audio-volume",
217
217
  (u) => this.emit(
218
218
  "userVolumes",
219
- u.result.map(({ userId: f, audioVolume: _ }) => ({
219
+ u.result.map(({ userId: f, audioVolume: v }) => ({
220
220
  userId: f,
221
- audioVolume: _
221
+ audioVolume: v
222
222
  }))
223
223
  )
224
224
  ), (a = this._trtc.client) == null || a.on("error", (u) => this.emit("error", u));
@@ -256,33 +256,27 @@ class rt extends De {
256
256
  o(this, "initObservers", () => {
257
257
  this.deviceChangeObserver = {
258
258
  audioInputsChanged: (e) => {
259
- e == null || e.forEach((n) => {
260
- this.logger.info(
261
- `Device ID: ${n.deviceId} Microphone: ${n.label}`
262
- );
259
+ this.logger.info(`audioInputsChanged ${typeof e}`), e == null || e.forEach((n) => {
260
+ this.logger.info(`Device ID: ${n.deviceId} Microphone: ${n.label}`);
263
261
  });
264
262
  },
265
263
  audioOutputsChanged: (e) => {
266
- this.logger.info(
267
- `Audio outputs updated: ${e}`
268
- );
269
- },
270
- videoInputsChanged: (e) => {
271
- this.logger.info(`Video inputs updated: ${e}`);
264
+ this.logger.info(`audioOutputsChanged ${typeof e}`), e == null || e.forEach((n) => {
265
+ this.logger.info(`Device ID: ${n.deviceId} Speaker: ${n.label}`);
266
+ });
272
267
  },
268
+ // videoInputsChanged: (freshVideoInputDeviceList: any) => {
269
+ // this.logger.info(`Video inputs updated: ${freshVideoInputDeviceList}`);
270
+ // },
273
271
  audioInputMuteStateChanged: (e, n) => {
274
- this.logger.info(
275
- `Device ${e.toString()} ${n ? "is muted in hardware" : "is not muted"}`
276
- );
272
+ this.logger.info(`Device ${e.toString()} ${n ? "is muted in hardware" : "is not muted"}`);
277
273
  }
278
274
  }, this.audioVideoObserver = {
279
275
  audioVideoDidStart: () => {
280
276
  this.logger.info("Started");
281
277
  },
282
278
  audioVideoDidStop: (e) => {
283
- this.logger.info(
284
- `Stopped with a session status code: ${e.statusCode()}`
285
- );
279
+ this.logger.info(`Stopped with a session status code: ${e.statusCode()}`);
286
280
  },
287
281
  audioVideoDidStartConnecting: (e) => {
288
282
  e && this.logger.info("Attempting to reconnect");
@@ -293,51 +287,46 @@ class rt extends De {
293
287
  * 注册rtc事件
294
288
  */
295
289
  o(this, "_registerRtcEvent", () => {
296
- var n, i, a, u, f, _;
290
+ var n, i, a, u, f, v;
297
291
  const e = ((a = (i = (n = this.meetingSession) == null ? void 0 : n.configuration) == null ? void 0 : i.credentials) == null ? void 0 : a.attendeeId) || "";
298
292
  if (e) {
299
- const g = /* @__PURE__ */ new Map(), v = () => {
300
- const p = [];
301
- return g.forEach((w, m) => {
302
- p.push({
293
+ const h = /* @__PURE__ */ new Map(), _ = () => {
294
+ const E = [];
295
+ return h.forEach((w, m) => {
296
+ E.push({
303
297
  userId: w.userId,
304
298
  volume: w.muted || w.signalStrength === 0 || !Boolean(w.volume) ? 0 : w.volume
305
299
  });
306
- }), p;
300
+ }), E;
307
301
  };
308
302
  (u = this.meetingSession) == null || u.audioVideo.realtimeSubscribeToAttendeeIdPresence(
309
- (p, w, m) => {
310
- var N;
303
+ (E, w, m) => {
304
+ var A;
311
305
  if (!w) {
312
- g.delete(p), this.emit("userVolumes", v());
306
+ h.delete(E), this.emit("userVolumes", _());
313
307
  return;
314
308
  }
315
- (N = this.meetingSession) == null || N.audioVideo.realtimeSubscribeToVolumeIndicator(
316
- p,
317
- (M, P, Y, K) => {
318
- new et(M).base() === M && (g.set(M, {
309
+ (A = this.meetingSession) == null || A.audioVideo.realtimeSubscribeToVolumeIndicator(
310
+ E,
311
+ (M, k, H, J) => {
312
+ new et(M).base() === M && (h.set(M, {
319
313
  userId: m || M,
320
- volume: P,
321
- muted: Y,
322
- signalStrength: K
323
- }), this.emit("userVolumes", v()));
314
+ volume: k,
315
+ muted: H,
316
+ signalStrength: J
317
+ }), this.emit("userVolumes", _()));
324
318
  }
325
319
  );
326
320
  }
327
321
  ), (f = this.meetingSession) == null || f.audioVideo.realtimeSubscribeToVolumeIndicator(
328
322
  e,
329
- (p, w, m, N) => {
330
- new et(p).base() === p && N !== null && N !== 1 && this.emit("weakNetwork");
323
+ (E, w, m, A) => {
324
+ new et(E).base() === E && A !== null && A !== 1 && this.emit("weakNetwork");
331
325
  }
332
- ), (_ = this.meetingSession) == null || _.audioVideo.realtimeSubscribeToFatalError(
333
- (p) => this.emit("error", p)
334
- );
326
+ ), (v = this.meetingSession) == null || v.audioVideo.realtimeSubscribeToFatalError((E) => this.emit("error", E));
335
327
  }
336
328
  });
337
- this._getVoiceSign = e.getVoiceSign, this._initDom(), this.logger = new Mt(
338
- "WebRTCLogger",
339
- e.logLevel || $t.INFO
340
- ), this.deviceController = new xt(this.logger), this.initObservers();
329
+ this._getVoiceSign = e.getVoiceSign, this._initDom(), this.logger = new Mt("WebRTCLogger", e.logLevel || $t.INFO), this.deviceController = new xt(this.logger), this.initObservers();
341
330
  }
342
331
  /**
343
332
  * 加入语音会议
@@ -346,54 +335,45 @@ class rt extends De {
346
335
  */
347
336
  async join(e) {
348
337
  return new Promise(async (n, i) => {
349
- var a, u;
338
+ var a;
350
339
  this.emit("joinWillStart");
351
340
  try {
352
- const { sdkAppId: f, userId: _, roomId: g, userSig: v } = await this._getVoiceSign({
341
+ const { sdkAppId: u, userId: f, roomId: v, userSig: h } = await this._getVoiceSign({
353
342
  ...e,
354
343
  roomId: e.roomId || 0
355
344
  });
356
- this.userId = _;
357
- const {
358
- attendence: p,
359
- vendor_wrapper: w
360
- } = JSON.parse(
361
- decodeURIComponent(v)
362
- ), m = new Ut(
345
+ this.userId = f;
346
+ const { attendence: _, vendor_wrapper: E } = JSON.parse(
347
+ decodeURIComponent(h)
348
+ ), w = new Ut(
363
349
  {
364
- Meeting: w
350
+ Meeting: E
365
351
  },
366
352
  {
367
353
  Attendee: {
368
- ExternalUserId: p.external_user_id,
369
- AttendeeId: p.attendee_id,
370
- JoinToken: p.join_token
354
+ ExternalUserId: _.external_user_id,
355
+ AttendeeId: _.attendee_id,
356
+ JoinToken: _.join_token
371
357
  }
372
358
  }
373
359
  );
374
- this.meetingSession = new Bt(
375
- m,
376
- this.logger,
377
- this.deviceController
378
- ), this._registerRtcEvent(), this.meetingSession.audioVideo.addDeviceChangeObserver(
379
- this.deviceChangeObserver
380
- ), this.meetingSession.audioVideo.addObserver(this.audioVideoObserver), this.meetingSession.audioVideo.bindAudioElement(this.$audio);
381
- const N = {
360
+ this.meetingSession = new Bt(w, this.logger, this.deviceController), this._registerRtcEvent(), this.meetingSession.audioVideo.addDeviceChangeObserver(this.deviceChangeObserver), this.meetingSession.audioVideo.addObserver(this.audioVideoObserver), this.meetingSession.audioVideo.bindAudioElement(this.$audio);
361
+ const m = {
382
362
  audioVideoDidStart: () => {
383
- var I;
384
- (I = this.meetingSession) == null || I.audioVideo.realtimeMuteLocalAudio(), this.joined = !0, this.emit("joined"), n(!0);
363
+ var k;
364
+ (k = this.meetingSession) == null || k.audioVideo.realtimeMuteLocalAudio(), this.joined = !0, this.emit("joined"), n(!0);
385
365
  },
386
366
  audioVideoDidStop: () => {
387
367
  this.joined = !1, n(!1);
388
368
  }
389
369
  };
390
- this.meetingSession.audioVideo.addObserver(N), this.meetingSession.audioVideo.setDeviceLabelTrigger(
370
+ this.meetingSession.audioVideo.addObserver(m), this.meetingSession.audioVideo.setDeviceLabelTrigger(
391
371
  async () => await navigator.mediaDevices.getUserMedia({ audio: !0, video: !1 })
392
372
  );
393
- const P = ((a = (await this.meetingSession.audioVideo.listAudioInputDevices())[0]) == null ? void 0 : a.deviceId) || "default", K = ((u = (await this.meetingSession.audioVideo.listAudioOutputDevices())[0]) == null ? void 0 : u.deviceId) || "default";
394
- await this.meetingSession.audioVideo.startAudioInput(P), await this.meetingSession.audioVideo.chooseAudioOutput(K), this.meetingSession.audioVideo.start();
395
- } catch (f) {
396
- this.emit("error", f), this.logger.error(f.message), n(!1);
373
+ const M = ((a = (await this.meetingSession.audioVideo.listAudioInputDevices())[0]) == null ? void 0 : a.deviceId) || "default";
374
+ await this.meetingSession.audioVideo.startAudioInput(M), this.meetingSession.audioVideo.start();
375
+ } catch (u) {
376
+ this.emit("error", u), this.logger.error(u.message), n(!1);
397
377
  }
398
378
  });
399
379
  }
@@ -403,11 +383,9 @@ class rt extends De {
403
383
  this.joined = !1;
404
384
  const i = {
405
385
  audioVideoDidStop: async (f) => {
406
- var g;
407
- const _ = f.statusCode();
408
- (g = this.meetingSession) == null || g.deviceController.destroy(), _ === Wt.Left ? (this.logger.info("You left the session"), e(!0)) : (this.logger.info(
409
- `Stopped with a session status code: ${_}`
410
- ), e(!0));
386
+ var h;
387
+ const v = f.statusCode();
388
+ (h = this.meetingSession) == null || h.deviceController.destroy(), v === Wt.Left ? (this.logger.info("You left the session"), e(!0)) : (this.logger.info(`Stopped with a session status code: ${v}`), e(!0));
411
389
  }
412
390
  };
413
391
  (a = this.meetingSession) == null || a.audioVideo.addObserver(i), (u = this.meetingSession) == null || u.audioVideo.stop();
@@ -496,7 +474,7 @@ class nt extends De {
496
474
  this.jsBridge.shock(1);
497
475
  }
498
476
  }
499
- var W = /* @__PURE__ */ ((t) => (t.SelfUserInfo = "SELF_USER_INFO", t.RoomInfo = "ROOM_INFO", t.RTCInfo = "RTC_INFO", t.UserList = "USER_LIST", t.BuiltinMsg = "BUILTIN_MSG", t.CustomEvent = "CUSTOM_EVENT", t.KeyframeSync = "KEYFRAME_SYNC", t.UserKickOut = "USER_KICK_OUT", t))(W || {}), q = /* @__PURE__ */ ((t) => (t.UserChange = "user_change", t.RoomChange = "room_change", t))(q || {}), J = /* @__PURE__ */ ((t) => (t.UserMicroStatus = "change_micro_status", t.UserMicroStatusSync = "sync_micro_status", t.UserPermission = "change_permission", t.UserStatus = "change_status", t.UserInfo = "change_info", t.RoomClose = "close", t))(J || {}), Z = /* @__PURE__ */ ((t) => (t.OPEN = "OPEN", t.CLOSE = "CLOSE", t))(Z || {});
477
+ var W = /* @__PURE__ */ ((t) => (t.SelfUserInfo = "SELF_USER_INFO", t.RoomInfo = "ROOM_INFO", t.RTCInfo = "RTC_INFO", t.UserList = "USER_LIST", t.BuiltinMsg = "BUILTIN_MSG", t.CustomEvent = "CUSTOM_EVENT", t.KeyframeSync = "KEYFRAME_SYNC", t.UserKickOut = "USER_KICK_OUT", t))(W || {}), q = /* @__PURE__ */ ((t) => (t.UserChange = "user_change", t.RoomChange = "room_change", t))(q || {}), G = /* @__PURE__ */ ((t) => (t.UserMicroStatus = "change_micro_status", t.UserMicroStatusSync = "sync_micro_status", t.UserPermission = "change_permission", t.UserStatus = "change_status", t.UserInfo = "change_info", t.RoomClose = "close", t))(G || {}), Z = /* @__PURE__ */ ((t) => (t.OPEN = "OPEN", t.CLOSE = "CLOSE", t))(Z || {});
500
478
  function Tr(t) {
501
479
  try {
502
480
  const s = JSON.parse(t), e = {
@@ -878,7 +856,7 @@ class _r extends ae {
878
856
  * @param event
879
857
  */
880
858
  o(this, "_handleCloseEvent", (e) => {
881
- A.info(
859
+ L.info(
882
860
  `live room closed bacause of ${e.code}-${e.reason || tr(e.code)}`
883
861
  ), this.state = x.CLOSED;
884
862
  });
@@ -887,21 +865,21 @@ class _r extends ae {
887
865
  */
888
866
  o(this, "_handleClosingEvent", () => {
889
867
  var e;
890
- A.info("live room is closing, onLine:", (e = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : e.onLine), this.state = x.CLOSED;
868
+ L.info("live room is closing, onLine:", (e = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : e.onLine), this.state = x.CLOSED;
891
869
  });
892
870
  /**
893
871
  * 连接中
894
872
  * @param event
895
873
  */
896
874
  o(this, "_handleConnectingEvent", () => {
897
- A.info("live room is connecting"), this.state = x.CONNECTING;
875
+ L.info("live room is connecting"), this.state = x.CONNECTING;
898
876
  });
899
877
  /**
900
878
  * 连接发送异常
901
879
  * @param event
902
880
  */
903
881
  o(this, "_handleErrorEvent", (e) => {
904
- A.error("live room error", e), this.state = x.CLOSED;
882
+ L.error("live room error", e), this.state = x.CLOSED;
905
883
  });
906
884
  /**
907
885
  * 接收到消息
@@ -922,14 +900,14 @@ class _r extends ae {
922
900
  * @param event
923
901
  */
924
902
  o(this, "_handleOpenEvent", (e) => {
925
- A.info("live room open", e.detail), this.state = x.OPEN, e.detail.reconnects > 0 && this.emit("reconnected", e.detail);
903
+ L.info("live room open", e.detail), this.state = x.OPEN, e.detail.reconnects > 0 && this.emit("reconnected", e.detail);
926
904
  });
927
905
  /**
928
906
  * 处理超时
929
907
  * @param event
930
908
  */
931
909
  o(this, "_handleTimeoutEvent", (e) => {
932
- A.error("live room connect timeout!", e.detail), this.state = x.CLOSED;
910
+ L.error("live room connect timeout!", e.detail), this.state = x.CLOSED;
933
911
  });
934
912
  /**
935
913
  * 释放资源,释放之后需要重新实例化
@@ -1023,7 +1001,7 @@ class vr extends ae {
1023
1001
  try {
1024
1002
  return this._controller.sendMessage(i), !0;
1025
1003
  } catch (a) {
1026
- return A.error(a), !1;
1004
+ return L.error(a), !1;
1027
1005
  }
1028
1006
  });
1029
1007
  /**
@@ -1055,20 +1033,20 @@ class vr extends ae {
1055
1033
  o(this, "_handleMessage", async (e) => {
1056
1034
  var n, i, a, u, f;
1057
1035
  if (typeof e == "object") {
1058
- const { command: _, data: g = {}, frontRequestId: v, code: p, message: w } = e;
1059
- if (p === "SUCCESS")
1060
- switch (_) {
1036
+ const { command: v, data: h = {}, frontRequestId: _, code: E, message: w } = e;
1037
+ if (E === "SUCCESS")
1038
+ switch (v) {
1061
1039
  case W.SelfUserInfo: {
1062
- const m = g;
1040
+ const m = h;
1063
1041
  st(this.selfInfo, m, { deep: !0 }) || (this._buildInData.selfInfo = m, this.emit(
1064
1042
  "selfInfoUpdate",
1065
1043
  this._buildInData.selfInfo,
1066
- v
1044
+ _
1067
1045
  ));
1068
1046
  break;
1069
1047
  }
1070
1048
  case W.RoomInfo: {
1071
- const m = g;
1049
+ const m = h;
1072
1050
  this._buildInData.roomInfo = Object.assign({}, m), this.emit(
1073
1051
  "readyKeyframeSync",
1074
1052
  m.last_frame || {}
@@ -1076,64 +1054,64 @@ class vr extends ae {
1076
1054
  break;
1077
1055
  }
1078
1056
  case W.RTCInfo: {
1079
- const { voice_id: m, type: N } = g;
1080
- if (this._buildInData.rtcInfo = { voiceId: m, type: N }, (n = this.$RTC) != null && n.joined)
1081
- A.warn("已加入语音房间,无需重复加入!");
1057
+ const { voice_id: m, type: A } = h;
1058
+ if (this._buildInData.rtcInfo = { voiceId: m, type: A }, (n = this.$RTC) != null && n.joined)
1059
+ L.warn("已加入语音房间,无需重复加入!");
1082
1060
  else if (await ((u = this.$RTC) == null ? void 0 : u.join({
1083
1061
  voiceId: m,
1084
1062
  userId: ((i = this.selfInfo) == null ? void 0 : i.id) || "",
1085
1063
  roomId: (a = this.roomInfo) == null ? void 0 : a.info.room_code,
1086
- type: N
1064
+ type: A
1087
1065
  }))) {
1088
- const P = (f = this._options.initialMicroStatus) != null ? f : Z.OPEN;
1089
- await this.toggleMicro(P === Z.OPEN);
1066
+ const k = (f = this._options.initialMicroStatus) != null ? f : Z.OPEN;
1067
+ await this.toggleMicro(k === Z.OPEN);
1090
1068
  } else
1091
- A.error("加入语音房间失败");
1069
+ L.error("加入语音房间失败");
1092
1070
  break;
1093
1071
  }
1094
1072
  case W.UserList: {
1095
- const m = g;
1096
- this._buildInData.userList = m, this.emit("userListUpdate", this.userList, v);
1073
+ const m = h;
1074
+ this._buildInData.userList = m, this.emit("userListUpdate", this.userList, _);
1097
1075
  break;
1098
1076
  }
1099
1077
  case W.CustomEvent: {
1100
- const m = g;
1101
- this.emit("broadcast", m, v);
1078
+ const m = h;
1079
+ this.emit("broadcast", m, _);
1102
1080
  break;
1103
1081
  }
1104
1082
  case W.KeyframeSync: {
1105
- const m = g, N = Object.keys(
1083
+ const m = h, A = Object.keys(
1106
1084
  m
1107
1085
  ).reduce(
1108
- (M, P) => {
1086
+ (M, k) => {
1109
1087
  if (st(
1110
- m[P],
1111
- this._buildInData.keyframes[P],
1088
+ m[k],
1089
+ this._buildInData.keyframes[k],
1112
1090
  {
1113
1091
  deep: !0
1114
1092
  }
1115
1093
  ))
1116
1094
  return M;
1117
- const Y = [
1118
- m[P],
1119
- this._buildInData.keyframes[P],
1120
- v
1121
- ], K = P;
1095
+ const H = [
1096
+ m[k],
1097
+ this._buildInData.keyframes[k],
1098
+ _
1099
+ ], J = k;
1122
1100
  return this.keyframes.emit(
1123
- K,
1124
- ...Y
1125
- ), this._buildInData.keyframes[P] = m[P], M[P] = m[P], M;
1101
+ J,
1102
+ ...H
1103
+ ), this._buildInData.keyframes[k] = m[k], M[k] = m[k], M;
1126
1104
  },
1127
1105
  {}
1128
1106
  );
1129
- this.emit("keyframes", N, v);
1107
+ this.emit("keyframes", A, _);
1130
1108
  break;
1131
1109
  }
1132
1110
  case W.BuiltinMsg: {
1133
- const m = g;
1134
- this.emit("builtinEvent", m), m.event_type === q.UserChange && this.emit("userChange", m), m.event_type === q.RoomChange && this.emit("roomChange", m), m.event_type === q.UserChange && m.action === J.UserMicroStatus && await this.toggleMicro(
1111
+ const m = h;
1112
+ this.emit("builtinEvent", m), m.event_type === q.UserChange && this.emit("userChange", m), m.event_type === q.RoomChange && this.emit("roomChange", m), m.event_type === q.UserChange && m.action === G.UserMicroStatus && await this.toggleMicro(
1135
1113
  m.data.status === Z.OPEN
1136
- ), m.event_type === q.RoomChange && m.action === J.RoomClose && await this.exit();
1114
+ ), m.event_type === q.RoomChange && m.action === G.RoomClose && await this.exit();
1137
1115
  break;
1138
1116
  }
1139
1117
  case W.UserKickOut: {
@@ -1141,7 +1119,7 @@ class vr extends ae {
1141
1119
  break;
1142
1120
  }
1143
1121
  default:
1144
- console.warn("unknown command: ", _);
1122
+ console.warn("unknown command: ", v);
1145
1123
  }
1146
1124
  else
1147
1125
  this.emit("error", e);
@@ -1159,8 +1137,8 @@ class vr extends ae {
1159
1137
  * @returns
1160
1138
  */
1161
1139
  o(this, "connect", async (e = {}) => {
1162
- var u, f, _, g;
1163
- if (this._options.url = (f = (u = e.url) != null ? u : this._options.url) != null ? f : "", this._options.getTicket = (_ = e.getTicket) != null ? _ : this._options.getTicket, this._options.initialMicroStatus = (g = e.rtcMicStatus) != null ? g : this._options.initialMicroStatus, !/^ws(s):\/\//.test(this._options.url) || typeof this._options.getTicket != "function")
1140
+ var u, f, v, h;
1141
+ if (this._options.url = (f = (u = e.url) != null ? u : this._options.url) != null ? f : "", this._options.getTicket = (v = e.getTicket) != null ? v : this._options.getTicket, this._options.initialMicroStatus = (h = e.rtcMicStatus) != null ? h : this._options.initialMicroStatus, !/^ws(s):\/\//.test(this._options.url) || typeof this._options.getTicket != "function")
1164
1142
  return /^ws(s):\/\//.test(this._options.url) ? typeof this._options.getTicket != "function" ? new Error("getTicket muse be function") : !1 : new Error("Illegal realsee live room link");
1165
1143
  const { force: n = !1 } = e;
1166
1144
  if (this._options.rtc && !await this._options.rtc.detectMicro())
@@ -1170,8 +1148,8 @@ class vr extends ae {
1170
1148
  if (n)
1171
1149
  try {
1172
1150
  await this._controller.close("force close by connect");
1173
- } catch (v) {
1174
- console.warn(v);
1151
+ } catch (_) {
1152
+ console.warn(_);
1175
1153
  }
1176
1154
  else
1177
1155
  return new Error("已有Live实例正在连接中,请勿重复连接!");
@@ -1193,7 +1171,7 @@ class vr extends ae {
1193
1171
  try {
1194
1172
  await ((e = this.$RTC) == null ? void 0 : e.quit());
1195
1173
  } catch (n) {
1196
- A.warn(n);
1174
+ L.warn(n);
1197
1175
  }
1198
1176
  return await this._controller.close();
1199
1177
  });
@@ -1208,7 +1186,7 @@ class vr extends ae {
1208
1186
  if ((n = (e = this.selfInfo) == null ? void 0 : e.permission) != null && n.close_live_room)
1209
1187
  return await this.updateStatus(
1210
1188
  q.RoomChange,
1211
- J.RoomClose,
1189
+ G.RoomClose,
1212
1190
  {}
1213
1191
  );
1214
1192
  });
@@ -1224,7 +1202,7 @@ class vr extends ae {
1224
1202
  */
1225
1203
  o(this, "setSelfInfo", async (e) => await this.updateStatus(
1226
1204
  q.UserChange,
1227
- J.UserInfo,
1205
+ G.UserInfo,
1228
1206
  e
1229
1207
  ));
1230
1208
  // 仅用于用户自己的麦克风控制
@@ -1235,7 +1213,7 @@ class vr extends ae {
1235
1213
  const n = await ((u = this.$RTC) == null ? void 0 : u.toggleMicro(e));
1236
1214
  return n && await this.updateStatus(
1237
1215
  q.UserChange,
1238
- J.UserMicroStatus,
1216
+ G.UserMicroStatus,
1239
1217
  {
1240
1218
  status: e ? Z.OPEN : Z.CLOSE
1241
1219
  },
@@ -1252,7 +1230,7 @@ class vr extends ae {
1252
1230
  var i, a;
1253
1231
  return typeof this._options.canForbidUserMicro == "function" && !this._options.canForbidUserMicro(n) || !((a = (i = this.selfInfo) == null ? void 0 : i.permission) != null && a.control_other_micro) ? !1 : await this.updateStatus(
1254
1232
  q.UserChange,
1255
- J.UserMicroStatus,
1233
+ G.UserMicroStatus,
1256
1234
  {
1257
1235
  status: e
1258
1236
  },
@@ -1269,7 +1247,7 @@ class vr extends ae {
1269
1247
  var i, a;
1270
1248
  return typeof this._options.canForbidUserSync == "function" && !this._options.canForbidUserSync(n) || !((a = (i = this.selfInfo) == null ? void 0 : i.permission) != null && a.control_other_sync) ? !1 : await this.updateStatus(
1271
1249
  q.UserChange,
1272
- J.UserPermission,
1250
+ G.UserPermission,
1273
1251
  { sync_frame: e },
1274
1252
  n
1275
1253
  );
@@ -1283,7 +1261,7 @@ class vr extends ae {
1283
1261
  var n, i;
1284
1262
  return typeof this._options.canForbidUserKick == "function" && !this._options.canForbidUserKick(e) || !((i = (n = this.selfInfo) == null ? void 0 : n.permission) != null && i.change_other_status) ? !1 : await this.updateStatus(
1285
1263
  q.UserChange,
1286
- J.UserStatus,
1264
+ G.UserStatus,
1287
1265
  {
1288
1266
  status: "KICK_OUT"
1289
1267
  },
@@ -1302,7 +1280,7 @@ class vr extends ae {
1302
1280
  if (e.rtc)
1303
1281
  return e.rtc;
1304
1282
  if (e.rtcType)
1305
- switch (e.getVoiceSign || A.error(
1283
+ switch (e.getVoiceSign || L.error(
1306
1284
  "GetVoiceSign method must be passed when using built-in RTC instances"
1307
1285
  ), e.rtcType) {
1308
1286
  case Q.RealseeVRWebViewRTC: {
@@ -1311,7 +1289,7 @@ class vr extends ae {
1311
1289
  jsBridge: this._options.jsBridge,
1312
1290
  getVoiceSign: this._options.getVoiceSign
1313
1291
  });
1314
- A.error(
1292
+ L.error(
1315
1293
  "JsBridge instance must be passed when using built-in VRWebViewRTC instances"
1316
1294
  );
1317
1295
  return;
@@ -1322,19 +1300,19 @@ class vr extends ae {
1322
1300
  logLevel: e.__debug__ ? it.DEBUG : it.INFO
1323
1301
  });
1324
1302
  case Q.RealseeBrowserRTC:
1325
- return this._options.autoPlayConfirm || A.error(
1303
+ return this._options.autoPlayConfirm || L.error(
1326
1304
  "autoPlayConfirm method must be passed when using built-in RealseeBrowserRTC instances"
1327
1305
  ), new tt({
1328
1306
  getVoiceSign: this._options.getVoiceSign,
1329
1307
  autoPlayConfirm: this._options.autoPlayConfirm
1330
1308
  });
1331
1309
  default: {
1332
- A.error("unknown built-in RTC type");
1310
+ L.error("unknown built-in RTC type");
1333
1311
  return;
1334
1312
  }
1335
1313
  }
1336
1314
  if (e.useBuiltInRTC) {
1337
- if (e.getVoiceSign || A.error(
1315
+ if (e.getVoiceSign || L.error(
1338
1316
  "GetVoiceSign method must be passed when using built-in RTC instances"
1339
1317
  ), this._options.jsBridge)
1340
1318
  return ar && (ir || sr) || or ? new nt({
@@ -1346,12 +1324,12 @@ class vr extends ae {
1346
1324
  getVoiceSign: this._options.getVoiceSign,
1347
1325
  autoPlayConfirm: this._options.autoPlayConfirm
1348
1326
  });
1349
- A.error(
1327
+ L.error(
1350
1328
  "jsBridge instance must be passed when using built-in RTC instances"
1351
1329
  );
1352
1330
  return;
1353
1331
  }
1354
- })(), this._options.rtc || A.warn("unused rtc"), this._options.url && this._options.getTicket && this.connect(), this._options.__debug__ && Object.assign(window, { $liveController: this._controller, $live: this });
1332
+ })(), this._options.rtc || L.warn("unused rtc"), this._options.url && this._options.getTicket && this.connect(), this._options.__debug__ && Object.assign(window, { $liveController: this._controller, $live: this });
1355
1333
  }
1356
1334
  get options() {
1357
1335
  return Object.freeze(this._options || {});
@@ -1429,8 +1407,8 @@ class vr extends ae {
1429
1407
  ), f = Pe(W.BuiltinMsg, u, a);
1430
1408
  try {
1431
1409
  return this._controller.sendMessage(f), !0;
1432
- } catch (_) {
1433
- return A.error(_), !1;
1410
+ } catch (v) {
1411
+ return L.error(v), !1;
1434
1412
  }
1435
1413
  }
1436
1414
  /**
@@ -1446,16 +1424,16 @@ class vr extends ae {
1446
1424
  W.CustomEvent,
1447
1425
  e,
1448
1426
  n
1449
- ), _ = f.front_request_id, g = i ? setTimeout(() => {
1450
- u(new Error("RESPONSE TIMEOUT")), this.off("broadcast", v);
1451
- }, i) : void 0, v = (p, w) => {
1452
- w === _ && (g && clearTimeout(g), this.off("broadcast", v), a(p));
1427
+ ), v = f.front_request_id, h = i ? setTimeout(() => {
1428
+ u(new Error("RESPONSE TIMEOUT")), this.off("broadcast", _);
1429
+ }, i) : void 0, _ = (E, w) => {
1430
+ w === v && (h && clearTimeout(h), this.off("broadcast", _), a(E));
1453
1431
  };
1454
- this.on("broadcast", v);
1432
+ this.on("broadcast", _);
1455
1433
  try {
1456
1434
  this._controller.sendMessage(f);
1457
- } catch (p) {
1458
- u(p);
1435
+ } catch (E) {
1436
+ u(E);
1459
1437
  }
1460
1438
  });
1461
1439
  }
@@ -1494,31 +1472,31 @@ function dt() {
1494
1472
  return !1;
1495
1473
  for (var u = {}, f = 0; f < 10; f++)
1496
1474
  u["_" + String.fromCharCode(f)] = f;
1497
- var _ = Object.getOwnPropertyNames(u).map(function(v) {
1498
- return u[v];
1475
+ var v = Object.getOwnPropertyNames(u).map(function(_) {
1476
+ return u[_];
1499
1477
  });
1500
- if (_.join("") !== "0123456789")
1478
+ if (v.join("") !== "0123456789")
1501
1479
  return !1;
1502
- var g = {};
1503
- return "abcdefghijklmnopqrst".split("").forEach(function(v) {
1504
- g[v] = v;
1505
- }), Object.keys(Object.assign({}, g)).join("") === "abcdefghijklmnopqrst";
1506
- } catch (v) {
1480
+ var h = {};
1481
+ return "abcdefghijklmnopqrst".split("").forEach(function(_) {
1482
+ h[_] = _;
1483
+ }), Object.keys(Object.assign({}, h)).join("") === "abcdefghijklmnopqrst";
1484
+ } catch (_) {
1507
1485
  return !1;
1508
1486
  }
1509
1487
  }
1510
1488
  return je = i() ? Object.assign : function(a, u) {
1511
- for (var f, _ = n(a), g, v = 1; v < arguments.length; v++) {
1512
- f = Object(arguments[v]);
1513
- for (var p in f)
1514
- s.call(f, p) && (_[p] = f[p]);
1489
+ for (var f, v = n(a), h, _ = 1; _ < arguments.length; _++) {
1490
+ f = Object(arguments[_]);
1491
+ for (var E in f)
1492
+ s.call(f, E) && (v[E] = f[E]);
1515
1493
  if (t) {
1516
- g = t(f);
1517
- for (var w = 0; w < g.length; w++)
1518
- e.call(f, g[w]) && (_[g[w]] = f[g[w]]);
1494
+ h = t(f);
1495
+ for (var w = 0; w < h.length; w++)
1496
+ e.call(f, h[w]) && (v[h[w]] = f[h[w]]);
1519
1497
  }
1520
1498
  }
1521
- return _;
1499
+ return v;
1522
1500
  }, je;
1523
1501
  }
1524
1502
  /** @license React v17.0.2
@@ -1540,15 +1518,15 @@ function br() {
1540
1518
  s = e("react.element"), ie.Fragment = e("react.fragment");
1541
1519
  }
1542
1520
  var n = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = Object.prototype.hasOwnProperty, a = { key: !0, ref: !0, __self: !0, __source: !0 };
1543
- function u(f, _, g) {
1544
- var v, p = {}, w = null, m = null;
1545
- g !== void 0 && (w = "" + g), _.key !== void 0 && (w = "" + _.key), _.ref !== void 0 && (m = _.ref);
1546
- for (v in _)
1547
- i.call(_, v) && !a.hasOwnProperty(v) && (p[v] = _[v]);
1521
+ function u(f, v, h) {
1522
+ var _, E = {}, w = null, m = null;
1523
+ h !== void 0 && (w = "" + h), v.key !== void 0 && (w = "" + v.key), v.ref !== void 0 && (m = v.ref);
1524
+ for (_ in v)
1525
+ i.call(v, _) && !a.hasOwnProperty(_) && (E[_] = v[_]);
1548
1526
  if (f && f.defaultProps)
1549
- for (v in _ = f.defaultProps, _)
1550
- p[v] === void 0 && (p[v] = _[v]);
1551
- return { $$typeof: s, type: f, key: w, ref: m, props: p, _owner: n.current };
1527
+ for (_ in v = f.defaultProps, v)
1528
+ E[_] === void 0 && (E[_] = v[_]);
1529
+ return { $$typeof: s, type: f, key: w, ref: m, props: E, _owner: n.current };
1552
1530
  }
1553
1531
  return ie.jsx = u, ie.jsxs = u, ie;
1554
1532
  }
@@ -1562,48 +1540,48 @@ var Ne = {};
1562
1540
  * LICENSE file in the root directory of this source tree.
1563
1541
  */
1564
1542
  var ct;
1565
- function Cr() {
1543
+ function yr() {
1566
1544
  return ct || (ct = 1, function(t) {
1567
1545
  process.env.NODE_ENV !== "production" && function() {
1568
1546
  var s = V, e = dt(), n = 60103, i = 60106;
1569
1547
  t.Fragment = 60107;
1570
- var a = 60108, u = 60114, f = 60109, _ = 60110, g = 60112, v = 60113, p = 60120, w = 60115, m = 60116, N = 60121, M = 60122, P = 60117, Y = 60129, K = 60131;
1548
+ var a = 60108, u = 60114, f = 60109, v = 60110, h = 60112, _ = 60113, E = 60120, w = 60115, m = 60116, A = 60121, M = 60122, k = 60117, H = 60129, J = 60131;
1571
1549
  if (typeof Symbol == "function" && Symbol.for) {
1572
1550
  var I = Symbol.for;
1573
- n = I("react.element"), i = I("react.portal"), t.Fragment = I("react.fragment"), a = I("react.strict_mode"), u = I("react.profiler"), f = I("react.provider"), _ = I("react.context"), g = I("react.forward_ref"), v = I("react.suspense"), p = I("react.suspense_list"), w = I("react.memo"), m = I("react.lazy"), N = I("react.block"), M = I("react.server.block"), P = I("react.fundamental"), I("react.scope"), I("react.opaque.id"), Y = I("react.debug_trace_mode"), I("react.offscreen"), K = I("react.legacy_hidden");
1551
+ n = I("react.element"), i = I("react.portal"), t.Fragment = I("react.fragment"), a = I("react.strict_mode"), u = I("react.profiler"), f = I("react.provider"), v = I("react.context"), h = I("react.forward_ref"), _ = I("react.suspense"), E = I("react.suspense_list"), w = I("react.memo"), m = I("react.lazy"), A = I("react.block"), M = I("react.server.block"), k = I("react.fundamental"), I("react.scope"), I("react.opaque.id"), H = I("react.debug_trace_mode"), I("react.offscreen"), J = I("react.legacy_hidden");
1574
1552
  }
1575
1553
  var d = typeof Symbol == "function" && Symbol.iterator, S = "@@iterator";
1576
- function L(r) {
1554
+ function N(r) {
1577
1555
  if (r === null || typeof r != "object")
1578
1556
  return null;
1579
1557
  var c = d && r[d] || r[S];
1580
1558
  return typeof c == "function" ? c : null;
1581
1559
  }
1582
1560
  var b = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1583
- function C(r) {
1561
+ function y(r) {
1584
1562
  {
1585
- for (var c = arguments.length, l = new Array(c > 1 ? c - 1 : 0), h = 1; h < c; h++)
1586
- l[h - 1] = arguments[h];
1563
+ for (var c = arguments.length, l = new Array(c > 1 ? c - 1 : 0), g = 1; g < c; g++)
1564
+ l[g - 1] = arguments[g];
1587
1565
  D("error", r, l);
1588
1566
  }
1589
1567
  }
1590
1568
  function D(r, c, l) {
1591
1569
  {
1592
- var h = b.ReactDebugCurrentFrame, O = h.getStackAddendum();
1570
+ var g = b.ReactDebugCurrentFrame, O = g.getStackAddendum();
1593
1571
  O !== "" && (c += "%s", l = l.concat([O]));
1594
- var R = l.map(function(y) {
1595
- return "" + y;
1572
+ var R = l.map(function(C) {
1573
+ return "" + C;
1596
1574
  });
1597
1575
  R.unshift("Warning: " + c), Function.prototype.apply.call(console[r], console, R);
1598
1576
  }
1599
1577
  }
1600
1578
  var U = !1;
1601
1579
  function z(r) {
1602
- return !!(typeof r == "string" || typeof r == "function" || r === t.Fragment || r === u || r === Y || r === a || r === v || r === p || r === K || U || typeof r == "object" && r !== null && (r.$$typeof === m || r.$$typeof === w || r.$$typeof === f || r.$$typeof === _ || r.$$typeof === g || r.$$typeof === P || r.$$typeof === N || r[0] === M));
1580
+ return !!(typeof r == "string" || typeof r == "function" || r === t.Fragment || r === u || r === H || r === a || r === _ || r === E || r === J || U || typeof r == "object" && r !== null && (r.$$typeof === m || r.$$typeof === w || r.$$typeof === f || r.$$typeof === v || r.$$typeof === h || r.$$typeof === k || r.$$typeof === A || r[0] === M));
1603
1581
  }
1604
1582
  function ue(r, c, l) {
1605
- var h = c.displayName || c.name || "";
1606
- return r.displayName || (h !== "" ? l + "(" + h + ")" : l);
1583
+ var g = c.displayName || c.name || "";
1584
+ return r.displayName || (g !== "" ? l + "(" + g + ")" : l);
1607
1585
  }
1608
1586
  function be(r) {
1609
1587
  return r.displayName || "Context";
@@ -1611,7 +1589,7 @@ function Cr() {
1611
1589
  function F(r) {
1612
1590
  if (r == null)
1613
1591
  return null;
1614
- if (typeof r.tag == "number" && C("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof r == "function")
1592
+ if (typeof r.tag == "number" && y("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof r == "function")
1615
1593
  return r.displayName || r.name || null;
1616
1594
  if (typeof r == "string")
1617
1595
  return r;
@@ -1624,30 +1602,30 @@ function Cr() {
1624
1602
  return "Profiler";
1625
1603
  case a:
1626
1604
  return "StrictMode";
1627
- case v:
1605
+ case _:
1628
1606
  return "Suspense";
1629
- case p:
1607
+ case E:
1630
1608
  return "SuspenseList";
1631
1609
  }
1632
1610
  if (typeof r == "object")
1633
1611
  switch (r.$$typeof) {
1634
- case _:
1612
+ case v:
1635
1613
  var c = r;
1636
1614
  return be(c) + ".Consumer";
1637
1615
  case f:
1638
1616
  var l = r;
1639
1617
  return be(l._context) + ".Provider";
1640
- case g:
1618
+ case h:
1641
1619
  return ue(r, r.render, "ForwardRef");
1642
1620
  case w:
1643
1621
  return F(r.type);
1644
- case N:
1622
+ case A:
1645
1623
  return F(r._render);
1646
1624
  case m: {
1647
- var h = r, O = h._payload, R = h._init;
1625
+ var g = r, O = g._payload, R = g._init;
1648
1626
  try {
1649
1627
  return F(R(O));
1650
- } catch (y) {
1628
+ } catch (C) {
1651
1629
  return null;
1652
1630
  }
1653
1631
  }
@@ -1713,21 +1691,21 @@ function Cr() {
1713
1691
  })
1714
1692
  });
1715
1693
  }
1716
- ee < 0 && C("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1694
+ ee < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1717
1695
  }
1718
1696
  }
1719
- var Ce = b.ReactCurrentDispatcher, ye;
1697
+ var ye = b.ReactCurrentDispatcher, Ce;
1720
1698
  function fe(r, c, l) {
1721
1699
  {
1722
- if (ye === void 0)
1700
+ if (Ce === void 0)
1723
1701
  try {
1724
1702
  throw Error();
1725
1703
  } catch (O) {
1726
- var h = O.stack.trim().match(/\n( *(at )?)/);
1727
- ye = h && h[1] || "";
1704
+ var g = O.stack.trim().match(/\n( *(at )?)/);
1705
+ Ce = g && g[1] || "";
1728
1706
  }
1729
1707
  return `
1730
- ` + ye + r;
1708
+ ` + Ce + r;
1731
1709
  }
1732
1710
  }
1733
1711
  var we = !1, de;
@@ -1743,65 +1721,65 @@ function Cr() {
1743
1721
  if (l !== void 0)
1744
1722
  return l;
1745
1723
  }
1746
- var h;
1724
+ var g;
1747
1725
  we = !0;
1748
1726
  var O = Error.prepareStackTrace;
1749
1727
  Error.prepareStackTrace = void 0;
1750
1728
  var R;
1751
- R = Ce.current, Ce.current = null, ht();
1729
+ R = ye.current, ye.current = null, ht();
1752
1730
  try {
1753
1731
  if (c) {
1754
- var y = function() {
1732
+ var C = function() {
1755
1733
  throw Error();
1756
1734
  };
1757
- if (Object.defineProperty(y.prototype, "props", {
1735
+ if (Object.defineProperty(C.prototype, "props", {
1758
1736
  set: function() {
1759
1737
  throw Error();
1760
1738
  }
1761
1739
  }), typeof Reflect == "object" && Reflect.construct) {
1762
1740
  try {
1763
- Reflect.construct(y, []);
1764
- } catch (H) {
1765
- h = H;
1741
+ Reflect.construct(C, []);
1742
+ } catch (Y) {
1743
+ g = Y;
1766
1744
  }
1767
- Reflect.construct(r, [], y);
1745
+ Reflect.construct(r, [], C);
1768
1746
  } else {
1769
1747
  try {
1770
- y.call();
1771
- } catch (H) {
1772
- h = H;
1748
+ C.call();
1749
+ } catch (Y) {
1750
+ g = Y;
1773
1751
  }
1774
- r.call(y.prototype);
1752
+ r.call(C.prototype);
1775
1753
  }
1776
1754
  } else {
1777
1755
  try {
1778
1756
  throw Error();
1779
- } catch (H) {
1780
- h = H;
1757
+ } catch (Y) {
1758
+ g = Y;
1781
1759
  }
1782
1760
  r();
1783
1761
  }
1784
- } catch (H) {
1785
- if (H && h && typeof H.stack == "string") {
1786
- for (var E = H.stack.split(`
1787
- `), $ = h.stack.split(`
1788
- `), k = E.length - 1, j = $.length - 1; k >= 1 && j >= 0 && E[k] !== $[j]; )
1762
+ } catch (Y) {
1763
+ if (Y && g && typeof Y.stack == "string") {
1764
+ for (var p = Y.stack.split(`
1765
+ `), $ = g.stack.split(`
1766
+ `), P = p.length - 1, j = $.length - 1; P >= 1 && j >= 0 && p[P] !== $[j]; )
1789
1767
  j--;
1790
- for (; k >= 1 && j >= 0; k--, j--)
1791
- if (E[k] !== $[j]) {
1792
- if (k !== 1 || j !== 1)
1768
+ for (; P >= 1 && j >= 0; P--, j--)
1769
+ if (p[P] !== $[j]) {
1770
+ if (P !== 1 || j !== 1)
1793
1771
  do
1794
- if (k--, j--, j < 0 || E[k] !== $[j]) {
1795
- var G = `
1796
- ` + E[k].replace(" at new ", " at ");
1797
- return typeof r == "function" && de.set(r, G), G;
1772
+ if (P--, j--, j < 0 || p[P] !== $[j]) {
1773
+ var K = `
1774
+ ` + p[P].replace(" at new ", " at ");
1775
+ return typeof r == "function" && de.set(r, K), K;
1798
1776
  }
1799
- while (k >= 1 && j >= 0);
1777
+ while (P >= 1 && j >= 0);
1800
1778
  break;
1801
1779
  }
1802
1780
  }
1803
1781
  } finally {
1804
- we = !1, Ce.current = R, _t(), Error.prepareStackTrace = O;
1782
+ we = !1, ye.current = R, _t(), Error.prepareStackTrace = O;
1805
1783
  }
1806
1784
  var ne = r ? r.displayName || r.name : "", Qe = ne ? fe(ne) : "";
1807
1785
  return typeof r == "function" && de.set(r, Qe), Qe;
@@ -1821,24 +1799,24 @@ function Cr() {
1821
1799
  if (typeof r == "string")
1822
1800
  return fe(r);
1823
1801
  switch (r) {
1824
- case v:
1802
+ case _:
1825
1803
  return fe("Suspense");
1826
- case p:
1804
+ case E:
1827
1805
  return fe("SuspenseList");
1828
1806
  }
1829
1807
  if (typeof r == "object")
1830
1808
  switch (r.$$typeof) {
1831
- case g:
1809
+ case h:
1832
1810
  return We(r.render);
1833
1811
  case w:
1834
1812
  return he(r.type, c, l);
1835
- case N:
1813
+ case A:
1836
1814
  return We(r._render);
1837
1815
  case m: {
1838
- var h = r, O = h._payload, R = h._init;
1816
+ var g = r, O = g._payload, R = g._init;
1839
1817
  try {
1840
1818
  return he(R(O), c, l);
1841
- } catch (y) {
1819
+ } catch (C) {
1842
1820
  }
1843
1821
  }
1844
1822
  }
@@ -1852,22 +1830,22 @@ function Cr() {
1852
1830
  } else
1853
1831
  qe.setExtraStackFrame(null);
1854
1832
  }
1855
- function vt(r, c, l, h, O) {
1833
+ function vt(r, c, l, g, O) {
1856
1834
  {
1857
1835
  var R = Function.call.bind(Object.prototype.hasOwnProperty);
1858
- for (var y in r)
1859
- if (R(r, y)) {
1860
- var E = void 0;
1836
+ for (var C in r)
1837
+ if (R(r, C)) {
1838
+ var p = void 0;
1861
1839
  try {
1862
- if (typeof r[y] != "function") {
1863
- var $ = Error((h || "React class") + ": " + l + " type `" + y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1840
+ if (typeof r[C] != "function") {
1841
+ var $ = Error((g || "React class") + ": " + l + " type `" + C + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[C] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1864
1842
  throw $.name = "Invariant Violation", $;
1865
1843
  }
1866
- E = r[y](c, y, h, l, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1867
- } catch (k) {
1868
- E = k;
1844
+ p = r[C](c, C, g, l, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1845
+ } catch (P) {
1846
+ p = P;
1869
1847
  }
1870
- E && !(E instanceof Error) && (_e(O), C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", h || "React class", l, y, typeof E), _e(null)), E instanceof Error && !(E.message in Fe) && (Fe[E.message] = !0, _e(O), C("Failed %s type: %s", l, E.message), _e(null));
1848
+ p && !(p instanceof Error) && (_e(O), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", g || "React class", l, C, typeof p), _e(null)), p instanceof Error && !(p.message in Fe) && (Fe[p.message] = !0, _e(O), y("Failed %s type: %s", l, p.message), _e(null));
1871
1849
  }
1872
1850
  }
1873
1851
  }
@@ -1894,16 +1872,16 @@ function Cr() {
1894
1872
  }
1895
1873
  return r.key !== void 0;
1896
1874
  }
1897
- function Ct(r, c) {
1875
+ function yt(r, c) {
1898
1876
  if (typeof r.ref == "string" && se.current && c && se.current.stateNode !== c) {
1899
1877
  var l = F(se.current.type);
1900
- Oe[l] || (C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', F(se.current.type), r.ref), Oe[l] = !0);
1878
+ Oe[l] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', F(se.current.type), r.ref), Oe[l] = !0);
1901
1879
  }
1902
1880
  }
1903
- function yt(r, c) {
1881
+ function Ct(r, c) {
1904
1882
  {
1905
1883
  var l = function() {
1906
- Ke || (Ke = !0, C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
1884
+ Ke || (Ke = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
1907
1885
  };
1908
1886
  l.isReactWarning = !0, Object.defineProperty(r, "key", {
1909
1887
  get: l,
@@ -1914,7 +1892,7 @@ function Cr() {
1914
1892
  function wt(r, c) {
1915
1893
  {
1916
1894
  var l = function() {
1917
- Ye || (Ye = !0, C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
1895
+ Ye || (Ye = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
1918
1896
  };
1919
1897
  l.isReactWarning = !0, Object.defineProperty(r, "ref", {
1920
1898
  get: l,
@@ -1922,51 +1900,51 @@ function Cr() {
1922
1900
  });
1923
1901
  }
1924
1902
  }
1925
- var St = function(r, c, l, h, O, R, y) {
1926
- var E = {
1903
+ var St = function(r, c, l, g, O, R, C) {
1904
+ var p = {
1927
1905
  // This tag allows us to uniquely identify this as a React Element
1928
1906
  $$typeof: n,
1929
1907
  // Built-in properties that belong on the element
1930
1908
  type: r,
1931
1909
  key: c,
1932
1910
  ref: l,
1933
- props: y,
1911
+ props: C,
1934
1912
  // Record the component responsible for creating this element.
1935
1913
  _owner: R
1936
1914
  };
1937
- return E._store = {}, Object.defineProperty(E._store, "validated", {
1915
+ return p._store = {}, Object.defineProperty(p._store, "validated", {
1938
1916
  configurable: !1,
1939
1917
  enumerable: !1,
1940
1918
  writable: !0,
1941
1919
  value: !1
1942
- }), Object.defineProperty(E, "_self", {
1920
+ }), Object.defineProperty(p, "_self", {
1943
1921
  configurable: !1,
1944
1922
  enumerable: !1,
1945
1923
  writable: !1,
1946
- value: h
1947
- }), Object.defineProperty(E, "_source", {
1924
+ value: g
1925
+ }), Object.defineProperty(p, "_source", {
1948
1926
  configurable: !1,
1949
1927
  enumerable: !1,
1950
1928
  writable: !1,
1951
1929
  value: O
1952
- }), Object.freeze && (Object.freeze(E.props), Object.freeze(E)), E;
1930
+ }), Object.freeze && (Object.freeze(p.props), Object.freeze(p)), p;
1953
1931
  };
1954
- function Ot(r, c, l, h, O) {
1932
+ function Ot(r, c, l, g, O) {
1955
1933
  {
1956
- var R, y = {}, E = null, $ = null;
1957
- l !== void 0 && (E = "" + l), bt(c) && (E = "" + c.key), Et(c) && ($ = c.ref, Ct(c, O));
1934
+ var R, C = {}, p = null, $ = null;
1935
+ l !== void 0 && (p = "" + l), bt(c) && (p = "" + c.key), Et(c) && ($ = c.ref, yt(c, O));
1958
1936
  for (R in c)
1959
- Se.call(c, R) && !pt.hasOwnProperty(R) && (y[R] = c[R]);
1937
+ Se.call(c, R) && !pt.hasOwnProperty(R) && (C[R] = c[R]);
1960
1938
  if (r && r.defaultProps) {
1961
- var k = r.defaultProps;
1962
- for (R in k)
1963
- y[R] === void 0 && (y[R] = k[R]);
1939
+ var P = r.defaultProps;
1940
+ for (R in P)
1941
+ C[R] === void 0 && (C[R] = P[R]);
1964
1942
  }
1965
- if (E || $) {
1943
+ if (p || $) {
1966
1944
  var j = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
1967
- E && yt(y, j), $ && wt(y, j);
1945
+ p && Ct(C, j), $ && wt(C, j);
1968
1946
  }
1969
- return St(r, E, $, O, h, se.current, y);
1947
+ return St(r, p, $, O, g, se.current, C);
1970
1948
  }
1971
1949
  }
1972
1950
  var Re = b.ReactCurrentOwner, Ge = b.ReactDebugCurrentFrame;
@@ -2027,8 +2005,8 @@ Check the top-level render call using <` + l + ">.");
2027
2005
  if (Je[l])
2028
2006
  return;
2029
2007
  Je[l] = !0;
2030
- var h = "";
2031
- r && r._owner && r._owner !== Re.current && (h = " It was passed a child from " + F(r._owner.type) + "."), re(r), C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', l, h), re(null);
2008
+ var g = "";
2009
+ r && r._owner && r._owner !== Re.current && (g = " It was passed a child from " + F(r._owner.type) + "."), re(r), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', l, g), re(null);
2032
2010
  }
2033
2011
  }
2034
2012
  function Xe(r, c) {
@@ -2037,16 +2015,16 @@ Check the top-level render call using <` + l + ">.");
2037
2015
  return;
2038
2016
  if (Array.isArray(r))
2039
2017
  for (var l = 0; l < r.length; l++) {
2040
- var h = r[l];
2041
- Te(h) && ze(h, c);
2018
+ var g = r[l];
2019
+ Te(g) && ze(g, c);
2042
2020
  }
2043
2021
  else if (Te(r))
2044
2022
  r._store && (r._store.validated = !0);
2045
2023
  else if (r) {
2046
- var O = L(r);
2024
+ var O = N(r);
2047
2025
  if (typeof O == "function" && O !== r.entries)
2048
- for (var R = O.call(r), y; !(y = R.next()).done; )
2049
- Te(y.value) && ze(y.value, c);
2026
+ for (var R = O.call(r), C; !(C = R.next()).done; )
2027
+ Te(C.value) && ze(C.value, c);
2050
2028
  }
2051
2029
  }
2052
2030
  }
@@ -2058,61 +2036,61 @@ Check the top-level render call using <` + l + ">.");
2058
2036
  var l;
2059
2037
  if (typeof c == "function")
2060
2038
  l = c.propTypes;
2061
- else if (typeof c == "object" && (c.$$typeof === g || // Note: Memo only checks outer props here.
2039
+ else if (typeof c == "object" && (c.$$typeof === h || // Note: Memo only checks outer props here.
2062
2040
  // Inner props are checked in the reconciler.
2063
2041
  c.$$typeof === w))
2064
2042
  l = c.propTypes;
2065
2043
  else
2066
2044
  return;
2067
2045
  if (l) {
2068
- var h = F(c);
2069
- vt(l, r.props, "prop", h, r);
2046
+ var g = F(c);
2047
+ vt(l, r.props, "prop", g, r);
2070
2048
  } else if (c.PropTypes !== void 0 && !Ie) {
2071
2049
  Ie = !0;
2072
2050
  var O = F(c);
2073
- C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", O || "Unknown");
2051
+ y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", O || "Unknown");
2074
2052
  }
2075
- typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
2053
+ typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
2076
2054
  }
2077
2055
  }
2078
2056
  function kt(r) {
2079
2057
  {
2080
2058
  for (var c = Object.keys(r.props), l = 0; l < c.length; l++) {
2081
- var h = c[l];
2082
- if (h !== "children" && h !== "key") {
2083
- re(r), C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", h), re(null);
2059
+ var g = c[l];
2060
+ if (g !== "children" && g !== "key") {
2061
+ re(r), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", g), re(null);
2084
2062
  break;
2085
2063
  }
2086
2064
  }
2087
- r.ref !== null && (re(r), C("Invalid attribute `ref` supplied to `React.Fragment`."), re(null));
2065
+ r.ref !== null && (re(r), y("Invalid attribute `ref` supplied to `React.Fragment`."), re(null));
2088
2066
  }
2089
2067
  }
2090
- function Ze(r, c, l, h, O, R) {
2068
+ function Ze(r, c, l, g, O, R) {
2091
2069
  {
2092
- var y = z(r);
2093
- if (!y) {
2094
- var E = "";
2095
- (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (E += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
2070
+ var C = z(r);
2071
+ if (!C) {
2072
+ var p = "";
2073
+ (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (p += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
2096
2074
  var $ = Rt(O);
2097
- $ ? E += $ : E += He();
2098
- var k;
2099
- r === null ? k = "null" : Array.isArray(r) ? k = "array" : r !== void 0 && r.$$typeof === n ? (k = "<" + (F(r.type) || "Unknown") + " />", E = " Did you accidentally export a JSX literal instead of a component?") : k = typeof r, C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", k, E);
2075
+ $ ? p += $ : p += He();
2076
+ var P;
2077
+ r === null ? P = "null" : Array.isArray(r) ? P = "array" : r !== void 0 && r.$$typeof === n ? (P = "<" + (F(r.type) || "Unknown") + " />", p = " Did you accidentally export a JSX literal instead of a component?") : P = typeof r, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", P, p);
2100
2078
  }
2101
2079
  var j = Ot(r, c, l, O, R);
2102
2080
  if (j == null)
2103
2081
  return j;
2104
- if (y) {
2105
- var G = c.children;
2106
- if (G !== void 0)
2107
- if (h)
2108
- if (Array.isArray(G)) {
2109
- for (var ne = 0; ne < G.length; ne++)
2110
- Xe(G[ne], r);
2111
- Object.freeze && Object.freeze(G);
2082
+ if (C) {
2083
+ var K = c.children;
2084
+ if (K !== void 0)
2085
+ if (g)
2086
+ if (Array.isArray(K)) {
2087
+ for (var ne = 0; ne < K.length; ne++)
2088
+ Xe(K[ne], r);
2089
+ Object.freeze && Object.freeze(K);
2112
2090
  } else
2113
- C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
2091
+ y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
2114
2092
  else
2115
- Xe(G, r);
2093
+ Xe(K, r);
2116
2094
  }
2117
2095
  return r === t.Fragment ? kt(j) : Tt(j), j;
2118
2096
  }
@@ -2129,21 +2107,21 @@ Check the top-level render call using <` + l + ">.");
2129
2107
  }(Ne)), Ne;
2130
2108
  }
2131
2109
  (function(t) {
2132
- process.env.NODE_ENV === "production" ? t.exports = br() : t.exports = Cr();
2110
+ process.env.NODE_ENV === "production" ? t.exports = br() : t.exports = yr();
2133
2111
  })(Er);
2134
- const yr = Ae.jsx;
2112
+ const Cr = Ae.jsx;
2135
2113
  function kr(t) {
2136
- const s = Ft(null), e = pr(t), n = e.jsBridge, i = (d) => /* @__PURE__ */ yr(s.Provider, { value: e, children: d.children }), a = () => {
2114
+ const s = Ft(null), e = pr(t), n = e.jsBridge, i = (d) => /* @__PURE__ */ Cr(s.Provider, { value: e, children: d.children }), a = () => {
2137
2115
  const d = V.useContext(s);
2138
2116
  if (!d)
2139
2117
  throw new Error("LiveProvider never found.");
2140
2118
  return d;
2141
- }, u = () => e, f = () => e.$RTC, _ = () => f(), g = () => async (d) => await e.connect(d);
2142
- function v(d, S, L = []) {
2143
- const b = a(), C = [b, name, ...L], D = () => b.keyframes.off(d, S);
2144
- return V.useEffect(() => (b.keyframes.on(d, S), D), C), D;
2119
+ }, u = () => e, f = () => e.$RTC, v = () => f(), h = () => async (d) => await e.connect(d);
2120
+ function _(d, S, N = []) {
2121
+ const b = a(), y = [b, name, ...N], D = () => b.keyframes.off(d, S);
2122
+ return V.useEffect(() => (b.keyframes.on(d, S), D), y), D;
2145
2123
  }
2146
- function p() {
2124
+ function E() {
2147
2125
  const d = a();
2148
2126
  return {
2149
2127
  connect: async (T) => await d.connect(T),
@@ -2160,25 +2138,25 @@ function kr(t) {
2160
2138
  };
2161
2139
  }
2162
2140
  function w(d) {
2163
- const S = a(), [L, b] = V.useState(S.getFramesByKey(d));
2141
+ const S = a(), [N, b] = V.useState(S.getFramesByKey(d));
2164
2142
  V.useEffect(() => {
2165
2143
  const D = (ue) => b(ue), U = d, z = D;
2166
2144
  return S.keyframes.on(U, z), () => S.keyframes.off(U, z);
2167
2145
  }, [S]);
2168
- const C = V.useCallback(
2146
+ const y = V.useCallback(
2169
2147
  (D) => S.sendKeyframe(d, D),
2170
2148
  [S]
2171
2149
  );
2172
- return [L, C];
2150
+ return [N, y];
2173
2151
  }
2174
- function m(d, S, L = []) {
2175
- const b = a(), C = () => b.off(d, S), D = [b, d, ...L];
2176
- return V.useEffect(() => (b.on(d, S), C), D), C;
2152
+ function m(d, S, N = []) {
2153
+ const b = a(), y = () => b.off(d, S), D = [b, d, ...N];
2154
+ return V.useEffect(() => (b.on(d, S), y), D), y;
2177
2155
  }
2178
- function N() {
2179
- const d = a(), [S, L] = V.useState(d.state);
2156
+ function A() {
2157
+ const d = a(), [S, N] = V.useState(d.state);
2180
2158
  return V.useEffect(() => {
2181
- const b = (C) => L(C);
2159
+ const b = (y) => N(y);
2182
2160
  return d.on("stateChange", b), () => d.off("stateChange", b);
2183
2161
  }, [d]), S;
2184
2162
  }
@@ -2195,32 +2173,32 @@ function kr(t) {
2195
2173
  detectMicro: () => d.$RTC.detectMicro()
2196
2174
  };
2197
2175
  }
2198
- function P(d, S, L = []) {
2199
- const b = a(), C = () => b.$RTC.off(d, S), D = [b, d, ...L];
2200
- return V.useEffect(() => (b.$RTC.on(d, S), C), D), C;
2176
+ function k(d, S, N = []) {
2177
+ const b = a(), y = () => b.$RTC.off(d, S), D = [b, d, ...N];
2178
+ return V.useEffect(() => (b.$RTC.on(d, S), y), D), y;
2201
2179
  }
2202
- function Y() {
2203
- const d = a(), [S, L] = V.useState(
2180
+ function H() {
2181
+ const d = a(), [S, N] = V.useState(
2204
2182
  d.selfInfo || {}
2205
- ), b = (D) => L(D);
2183
+ ), b = (D) => N(D);
2206
2184
  V.useEffect(() => (d.on("selfInfoUpdate", b), () => d.off("selfInfoUpdate", b)), [d]);
2207
- const C = V.useCallback(
2185
+ const y = V.useCallback(
2208
2186
  async (D) => await d.setSelfInfo(D),
2209
2187
  [d]
2210
2188
  );
2211
- return [S, C];
2189
+ return [S, y];
2212
2190
  }
2213
- function K() {
2214
- const d = a(), [S, L] = V.useState(
2191
+ function J() {
2192
+ const d = a(), [S, N] = V.useState(
2215
2193
  d.snapshot
2216
2194
  );
2217
2195
  return V.useEffect(() => {
2218
- const b = (C) => L(C);
2196
+ const b = (y) => N(y);
2219
2197
  return d.on("keyframes", b), () => d.off("keyframes", b);
2220
2198
  }), S;
2221
2199
  }
2222
2200
  function I() {
2223
- const d = a(), [S, L] = V.useState(d.userList), b = (C) => L(C);
2201
+ const d = a(), [S, N] = V.useState(d.userList), b = (y) => N(y);
2224
2202
  return V.useEffect(() => (d.on("userListUpdate", b), () => d.off("userListUpdate", b)), [d]), S;
2225
2203
  }
2226
2204
  return {
@@ -2228,17 +2206,17 @@ function kr(t) {
2228
2206
  jsBridge: n,
2229
2207
  LiveProvider: i,
2230
2208
  unsafe__useLiveInstance: u,
2231
- unsafe__useRTCInstance: _,
2232
- useConnect: g,
2209
+ unsafe__useRTCInstance: v,
2210
+ useConnect: h,
2233
2211
  useKeyframe: w,
2234
- useKeyframeUpdateCallback: v,
2235
- useLiveAction: p,
2212
+ useKeyframeUpdateCallback: _,
2213
+ useLiveAction: E,
2236
2214
  useLiveEventCallback: m,
2237
- useLiveState: N,
2215
+ useLiveState: A,
2238
2216
  useRTCAction: M,
2239
- useRTCEventCallback: P,
2240
- useSelfInfo: Y,
2241
- useKeyframesSnapshot: K,
2217
+ useRTCEventCallback: k,
2218
+ useSelfInfo: H,
2219
+ useKeyframesSnapshot: J,
2242
2220
  useUserList: I
2243
2221
  };
2244
2222
  }
@@ -2246,7 +2224,7 @@ export {
2246
2224
  tt as BrowserRTC,
2247
2225
  rt as BrowserRTC4Chime,
2248
2226
  ut as BuiltInRTCType,
2249
- J as BuiltinActionType,
2227
+ G as BuiltinActionType,
2250
2228
  q as BuiltinEventType,
2251
2229
  W as Command,
2252
2230
  De as CoreRTC,