@realsee/live 0.6.0-alpha.6 → 0.6.2
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.cjs.js +9 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +355 -381
- package/dist/index.es.js.map +1 -1
- package/docs/classes/BrowserRTC4Chime.html +8 -8
- package/package.json +9 -8
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,
|
|
84
|
-
|
|
83
|
+
const [f, _ = !1] = u, g = f(...e);
|
|
84
|
+
_ && this.off(s, f), g === !1 && (n = !0);
|
|
85
85
|
}
|
|
86
86
|
return n;
|
|
87
87
|
}
|
|
@@ -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
|
|
177
|
-
this._autoPlayConfirm({ onConfirm:
|
|
176
|
+
const g = () => n.resume();
|
|
177
|
+
this._autoPlayConfirm({ onConfirm: g });
|
|
178
178
|
}
|
|
179
179
|
})) : n.play(a);
|
|
180
180
|
});
|
|
@@ -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: _ }) => ({
|
|
220
220
|
userId: f,
|
|
221
|
-
audioVolume:
|
|
221
|
+
audioVolume: _
|
|
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
|
-
`
|
|
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, _;
|
|
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
|
|
300
|
-
const
|
|
301
|
-
return
|
|
302
|
-
|
|
293
|
+
const g = /* @__PURE__ */ new Map(), v = () => {
|
|
294
|
+
const p = [];
|
|
295
|
+
return g.forEach((w, m) => {
|
|
296
|
+
p.push({
|
|
303
297
|
userId: w.userId,
|
|
304
298
|
volume: w.muted || w.signalStrength === 0 || !Boolean(w.volume) ? 0 : w.volume
|
|
305
299
|
});
|
|
306
|
-
}),
|
|
300
|
+
}), p;
|
|
307
301
|
};
|
|
308
302
|
(u = this.meetingSession) == null || u.audioVideo.realtimeSubscribeToAttendeeIdPresence(
|
|
309
|
-
(
|
|
310
|
-
var
|
|
303
|
+
(p, w, m) => {
|
|
304
|
+
var N;
|
|
311
305
|
if (!w) {
|
|
312
|
-
|
|
306
|
+
g.delete(p), this.emit("userVolumes", v());
|
|
313
307
|
return;
|
|
314
308
|
}
|
|
315
|
-
(
|
|
316
|
-
|
|
317
|
-
(M,
|
|
318
|
-
new et(M).base() === M && (
|
|
309
|
+
(N = this.meetingSession) == null || N.audioVideo.realtimeSubscribeToVolumeIndicator(
|
|
310
|
+
p,
|
|
311
|
+
(M, P, Y, K) => {
|
|
312
|
+
new et(M).base() === M && (g.set(M, {
|
|
319
313
|
userId: m || M,
|
|
320
|
-
volume:
|
|
321
|
-
muted:
|
|
322
|
-
signalStrength:
|
|
323
|
-
}), this.emit("userVolumes",
|
|
314
|
+
volume: P,
|
|
315
|
+
muted: Y,
|
|
316
|
+
signalStrength: K
|
|
317
|
+
}), this.emit("userVolumes", v()));
|
|
324
318
|
}
|
|
325
319
|
);
|
|
326
320
|
}
|
|
327
321
|
), (f = this.meetingSession) == null || f.audioVideo.realtimeSubscribeToVolumeIndicator(
|
|
328
322
|
e,
|
|
329
|
-
(
|
|
330
|
-
new et(
|
|
323
|
+
(p, w, m, N) => {
|
|
324
|
+
new et(p).base() === p && N !== null && N !== 1 && this.emit("weakNetwork");
|
|
331
325
|
}
|
|
332
|
-
), (
|
|
333
|
-
(E) => this.emit("error", E)
|
|
334
|
-
);
|
|
326
|
+
), (_ = this.meetingSession) == null || _.audioVideo.realtimeSubscribeToFatalError((p) => this.emit("error", p));
|
|
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,58 +335,45 @@ class rt extends De {
|
|
|
346
335
|
*/
|
|
347
336
|
async join(e) {
|
|
348
337
|
return new Promise(async (n, i) => {
|
|
349
|
-
var a;
|
|
338
|
+
var a, u;
|
|
350
339
|
this.emit("joinWillStart");
|
|
351
340
|
try {
|
|
352
|
-
const { sdkAppId:
|
|
341
|
+
const { sdkAppId: f, userId: _, roomId: g, userSig: v } = await this._getVoiceSign({
|
|
353
342
|
...e,
|
|
354
343
|
roomId: e.roomId || 0
|
|
355
344
|
});
|
|
356
|
-
this.userId =
|
|
357
|
-
const {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
} = JSON.parse(
|
|
361
|
-
decodeURIComponent(h)
|
|
362
|
-
), w = new Ut(
|
|
345
|
+
this.userId = _;
|
|
346
|
+
const { attendence: p, vendor_wrapper: w } = JSON.parse(
|
|
347
|
+
decodeURIComponent(v)
|
|
348
|
+
), m = new Ut(
|
|
363
349
|
{
|
|
364
|
-
Meeting:
|
|
350
|
+
Meeting: w
|
|
365
351
|
},
|
|
366
352
|
{
|
|
367
353
|
Attendee: {
|
|
368
|
-
ExternalUserId:
|
|
369
|
-
AttendeeId:
|
|
370
|
-
JoinToken:
|
|
354
|
+
ExternalUserId: p.external_user_id,
|
|
355
|
+
AttendeeId: p.attendee_id,
|
|
356
|
+
JoinToken: p.join_token
|
|
371
357
|
}
|
|
372
358
|
}
|
|
373
359
|
);
|
|
374
|
-
this.meetingSession = new Bt(
|
|
375
|
-
|
|
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 m = {
|
|
360
|
+
this.meetingSession = new Bt(m, 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 N = {
|
|
382
362
|
audioVideoDidStart: () => {
|
|
383
|
-
var
|
|
384
|
-
(
|
|
363
|
+
var I;
|
|
364
|
+
(I = this.meetingSession) == null || I.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(
|
|
391
|
-
|
|
392
|
-
($) => $.deviceId === "default"
|
|
393
|
-
), j = P.find(
|
|
394
|
-
($) => $.deviceId !== ""
|
|
370
|
+
this.meetingSession.audioVideo.addObserver(N), this.meetingSession.audioVideo.setDeviceLabelTrigger(
|
|
371
|
+
async () => await navigator.mediaDevices.getUserMedia({ audio: !0, video: !1 })
|
|
395
372
|
);
|
|
396
|
-
this.
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
this.emit("error", u), this.logger.error(u.message), n(!1);
|
|
373
|
+
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";
|
|
374
|
+
await this.meetingSession.audioVideo.startAudioInput(P), await this.meetingSession.audioVideo.chooseAudioOutput(K), this.meetingSession.audioVideo.start();
|
|
375
|
+
} catch (f) {
|
|
376
|
+
this.emit("error", f), this.logger.error(f.message), n(!1);
|
|
401
377
|
}
|
|
402
378
|
});
|
|
403
379
|
}
|
|
@@ -407,11 +383,9 @@ class rt extends De {
|
|
|
407
383
|
this.joined = !1;
|
|
408
384
|
const i = {
|
|
409
385
|
audioVideoDidStop: async (f) => {
|
|
410
|
-
var
|
|
411
|
-
const
|
|
412
|
-
(
|
|
413
|
-
`Stopped with a session status code: ${v}`
|
|
414
|
-
), e(!0));
|
|
386
|
+
var g;
|
|
387
|
+
const _ = f.statusCode();
|
|
388
|
+
(g = this.meetingSession) == null || g.deviceController.destroy(), _ === Wt.Left ? (this.logger.info("You left the session"), e(!0)) : (this.logger.info(`Stopped with a session status code: ${_}`), e(!0));
|
|
415
389
|
}
|
|
416
390
|
};
|
|
417
391
|
(a = this.meetingSession) == null || a.audioVideo.addObserver(i), (u = this.meetingSession) == null || u.audioVideo.stop();
|
|
@@ -500,7 +474,7 @@ class nt extends De {
|
|
|
500
474
|
this.jsBridge.shock(1);
|
|
501
475
|
}
|
|
502
476
|
}
|
|
503
|
-
var
|
|
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 || {}), 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 || {});
|
|
504
478
|
function Tr(t) {
|
|
505
479
|
try {
|
|
506
480
|
const s = JSON.parse(t), e = {
|
|
@@ -521,7 +495,7 @@ function Tr(t) {
|
|
|
521
495
|
return !1;
|
|
522
496
|
}
|
|
523
497
|
}
|
|
524
|
-
var
|
|
498
|
+
var x = /* @__PURE__ */ ((t) => (t[t.NOTINITIALIZED = -1] = "NOTINITIALIZED", t[t.CONNECTING = 0] = "CONNECTING", t[t.OPEN = 1] = "OPEN", t[t.CLOSED = 3] = "CLOSED", t))(x || {}), Xt = /* @__PURE__ */ ((t) => (t[t.Normal = 0] = "Normal", t[t.Removed = 1] = "Removed", t[t.Replaced = 2] = "Replaced", t))(Xt || {}), Zt = /* @__PURE__ */ ((t) => (t.WAIT_ENTER = "WAIT_ENTER", t.ONLINE = "ONLINE", t.LEAVE = "LEAVE", t.KICK_OUT = "KICK_OUT", t.BE_REPLACE = "BE_REPLACE", t.EXCEPTION = "EXCEPTION", t))(Zt || {}), Le = /* @__PURE__ */ ((t) => (t[t.NOTINITIALIZED = -1] = "NOTINITIALIZED", t[t.CONNECTING = 0] = "CONNECTING", t[t.OPEN = 1] = "OPEN", t[t.CLOSING = 2] = "CLOSING", t[t.CLOSED = 3] = "CLOSED", t))(Le || {}), Qt = /* @__PURE__ */ ((t) => (t.Error = "Error", t.Close = "Close", t.MicroAuth = "MicroAuth", t.DuplicateConnect = "DuplicateConnect", t.IllegalURL = "IllegalURL", t.Unknown = "Unknown", t.IllegalArgs = "IllegalArgs", t))(Qt || {}), er = /* @__PURE__ */ ((t) => (t.Err_1000 = "CLOSE_NORMAL", t.Err_1001 = "CLOSE_GOING_AWAY", t.Err_1002 = "CLOSE_PROTOCOL_ERROR", t.Err_1003 = "CLOSE_UNSUPPORTED", t.Err_1006 = "CLOSE_ABNORMAL", t.Err_1007 = "Unsupported Data", t.Err_1008 = "Policy Violation", t.Err_1009 = "CLOSE_TOO_LARGE", t.Err_unknown = "unknown", t))(er || {});
|
|
525
499
|
function tr(t) {
|
|
526
500
|
switch (t) {
|
|
527
501
|
case 1e3:
|
|
@@ -864,7 +838,7 @@ class _r extends ae {
|
|
|
864
838
|
/**
|
|
865
839
|
* 带看连接状态
|
|
866
840
|
*/
|
|
867
|
-
o(this, "_state",
|
|
841
|
+
o(this, "_state", x.NOTINITIALIZED);
|
|
868
842
|
/**
|
|
869
843
|
* 添加事件监听
|
|
870
844
|
*/
|
|
@@ -884,28 +858,28 @@ class _r extends ae {
|
|
|
884
858
|
o(this, "_handleCloseEvent", (e) => {
|
|
885
859
|
A.info(
|
|
886
860
|
`live room closed bacause of ${e.code}-${e.reason || tr(e.code)}`
|
|
887
|
-
), this.state =
|
|
861
|
+
), this.state = x.CLOSED;
|
|
888
862
|
});
|
|
889
863
|
/**
|
|
890
864
|
* 处理房间正在关闭事件(这个时候可能是断网了)
|
|
891
865
|
*/
|
|
892
866
|
o(this, "_handleClosingEvent", () => {
|
|
893
867
|
var e;
|
|
894
|
-
A.info("live room is closing, onLine:", (e = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : e.onLine), this.state =
|
|
868
|
+
A.info("live room is closing, onLine:", (e = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : e.onLine), this.state = x.CLOSED;
|
|
895
869
|
});
|
|
896
870
|
/**
|
|
897
871
|
* 连接中
|
|
898
872
|
* @param event
|
|
899
873
|
*/
|
|
900
874
|
o(this, "_handleConnectingEvent", () => {
|
|
901
|
-
A.info("live room is connecting"), this.state =
|
|
875
|
+
A.info("live room is connecting"), this.state = x.CONNECTING;
|
|
902
876
|
});
|
|
903
877
|
/**
|
|
904
878
|
* 连接发送异常
|
|
905
879
|
* @param event
|
|
906
880
|
*/
|
|
907
881
|
o(this, "_handleErrorEvent", (e) => {
|
|
908
|
-
A.error("live room error", e), this.state =
|
|
882
|
+
A.error("live room error", e), this.state = x.CLOSED;
|
|
909
883
|
});
|
|
910
884
|
/**
|
|
911
885
|
* 接收到消息
|
|
@@ -926,14 +900,14 @@ class _r extends ae {
|
|
|
926
900
|
* @param event
|
|
927
901
|
*/
|
|
928
902
|
o(this, "_handleOpenEvent", (e) => {
|
|
929
|
-
A.info("live room open", e.detail), this.state =
|
|
903
|
+
A.info("live room open", e.detail), this.state = x.OPEN, e.detail.reconnects > 0 && this.emit("reconnected", e.detail);
|
|
930
904
|
});
|
|
931
905
|
/**
|
|
932
906
|
* 处理超时
|
|
933
907
|
* @param event
|
|
934
908
|
*/
|
|
935
909
|
o(this, "_handleTimeoutEvent", (e) => {
|
|
936
|
-
A.error("live room connect timeout!", e.detail), this.state =
|
|
910
|
+
A.error("live room connect timeout!", e.detail), this.state = x.CLOSED;
|
|
937
911
|
});
|
|
938
912
|
/**
|
|
939
913
|
* 释放资源,释放之后需要重新实例化
|
|
@@ -970,7 +944,7 @@ class _r extends ae {
|
|
|
970
944
|
sendMessage(e = "") {
|
|
971
945
|
if (e == null || e === "")
|
|
972
946
|
throw new Error("live message is empty!");
|
|
973
|
-
if (this.state ===
|
|
947
|
+
if (this.state === x.OPEN)
|
|
974
948
|
return this._ws.send(JSON.stringify(e));
|
|
975
949
|
throw new Error("live has not yet been initialized!");
|
|
976
950
|
}
|
|
@@ -1017,13 +991,13 @@ class vr extends ae {
|
|
|
1017
991
|
* @returns
|
|
1018
992
|
*/
|
|
1019
993
|
o(this, "sendKeyframe", (e, n) => {
|
|
1020
|
-
if (this.state !==
|
|
994
|
+
if (this.state !== x.OPEN)
|
|
1021
995
|
return !1;
|
|
1022
996
|
this._buildInData.keyframes = {
|
|
1023
997
|
...this._buildInData.keyframes,
|
|
1024
998
|
[e]: n
|
|
1025
999
|
};
|
|
1026
|
-
const i = Pe(
|
|
1000
|
+
const i = Pe(W.KeyframeSync, this.snapshot);
|
|
1027
1001
|
try {
|
|
1028
1002
|
return this._controller.sendMessage(i), !0;
|
|
1029
1003
|
} catch (a) {
|
|
@@ -1059,93 +1033,93 @@ class vr extends ae {
|
|
|
1059
1033
|
o(this, "_handleMessage", async (e) => {
|
|
1060
1034
|
var n, i, a, u, f;
|
|
1061
1035
|
if (typeof e == "object") {
|
|
1062
|
-
const { command:
|
|
1063
|
-
if (
|
|
1064
|
-
switch (
|
|
1065
|
-
case
|
|
1066
|
-
const m =
|
|
1036
|
+
const { command: _, data: g = {}, frontRequestId: v, code: p, message: w } = e;
|
|
1037
|
+
if (p === "SUCCESS")
|
|
1038
|
+
switch (_) {
|
|
1039
|
+
case W.SelfUserInfo: {
|
|
1040
|
+
const m = g;
|
|
1067
1041
|
st(this.selfInfo, m, { deep: !0 }) || (this._buildInData.selfInfo = m, this.emit(
|
|
1068
1042
|
"selfInfoUpdate",
|
|
1069
1043
|
this._buildInData.selfInfo,
|
|
1070
|
-
|
|
1044
|
+
v
|
|
1071
1045
|
));
|
|
1072
1046
|
break;
|
|
1073
1047
|
}
|
|
1074
|
-
case
|
|
1075
|
-
const m =
|
|
1048
|
+
case W.RoomInfo: {
|
|
1049
|
+
const m = g;
|
|
1076
1050
|
this._buildInData.roomInfo = Object.assign({}, m), this.emit(
|
|
1077
1051
|
"readyKeyframeSync",
|
|
1078
1052
|
m.last_frame || {}
|
|
1079
1053
|
);
|
|
1080
1054
|
break;
|
|
1081
1055
|
}
|
|
1082
|
-
case
|
|
1083
|
-
const { voice_id: m, type:
|
|
1084
|
-
if (this._buildInData.rtcInfo = { voiceId: m, type:
|
|
1056
|
+
case W.RTCInfo: {
|
|
1057
|
+
const { voice_id: m, type: N } = g;
|
|
1058
|
+
if (this._buildInData.rtcInfo = { voiceId: m, type: N }, (n = this.$RTC) != null && n.joined)
|
|
1085
1059
|
A.warn("已加入语音房间,无需重复加入!");
|
|
1086
1060
|
else if (await ((u = this.$RTC) == null ? void 0 : u.join({
|
|
1087
1061
|
voiceId: m,
|
|
1088
1062
|
userId: ((i = this.selfInfo) == null ? void 0 : i.id) || "",
|
|
1089
1063
|
roomId: (a = this.roomInfo) == null ? void 0 : a.info.room_code,
|
|
1090
|
-
type:
|
|
1064
|
+
type: N
|
|
1091
1065
|
}))) {
|
|
1092
|
-
const
|
|
1093
|
-
await this.toggleMicro(
|
|
1066
|
+
const P = (f = this._options.initialMicroStatus) != null ? f : Z.OPEN;
|
|
1067
|
+
await this.toggleMicro(P === Z.OPEN);
|
|
1094
1068
|
} else
|
|
1095
1069
|
A.error("加入语音房间失败");
|
|
1096
1070
|
break;
|
|
1097
1071
|
}
|
|
1098
|
-
case
|
|
1099
|
-
const m =
|
|
1100
|
-
this._buildInData.userList = m, this.emit("userListUpdate", this.userList,
|
|
1072
|
+
case W.UserList: {
|
|
1073
|
+
const m = g;
|
|
1074
|
+
this._buildInData.userList = m, this.emit("userListUpdate", this.userList, v);
|
|
1101
1075
|
break;
|
|
1102
1076
|
}
|
|
1103
|
-
case
|
|
1104
|
-
const m =
|
|
1105
|
-
this.emit("broadcast", m,
|
|
1077
|
+
case W.CustomEvent: {
|
|
1078
|
+
const m = g;
|
|
1079
|
+
this.emit("broadcast", m, v);
|
|
1106
1080
|
break;
|
|
1107
1081
|
}
|
|
1108
|
-
case
|
|
1109
|
-
const m =
|
|
1082
|
+
case W.KeyframeSync: {
|
|
1083
|
+
const m = g, N = Object.keys(
|
|
1110
1084
|
m
|
|
1111
1085
|
).reduce(
|
|
1112
|
-
(M,
|
|
1086
|
+
(M, P) => {
|
|
1113
1087
|
if (st(
|
|
1114
|
-
m[
|
|
1115
|
-
this._buildInData.keyframes[
|
|
1088
|
+
m[P],
|
|
1089
|
+
this._buildInData.keyframes[P],
|
|
1116
1090
|
{
|
|
1117
1091
|
deep: !0
|
|
1118
1092
|
}
|
|
1119
1093
|
))
|
|
1120
1094
|
return M;
|
|
1121
|
-
const
|
|
1122
|
-
m[
|
|
1123
|
-
this._buildInData.keyframes[
|
|
1124
|
-
|
|
1125
|
-
],
|
|
1095
|
+
const Y = [
|
|
1096
|
+
m[P],
|
|
1097
|
+
this._buildInData.keyframes[P],
|
|
1098
|
+
v
|
|
1099
|
+
], K = P;
|
|
1126
1100
|
return this.keyframes.emit(
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
), this._buildInData.keyframes[
|
|
1101
|
+
K,
|
|
1102
|
+
...Y
|
|
1103
|
+
), this._buildInData.keyframes[P] = m[P], M[P] = m[P], M;
|
|
1130
1104
|
},
|
|
1131
1105
|
{}
|
|
1132
1106
|
);
|
|
1133
|
-
this.emit("keyframes",
|
|
1107
|
+
this.emit("keyframes", N, v);
|
|
1134
1108
|
break;
|
|
1135
1109
|
}
|
|
1136
|
-
case
|
|
1137
|
-
const m =
|
|
1138
|
-
this.emit("builtinEvent", m), m.event_type ===
|
|
1110
|
+
case W.BuiltinMsg: {
|
|
1111
|
+
const m = g;
|
|
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 === J.UserMicroStatus && await this.toggleMicro(
|
|
1139
1113
|
m.data.status === Z.OPEN
|
|
1140
|
-
), m.event_type ===
|
|
1114
|
+
), m.event_type === q.RoomChange && m.action === J.RoomClose && await this.exit();
|
|
1141
1115
|
break;
|
|
1142
1116
|
}
|
|
1143
|
-
case
|
|
1117
|
+
case W.UserKickOut: {
|
|
1144
1118
|
this.emit("kickOut");
|
|
1145
1119
|
break;
|
|
1146
1120
|
}
|
|
1147
1121
|
default:
|
|
1148
|
-
console.warn("unknown command: ",
|
|
1122
|
+
console.warn("unknown command: ", _);
|
|
1149
1123
|
}
|
|
1150
1124
|
else
|
|
1151
1125
|
this.emit("error", e);
|
|
@@ -1163,19 +1137,19 @@ class vr extends ae {
|
|
|
1163
1137
|
* @returns
|
|
1164
1138
|
*/
|
|
1165
1139
|
o(this, "connect", async (e = {}) => {
|
|
1166
|
-
var u, f,
|
|
1167
|
-
if (this._options.url = (f = (u = e.url) != null ? u : this._options.url) != null ? f : "", this._options.getTicket = (
|
|
1140
|
+
var u, f, _, g;
|
|
1141
|
+
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")
|
|
1168
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");
|
|
1169
1143
|
const { force: n = !1 } = e;
|
|
1170
1144
|
if (this._options.rtc && !await this._options.rtc.detectMicro())
|
|
1171
1145
|
return new Error("Failed to obtain microphone authorization");
|
|
1172
1146
|
const i = this.state;
|
|
1173
|
-
if (i ===
|
|
1147
|
+
if (i === x.CONNECTING || i === x.OPEN)
|
|
1174
1148
|
if (n)
|
|
1175
1149
|
try {
|
|
1176
1150
|
await this._controller.close("force close by connect");
|
|
1177
|
-
} catch (
|
|
1178
|
-
console.warn(
|
|
1151
|
+
} catch (v) {
|
|
1152
|
+
console.warn(v);
|
|
1179
1153
|
}
|
|
1180
1154
|
else
|
|
1181
1155
|
return new Error("已有Live实例正在连接中,请勿重复连接!");
|
|
@@ -1192,7 +1166,7 @@ class vr extends ae {
|
|
|
1192
1166
|
*/
|
|
1193
1167
|
o(this, "exit", async () => {
|
|
1194
1168
|
var e;
|
|
1195
|
-
if (this._clearLiveData(), this.state !==
|
|
1169
|
+
if (this._clearLiveData(), this.state !== x.OPEN)
|
|
1196
1170
|
return !0;
|
|
1197
1171
|
try {
|
|
1198
1172
|
await ((e = this.$RTC) == null ? void 0 : e.quit());
|
|
@@ -1211,8 +1185,8 @@ class vr extends ae {
|
|
|
1211
1185
|
var e, n;
|
|
1212
1186
|
if ((n = (e = this.selfInfo) == null ? void 0 : e.permission) != null && n.close_live_room)
|
|
1213
1187
|
return await this.updateStatus(
|
|
1214
|
-
|
|
1215
|
-
|
|
1188
|
+
q.RoomChange,
|
|
1189
|
+
J.RoomClose,
|
|
1216
1190
|
{}
|
|
1217
1191
|
);
|
|
1218
1192
|
});
|
|
@@ -1227,8 +1201,8 @@ class vr extends ae {
|
|
|
1227
1201
|
* @returns
|
|
1228
1202
|
*/
|
|
1229
1203
|
o(this, "setSelfInfo", async (e) => await this.updateStatus(
|
|
1230
|
-
|
|
1231
|
-
|
|
1204
|
+
q.UserChange,
|
|
1205
|
+
J.UserInfo,
|
|
1232
1206
|
e
|
|
1233
1207
|
));
|
|
1234
1208
|
// 仅用于用户自己的麦克风控制
|
|
@@ -1238,8 +1212,8 @@ class vr extends ae {
|
|
|
1238
1212
|
return !1;
|
|
1239
1213
|
const n = await ((u = this.$RTC) == null ? void 0 : u.toggleMicro(e));
|
|
1240
1214
|
return n && await this.updateStatus(
|
|
1241
|
-
|
|
1242
|
-
|
|
1215
|
+
q.UserChange,
|
|
1216
|
+
J.UserMicroStatus,
|
|
1243
1217
|
{
|
|
1244
1218
|
status: e ? Z.OPEN : Z.CLOSE
|
|
1245
1219
|
},
|
|
@@ -1255,8 +1229,8 @@ class vr extends ae {
|
|
|
1255
1229
|
o(this, "forbidMicro", async (e, n) => {
|
|
1256
1230
|
var i, a;
|
|
1257
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(
|
|
1258
|
-
|
|
1259
|
-
|
|
1232
|
+
q.UserChange,
|
|
1233
|
+
J.UserMicroStatus,
|
|
1260
1234
|
{
|
|
1261
1235
|
status: e
|
|
1262
1236
|
},
|
|
@@ -1272,8 +1246,8 @@ class vr extends ae {
|
|
|
1272
1246
|
o(this, "forbidSync", async (e, n) => {
|
|
1273
1247
|
var i, a;
|
|
1274
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(
|
|
1275
|
-
|
|
1276
|
-
|
|
1249
|
+
q.UserChange,
|
|
1250
|
+
J.UserPermission,
|
|
1277
1251
|
{ sync_frame: e },
|
|
1278
1252
|
n
|
|
1279
1253
|
);
|
|
@@ -1286,8 +1260,8 @@ class vr extends ae {
|
|
|
1286
1260
|
o(this, "kick", async (e) => {
|
|
1287
1261
|
var n, i;
|
|
1288
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(
|
|
1289
|
-
|
|
1290
|
-
|
|
1263
|
+
q.UserChange,
|
|
1264
|
+
J.UserStatus,
|
|
1291
1265
|
{
|
|
1292
1266
|
status: "KICK_OUT"
|
|
1293
1267
|
},
|
|
@@ -1323,7 +1297,7 @@ class vr extends ae {
|
|
|
1323
1297
|
case Q.RealseeBrowserChimeRTC:
|
|
1324
1298
|
return new rt({
|
|
1325
1299
|
getVoiceSign: this._options.getVoiceSign,
|
|
1326
|
-
logLevel: e.__debug__ ? it.DEBUG : it.
|
|
1300
|
+
logLevel: e.__debug__ ? it.DEBUG : it.INFO
|
|
1327
1301
|
});
|
|
1328
1302
|
case Q.RealseeBrowserRTC:
|
|
1329
1303
|
return this._options.autoPlayConfirm || A.error(
|
|
@@ -1425,16 +1399,16 @@ class vr extends ae {
|
|
|
1425
1399
|
* @returns
|
|
1426
1400
|
*/
|
|
1427
1401
|
async updateStatus(e, n, i, a) {
|
|
1428
|
-
if (this.state !==
|
|
1402
|
+
if (this.state !== x.OPEN)
|
|
1429
1403
|
return !1;
|
|
1430
1404
|
const u = Object.assign(
|
|
1431
1405
|
{ event_type: e, action: n },
|
|
1432
1406
|
{ data: i }
|
|
1433
|
-
), f = Pe(
|
|
1407
|
+
), f = Pe(W.BuiltinMsg, u, a);
|
|
1434
1408
|
try {
|
|
1435
1409
|
return this._controller.sendMessage(f), !0;
|
|
1436
|
-
} catch (
|
|
1437
|
-
return A.error(
|
|
1410
|
+
} catch (_) {
|
|
1411
|
+
return A.error(_), !1;
|
|
1438
1412
|
}
|
|
1439
1413
|
}
|
|
1440
1414
|
/**
|
|
@@ -1445,21 +1419,21 @@ class vr extends ae {
|
|
|
1445
1419
|
* @returns
|
|
1446
1420
|
*/
|
|
1447
1421
|
broadcast(e, n, i) {
|
|
1448
|
-
return this.state !==
|
|
1422
|
+
return this.state !== x.OPEN ? !1 : new Promise((a, u) => {
|
|
1449
1423
|
const f = Pe(
|
|
1450
|
-
|
|
1424
|
+
W.CustomEvent,
|
|
1451
1425
|
e,
|
|
1452
1426
|
n
|
|
1453
|
-
),
|
|
1454
|
-
u(new Error("RESPONSE TIMEOUT")), this.off("broadcast",
|
|
1455
|
-
}, i) : void 0,
|
|
1456
|
-
w ===
|
|
1427
|
+
), _ = f.front_request_id, g = i ? setTimeout(() => {
|
|
1428
|
+
u(new Error("RESPONSE TIMEOUT")), this.off("broadcast", v);
|
|
1429
|
+
}, i) : void 0, v = (p, w) => {
|
|
1430
|
+
w === _ && (g && clearTimeout(g), this.off("broadcast", v), a(p));
|
|
1457
1431
|
};
|
|
1458
|
-
this.on("broadcast",
|
|
1432
|
+
this.on("broadcast", v);
|
|
1459
1433
|
try {
|
|
1460
1434
|
this._controller.sendMessage(f);
|
|
1461
|
-
} catch (
|
|
1462
|
-
u(
|
|
1435
|
+
} catch (p) {
|
|
1436
|
+
u(p);
|
|
1463
1437
|
}
|
|
1464
1438
|
});
|
|
1465
1439
|
}
|
|
@@ -1498,31 +1472,31 @@ function dt() {
|
|
|
1498
1472
|
return !1;
|
|
1499
1473
|
for (var u = {}, f = 0; f < 10; f++)
|
|
1500
1474
|
u["_" + String.fromCharCode(f)] = f;
|
|
1501
|
-
var
|
|
1502
|
-
return u[
|
|
1475
|
+
var _ = Object.getOwnPropertyNames(u).map(function(v) {
|
|
1476
|
+
return u[v];
|
|
1503
1477
|
});
|
|
1504
|
-
if (
|
|
1478
|
+
if (_.join("") !== "0123456789")
|
|
1505
1479
|
return !1;
|
|
1506
|
-
var
|
|
1507
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
1508
|
-
|
|
1509
|
-
}), Object.keys(Object.assign({},
|
|
1510
|
-
} catch (
|
|
1480
|
+
var g = {};
|
|
1481
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(v) {
|
|
1482
|
+
g[v] = v;
|
|
1483
|
+
}), Object.keys(Object.assign({}, g)).join("") === "abcdefghijklmnopqrst";
|
|
1484
|
+
} catch (v) {
|
|
1511
1485
|
return !1;
|
|
1512
1486
|
}
|
|
1513
1487
|
}
|
|
1514
1488
|
return je = i() ? Object.assign : function(a, u) {
|
|
1515
|
-
for (var f,
|
|
1516
|
-
f = Object(arguments[
|
|
1517
|
-
for (var
|
|
1518
|
-
s.call(f,
|
|
1489
|
+
for (var f, _ = n(a), g, v = 1; v < arguments.length; v++) {
|
|
1490
|
+
f = Object(arguments[v]);
|
|
1491
|
+
for (var p in f)
|
|
1492
|
+
s.call(f, p) && (_[p] = f[p]);
|
|
1519
1493
|
if (t) {
|
|
1520
|
-
|
|
1521
|
-
for (var w = 0; w <
|
|
1522
|
-
e.call(f,
|
|
1494
|
+
g = t(f);
|
|
1495
|
+
for (var w = 0; w < g.length; w++)
|
|
1496
|
+
e.call(f, g[w]) && (_[g[w]] = f[g[w]]);
|
|
1523
1497
|
}
|
|
1524
1498
|
}
|
|
1525
|
-
return
|
|
1499
|
+
return _;
|
|
1526
1500
|
}, je;
|
|
1527
1501
|
}
|
|
1528
1502
|
/** @license React v17.0.2
|
|
@@ -1544,15 +1518,15 @@ function br() {
|
|
|
1544
1518
|
s = e("react.element"), ie.Fragment = e("react.fragment");
|
|
1545
1519
|
}
|
|
1546
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 };
|
|
1547
|
-
function u(f,
|
|
1548
|
-
var
|
|
1549
|
-
|
|
1550
|
-
for (
|
|
1551
|
-
i.call(
|
|
1521
|
+
function u(f, _, g) {
|
|
1522
|
+
var v, p = {}, w = null, m = null;
|
|
1523
|
+
g !== void 0 && (w = "" + g), _.key !== void 0 && (w = "" + _.key), _.ref !== void 0 && (m = _.ref);
|
|
1524
|
+
for (v in _)
|
|
1525
|
+
i.call(_, v) && !a.hasOwnProperty(v) && (p[v] = _[v]);
|
|
1552
1526
|
if (f && f.defaultProps)
|
|
1553
|
-
for (
|
|
1554
|
-
|
|
1555
|
-
return { $$typeof: s, type: f, key: w, ref: m, props:
|
|
1527
|
+
for (v in _ = f.defaultProps, _)
|
|
1528
|
+
p[v] === void 0 && (p[v] = _[v]);
|
|
1529
|
+
return { $$typeof: s, type: f, key: w, ref: m, props: p, _owner: n.current };
|
|
1556
1530
|
}
|
|
1557
1531
|
return ie.jsx = u, ie.jsxs = u, ie;
|
|
1558
1532
|
}
|
|
@@ -1566,15 +1540,15 @@ var Ne = {};
|
|
|
1566
1540
|
* LICENSE file in the root directory of this source tree.
|
|
1567
1541
|
*/
|
|
1568
1542
|
var ct;
|
|
1569
|
-
function
|
|
1543
|
+
function yr() {
|
|
1570
1544
|
return ct || (ct = 1, function(t) {
|
|
1571
1545
|
process.env.NODE_ENV !== "production" && function() {
|
|
1572
1546
|
var s = V, e = dt(), n = 60103, i = 60106;
|
|
1573
1547
|
t.Fragment = 60107;
|
|
1574
|
-
var a = 60108, u = 60114, f = 60109,
|
|
1548
|
+
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;
|
|
1575
1549
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
1576
1550
|
var I = Symbol.for;
|
|
1577
|
-
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"),
|
|
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"), _ = 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");
|
|
1578
1552
|
}
|
|
1579
1553
|
var d = typeof Symbol == "function" && Symbol.iterator, S = "@@iterator";
|
|
1580
1554
|
function L(r) {
|
|
@@ -1584,38 +1558,38 @@ function Cr() {
|
|
|
1584
1558
|
return typeof c == "function" ? c : null;
|
|
1585
1559
|
}
|
|
1586
1560
|
var b = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
1587
|
-
function
|
|
1561
|
+
function y(r) {
|
|
1588
1562
|
{
|
|
1589
|
-
for (var c = arguments.length, l = new Array(c > 1 ? c - 1 : 0),
|
|
1590
|
-
l[
|
|
1563
|
+
for (var c = arguments.length, l = new Array(c > 1 ? c - 1 : 0), h = 1; h < c; h++)
|
|
1564
|
+
l[h - 1] = arguments[h];
|
|
1591
1565
|
D("error", r, l);
|
|
1592
1566
|
}
|
|
1593
1567
|
}
|
|
1594
1568
|
function D(r, c, l) {
|
|
1595
1569
|
{
|
|
1596
|
-
var
|
|
1570
|
+
var h = b.ReactDebugCurrentFrame, O = h.getStackAddendum();
|
|
1597
1571
|
O !== "" && (c += "%s", l = l.concat([O]));
|
|
1598
|
-
var R = l.map(function(
|
|
1599
|
-
return "" +
|
|
1572
|
+
var R = l.map(function(C) {
|
|
1573
|
+
return "" + C;
|
|
1600
1574
|
});
|
|
1601
1575
|
R.unshift("Warning: " + c), Function.prototype.apply.call(console[r], console, R);
|
|
1602
1576
|
}
|
|
1603
1577
|
}
|
|
1604
|
-
var
|
|
1578
|
+
var U = !1;
|
|
1605
1579
|
function z(r) {
|
|
1606
|
-
return !!(typeof r == "string" || typeof r == "function" || r === t.Fragment || r === u || r ===
|
|
1580
|
+
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));
|
|
1607
1581
|
}
|
|
1608
1582
|
function ue(r, c, l) {
|
|
1609
|
-
var
|
|
1610
|
-
return r.displayName || (
|
|
1583
|
+
var h = c.displayName || c.name || "";
|
|
1584
|
+
return r.displayName || (h !== "" ? l + "(" + h + ")" : l);
|
|
1611
1585
|
}
|
|
1612
1586
|
function be(r) {
|
|
1613
1587
|
return r.displayName || "Context";
|
|
1614
1588
|
}
|
|
1615
|
-
function
|
|
1589
|
+
function F(r) {
|
|
1616
1590
|
if (r == null)
|
|
1617
1591
|
return null;
|
|
1618
|
-
if (typeof r.tag == "number" &&
|
|
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")
|
|
1619
1593
|
return r.displayName || r.name || null;
|
|
1620
1594
|
if (typeof r == "string")
|
|
1621
1595
|
return r;
|
|
@@ -1628,44 +1602,44 @@ function Cr() {
|
|
|
1628
1602
|
return "Profiler";
|
|
1629
1603
|
case a:
|
|
1630
1604
|
return "StrictMode";
|
|
1631
|
-
case
|
|
1605
|
+
case v:
|
|
1632
1606
|
return "Suspense";
|
|
1633
|
-
case
|
|
1607
|
+
case p:
|
|
1634
1608
|
return "SuspenseList";
|
|
1635
1609
|
}
|
|
1636
1610
|
if (typeof r == "object")
|
|
1637
1611
|
switch (r.$$typeof) {
|
|
1638
|
-
case
|
|
1612
|
+
case _:
|
|
1639
1613
|
var c = r;
|
|
1640
1614
|
return be(c) + ".Consumer";
|
|
1641
1615
|
case f:
|
|
1642
1616
|
var l = r;
|
|
1643
1617
|
return be(l._context) + ".Provider";
|
|
1644
|
-
case
|
|
1618
|
+
case g:
|
|
1645
1619
|
return ue(r, r.render, "ForwardRef");
|
|
1646
1620
|
case w:
|
|
1647
|
-
return
|
|
1648
|
-
case
|
|
1649
|
-
return
|
|
1621
|
+
return F(r.type);
|
|
1622
|
+
case N:
|
|
1623
|
+
return F(r._render);
|
|
1650
1624
|
case m: {
|
|
1651
|
-
var
|
|
1625
|
+
var h = r, O = h._payload, R = h._init;
|
|
1652
1626
|
try {
|
|
1653
|
-
return
|
|
1654
|
-
} catch (
|
|
1627
|
+
return F(R(O));
|
|
1628
|
+
} catch (C) {
|
|
1655
1629
|
return null;
|
|
1656
1630
|
}
|
|
1657
1631
|
}
|
|
1658
1632
|
}
|
|
1659
1633
|
return null;
|
|
1660
1634
|
}
|
|
1661
|
-
var ee = 0, T,
|
|
1635
|
+
var ee = 0, T, B, te, le, Me, $e, xe;
|
|
1662
1636
|
function Ue() {
|
|
1663
1637
|
}
|
|
1664
1638
|
Ue.__reactDisabledLog = !0;
|
|
1665
1639
|
function ht() {
|
|
1666
1640
|
{
|
|
1667
1641
|
if (ee === 0) {
|
|
1668
|
-
T = console.log,
|
|
1642
|
+
T = console.log, B = console.info, te = console.warn, le = console.error, Me = console.group, $e = console.groupCollapsed, xe = console.groupEnd;
|
|
1669
1643
|
var r = {
|
|
1670
1644
|
configurable: !0,
|
|
1671
1645
|
enumerable: !0,
|
|
@@ -1698,7 +1672,7 @@ function Cr() {
|
|
|
1698
1672
|
value: T
|
|
1699
1673
|
}),
|
|
1700
1674
|
info: e({}, r, {
|
|
1701
|
-
value:
|
|
1675
|
+
value: B
|
|
1702
1676
|
}),
|
|
1703
1677
|
warn: e({}, r, {
|
|
1704
1678
|
value: te
|
|
@@ -1717,21 +1691,21 @@ function Cr() {
|
|
|
1717
1691
|
})
|
|
1718
1692
|
});
|
|
1719
1693
|
}
|
|
1720
|
-
ee < 0 &&
|
|
1694
|
+
ee < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
1721
1695
|
}
|
|
1722
1696
|
}
|
|
1723
|
-
var
|
|
1697
|
+
var ye = b.ReactCurrentDispatcher, Ce;
|
|
1724
1698
|
function fe(r, c, l) {
|
|
1725
1699
|
{
|
|
1726
|
-
if (
|
|
1700
|
+
if (Ce === void 0)
|
|
1727
1701
|
try {
|
|
1728
1702
|
throw Error();
|
|
1729
1703
|
} catch (O) {
|
|
1730
|
-
var
|
|
1731
|
-
|
|
1704
|
+
var h = O.stack.trim().match(/\n( *(at )?)/);
|
|
1705
|
+
Ce = h && h[1] || "";
|
|
1732
1706
|
}
|
|
1733
1707
|
return `
|
|
1734
|
-
` +
|
|
1708
|
+
` + Ce + r;
|
|
1735
1709
|
}
|
|
1736
1710
|
}
|
|
1737
1711
|
var we = !1, de;
|
|
@@ -1747,65 +1721,65 @@ function Cr() {
|
|
|
1747
1721
|
if (l !== void 0)
|
|
1748
1722
|
return l;
|
|
1749
1723
|
}
|
|
1750
|
-
var
|
|
1724
|
+
var h;
|
|
1751
1725
|
we = !0;
|
|
1752
1726
|
var O = Error.prepareStackTrace;
|
|
1753
1727
|
Error.prepareStackTrace = void 0;
|
|
1754
1728
|
var R;
|
|
1755
|
-
R =
|
|
1729
|
+
R = ye.current, ye.current = null, ht();
|
|
1756
1730
|
try {
|
|
1757
1731
|
if (c) {
|
|
1758
|
-
var
|
|
1732
|
+
var C = function() {
|
|
1759
1733
|
throw Error();
|
|
1760
1734
|
};
|
|
1761
|
-
if (Object.defineProperty(
|
|
1735
|
+
if (Object.defineProperty(C.prototype, "props", {
|
|
1762
1736
|
set: function() {
|
|
1763
1737
|
throw Error();
|
|
1764
1738
|
}
|
|
1765
1739
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
1766
1740
|
try {
|
|
1767
|
-
Reflect.construct(
|
|
1768
|
-
} catch (
|
|
1769
|
-
|
|
1741
|
+
Reflect.construct(C, []);
|
|
1742
|
+
} catch (H) {
|
|
1743
|
+
h = H;
|
|
1770
1744
|
}
|
|
1771
|
-
Reflect.construct(r, [],
|
|
1745
|
+
Reflect.construct(r, [], C);
|
|
1772
1746
|
} else {
|
|
1773
1747
|
try {
|
|
1774
|
-
|
|
1775
|
-
} catch (
|
|
1776
|
-
|
|
1748
|
+
C.call();
|
|
1749
|
+
} catch (H) {
|
|
1750
|
+
h = H;
|
|
1777
1751
|
}
|
|
1778
|
-
r.call(
|
|
1752
|
+
r.call(C.prototype);
|
|
1779
1753
|
}
|
|
1780
1754
|
} else {
|
|
1781
1755
|
try {
|
|
1782
1756
|
throw Error();
|
|
1783
|
-
} catch (
|
|
1784
|
-
|
|
1757
|
+
} catch (H) {
|
|
1758
|
+
h = H;
|
|
1785
1759
|
}
|
|
1786
1760
|
r();
|
|
1787
1761
|
}
|
|
1788
|
-
} catch (
|
|
1789
|
-
if (
|
|
1790
|
-
for (var
|
|
1791
|
-
`),
|
|
1792
|
-
`), k =
|
|
1793
|
-
|
|
1794
|
-
for (; k >= 1 &&
|
|
1795
|
-
if (
|
|
1796
|
-
if (k !== 1 ||
|
|
1762
|
+
} catch (H) {
|
|
1763
|
+
if (H && h && typeof H.stack == "string") {
|
|
1764
|
+
for (var E = H.stack.split(`
|
|
1765
|
+
`), $ = h.stack.split(`
|
|
1766
|
+
`), k = E.length - 1, j = $.length - 1; k >= 1 && j >= 0 && E[k] !== $[j]; )
|
|
1767
|
+
j--;
|
|
1768
|
+
for (; k >= 1 && j >= 0; k--, j--)
|
|
1769
|
+
if (E[k] !== $[j]) {
|
|
1770
|
+
if (k !== 1 || j !== 1)
|
|
1797
1771
|
do
|
|
1798
|
-
if (k--,
|
|
1799
|
-
var
|
|
1800
|
-
` +
|
|
1801
|
-
return typeof r == "function" && de.set(r,
|
|
1772
|
+
if (k--, j--, j < 0 || E[k] !== $[j]) {
|
|
1773
|
+
var G = `
|
|
1774
|
+
` + E[k].replace(" at new ", " at ");
|
|
1775
|
+
return typeof r == "function" && de.set(r, G), G;
|
|
1802
1776
|
}
|
|
1803
|
-
while (k >= 1 &&
|
|
1777
|
+
while (k >= 1 && j >= 0);
|
|
1804
1778
|
break;
|
|
1805
1779
|
}
|
|
1806
1780
|
}
|
|
1807
1781
|
} finally {
|
|
1808
|
-
we = !1,
|
|
1782
|
+
we = !1, ye.current = R, _t(), Error.prepareStackTrace = O;
|
|
1809
1783
|
}
|
|
1810
1784
|
var ne = r ? r.displayName || r.name : "", Qe = ne ? fe(ne) : "";
|
|
1811
1785
|
return typeof r == "function" && de.set(r, Qe), Qe;
|
|
@@ -1825,24 +1799,24 @@ function Cr() {
|
|
|
1825
1799
|
if (typeof r == "string")
|
|
1826
1800
|
return fe(r);
|
|
1827
1801
|
switch (r) {
|
|
1828
|
-
case
|
|
1802
|
+
case v:
|
|
1829
1803
|
return fe("Suspense");
|
|
1830
|
-
case
|
|
1804
|
+
case p:
|
|
1831
1805
|
return fe("SuspenseList");
|
|
1832
1806
|
}
|
|
1833
1807
|
if (typeof r == "object")
|
|
1834
1808
|
switch (r.$$typeof) {
|
|
1835
|
-
case
|
|
1809
|
+
case g:
|
|
1836
1810
|
return We(r.render);
|
|
1837
1811
|
case w:
|
|
1838
1812
|
return he(r.type, c, l);
|
|
1839
|
-
case
|
|
1813
|
+
case N:
|
|
1840
1814
|
return We(r._render);
|
|
1841
1815
|
case m: {
|
|
1842
|
-
var
|
|
1816
|
+
var h = r, O = h._payload, R = h._init;
|
|
1843
1817
|
try {
|
|
1844
1818
|
return he(R(O), c, l);
|
|
1845
|
-
} catch (
|
|
1819
|
+
} catch (C) {
|
|
1846
1820
|
}
|
|
1847
1821
|
}
|
|
1848
1822
|
}
|
|
@@ -1856,22 +1830,22 @@ function Cr() {
|
|
|
1856
1830
|
} else
|
|
1857
1831
|
qe.setExtraStackFrame(null);
|
|
1858
1832
|
}
|
|
1859
|
-
function vt(r, c, l,
|
|
1833
|
+
function vt(r, c, l, h, O) {
|
|
1860
1834
|
{
|
|
1861
1835
|
var R = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
1862
|
-
for (var
|
|
1863
|
-
if (R(r,
|
|
1864
|
-
var
|
|
1836
|
+
for (var C in r)
|
|
1837
|
+
if (R(r, C)) {
|
|
1838
|
+
var E = void 0;
|
|
1865
1839
|
try {
|
|
1866
|
-
if (typeof r[
|
|
1867
|
-
var
|
|
1868
|
-
throw
|
|
1840
|
+
if (typeof r[C] != "function") {
|
|
1841
|
+
var $ = Error((h || "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`.");
|
|
1842
|
+
throw $.name = "Invariant Violation", $;
|
|
1869
1843
|
}
|
|
1870
|
-
|
|
1844
|
+
E = r[C](c, C, h, l, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
1871
1845
|
} catch (k) {
|
|
1872
|
-
|
|
1846
|
+
E = k;
|
|
1873
1847
|
}
|
|
1874
|
-
|
|
1848
|
+
E && !(E 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).", h || "React class", l, C, typeof E), _e(null)), E instanceof Error && !(E.message in Fe) && (Fe[E.message] = !0, _e(O), y("Failed %s type: %s", l, E.message), _e(null));
|
|
1875
1849
|
}
|
|
1876
1850
|
}
|
|
1877
1851
|
}
|
|
@@ -1898,16 +1872,16 @@ function Cr() {
|
|
|
1898
1872
|
}
|
|
1899
1873
|
return r.key !== void 0;
|
|
1900
1874
|
}
|
|
1901
|
-
function
|
|
1875
|
+
function yt(r, c) {
|
|
1902
1876
|
if (typeof r.ref == "string" && se.current && c && se.current.stateNode !== c) {
|
|
1903
|
-
var l =
|
|
1904
|
-
Oe[l] || (
|
|
1877
|
+
var l = F(se.current.type);
|
|
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);
|
|
1905
1879
|
}
|
|
1906
1880
|
}
|
|
1907
|
-
function
|
|
1881
|
+
function Ct(r, c) {
|
|
1908
1882
|
{
|
|
1909
1883
|
var l = function() {
|
|
1910
|
-
Ke || (Ke = !0,
|
|
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));
|
|
1911
1885
|
};
|
|
1912
1886
|
l.isReactWarning = !0, Object.defineProperty(r, "key", {
|
|
1913
1887
|
get: l,
|
|
@@ -1918,7 +1892,7 @@ function Cr() {
|
|
|
1918
1892
|
function wt(r, c) {
|
|
1919
1893
|
{
|
|
1920
1894
|
var l = function() {
|
|
1921
|
-
Ye || (Ye = !0,
|
|
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));
|
|
1922
1896
|
};
|
|
1923
1897
|
l.isReactWarning = !0, Object.defineProperty(r, "ref", {
|
|
1924
1898
|
get: l,
|
|
@@ -1926,51 +1900,51 @@ function Cr() {
|
|
|
1926
1900
|
});
|
|
1927
1901
|
}
|
|
1928
1902
|
}
|
|
1929
|
-
var St = function(r, c, l,
|
|
1930
|
-
var
|
|
1903
|
+
var St = function(r, c, l, h, O, R, C) {
|
|
1904
|
+
var E = {
|
|
1931
1905
|
// This tag allows us to uniquely identify this as a React Element
|
|
1932
1906
|
$$typeof: n,
|
|
1933
1907
|
// Built-in properties that belong on the element
|
|
1934
1908
|
type: r,
|
|
1935
1909
|
key: c,
|
|
1936
1910
|
ref: l,
|
|
1937
|
-
props:
|
|
1911
|
+
props: C,
|
|
1938
1912
|
// Record the component responsible for creating this element.
|
|
1939
1913
|
_owner: R
|
|
1940
1914
|
};
|
|
1941
|
-
return
|
|
1915
|
+
return E._store = {}, Object.defineProperty(E._store, "validated", {
|
|
1942
1916
|
configurable: !1,
|
|
1943
1917
|
enumerable: !1,
|
|
1944
1918
|
writable: !0,
|
|
1945
1919
|
value: !1
|
|
1946
|
-
}), Object.defineProperty(
|
|
1920
|
+
}), Object.defineProperty(E, "_self", {
|
|
1947
1921
|
configurable: !1,
|
|
1948
1922
|
enumerable: !1,
|
|
1949
1923
|
writable: !1,
|
|
1950
|
-
value:
|
|
1951
|
-
}), Object.defineProperty(
|
|
1924
|
+
value: h
|
|
1925
|
+
}), Object.defineProperty(E, "_source", {
|
|
1952
1926
|
configurable: !1,
|
|
1953
1927
|
enumerable: !1,
|
|
1954
1928
|
writable: !1,
|
|
1955
1929
|
value: O
|
|
1956
|
-
}), Object.freeze && (Object.freeze(
|
|
1930
|
+
}), Object.freeze && (Object.freeze(E.props), Object.freeze(E)), E;
|
|
1957
1931
|
};
|
|
1958
|
-
function Ot(r, c, l,
|
|
1932
|
+
function Ot(r, c, l, h, O) {
|
|
1959
1933
|
{
|
|
1960
|
-
var R,
|
|
1961
|
-
l !== void 0 && (
|
|
1934
|
+
var R, C = {}, E = null, $ = null;
|
|
1935
|
+
l !== void 0 && (E = "" + l), bt(c) && (E = "" + c.key), Et(c) && ($ = c.ref, yt(c, O));
|
|
1962
1936
|
for (R in c)
|
|
1963
|
-
Se.call(c, R) && !pt.hasOwnProperty(R) && (
|
|
1937
|
+
Se.call(c, R) && !pt.hasOwnProperty(R) && (C[R] = c[R]);
|
|
1964
1938
|
if (r && r.defaultProps) {
|
|
1965
1939
|
var k = r.defaultProps;
|
|
1966
1940
|
for (R in k)
|
|
1967
|
-
|
|
1941
|
+
C[R] === void 0 && (C[R] = k[R]);
|
|
1968
1942
|
}
|
|
1969
|
-
if (
|
|
1970
|
-
var
|
|
1971
|
-
|
|
1943
|
+
if (E || $) {
|
|
1944
|
+
var j = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
|
|
1945
|
+
E && Ct(C, j), $ && wt(C, j);
|
|
1972
1946
|
}
|
|
1973
|
-
return St(r,
|
|
1947
|
+
return St(r, E, $, O, h, se.current, C);
|
|
1974
1948
|
}
|
|
1975
1949
|
}
|
|
1976
1950
|
var Re = b.ReactCurrentOwner, Ge = b.ReactDebugCurrentFrame;
|
|
@@ -1989,7 +1963,7 @@ function Cr() {
|
|
|
1989
1963
|
function He() {
|
|
1990
1964
|
{
|
|
1991
1965
|
if (Re.current) {
|
|
1992
|
-
var r =
|
|
1966
|
+
var r = F(Re.current.type);
|
|
1993
1967
|
if (r)
|
|
1994
1968
|
return `
|
|
1995
1969
|
|
|
@@ -2031,8 +2005,8 @@ Check the top-level render call using <` + l + ">.");
|
|
|
2031
2005
|
if (Je[l])
|
|
2032
2006
|
return;
|
|
2033
2007
|
Je[l] = !0;
|
|
2034
|
-
var
|
|
2035
|
-
r && r._owner && r._owner !== Re.current && (
|
|
2008
|
+
var h = "";
|
|
2009
|
+
r && r._owner && r._owner !== Re.current && (h = " 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, h), re(null);
|
|
2036
2010
|
}
|
|
2037
2011
|
}
|
|
2038
2012
|
function Xe(r, c) {
|
|
@@ -2041,16 +2015,16 @@ Check the top-level render call using <` + l + ">.");
|
|
|
2041
2015
|
return;
|
|
2042
2016
|
if (Array.isArray(r))
|
|
2043
2017
|
for (var l = 0; l < r.length; l++) {
|
|
2044
|
-
var
|
|
2045
|
-
Te(
|
|
2018
|
+
var h = r[l];
|
|
2019
|
+
Te(h) && ze(h, c);
|
|
2046
2020
|
}
|
|
2047
2021
|
else if (Te(r))
|
|
2048
2022
|
r._store && (r._store.validated = !0);
|
|
2049
2023
|
else if (r) {
|
|
2050
2024
|
var O = L(r);
|
|
2051
2025
|
if (typeof O == "function" && O !== r.entries)
|
|
2052
|
-
for (var R = O.call(r),
|
|
2053
|
-
Te(
|
|
2026
|
+
for (var R = O.call(r), C; !(C = R.next()).done; )
|
|
2027
|
+
Te(C.value) && ze(C.value, c);
|
|
2054
2028
|
}
|
|
2055
2029
|
}
|
|
2056
2030
|
}
|
|
@@ -2062,63 +2036,63 @@ Check the top-level render call using <` + l + ">.");
|
|
|
2062
2036
|
var l;
|
|
2063
2037
|
if (typeof c == "function")
|
|
2064
2038
|
l = c.propTypes;
|
|
2065
|
-
else if (typeof c == "object" && (c.$$typeof ===
|
|
2039
|
+
else if (typeof c == "object" && (c.$$typeof === g || // Note: Memo only checks outer props here.
|
|
2066
2040
|
// Inner props are checked in the reconciler.
|
|
2067
2041
|
c.$$typeof === w))
|
|
2068
2042
|
l = c.propTypes;
|
|
2069
2043
|
else
|
|
2070
2044
|
return;
|
|
2071
2045
|
if (l) {
|
|
2072
|
-
var
|
|
2073
|
-
vt(l, r.props, "prop",
|
|
2046
|
+
var h = F(c);
|
|
2047
|
+
vt(l, r.props, "prop", h, r);
|
|
2074
2048
|
} else if (c.PropTypes !== void 0 && !Ie) {
|
|
2075
2049
|
Ie = !0;
|
|
2076
|
-
var O =
|
|
2077
|
-
|
|
2050
|
+
var O = F(c);
|
|
2051
|
+
y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", O || "Unknown");
|
|
2078
2052
|
}
|
|
2079
|
-
typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved &&
|
|
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.");
|
|
2080
2054
|
}
|
|
2081
2055
|
}
|
|
2082
2056
|
function kt(r) {
|
|
2083
2057
|
{
|
|
2084
2058
|
for (var c = Object.keys(r.props), l = 0; l < c.length; l++) {
|
|
2085
|
-
var
|
|
2086
|
-
if (
|
|
2087
|
-
re(r),
|
|
2059
|
+
var h = c[l];
|
|
2060
|
+
if (h !== "children" && h !== "key") {
|
|
2061
|
+
re(r), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", h), re(null);
|
|
2088
2062
|
break;
|
|
2089
2063
|
}
|
|
2090
2064
|
}
|
|
2091
|
-
r.ref !== null && (re(r),
|
|
2065
|
+
r.ref !== null && (re(r), y("Invalid attribute `ref` supplied to `React.Fragment`."), re(null));
|
|
2092
2066
|
}
|
|
2093
2067
|
}
|
|
2094
|
-
function Ze(r, c, l,
|
|
2068
|
+
function Ze(r, c, l, h, O, R) {
|
|
2095
2069
|
{
|
|
2096
|
-
var
|
|
2097
|
-
if (!
|
|
2098
|
-
var
|
|
2099
|
-
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (
|
|
2100
|
-
var
|
|
2101
|
-
|
|
2070
|
+
var C = z(r);
|
|
2071
|
+
if (!C) {
|
|
2072
|
+
var E = "";
|
|
2073
|
+
(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.");
|
|
2074
|
+
var $ = Rt(O);
|
|
2075
|
+
$ ? E += $ : E += He();
|
|
2102
2076
|
var k;
|
|
2103
|
-
r === null ? k = "null" : Array.isArray(r) ? k = "array" : r !== void 0 && r.$$typeof === n ? (k = "<" + (
|
|
2077
|
+
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, y("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);
|
|
2104
2078
|
}
|
|
2105
|
-
var
|
|
2106
|
-
if (
|
|
2107
|
-
return
|
|
2108
|
-
if (
|
|
2109
|
-
var
|
|
2110
|
-
if (
|
|
2111
|
-
if (
|
|
2112
|
-
if (Array.isArray(
|
|
2113
|
-
for (var ne = 0; ne <
|
|
2114
|
-
Xe(
|
|
2115
|
-
Object.freeze && Object.freeze(
|
|
2079
|
+
var j = Ot(r, c, l, O, R);
|
|
2080
|
+
if (j == null)
|
|
2081
|
+
return j;
|
|
2082
|
+
if (C) {
|
|
2083
|
+
var G = c.children;
|
|
2084
|
+
if (G !== void 0)
|
|
2085
|
+
if (h)
|
|
2086
|
+
if (Array.isArray(G)) {
|
|
2087
|
+
for (var ne = 0; ne < G.length; ne++)
|
|
2088
|
+
Xe(G[ne], r);
|
|
2089
|
+
Object.freeze && Object.freeze(G);
|
|
2116
2090
|
} else
|
|
2117
|
-
|
|
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.");
|
|
2118
2092
|
else
|
|
2119
|
-
Xe(
|
|
2093
|
+
Xe(G, r);
|
|
2120
2094
|
}
|
|
2121
|
-
return r === t.Fragment ? kt(
|
|
2095
|
+
return r === t.Fragment ? kt(j) : Tt(j), j;
|
|
2122
2096
|
}
|
|
2123
2097
|
}
|
|
2124
2098
|
function Pt(r, c, l) {
|
|
@@ -2133,98 +2107,98 @@ Check the top-level render call using <` + l + ">.");
|
|
|
2133
2107
|
}(Ne)), Ne;
|
|
2134
2108
|
}
|
|
2135
2109
|
(function(t) {
|
|
2136
|
-
process.env.NODE_ENV === "production" ? t.exports = br() : t.exports =
|
|
2110
|
+
process.env.NODE_ENV === "production" ? t.exports = br() : t.exports = yr();
|
|
2137
2111
|
})(Er);
|
|
2138
|
-
const
|
|
2112
|
+
const Cr = Ae.jsx;
|
|
2139
2113
|
function kr(t) {
|
|
2140
|
-
const s = Ft(null), e = pr(t), n = e.jsBridge, i = (d) => /* @__PURE__ */
|
|
2114
|
+
const s = Ft(null), e = pr(t), n = e.jsBridge, i = (d) => /* @__PURE__ */ Cr(s.Provider, { value: e, children: d.children }), a = () => {
|
|
2141
2115
|
const d = V.useContext(s);
|
|
2142
2116
|
if (!d)
|
|
2143
2117
|
throw new Error("LiveProvider never found.");
|
|
2144
2118
|
return d;
|
|
2145
|
-
}, u = () => e, f = () => e.$RTC,
|
|
2146
|
-
function
|
|
2147
|
-
const b = a(),
|
|
2148
|
-
return V.useEffect(() => (b.keyframes.on(d, S), D),
|
|
2119
|
+
}, u = () => e, f = () => e.$RTC, _ = () => f(), g = () => async (d) => await e.connect(d);
|
|
2120
|
+
function v(d, S, L = []) {
|
|
2121
|
+
const b = a(), y = [b, name, ...L], D = () => b.keyframes.off(d, S);
|
|
2122
|
+
return V.useEffect(() => (b.keyframes.on(d, S), D), y), D;
|
|
2149
2123
|
}
|
|
2150
|
-
function
|
|
2124
|
+
function p() {
|
|
2151
2125
|
const d = a();
|
|
2152
2126
|
return {
|
|
2153
2127
|
connect: async (T) => await d.connect(T),
|
|
2154
|
-
broadcast: async (T,
|
|
2128
|
+
broadcast: async (T, B, te = 0) => await d.broadcast(T, B, te),
|
|
2155
2129
|
exit: async () => await d.exit(),
|
|
2156
2130
|
kick: async (T) => await d.kick(T),
|
|
2157
2131
|
toggleMicro: (T) => d.toggleMicro(T),
|
|
2158
|
-
forbidMicro: async (T,
|
|
2159
|
-
forbidSync: (T,
|
|
2160
|
-
sendKeyframe: (T,
|
|
2132
|
+
forbidMicro: async (T, B = []) => await d.forbidMicro(T, B),
|
|
2133
|
+
forbidSync: (T, B = []) => d.forbidSync(T, B),
|
|
2134
|
+
sendKeyframe: (T, B) => d.sendKeyframe(T, B),
|
|
2161
2135
|
getFramesByKey: (T) => d.getFramesByKey(T),
|
|
2162
2136
|
setSelfInfo: (T) => d.setSelfInfo(T),
|
|
2163
|
-
updateStatus: (T,
|
|
2137
|
+
updateStatus: (T, B, te, le) => d.updateStatus(T, B, te, le)
|
|
2164
2138
|
};
|
|
2165
2139
|
}
|
|
2166
2140
|
function w(d) {
|
|
2167
2141
|
const S = a(), [L, b] = V.useState(S.getFramesByKey(d));
|
|
2168
2142
|
V.useEffect(() => {
|
|
2169
|
-
const D = (ue) => b(ue),
|
|
2170
|
-
return S.keyframes.on(
|
|
2143
|
+
const D = (ue) => b(ue), U = d, z = D;
|
|
2144
|
+
return S.keyframes.on(U, z), () => S.keyframes.off(U, z);
|
|
2171
2145
|
}, [S]);
|
|
2172
|
-
const
|
|
2146
|
+
const y = V.useCallback(
|
|
2173
2147
|
(D) => S.sendKeyframe(d, D),
|
|
2174
2148
|
[S]
|
|
2175
2149
|
);
|
|
2176
|
-
return [L,
|
|
2150
|
+
return [L, y];
|
|
2177
2151
|
}
|
|
2178
2152
|
function m(d, S, L = []) {
|
|
2179
|
-
const b = a(),
|
|
2180
|
-
return V.useEffect(() => (b.on(d, S),
|
|
2153
|
+
const b = a(), y = () => b.off(d, S), D = [b, d, ...L];
|
|
2154
|
+
return V.useEffect(() => (b.on(d, S), y), D), y;
|
|
2181
2155
|
}
|
|
2182
|
-
function
|
|
2156
|
+
function N() {
|
|
2183
2157
|
const d = a(), [S, L] = V.useState(d.state);
|
|
2184
2158
|
return V.useEffect(() => {
|
|
2185
|
-
const b = (
|
|
2159
|
+
const b = (y) => L(y);
|
|
2186
2160
|
return d.on("stateChange", b), () => d.off("stateChange", b);
|
|
2187
2161
|
}, [d]), S;
|
|
2188
2162
|
}
|
|
2189
2163
|
function M() {
|
|
2190
2164
|
const d = a();
|
|
2191
2165
|
return {
|
|
2192
|
-
join: (
|
|
2166
|
+
join: (U) => d.$RTC.join(U),
|
|
2193
2167
|
quit: () => d.$RTC.quit(),
|
|
2194
2168
|
shock: () => {
|
|
2195
|
-
var
|
|
2196
|
-
return (z = (
|
|
2169
|
+
var U, z;
|
|
2170
|
+
return (z = (U = d.$RTC).shock) == null ? void 0 : z.call(U);
|
|
2197
2171
|
},
|
|
2198
|
-
toggleMicro: (
|
|
2172
|
+
toggleMicro: (U) => d.$RTC.toggleMicro(U),
|
|
2199
2173
|
detectMicro: () => d.$RTC.detectMicro()
|
|
2200
2174
|
};
|
|
2201
2175
|
}
|
|
2202
|
-
function
|
|
2203
|
-
const b = a(),
|
|
2204
|
-
return V.useEffect(() => (b.$RTC.on(d, S),
|
|
2176
|
+
function P(d, S, L = []) {
|
|
2177
|
+
const b = a(), y = () => b.$RTC.off(d, S), D = [b, d, ...L];
|
|
2178
|
+
return V.useEffect(() => (b.$RTC.on(d, S), y), D), y;
|
|
2205
2179
|
}
|
|
2206
|
-
function
|
|
2180
|
+
function Y() {
|
|
2207
2181
|
const d = a(), [S, L] = V.useState(
|
|
2208
2182
|
d.selfInfo || {}
|
|
2209
2183
|
), b = (D) => L(D);
|
|
2210
2184
|
V.useEffect(() => (d.on("selfInfoUpdate", b), () => d.off("selfInfoUpdate", b)), [d]);
|
|
2211
|
-
const
|
|
2185
|
+
const y = V.useCallback(
|
|
2212
2186
|
async (D) => await d.setSelfInfo(D),
|
|
2213
2187
|
[d]
|
|
2214
2188
|
);
|
|
2215
|
-
return [S,
|
|
2189
|
+
return [S, y];
|
|
2216
2190
|
}
|
|
2217
|
-
function
|
|
2191
|
+
function K() {
|
|
2218
2192
|
const d = a(), [S, L] = V.useState(
|
|
2219
2193
|
d.snapshot
|
|
2220
2194
|
);
|
|
2221
2195
|
return V.useEffect(() => {
|
|
2222
|
-
const b = (
|
|
2196
|
+
const b = (y) => L(y);
|
|
2223
2197
|
return d.on("keyframes", b), () => d.off("keyframes", b);
|
|
2224
2198
|
}), S;
|
|
2225
2199
|
}
|
|
2226
2200
|
function I() {
|
|
2227
|
-
const d = a(), [S, L] = V.useState(d.userList), b = (
|
|
2201
|
+
const d = a(), [S, L] = V.useState(d.userList), b = (y) => L(y);
|
|
2228
2202
|
return V.useEffect(() => (d.on("userListUpdate", b), () => d.off("userListUpdate", b)), [d]), S;
|
|
2229
2203
|
}
|
|
2230
2204
|
return {
|
|
@@ -2232,17 +2206,17 @@ function kr(t) {
|
|
|
2232
2206
|
jsBridge: n,
|
|
2233
2207
|
LiveProvider: i,
|
|
2234
2208
|
unsafe__useLiveInstance: u,
|
|
2235
|
-
unsafe__useRTCInstance:
|
|
2236
|
-
useConnect:
|
|
2209
|
+
unsafe__useRTCInstance: _,
|
|
2210
|
+
useConnect: g,
|
|
2237
2211
|
useKeyframe: w,
|
|
2238
|
-
useKeyframeUpdateCallback:
|
|
2239
|
-
useLiveAction:
|
|
2212
|
+
useKeyframeUpdateCallback: v,
|
|
2213
|
+
useLiveAction: p,
|
|
2240
2214
|
useLiveEventCallback: m,
|
|
2241
|
-
useLiveState:
|
|
2215
|
+
useLiveState: N,
|
|
2242
2216
|
useRTCAction: M,
|
|
2243
|
-
useRTCEventCallback:
|
|
2244
|
-
useSelfInfo:
|
|
2245
|
-
useKeyframesSnapshot:
|
|
2217
|
+
useRTCEventCallback: P,
|
|
2218
|
+
useSelfInfo: Y,
|
|
2219
|
+
useKeyframesSnapshot: K,
|
|
2246
2220
|
useUserList: I
|
|
2247
2221
|
};
|
|
2248
2222
|
}
|
|
@@ -2250,11 +2224,11 @@ export {
|
|
|
2250
2224
|
tt as BrowserRTC,
|
|
2251
2225
|
rt as BrowserRTC4Chime,
|
|
2252
2226
|
ut as BuiltInRTCType,
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2227
|
+
J as BuiltinActionType,
|
|
2228
|
+
q as BuiltinEventType,
|
|
2229
|
+
W as Command,
|
|
2256
2230
|
De as CoreRTC,
|
|
2257
|
-
|
|
2231
|
+
x as LiveState,
|
|
2258
2232
|
Zt as MemUserStatus,
|
|
2259
2233
|
Z as MicroStatus,
|
|
2260
2234
|
lt as RTCJoinedInfoCodeEnum,
|