@ikonai/sdk 1.0.35 → 1.0.37
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/index.js +980 -918
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const Bs = {
|
|
2
2
|
Compressed: 8
|
|
3
3
|
};
|
|
4
|
-
function
|
|
4
|
+
function Wf(t) {
|
|
5
5
|
return t;
|
|
6
6
|
}
|
|
7
7
|
function Se(t) {
|
|
@@ -19,17 +19,17 @@ function ce(t) {
|
|
|
19
19
|
const r = n.getUint32(0, !0), s = n.getUint32(4, !0), i = n.getUint32(8, !0), o = n.getUint32(12, !0), a = n.getUint32(16, !0), c = n.getUint32(20, !0), l = n.getUint8(24), p = n.getUint8(25), h = n.getUint8(26);
|
|
20
20
|
if (27 + c * 4 > e.length)
|
|
21
21
|
throw new Error("Protocol header exceeds payload length");
|
|
22
|
-
const
|
|
22
|
+
const m = [];
|
|
23
23
|
let S = 27;
|
|
24
24
|
for (let T = 0; T < c; T++)
|
|
25
|
-
|
|
25
|
+
m.push(n.getUint32(S, !0)), S += 4;
|
|
26
26
|
return {
|
|
27
27
|
length: r,
|
|
28
28
|
opcode: s,
|
|
29
29
|
senderId: i,
|
|
30
30
|
trackId: o,
|
|
31
31
|
sequenceId: a,
|
|
32
|
-
targetIds:
|
|
32
|
+
targetIds: m,
|
|
33
33
|
payloadVersion: l,
|
|
34
34
|
payloadType: p,
|
|
35
35
|
flags: h
|
|
@@ -55,11 +55,11 @@ async function ft(t, e, n) {
|
|
|
55
55
|
return (s.flags & Bs.Compressed) !== 0 && (o = await xs(o)), o;
|
|
56
56
|
}
|
|
57
57
|
function M(t, e, n, r, s) {
|
|
58
|
-
const i = s?.trackId ?? 0, o = s?.sequenceId ?? 0, a = s?.flags ?? 0, c = s?.targetIds ?? [], l = s?.payloadType ?? 8, p = 27 + c.length * 4, h = p + e.length, d = new Uint8Array(h),
|
|
59
|
-
|
|
58
|
+
const i = s?.trackId ?? 0, o = s?.sequenceId ?? 0, a = s?.flags ?? 0, c = s?.targetIds ?? [], l = s?.payloadType ?? 8, p = 27 + c.length * 4, h = p + e.length, d = new Uint8Array(h), m = new DataView(d.buffer);
|
|
59
|
+
m.setUint32(0, h, !0), m.setUint32(4, t >>> 0, !0), m.setUint32(8, r >>> 0, !0), m.setUint32(12, i >>> 0, !0), m.setUint32(16, o >>> 0, !0), m.setUint32(20, c.length >>> 0, !0), m.setUint8(24, n & 255), m.setUint8(25, l & 255), m.setUint8(26, a & 255);
|
|
60
60
|
let S = 27;
|
|
61
61
|
for (let T = 0; T < c.length; T++)
|
|
62
|
-
|
|
62
|
+
m.setUint32(S, c[T] >>> 0, !0), S += 4;
|
|
63
63
|
return d.set(e, p), d;
|
|
64
64
|
}
|
|
65
65
|
async function xs(t) {
|
|
@@ -593,13 +593,13 @@ class K {
|
|
|
593
593
|
return this.ensureType(
|
|
594
594
|
9
|
|
595
595
|
/* Array */
|
|
596
|
-
),
|
|
596
|
+
), mt.create(this.payload);
|
|
597
597
|
}
|
|
598
598
|
asDictionary() {
|
|
599
599
|
return this.ensureType(
|
|
600
600
|
10
|
|
601
601
|
/* Dict */
|
|
602
|
-
),
|
|
602
|
+
), Et.create(this.payload);
|
|
603
603
|
}
|
|
604
604
|
ensureType(e) {
|
|
605
605
|
if (this.type !== e)
|
|
@@ -614,7 +614,7 @@ class Vs extends K {
|
|
|
614
614
|
return this.type === 1;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
class
|
|
617
|
+
class mt {
|
|
618
618
|
payload;
|
|
619
619
|
elementType;
|
|
620
620
|
count;
|
|
@@ -630,7 +630,7 @@ class Et {
|
|
|
630
630
|
this.count = W(e, r, "ArrayMalformed"), this.offset = r.offset;
|
|
631
631
|
}
|
|
632
632
|
static create(e) {
|
|
633
|
-
return new
|
|
633
|
+
return new mt(ue(e));
|
|
634
634
|
}
|
|
635
635
|
next() {
|
|
636
636
|
if (this.index >= this.count) {
|
|
@@ -654,40 +654,40 @@ class Et {
|
|
|
654
654
|
const e = ie(this.elementType);
|
|
655
655
|
L(this.payload, this.offset, e);
|
|
656
656
|
const n = this.payload.subarray(this.offset, this.offset + e);
|
|
657
|
-
return this.offset += e, new
|
|
657
|
+
return this.offset += e, new me(this.elementType, n);
|
|
658
658
|
}
|
|
659
659
|
case 12:
|
|
660
660
|
case 13: {
|
|
661
661
|
const e = { offset: this.offset }, n = W(this.payload, e, "ArrayMalformed");
|
|
662
662
|
L(this.payload, e.offset, n);
|
|
663
663
|
const r = this.payload.subarray(e.offset, e.offset + n);
|
|
664
|
-
return this.offset = e.offset + n, new
|
|
664
|
+
return this.offset = e.offset + n, new me(this.elementType, r);
|
|
665
665
|
}
|
|
666
666
|
case 11: {
|
|
667
667
|
const e = { offset: this.offset }, n = W(this.payload, e, "ArrayMalformed");
|
|
668
668
|
L(this.payload, e.offset, n);
|
|
669
669
|
const r = this.payload.subarray(e.offset, e.offset + n);
|
|
670
|
-
return this.offset = e.offset + n, new
|
|
670
|
+
return this.offset = e.offset + n, new me(11, r);
|
|
671
671
|
}
|
|
672
672
|
case 9: {
|
|
673
673
|
const e = _t(this.payload, this.offset), n = this.payload.subarray(this.offset, this.offset + e);
|
|
674
|
-
return this.offset += e, new
|
|
674
|
+
return this.offset += e, new me(9, n);
|
|
675
675
|
}
|
|
676
676
|
case 10: {
|
|
677
677
|
const e = Tt(this.payload, this.offset), n = this.payload.subarray(this.offset, this.offset + e);
|
|
678
|
-
return this.offset += e, new
|
|
678
|
+
return this.offset += e, new me(10, n);
|
|
679
679
|
}
|
|
680
680
|
default:
|
|
681
681
|
throw new Error(`Unsupported array element type ${O[this.elementType]}`);
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
684
|
}
|
|
685
|
-
class
|
|
685
|
+
class me extends K {
|
|
686
686
|
constructor(e, n) {
|
|
687
687
|
super(e, n);
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
|
-
class
|
|
690
|
+
class Et {
|
|
691
691
|
payload;
|
|
692
692
|
keyType;
|
|
693
693
|
valueType;
|
|
@@ -704,7 +704,7 @@ class mt {
|
|
|
704
704
|
this.count = W(e, n, "DictMalformed"), this.offset = n.offset;
|
|
705
705
|
}
|
|
706
706
|
static create(e) {
|
|
707
|
-
return new
|
|
707
|
+
return new Et(ue(e));
|
|
708
708
|
}
|
|
709
709
|
next() {
|
|
710
710
|
if (this.index >= this.count) {
|
|
@@ -1027,7 +1027,7 @@ function Zs(t, e, n) {
|
|
|
1027
1027
|
const r = Js(t);
|
|
1028
1028
|
return M(js, r, pn, e, n);
|
|
1029
1029
|
}
|
|
1030
|
-
const qs = 1,
|
|
1030
|
+
const qs = 1, mn = 467348717, En = 972460562, In = 1911490601, _n = 2603556958, Tn = 3609695522, wn = 4094837378, Sn = 4257460908;
|
|
1031
1031
|
function et(t) {
|
|
1032
1032
|
const e = {};
|
|
1033
1033
|
return gn(e), t && Object.assign(e, t), e;
|
|
@@ -1036,7 +1036,7 @@ function gn(t) {
|
|
|
1036
1036
|
return t.ParameterIndex = 0, t.TypeName = "", t.ValueJson = "", t.ValueData = new Uint8Array(0), t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.EnumerationId = w.fromBytes(new Uint8Array(16)), t;
|
|
1037
1037
|
}
|
|
1038
1038
|
function ei(t, e) {
|
|
1039
|
-
e.writeGuidField(
|
|
1039
|
+
e.writeGuidField(mn, t.EnumerationId), e.writeStringField(En, t.EnumerableItemTypeName), e.writeStringField(In, t.ValueJson), e.writeBoolField(_n, t.IsEnumerable), e.writeStringField(Tn, t.TypeName), e.writeBinaryField(wn, t.ValueData), e.writeInt32Field(Sn, t.ParameterIndex | 0);
|
|
1040
1040
|
}
|
|
1041
1041
|
function ti(t, e) {
|
|
1042
1042
|
const n = e ?? et();
|
|
@@ -1046,12 +1046,12 @@ function ni(t, e) {
|
|
|
1046
1046
|
let n;
|
|
1047
1047
|
for (; (n = t.next()) !== null; )
|
|
1048
1048
|
switch (n.fieldId) {
|
|
1049
|
-
case
|
|
1049
|
+
case mn: {
|
|
1050
1050
|
if (n.isNull) throw new Error();
|
|
1051
1051
|
e.EnumerationId = n.asGuid();
|
|
1052
1052
|
break;
|
|
1053
1053
|
}
|
|
1054
|
-
case
|
|
1054
|
+
case En: {
|
|
1055
1055
|
if (n.isNull) throw new Error();
|
|
1056
1056
|
e.EnumerableItemTypeName = n.asString();
|
|
1057
1057
|
break;
|
|
@@ -1102,7 +1102,7 @@ function li(t, e, n) {
|
|
|
1102
1102
|
const r = ai(t);
|
|
1103
1103
|
return M(ri, r, Cn, e, n);
|
|
1104
1104
|
}
|
|
1105
|
-
const ui = 161083277, di = 265814330, hi = 1368629611, fi = 2431514951, pi = 2745379226,
|
|
1105
|
+
const ui = 161083277, di = 265814330, hi = 1368629611, fi = 2431514951, pi = 2745379226, mi = 3282782683, Ei = 3284746250, Ii = 4101844078;
|
|
1106
1106
|
function An(t) {
|
|
1107
1107
|
const e = {};
|
|
1108
1108
|
return yn(e), e;
|
|
@@ -1146,12 +1146,12 @@ function Ti(t, e) {
|
|
|
1146
1146
|
e.CodecDetails = n.asString();
|
|
1147
1147
|
break;
|
|
1148
1148
|
}
|
|
1149
|
-
case
|
|
1149
|
+
case mi: {
|
|
1150
1150
|
if (n.isNull) throw new Error();
|
|
1151
1151
|
e.SourceType = n.asString();
|
|
1152
1152
|
break;
|
|
1153
1153
|
}
|
|
1154
|
-
case
|
|
1154
|
+
case Ei: {
|
|
1155
1155
|
if (n.isNull) throw new Error();
|
|
1156
1156
|
e.Codec = n.asInt32();
|
|
1157
1157
|
break;
|
|
@@ -1173,16 +1173,16 @@ function wi(t) {
|
|
|
1173
1173
|
const Si = 1107713536, gi = 1154362099, Ci = 1185721362;
|
|
1174
1174
|
function Ai(t) {
|
|
1175
1175
|
const e = {};
|
|
1176
|
-
return
|
|
1176
|
+
return bn(e), e;
|
|
1177
1177
|
}
|
|
1178
|
-
function
|
|
1178
|
+
function bn(t) {
|
|
1179
1179
|
return t.SetId = 0, t.Name = "", t.ShapeNames = [], t;
|
|
1180
1180
|
}
|
|
1181
1181
|
function yi(t, e) {
|
|
1182
1182
|
const n = e ?? Ai();
|
|
1183
|
-
return
|
|
1183
|
+
return bn(n), bi(t, n), n;
|
|
1184
1184
|
}
|
|
1185
|
-
function
|
|
1185
|
+
function bi(t, e) {
|
|
1186
1186
|
let n;
|
|
1187
1187
|
for (; (n = t.next()) !== null; )
|
|
1188
1188
|
switch (n.fieldId) {
|
|
@@ -1198,12 +1198,12 @@ function Ri(t, e) {
|
|
|
1198
1198
|
}
|
|
1199
1199
|
case Ci: {
|
|
1200
1200
|
if (n.isNull) throw new Error();
|
|
1201
|
-
e.ShapeNames =
|
|
1201
|
+
e.ShapeNames = Ri(n.asArray());
|
|
1202
1202
|
break;
|
|
1203
1203
|
}
|
|
1204
1204
|
}
|
|
1205
1205
|
}
|
|
1206
|
-
function
|
|
1206
|
+
function Ri(t) {
|
|
1207
1207
|
const e = [];
|
|
1208
1208
|
let n;
|
|
1209
1209
|
for (; (n = t.next()) !== null; )
|
|
@@ -1213,14 +1213,14 @@ function bi(t) {
|
|
|
1213
1213
|
const Ni = 76337612, ki = 185396121, Di = 250031587, vi = 388632637, Ui = 417197284, Oi = 469070965, Mi = 470595159, Pi = 594855258, Li = 781727218, Fi = 834078886, Bi = 1043273762, xi = 1236999138, Wi = 1286979607, Gi = 1368629611, Vi = 1715899485, Hi = 1942830531, $i = 1999510636, Ki = 2033288346, Yi = 2079864626, ji = 2142346422, zi = 2232517119, Xi = 2598291686, Ji = 2719718823, Qi = 2810953526, Zi = 2840065720, qi = 2885165957, eo = 3542818975, to = 3586157513, no = 3717933110, ro = 4062655306;
|
|
1214
1214
|
function tt(t) {
|
|
1215
1215
|
const e = {};
|
|
1216
|
-
return
|
|
1216
|
+
return Rn(e), e;
|
|
1217
1217
|
}
|
|
1218
|
-
function
|
|
1218
|
+
function Rn(t) {
|
|
1219
1219
|
return t.ContextType = de.Unknown, t.UserType = fe.Unknown, t.PayloadType = he.Unknown, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.SessionId = -1, t.IsInternal = !1, t.IsReady = !1, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.PreciseJoinedAt = 0n, t.UserAgent = "", t.ClientType = ne.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = wt.Unknown, t.ViewportWidth = 0, t.ViewportHeight = 0, t.Theme = "", t.Timezone = "", t.IsTouchDevice = !1, t.InitialPath = "", t;
|
|
1220
1220
|
}
|
|
1221
1221
|
function nt(t, e) {
|
|
1222
1222
|
const n = e ?? tt();
|
|
1223
|
-
return
|
|
1223
|
+
return Rn(n), so(t, n), n;
|
|
1224
1224
|
}
|
|
1225
1225
|
function so(t, e) {
|
|
1226
1226
|
let n;
|
|
@@ -1388,15 +1388,15 @@ function io(t) {
|
|
|
1388
1388
|
return e;
|
|
1389
1389
|
}
|
|
1390
1390
|
const oo = 746516514, ao = 877841741, co = 1175184220, lo = 1368629611, uo = 2341021724, ho = 3167053791, fo = 3632106223, po = 3686066300;
|
|
1391
|
-
function
|
|
1391
|
+
function mo(t) {
|
|
1392
1392
|
const e = {};
|
|
1393
1393
|
return Nn(e), e;
|
|
1394
1394
|
}
|
|
1395
1395
|
function Nn(t) {
|
|
1396
1396
|
return t.Type = N.None, t.Uri = "", t.OpcodeGroupsFromServer = g.NONE, t.OpcodeGroupsToServer = g.NONE, t.Priority = 0, t.Description = "", t.AuthTicket = new Uint8Array(0), t.IsUnreliable = !1, t;
|
|
1397
1397
|
}
|
|
1398
|
-
function
|
|
1399
|
-
const n = e ??
|
|
1398
|
+
function Eo(t, e) {
|
|
1399
|
+
const n = e ?? mo();
|
|
1400
1400
|
return Nn(n), Io(t, n), n;
|
|
1401
1401
|
}
|
|
1402
1402
|
function Io(t, e) {
|
|
@@ -1445,23 +1445,23 @@ function Io(t, e) {
|
|
|
1445
1445
|
}
|
|
1446
1446
|
}
|
|
1447
1447
|
}
|
|
1448
|
-
const _o = 65537, To = 166277978, wo = 1482635149, So = 1559330978, go = 2802434353, Co = 3085883711, Ao = 3669484338, yo = 3707543140,
|
|
1449
|
-
function
|
|
1448
|
+
const _o = 65537, To = 166277978, wo = 1482635149, So = 1559330978, go = 2802434353, Co = 3085883711, Ao = 3669484338, yo = 3707543140, bo = 3712281496, Ro = 3823842552, No = 3914217035;
|
|
1449
|
+
function ko(t) {
|
|
1450
1450
|
const e = {};
|
|
1451
1451
|
return kn(e), e;
|
|
1452
1452
|
}
|
|
1453
1453
|
function kn(t) {
|
|
1454
|
-
return t.ClientContext = tt(), t.ServerContext = tt(), t.CertHash = "", t.Entrypoints = [], t.FeatureFlags = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.ChannelInstanceId = "", t.PrimaryUserId = "", t;
|
|
1455
|
-
}
|
|
1456
|
-
function ko(t, e) {
|
|
1457
|
-
const n = V.create(t);
|
|
1458
|
-
return Do(n, e);
|
|
1454
|
+
return t.ClientContext = tt(), t.ServerContext = tt(), t.CertHash = "", t.Entrypoints = [], t.FeatureFlags = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.ChannelInstanceId = "", t.PrimaryUserId = "", t.ServerSessionId = "", t;
|
|
1459
1455
|
}
|
|
1460
1456
|
function Do(t, e) {
|
|
1461
|
-
const n =
|
|
1462
|
-
return
|
|
1457
|
+
const n = V.create(t);
|
|
1458
|
+
return vo(n, e);
|
|
1463
1459
|
}
|
|
1464
1460
|
function vo(t, e) {
|
|
1461
|
+
const n = e ?? ko();
|
|
1462
|
+
return kn(n), Uo(t, n), n;
|
|
1463
|
+
}
|
|
1464
|
+
function Uo(t, e) {
|
|
1465
1465
|
let n;
|
|
1466
1466
|
for (; (n = t.next()) !== null; )
|
|
1467
1467
|
switch (n.fieldId) {
|
|
@@ -1472,7 +1472,7 @@ function vo(t, e) {
|
|
|
1472
1472
|
}
|
|
1473
1473
|
case wo: {
|
|
1474
1474
|
if (n.isNull) throw new Error();
|
|
1475
|
-
e.Entrypoints =
|
|
1475
|
+
e.Entrypoints = Mo(n.asArray());
|
|
1476
1476
|
break;
|
|
1477
1477
|
}
|
|
1478
1478
|
case So: {
|
|
@@ -1492,7 +1492,7 @@ function vo(t, e) {
|
|
|
1492
1492
|
}
|
|
1493
1493
|
case Ao: {
|
|
1494
1494
|
if (n.isNull) throw new Error();
|
|
1495
|
-
e.FeatureFlags =
|
|
1495
|
+
e.FeatureFlags = Po(n.asDictionary());
|
|
1496
1496
|
break;
|
|
1497
1497
|
}
|
|
1498
1498
|
case yo: {
|
|
@@ -1500,30 +1500,35 @@ function vo(t, e) {
|
|
|
1500
1500
|
e.SpaceId = n.asString();
|
|
1501
1501
|
break;
|
|
1502
1502
|
}
|
|
1503
|
-
case
|
|
1503
|
+
case bo: {
|
|
1504
1504
|
if (n.isNull) throw new Error();
|
|
1505
1505
|
e.PrimaryUserId = n.asString();
|
|
1506
1506
|
break;
|
|
1507
1507
|
}
|
|
1508
|
-
case
|
|
1508
|
+
case Ro: {
|
|
1509
1509
|
if (n.isNull) throw new Error();
|
|
1510
1510
|
e.ChannelInstanceId = n.asString();
|
|
1511
1511
|
break;
|
|
1512
1512
|
}
|
|
1513
|
+
case No: {
|
|
1514
|
+
if (n.isNull) throw new Error();
|
|
1515
|
+
e.ServerSessionId = n.asString();
|
|
1516
|
+
break;
|
|
1517
|
+
}
|
|
1513
1518
|
}
|
|
1514
1519
|
}
|
|
1515
|
-
async function
|
|
1520
|
+
async function Oo(t, e) {
|
|
1516
1521
|
const n = await ft(t, _o);
|
|
1517
|
-
return
|
|
1522
|
+
return Do(n, e);
|
|
1518
1523
|
}
|
|
1519
|
-
function
|
|
1524
|
+
function Mo(t) {
|
|
1520
1525
|
const e = [];
|
|
1521
1526
|
let n;
|
|
1522
1527
|
for (; (n = t.next()) !== null; )
|
|
1523
|
-
e.push(
|
|
1528
|
+
e.push(Eo(n.asObject()));
|
|
1524
1529
|
return e;
|
|
1525
1530
|
}
|
|
1526
|
-
function
|
|
1531
|
+
function Po(t) {
|
|
1527
1532
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1528
1533
|
let n;
|
|
1529
1534
|
for (; (n = t.next()) !== null; ) {
|
|
@@ -1532,31 +1537,31 @@ function Mo(t) {
|
|
|
1532
1537
|
}
|
|
1533
1538
|
return e;
|
|
1534
1539
|
}
|
|
1535
|
-
function
|
|
1540
|
+
function Lo(t) {
|
|
1536
1541
|
const e = {};
|
|
1537
|
-
return
|
|
1542
|
+
return Fo(e), t && Object.assign(e, t), e;
|
|
1538
1543
|
}
|
|
1539
|
-
function
|
|
1544
|
+
function Fo(t) {
|
|
1540
1545
|
return t.ServerSessionId = "", t.ContextType = de.Unknown, t.UserType = fe.Unknown, t.PayloadType = he.Unknown, t.IsInternal = !1, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.OpcodeGroupsFromServer = g.NONE, t.OpcodeGroupsToServer = g.NONE, t.ProtocolVersion = 0, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.UserAgent = "", t.ClientType = ne.Unknown, t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = wt.Unknown, t.ViewportWidth = 0, t.ViewportHeight = 0, t.Theme = "", t.Timezone = "", t.IsTouchDevice = !1, t.InitialPath = "", t;
|
|
1541
1546
|
}
|
|
1542
|
-
const Dn = 1,
|
|
1543
|
-
function
|
|
1547
|
+
const Dn = 1, Bo = 1048632, xo = 3748161056, Wo = 4289118421;
|
|
1548
|
+
function Go(t) {
|
|
1544
1549
|
const e = {};
|
|
1545
|
-
return
|
|
1550
|
+
return Vo(e), t && Object.assign(e, t), e;
|
|
1546
1551
|
}
|
|
1547
|
-
function
|
|
1552
|
+
function Vo(t) {
|
|
1548
1553
|
return t.CallId = w.fromBytes(new Uint8Array(16)), t.InstanceId = w.fromBytes(new Uint8Array(16)), t;
|
|
1549
1554
|
}
|
|
1550
|
-
function
|
|
1555
|
+
function Ho(t) {
|
|
1551
1556
|
const e = new U(Dn);
|
|
1552
|
-
return
|
|
1557
|
+
return $o(t, e), e.finish();
|
|
1553
1558
|
}
|
|
1554
|
-
function
|
|
1555
|
-
e.writeGuidField(
|
|
1559
|
+
function $o(t, e) {
|
|
1560
|
+
e.writeGuidField(xo, t.CallId), e.writeGuidField(Wo, t.InstanceId);
|
|
1556
1561
|
}
|
|
1557
|
-
function
|
|
1558
|
-
const r =
|
|
1559
|
-
return M(
|
|
1562
|
+
function Ko(t, e, n) {
|
|
1563
|
+
const r = Ho(t);
|
|
1564
|
+
return M(Bo, r, Dn, e, n);
|
|
1560
1565
|
}
|
|
1561
1566
|
const vn = 1, Un = 1048601, On = 112005851, Mn = 814454131, Pn = 976255570, Ln = 2610786289, Fn = 2885165957, Bn = 3748161056, xn = 4289118421;
|
|
1562
1567
|
function Wn(t) {
|
|
@@ -1566,15 +1571,15 @@ function Wn(t) {
|
|
|
1566
1571
|
function Gn(t) {
|
|
1567
1572
|
return t.FunctionId = w.fromBytes(new Uint8Array(16)), t.CallId = w.fromBytes(new Uint8Array(16)), t.InstanceId = w.fromBytes(new Uint8Array(16)), t.FunctionName = "", t.Parameters = [], t.Scopes = [], t.Version = "", t;
|
|
1568
1573
|
}
|
|
1569
|
-
function
|
|
1574
|
+
function Yo(t) {
|
|
1570
1575
|
const e = new U(vn);
|
|
1571
|
-
return
|
|
1576
|
+
return jo(t, e), e.finish();
|
|
1572
1577
|
}
|
|
1573
|
-
function
|
|
1578
|
+
function jo(t, e) {
|
|
1574
1579
|
e.writeArrayField(On, O.Object, (n) => {
|
|
1575
1580
|
for (const r of t.Scopes)
|
|
1576
|
-
n.writeObject(
|
|
1577
|
-
|
|
1581
|
+
n.writeObject(ta, (s) => {
|
|
1582
|
+
ra(r, s);
|
|
1578
1583
|
});
|
|
1579
1584
|
}), e.writeStringField(Mn, t.FunctionName), e.writeGuidField(Pn, t.FunctionId), e.writeStringField(Ln, t.Version), e.writeArrayField(Fn, O.Object, (n) => {
|
|
1580
1585
|
for (const r of t.Parameters)
|
|
@@ -1583,21 +1588,21 @@ function Yo(t, e) {
|
|
|
1583
1588
|
});
|
|
1584
1589
|
}), e.writeGuidField(Bn, t.CallId), e.writeGuidField(xn, t.InstanceId);
|
|
1585
1590
|
}
|
|
1586
|
-
function
|
|
1591
|
+
function zo(t, e) {
|
|
1587
1592
|
const n = V.create(t);
|
|
1588
|
-
return
|
|
1593
|
+
return Xo(n, e);
|
|
1589
1594
|
}
|
|
1590
|
-
function
|
|
1595
|
+
function Xo(t, e) {
|
|
1591
1596
|
const n = e ?? Wn();
|
|
1592
|
-
return Gn(n),
|
|
1597
|
+
return Gn(n), Jo(t, n), n;
|
|
1593
1598
|
}
|
|
1594
|
-
function
|
|
1599
|
+
function Jo(t, e) {
|
|
1595
1600
|
let n;
|
|
1596
1601
|
for (; (n = t.next()) !== null; )
|
|
1597
1602
|
switch (n.fieldId) {
|
|
1598
1603
|
case On: {
|
|
1599
1604
|
if (n.isNull) throw new Error();
|
|
1600
|
-
e.Scopes =
|
|
1605
|
+
e.Scopes = qo(n.asArray());
|
|
1601
1606
|
break;
|
|
1602
1607
|
}
|
|
1603
1608
|
case Mn: {
|
|
@@ -1617,7 +1622,7 @@ function Xo(t, e) {
|
|
|
1617
1622
|
}
|
|
1618
1623
|
case Fn: {
|
|
1619
1624
|
if (n.isNull) throw new Error();
|
|
1620
|
-
e.Parameters =
|
|
1625
|
+
e.Parameters = ea(n.asArray());
|
|
1621
1626
|
break;
|
|
1622
1627
|
}
|
|
1623
1628
|
case Bn: {
|
|
@@ -1632,44 +1637,44 @@ function Xo(t, e) {
|
|
|
1632
1637
|
}
|
|
1633
1638
|
}
|
|
1634
1639
|
}
|
|
1635
|
-
function
|
|
1636
|
-
const r =
|
|
1640
|
+
function Qo(t, e, n) {
|
|
1641
|
+
const r = Yo(t);
|
|
1637
1642
|
return M(Un, r, vn, e, n);
|
|
1638
1643
|
}
|
|
1639
|
-
async function
|
|
1644
|
+
async function Zo(t, e) {
|
|
1640
1645
|
const n = await ft(t, Un);
|
|
1641
|
-
return
|
|
1646
|
+
return zo(n, e);
|
|
1642
1647
|
}
|
|
1643
|
-
function
|
|
1648
|
+
function qo(t) {
|
|
1644
1649
|
const e = [];
|
|
1645
1650
|
let n;
|
|
1646
1651
|
for (; (n = t.next()) !== null; )
|
|
1647
|
-
e.push(
|
|
1652
|
+
e.push(sa(n.asObject()));
|
|
1648
1653
|
return e;
|
|
1649
1654
|
}
|
|
1650
|
-
function
|
|
1655
|
+
function ea(t) {
|
|
1651
1656
|
const e = [];
|
|
1652
1657
|
let n;
|
|
1653
1658
|
for (; (n = t.next()) !== null; )
|
|
1654
1659
|
e.push(ti(n.asObject()));
|
|
1655
1660
|
return e;
|
|
1656
1661
|
}
|
|
1657
|
-
const
|
|
1658
|
-
function
|
|
1662
|
+
const ta = 1, Vn = 2994044322, Hn = 3167053791;
|
|
1663
|
+
function na(t) {
|
|
1659
1664
|
const e = {};
|
|
1660
1665
|
return $n(e), e;
|
|
1661
1666
|
}
|
|
1662
1667
|
function $n(t) {
|
|
1663
1668
|
return t.Type = "", t.Id = "", t;
|
|
1664
1669
|
}
|
|
1665
|
-
function na(t, e) {
|
|
1666
|
-
e.writeStringField(Vn, t.Id), e.writeStringField(Hn, t.Type);
|
|
1667
|
-
}
|
|
1668
1670
|
function ra(t, e) {
|
|
1669
|
-
|
|
1670
|
-
return $n(n), sa(t, n), n;
|
|
1671
|
+
e.writeStringField(Vn, t.Id), e.writeStringField(Hn, t.Type);
|
|
1671
1672
|
}
|
|
1672
1673
|
function sa(t, e) {
|
|
1674
|
+
const n = e ?? na();
|
|
1675
|
+
return $n(n), ia(t, n), n;
|
|
1676
|
+
}
|
|
1677
|
+
function ia(t, e) {
|
|
1673
1678
|
let n;
|
|
1674
1679
|
for (; (n = t.next()) !== null; )
|
|
1675
1680
|
switch (n.fieldId) {
|
|
@@ -1685,24 +1690,24 @@ function sa(t, e) {
|
|
|
1685
1690
|
}
|
|
1686
1691
|
}
|
|
1687
1692
|
}
|
|
1688
|
-
const Kn = 1,
|
|
1689
|
-
function
|
|
1693
|
+
const Kn = 1, oa = 1048630, aa = 3748161056, ca = 4289118421;
|
|
1694
|
+
function la(t) {
|
|
1690
1695
|
const e = {};
|
|
1691
|
-
return
|
|
1696
|
+
return ua(e), t && Object.assign(e, t), e;
|
|
1692
1697
|
}
|
|
1693
|
-
function
|
|
1698
|
+
function ua(t) {
|
|
1694
1699
|
return t.CallId = w.fromBytes(new Uint8Array(16)), t.InstanceId = w.fromBytes(new Uint8Array(16)), t;
|
|
1695
1700
|
}
|
|
1696
|
-
function
|
|
1701
|
+
function da(t) {
|
|
1697
1702
|
const e = new U(Kn);
|
|
1698
|
-
return
|
|
1703
|
+
return ha(t, e), e.finish();
|
|
1699
1704
|
}
|
|
1700
|
-
function
|
|
1701
|
-
e.writeGuidField(
|
|
1705
|
+
function ha(t, e) {
|
|
1706
|
+
e.writeGuidField(aa, t.CallId), e.writeGuidField(ca, t.InstanceId);
|
|
1702
1707
|
}
|
|
1703
|
-
function
|
|
1704
|
-
const r =
|
|
1705
|
-
return M(
|
|
1708
|
+
function fa(t, e, n) {
|
|
1709
|
+
const r = da(t);
|
|
1710
|
+
return M(oa, r, Kn, e, n);
|
|
1706
1711
|
}
|
|
1707
1712
|
const Yn = 1, jn = 1048631, zn = 2205234621, Xn = 2838554230, Jn = 3748161056, Qn = 4194102057, Zn = 4289118421;
|
|
1708
1713
|
function qn(t) {
|
|
@@ -1712,22 +1717,22 @@ function qn(t) {
|
|
|
1712
1717
|
function er(t) {
|
|
1713
1718
|
return t.CallId = w.fromBytes(new Uint8Array(16)), t.InstanceId = w.fromBytes(new Uint8Array(16)), t.ErrorMessage = "", t.ErrorTypeName = "", t.StackTrace = "", t;
|
|
1714
1719
|
}
|
|
1715
|
-
function
|
|
1720
|
+
function pa(t) {
|
|
1716
1721
|
const e = new U(Yn);
|
|
1717
|
-
return
|
|
1722
|
+
return ma(t, e), e.finish();
|
|
1718
1723
|
}
|
|
1719
|
-
function
|
|
1724
|
+
function ma(t, e) {
|
|
1720
1725
|
e.writeStringField(zn, t.ErrorTypeName), e.writeStringField(Xn, t.ErrorMessage), e.writeGuidField(Jn, t.CallId), e.writeStringField(Qn, t.StackTrace), e.writeGuidField(Zn, t.InstanceId);
|
|
1721
1726
|
}
|
|
1722
1727
|
function Ea(t, e) {
|
|
1723
1728
|
const n = V.create(t);
|
|
1724
|
-
return
|
|
1729
|
+
return Ia(n, e);
|
|
1725
1730
|
}
|
|
1726
|
-
function
|
|
1731
|
+
function Ia(t, e) {
|
|
1727
1732
|
const n = e ?? qn();
|
|
1728
|
-
return er(n),
|
|
1733
|
+
return er(n), _a(t, n), n;
|
|
1729
1734
|
}
|
|
1730
|
-
function
|
|
1735
|
+
function _a(t, e) {
|
|
1731
1736
|
let n;
|
|
1732
1737
|
for (; (n = t.next()) !== null; )
|
|
1733
1738
|
switch (n.fieldId) {
|
|
@@ -1758,23 +1763,23 @@ function Ia(t, e) {
|
|
|
1758
1763
|
}
|
|
1759
1764
|
}
|
|
1760
1765
|
}
|
|
1761
|
-
function
|
|
1762
|
-
const r =
|
|
1766
|
+
function Ta(t, e, n) {
|
|
1767
|
+
const r = pa(t);
|
|
1763
1768
|
return M(jn, r, Yn, e, n);
|
|
1764
1769
|
}
|
|
1765
|
-
function
|
|
1770
|
+
function wa(t, e) {
|
|
1766
1771
|
const n = le(t, jn);
|
|
1767
1772
|
return Ea(n, e);
|
|
1768
1773
|
}
|
|
1769
|
-
const St = 1,
|
|
1770
|
-
function
|
|
1774
|
+
const St = 1, Sa = 1048600, tr = 703025676, nr = 814454131, rr = 972460562, sr = 976255570, ir = 1368629611, or = 1479280922, ar = 1533537016, cr = 1909301063, lr = 2274386296, ur = 2603556958, dr = 2885165957, hr = 3568439632;
|
|
1775
|
+
function ga(t) {
|
|
1771
1776
|
const e = {};
|
|
1772
1777
|
return fr(e), e;
|
|
1773
1778
|
}
|
|
1774
1779
|
function fr(t) {
|
|
1775
1780
|
return t.FunctionId = w.fromBytes(new Uint8Array(16)), t.FunctionName = "", t.Parameters = [], t.ResultTypeName = "", t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.IsCancellable = !1, t.Description = "", t.LlmInlineResult = !1, t.LlmCallOnlyOnce = !1, t.RequiresInstance = !1, t.Versions = [], t;
|
|
1776
1781
|
}
|
|
1777
|
-
function
|
|
1782
|
+
function Ca(t) {
|
|
1778
1783
|
const e = new U(St);
|
|
1779
1784
|
return pr(t, e), e.finish();
|
|
1780
1785
|
}
|
|
@@ -1784,16 +1789,16 @@ function pr(t, e) {
|
|
|
1784
1789
|
n.writeString(r);
|
|
1785
1790
|
}), e.writeBoolField(lr, t.LlmInlineResult), e.writeBoolField(ur, t.IsEnumerable), e.writeArrayField(dr, O.Object, (n) => {
|
|
1786
1791
|
for (const r of t.Parameters)
|
|
1787
|
-
n.writeObject(
|
|
1788
|
-
|
|
1792
|
+
n.writeObject(ka, (s) => {
|
|
1793
|
+
va(r, s);
|
|
1789
1794
|
});
|
|
1790
1795
|
}), e.writeBoolField(hr, t.LlmCallOnlyOnce);
|
|
1791
1796
|
}
|
|
1792
|
-
function Ca(t, e) {
|
|
1793
|
-
const n = e ?? Sa();
|
|
1794
|
-
return fr(n), Aa(t, n), n;
|
|
1795
|
-
}
|
|
1796
1797
|
function Aa(t, e) {
|
|
1798
|
+
const n = e ?? ga();
|
|
1799
|
+
return fr(n), ya(t, n), n;
|
|
1800
|
+
}
|
|
1801
|
+
function ya(t, e) {
|
|
1797
1802
|
let n;
|
|
1798
1803
|
for (; (n = t.next()) !== null; )
|
|
1799
1804
|
switch (n.fieldId) {
|
|
@@ -1849,7 +1854,7 @@ function Aa(t, e) {
|
|
|
1849
1854
|
}
|
|
1850
1855
|
case dr: {
|
|
1851
1856
|
if (n.isNull) throw new Error();
|
|
1852
|
-
e.Parameters =
|
|
1857
|
+
e.Parameters = Na(n.asArray());
|
|
1853
1858
|
break;
|
|
1854
1859
|
}
|
|
1855
1860
|
case hr: {
|
|
@@ -1859,9 +1864,9 @@ function Aa(t, e) {
|
|
|
1859
1864
|
}
|
|
1860
1865
|
}
|
|
1861
1866
|
}
|
|
1862
|
-
function
|
|
1863
|
-
const r =
|
|
1864
|
-
return M(
|
|
1867
|
+
function ba(t, e, n) {
|
|
1868
|
+
const r = Ca(t);
|
|
1869
|
+
return M(Sa, r, St, e, n);
|
|
1865
1870
|
}
|
|
1866
1871
|
function Ra(t) {
|
|
1867
1872
|
const e = [];
|
|
@@ -1870,38 +1875,38 @@ function Ra(t) {
|
|
|
1870
1875
|
e.push(n.asString());
|
|
1871
1876
|
return e;
|
|
1872
1877
|
}
|
|
1873
|
-
function
|
|
1878
|
+
function Na(t) {
|
|
1874
1879
|
const e = [];
|
|
1875
1880
|
let n;
|
|
1876
1881
|
for (; (n = t.next()) !== null; )
|
|
1877
|
-
e.push(
|
|
1882
|
+
e.push(Ua(n.asObject()));
|
|
1878
1883
|
return e;
|
|
1879
1884
|
}
|
|
1880
|
-
const
|
|
1881
|
-
function
|
|
1885
|
+
const ka = 1, mr = 607861992, Er = 894485888, Ir = 972460562, _r = 1368629611, Tr = 1883521406, wr = 2603556958, Sr = 3609695522, gr = 4075263697, Cr = 4257460908;
|
|
1886
|
+
function Da(t) {
|
|
1882
1887
|
const e = {};
|
|
1883
1888
|
return Ar(e), e;
|
|
1884
1889
|
}
|
|
1885
1890
|
function Ar(t) {
|
|
1886
1891
|
return t.ParameterIndex = 0, t.ParameterName = "", t.TypeName = "", t.HasDefaultValue = !1, t.DefaultValueJson = "", t.DefaultValueData = new Uint8Array(0), t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.Description = "", t;
|
|
1887
1892
|
}
|
|
1888
|
-
function Da(t, e) {
|
|
1889
|
-
e.writeBoolField(Er, t.HasDefaultValue), e.writeStringField(mr, t.DefaultValueJson), e.writeStringField(Ir, t.EnumerableItemTypeName), e.writeStringField(_r, t.Description), e.writeBinaryField(Tr, t.DefaultValueData), e.writeBoolField(wr, t.IsEnumerable), e.writeStringField(Sr, t.TypeName), e.writeStringField(gr, t.ParameterName), e.writeInt32Field(Cr, t.ParameterIndex | 0);
|
|
1890
|
-
}
|
|
1891
1893
|
function va(t, e) {
|
|
1892
|
-
|
|
1893
|
-
return Ar(n), Ua(t, n), n;
|
|
1894
|
+
e.writeBoolField(mr, t.HasDefaultValue), e.writeStringField(Er, t.DefaultValueJson), e.writeStringField(Ir, t.EnumerableItemTypeName), e.writeStringField(_r, t.Description), e.writeBinaryField(Tr, t.DefaultValueData), e.writeBoolField(wr, t.IsEnumerable), e.writeStringField(Sr, t.TypeName), e.writeStringField(gr, t.ParameterName), e.writeInt32Field(Cr, t.ParameterIndex | 0);
|
|
1894
1895
|
}
|
|
1895
1896
|
function Ua(t, e) {
|
|
1897
|
+
const n = e ?? Da();
|
|
1898
|
+
return Ar(n), Oa(t, n), n;
|
|
1899
|
+
}
|
|
1900
|
+
function Oa(t, e) {
|
|
1896
1901
|
let n;
|
|
1897
1902
|
for (; (n = t.next()) !== null; )
|
|
1898
1903
|
switch (n.fieldId) {
|
|
1899
|
-
case
|
|
1904
|
+
case mr: {
|
|
1900
1905
|
if (n.isNull) throw new Error();
|
|
1901
1906
|
e.HasDefaultValue = n.asBool();
|
|
1902
1907
|
break;
|
|
1903
1908
|
}
|
|
1904
|
-
case
|
|
1909
|
+
case Er: {
|
|
1905
1910
|
if (n.isNull) throw new Error();
|
|
1906
1911
|
e.DefaultValueJson = n.asString();
|
|
1907
1912
|
break;
|
|
@@ -1943,31 +1948,31 @@ function Ua(t, e) {
|
|
|
1943
1948
|
}
|
|
1944
1949
|
}
|
|
1945
1950
|
}
|
|
1946
|
-
const yr = 1,
|
|
1947
|
-
function
|
|
1951
|
+
const yr = 1, Ma = 1048638, Pa = 3678477544;
|
|
1952
|
+
function La(t) {
|
|
1948
1953
|
const e = {};
|
|
1949
|
-
return
|
|
1954
|
+
return Fa(e), t && Object.assign(e, t), e;
|
|
1950
1955
|
}
|
|
1951
|
-
function
|
|
1956
|
+
function Fa(t) {
|
|
1952
1957
|
return t.Functions = [], t;
|
|
1953
1958
|
}
|
|
1954
|
-
function
|
|
1959
|
+
function Ba(t) {
|
|
1955
1960
|
const e = new U(yr);
|
|
1956
|
-
return
|
|
1961
|
+
return xa(t, e), e.finish();
|
|
1957
1962
|
}
|
|
1958
|
-
function
|
|
1959
|
-
e.writeArrayField(
|
|
1963
|
+
function xa(t, e) {
|
|
1964
|
+
e.writeArrayField(Pa, O.Object, (n) => {
|
|
1960
1965
|
for (const r of t.Functions)
|
|
1961
1966
|
n.writeObject(St, (s) => {
|
|
1962
1967
|
pr(r, s);
|
|
1963
1968
|
});
|
|
1964
1969
|
});
|
|
1965
1970
|
}
|
|
1966
|
-
function
|
|
1967
|
-
const r =
|
|
1968
|
-
return M(
|
|
1971
|
+
function Wa(t, e, n) {
|
|
1972
|
+
const r = Ba(t);
|
|
1973
|
+
return M(Ma, r, yr, e, n);
|
|
1969
1974
|
}
|
|
1970
|
-
const
|
|
1975
|
+
const br = 1, Rr = 1048602, Nr = 349453957, kr = 703025676, Dr = 3403385840, vr = 3748161056, Ur = 4289118421;
|
|
1971
1976
|
function Or(t) {
|
|
1972
1977
|
const e = {};
|
|
1973
1978
|
return Mr(e), t && Object.assign(e, t), e;
|
|
@@ -1975,22 +1980,22 @@ function Or(t) {
|
|
|
1975
1980
|
function Mr(t) {
|
|
1976
1981
|
return t.CallId = w.fromBytes(new Uint8Array(16)), t.InstanceId = w.fromBytes(new Uint8Array(16)), t.ResultTypeName = "", t.ResultJson = "", t.ResultData = new Uint8Array(0), t;
|
|
1977
1982
|
}
|
|
1978
|
-
function
|
|
1979
|
-
const e = new U(
|
|
1980
|
-
return
|
|
1983
|
+
function Ga(t) {
|
|
1984
|
+
const e = new U(br);
|
|
1985
|
+
return Va(t, e), e.finish();
|
|
1981
1986
|
}
|
|
1982
|
-
function
|
|
1987
|
+
function Va(t, e) {
|
|
1983
1988
|
e.writeBinaryField(Nr, t.ResultData), e.writeStringField(kr, t.ResultTypeName), e.writeStringField(Dr, t.ResultJson), e.writeGuidField(vr, t.CallId), e.writeGuidField(Ur, t.InstanceId);
|
|
1984
1989
|
}
|
|
1985
|
-
function
|
|
1990
|
+
function Ha(t, e) {
|
|
1986
1991
|
const n = V.create(t);
|
|
1987
|
-
return
|
|
1992
|
+
return $a(n, e);
|
|
1988
1993
|
}
|
|
1989
|
-
function
|
|
1994
|
+
function $a(t, e) {
|
|
1990
1995
|
const n = e ?? Or();
|
|
1991
|
-
return Mr(n),
|
|
1996
|
+
return Mr(n), Ka(t, n), n;
|
|
1992
1997
|
}
|
|
1993
|
-
function
|
|
1998
|
+
function Ka(t, e) {
|
|
1994
1999
|
let n;
|
|
1995
2000
|
for (; (n = t.next()) !== null; )
|
|
1996
2001
|
switch (n.fieldId) {
|
|
@@ -2021,26 +2026,26 @@ function $a(t, e) {
|
|
|
2021
2026
|
}
|
|
2022
2027
|
}
|
|
2023
2028
|
}
|
|
2024
|
-
function
|
|
2025
|
-
const r =
|
|
2026
|
-
return M(
|
|
2029
|
+
function Ya(t, e, n) {
|
|
2030
|
+
const r = Ga(t);
|
|
2031
|
+
return M(Rr, r, br, e, n);
|
|
2027
2032
|
}
|
|
2028
|
-
function
|
|
2029
|
-
const n = le(t,
|
|
2030
|
-
return
|
|
2033
|
+
function ja(t, e) {
|
|
2034
|
+
const n = le(t, Rr);
|
|
2035
|
+
return Ha(n, e);
|
|
2031
2036
|
}
|
|
2032
|
-
const Pr = 1,
|
|
2037
|
+
const Pr = 1, za = 65549;
|
|
2033
2038
|
function Ft(t) {
|
|
2034
2039
|
return {};
|
|
2035
2040
|
}
|
|
2036
|
-
function
|
|
2041
|
+
function Xa(t) {
|
|
2037
2042
|
return new U(Pr).finish();
|
|
2038
2043
|
}
|
|
2039
2044
|
function Bt(t, e, n) {
|
|
2040
|
-
const r =
|
|
2041
|
-
return M(
|
|
2045
|
+
const r = Xa();
|
|
2046
|
+
return M(za, r, Pr, e, n);
|
|
2042
2047
|
}
|
|
2043
|
-
const
|
|
2048
|
+
const Ja = 3167053791, Qa = 3342364356, Za = 3612929027;
|
|
2044
2049
|
function Lr(t) {
|
|
2045
2050
|
const e = {};
|
|
2046
2051
|
return Fr(e), e;
|
|
@@ -2048,39 +2053,39 @@ function Lr(t) {
|
|
|
2048
2053
|
function Fr(t) {
|
|
2049
2054
|
return t.Category = "", t.Type = un.Face, t.FaceBlendshapes = [], t;
|
|
2050
2055
|
}
|
|
2051
|
-
function
|
|
2056
|
+
function qa(t, e) {
|
|
2052
2057
|
const n = e ?? Lr();
|
|
2053
|
-
return Fr(n),
|
|
2058
|
+
return Fr(n), ec(t, n), n;
|
|
2054
2059
|
}
|
|
2055
|
-
function
|
|
2060
|
+
function ec(t, e) {
|
|
2056
2061
|
let n;
|
|
2057
2062
|
for (; (n = t.next()) !== null; )
|
|
2058
2063
|
switch (n.fieldId) {
|
|
2059
|
-
case
|
|
2064
|
+
case Ja: {
|
|
2060
2065
|
if (n.isNull) throw new Error();
|
|
2061
2066
|
e.Type = n.asInt32();
|
|
2062
2067
|
break;
|
|
2063
2068
|
}
|
|
2064
|
-
case
|
|
2069
|
+
case Qa: {
|
|
2065
2070
|
if (n.isNull) throw new Error();
|
|
2066
|
-
e.FaceBlendshapes =
|
|
2071
|
+
e.FaceBlendshapes = tc(n.asArray());
|
|
2067
2072
|
break;
|
|
2068
2073
|
}
|
|
2069
|
-
case
|
|
2074
|
+
case Za: {
|
|
2070
2075
|
if (n.isNull) throw new Error();
|
|
2071
2076
|
e.Category = n.asString();
|
|
2072
2077
|
break;
|
|
2073
2078
|
}
|
|
2074
2079
|
}
|
|
2075
2080
|
}
|
|
2076
|
-
function
|
|
2081
|
+
function tc(t) {
|
|
2077
2082
|
const e = [];
|
|
2078
2083
|
let n;
|
|
2079
2084
|
for (; (n = t.next()) !== null; )
|
|
2080
2085
|
e.push(n.asString());
|
|
2081
2086
|
return e;
|
|
2082
2087
|
}
|
|
2083
|
-
const
|
|
2088
|
+
const nc = 3612929027;
|
|
2084
2089
|
function Br(t) {
|
|
2085
2090
|
const e = {};
|
|
2086
2091
|
return xr(e), e;
|
|
@@ -2088,22 +2093,22 @@ function Br(t) {
|
|
|
2088
2093
|
function xr(t) {
|
|
2089
2094
|
return t.Category = "", t;
|
|
2090
2095
|
}
|
|
2091
|
-
function
|
|
2096
|
+
function rc(t, e) {
|
|
2092
2097
|
const n = e ?? Br();
|
|
2093
|
-
return xr(n),
|
|
2098
|
+
return xr(n), sc(t, n), n;
|
|
2094
2099
|
}
|
|
2095
|
-
function
|
|
2100
|
+
function sc(t, e) {
|
|
2096
2101
|
let n;
|
|
2097
2102
|
for (; (n = t.next()) !== null; )
|
|
2098
2103
|
switch (n.fieldId) {
|
|
2099
|
-
case
|
|
2104
|
+
case nc: {
|
|
2100
2105
|
if (n.isNull) throw new Error();
|
|
2101
2106
|
e.Category = n.asString();
|
|
2102
2107
|
break;
|
|
2103
2108
|
}
|
|
2104
2109
|
}
|
|
2105
2110
|
}
|
|
2106
|
-
const
|
|
2111
|
+
const ic = 161083277, oc = 164808083, ac = 1368629611, cc = 2745379226, lc = 2950031986, uc = 3282782683, dc = 3284746250, hc = 4065070594;
|
|
2107
2112
|
function Wr(t) {
|
|
2108
2113
|
const e = {};
|
|
2109
2114
|
return Gr(e), e;
|
|
@@ -2111,73 +2116,73 @@ function Wr(t) {
|
|
|
2111
2116
|
function Gr(t) {
|
|
2112
2117
|
return t.StreamId = "", t.Description = "", t.SourceType = "", t.Codec = dn.H264, t.CodecDetails = "", t.Width = 0, t.Height = 0, t.Framerate = 30, t;
|
|
2113
2118
|
}
|
|
2114
|
-
function
|
|
2119
|
+
function fc(t, e) {
|
|
2115
2120
|
const n = e ?? Wr();
|
|
2116
|
-
return Gr(n),
|
|
2121
|
+
return Gr(n), pc(t, n), n;
|
|
2117
2122
|
}
|
|
2118
|
-
function
|
|
2123
|
+
function pc(t, e) {
|
|
2119
2124
|
let n;
|
|
2120
2125
|
for (; (n = t.next()) !== null; )
|
|
2121
2126
|
switch (n.fieldId) {
|
|
2122
|
-
case
|
|
2127
|
+
case ic: {
|
|
2123
2128
|
if (n.isNull) throw new Error();
|
|
2124
2129
|
e.StreamId = n.asString();
|
|
2125
2130
|
break;
|
|
2126
2131
|
}
|
|
2127
|
-
case
|
|
2132
|
+
case oc: {
|
|
2128
2133
|
if (n.isNull) throw new Error();
|
|
2129
2134
|
e.Framerate = n.asFloat64();
|
|
2130
2135
|
break;
|
|
2131
2136
|
}
|
|
2132
|
-
case
|
|
2137
|
+
case ac: {
|
|
2133
2138
|
if (n.isNull) throw new Error();
|
|
2134
2139
|
e.Description = n.asString();
|
|
2135
2140
|
break;
|
|
2136
2141
|
}
|
|
2137
|
-
case
|
|
2142
|
+
case cc: {
|
|
2138
2143
|
if (n.isNull) throw new Error();
|
|
2139
2144
|
e.CodecDetails = n.asString();
|
|
2140
2145
|
break;
|
|
2141
2146
|
}
|
|
2142
|
-
case
|
|
2147
|
+
case lc: {
|
|
2143
2148
|
if (n.isNull) throw new Error();
|
|
2144
2149
|
e.Height = n.asInt32();
|
|
2145
2150
|
break;
|
|
2146
2151
|
}
|
|
2147
|
-
case
|
|
2152
|
+
case uc: {
|
|
2148
2153
|
if (n.isNull) throw new Error();
|
|
2149
2154
|
e.SourceType = n.asString();
|
|
2150
2155
|
break;
|
|
2151
2156
|
}
|
|
2152
|
-
case
|
|
2157
|
+
case dc: {
|
|
2153
2158
|
if (n.isNull) throw new Error();
|
|
2154
2159
|
e.Codec = n.asInt32();
|
|
2155
2160
|
break;
|
|
2156
2161
|
}
|
|
2157
|
-
case
|
|
2162
|
+
case hc: {
|
|
2158
2163
|
if (n.isNull) throw new Error();
|
|
2159
2164
|
e.Width = n.asInt32();
|
|
2160
2165
|
break;
|
|
2161
2166
|
}
|
|
2162
2167
|
}
|
|
2163
2168
|
}
|
|
2164
|
-
const
|
|
2165
|
-
function
|
|
2169
|
+
const mc = 65539, Ec = 693643444, Ic = 1144553441, _c = 1497620243, Tc = 1559330978, wc = 1976546434, Sc = 1999510636, gc = 2271236852, Cc = 2277643855, Ac = 2469008121, yc = 3042922213, bc = 3064612128, Rc = 3219210453, Nc = 3504054055, kc = 3678477544, Dc = 3696445035, vc = 3707543140, Uc = 3712281496, Oc = 3895362455, Mc = 3897397815, Pc = 4225107827;
|
|
2170
|
+
function Lc(t) {
|
|
2166
2171
|
const e = {};
|
|
2167
2172
|
return Vr(e), e;
|
|
2168
2173
|
}
|
|
2169
2174
|
function Vr(t) {
|
|
2170
2175
|
return t.Clients = /* @__PURE__ */ Object.create(null), t.Functions = /* @__PURE__ */ Object.create(null), t.UIStreams = /* @__PURE__ */ Object.create(null), t.AudioStreams = /* @__PURE__ */ Object.create(null), t.VideoStreams = /* @__PURE__ */ Object.create(null), t.TrackingStreams = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.SessionId = "", t.ChannelUrl = "", t.SessionChannelUrl = "", t.FirstUserId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.ServerRunType = hn.Local, t.AppSourceType = fn.Bundle, t.PublicAccess = !1, t.DebugMode = !1, t;
|
|
2171
2176
|
}
|
|
2172
|
-
function Lc(t, e) {
|
|
2173
|
-
const n = V.create(t);
|
|
2174
|
-
return Fc(n, e);
|
|
2175
|
-
}
|
|
2176
2177
|
function Fc(t, e) {
|
|
2177
|
-
const n =
|
|
2178
|
-
return
|
|
2178
|
+
const n = V.create(t);
|
|
2179
|
+
return Bc(n, e);
|
|
2179
2180
|
}
|
|
2180
2181
|
function Bc(t, e) {
|
|
2182
|
+
const n = e ?? Lc();
|
|
2183
|
+
return Vr(n), xc(t, n), n;
|
|
2184
|
+
}
|
|
2185
|
+
function xc(t, e) {
|
|
2181
2186
|
let n;
|
|
2182
2187
|
for (; (n = t.next()) !== null; )
|
|
2183
2188
|
switch (n.fieldId) {
|
|
@@ -2186,52 +2191,52 @@ function Bc(t, e) {
|
|
|
2186
2191
|
e.FirstUserId = n.asString();
|
|
2187
2192
|
break;
|
|
2188
2193
|
}
|
|
2189
|
-
case
|
|
2194
|
+
case Ic: {
|
|
2190
2195
|
if (n.isNull) throw new Error();
|
|
2191
|
-
e.Clients =
|
|
2196
|
+
e.Clients = Gc(n.asDictionary());
|
|
2192
2197
|
break;
|
|
2193
2198
|
}
|
|
2194
|
-
case
|
|
2199
|
+
case _c: {
|
|
2195
2200
|
if (n.isNull) throw new Error();
|
|
2196
|
-
e.TrackingStreams =
|
|
2201
|
+
e.TrackingStreams = Vc(n.asDictionary());
|
|
2197
2202
|
break;
|
|
2198
2203
|
}
|
|
2199
|
-
case
|
|
2204
|
+
case Tc: {
|
|
2200
2205
|
if (n.isNull) throw new Error();
|
|
2201
2206
|
e.ChannelId = n.asString();
|
|
2202
2207
|
break;
|
|
2203
2208
|
}
|
|
2204
|
-
case
|
|
2209
|
+
case wc: {
|
|
2205
2210
|
if (n.isNull) throw new Error();
|
|
2206
2211
|
e.AppSourceType = n.asInt32();
|
|
2207
2212
|
break;
|
|
2208
2213
|
}
|
|
2209
|
-
case
|
|
2214
|
+
case Sc: {
|
|
2210
2215
|
if (n.isNull) throw new Error();
|
|
2211
2216
|
e.SessionId = n.asString();
|
|
2212
2217
|
break;
|
|
2213
2218
|
}
|
|
2214
|
-
case
|
|
2219
|
+
case gc: {
|
|
2215
2220
|
if (n.isNull) throw new Error();
|
|
2216
2221
|
e.SessionChannelUrl = n.asString();
|
|
2217
2222
|
break;
|
|
2218
2223
|
}
|
|
2219
|
-
case
|
|
2224
|
+
case Cc: {
|
|
2220
2225
|
if (n.isNull) throw new Error();
|
|
2221
2226
|
e.ChannelUrl = n.asString();
|
|
2222
2227
|
break;
|
|
2223
2228
|
}
|
|
2224
|
-
case
|
|
2229
|
+
case Ac: {
|
|
2225
2230
|
if (n.isNull) throw new Error();
|
|
2226
2231
|
e.ChannelName = n.asString();
|
|
2227
2232
|
break;
|
|
2228
2233
|
}
|
|
2229
|
-
case
|
|
2234
|
+
case yc: {
|
|
2230
2235
|
if (n.isNull) throw new Error();
|
|
2231
2236
|
e.PublicAccess = n.asBool();
|
|
2232
2237
|
break;
|
|
2233
2238
|
}
|
|
2234
|
-
case
|
|
2239
|
+
case bc: {
|
|
2235
2240
|
if (n.isNull) throw new Error();
|
|
2236
2241
|
e.ServerRunType = n.asInt32();
|
|
2237
2242
|
break;
|
|
@@ -2241,53 +2246,53 @@ function Bc(t, e) {
|
|
|
2241
2246
|
e.OrganisationName = n.asString();
|
|
2242
2247
|
break;
|
|
2243
2248
|
}
|
|
2244
|
-
case bc: {
|
|
2245
|
-
if (n.isNull) throw new Error();
|
|
2246
|
-
e.DebugMode = n.asBool();
|
|
2247
|
-
break;
|
|
2248
|
-
}
|
|
2249
2249
|
case Nc: {
|
|
2250
2250
|
if (n.isNull) throw new Error();
|
|
2251
|
-
e.
|
|
2251
|
+
e.DebugMode = n.asBool();
|
|
2252
2252
|
break;
|
|
2253
2253
|
}
|
|
2254
2254
|
case kc: {
|
|
2255
2255
|
if (n.isNull) throw new Error();
|
|
2256
|
-
e.
|
|
2256
|
+
e.Functions = Hc(n.asDictionary());
|
|
2257
2257
|
break;
|
|
2258
2258
|
}
|
|
2259
2259
|
case Dc: {
|
|
2260
2260
|
if (n.isNull) throw new Error();
|
|
2261
|
-
e.
|
|
2261
|
+
e.UIStreams = $c(n.asDictionary());
|
|
2262
2262
|
break;
|
|
2263
2263
|
}
|
|
2264
2264
|
case vc: {
|
|
2265
2265
|
if (n.isNull) throw new Error();
|
|
2266
|
-
e.
|
|
2266
|
+
e.SpaceId = n.asString();
|
|
2267
2267
|
break;
|
|
2268
2268
|
}
|
|
2269
2269
|
case Uc: {
|
|
2270
2270
|
if (n.isNull) throw new Error();
|
|
2271
|
-
e.
|
|
2271
|
+
e.PrimaryUserId = n.asString();
|
|
2272
2272
|
break;
|
|
2273
2273
|
}
|
|
2274
2274
|
case Oc: {
|
|
2275
2275
|
if (n.isNull) throw new Error();
|
|
2276
|
-
e.
|
|
2276
|
+
e.AudioStreams = Kc(n.asDictionary());
|
|
2277
2277
|
break;
|
|
2278
2278
|
}
|
|
2279
2279
|
case Mc: {
|
|
2280
|
+
if (n.isNull) throw new Error();
|
|
2281
|
+
e.VideoStreams = Yc(n.asDictionary());
|
|
2282
|
+
break;
|
|
2283
|
+
}
|
|
2284
|
+
case Pc: {
|
|
2280
2285
|
if (n.isNull) throw new Error();
|
|
2281
2286
|
e.SpaceName = n.asString();
|
|
2282
2287
|
break;
|
|
2283
2288
|
}
|
|
2284
2289
|
}
|
|
2285
2290
|
}
|
|
2286
|
-
async function
|
|
2287
|
-
const n = await ft(t,
|
|
2288
|
-
return
|
|
2291
|
+
async function Wc(t, e) {
|
|
2292
|
+
const n = await ft(t, mc);
|
|
2293
|
+
return Fc(n, e);
|
|
2289
2294
|
}
|
|
2290
|
-
function
|
|
2295
|
+
function Gc(t) {
|
|
2291
2296
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2292
2297
|
let n;
|
|
2293
2298
|
for (; (n = t.next()) !== null; ) {
|
|
@@ -2296,189 +2301,189 @@ function Wc(t) {
|
|
|
2296
2301
|
}
|
|
2297
2302
|
return e;
|
|
2298
2303
|
}
|
|
2299
|
-
function
|
|
2304
|
+
function Vc(t) {
|
|
2300
2305
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2301
2306
|
let n;
|
|
2302
2307
|
for (; (n = t.next()) !== null; ) {
|
|
2303
2308
|
const r = n.key.asString();
|
|
2304
|
-
e[r] =
|
|
2309
|
+
e[r] = wl(n.value.asObject());
|
|
2305
2310
|
}
|
|
2306
2311
|
return e;
|
|
2307
2312
|
}
|
|
2308
|
-
function
|
|
2313
|
+
function Hc(t) {
|
|
2309
2314
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2310
2315
|
let n;
|
|
2311
2316
|
for (; (n = t.next()) !== null; ) {
|
|
2312
2317
|
const r = n.key.asInt32();
|
|
2313
|
-
e[r] =
|
|
2318
|
+
e[r] = jc(n.value.asArray());
|
|
2314
2319
|
}
|
|
2315
2320
|
return e;
|
|
2316
2321
|
}
|
|
2317
|
-
function
|
|
2322
|
+
function $c(t) {
|
|
2318
2323
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2319
2324
|
let n;
|
|
2320
2325
|
for (; (n = t.next()) !== null; ) {
|
|
2321
2326
|
const r = n.key.asString();
|
|
2322
|
-
e[r] =
|
|
2327
|
+
e[r] = qc(n.value.asObject());
|
|
2323
2328
|
}
|
|
2324
2329
|
return e;
|
|
2325
2330
|
}
|
|
2326
|
-
function
|
|
2331
|
+
function Kc(t) {
|
|
2327
2332
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2328
2333
|
let n;
|
|
2329
2334
|
for (; (n = t.next()) !== null; ) {
|
|
2330
2335
|
const r = n.key.asString();
|
|
2331
|
-
e[r] =
|
|
2336
|
+
e[r] = ol(n.value.asObject());
|
|
2332
2337
|
}
|
|
2333
2338
|
return e;
|
|
2334
2339
|
}
|
|
2335
|
-
function
|
|
2340
|
+
function Yc(t) {
|
|
2336
2341
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2337
2342
|
let n;
|
|
2338
2343
|
for (; (n = t.next()) !== null; ) {
|
|
2339
2344
|
const r = n.key.asString();
|
|
2340
|
-
e[r] =
|
|
2345
|
+
e[r] = fl(n.value.asObject());
|
|
2341
2346
|
}
|
|
2342
2347
|
return e;
|
|
2343
2348
|
}
|
|
2344
|
-
function
|
|
2349
|
+
function jc(t) {
|
|
2345
2350
|
const e = [];
|
|
2346
2351
|
let n;
|
|
2347
2352
|
for (; (n = t.next()) !== null; )
|
|
2348
|
-
e.push(
|
|
2353
|
+
e.push(Aa(n.asObject()));
|
|
2349
2354
|
return e;
|
|
2350
2355
|
}
|
|
2351
|
-
const
|
|
2352
|
-
function
|
|
2356
|
+
const zc = 161083277, Xc = 325678206, Jc = 3469892363, Qc = 3645544153;
|
|
2357
|
+
function Zc(t) {
|
|
2353
2358
|
const e = {};
|
|
2354
2359
|
return Hr(e), e;
|
|
2355
2360
|
}
|
|
2356
2361
|
function Hr(t) {
|
|
2357
2362
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Br(), t;
|
|
2358
2363
|
}
|
|
2359
|
-
function Zc(t, e) {
|
|
2360
|
-
const n = e ?? Qc();
|
|
2361
|
-
return Hr(n), qc(t, n), n;
|
|
2362
|
-
}
|
|
2363
2364
|
function qc(t, e) {
|
|
2365
|
+
const n = e ?? Zc();
|
|
2366
|
+
return Hr(n), el(t, n), n;
|
|
2367
|
+
}
|
|
2368
|
+
function el(t, e) {
|
|
2364
2369
|
let n;
|
|
2365
2370
|
for (; (n = t.next()) !== null; )
|
|
2366
2371
|
switch (n.fieldId) {
|
|
2367
|
-
case
|
|
2372
|
+
case zc: {
|
|
2368
2373
|
if (n.isNull) throw new Error();
|
|
2369
2374
|
e.StreamId = n.asString();
|
|
2370
2375
|
break;
|
|
2371
2376
|
}
|
|
2372
|
-
case
|
|
2377
|
+
case Xc: {
|
|
2373
2378
|
if (n.isNull) throw new Error();
|
|
2374
2379
|
e.ClientSessionId = n.asInt32();
|
|
2375
2380
|
break;
|
|
2376
2381
|
}
|
|
2377
|
-
case
|
|
2382
|
+
case Jc: {
|
|
2378
2383
|
if (n.isNull) throw new Error();
|
|
2379
2384
|
e.TrackId = n.asInt32();
|
|
2380
2385
|
break;
|
|
2381
2386
|
}
|
|
2382
|
-
case
|
|
2387
|
+
case Qc: {
|
|
2383
2388
|
if (n.isNull) throw new Error();
|
|
2384
|
-
e.Info =
|
|
2389
|
+
e.Info = rc(n.asObject());
|
|
2385
2390
|
break;
|
|
2386
2391
|
}
|
|
2387
2392
|
}
|
|
2388
2393
|
}
|
|
2389
|
-
const
|
|
2390
|
-
function
|
|
2394
|
+
const tl = 161083277, nl = 325678206, rl = 3469892363, sl = 3645544153;
|
|
2395
|
+
function il(t) {
|
|
2391
2396
|
const e = {};
|
|
2392
2397
|
return $r(e), e;
|
|
2393
2398
|
}
|
|
2394
2399
|
function $r(t) {
|
|
2395
2400
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = An(), t;
|
|
2396
2401
|
}
|
|
2397
|
-
function il(t, e) {
|
|
2398
|
-
const n = e ?? sl();
|
|
2399
|
-
return $r(n), ol(t, n), n;
|
|
2400
|
-
}
|
|
2401
2402
|
function ol(t, e) {
|
|
2403
|
+
const n = e ?? il();
|
|
2404
|
+
return $r(n), al(t, n), n;
|
|
2405
|
+
}
|
|
2406
|
+
function al(t, e) {
|
|
2402
2407
|
let n;
|
|
2403
2408
|
for (; (n = t.next()) !== null; )
|
|
2404
2409
|
switch (n.fieldId) {
|
|
2405
|
-
case
|
|
2410
|
+
case tl: {
|
|
2406
2411
|
if (n.isNull) throw new Error();
|
|
2407
2412
|
e.StreamId = n.asString();
|
|
2408
2413
|
break;
|
|
2409
2414
|
}
|
|
2410
|
-
case
|
|
2415
|
+
case nl: {
|
|
2411
2416
|
if (n.isNull) throw new Error();
|
|
2412
2417
|
e.ClientSessionId = n.asInt32();
|
|
2413
2418
|
break;
|
|
2414
2419
|
}
|
|
2415
|
-
case
|
|
2420
|
+
case rl: {
|
|
2416
2421
|
if (n.isNull) throw new Error();
|
|
2417
2422
|
e.TrackId = n.asInt32();
|
|
2418
2423
|
break;
|
|
2419
2424
|
}
|
|
2420
|
-
case
|
|
2425
|
+
case sl: {
|
|
2421
2426
|
if (n.isNull) throw new Error();
|
|
2422
2427
|
e.Info = _i(n.asObject());
|
|
2423
2428
|
break;
|
|
2424
2429
|
}
|
|
2425
2430
|
}
|
|
2426
2431
|
}
|
|
2427
|
-
const
|
|
2428
|
-
function
|
|
2432
|
+
const cl = 161083277, ll = 325678206, ul = 3469892363, dl = 3645544153;
|
|
2433
|
+
function hl(t) {
|
|
2429
2434
|
const e = {};
|
|
2430
2435
|
return Kr(e), e;
|
|
2431
2436
|
}
|
|
2432
2437
|
function Kr(t) {
|
|
2433
2438
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Wr(), t;
|
|
2434
2439
|
}
|
|
2435
|
-
function hl(t, e) {
|
|
2436
|
-
const n = e ?? dl();
|
|
2437
|
-
return Kr(n), fl(t, n), n;
|
|
2438
|
-
}
|
|
2439
2440
|
function fl(t, e) {
|
|
2441
|
+
const n = e ?? hl();
|
|
2442
|
+
return Kr(n), pl(t, n), n;
|
|
2443
|
+
}
|
|
2444
|
+
function pl(t, e) {
|
|
2440
2445
|
let n;
|
|
2441
2446
|
for (; (n = t.next()) !== null; )
|
|
2442
2447
|
switch (n.fieldId) {
|
|
2443
|
-
case
|
|
2448
|
+
case cl: {
|
|
2444
2449
|
if (n.isNull) throw new Error();
|
|
2445
2450
|
e.StreamId = n.asString();
|
|
2446
2451
|
break;
|
|
2447
2452
|
}
|
|
2448
|
-
case
|
|
2453
|
+
case ll: {
|
|
2449
2454
|
if (n.isNull) throw new Error();
|
|
2450
2455
|
e.ClientSessionId = n.asInt32();
|
|
2451
2456
|
break;
|
|
2452
2457
|
}
|
|
2453
|
-
case
|
|
2458
|
+
case ul: {
|
|
2454
2459
|
if (n.isNull) throw new Error();
|
|
2455
2460
|
e.TrackId = n.asInt32();
|
|
2456
2461
|
break;
|
|
2457
2462
|
}
|
|
2458
|
-
case
|
|
2463
|
+
case dl: {
|
|
2459
2464
|
if (n.isNull) throw new Error();
|
|
2460
|
-
e.Info =
|
|
2465
|
+
e.Info = fc(n.asObject());
|
|
2461
2466
|
break;
|
|
2462
2467
|
}
|
|
2463
2468
|
}
|
|
2464
2469
|
}
|
|
2465
|
-
const
|
|
2466
|
-
function
|
|
2470
|
+
const ml = 161083277, El = 325678206, Il = 3469892363, _l = 3645544153;
|
|
2471
|
+
function Tl(t) {
|
|
2467
2472
|
const e = {};
|
|
2468
2473
|
return Yr(e), e;
|
|
2469
2474
|
}
|
|
2470
2475
|
function Yr(t) {
|
|
2471
2476
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Lr(), t;
|
|
2472
2477
|
}
|
|
2473
|
-
function Tl(t, e) {
|
|
2474
|
-
const n = e ?? _l();
|
|
2475
|
-
return Yr(n), wl(t, n), n;
|
|
2476
|
-
}
|
|
2477
2478
|
function wl(t, e) {
|
|
2479
|
+
const n = e ?? Tl();
|
|
2480
|
+
return Yr(n), Sl(t, n), n;
|
|
2481
|
+
}
|
|
2482
|
+
function Sl(t, e) {
|
|
2478
2483
|
let n;
|
|
2479
2484
|
for (; (n = t.next()) !== null; )
|
|
2480
2485
|
switch (n.fieldId) {
|
|
2481
|
-
case
|
|
2486
|
+
case ml: {
|
|
2482
2487
|
if (n.isNull) throw new Error();
|
|
2483
2488
|
e.StreamId = n.asString();
|
|
2484
2489
|
break;
|
|
@@ -2488,108 +2493,108 @@ function wl(t, e) {
|
|
|
2488
2493
|
e.ClientSessionId = n.asInt32();
|
|
2489
2494
|
break;
|
|
2490
2495
|
}
|
|
2491
|
-
case
|
|
2496
|
+
case Il: {
|
|
2492
2497
|
if (n.isNull) throw new Error();
|
|
2493
2498
|
e.TrackId = n.asInt32();
|
|
2494
2499
|
break;
|
|
2495
2500
|
}
|
|
2496
|
-
case
|
|
2501
|
+
case _l: {
|
|
2497
2502
|
if (n.isNull) throw new Error();
|
|
2498
|
-
e.Info =
|
|
2503
|
+
e.Info = qa(n.asObject());
|
|
2499
2504
|
break;
|
|
2500
2505
|
}
|
|
2501
2506
|
}
|
|
2502
2507
|
}
|
|
2503
|
-
const jr = 1,
|
|
2508
|
+
const jr = 1, gl = 131074;
|
|
2504
2509
|
function zr(t) {
|
|
2505
2510
|
return {};
|
|
2506
2511
|
}
|
|
2507
|
-
function
|
|
2512
|
+
function Cl(t) {
|
|
2508
2513
|
return new U(jr).finish();
|
|
2509
2514
|
}
|
|
2510
2515
|
function Xr(t, e, n) {
|
|
2511
|
-
const r =
|
|
2512
|
-
return M(
|
|
2516
|
+
const r = Cl();
|
|
2517
|
+
return M(gl, r, jr, e, n);
|
|
2513
2518
|
}
|
|
2514
|
-
const Jr = 1,
|
|
2515
|
-
function
|
|
2519
|
+
const Jr = 1, Al = 65558, yl = 250031587, bl = 1286979607, Rl = 2033288346, Nl = 3542818975;
|
|
2520
|
+
function kl(t) {
|
|
2516
2521
|
const e = {};
|
|
2517
|
-
return
|
|
2522
|
+
return Dl(e), t && Object.assign(e, t), e;
|
|
2518
2523
|
}
|
|
2519
|
-
function
|
|
2524
|
+
function Dl(t) {
|
|
2520
2525
|
return t.ViewportWidth = 0, t.ViewportHeight = 0, t.Theme = "", t.Timezone = "", t;
|
|
2521
2526
|
}
|
|
2522
|
-
function
|
|
2527
|
+
function vl(t) {
|
|
2523
2528
|
const e = new U(Jr);
|
|
2524
|
-
return
|
|
2529
|
+
return Ul(t, e), e.finish();
|
|
2525
2530
|
}
|
|
2526
|
-
function
|
|
2527
|
-
e.writeStringField(
|
|
2531
|
+
function Ul(t, e) {
|
|
2532
|
+
e.writeStringField(yl, t.Theme), e.writeInt32Field(bl, t.ViewportHeight | 0), e.writeInt32Field(Rl, t.ViewportWidth | 0), e.writeStringField(Nl, t.Timezone);
|
|
2528
2533
|
}
|
|
2529
|
-
function
|
|
2530
|
-
const r =
|
|
2531
|
-
return M(
|
|
2534
|
+
function Ol(t, e, n) {
|
|
2535
|
+
const r = vl(t);
|
|
2536
|
+
return M(Al, r, Jr, e, n);
|
|
2532
2537
|
}
|
|
2533
|
-
const Qr = 1,
|
|
2534
|
-
function
|
|
2538
|
+
const Qr = 1, Ml = 8388612;
|
|
2539
|
+
function Pl(t) {
|
|
2535
2540
|
return {};
|
|
2536
2541
|
}
|
|
2537
|
-
function
|
|
2542
|
+
function Ll(t) {
|
|
2538
2543
|
return new U(Qr).finish();
|
|
2539
2544
|
}
|
|
2540
|
-
function
|
|
2541
|
-
const r =
|
|
2542
|
-
return M(
|
|
2545
|
+
function Fl(t, e, n) {
|
|
2546
|
+
const r = Ll();
|
|
2547
|
+
return M(Ml, r, Qr, e, n);
|
|
2543
2548
|
}
|
|
2544
|
-
const Zr = 65567,
|
|
2545
|
-
function
|
|
2549
|
+
const Zr = 65567, Bl = 1455877031;
|
|
2550
|
+
function xl(t) {
|
|
2546
2551
|
const e = {};
|
|
2547
2552
|
return qr(e), e;
|
|
2548
2553
|
}
|
|
2549
2554
|
function qr(t) {
|
|
2550
2555
|
return t.Sdp = "", t;
|
|
2551
2556
|
}
|
|
2552
|
-
function xl(t, e) {
|
|
2553
|
-
const n = V.create(t);
|
|
2554
|
-
return Wl(n, e);
|
|
2555
|
-
}
|
|
2556
2557
|
function Wl(t, e) {
|
|
2557
|
-
const n =
|
|
2558
|
-
return
|
|
2558
|
+
const n = V.create(t);
|
|
2559
|
+
return Gl(n, e);
|
|
2559
2560
|
}
|
|
2560
2561
|
function Gl(t, e) {
|
|
2562
|
+
const n = e ?? xl();
|
|
2563
|
+
return qr(n), Vl(t, n), n;
|
|
2564
|
+
}
|
|
2565
|
+
function Vl(t, e) {
|
|
2561
2566
|
let n;
|
|
2562
2567
|
for (; (n = t.next()) !== null; )
|
|
2563
2568
|
switch (n.fieldId) {
|
|
2564
|
-
case
|
|
2569
|
+
case Bl: {
|
|
2565
2570
|
if (n.isNull) throw new Error();
|
|
2566
2571
|
e.Sdp = n.asString();
|
|
2567
2572
|
break;
|
|
2568
2573
|
}
|
|
2569
2574
|
}
|
|
2570
2575
|
}
|
|
2571
|
-
function
|
|
2576
|
+
function Hl(t, e) {
|
|
2572
2577
|
const n = le(t, Zr);
|
|
2573
|
-
return
|
|
2578
|
+
return Wl(n, e);
|
|
2574
2579
|
}
|
|
2575
|
-
const es = 1,
|
|
2580
|
+
const es = 1, $l = 65570, Kl = 2677673673;
|
|
2576
2581
|
function xt(t) {
|
|
2577
2582
|
const e = {};
|
|
2578
|
-
return
|
|
2583
|
+
return Yl(e), t && Object.assign(e, t), e;
|
|
2579
2584
|
}
|
|
2580
|
-
function
|
|
2585
|
+
function Yl(t) {
|
|
2581
2586
|
return t.IsStart = !1, t;
|
|
2582
2587
|
}
|
|
2583
|
-
function
|
|
2588
|
+
function jl(t) {
|
|
2584
2589
|
const e = new U(es);
|
|
2585
|
-
return
|
|
2590
|
+
return zl(t, e), e.finish();
|
|
2586
2591
|
}
|
|
2587
|
-
function
|
|
2588
|
-
e.writeBoolField(
|
|
2592
|
+
function zl(t, e) {
|
|
2593
|
+
e.writeBoolField(Kl, t.IsStart);
|
|
2589
2594
|
}
|
|
2590
2595
|
function Wt(t, e, n) {
|
|
2591
|
-
const r =
|
|
2592
|
-
return M(
|
|
2596
|
+
const r = jl(t);
|
|
2597
|
+
return M($l, r, es, e, n);
|
|
2593
2598
|
}
|
|
2594
2599
|
const ts = 1, gt = 65568, ns = 646075140, rs = 2324511977, ss = 4002097439;
|
|
2595
2600
|
function is(t) {
|
|
@@ -2599,22 +2604,22 @@ function is(t) {
|
|
|
2599
2604
|
function os(t) {
|
|
2600
2605
|
return t.Candidate = "", t.SdpMid = "", t.SdpMLineIndex = 0, t;
|
|
2601
2606
|
}
|
|
2602
|
-
function
|
|
2607
|
+
function Xl(t) {
|
|
2603
2608
|
const e = new U(ts);
|
|
2604
|
-
return
|
|
2609
|
+
return Jl(t, e), e.finish();
|
|
2605
2610
|
}
|
|
2606
|
-
function
|
|
2611
|
+
function Jl(t, e) {
|
|
2607
2612
|
e.writeStringField(ns, t.Candidate), e.writeStringField(rs, t.SdpMid), e.writeInt32Field(ss, t.SdpMLineIndex | 0);
|
|
2608
2613
|
}
|
|
2609
|
-
function
|
|
2614
|
+
function Ql(t, e) {
|
|
2610
2615
|
const n = V.create(t);
|
|
2611
|
-
return
|
|
2616
|
+
return Zl(n, e);
|
|
2612
2617
|
}
|
|
2613
|
-
function
|
|
2618
|
+
function Zl(t, e) {
|
|
2614
2619
|
const n = e ?? is();
|
|
2615
|
-
return os(n),
|
|
2620
|
+
return os(n), ql(t, n), n;
|
|
2616
2621
|
}
|
|
2617
|
-
function
|
|
2622
|
+
function ql(t, e) {
|
|
2618
2623
|
let n;
|
|
2619
2624
|
for (; (n = t.next()) !== null; )
|
|
2620
2625
|
switch (n.fieldId) {
|
|
@@ -2635,34 +2640,34 @@ function Zl(t, e) {
|
|
|
2635
2640
|
}
|
|
2636
2641
|
}
|
|
2637
2642
|
}
|
|
2638
|
-
function
|
|
2639
|
-
const r =
|
|
2643
|
+
function eu(t, e, n) {
|
|
2644
|
+
const r = Xl(t);
|
|
2640
2645
|
return M(gt, r, ts, e, n);
|
|
2641
2646
|
}
|
|
2642
|
-
function
|
|
2647
|
+
function tu(t, e) {
|
|
2643
2648
|
const n = le(t, gt);
|
|
2644
|
-
return
|
|
2649
|
+
return Ql(n, e);
|
|
2645
2650
|
}
|
|
2646
|
-
const as = 1,
|
|
2647
|
-
function
|
|
2651
|
+
const as = 1, nu = 65566, ru = 407060584, su = 1175184220, iu = 1241248827, ou = 1455877031, au = 3419353826, cu = 3686066300;
|
|
2652
|
+
function lu(t) {
|
|
2648
2653
|
const e = {};
|
|
2649
|
-
return
|
|
2654
|
+
return uu(e), t && Object.assign(e, t), e;
|
|
2650
2655
|
}
|
|
2651
|
-
function
|
|
2656
|
+
function uu(t) {
|
|
2652
2657
|
return t.Sdp = "", t.OpcodeGroupsFromServer = g.NONE, t.OpcodeGroupsToServer = g.NONE, t.UseAudioTrack = !1, t.UseVideoTrack = !1, t.UseDataChannel = !1, t;
|
|
2653
2658
|
}
|
|
2654
|
-
function
|
|
2659
|
+
function du(t) {
|
|
2655
2660
|
const e = new U(as);
|
|
2656
|
-
return
|
|
2661
|
+
return hu(t, e), e.finish();
|
|
2657
2662
|
}
|
|
2658
|
-
function
|
|
2659
|
-
e.writeBoolField(
|
|
2663
|
+
function hu(t, e) {
|
|
2664
|
+
e.writeBoolField(ru, t.UseVideoTrack), e.writeInt32Field(su, t.OpcodeGroupsFromServer), e.writeBoolField(iu, t.UseAudioTrack), e.writeStringField(ou, t.Sdp), e.writeBoolField(au, t.UseDataChannel), e.writeInt32Field(cu, t.OpcodeGroupsToServer);
|
|
2660
2665
|
}
|
|
2661
|
-
function
|
|
2662
|
-
const r =
|
|
2663
|
-
return M(
|
|
2666
|
+
function fu(t, e, n) {
|
|
2667
|
+
const r = du(t);
|
|
2668
|
+
return M(nu, r, as, e, n);
|
|
2664
2669
|
}
|
|
2665
|
-
const cs = 65569,
|
|
2670
|
+
const cs = 65569, pu = 2838554230, mu = 3673535008;
|
|
2666
2671
|
function Eu(t) {
|
|
2667
2672
|
const e = {};
|
|
2668
2673
|
return ls(e), e;
|
|
@@ -2670,80 +2675,80 @@ function Eu(t) {
|
|
|
2670
2675
|
function ls(t) {
|
|
2671
2676
|
return t.Success = !0, t.ErrorMessage = "", t;
|
|
2672
2677
|
}
|
|
2673
|
-
function
|
|
2678
|
+
function Iu(t, e) {
|
|
2674
2679
|
const n = V.create(t);
|
|
2675
|
-
return
|
|
2680
|
+
return _u(n, e);
|
|
2676
2681
|
}
|
|
2677
|
-
function
|
|
2682
|
+
function _u(t, e) {
|
|
2678
2683
|
const n = e ?? Eu();
|
|
2679
|
-
return ls(n),
|
|
2684
|
+
return ls(n), Tu(t, n), n;
|
|
2680
2685
|
}
|
|
2681
|
-
function
|
|
2686
|
+
function Tu(t, e) {
|
|
2682
2687
|
let n;
|
|
2683
2688
|
for (; (n = t.next()) !== null; )
|
|
2684
2689
|
switch (n.fieldId) {
|
|
2685
|
-
case
|
|
2690
|
+
case pu: {
|
|
2686
2691
|
if (n.isNull) throw new Error();
|
|
2687
2692
|
e.ErrorMessage = n.asString();
|
|
2688
2693
|
break;
|
|
2689
2694
|
}
|
|
2690
|
-
case
|
|
2695
|
+
case mu: {
|
|
2691
2696
|
if (n.isNull) throw new Error();
|
|
2692
2697
|
e.Success = n.asBool();
|
|
2693
2698
|
break;
|
|
2694
2699
|
}
|
|
2695
2700
|
}
|
|
2696
2701
|
}
|
|
2697
|
-
function
|
|
2702
|
+
function wu(t, e) {
|
|
2698
2703
|
const n = le(t, cs);
|
|
2699
|
-
return
|
|
2704
|
+
return Iu(n, e);
|
|
2700
2705
|
}
|
|
2701
|
-
const us = 65571,
|
|
2702
|
-
function
|
|
2706
|
+
const us = 65571, Su = 161083277, gu = 317031266, Cu = 1093174542, Au = 1970024675, yu = 2481928696, bu = 2762891795, Ru = 3282782683;
|
|
2707
|
+
function Nu(t) {
|
|
2703
2708
|
const e = {};
|
|
2704
2709
|
return ds(e), e;
|
|
2705
2710
|
}
|
|
2706
2711
|
function ds(t) {
|
|
2707
2712
|
return t.Kind = "", t.TrackIndex = 0, t.SenderId = 0, t.SenderTrackId = 0, t.StreamId = "", t.SourceType = "", t.Active = !0, t;
|
|
2708
2713
|
}
|
|
2709
|
-
function Nu(t, e) {
|
|
2710
|
-
const n = V.create(t);
|
|
2711
|
-
return ku(n, e);
|
|
2712
|
-
}
|
|
2713
2714
|
function ku(t, e) {
|
|
2714
|
-
const n =
|
|
2715
|
-
return
|
|
2715
|
+
const n = V.create(t);
|
|
2716
|
+
return Du(n, e);
|
|
2716
2717
|
}
|
|
2717
2718
|
function Du(t, e) {
|
|
2719
|
+
const n = e ?? Nu();
|
|
2720
|
+
return ds(n), vu(t, n), n;
|
|
2721
|
+
}
|
|
2722
|
+
function vu(t, e) {
|
|
2718
2723
|
let n;
|
|
2719
2724
|
for (; (n = t.next()) !== null; )
|
|
2720
2725
|
switch (n.fieldId) {
|
|
2721
|
-
case
|
|
2726
|
+
case Su: {
|
|
2722
2727
|
if (n.isNull) throw new Error();
|
|
2723
2728
|
e.StreamId = n.asString();
|
|
2724
2729
|
break;
|
|
2725
2730
|
}
|
|
2726
|
-
case
|
|
2731
|
+
case gu: {
|
|
2727
2732
|
if (n.isNull) throw new Error();
|
|
2728
2733
|
e.Kind = n.asString();
|
|
2729
2734
|
break;
|
|
2730
2735
|
}
|
|
2731
|
-
case
|
|
2736
|
+
case Cu: {
|
|
2732
2737
|
if (n.isNull) throw new Error();
|
|
2733
2738
|
e.SenderTrackId = n.asInt32();
|
|
2734
2739
|
break;
|
|
2735
2740
|
}
|
|
2736
|
-
case
|
|
2741
|
+
case Au: {
|
|
2737
2742
|
if (n.isNull) throw new Error();
|
|
2738
2743
|
e.SenderId = n.asInt32();
|
|
2739
2744
|
break;
|
|
2740
2745
|
}
|
|
2741
|
-
case
|
|
2746
|
+
case yu: {
|
|
2742
2747
|
if (n.isNull) throw new Error();
|
|
2743
2748
|
e.Active = n.asBool();
|
|
2744
2749
|
break;
|
|
2745
2750
|
}
|
|
2746
|
-
case
|
|
2751
|
+
case bu: {
|
|
2747
2752
|
if (n.isNull) throw new Error();
|
|
2748
2753
|
e.TrackIndex = n.asInt32();
|
|
2749
2754
|
break;
|
|
@@ -2755,16 +2760,16 @@ function Du(t, e) {
|
|
|
2755
2760
|
}
|
|
2756
2761
|
}
|
|
2757
2762
|
}
|
|
2758
|
-
function
|
|
2763
|
+
function Uu(t, e) {
|
|
2759
2764
|
const n = le(t, us);
|
|
2760
|
-
return
|
|
2765
|
+
return ku(n, e);
|
|
2761
2766
|
}
|
|
2762
2767
|
class Ct extends Error {
|
|
2763
2768
|
constructor(e, n) {
|
|
2764
2769
|
super(e), this.cause = n, this.name = "ConnectionError";
|
|
2765
2770
|
}
|
|
2766
2771
|
}
|
|
2767
|
-
class
|
|
2772
|
+
class R extends Ct {
|
|
2768
2773
|
constructor(e, n) {
|
|
2769
2774
|
super(e, n), this.name = "AuthenticationError";
|
|
2770
2775
|
}
|
|
@@ -2779,27 +2784,27 @@ class At extends q {
|
|
|
2779
2784
|
super(`No keepalive received within ${e}ms`), this.name = "KeepaliveTimeoutError";
|
|
2780
2785
|
}
|
|
2781
2786
|
}
|
|
2782
|
-
class
|
|
2787
|
+
class Ou extends Ct {
|
|
2783
2788
|
constructor(e) {
|
|
2784
2789
|
super(`Maximum reconnection attempts (${e}) exceeded`), this.name = "MaxRetriesExceededError";
|
|
2785
2790
|
}
|
|
2786
2791
|
}
|
|
2787
|
-
class
|
|
2792
|
+
class Mu extends R {
|
|
2788
2793
|
constructor(e) {
|
|
2789
2794
|
super(`Channel provisioning timeout after ${e}ms`), this.name = "ProvisioningTimeoutError";
|
|
2790
2795
|
}
|
|
2791
2796
|
}
|
|
2792
|
-
class
|
|
2797
|
+
class Gf extends R {
|
|
2793
2798
|
constructor(e) {
|
|
2794
2799
|
super(`Channel not found: ${e}`), this.name = "ChannelNotFoundError";
|
|
2795
2800
|
}
|
|
2796
2801
|
}
|
|
2797
|
-
class
|
|
2802
|
+
class Vf extends R {
|
|
2798
2803
|
constructor(e) {
|
|
2799
2804
|
super(`Space not found for domain: ${e}`), this.name = "SpaceNotFoundError";
|
|
2800
2805
|
}
|
|
2801
2806
|
}
|
|
2802
|
-
class
|
|
2807
|
+
class Hf extends R {
|
|
2803
2808
|
constructor() {
|
|
2804
2809
|
super("No channels available in this space"), this.name = "NoChannelsError";
|
|
2805
2810
|
}
|
|
@@ -2819,21 +2824,21 @@ function yt(t, e) {
|
|
|
2819
2824
|
});
|
|
2820
2825
|
}
|
|
2821
2826
|
var Ve = /* @__PURE__ */ ((t) => (t[t.DEBUG = 0] = "DEBUG", t[t.INFO = 1] = "INFO", t[t.WARN = 2] = "WARN", t[t.ERROR = 3] = "ERROR", t[t.NONE = 4] = "NONE", t))(Ve || {});
|
|
2822
|
-
let
|
|
2827
|
+
let bt = 1, Fe = null;
|
|
2823
2828
|
const rt = /* @__PURE__ */ new Map();
|
|
2824
2829
|
function hs(t) {
|
|
2825
|
-
|
|
2830
|
+
bt = t;
|
|
2826
2831
|
}
|
|
2827
|
-
function
|
|
2828
|
-
return
|
|
2832
|
+
function $f() {
|
|
2833
|
+
return bt;
|
|
2829
2834
|
}
|
|
2830
|
-
function
|
|
2835
|
+
function Pu(t) {
|
|
2831
2836
|
Fe = t;
|
|
2832
2837
|
}
|
|
2833
|
-
function
|
|
2838
|
+
function Kf() {
|
|
2834
2839
|
return Fe;
|
|
2835
2840
|
}
|
|
2836
|
-
function
|
|
2841
|
+
function Yf(t, e) {
|
|
2837
2842
|
return rt.set(t, e ?? {
|
|
2838
2843
|
minLevel: 2
|
|
2839
2844
|
/* WARN */
|
|
@@ -2841,18 +2846,18 @@ function Wf(t, e) {
|
|
|
2841
2846
|
rt.delete(t);
|
|
2842
2847
|
};
|
|
2843
2848
|
}
|
|
2844
|
-
const
|
|
2849
|
+
const Lu = {
|
|
2845
2850
|
0: "DEBUG",
|
|
2846
2851
|
1: "INFO",
|
|
2847
2852
|
2: "WARN",
|
|
2848
2853
|
3: "ERROR",
|
|
2849
2854
|
4: "NONE"
|
|
2850
2855
|
};
|
|
2851
|
-
function
|
|
2856
|
+
function Fu(t, e) {
|
|
2852
2857
|
return `[${t}] ${e}`;
|
|
2853
2858
|
}
|
|
2854
|
-
function
|
|
2855
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), i =
|
|
2859
|
+
function Re(t, e, n, r) {
|
|
2860
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), i = Lu[t], o = {
|
|
2856
2861
|
timestamp: s,
|
|
2857
2862
|
level: t,
|
|
2858
2863
|
levelName: i,
|
|
@@ -2869,8 +2874,8 @@ function be(t, e, n, r) {
|
|
|
2869
2874
|
} catch {
|
|
2870
2875
|
}
|
|
2871
2876
|
}
|
|
2872
|
-
if (
|
|
2873
|
-
const a =
|
|
2877
|
+
if (bt <= t) {
|
|
2878
|
+
const a = Fu(e, n);
|
|
2874
2879
|
switch (t) {
|
|
2875
2880
|
case 0:
|
|
2876
2881
|
console.debug(a, ...r);
|
|
@@ -2890,21 +2895,21 @@ function be(t, e, n, r) {
|
|
|
2890
2895
|
function P(t) {
|
|
2891
2896
|
return {
|
|
2892
2897
|
debug(e, ...n) {
|
|
2893
|
-
|
|
2898
|
+
Re(0, t, e, n);
|
|
2894
2899
|
},
|
|
2895
2900
|
info(e, ...n) {
|
|
2896
|
-
|
|
2901
|
+
Re(1, t, e, n);
|
|
2897
2902
|
},
|
|
2898
2903
|
warn(e, ...n) {
|
|
2899
|
-
|
|
2904
|
+
Re(2, t, e, n);
|
|
2900
2905
|
},
|
|
2901
2906
|
error(e, ...n) {
|
|
2902
|
-
|
|
2907
|
+
Re(3, t, e, n);
|
|
2903
2908
|
}
|
|
2904
2909
|
};
|
|
2905
2910
|
}
|
|
2906
|
-
const Ye = P("WebSocketTransport"),
|
|
2907
|
-
class
|
|
2911
|
+
const Ye = P("WebSocketTransport"), Bu = 1e4;
|
|
2912
|
+
class xu {
|
|
2908
2913
|
ws = null;
|
|
2909
2914
|
keepaliveTimeout = null;
|
|
2910
2915
|
isClosed = !1;
|
|
@@ -2932,7 +2937,7 @@ class Bu {
|
|
|
2932
2937
|
clearTimeout(c), this.ws && (this.ws.onopen = null, this.ws.onerror = null, this.ws.onclose = null, this.ws.onmessage = null);
|
|
2933
2938
|
}, c = setTimeout(() => {
|
|
2934
2939
|
o || (o = !0, a(), this.ws?.close(), s(new q("WebSocket connection timeout")));
|
|
2935
|
-
},
|
|
2940
|
+
}, Bu);
|
|
2936
2941
|
this.ws.onopen = () => {
|
|
2937
2942
|
i = !0, clearTimeout(c), this.ws.send(n), this.resetKeepaliveTimeout(), o || (o = !0, r());
|
|
2938
2943
|
}, this.ws.onerror = () => {
|
|
@@ -2983,11 +2988,11 @@ class Bu {
|
|
|
2983
2988
|
this.keepaliveTimeout && (clearTimeout(this.keepaliveTimeout), this.keepaliveTimeout = null);
|
|
2984
2989
|
}
|
|
2985
2990
|
}
|
|
2986
|
-
const j = P("WebTransportTransport"), Gt = 4,
|
|
2991
|
+
const j = P("WebTransportTransport"), Gt = 4, Wu = 65536;
|
|
2987
2992
|
function fs() {
|
|
2988
2993
|
return typeof WebTransport < "u";
|
|
2989
2994
|
}
|
|
2990
|
-
class
|
|
2995
|
+
class Gu {
|
|
2991
2996
|
transport = null;
|
|
2992
2997
|
stream = null;
|
|
2993
2998
|
reader = null;
|
|
@@ -2996,7 +3001,7 @@ class Wu {
|
|
|
2996
3001
|
readLoopActive = !1;
|
|
2997
3002
|
isClosed = !1;
|
|
2998
3003
|
// Grow-only receive buffer with offset/length tracking to minimize allocations
|
|
2999
|
-
receiveBuffer = new Uint8Array(
|
|
3004
|
+
receiveBuffer = new Uint8Array(Wu);
|
|
3000
3005
|
receiveBufferOffset = 0;
|
|
3001
3006
|
receiveBufferLength = 0;
|
|
3002
3007
|
// Cached DataView to avoid allocation per message
|
|
@@ -3153,7 +3158,7 @@ class Wu {
|
|
|
3153
3158
|
}
|
|
3154
3159
|
}
|
|
3155
3160
|
const je = P("Channel");
|
|
3156
|
-
class
|
|
3161
|
+
class Vu {
|
|
3157
3162
|
state = "disconnected";
|
|
3158
3163
|
transport = null;
|
|
3159
3164
|
config;
|
|
@@ -3237,13 +3242,13 @@ class Gu {
|
|
|
3237
3242
|
switch (e.Type) {
|
|
3238
3243
|
case N.WebSocket:
|
|
3239
3244
|
case N.WebSocketProxy:
|
|
3240
|
-
this.transport = new
|
|
3245
|
+
this.transport = new xu(n);
|
|
3241
3246
|
break;
|
|
3242
3247
|
case N.WebTransport:
|
|
3243
3248
|
case N.WebTransportProxy:
|
|
3244
3249
|
if (!fs())
|
|
3245
3250
|
throw new Error("WebTransport is not supported in this browser");
|
|
3246
|
-
this.transport = new
|
|
3251
|
+
this.transport = new Gu(n);
|
|
3247
3252
|
break;
|
|
3248
3253
|
default:
|
|
3249
3254
|
throw new Error(`Unsupported entrypoint type: ${N[e.Type]}`);
|
|
@@ -3285,7 +3290,7 @@ class Gu {
|
|
|
3285
3290
|
}
|
|
3286
3291
|
}
|
|
3287
3292
|
const B = P("ChannelManager");
|
|
3288
|
-
class
|
|
3293
|
+
class Hu {
|
|
3289
3294
|
channels = /* @__PURE__ */ new Map();
|
|
3290
3295
|
// keyed by opcode group
|
|
3291
3296
|
activeType = null;
|
|
@@ -3425,7 +3430,7 @@ class Vu {
|
|
|
3425
3430
|
* Connect a single channel.
|
|
3426
3431
|
*/
|
|
3427
3432
|
async connectChannel(e) {
|
|
3428
|
-
const n = new
|
|
3433
|
+
const n = new Vu({
|
|
3429
3434
|
entrypoint: e,
|
|
3430
3435
|
sessionId: this.config.sessionId,
|
|
3431
3436
|
keepaliveTimeoutMs: this.config.keepaliveTimeoutMs,
|
|
@@ -3480,7 +3485,7 @@ class Vu {
|
|
|
3480
3485
|
async attemptReconnect() {
|
|
3481
3486
|
if (this.shouldReconnect) {
|
|
3482
3487
|
if (this.reconnectAttempts >= this.config.maxReconnectAttempts) {
|
|
3483
|
-
B.warn(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new
|
|
3488
|
+
B.warn(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new Ou(this.config.maxReconnectAttempts));
|
|
3484
3489
|
return;
|
|
3485
3490
|
}
|
|
3486
3491
|
if (this.setState("reconnecting"), this.reconnectAttempts++, this.reconnectAttempts > 1 ? (B.info(`Reconnecting in ${this.config.reconnectBackoffMs}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), await yt(this.config.reconnectBackoffMs, this.abortController?.signal)) : B.info(`Reconnecting immediately (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), !!this.shouldReconnect)
|
|
@@ -3522,8 +3527,8 @@ class Vu {
|
|
|
3522
3527
|
this.state !== e && (this.state = e, this.config.onStateChange?.(e));
|
|
3523
3528
|
}
|
|
3524
3529
|
}
|
|
3525
|
-
const
|
|
3526
|
-
class
|
|
3530
|
+
const jf = "opus", zf = 48e3, Xf = 2, Jf = 64e3, $u = 150, Qf = "VP8", Ku = 5e6, Zf = 30, Yu = 0.05, ju = "max-bundle", zu = "require", Xu = [], Ju = 16, Qu = 16, Zu = "ikon-data", qu = !1, ed = 0, G = P("WebRTCConnection");
|
|
3531
|
+
class td {
|
|
3527
3532
|
pc = null;
|
|
3528
3533
|
dataChannel = null;
|
|
3529
3534
|
_state = "new";
|
|
@@ -3545,20 +3550,20 @@ class ed {
|
|
|
3545
3550
|
return this.dataChannel?.readyState === "open";
|
|
3546
3551
|
}
|
|
3547
3552
|
async initialize() {
|
|
3548
|
-
const e =
|
|
3553
|
+
const e = Xu;
|
|
3549
3554
|
if (this.pc = new RTCPeerConnection({
|
|
3550
3555
|
iceServers: e,
|
|
3551
|
-
bundlePolicy:
|
|
3552
|
-
rtcpMuxPolicy:
|
|
3556
|
+
bundlePolicy: ju,
|
|
3557
|
+
rtcpMuxPolicy: zu
|
|
3553
3558
|
}), this.setupEventHandlers(), this.config.useAudioTrack)
|
|
3554
|
-
for (let n = 0; n <
|
|
3559
|
+
for (let n = 0; n < Ju; n++)
|
|
3555
3560
|
this.pc.addTransceiver("audio", { direction: "sendrecv" });
|
|
3556
3561
|
if (this.config.useVideoTrack)
|
|
3557
|
-
for (let n = 0; n <
|
|
3562
|
+
for (let n = 0; n < Qu; n++)
|
|
3558
3563
|
this.pc.addTransceiver("video", { direction: "sendrecv" });
|
|
3559
|
-
this.config.useDataChannel && (this.dataChannel = this.pc.createDataChannel(
|
|
3560
|
-
ordered:
|
|
3561
|
-
maxRetransmits:
|
|
3564
|
+
this.config.useDataChannel && (this.dataChannel = this.pc.createDataChannel(Zu, {
|
|
3565
|
+
ordered: qu,
|
|
3566
|
+
maxRetransmits: ed
|
|
3562
3567
|
}), this.setupDataChannelHandlers(this.dataChannel));
|
|
3563
3568
|
}
|
|
3564
3569
|
async createOffer() {
|
|
@@ -3645,7 +3650,7 @@ class ed {
|
|
|
3645
3650
|
}, this.pc.ontrack = (e) => {
|
|
3646
3651
|
const n = e.track;
|
|
3647
3652
|
if (n.kind === "audio") {
|
|
3648
|
-
const r =
|
|
3653
|
+
const r = $u;
|
|
3649
3654
|
try {
|
|
3650
3655
|
e.receiver.jitterBufferTarget = r;
|
|
3651
3656
|
} catch (o) {
|
|
@@ -3655,7 +3660,7 @@ class ed {
|
|
|
3655
3660
|
this.config.onAudioTrack?.(i, n, s);
|
|
3656
3661
|
} else if (n.kind === "video") {
|
|
3657
3662
|
try {
|
|
3658
|
-
e.receiver.playoutDelayHint =
|
|
3663
|
+
e.receiver.playoutDelayHint = Yu;
|
|
3659
3664
|
} catch (i) {
|
|
3660
3665
|
G.warn("Failed to set playoutDelayHint:", i);
|
|
3661
3666
|
}
|
|
@@ -3682,7 +3687,7 @@ class ed {
|
|
|
3682
3687
|
}
|
|
3683
3688
|
}
|
|
3684
3689
|
const y = P("WebRTCSignaling");
|
|
3685
|
-
class
|
|
3690
|
+
class nd {
|
|
3686
3691
|
config;
|
|
3687
3692
|
connection = null;
|
|
3688
3693
|
sendMessage = null;
|
|
@@ -3726,7 +3731,7 @@ class td {
|
|
|
3726
3731
|
this.videoTrackCount++, this.config.onVideoTrack?.(s, i, o);
|
|
3727
3732
|
}
|
|
3728
3733
|
};
|
|
3729
|
-
this.connection = new
|
|
3734
|
+
this.connection = new td(n), await this.connection.initialize();
|
|
3730
3735
|
const r = await this.connection.createOffer();
|
|
3731
3736
|
this.sendOffer(r);
|
|
3732
3737
|
} catch (n) {
|
|
@@ -3841,7 +3846,7 @@ class td {
|
|
|
3841
3846
|
}
|
|
3842
3847
|
async applyEncodingParams(e, n) {
|
|
3843
3848
|
try {
|
|
3844
|
-
const r = n ??
|
|
3849
|
+
const r = n ?? Ku, s = e.getParameters();
|
|
3845
3850
|
s.encodings?.length || (s.encodings = [{}]), s.encodings[0].maxBitrate = r, s.degradationPreference = "balanced", await e.setParameters(s);
|
|
3846
3851
|
} catch (r) {
|
|
3847
3852
|
y.warn("Failed to set encoding params:", r);
|
|
@@ -3852,19 +3857,19 @@ class td {
|
|
|
3852
3857
|
y.error("Cannot send offer: no send function");
|
|
3853
3858
|
return;
|
|
3854
3859
|
}
|
|
3855
|
-
const n =
|
|
3860
|
+
const n = lu({
|
|
3856
3861
|
Sdp: e,
|
|
3857
3862
|
OpcodeGroupsFromServer: this.config.opcodeGroupsFromServer,
|
|
3858
3863
|
OpcodeGroupsToServer: this.config.opcodeGroupsToServer,
|
|
3859
3864
|
UseAudioTrack: this.config.useAudioTrack,
|
|
3860
3865
|
UseVideoTrack: this.config.useVideoTrack,
|
|
3861
3866
|
UseDataChannel: this.config.useDataChannel
|
|
3862
|
-
}), r =
|
|
3867
|
+
}), r = fu(n, this.config.sessionId);
|
|
3863
3868
|
this.sendMessage(r), y.debug("Sent WebRTC offer");
|
|
3864
3869
|
}
|
|
3865
3870
|
async handleAnswer(e) {
|
|
3866
3871
|
try {
|
|
3867
|
-
const n =
|
|
3872
|
+
const n = Hl(e);
|
|
3868
3873
|
await this.connection?.setRemoteDescription(n.Sdp, "answer"), y.debug("WebRTC answer received and applied");
|
|
3869
3874
|
} catch (n) {
|
|
3870
3875
|
y.error("Failed to handle WebRTC answer:", n);
|
|
@@ -3877,12 +3882,12 @@ class td {
|
|
|
3877
3882
|
Candidate: e.candidate,
|
|
3878
3883
|
SdpMid: e.sdpMid ?? "",
|
|
3879
3884
|
SdpMLineIndex: e.sdpMLineIndex ?? 0
|
|
3880
|
-
}), r =
|
|
3885
|
+
}), r = eu(n, this.config.sessionId);
|
|
3881
3886
|
this.sendMessage(r);
|
|
3882
3887
|
}
|
|
3883
3888
|
async handleRemoteIceCandidate(e) {
|
|
3884
3889
|
try {
|
|
3885
|
-
const n =
|
|
3890
|
+
const n = tu(e);
|
|
3886
3891
|
if (n.Candidate) {
|
|
3887
3892
|
const r = n.Candidate.startsWith("candidate:") ? n.Candidate : `candidate:${n.Candidate}`, s = n.SdpMid || String(n.SdpMLineIndex);
|
|
3888
3893
|
await this.connection?.addIceCandidate({
|
|
@@ -3897,7 +3902,7 @@ class td {
|
|
|
3897
3902
|
}
|
|
3898
3903
|
handleReady(e) {
|
|
3899
3904
|
try {
|
|
3900
|
-
const n =
|
|
3905
|
+
const n = wu(e);
|
|
3901
3906
|
n.Success ? (y.debug("WebRTC connection ready"), this.isConnecting = !1) : (y.error(`WebRTC connection failed (server): ${n.ErrorMessage}`), this.disconnect());
|
|
3902
3907
|
} catch (n) {
|
|
3903
3908
|
y.error("Failed to handle WebRTC ready:", n);
|
|
@@ -3905,18 +3910,75 @@ class td {
|
|
|
3905
3910
|
}
|
|
3906
3911
|
handleTrackMap(e) {
|
|
3907
3912
|
try {
|
|
3908
|
-
const n =
|
|
3913
|
+
const n = Uu(e);
|
|
3909
3914
|
this.config.onTrackMap?.(n);
|
|
3910
3915
|
} catch (n) {
|
|
3911
3916
|
y.error("Failed to handle WebRTC track map:", n);
|
|
3912
3917
|
}
|
|
3913
3918
|
}
|
|
3914
3919
|
}
|
|
3915
|
-
const
|
|
3920
|
+
const rd = 5e3, sd = 3e5, Vt = 15e3, Ht = 2e3, $t = 2, ps = 6e4, id = 5 * 60 * 1e3, od = 10 * 1e3, ge = "ikon.theme", Ce = "ikon.theme-user", ad = "ikon.theme-change", cd = {
|
|
3921
|
+
slate: ["#475569", "#334155", "#64748b", "#f1f5f9"],
|
|
3922
|
+
gray: ["#4b5563", "#374151", "#6b7280", "#f3f4f6"],
|
|
3923
|
+
zinc: ["#52525b", "#3f3f46", "#71717a", "#f4f4f5"],
|
|
3924
|
+
neutral: ["#525252", "#404040", "#737373", "#f5f5f5"],
|
|
3925
|
+
stone: ["#57534e", "#44403c", "#78716c", "#f5f5f4"],
|
|
3926
|
+
red: ["#dc2626", "#b91c1c", "#ef4444", "#fee2e2"],
|
|
3927
|
+
orange: ["#ea580c", "#c2410c", "#f97316", "#ffedd5"],
|
|
3928
|
+
amber: ["#d97706", "#b45309", "#f59e0b", "#fef3c7"],
|
|
3929
|
+
yellow: ["#ca8a04", "#a16207", "#eab308", "#fef9c3"],
|
|
3930
|
+
lime: ["#65a30d", "#4d7c0f", "#84cc16", "#ecfccb"],
|
|
3931
|
+
green: ["#16a34a", "#15803d", "#22c55e", "#dcfce7"],
|
|
3932
|
+
emerald: ["#059669", "#047857", "#10b981", "#d1fae5"],
|
|
3933
|
+
teal: ["#0d9488", "#0f766e", "#14b8a6", "#ccfbf1"],
|
|
3934
|
+
cyan: ["#0891b2", "#0e7490", "#06b6d4", "#cffafe"],
|
|
3935
|
+
sky: ["#0284c7", "#0369a1", "#0ea5e9", "#e0f2fe"],
|
|
3936
|
+
blue: ["#2563eb", "#1d4ed8", "#3b82f6", "#dbeafe"],
|
|
3937
|
+
indigo: ["#4f46e5", "#4338ca", "#6366f1", "#e0e7ff"],
|
|
3938
|
+
violet: ["#7c3aed", "#6d28d9", "#8b5cf6", "#ede9fe"],
|
|
3939
|
+
purple: ["#9333ea", "#7e22ce", "#a855f7", "#f3e8ff"],
|
|
3940
|
+
fuchsia: ["#c026d3", "#a21caf", "#d946ef", "#fae8ff"],
|
|
3941
|
+
pink: ["#db2777", "#be185d", "#ec4899", "#fce7f3"],
|
|
3942
|
+
rose: ["#e11d48", "#be123c", "#f43f5e", "#ffe4e6"]
|
|
3943
|
+
}, ld = [
|
|
3944
|
+
"--bg-brand-solid",
|
|
3945
|
+
"--bg-brand-solid-hover",
|
|
3946
|
+
"--bg-brand-primary",
|
|
3947
|
+
"--bg-brand-primary-alt",
|
|
3948
|
+
"--bg-brand-secondary",
|
|
3949
|
+
"--border-brand",
|
|
3950
|
+
"--border-brand-alt",
|
|
3951
|
+
"--border-brand-secondary",
|
|
3952
|
+
"--border-brand-solid",
|
|
3953
|
+
"--border-focus-ring",
|
|
3954
|
+
"--border-ring",
|
|
3955
|
+
"--fg-brand-primary",
|
|
3956
|
+
"--fg-brand-primary-alt",
|
|
3957
|
+
"--fg-brand-secondary",
|
|
3958
|
+
"--fg-brand-secondary-hover",
|
|
3959
|
+
"--text-brand-primary",
|
|
3960
|
+
"--text-brand-secondary",
|
|
3961
|
+
"--text-brand-secondary-hover",
|
|
3962
|
+
"--text-brand-tertiary"
|
|
3963
|
+
];
|
|
3964
|
+
function ud(t, e) {
|
|
3965
|
+
const n = cd[e];
|
|
3966
|
+
if (!n)
|
|
3967
|
+
return;
|
|
3968
|
+
const [r, s, i, o] = n;
|
|
3969
|
+
t.setProperty("--bg-brand-solid", r), t.setProperty("--bg-brand-solid-hover", s), t.setProperty("--bg-brand-primary", r), t.setProperty("--bg-brand-primary-alt", o), t.setProperty("--bg-brand-secondary", o), t.setProperty("--border-brand", r), t.setProperty("--border-brand-alt", s), t.setProperty("--border-brand-secondary", o), t.setProperty("--border-brand-solid", r), t.setProperty("--border-focus-ring", i), t.setProperty("--border-ring", i), t.setProperty("--fg-brand-primary", r), t.setProperty("--fg-brand-primary-alt", s), t.setProperty("--fg-brand-secondary", r), t.setProperty("--fg-brand-secondary-hover", s), t.setProperty("--text-brand-primary", s), t.setProperty("--text-brand-secondary", r), t.setProperty("--text-brand-secondary-hover", s), t.setProperty("--text-brand-tertiary", i);
|
|
3970
|
+
}
|
|
3971
|
+
function dd(t) {
|
|
3972
|
+
for (const e of ld)
|
|
3973
|
+
t.removeProperty(e);
|
|
3974
|
+
}
|
|
3916
3975
|
function st(t) {
|
|
3917
|
-
typeof document < "u" && document.documentElement
|
|
3976
|
+
if (typeof document < "u" && document.documentElement) {
|
|
3977
|
+
const e = /* @__PURE__ */ new Set(["dark", "light"]), n = t.trim().split(/\s+/).filter((o) => o.length > 0), r = n.find((o) => e.has(o)), s = n.find((o) => !e.has(o)), i = document.documentElement.style;
|
|
3978
|
+
r !== void 0 ? (document.documentElement.setAttribute("data-theme", r), s !== void 0 ? (document.documentElement.setAttribute("data-brand", s), ud(i, s)) : (document.documentElement.removeAttribute("data-brand"), dd(i))) : document.documentElement.setAttribute("data-theme", t);
|
|
3979
|
+
}
|
|
3918
3980
|
}
|
|
3919
|
-
function
|
|
3981
|
+
function ms() {
|
|
3920
3982
|
return typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
3921
3983
|
}
|
|
3922
3984
|
function He() {
|
|
@@ -3925,12 +3987,12 @@ function He() {
|
|
|
3925
3987
|
const t = window.localStorage.getItem(Ce);
|
|
3926
3988
|
if (t) return t;
|
|
3927
3989
|
const e = window.localStorage.getItem(ge);
|
|
3928
|
-
return e ||
|
|
3990
|
+
return e || ms();
|
|
3929
3991
|
}
|
|
3930
|
-
function
|
|
3992
|
+
function Rt() {
|
|
3931
3993
|
return typeof window > "u" ? { width: 0, height: 0 } : { width: window.innerWidth, height: window.innerHeight };
|
|
3932
3994
|
}
|
|
3933
|
-
function
|
|
3995
|
+
function hd() {
|
|
3934
3996
|
if (typeof window > "u" || !window.localStorage)
|
|
3935
3997
|
return "light";
|
|
3936
3998
|
const t = window.localStorage.getItem(Ce), e = window.localStorage.getItem(ge);
|
|
@@ -3938,21 +4000,21 @@ function ad() {
|
|
|
3938
4000
|
const r = t ?? e;
|
|
3939
4001
|
return st(r), r;
|
|
3940
4002
|
}
|
|
3941
|
-
const n =
|
|
4003
|
+
const n = ms();
|
|
3942
4004
|
return window.localStorage.setItem(ge, n), st(n), n;
|
|
3943
4005
|
}
|
|
3944
|
-
const
|
|
4006
|
+
const fd = {
|
|
3945
4007
|
name: "ikon.client.getTheme",
|
|
3946
4008
|
description: "Get the currently selected client theme",
|
|
3947
4009
|
returnType: { kind: "string", nullable: !0 }
|
|
3948
4010
|
};
|
|
3949
|
-
function
|
|
4011
|
+
function pd() {
|
|
3950
4012
|
if (typeof window > "u" || !window.localStorage)
|
|
3951
4013
|
return null;
|
|
3952
4014
|
const t = window.localStorage.getItem(Ce), e = window.localStorage.getItem(ge);
|
|
3953
4015
|
return t ?? e ?? null;
|
|
3954
4016
|
}
|
|
3955
|
-
const
|
|
4017
|
+
const md = {
|
|
3956
4018
|
name: "ikon.client.setTheme",
|
|
3957
4019
|
description: "Update the client UI theme",
|
|
3958
4020
|
returnType: { kind: "boolean" },
|
|
@@ -3961,7 +4023,7 @@ const ud = {
|
|
|
3961
4023
|
{ name: "persist", type: { kind: "boolean", nullable: !0 }, description: "Whether to persist as user preference" }
|
|
3962
4024
|
]
|
|
3963
4025
|
};
|
|
3964
|
-
function
|
|
4026
|
+
function Ed(t, e) {
|
|
3965
4027
|
if (typeof window > "u" || !window.localStorage || typeof t != "string")
|
|
3966
4028
|
return !1;
|
|
3967
4029
|
const n = t.trim().toLowerCase();
|
|
@@ -3970,25 +4032,25 @@ function dd(t, e) {
|
|
|
3970
4032
|
const r = e === void 0 ? !0 : !!e, s = window.localStorage;
|
|
3971
4033
|
r ? s.setItem(Ce, n) : s.removeItem(Ce), s.setItem(ge, n);
|
|
3972
4034
|
try {
|
|
3973
|
-
window.dispatchEvent(new CustomEvent(
|
|
4035
|
+
window.dispatchEvent(new CustomEvent(ad, { detail: { mode: n } }));
|
|
3974
4036
|
} catch {
|
|
3975
4037
|
}
|
|
3976
4038
|
return st(n), !0;
|
|
3977
4039
|
}
|
|
3978
|
-
const
|
|
4040
|
+
const Id = {
|
|
3979
4041
|
name: "ikon.client.getLanguage",
|
|
3980
4042
|
description: "Get the browser language preference",
|
|
3981
4043
|
returnType: { kind: "string" }
|
|
3982
4044
|
};
|
|
3983
|
-
function
|
|
4045
|
+
function _d() {
|
|
3984
4046
|
return typeof navigator > "u" ? "en-US" : navigator.language || "en-US";
|
|
3985
4047
|
}
|
|
3986
|
-
const
|
|
4048
|
+
const Td = {
|
|
3987
4049
|
name: "ikon.client.getTimezone",
|
|
3988
4050
|
description: "Get the browser timezone (IANA format)",
|
|
3989
4051
|
returnType: { kind: "string" }
|
|
3990
4052
|
};
|
|
3991
|
-
function
|
|
4053
|
+
function wd() {
|
|
3992
4054
|
try {
|
|
3993
4055
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
3994
4056
|
} catch {
|
|
@@ -4013,15 +4075,15 @@ function Dt() {
|
|
|
4013
4075
|
const t = navigator.maxTouchPoints > 0, e = window.innerWidth <= 1024;
|
|
4014
4076
|
return t && e ? ne.MobileWeb : ne.DesktopWeb;
|
|
4015
4077
|
}
|
|
4016
|
-
const
|
|
4078
|
+
const Sd = {
|
|
4017
4079
|
name: "ikon.client.getUrl",
|
|
4018
4080
|
description: "Get the current browser URL path and query string",
|
|
4019
4081
|
returnType: { kind: "string", nullable: !0 }
|
|
4020
4082
|
};
|
|
4021
|
-
function
|
|
4083
|
+
function gd() {
|
|
4022
4084
|
return typeof window > "u" ? null : window.location.pathname + window.location.search;
|
|
4023
4085
|
}
|
|
4024
|
-
const
|
|
4086
|
+
const Cd = {
|
|
4025
4087
|
name: "ikon.client.setUrl",
|
|
4026
4088
|
description: "Update the browser URL without triggering a page reload",
|
|
4027
4089
|
returnType: { kind: "boolean" },
|
|
@@ -4031,7 +4093,7 @@ const _d = {
|
|
|
4031
4093
|
{ name: "preserveQueryParams", type: { kind: "boolean", nullable: !0 }, description: "If true, preserves existing query parameters when the URL does not contain a query string" }
|
|
4032
4094
|
]
|
|
4033
4095
|
};
|
|
4034
|
-
function
|
|
4096
|
+
function Ad(t, e, n) {
|
|
4035
4097
|
if (typeof window > "u" || !window.history || typeof t != "string")
|
|
4036
4098
|
return !1;
|
|
4037
4099
|
const r = t.trim();
|
|
@@ -4044,13 +4106,13 @@ function Td(t, e, n) {
|
|
|
4044
4106
|
return !1;
|
|
4045
4107
|
}
|
|
4046
4108
|
}
|
|
4047
|
-
const
|
|
4109
|
+
const yd = {
|
|
4048
4110
|
name: "ikon.client.vibrate",
|
|
4049
4111
|
description: "Trigger haptic feedback on supported devices",
|
|
4050
4112
|
returnType: { kind: "boolean" },
|
|
4051
4113
|
parameters: [{ name: "pattern", type: { kind: "string" }, description: 'Duration in ms, or comma-separated pattern (e.g., "200" or "100,50,100")' }]
|
|
4052
4114
|
};
|
|
4053
|
-
function
|
|
4115
|
+
function bd(t) {
|
|
4054
4116
|
if (typeof navigator > "u" || !navigator.vibrate || typeof t != "string")
|
|
4055
4117
|
return !1;
|
|
4056
4118
|
try {
|
|
@@ -4061,7 +4123,7 @@ function Sd(t) {
|
|
|
4061
4123
|
}
|
|
4062
4124
|
}
|
|
4063
4125
|
let Z = null, it = !1, Ne = !1;
|
|
4064
|
-
async function
|
|
4126
|
+
async function Rd() {
|
|
4065
4127
|
if (!(typeof navigator > "u" || !("wakeLock" in navigator)))
|
|
4066
4128
|
try {
|
|
4067
4129
|
Z = await navigator.wakeLock.request("screen");
|
|
@@ -4069,15 +4131,15 @@ async function gd() {
|
|
|
4069
4131
|
}
|
|
4070
4132
|
}
|
|
4071
4133
|
function Kt() {
|
|
4072
|
-
document.visibilityState === "visible" && it && !Z &&
|
|
4134
|
+
document.visibilityState === "visible" && it && !Z && Rd();
|
|
4073
4135
|
}
|
|
4074
|
-
const
|
|
4136
|
+
const Nd = {
|
|
4075
4137
|
name: "ikon.client.keepScreenAwake",
|
|
4076
4138
|
description: "Prevent or allow the screen to sleep",
|
|
4077
4139
|
returnType: { kind: "boolean" },
|
|
4078
4140
|
parameters: [{ name: "enabled", type: { kind: "boolean" }, description: "Whether to keep the screen awake" }]
|
|
4079
4141
|
};
|
|
4080
|
-
async function
|
|
4142
|
+
async function kd(t) {
|
|
4081
4143
|
if (typeof navigator > "u" || !("wakeLock" in navigator))
|
|
4082
4144
|
return !1;
|
|
4083
4145
|
try {
|
|
@@ -4086,15 +4148,15 @@ async function Ad(t) {
|
|
|
4086
4148
|
return !1;
|
|
4087
4149
|
}
|
|
4088
4150
|
}
|
|
4089
|
-
const
|
|
4151
|
+
const Dd = {
|
|
4090
4152
|
name: "ikon.client.getVisibility",
|
|
4091
4153
|
description: "Get the current page visibility state",
|
|
4092
4154
|
returnType: { kind: "string", nullable: !0 }
|
|
4093
4155
|
};
|
|
4094
|
-
function
|
|
4156
|
+
function vd() {
|
|
4095
4157
|
return typeof document > "u" ? null : document.visibilityState || null;
|
|
4096
4158
|
}
|
|
4097
|
-
const
|
|
4159
|
+
const Ud = {
|
|
4098
4160
|
name: "ikon.client.scrollTo",
|
|
4099
4161
|
description: "Scroll the page to a specific position",
|
|
4100
4162
|
returnType: { kind: "boolean" },
|
|
@@ -4104,7 +4166,7 @@ const bd = {
|
|
|
4104
4166
|
{ name: "smooth", type: { kind: "boolean", nullable: !0 }, description: "Whether to animate the scroll" }
|
|
4105
4167
|
]
|
|
4106
4168
|
};
|
|
4107
|
-
function
|
|
4169
|
+
function Od(t, e, n) {
|
|
4108
4170
|
if (typeof window > "u" || typeof t != "number" || typeof e != "number")
|
|
4109
4171
|
return !1;
|
|
4110
4172
|
try {
|
|
@@ -4117,12 +4179,12 @@ function Nd(t, e, n) {
|
|
|
4117
4179
|
return !1;
|
|
4118
4180
|
}
|
|
4119
4181
|
}
|
|
4120
|
-
const
|
|
4182
|
+
const Md = {
|
|
4121
4183
|
name: "ikon.client.getBatteryLevel",
|
|
4122
4184
|
description: "Get the current battery level (0-100)",
|
|
4123
4185
|
returnType: { kind: "number", nullable: !0 }
|
|
4124
4186
|
};
|
|
4125
|
-
async function
|
|
4187
|
+
async function Pd() {
|
|
4126
4188
|
if (typeof navigator > "u" || !("getBattery" in navigator))
|
|
4127
4189
|
return null;
|
|
4128
4190
|
try {
|
|
@@ -4132,23 +4194,23 @@ async function Dd() {
|
|
|
4132
4194
|
return null;
|
|
4133
4195
|
}
|
|
4134
4196
|
}
|
|
4135
|
-
const
|
|
4197
|
+
const Ld = {
|
|
4136
4198
|
name: "ikon.client.getNetworkType",
|
|
4137
4199
|
description: "Get the current network connection type",
|
|
4138
4200
|
returnType: { kind: "string", nullable: !0 }
|
|
4139
4201
|
};
|
|
4140
|
-
function
|
|
4202
|
+
function Fd() {
|
|
4141
4203
|
if (typeof navigator > "u")
|
|
4142
4204
|
return null;
|
|
4143
4205
|
const t = navigator.connection;
|
|
4144
4206
|
return t && (t.effectiveType || t.type) || null;
|
|
4145
4207
|
}
|
|
4146
|
-
const
|
|
4208
|
+
const Bd = {
|
|
4147
4209
|
name: "ikon.client.requestFullscreen",
|
|
4148
4210
|
description: "Request the browser to enter fullscreen mode",
|
|
4149
4211
|
returnType: { kind: "boolean" }
|
|
4150
4212
|
};
|
|
4151
|
-
async function
|
|
4213
|
+
async function xd() {
|
|
4152
4214
|
if (typeof document > "u" || !document.documentElement)
|
|
4153
4215
|
return !1;
|
|
4154
4216
|
try {
|
|
@@ -4158,12 +4220,12 @@ async function Md() {
|
|
|
4158
4220
|
return !1;
|
|
4159
4221
|
}
|
|
4160
4222
|
}
|
|
4161
|
-
const
|
|
4223
|
+
const Wd = {
|
|
4162
4224
|
name: "ikon.client.exitFullscreen",
|
|
4163
4225
|
description: "Exit browser fullscreen mode",
|
|
4164
4226
|
returnType: { kind: "boolean" }
|
|
4165
4227
|
};
|
|
4166
|
-
function
|
|
4228
|
+
function Gd() {
|
|
4167
4229
|
if (typeof document > "u")
|
|
4168
4230
|
return !1;
|
|
4169
4231
|
try {
|
|
@@ -4173,12 +4235,12 @@ function Ld() {
|
|
|
4173
4235
|
return !1;
|
|
4174
4236
|
}
|
|
4175
4237
|
}
|
|
4176
|
-
const
|
|
4238
|
+
const Vd = {
|
|
4177
4239
|
name: "ikon.client.logout",
|
|
4178
4240
|
description: "Clear the auth session and reload the page to return to the login screen",
|
|
4179
4241
|
returnType: { kind: "boolean" }
|
|
4180
4242
|
};
|
|
4181
|
-
function
|
|
4243
|
+
function Hd() {
|
|
4182
4244
|
if (typeof window > "u" || !window.localStorage)
|
|
4183
4245
|
return !1;
|
|
4184
4246
|
try {
|
|
@@ -4187,25 +4249,25 @@ function Bd() {
|
|
|
4187
4249
|
return !1;
|
|
4188
4250
|
}
|
|
4189
4251
|
}
|
|
4190
|
-
const
|
|
4191
|
-
{ definition:
|
|
4192
|
-
{ definition:
|
|
4193
|
-
{ definition:
|
|
4194
|
-
{ definition:
|
|
4195
|
-
{ definition:
|
|
4196
|
-
{ definition: _d, handler: Td },
|
|
4197
|
-
{ definition: wd, handler: Sd },
|
|
4252
|
+
const $d = [
|
|
4253
|
+
{ definition: fd, handler: pd },
|
|
4254
|
+
{ definition: md, handler: Ed },
|
|
4255
|
+
{ definition: Id, handler: _d },
|
|
4256
|
+
{ definition: Td, handler: wd },
|
|
4257
|
+
{ definition: Sd, handler: gd },
|
|
4198
4258
|
{ definition: Cd, handler: Ad },
|
|
4199
|
-
{ definition: yd, handler:
|
|
4200
|
-
{ definition:
|
|
4201
|
-
{ definition:
|
|
4202
|
-
{ definition:
|
|
4203
|
-
{ definition:
|
|
4204
|
-
{ definition:
|
|
4205
|
-
{ definition:
|
|
4259
|
+
{ definition: yd, handler: bd },
|
|
4260
|
+
{ definition: Nd, handler: kd },
|
|
4261
|
+
{ definition: Dd, handler: vd },
|
|
4262
|
+
{ definition: Ud, handler: Od },
|
|
4263
|
+
{ definition: Md, handler: Pd },
|
|
4264
|
+
{ definition: Ld, handler: Fd },
|
|
4265
|
+
{ definition: Bd, handler: xd },
|
|
4266
|
+
{ definition: Wd, handler: Gd },
|
|
4267
|
+
{ definition: Vd, handler: Hd }
|
|
4206
4268
|
];
|
|
4207
|
-
function
|
|
4208
|
-
const e =
|
|
4269
|
+
function Kd(t) {
|
|
4270
|
+
const e = $d.map(({ definition: n, handler: r }) => t.register(n, r));
|
|
4209
4271
|
return () => e.forEach((n) => n());
|
|
4210
4272
|
}
|
|
4211
4273
|
function ze() {
|
|
@@ -4222,14 +4284,14 @@ function $e() {
|
|
|
4222
4284
|
return crypto.randomUUID();
|
|
4223
4285
|
}
|
|
4224
4286
|
}
|
|
4225
|
-
function
|
|
4287
|
+
function qf() {
|
|
4226
4288
|
if (!(typeof localStorage > "u"))
|
|
4227
4289
|
try {
|
|
4228
4290
|
localStorage.removeItem(ot);
|
|
4229
4291
|
} catch {
|
|
4230
4292
|
}
|
|
4231
4293
|
}
|
|
4232
|
-
function
|
|
4294
|
+
function Yd(t) {
|
|
4233
4295
|
try {
|
|
4234
4296
|
const e = t.split(".");
|
|
4235
4297
|
return e.length !== 3 ? null : JSON.parse(atob(e[1])).id ?? null;
|
|
@@ -4237,8 +4299,8 @@ function Gd(t) {
|
|
|
4237
4299
|
return null;
|
|
4238
4300
|
}
|
|
4239
4301
|
}
|
|
4240
|
-
const Be = {}, at = "https://api.prod.ikon.live", ct = "https://api.dev.ikon.live", Yt = "https://auth.ikonai.com", jt = "https://auth.dev.ikonai.com",
|
|
4241
|
-
function
|
|
4302
|
+
const Be = {}, at = "https://api.prod.ikon.live", ct = "https://api.dev.ikon.live", Yt = "https://auth.ikonai.com", jt = "https://auth.dev.ikonai.com", ep = "https://auth.ikonai.com";
|
|
4303
|
+
function Es(t) {
|
|
4242
4304
|
return t === "development" ? ct : at;
|
|
4243
4305
|
}
|
|
4244
4306
|
function zt(t) {
|
|
@@ -4246,14 +4308,14 @@ function zt(t) {
|
|
|
4246
4308
|
const e = typeof import.meta < "u" ? Be.VITE_IKON_BACKEND_URL : void 0;
|
|
4247
4309
|
return e || (typeof window > "u" ? at : !vt() || window.location.hostname.includes(".dev.") ? ct : at);
|
|
4248
4310
|
}
|
|
4249
|
-
function
|
|
4311
|
+
function tp() {
|
|
4250
4312
|
const t = typeof import.meta < "u" ? Be.VITE_IKON_BACKEND_TYPE : void 0;
|
|
4251
4313
|
if (t === "development" || t === "production")
|
|
4252
4314
|
return t;
|
|
4253
4315
|
const e = typeof import.meta < "u" ? Be.VITE_IKON_BACKEND_URL : void 0;
|
|
4254
4316
|
return e ? e.includes(".dev.") ? "development" : "production" : typeof window > "u" ? "production" : vt() ? window.location.hostname.includes(".dev.") ? "development" : "production" : "development";
|
|
4255
4317
|
}
|
|
4256
|
-
function
|
|
4318
|
+
function jd(t) {
|
|
4257
4319
|
if (t) return t;
|
|
4258
4320
|
const e = typeof import.meta < "u" ? Be.VITE_IKON_AUTH_URL : void 0;
|
|
4259
4321
|
return e || (typeof window > "u" ? Yt : !vt() || window.location.hostname.includes(".dev.") ? jt : Yt);
|
|
@@ -4266,8 +4328,8 @@ function Ke() {
|
|
|
4266
4328
|
e[n] = r;
|
|
4267
4329
|
return e;
|
|
4268
4330
|
}
|
|
4269
|
-
const
|
|
4270
|
-
function
|
|
4331
|
+
const zd = ["ikon_token", "ikon_provider", "error"];
|
|
4332
|
+
function np() {
|
|
4271
4333
|
if (typeof window > "u")
|
|
4272
4334
|
return { parameters: {} };
|
|
4273
4335
|
const t = window.location.pathname;
|
|
@@ -4279,7 +4341,7 @@ function Jf() {
|
|
|
4279
4341
|
throw new Error("URL cannot contain both /s/[sessionId] and /c/[channelKey]");
|
|
4280
4342
|
const i = Ke(), o = {};
|
|
4281
4343
|
for (const [a, c] of Object.entries(i))
|
|
4282
|
-
|
|
4344
|
+
zd.includes(a) || (o[a] = c);
|
|
4283
4345
|
return { sessionId: e, channelKey: n, parameters: o };
|
|
4284
4346
|
}
|
|
4285
4347
|
function vt() {
|
|
@@ -4297,7 +4359,7 @@ function vt() {
|
|
|
4297
4359
|
function Ut() {
|
|
4298
4360
|
return typeof window > "u" ? "" : window.location.pathname.replace(/^\/(s|c)\/[^/]+/, "") || "/";
|
|
4299
4361
|
}
|
|
4300
|
-
function
|
|
4362
|
+
function rp() {
|
|
4301
4363
|
if (typeof window > "u") return;
|
|
4302
4364
|
const t = window.location.pathname, e = t.match(/^\/s\/[^/]+/), n = t.match(/^\/c\/[^/]+/);
|
|
4303
4365
|
if (e || n) {
|
|
@@ -4305,8 +4367,8 @@ function Qf() {
|
|
|
4305
4367
|
window.history.replaceState(null, "", r + window.location.search);
|
|
4306
4368
|
}
|
|
4307
4369
|
}
|
|
4308
|
-
const Y = P("Authenticator"), oe = g.GROUP_CORE | g.GROUP_KEEPALIVE | g.GROUP_EVENTS | g.GROUP_ACTIONS | g.GROUP_UI | g.GROUP_AUDIO | g.GROUP_VIDEO | g.GROUP_ANALYTICS,
|
|
4309
|
-
async function
|
|
4370
|
+
const Y = P("Authenticator"), oe = g.GROUP_CORE | g.GROUP_KEEPALIVE | g.GROUP_EVENTS | g.GROUP_ACTIONS | g.GROUP_UI | g.GROUP_AUDIO | g.GROUP_VIDEO | g.GROUP_ANALYTICS, Xd = 1e3, Jd = 2, Qd = 6e4, Zd = 2e3, qd = 1e4, re = 3;
|
|
4371
|
+
async function eh(t, e, n, r) {
|
|
4310
4372
|
if (t)
|
|
4311
4373
|
try {
|
|
4312
4374
|
const s = await fetch(`${n}/anonymous`, {
|
|
@@ -4320,13 +4382,13 @@ async function zd(t, e, n, r) {
|
|
|
4320
4382
|
const i = await s.json();
|
|
4321
4383
|
if (!i.token)
|
|
4322
4384
|
return;
|
|
4323
|
-
const o =
|
|
4385
|
+
const o = Yd(i.token);
|
|
4324
4386
|
return o ? { userId: o, token: i.token } : void 0;
|
|
4325
4387
|
} catch {
|
|
4326
4388
|
return;
|
|
4327
4389
|
}
|
|
4328
4390
|
}
|
|
4329
|
-
async function
|
|
4391
|
+
async function th(t, e, n, r) {
|
|
4330
4392
|
try {
|
|
4331
4393
|
const s = await fetch(`${t}/profiles/me?space=${encodeURIComponent(e)}`, {
|
|
4332
4394
|
method: "GET",
|
|
@@ -4359,15 +4421,15 @@ async function _s(t, e, n, r, s, i, o) {
|
|
|
4359
4421
|
}, l = await fetch(a, Is(c, i, o));
|
|
4360
4422
|
if (!l.ok) {
|
|
4361
4423
|
const h = await l.text().catch(() => "Unknown error");
|
|
4362
|
-
throw new
|
|
4424
|
+
throw new R(`Failed to request channel: ${l.status} ${h}`);
|
|
4363
4425
|
}
|
|
4364
4426
|
return await l.json();
|
|
4365
4427
|
}
|
|
4366
|
-
async function
|
|
4428
|
+
async function nh(t, e, n, r) {
|
|
4367
4429
|
const s = `${t}/rooms/connect`, i = await fetch(s, Is(e, n, r));
|
|
4368
4430
|
if (!i.ok) {
|
|
4369
4431
|
const o = await i.text().catch(() => "Unknown error");
|
|
4370
|
-
throw new
|
|
4432
|
+
throw new R(`Backend connect failed: ${i.status} ${o}`);
|
|
4371
4433
|
}
|
|
4372
4434
|
return i.json();
|
|
4373
4435
|
}
|
|
@@ -4375,35 +4437,35 @@ async function Ts(t, e, n, r, s) {
|
|
|
4375
4437
|
const i = Date.now();
|
|
4376
4438
|
for (; ; ) {
|
|
4377
4439
|
if (s?.aborted)
|
|
4378
|
-
throw new
|
|
4440
|
+
throw new R("Connection aborted");
|
|
4379
4441
|
if (Date.now() - i >= n)
|
|
4380
|
-
throw new
|
|
4381
|
-
const a = await
|
|
4442
|
+
throw new Mu(n);
|
|
4443
|
+
const a = await nh(t, e, r, s), c = a.state?.toLowerCase();
|
|
4382
4444
|
if (c === "running")
|
|
4383
4445
|
return a;
|
|
4384
4446
|
if (c === "provisioning") {
|
|
4385
|
-
await yt(
|
|
4447
|
+
await yt(Xd, s);
|
|
4386
4448
|
continue;
|
|
4387
4449
|
}
|
|
4388
|
-
throw new
|
|
4450
|
+
throw new R(`Unexpected channel state: ${a.state}`);
|
|
4389
4451
|
}
|
|
4390
4452
|
}
|
|
4391
4453
|
async function xe(t, e) {
|
|
4392
|
-
const n = await fetch(t, { signal:
|
|
4393
|
-
if (!
|
|
4394
|
-
const
|
|
4395
|
-
throw new
|
|
4454
|
+
const n = AbortSignal.timeout(qd), r = e ? AbortSignal.any([e, n]) : n, s = await fetch(t, { signal: r });
|
|
4455
|
+
if (!s.ok) {
|
|
4456
|
+
const c = await s.text().catch(() => "Unknown error");
|
|
4457
|
+
throw new R(`Failed to connect: ${s.status} ${c}`);
|
|
4396
4458
|
}
|
|
4397
|
-
const
|
|
4398
|
-
return { authResponse: await
|
|
4459
|
+
const i = await s.arrayBuffer(), o = new Uint8Array(i);
|
|
4460
|
+
return { authResponse: await Oo(o) };
|
|
4399
4461
|
}
|
|
4400
4462
|
async function ws(t, e, n, r, s) {
|
|
4401
4463
|
const i = [];
|
|
4402
4464
|
if (n === "force-proxy" ? e && i.push({ url: e, isProxy: !0 }) : n === "force-direct" ? i.push({ url: t, isProxy: !1 }) : r ? (e && i.push({ url: e, isProxy: !0 }), i.push({ url: t, isProxy: !1 })) : (i.push({ url: t, isProxy: !1 }), e && i.push({ url: e, isProxy: !0 })), i.length === 0)
|
|
4403
|
-
throw new
|
|
4465
|
+
throw new R("No connect URL available");
|
|
4404
4466
|
const o = Date.now();
|
|
4405
4467
|
let a = 0;
|
|
4406
|
-
for (; a <
|
|
4468
|
+
for (; a < Jd || Date.now() - o < Qd; ) {
|
|
4407
4469
|
for (const c of i)
|
|
4408
4470
|
try {
|
|
4409
4471
|
const l = await xe(c.url, s);
|
|
@@ -4411,13 +4473,13 @@ async function ws(t, e, n, r, s) {
|
|
|
4411
4473
|
} catch (l) {
|
|
4412
4474
|
Y.warn(`Auth via ${c.isProxy ? "proxy" : "direct"} URL failed (round ${a + 1}): ${l}`);
|
|
4413
4475
|
}
|
|
4414
|
-
a++, await yt(
|
|
4476
|
+
a++, await yt(Zd, s);
|
|
4415
4477
|
}
|
|
4416
|
-
throw new
|
|
4478
|
+
throw new R("Failed to connect after exhausting all URL attempts");
|
|
4417
4479
|
}
|
|
4418
|
-
function
|
|
4419
|
-
const n =
|
|
4420
|
-
return
|
|
4480
|
+
function rh(t, e) {
|
|
4481
|
+
const n = Rt();
|
|
4482
|
+
return Lo({
|
|
4421
4483
|
ServerSessionId: "",
|
|
4422
4484
|
// Server will fill this in
|
|
4423
4485
|
ContextType: de.Browser,
|
|
@@ -4450,7 +4512,7 @@ function Qd(t, e) {
|
|
|
4450
4512
|
InitialPath: Ut()
|
|
4451
4513
|
});
|
|
4452
4514
|
}
|
|
4453
|
-
function
|
|
4515
|
+
function sh(t) {
|
|
4454
4516
|
return {
|
|
4455
4517
|
ServerSessionId: t.ServerSessionId,
|
|
4456
4518
|
ContextType: t.ContextType,
|
|
@@ -4483,13 +4545,13 @@ function Zd(t) {
|
|
|
4483
4545
|
InitialPath: t.InitialPath
|
|
4484
4546
|
};
|
|
4485
4547
|
}
|
|
4486
|
-
async function
|
|
4548
|
+
async function ih(t, e) {
|
|
4487
4549
|
const n = `https://${t.host}:${t.httpsPort}`;
|
|
4488
4550
|
Y.debug(`Authenticating with local server: ${n}`);
|
|
4489
4551
|
const s = { ...Ke(), ...t.parameters }, i = t.deviceId ?? $e();
|
|
4490
4552
|
let o = t.userId, a = t.token;
|
|
4491
4553
|
if (!o) {
|
|
4492
|
-
const S = await
|
|
4554
|
+
const S = await eh(t.spaceId, i, jd(t.authUrl), e);
|
|
4493
4555
|
S && (o = S.userId, a = S.token);
|
|
4494
4556
|
}
|
|
4495
4557
|
if (o || (o = i, Y.debug("Using deviceId as userId fallback")), t.spaceId && a)
|
|
@@ -4500,12 +4562,12 @@ async function qd(t, e) {
|
|
|
4500
4562
|
signal: e
|
|
4501
4563
|
});
|
|
4502
4564
|
if (!T.ok) {
|
|
4503
|
-
const
|
|
4504
|
-
throw new
|
|
4565
|
+
const E = await T.text().catch(() => "Unknown error");
|
|
4566
|
+
throw new R(`Failed to get or create profile: ${T.status} ${E}`);
|
|
4505
4567
|
}
|
|
4506
4568
|
} else
|
|
4507
|
-
await
|
|
4508
|
-
const c =
|
|
4569
|
+
await th(zt(t.backendUrl), t.spaceId, a, e);
|
|
4570
|
+
const c = rh({ ...t, parameters: s }, o), l = sh(c), p = await fetch(`${n}/connect-token`, {
|
|
4509
4571
|
method: "POST",
|
|
4510
4572
|
headers: {
|
|
4511
4573
|
"Content-Type": "application/json"
|
|
@@ -4515,18 +4577,18 @@ async function qd(t, e) {
|
|
|
4515
4577
|
});
|
|
4516
4578
|
if (!p.ok) {
|
|
4517
4579
|
const S = await p.text().catch(() => "Unknown error");
|
|
4518
|
-
throw new
|
|
4580
|
+
throw new R(`Failed to get connect token: ${p.status} ${S}`);
|
|
4519
4581
|
}
|
|
4520
4582
|
const d = (await p.json()).token;
|
|
4521
4583
|
if (!d)
|
|
4522
|
-
throw new
|
|
4523
|
-
const
|
|
4524
|
-
return xe(
|
|
4584
|
+
throw new R("Server did not return a token");
|
|
4585
|
+
const m = `${n}/connect?token=${encodeURIComponent(d)}`;
|
|
4586
|
+
return xe(m, e);
|
|
4525
4587
|
}
|
|
4526
|
-
async function
|
|
4588
|
+
async function oh(t, e, n = "auto", r = !1) {
|
|
4527
4589
|
if (t.sessionId && t.channelKey)
|
|
4528
|
-
throw new
|
|
4529
|
-
const s =
|
|
4590
|
+
throw new R("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
4591
|
+
const s = Es(t.backendType);
|
|
4530
4592
|
Y.debug(`Authenticating with cloud server: ${s}, space ID: ${t.spaceId}`);
|
|
4531
4593
|
const i = await fetch(`${s}/auth/api-key`, {
|
|
4532
4594
|
method: "POST",
|
|
@@ -4542,11 +4604,11 @@ async function eh(t, e, n = "auto", r = !1) {
|
|
|
4542
4604
|
});
|
|
4543
4605
|
if (!i.ok) {
|
|
4544
4606
|
const l = await i.text().catch(() => "Unknown error");
|
|
4545
|
-
throw new
|
|
4607
|
+
throw new R(`API key authentication failed: ${i.status} ${l}`);
|
|
4546
4608
|
}
|
|
4547
4609
|
const a = (await i.json()).token;
|
|
4548
4610
|
if (!a)
|
|
4549
|
-
throw new
|
|
4611
|
+
throw new R("Backend did not return a token");
|
|
4550
4612
|
const c = await fetch(`${s}/profiles/me?space=${encodeURIComponent(t.spaceId)}`, {
|
|
4551
4613
|
method: "GET",
|
|
4552
4614
|
headers: {
|
|
@@ -4556,11 +4618,11 @@ async function eh(t, e, n = "auto", r = !1) {
|
|
|
4556
4618
|
});
|
|
4557
4619
|
if (!c.ok) {
|
|
4558
4620
|
const l = await c.text().catch(() => "Unknown error");
|
|
4559
|
-
throw new
|
|
4621
|
+
throw new R(`Failed to get or create profile: ${c.status} ${l}`);
|
|
4560
4622
|
}
|
|
4561
4623
|
for (let l = 0; l < re; l++)
|
|
4562
4624
|
try {
|
|
4563
|
-
const p = await _s(s, t.spaceId, t.channelKey, t.parameters, t.sessionId, a, e), h = Ke(), d =
|
|
4625
|
+
const p = await _s(s, t.spaceId, t.channelKey, t.parameters, t.sessionId, a, e), h = Ke(), d = Rt(), m = {
|
|
4564
4626
|
code: p.code,
|
|
4565
4627
|
contextType: de.Plugin,
|
|
4566
4628
|
userType: t.userType ?? fe.Human,
|
|
@@ -4585,9 +4647,9 @@ async function eh(t, e, n = "auto", r = !1) {
|
|
|
4585
4647
|
timezone: Nt(),
|
|
4586
4648
|
isTouchDevice: kt(),
|
|
4587
4649
|
initialPath: Ut()
|
|
4588
|
-
}, S = t.provisioningTimeoutMs ?? ps, T = await Ts(s,
|
|
4650
|
+
}, S = t.provisioningTimeoutMs ?? ps, T = await Ts(s, m, S, a, e);
|
|
4589
4651
|
if (!T.configuration?.url)
|
|
4590
|
-
throw new
|
|
4652
|
+
throw new R("Backend did not return a connect URL");
|
|
4591
4653
|
return await ws(
|
|
4592
4654
|
T.configuration.url,
|
|
4593
4655
|
T.configuration.proxyUrl,
|
|
@@ -4600,12 +4662,12 @@ async function eh(t, e, n = "auto", r = !1) {
|
|
|
4600
4662
|
throw p;
|
|
4601
4663
|
Y.warn(`Provision attempt ${l + 1}/${re} failed, retrying: ${p}`);
|
|
4602
4664
|
}
|
|
4603
|
-
throw new
|
|
4665
|
+
throw new R("Failed to provision after all attempts");
|
|
4604
4666
|
}
|
|
4605
|
-
async function
|
|
4667
|
+
async function ah(t, e, n = "auto", r = !1) {
|
|
4606
4668
|
if (t.sessionId && t.channelKey)
|
|
4607
|
-
throw new
|
|
4608
|
-
const s =
|
|
4669
|
+
throw new R("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
4670
|
+
const s = Es(t.backendType), i = t.token;
|
|
4609
4671
|
Y.debug(`Authenticating with session token to: ${s}, space ID: ${t.spaceId}`);
|
|
4610
4672
|
const o = await fetch(`${s}/profiles/me?space=${encodeURIComponent(t.spaceId)}`, {
|
|
4611
4673
|
method: "GET",
|
|
@@ -4616,11 +4678,11 @@ async function th(t, e, n = "auto", r = !1) {
|
|
|
4616
4678
|
});
|
|
4617
4679
|
if (!o.ok) {
|
|
4618
4680
|
const a = await o.text().catch(() => "Unknown error");
|
|
4619
|
-
throw new
|
|
4681
|
+
throw new R(`Failed to get or create profile: ${o.status} ${a}`);
|
|
4620
4682
|
}
|
|
4621
4683
|
for (let a = 0; a < re; a++)
|
|
4622
4684
|
try {
|
|
4623
|
-
const c = await _s(s, t.spaceId, t.channelKey, t.parameters, t.sessionId, i, e), l = Ke(), p =
|
|
4685
|
+
const c = await _s(s, t.spaceId, t.channelKey, t.parameters, t.sessionId, i, e), l = Ke(), p = Rt(), h = {
|
|
4624
4686
|
code: c.code,
|
|
4625
4687
|
contextType: de.Browser,
|
|
4626
4688
|
userType: fe.Human,
|
|
@@ -4645,12 +4707,12 @@ async function th(t, e, n = "auto", r = !1) {
|
|
|
4645
4707
|
timezone: Nt(),
|
|
4646
4708
|
isTouchDevice: kt(),
|
|
4647
4709
|
initialPath: Ut()
|
|
4648
|
-
}, d = t.provisioningTimeoutMs ?? ps,
|
|
4649
|
-
if (!
|
|
4650
|
-
throw new
|
|
4710
|
+
}, d = t.provisioningTimeoutMs ?? ps, m = await Ts(s, h, d, i, e);
|
|
4711
|
+
if (!m.configuration?.url)
|
|
4712
|
+
throw new R("Backend did not return a connect URL");
|
|
4651
4713
|
return await ws(
|
|
4652
|
-
|
|
4653
|
-
|
|
4714
|
+
m.configuration.url,
|
|
4715
|
+
m.configuration.proxyUrl,
|
|
4654
4716
|
n,
|
|
4655
4717
|
r,
|
|
4656
4718
|
e
|
|
@@ -4660,9 +4722,9 @@ async function th(t, e, n = "auto", r = !1) {
|
|
|
4660
4722
|
throw c;
|
|
4661
4723
|
Y.warn(`Provision attempt ${a + 1}/${re} failed, retrying: ${c}`);
|
|
4662
4724
|
}
|
|
4663
|
-
throw new
|
|
4725
|
+
throw new R("Failed to provision after all attempts");
|
|
4664
4726
|
}
|
|
4665
|
-
const
|
|
4727
|
+
const ch = "ikon-proxy", lh = "ikon-websocket", uh = "ikon-webtransport", Ss = "ikon-debug", dh = "ikon-lang", hh = "ikon-server-url", sp = "ikon-git-source", ip = "ikon-git-branch", fh = "ikon-audio", ph = "ikon-video", mh = "ikon-webrtc";
|
|
4666
4728
|
function Ot(t, e) {
|
|
4667
4729
|
if (typeof window > "u")
|
|
4668
4730
|
return null;
|
|
@@ -4676,40 +4738,40 @@ function te(t, e) {
|
|
|
4676
4738
|
const n = Ot(t);
|
|
4677
4739
|
return n === "true" ? !0 : n === "false" ? !1 : null;
|
|
4678
4740
|
}
|
|
4679
|
-
function
|
|
4741
|
+
function Eh(t, e) {
|
|
4680
4742
|
if (typeof window > "u")
|
|
4681
4743
|
return;
|
|
4682
4744
|
const n = new URL(window.location.href);
|
|
4683
4745
|
n.searchParams.get(t) !== e && (n.searchParams.set(t, e), window.history.replaceState(null, "", n.toString()));
|
|
4684
4746
|
}
|
|
4685
|
-
function
|
|
4686
|
-
return te(
|
|
4747
|
+
function Ih() {
|
|
4748
|
+
return te(ch);
|
|
4687
4749
|
}
|
|
4688
|
-
function
|
|
4689
|
-
return te(
|
|
4750
|
+
function _h() {
|
|
4751
|
+
return te(lh);
|
|
4690
4752
|
}
|
|
4691
|
-
function
|
|
4692
|
-
return te(
|
|
4753
|
+
function Th() {
|
|
4754
|
+
return te(uh);
|
|
4693
4755
|
}
|
|
4694
|
-
function
|
|
4756
|
+
function wh() {
|
|
4695
4757
|
return te(Ss) === !0;
|
|
4696
4758
|
}
|
|
4697
|
-
function
|
|
4698
|
-
return Ot(
|
|
4759
|
+
function op() {
|
|
4760
|
+
return Ot(dh);
|
|
4699
4761
|
}
|
|
4700
|
-
function
|
|
4701
|
-
return Ot(
|
|
4762
|
+
function Sh() {
|
|
4763
|
+
return Ot(hh);
|
|
4702
4764
|
}
|
|
4703
|
-
function
|
|
4704
|
-
return te(
|
|
4765
|
+
function gh() {
|
|
4766
|
+
return te(fh);
|
|
4705
4767
|
}
|
|
4706
|
-
function
|
|
4707
|
-
return te(
|
|
4768
|
+
function Ch() {
|
|
4769
|
+
return te(ph);
|
|
4708
4770
|
}
|
|
4709
|
-
function
|
|
4710
|
-
return te(
|
|
4771
|
+
function Ah() {
|
|
4772
|
+
return te(mh);
|
|
4711
4773
|
}
|
|
4712
|
-
const
|
|
4774
|
+
const yh = new Uint8Array(0);
|
|
4713
4775
|
function We(t) {
|
|
4714
4776
|
switch (t.kind) {
|
|
4715
4777
|
case "array":
|
|
@@ -4769,7 +4831,7 @@ function gs(t, e) {
|
|
|
4769
4831
|
}
|
|
4770
4832
|
return JSON.stringify(t);
|
|
4771
4833
|
}
|
|
4772
|
-
function
|
|
4834
|
+
function bh(t, e) {
|
|
4773
4835
|
const n = (t.parameters ?? []).map((i) => {
|
|
4774
4836
|
const o = We(i.type), a = Object.prototype.hasOwnProperty.call(i, "defaultValue"), c = a ? gs(i.defaultValue, o) : "";
|
|
4775
4837
|
return {
|
|
@@ -4797,7 +4859,7 @@ function wh(t, e) {
|
|
|
4797
4859
|
TypeName: Ae(i.descriptor),
|
|
4798
4860
|
HasDefaultValue: i.hasDefaultValue,
|
|
4799
4861
|
DefaultValueJson: i.defaultValueJson,
|
|
4800
|
-
DefaultValueData:
|
|
4862
|
+
DefaultValueData: yh,
|
|
4801
4863
|
IsEnumerable: !1,
|
|
4802
4864
|
EnumerableItemTypeName: "",
|
|
4803
4865
|
Description: i.description ?? ""
|
|
@@ -4811,19 +4873,19 @@ function wh(t, e) {
|
|
|
4811
4873
|
returnType: r
|
|
4812
4874
|
};
|
|
4813
4875
|
}
|
|
4814
|
-
function
|
|
4876
|
+
function Rh(t, e) {
|
|
4815
4877
|
return { value: t, data: e };
|
|
4816
4878
|
}
|
|
4817
|
-
class
|
|
4879
|
+
class Nh extends Error {
|
|
4818
4880
|
constructor(e, n, r) {
|
|
4819
4881
|
super(e), this.remoteErrorType = n, this.remoteStackTrace = r, this.name = "FunctionCallError";
|
|
4820
4882
|
}
|
|
4821
4883
|
}
|
|
4822
|
-
const
|
|
4823
|
-
function
|
|
4884
|
+
const Ee = P("FunctionRegistry"), Jt = new Uint8Array(0), Qt = 3e4;
|
|
4885
|
+
function kh(t) {
|
|
4824
4886
|
return !t || typeof t != "object" ? !1 : t.data instanceof Uint8Array;
|
|
4825
4887
|
}
|
|
4826
|
-
class
|
|
4888
|
+
class Dh {
|
|
4827
4889
|
functions = /* @__PURE__ */ new Map();
|
|
4828
4890
|
remoteFunctions = /* @__PURE__ */ new Map();
|
|
4829
4891
|
pendingCalls = /* @__PURE__ */ new Map();
|
|
@@ -4850,7 +4912,7 @@ class Ah {
|
|
|
4850
4912
|
* If already connected, sends registration to server immediately.
|
|
4851
4913
|
*/
|
|
4852
4914
|
register(e, n) {
|
|
4853
|
-
const r =
|
|
4915
|
+
const r = bh(e, n);
|
|
4854
4916
|
return this.functions.set(e.name, r), this.isConnected && this.config && this.sendRegistration(r), () => this.unregister(e.name);
|
|
4855
4917
|
}
|
|
4856
4918
|
/**
|
|
@@ -4915,7 +4977,7 @@ class Ah {
|
|
|
4915
4977
|
ValueJson: "",
|
|
4916
4978
|
ValueData: h
|
|
4917
4979
|
});
|
|
4918
|
-
const
|
|
4980
|
+
const m = s.parameters[d], S = m ? m.TypeName : this.inferTypeName(h);
|
|
4919
4981
|
return et({
|
|
4920
4982
|
ParameterIndex: d,
|
|
4921
4983
|
TypeName: S,
|
|
@@ -4930,17 +4992,17 @@ class Ah {
|
|
|
4930
4992
|
Parameters: a,
|
|
4931
4993
|
Scopes: [],
|
|
4932
4994
|
Version: ""
|
|
4933
|
-
}), p =
|
|
4995
|
+
}), p = Qo(l, this.config.sessionId, {
|
|
4934
4996
|
targetIds: [s.clientSessionId]
|
|
4935
4997
|
});
|
|
4936
4998
|
return new Promise((h, d) => {
|
|
4937
|
-
const
|
|
4999
|
+
const m = setTimeout(() => {
|
|
4938
5000
|
this.pendingCalls.delete(o.toString()), d(new Error(`Function call '${e}' timed out after ${Qt}ms`));
|
|
4939
5001
|
}, Qt);
|
|
4940
5002
|
this.pendingCalls.set(o.toString(), {
|
|
4941
5003
|
resolve: h,
|
|
4942
5004
|
reject: d,
|
|
4943
|
-
timeout:
|
|
5005
|
+
timeout: m
|
|
4944
5006
|
}), this.config.sendProtocolMessage(p);
|
|
4945
5007
|
});
|
|
4946
5008
|
}
|
|
@@ -4950,10 +5012,10 @@ class Ah {
|
|
|
4950
5012
|
disposeInstance(e, n) {
|
|
4951
5013
|
if (!this.isConnected || !this.config)
|
|
4952
5014
|
throw new Error("Not connected");
|
|
4953
|
-
const r =
|
|
5015
|
+
const r = la({
|
|
4954
5016
|
CallId: w.createZero(),
|
|
4955
5017
|
InstanceId: w.fromString(e)
|
|
4956
|
-
}), s =
|
|
5018
|
+
}), s = fa(r, this.config.sessionId, {
|
|
4957
5019
|
targetIds: [n]
|
|
4958
5020
|
});
|
|
4959
5021
|
this.config.sendProtocolMessage(s);
|
|
@@ -5005,15 +5067,15 @@ class Ah {
|
|
|
5005
5067
|
if (n === g.ACTION_FUNCTION_CALL) {
|
|
5006
5068
|
const r = ce(e);
|
|
5007
5069
|
return this.handleFunctionCall(e, r.senderId).catch((s) => {
|
|
5008
|
-
|
|
5070
|
+
Ee.error("Failed to handle function call:", s);
|
|
5009
5071
|
}), !0;
|
|
5010
5072
|
}
|
|
5011
5073
|
return n === g.ACTION_FUNCTION_RESULT ? (this.handleFunctionResult(e), !0) : n === g.ACTION_FUNCTION_ERROR ? (this.handleFunctionError(e), !0) : !1;
|
|
5012
5074
|
}
|
|
5013
5075
|
handleFunctionResult(e) {
|
|
5014
|
-
const n =
|
|
5076
|
+
const n = ja(e), r = n.CallId.toString(), s = this.pendingCalls.get(r);
|
|
5015
5077
|
if (!s) {
|
|
5016
|
-
|
|
5078
|
+
Ee.warn(`Received result for unknown call: ${r}`);
|
|
5017
5079
|
return;
|
|
5018
5080
|
}
|
|
5019
5081
|
if (this.pendingCalls.delete(r), clearTimeout(s.timeout), n.ResultData && n.ResultData.length > 0 && !n.ResultJson) {
|
|
@@ -5024,12 +5086,12 @@ class Ah {
|
|
|
5024
5086
|
s.resolve(i);
|
|
5025
5087
|
}
|
|
5026
5088
|
handleFunctionError(e) {
|
|
5027
|
-
const n =
|
|
5089
|
+
const n = wa(e), r = n.CallId.toString(), s = this.pendingCalls.get(r);
|
|
5028
5090
|
if (!s) {
|
|
5029
|
-
|
|
5091
|
+
Ee.warn(`Received error for unknown call: ${r}`);
|
|
5030
5092
|
return;
|
|
5031
5093
|
}
|
|
5032
|
-
this.pendingCalls.delete(r), clearTimeout(s.timeout), s.reject(new
|
|
5094
|
+
this.pendingCalls.delete(r), clearTimeout(s.timeout), s.reject(new Nh(n.ErrorMessage, n.ErrorTypeName, n.StackTrace));
|
|
5033
5095
|
}
|
|
5034
5096
|
inferTypeName(e) {
|
|
5035
5097
|
if (e == null)
|
|
@@ -5054,7 +5116,7 @@ class Ah {
|
|
|
5054
5116
|
sendAllRegistrations() {
|
|
5055
5117
|
if (!this.config || this.functions.size === 0)
|
|
5056
5118
|
return;
|
|
5057
|
-
const e = Array.from(this.functions.values()).map((s) => s.registerPayload), n =
|
|
5119
|
+
const e = Array.from(this.functions.values()).map((s) => s.registerPayload), n = La({ Functions: e }), r = Wa(n, this.config.sessionId);
|
|
5058
5120
|
this.config.sendProtocolMessage(r);
|
|
5059
5121
|
}
|
|
5060
5122
|
/**
|
|
@@ -5063,16 +5125,16 @@ class Ah {
|
|
|
5063
5125
|
sendRegistration(e) {
|
|
5064
5126
|
if (!this.config)
|
|
5065
5127
|
return;
|
|
5066
|
-
const n =
|
|
5128
|
+
const n = ba(e.registerPayload, this.config.sessionId);
|
|
5067
5129
|
this.config.sendProtocolMessage(n);
|
|
5068
5130
|
}
|
|
5069
5131
|
/**
|
|
5070
5132
|
* Handle an incoming function call.
|
|
5071
5133
|
*/
|
|
5072
5134
|
async handleFunctionCall(e, n) {
|
|
5073
|
-
const r = await
|
|
5135
|
+
const r = await Zo(e), s = this.functions.get(r.FunctionName);
|
|
5074
5136
|
if (!s) {
|
|
5075
|
-
|
|
5137
|
+
Ee.warn(`Received call for unknown function: ${r.FunctionName}`), this.sendError(r.CallId, r.InstanceId, n, new Error(`Unknown function: ${r.FunctionName}`));
|
|
5076
5138
|
return;
|
|
5077
5139
|
}
|
|
5078
5140
|
this.sendAck(r.CallId, r.InstanceId, n), this.executeFunction(s, r, n);
|
|
@@ -5094,11 +5156,11 @@ class Ah {
|
|
|
5094
5156
|
}
|
|
5095
5157
|
const i = await e.handler(...s);
|
|
5096
5158
|
let o = i, a = Jt;
|
|
5097
|
-
|
|
5159
|
+
kh(i) && (o = i.value, a = new Uint8Array(i.data));
|
|
5098
5160
|
const c = gs(o, e.returnType);
|
|
5099
5161
|
this.sendResult(n.CallId, n.InstanceId, r, e, c, a);
|
|
5100
5162
|
} catch (s) {
|
|
5101
|
-
|
|
5163
|
+
Ee.error(`Function ${n.FunctionName} execution failed:`, s), this.sendError(n.CallId, n.InstanceId, r, s instanceof Error ? s : new Error(String(s)));
|
|
5102
5164
|
}
|
|
5103
5165
|
}
|
|
5104
5166
|
/**
|
|
@@ -5107,7 +5169,7 @@ class Ah {
|
|
|
5107
5169
|
sendAck(e, n, r) {
|
|
5108
5170
|
if (!this.config)
|
|
5109
5171
|
return;
|
|
5110
|
-
const s =
|
|
5172
|
+
const s = Ko(Go({ CallId: e, InstanceId: n }), this.config.sessionId, { targetIds: [r] });
|
|
5111
5173
|
this.config.sendProtocolMessage(s);
|
|
5112
5174
|
}
|
|
5113
5175
|
/**
|
|
@@ -5116,7 +5178,7 @@ class Ah {
|
|
|
5116
5178
|
sendResult(e, n, r, s, i, o) {
|
|
5117
5179
|
if (!this.config)
|
|
5118
5180
|
return;
|
|
5119
|
-
const a =
|
|
5181
|
+
const a = Ya(
|
|
5120
5182
|
Or({
|
|
5121
5183
|
CallId: e,
|
|
5122
5184
|
InstanceId: n,
|
|
@@ -5135,7 +5197,7 @@ class Ah {
|
|
|
5135
5197
|
sendError(e, n, r, s) {
|
|
5136
5198
|
if (!this.config)
|
|
5137
5199
|
return;
|
|
5138
|
-
const i =
|
|
5200
|
+
const i = Ta(
|
|
5139
5201
|
qn({
|
|
5140
5202
|
CallId: e,
|
|
5141
5203
|
InstanceId: n,
|
|
@@ -5163,7 +5225,7 @@ const ye = {
|
|
|
5163
5225
|
StopCapture: "ikon.client.stopCapture",
|
|
5164
5226
|
CaptureImage: "ikon.client.captureImage",
|
|
5165
5227
|
GetMediaDevices: "ikon.client.getMediaDevices"
|
|
5166
|
-
},
|
|
5228
|
+
}, vh = {
|
|
5167
5229
|
name: ye.StartVideoCapture,
|
|
5168
5230
|
description: "Start camera or screen capture and stream video frames to the server",
|
|
5169
5231
|
returnType: { kind: "string" },
|
|
@@ -5171,31 +5233,31 @@ const ye = {
|
|
|
5171
5233
|
{ name: "source", type: { kind: "string", nullable: !0 }, description: "camera or screen" },
|
|
5172
5234
|
{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }
|
|
5173
5235
|
]
|
|
5174
|
-
},
|
|
5236
|
+
}, Uh = {
|
|
5175
5237
|
name: ye.StartAudioCapture,
|
|
5176
5238
|
description: "Start microphone capture and stream audio frames to the server",
|
|
5177
5239
|
returnType: { kind: "string" },
|
|
5178
5240
|
parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
|
|
5179
|
-
},
|
|
5241
|
+
}, Oh = {
|
|
5180
5242
|
name: ye.StopCapture,
|
|
5181
5243
|
description: "Stop a previously started capture by streamId",
|
|
5182
5244
|
returnType: { kind: "boolean" },
|
|
5183
5245
|
parameters: [{ name: "streamId", type: { kind: "string" }, description: "Stream ID to stop" }]
|
|
5184
|
-
},
|
|
5246
|
+
}, Mh = {
|
|
5185
5247
|
name: ye.CaptureImage,
|
|
5186
5248
|
description: "Capture a single image from the camera and return metadata (JSON) plus binary image data",
|
|
5187
5249
|
returnType: { kind: "string" },
|
|
5188
5250
|
parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
|
|
5189
|
-
},
|
|
5251
|
+
}, Ph = {
|
|
5190
5252
|
name: ye.GetMediaDevices,
|
|
5191
5253
|
description: "Get list of available media input devices",
|
|
5192
5254
|
returnType: { kind: "string" },
|
|
5193
5255
|
parameters: []
|
|
5194
5256
|
};
|
|
5195
|
-
function
|
|
5257
|
+
function Lh(t, e) {
|
|
5196
5258
|
const n = [];
|
|
5197
5259
|
return n.push(
|
|
5198
|
-
t.register(
|
|
5260
|
+
t.register(vh, async (r, s) => {
|
|
5199
5261
|
if (e.isWebRtcEnabled) {
|
|
5200
5262
|
const l = e.webRtcSignaling;
|
|
5201
5263
|
if (!l)
|
|
@@ -5210,7 +5272,7 @@ function Dh(t, e) {
|
|
|
5210
5272
|
return ((typeof r == "string" && r.trim().toLowerCase() === "screen" ? "screen" : "camera") === "screen" ? await i.video.startScreen({ userGesture: !1, options: o, constraints: o?.constraints }) : await i.video.startCamera({ userGesture: !1, options: o, constraints: o?.constraints })).streamId;
|
|
5211
5273
|
})
|
|
5212
5274
|
), n.push(
|
|
5213
|
-
t.register(
|
|
5275
|
+
t.register(Uh, async (r) => {
|
|
5214
5276
|
if (e.isWebRtcEnabled) {
|
|
5215
5277
|
const a = e.webRtcSignaling;
|
|
5216
5278
|
if (!a)
|
|
@@ -5225,7 +5287,7 @@ function Dh(t, e) {
|
|
|
5225
5287
|
return (await s.audio.startMic({ userGesture: !1, options: i, constraints: i?.constraints })).streamId;
|
|
5226
5288
|
})
|
|
5227
5289
|
), n.push(
|
|
5228
|
-
t.register(
|
|
5290
|
+
t.register(Oh, async (r) => {
|
|
5229
5291
|
if (e.isWebRtcEnabled) {
|
|
5230
5292
|
const a = e.webRtcSignaling;
|
|
5231
5293
|
return a && await a.stopCapture(), !0;
|
|
@@ -5237,7 +5299,7 @@ function Dh(t, e) {
|
|
|
5237
5299
|
return i || o;
|
|
5238
5300
|
})
|
|
5239
5301
|
), n.push(
|
|
5240
|
-
t.register(
|
|
5302
|
+
t.register(Mh, async (r) => {
|
|
5241
5303
|
const s = e.mediaCapture;
|
|
5242
5304
|
if (!s)
|
|
5243
5305
|
throw new Error("Media capture is not available in this environment");
|
|
@@ -5249,10 +5311,10 @@ function Dh(t, e) {
|
|
|
5249
5311
|
width: i.width,
|
|
5250
5312
|
height: i.height
|
|
5251
5313
|
}), a = JSON.stringify({ mime: o.mime, width: o.width, height: o.height });
|
|
5252
|
-
return
|
|
5314
|
+
return Rh(a, o.data);
|
|
5253
5315
|
})
|
|
5254
5316
|
), n.push(
|
|
5255
|
-
t.register(
|
|
5317
|
+
t.register(Ph, async () => {
|
|
5256
5318
|
if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices)
|
|
5257
5319
|
return JSON.stringify([]);
|
|
5258
5320
|
const s = (await navigator.mediaDevices.enumerateDevices()).filter((i) => i.kind === "audioinput" || i.kind === "videoinput").map((i) => ({
|
|
@@ -5272,8 +5334,8 @@ const Cs = {
|
|
|
5272
5334
|
PlaySound: "ikon.client.playSound",
|
|
5273
5335
|
StopSound: "ikon.client.stopSound"
|
|
5274
5336
|
}, lt = /* @__PURE__ */ new Map(), ae = /* @__PURE__ */ new Map();
|
|
5275
|
-
let
|
|
5276
|
-
const
|
|
5337
|
+
let Fh = 1;
|
|
5338
|
+
const Bh = {
|
|
5277
5339
|
name: Cs.PlaySound,
|
|
5278
5340
|
description: "Play a sound effect",
|
|
5279
5341
|
returnType: { kind: "string", nullable: !0 },
|
|
@@ -5284,7 +5346,7 @@ const Uh = {
|
|
|
5284
5346
|
{ name: "loop", type: { kind: "boolean", nullable: !0 }, description: "Loop the sound" }
|
|
5285
5347
|
]
|
|
5286
5348
|
};
|
|
5287
|
-
function
|
|
5349
|
+
function xh(t, e, n, r) {
|
|
5288
5350
|
if (typeof window > "u" || typeof Audio > "u" || typeof t != "string" || !t.trim())
|
|
5289
5351
|
return Promise.resolve(null);
|
|
5290
5352
|
let s = t;
|
|
@@ -5298,7 +5360,7 @@ function Oh(t, e, n, r) {
|
|
|
5298
5360
|
try {
|
|
5299
5361
|
const o = new Audio(s), a = typeof n == "number" ? Math.max(0, Math.min(1, n)) : 1;
|
|
5300
5362
|
o.volume = a, r === !0 && (o.loop = !0);
|
|
5301
|
-
const c = `sound-${
|
|
5363
|
+
const c = `sound-${Fh++}`, l = () => {
|
|
5302
5364
|
ae.delete(c), o.removeEventListener("ended", l), o.removeEventListener("error", l);
|
|
5303
5365
|
};
|
|
5304
5366
|
o.addEventListener("ended", l), o.addEventListener("error", l), ae.set(c, o), o.play().then(
|
|
@@ -5312,13 +5374,13 @@ function Oh(t, e, n, r) {
|
|
|
5312
5374
|
}
|
|
5313
5375
|
});
|
|
5314
5376
|
}
|
|
5315
|
-
const
|
|
5377
|
+
const Wh = {
|
|
5316
5378
|
name: Cs.StopSound,
|
|
5317
5379
|
description: "Stop a playing sound by ID",
|
|
5318
5380
|
returnType: { kind: "boolean" },
|
|
5319
5381
|
parameters: [{ name: "playbackId", type: { kind: "string" }, description: "Playback ID from playSound" }]
|
|
5320
5382
|
};
|
|
5321
|
-
function
|
|
5383
|
+
function Gh(t) {
|
|
5322
5384
|
if (typeof t != "string")
|
|
5323
5385
|
return !1;
|
|
5324
5386
|
const e = ae.get(t);
|
|
@@ -5330,7 +5392,7 @@ function Ph(t) {
|
|
|
5330
5392
|
return !1;
|
|
5331
5393
|
}
|
|
5332
5394
|
}
|
|
5333
|
-
function
|
|
5395
|
+
function Vh() {
|
|
5334
5396
|
lt.clear();
|
|
5335
5397
|
for (const [t, e] of ae) {
|
|
5336
5398
|
try {
|
|
@@ -5340,14 +5402,14 @@ function Lh() {
|
|
|
5340
5402
|
ae.delete(t);
|
|
5341
5403
|
}
|
|
5342
5404
|
}
|
|
5343
|
-
const
|
|
5344
|
-
{ definition:
|
|
5345
|
-
{ definition:
|
|
5405
|
+
const Hh = [
|
|
5406
|
+
{ definition: Bh, handler: xh },
|
|
5407
|
+
{ definition: Wh, handler: Gh }
|
|
5346
5408
|
];
|
|
5347
|
-
function
|
|
5348
|
-
const e =
|
|
5409
|
+
function $h(t) {
|
|
5410
|
+
const e = Hh.map(({ definition: n, handler: r }) => t.register(n, r));
|
|
5349
5411
|
return () => {
|
|
5350
|
-
e.forEach((n) => n()),
|
|
5412
|
+
e.forEach((n) => n()), Vh();
|
|
5351
5413
|
};
|
|
5352
5414
|
}
|
|
5353
5415
|
const As = () => {
|
|
@@ -5355,13 +5417,13 @@ const As = () => {
|
|
|
5355
5417
|
return !1;
|
|
5356
5418
|
const t = navigator.userAgent, e = /iPad|iPhone|iPod/.test(t), n = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
|
|
5357
5419
|
return e || n;
|
|
5358
|
-
}, ke = P("Capabilities"),
|
|
5420
|
+
}, ke = P("Capabilities"), Kh = globalThis;
|
|
5359
5421
|
function Me() {
|
|
5360
5422
|
if (typeof SharedArrayBuffer > "u")
|
|
5361
5423
|
return ke.debug("SharedArrayBuffer not supported: SharedArrayBuffer is undefined"), !1;
|
|
5362
5424
|
if (typeof Atomics > "u")
|
|
5363
5425
|
return ke.debug("SharedArrayBuffer not supported: Atomics is undefined"), !1;
|
|
5364
|
-
if (
|
|
5426
|
+
if (Kh.crossOriginIsolated === !1)
|
|
5365
5427
|
return ke.debug("SharedArrayBuffer not supported: crossOriginIsolated is false (missing COOP/COEP headers)"), !1;
|
|
5366
5428
|
try {
|
|
5367
5429
|
new SharedArrayBuffer(1);
|
|
@@ -5373,7 +5435,7 @@ function Me() {
|
|
|
5373
5435
|
function ys(t) {
|
|
5374
5436
|
return typeof AudioWorkletNode != "function" ? !1 : typeof t.audioWorklet?.addModule == "function";
|
|
5375
5437
|
}
|
|
5376
|
-
function
|
|
5438
|
+
function Yh() {
|
|
5377
5439
|
const r = new ArrayBuffer(882044), s = new DataView(r), i = (a, c) => {
|
|
5378
5440
|
for (let l = 0; l < c.length; l++)
|
|
5379
5441
|
s.setUint8(a + l, c.charCodeAt(l));
|
|
@@ -5382,13 +5444,13 @@ function Wh() {
|
|
|
5382
5444
|
const o = new Blob([r], { type: "audio/wav" });
|
|
5383
5445
|
return URL.createObjectURL(o);
|
|
5384
5446
|
}
|
|
5385
|
-
class
|
|
5447
|
+
class bs {
|
|
5386
5448
|
_silentAudioElement = null;
|
|
5387
5449
|
get silentAudioElement() {
|
|
5388
5450
|
return this._silentAudioElement;
|
|
5389
5451
|
}
|
|
5390
5452
|
setup(e, n) {
|
|
5391
|
-
if (!(typeof document > "u") && (this._silentAudioElement || (this._silentAudioElement = document.createElement("audio"), this._silentAudioElement.src =
|
|
5453
|
+
if (!(typeof document > "u") && (this._silentAudioElement || (this._silentAudioElement = document.createElement("audio"), this._silentAudioElement.src = Yh(), this._silentAudioElement.loop = !0, this._silentAudioElement.volume = 0.01, this._silentAudioElement.play().catch(() => {
|
|
5392
5454
|
})), typeof navigator < "u" && "mediaSession" in navigator)) {
|
|
5393
5455
|
const r = e ?? {};
|
|
5394
5456
|
navigator.mediaSession.metadata = new MediaMetadata({
|
|
@@ -5426,7 +5488,7 @@ class Rs {
|
|
|
5426
5488
|
}
|
|
5427
5489
|
}
|
|
5428
5490
|
}
|
|
5429
|
-
function
|
|
5491
|
+
function jh(t) {
|
|
5430
5492
|
return new Worker(
|
|
5431
5493
|
"" + new URL("assets/audio-playback-worker-Box5TifN.js", import.meta.url).href,
|
|
5432
5494
|
{
|
|
@@ -5435,7 +5497,7 @@ function Gh(t) {
|
|
|
5435
5497
|
}
|
|
5436
5498
|
);
|
|
5437
5499
|
}
|
|
5438
|
-
const De = 48e3, x = 2,
|
|
5500
|
+
const De = 48e3, x = 2, Rs = 1500, Zt = 512, qt = "playback", zh = 120, Xh = 300, Jh = 4, Qh = 200, Zh = 100, qh = 8e3, ef = 10, Ns = 100, ut = 50, ks = 128, tf = 20, nf = !0, J = 1500, rf = -20, sf = -100, of = 200, D = P("IkonAudioPlayback"), af = () => {
|
|
5439
5501
|
if (typeof navigator > "u" || typeof window > "u")
|
|
5440
5502
|
return !1;
|
|
5441
5503
|
const t = navigator.userAgent, e = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t), n = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
|
|
@@ -5447,19 +5509,19 @@ const De = 48e3, x = 2, bs = 1500, Zt = 512, qt = "playback", Vh = 120, Hh = 300
|
|
|
5447
5509
|
function Q(t) {
|
|
5448
5510
|
return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
|
|
5449
5511
|
}
|
|
5450
|
-
function
|
|
5512
|
+
function cf(t) {
|
|
5451
5513
|
return `
|
|
5452
5514
|
// Audio buffer constants
|
|
5453
5515
|
const OUTPUT_SAMPLE_RATE_HZ = ${t.outputSampleRateHz};
|
|
5454
5516
|
const DEFAULT_FRAME_SAMPLES_PER_CHANNEL = Math.max(1, Math.round(OUTPUT_SAMPLE_RATE_HZ * 0.02));
|
|
5455
|
-
const BUFFER_TARGET_MIN_MS = ${
|
|
5456
|
-
const BUFFER_TARGET_MAX_MS = ${
|
|
5457
|
-
const JITTER_MULTIPLIER = ${
|
|
5458
|
-
const LOCAL_BUFFER_MAX_MS = ${
|
|
5459
|
-
const CONTROL_PERIOD_MS = ${
|
|
5460
|
-
const UNDERRUN_JUMP_MS = ${
|
|
5461
|
-
const STABLE_TIME_TO_DECREASE_MS = ${
|
|
5462
|
-
const DECREASE_STEP_MS = ${
|
|
5517
|
+
const BUFFER_TARGET_MIN_MS = ${zh};
|
|
5518
|
+
const BUFFER_TARGET_MAX_MS = ${Xh};
|
|
5519
|
+
const JITTER_MULTIPLIER = ${Jh};
|
|
5520
|
+
const LOCAL_BUFFER_MAX_MS = ${Rs};
|
|
5521
|
+
const CONTROL_PERIOD_MS = ${Qh};
|
|
5522
|
+
const UNDERRUN_JUMP_MS = ${Zh};
|
|
5523
|
+
const STABLE_TIME_TO_DECREASE_MS = ${qh};
|
|
5524
|
+
const DECREASE_STEP_MS = ${ef};
|
|
5463
5525
|
const DEFAULT_STATS_INTERVAL_SAMPLES = OUTPUT_SAMPLE_RATE_HZ;
|
|
5464
5526
|
|
|
5465
5527
|
// Pre-computed reciprocals for division-free calculations
|
|
@@ -5478,7 +5540,7 @@ const FADE_OUT_INCREMENT = 1.0 / FADE_OUT_DURATION_SAMPLES;
|
|
|
5478
5540
|
const RENDER_QUANTUM_SIZE = ${ks};
|
|
5479
5541
|
|
|
5480
5542
|
// Buffer reduction crossfade constants (align to quantum boundary to avoid partial quanta)
|
|
5481
|
-
const BUFFER_REDUCTION_CROSSFADE_MS = ${
|
|
5543
|
+
const BUFFER_REDUCTION_CROSSFADE_MS = ${tf};
|
|
5482
5544
|
const BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW = Math.round(OUTPUT_SAMPLE_RATE_HZ * BUFFER_REDUCTION_CROSSFADE_MS / 1000);
|
|
5483
5545
|
const BUFFER_REDUCTION_CROSSFADE_SAMPLES = Math.ceil(BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW / RENDER_QUANTUM_SIZE) * RENDER_QUANTUM_SIZE;
|
|
5484
5546
|
|
|
@@ -5689,7 +5751,7 @@ class IkonAudioPlayerProcessor extends AudioWorkletProcessor {
|
|
|
5689
5751
|
this.statsIntervalSamples = Math.max(1, Math.round((OUTPUT_SAMPLE_RATE_HZ * statusIntervalMs) / 1000));
|
|
5690
5752
|
|
|
5691
5753
|
// Normalization config (hardcoded)
|
|
5692
|
-
this.normalizationEnabled = ${
|
|
5754
|
+
this.normalizationEnabled = ${nf};
|
|
5693
5755
|
|
|
5694
5756
|
// Stream states for audio buffer
|
|
5695
5757
|
this.streams = new Map();
|
|
@@ -6419,7 +6481,7 @@ class Mt {
|
|
|
6419
6481
|
config;
|
|
6420
6482
|
enabled = !1;
|
|
6421
6483
|
stateUnsubscribe = null;
|
|
6422
|
-
isMobile =
|
|
6484
|
+
isMobile = af();
|
|
6423
6485
|
boundVisibilityChange = null;
|
|
6424
6486
|
boundPageHide = null;
|
|
6425
6487
|
unlockHandler = null;
|
|
@@ -6438,7 +6500,7 @@ class Mt {
|
|
|
6438
6500
|
pendingWorkletMessages = [];
|
|
6439
6501
|
audioWorker = null;
|
|
6440
6502
|
protocolPort = null;
|
|
6441
|
-
mediaSessionHelper = new
|
|
6503
|
+
mediaSessionHelper = new bs();
|
|
6442
6504
|
fallbackQueues = /* @__PURE__ */ new Map();
|
|
6443
6505
|
activeStreams = /* @__PURE__ */ new Set();
|
|
6444
6506
|
mediaSessionConfig = null;
|
|
@@ -6632,23 +6694,23 @@ class Mt {
|
|
|
6632
6694
|
if (o < 0)
|
|
6633
6695
|
continue;
|
|
6634
6696
|
const a = o * r * s, c = i.frames, l = i.count, h = (i.head - l + J) % J;
|
|
6635
|
-
let d = null,
|
|
6697
|
+
let d = null, m = null;
|
|
6636
6698
|
for (let u = 0; u < l; u++) {
|
|
6637
6699
|
const v = (h + u) % J, C = c[v], k = C.samplePosition + Math.max(C.frameSamples, 1);
|
|
6638
|
-
if (C.samplePosition <= a && (d = C), k > a && !
|
|
6700
|
+
if (C.samplePosition <= a && (d = C), k > a && !m && (m = C, C.samplePosition <= a))
|
|
6639
6701
|
break;
|
|
6640
6702
|
}
|
|
6641
6703
|
if (!d)
|
|
6642
6704
|
continue;
|
|
6643
6705
|
const S = d.samplePosition + Math.max(d.frameSamples, 1);
|
|
6644
|
-
if (a > S && !
|
|
6706
|
+
if (a > S && !m)
|
|
6645
6707
|
continue;
|
|
6646
|
-
if (!
|
|
6708
|
+
if (!m)
|
|
6647
6709
|
return this._visemeResult.mouthOpenY = d.mouthOpenY, this._visemeResult.mouthForm = d.mouthForm, this._visemeResult;
|
|
6648
|
-
const T = d.samplePosition,
|
|
6649
|
-
if (d !==
|
|
6710
|
+
const T = d.samplePosition, E = Math.max(d.frameSamples, 1), f = T + E;
|
|
6711
|
+
if (d !== m && m.samplePosition > d.samplePosition && f > T) {
|
|
6650
6712
|
const u = Math.min(1, Math.max(0, (a - T) / (f - T)));
|
|
6651
|
-
this._visemeResult.mouthOpenY = d.mouthOpenY + u * (
|
|
6713
|
+
this._visemeResult.mouthOpenY = d.mouthOpenY + u * (m.mouthOpenY - d.mouthOpenY), this._visemeResult.mouthForm = d.mouthForm + u * (m.mouthForm - d.mouthForm);
|
|
6652
6714
|
} else
|
|
6653
6715
|
this._visemeResult.mouthOpenY = d.mouthOpenY, this._visemeResult.mouthForm = d.mouthForm;
|
|
6654
6716
|
return this._visemeResult;
|
|
@@ -6823,7 +6885,7 @@ class Mt {
|
|
|
6823
6885
|
URL.revokeObjectURL(this.workletModuleUrl);
|
|
6824
6886
|
} catch {
|
|
6825
6887
|
}
|
|
6826
|
-
this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([
|
|
6888
|
+
this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([cf({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: x })], { type: "text/javascript" }));
|
|
6827
6889
|
}
|
|
6828
6890
|
this.workletReady || (this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl).catch((p) => {
|
|
6829
6891
|
throw D.warn(`Failed to load AudioWorklet module, falling back: ${Q(p)}`), p;
|
|
@@ -6849,8 +6911,8 @@ class Mt {
|
|
|
6849
6911
|
const h = p.data;
|
|
6850
6912
|
if (!(!h || typeof h != "object")) {
|
|
6851
6913
|
if (h.type === "log") {
|
|
6852
|
-
const d = h,
|
|
6853
|
-
d.level === "error" ? D.error(`[Worklet]${
|
|
6914
|
+
const d = h, m = d.streamId ? ` [stream=${d.streamId.substring(0, 8)}]` : "";
|
|
6915
|
+
d.level === "error" ? D.error(`[Worklet]${m} ${d.message}`) : d.level === "warn" ? D.warn(`[Worklet]${m} ${d.message}`) : D.info(`[Worklet]${m} ${d.message}`);
|
|
6854
6916
|
return;
|
|
6855
6917
|
}
|
|
6856
6918
|
if (h.type === "stats") {
|
|
@@ -6879,15 +6941,15 @@ class Mt {
|
|
|
6879
6941
|
this.stopAudioWorklet(), this.pendingWorkletMessages = [];
|
|
6880
6942
|
const r = 1024, s = new Float32Array(r * x), i = Math.round(this.outputSampleRateHz * Ns / 1e3), o = Math.round(this.outputSampleRateHz * ut / 1e3), a = 1 / i, c = 1 / o, l = new Array(x), p = [], h = e.createScriptProcessor(r, 0, x);
|
|
6881
6943
|
h.onaudioprocess = (d) => {
|
|
6882
|
-
const
|
|
6944
|
+
const m = d.outputBuffer, S = m.numberOfChannels, T = m.length;
|
|
6883
6945
|
for (let f = 0; f < S; f++) {
|
|
6884
|
-
const u =
|
|
6946
|
+
const u = m.getChannelData(f);
|
|
6885
6947
|
u.fill(0), l[f] = u;
|
|
6886
6948
|
}
|
|
6887
|
-
let
|
|
6949
|
+
let E = 0;
|
|
6888
6950
|
p.length = 0;
|
|
6889
6951
|
for (const [f, u] of this.fallbackQueues.entries()) {
|
|
6890
|
-
u.totalSamples > 0 && (
|
|
6952
|
+
u.totalSamples > 0 && (E += 1), (u.ending || u.inputDrained) && u.fadeDirection !== "out" && u.totalSamples / S * 1e3 / this.outputSampleRateHz <= ut * 2 && (u.fadeDirection = "out"), this.readFromFallbackQueue(u, s), (u.totalSamples > 0 || !u.hasLastOut) && ((!u.lastOut || u.lastOut.length !== s.length) && (u.lastOut = new Float32Array(s.length)), u.lastOut.set(s), u.hasLastOut = !0);
|
|
6891
6953
|
for (let C = 0; C < T; C++) {
|
|
6892
6954
|
u.fadeDirection === "in" ? (u.fadeGain = Math.min(1, u.fadeGain + a), u.fadeGain >= 1 && (u.fadeDirection = "none")) : u.fadeDirection === "out" && (u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 0 && (u.fadeDirection = "none"));
|
|
6893
6955
|
for (let k = 0; k < S; k++) {
|
|
@@ -6922,8 +6984,8 @@ class Mt {
|
|
|
6922
6984
|
this.fallbackQueues.delete(f), this.activeStreams.delete(f);
|
|
6923
6985
|
this.activeStreams.size === 0 && this.removeUnlockHandler();
|
|
6924
6986
|
}
|
|
6925
|
-
if (
|
|
6926
|
-
const f = 1 / Math.sqrt(
|
|
6987
|
+
if (E > 1) {
|
|
6988
|
+
const f = 1 / Math.sqrt(E);
|
|
6927
6989
|
for (let u = 0; u < T; u++)
|
|
6928
6990
|
for (let v = 0; v < S; v++)
|
|
6929
6991
|
l[v][u] *= f;
|
|
@@ -6953,7 +7015,7 @@ class Mt {
|
|
|
6953
7015
|
e.totalSamples < 0 && (e.totalSamples = 0), this.compactFallbackQueue(e);
|
|
6954
7016
|
}
|
|
6955
7017
|
trimFallbackQueue(e) {
|
|
6956
|
-
const n = Math.floor(this.outputSampleRateHz * x *
|
|
7018
|
+
const n = Math.floor(this.outputSampleRateHz * x * Rs / 1e3), r = e.totalSamples - n;
|
|
6957
7019
|
r <= 0 || this.skipFromFallbackQueue(e, r);
|
|
6958
7020
|
}
|
|
6959
7021
|
stopScriptProcessorDiagnostics() {
|
|
@@ -7074,14 +7136,14 @@ class Mt {
|
|
|
7074
7136
|
}
|
|
7075
7137
|
this.protocolPort = e;
|
|
7076
7138
|
try {
|
|
7077
|
-
this.audioWorker = new
|
|
7139
|
+
this.audioWorker = new jh();
|
|
7078
7140
|
} catch (h) {
|
|
7079
7141
|
D.warn(`Failed to create audio worker: ${Q(h)}`), this.protocolPort.close(), this.protocolPort = null;
|
|
7080
7142
|
return;
|
|
7081
7143
|
}
|
|
7082
7144
|
const n = this.audioWorker;
|
|
7083
7145
|
n.addEventListener("message", (h) => this.onAudioWorkerMessage(h.data)), n.addEventListener("error", (h) => {
|
|
7084
|
-
const d = [h.message, h.filename, h.lineno, h.colno].filter((
|
|
7146
|
+
const d = [h.message, h.filename, h.lineno, h.colno].filter((m) => m != null && String(m).length > 0);
|
|
7085
7147
|
D.error(`Audio worker failed: ${d.join(" ")}`.trim());
|
|
7086
7148
|
});
|
|
7087
7149
|
const s = (this.config.performance?.preferSharedArrayBuffer ?? !0) && !!this.audioWorkletNode && Me(), i = this.config.performance?.preferWebCodecs ?? !0, o = {
|
|
@@ -7158,7 +7220,7 @@ class Mt {
|
|
|
7158
7220
|
s.epochTimestampSamples = e.timestampInterleavedSamples;
|
|
7159
7221
|
const c = this.audioContext;
|
|
7160
7222
|
if (c) {
|
|
7161
|
-
const l = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), p =
|
|
7223
|
+
const l = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), p = rf + l * 1e3, h = Math.min(of, Math.max(sf, p));
|
|
7162
7224
|
s.playbackStartContextTime = c.currentTime + h / 1e3;
|
|
7163
7225
|
}
|
|
7164
7226
|
s.timingEstablished = !0;
|
|
@@ -7281,7 +7343,7 @@ class Mt {
|
|
|
7281
7343
|
}));
|
|
7282
7344
|
}
|
|
7283
7345
|
}
|
|
7284
|
-
function
|
|
7346
|
+
function lf(t) {
|
|
7285
7347
|
return new Worker(
|
|
7286
7348
|
"" + new URL("assets/video-playback-worker-CpHuZKgE.js", import.meta.url).href,
|
|
7287
7349
|
{
|
|
@@ -7294,7 +7356,7 @@ const z = P("IkonVideoPlayback");
|
|
|
7294
7356
|
function Xe(t) {
|
|
7295
7357
|
return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
|
|
7296
7358
|
}
|
|
7297
|
-
class
|
|
7359
|
+
class uf {
|
|
7298
7360
|
client;
|
|
7299
7361
|
config;
|
|
7300
7362
|
enabled = !0;
|
|
@@ -7369,7 +7431,7 @@ class rf {
|
|
|
7369
7431
|
}
|
|
7370
7432
|
let e;
|
|
7371
7433
|
try {
|
|
7372
|
-
e = new
|
|
7434
|
+
e = new lf();
|
|
7373
7435
|
} catch (n) {
|
|
7374
7436
|
z.warn(`Failed to create video worker: ${Xe(n)}`);
|
|
7375
7437
|
return;
|
|
@@ -7455,7 +7517,7 @@ class rf {
|
|
|
7455
7517
|
}
|
|
7456
7518
|
}
|
|
7457
7519
|
requestIdrForStream(e, n) {
|
|
7458
|
-
const r =
|
|
7520
|
+
const r = Fl(Pl(), this.client.sessionId ?? 0, {
|
|
7459
7521
|
trackId: n,
|
|
7460
7522
|
targetIds: [e]
|
|
7461
7523
|
});
|
|
@@ -7508,11 +7570,11 @@ class rf {
|
|
|
7508
7570
|
}));
|
|
7509
7571
|
}
|
|
7510
7572
|
}
|
|
7511
|
-
class
|
|
7573
|
+
class df {
|
|
7512
7574
|
audio;
|
|
7513
7575
|
video;
|
|
7514
7576
|
constructor(e, n) {
|
|
7515
|
-
this.audio = new Mt(e, n?.audio), this.video = new
|
|
7577
|
+
this.audio = new Mt(e, n?.audio), this.video = new uf(e, n?.video), n?.mediaSession && this.audio.setMediaSession(n.mediaSession);
|
|
7516
7578
|
}
|
|
7517
7579
|
/**
|
|
7518
7580
|
* Releases media resources (workers, audio graph, decoders).
|
|
@@ -7523,7 +7585,7 @@ class sf {
|
|
|
7523
7585
|
this.audio.dispose(), this.video.dispose();
|
|
7524
7586
|
}
|
|
7525
7587
|
}
|
|
7526
|
-
class
|
|
7588
|
+
class hf {
|
|
7527
7589
|
static getStorageForCapacity(e, n) {
|
|
7528
7590
|
const r = Int32Array.BYTES_PER_ELEMENT * 2, s = n.BYTES_PER_ELEMENT * e;
|
|
7529
7591
|
return new SharedArrayBuffer(r + s);
|
|
@@ -7577,7 +7639,7 @@ class of {
|
|
|
7577
7639
|
return r = (r + n) % this.capacity, Atomics.store(this.readWrite, 0, r), n;
|
|
7578
7640
|
}
|
|
7579
7641
|
}
|
|
7580
|
-
function
|
|
7642
|
+
function ff(t) {
|
|
7581
7643
|
return new Worker(
|
|
7582
7644
|
"" + new URL("assets/audio-capture-worker-DuKZS6HJ.js", import.meta.url).href,
|
|
7583
7645
|
{
|
|
@@ -7586,11 +7648,11 @@ function af(t) {
|
|
|
7586
7648
|
}
|
|
7587
7649
|
);
|
|
7588
7650
|
}
|
|
7589
|
-
const
|
|
7590
|
-
function
|
|
7651
|
+
const b = P("IkonAudioCapture"), ve = 3, pf = 200, mf = 2e3, Ef = 5e3, tn = 3e3;
|
|
7652
|
+
function If(t) {
|
|
7591
7653
|
return new Promise((e) => setTimeout(e, t));
|
|
7592
7654
|
}
|
|
7593
|
-
function
|
|
7655
|
+
function _f(t) {
|
|
7594
7656
|
switch (t.name) {
|
|
7595
7657
|
// Transient errors - worth retrying
|
|
7596
7658
|
case "NotReadableError":
|
|
@@ -7615,11 +7677,11 @@ function hf(t) {
|
|
|
7615
7677
|
return { action: "fail", reason: "unknown", canRetry: !1 };
|
|
7616
7678
|
}
|
|
7617
7679
|
}
|
|
7618
|
-
function
|
|
7680
|
+
function Tf() {
|
|
7619
7681
|
const t = globalThis.crypto;
|
|
7620
7682
|
return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
|
|
7621
7683
|
}
|
|
7622
|
-
function
|
|
7684
|
+
function wf() {
|
|
7623
7685
|
return `
|
|
7624
7686
|
class RingBuffer {
|
|
7625
7687
|
static getStorageForCapacity(capacity, type) {
|
|
@@ -7748,7 +7810,7 @@ class IkonAudioCaptureProcessor extends AudioWorkletProcessor {
|
|
|
7748
7810
|
registerProcessor('ikon-audio-capture', IkonAudioCaptureProcessor);
|
|
7749
7811
|
`;
|
|
7750
7812
|
}
|
|
7751
|
-
class
|
|
7813
|
+
class Sf {
|
|
7752
7814
|
constructor(e, n) {
|
|
7753
7815
|
this.client = e, this.config = n ?? {}, this.setupDeviceChangeListener();
|
|
7754
7816
|
}
|
|
@@ -7827,7 +7889,7 @@ class Ef {
|
|
|
7827
7889
|
if (n.stopped)
|
|
7828
7890
|
continue;
|
|
7829
7891
|
const r = n.intendedDeviceId ?? n.track.getSettings().deviceId, s = await this.isMicrophoneAvailable(r ?? void 0);
|
|
7830
|
-
n.stopped || s || (
|
|
7892
|
+
n.stopped || s || (b.warn(`Microphone device disconnected, deviceId=${r?.substring(0, 8) ?? "default"}`), this.config.deviceDisconnectPolicy?.autoStop ?? !0 ? this.handleRecoverableError(n, new Error("Microphone device disconnected"), "device-disconnected") : this.notifyError(n, new Error("Microphone device disconnected"), "device-disconnected", !0));
|
|
7831
7893
|
}
|
|
7832
7894
|
}
|
|
7833
7895
|
/**
|
|
@@ -7839,7 +7901,7 @@ class Ef {
|
|
|
7839
7901
|
if (e.stopped)
|
|
7840
7902
|
return;
|
|
7841
7903
|
const i = Date.now(), o = n.name;
|
|
7842
|
-
if (e.lastErrorReason === r && e.lastErrorName === o && i - e.lastErrorTime <
|
|
7904
|
+
if (e.lastErrorReason === r && e.lastErrorName === o && i - e.lastErrorTime < Ef)
|
|
7843
7905
|
return;
|
|
7844
7906
|
e.lastErrorTime = i, e.lastErrorReason = r, e.lastErrorName = o;
|
|
7845
7907
|
const a = this.config.autoRestartPolicy;
|
|
@@ -7847,7 +7909,7 @@ class Ef {
|
|
|
7847
7909
|
const c = a.restartableReasons ?? ["track-ended", "device-disconnected"], l = a.maxRestarts ?? 3, p = a.backoffMs ?? [500, 1e3, 2e3];
|
|
7848
7910
|
if (i - e.lastStableTime > 3e4 && (e.restartCount = 0), c.includes(r) && e.restartCount < l) {
|
|
7849
7911
|
const d = p[Math.min(e.restartCount, p.length - 1)];
|
|
7850
|
-
if (e.restartCount++,
|
|
7912
|
+
if (e.restartCount++, b.info(`Auto-restarting capture (attempt ${e.restartCount}/${l}) in ${d}ms, reason=${r}`), this.emitDiagnostic({
|
|
7851
7913
|
event: "auto-restart",
|
|
7852
7914
|
captureId: e.captureId,
|
|
7853
7915
|
details: {
|
|
@@ -7862,7 +7924,7 @@ class Ef {
|
|
|
7862
7924
|
} catch {
|
|
7863
7925
|
}
|
|
7864
7926
|
e.pendingRestartTimer && clearTimeout(e.pendingRestartTimer);
|
|
7865
|
-
const
|
|
7927
|
+
const m = e.restartCount, S = e.onError, T = {
|
|
7866
7928
|
...e.originalRequest,
|
|
7867
7929
|
constraints: e.currentConstraints,
|
|
7868
7930
|
options: e.currentOptions,
|
|
@@ -7870,19 +7932,19 @@ class Ef {
|
|
|
7870
7932
|
onStateChange: e.onStateChange
|
|
7871
7933
|
};
|
|
7872
7934
|
e.pendingRestartTimer = setTimeout(() => {
|
|
7873
|
-
e.pendingRestartTimer = null, !(!e.stopped || e.stoppedReason !== "recoverable-error") && this.startMic(T).then((
|
|
7874
|
-
const f = this.captures.get(
|
|
7875
|
-
f && (f.restartCount =
|
|
7876
|
-
}).catch((
|
|
7877
|
-
|
|
7878
|
-
const f =
|
|
7935
|
+
e.pendingRestartTimer = null, !(!e.stopped || e.stoppedReason !== "recoverable-error") && this.startMic(T).then((E) => {
|
|
7936
|
+
const f = this.captures.get(E.captureId);
|
|
7937
|
+
f && (f.restartCount = m, f.lastStableTime = Date.now());
|
|
7938
|
+
}).catch((E) => {
|
|
7939
|
+
b.warn(`Auto-restart failed: ${E}`);
|
|
7940
|
+
const f = E instanceof Error ? E : new Error(String(E));
|
|
7879
7941
|
let u = "unknown";
|
|
7880
7942
|
if (f.name === "NotAllowedError" && (u = "permission-revoked"), S)
|
|
7881
7943
|
try {
|
|
7882
7944
|
S(
|
|
7883
7945
|
new Error(`Auto-restart failed: ${f.message}`),
|
|
7884
7946
|
u,
|
|
7885
|
-
|
|
7947
|
+
m < l && u !== "permission-revoked"
|
|
7886
7948
|
);
|
|
7887
7949
|
} catch {
|
|
7888
7950
|
}
|
|
@@ -7921,7 +7983,7 @@ class Ef {
|
|
|
7921
7983
|
return !1;
|
|
7922
7984
|
const s = Date.now();
|
|
7923
7985
|
if (!r && s - e.lastResumeAttemptTime < tn)
|
|
7924
|
-
return
|
|
7986
|
+
return b.debug(`Resume attempt from ${n} skipped (cooldown)`), !1;
|
|
7925
7987
|
e.lastResumeAttemptTime = s, this.emitDiagnostic({
|
|
7926
7988
|
event: "resume-attempt",
|
|
7927
7989
|
captureId: e.captureId,
|
|
@@ -7936,7 +7998,7 @@ class Ef {
|
|
|
7936
7998
|
details: { source: n, success: o, state: i }
|
|
7937
7999
|
}), o;
|
|
7938
8000
|
} catch (i) {
|
|
7939
|
-
return
|
|
8001
|
+
return b.warn(`Failed to resume AudioContext from ${n}: ${i}`), this.emitDiagnostic({
|
|
7940
8002
|
event: "resume-result",
|
|
7941
8003
|
captureId: e.captureId,
|
|
7942
8004
|
details: { source: n, success: !1, error: String(i) }
|
|
@@ -7956,13 +8018,13 @@ class Ef {
|
|
|
7956
8018
|
return;
|
|
7957
8019
|
const s = Date.now();
|
|
7958
8020
|
if (!r && s - e.lastResumeAttemptTime < tn) {
|
|
7959
|
-
|
|
8021
|
+
b.debug(`Resume attempt from ${n} skipped (cooldown)`);
|
|
7960
8022
|
return;
|
|
7961
8023
|
}
|
|
7962
|
-
e.lastResumeAttemptTime = s,
|
|
7963
|
-
|
|
8024
|
+
e.lastResumeAttemptTime = s, b.info(`Attempting AudioContext resume from ${n}`), e.ctx.resume().then(() => {
|
|
8025
|
+
b.debug("AudioContext resumed successfully");
|
|
7964
8026
|
}).catch((i) => {
|
|
7965
|
-
|
|
8027
|
+
b.warn(`Failed to resume AudioContext: ${i}`), r && this.notifyError(
|
|
7966
8028
|
e,
|
|
7967
8029
|
new Error("AudioContext suspended - user gesture required"),
|
|
7968
8030
|
"context-suspended",
|
|
@@ -7975,7 +8037,7 @@ class Ef {
|
|
|
7975
8037
|
if (n.stopped)
|
|
7976
8038
|
return;
|
|
7977
8039
|
const s = e.state;
|
|
7978
|
-
if (
|
|
8040
|
+
if (b.debug(`AudioContext state changed to: ${s}`), this.emitDiagnostic({
|
|
7979
8041
|
event: "state-change",
|
|
7980
8042
|
captureId: n.captureId,
|
|
7981
8043
|
details: { state: s }
|
|
@@ -7989,7 +8051,7 @@ class Ef {
|
|
|
7989
8051
|
new Error("AudioContext suspended - user gesture may be required"),
|
|
7990
8052
|
"context-suspended",
|
|
7991
8053
|
!0
|
|
7992
|
-
)), s === "interrupted" && (
|
|
8054
|
+
)), s === "interrupted" && (b.info("AudioContext interrupted (iOS), waiting for user to return"), this.notifyError(
|
|
7993
8055
|
n,
|
|
7994
8056
|
new Error("Audio interrupted - waiting for user to return"),
|
|
7995
8057
|
"context-interrupted",
|
|
@@ -8003,7 +8065,7 @@ class Ef {
|
|
|
8003
8065
|
}
|
|
8004
8066
|
setupVisibilityChangeListener(e) {
|
|
8005
8067
|
const n = () => {
|
|
8006
|
-
document.visibilityState === "hidden" && !e.stopped ?
|
|
8068
|
+
document.visibilityState === "hidden" && !e.stopped ? b.debug("Page hidden - audio may be suspended soon") : document.visibilityState === "visible" && !e.stopped && this.attemptResume(e, "visibilitychange");
|
|
8007
8069
|
};
|
|
8008
8070
|
document.addEventListener("visibilitychange", n), e.visibilityHandler = n;
|
|
8009
8071
|
}
|
|
@@ -8016,9 +8078,9 @@ class Ef {
|
|
|
8016
8078
|
*/
|
|
8017
8079
|
setupBFCacheHandlers(e) {
|
|
8018
8080
|
const n = () => {
|
|
8019
|
-
e.stopped ||
|
|
8081
|
+
e.stopped || b.debug("Page hiding (BFCache) - audio may be suspended");
|
|
8020
8082
|
}, r = (s) => {
|
|
8021
|
-
s.persisted && !e.stopped && (
|
|
8083
|
+
s.persisted && !e.stopped && (b.info("Page restored from BFCache - checking audio state"), e.ctx.state === "suspended" && this.attemptResume(e, "bfcache"));
|
|
8022
8084
|
};
|
|
8023
8085
|
window.addEventListener("pagehide", n), window.addEventListener("pageshow", r), e.pagehideHandler = n, e.pageshowHandler = r;
|
|
8024
8086
|
}
|
|
@@ -8075,12 +8137,12 @@ class Ef {
|
|
|
8075
8137
|
ensureWorker() {
|
|
8076
8138
|
if (this.worker)
|
|
8077
8139
|
return this.worker;
|
|
8078
|
-
const e = new
|
|
8140
|
+
const e = new ff();
|
|
8079
8141
|
return this.worker = e, e.addEventListener("message", (n) => {
|
|
8080
8142
|
const r = n.data;
|
|
8081
8143
|
if (r?.type === "error") {
|
|
8082
8144
|
const s = r.error;
|
|
8083
|
-
|
|
8145
|
+
b.warn(`Audio capture worker error: ${s?.name ?? "Error"} ${s?.message ?? ""}`);
|
|
8084
8146
|
}
|
|
8085
8147
|
}), e;
|
|
8086
8148
|
}
|
|
@@ -8122,7 +8184,7 @@ class Ef {
|
|
|
8122
8184
|
if (i.stream)
|
|
8123
8185
|
return { stream: i.stream, constraints: r };
|
|
8124
8186
|
if (i.errorInfo.action === "fallback-constraints") {
|
|
8125
|
-
|
|
8187
|
+
b.info(`Constraints failed (${i.error.name}), trying fallback constraints`), this.emitDiagnostic({
|
|
8126
8188
|
event: "fallback",
|
|
8127
8189
|
details: {
|
|
8128
8190
|
errorName: i.error.name,
|
|
@@ -8131,7 +8193,7 @@ class Ef {
|
|
|
8131
8193
|
});
|
|
8132
8194
|
const a = await this.tryGetUserMediaWithRetries(s);
|
|
8133
8195
|
if (a.stream)
|
|
8134
|
-
return
|
|
8196
|
+
return b.info("getUserMedia succeeded with fallback constraints"), { stream: a.stream, constraints: s };
|
|
8135
8197
|
const c = a.error;
|
|
8136
8198
|
throw c.captureReason = "constraints-failed", c;
|
|
8137
8199
|
}
|
|
@@ -8159,7 +8221,7 @@ class Ef {
|
|
|
8159
8221
|
try {
|
|
8160
8222
|
return { stream: await navigator.mediaDevices.getUserMedia({ audio: e }), error: n, errorInfo: r };
|
|
8161
8223
|
} catch (i) {
|
|
8162
|
-
if (n = i instanceof Error ? i : new Error(String(i)), r =
|
|
8224
|
+
if (n = i instanceof Error ? i : new Error(String(i)), r = _f(n), b.debug(
|
|
8163
8225
|
`getUserMedia attempt ${s + 1}/${ve} failed: ${n.name} (action: ${r.action})`
|
|
8164
8226
|
), this.emitDiagnostic({
|
|
8165
8227
|
event: "retry",
|
|
@@ -8172,8 +8234,8 @@ class Ef {
|
|
|
8172
8234
|
}), r.action !== "retry")
|
|
8173
8235
|
break;
|
|
8174
8236
|
if (s < ve - 1) {
|
|
8175
|
-
const o =
|
|
8176
|
-
|
|
8237
|
+
const o = pf * (s + 1);
|
|
8238
|
+
b.debug(`Retrying getUserMedia in ${o}ms`), await If(o);
|
|
8177
8239
|
}
|
|
8178
8240
|
}
|
|
8179
8241
|
return { stream: null, error: n, errorInfo: r };
|
|
@@ -8185,7 +8247,7 @@ class Ef {
|
|
|
8185
8247
|
async ensureWorklet(e) {
|
|
8186
8248
|
if (!ys(e))
|
|
8187
8249
|
throw new Error("AudioWorklet is not supported in this browser");
|
|
8188
|
-
if (this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([
|
|
8250
|
+
if (this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([wf()], { type: "text/javascript" }))), this.workletReady && this.workletContext === e)
|
|
8189
8251
|
try {
|
|
8190
8252
|
await this.workletReady;
|
|
8191
8253
|
return;
|
|
@@ -8207,7 +8269,7 @@ class Ef {
|
|
|
8207
8269
|
throw new Error("Cannot start audio capture before client is connected");
|
|
8208
8270
|
if (this.client.isWebRtcEnabled)
|
|
8209
8271
|
return this.startMicWebRtc(e);
|
|
8210
|
-
const r =
|
|
8272
|
+
const r = Tf(), s = {
|
|
8211
8273
|
captureId: r,
|
|
8212
8274
|
aborted: !1,
|
|
8213
8275
|
stream: null,
|
|
@@ -8247,10 +8309,10 @@ class Ef {
|
|
|
8247
8309
|
const d = o.createGain();
|
|
8248
8310
|
d.gain.value = 0, d.connect(o.destination), s.gain = d;
|
|
8249
8311
|
const T = Me() ? "sab" : "pcm";
|
|
8250
|
-
let
|
|
8312
|
+
let E;
|
|
8251
8313
|
if (T === "sab") {
|
|
8252
8314
|
const A = Math.floor(o.sampleRate * 10);
|
|
8253
|
-
|
|
8315
|
+
E = hf.getStorageForCapacity(A, Float32Array);
|
|
8254
8316
|
}
|
|
8255
8317
|
const f = "microphone", u = this.ensureWorker(), v = e.onStopped;
|
|
8256
8318
|
u.postMessage({
|
|
@@ -8267,21 +8329,21 @@ class Ef {
|
|
|
8267
8329
|
preferWebCodecs: this.config.performance?.preferWebCodecs
|
|
8268
8330
|
},
|
|
8269
8331
|
transport: T,
|
|
8270
|
-
sharedArrayBuffer:
|
|
8332
|
+
sharedArrayBuffer: E
|
|
8271
8333
|
}), await new Promise((A, F) => {
|
|
8272
8334
|
const $ = setTimeout(() => {
|
|
8273
|
-
u.removeEventListener("message",
|
|
8274
|
-
}, 1e4),
|
|
8335
|
+
u.removeEventListener("message", be), F(new Error("Audio capture worker start timeout"));
|
|
8336
|
+
}, 1e4), be = (Ls) => {
|
|
8275
8337
|
const pe = Ls.data;
|
|
8276
8338
|
if (pe?.type === "started" && pe.captureId === r)
|
|
8277
|
-
clearTimeout($), u.removeEventListener("message",
|
|
8339
|
+
clearTimeout($), u.removeEventListener("message", be), A();
|
|
8278
8340
|
else if (pe?.type === "error" && pe.captureId === r) {
|
|
8279
|
-
clearTimeout($), u.removeEventListener("message",
|
|
8341
|
+
clearTimeout($), u.removeEventListener("message", be);
|
|
8280
8342
|
const Fs = pe.error;
|
|
8281
8343
|
F(new Error(Fs?.message ?? "Audio capture failed to start"));
|
|
8282
8344
|
}
|
|
8283
8345
|
};
|
|
8284
|
-
u.addEventListener("message",
|
|
8346
|
+
u.addEventListener("message", be);
|
|
8285
8347
|
}), i();
|
|
8286
8348
|
const C = new AudioWorkletNode(o, "ikon-audio-capture", {
|
|
8287
8349
|
numberOfInputs: 1,
|
|
@@ -8290,7 +8352,7 @@ class Ef {
|
|
|
8290
8352
|
processorOptions: {
|
|
8291
8353
|
transport: T,
|
|
8292
8354
|
channels: 1,
|
|
8293
|
-
sharedArrayBuffer:
|
|
8355
|
+
sharedArrayBuffer: E
|
|
8294
8356
|
}
|
|
8295
8357
|
});
|
|
8296
8358
|
s.worklet = C, h.connect(C), C.connect(d), T === "pcm" && (C.port.onmessage = (A) => {
|
|
@@ -8385,9 +8447,9 @@ class Ef {
|
|
|
8385
8447
|
};
|
|
8386
8448
|
this.setupAudioContextStateListener(o, _), this.setupVisibilityChangeListener(_), this.setupBFCacheHandlers(_), _.healthCheckTimer = setInterval(() => {
|
|
8387
8449
|
this.performHealthCheck(_);
|
|
8388
|
-
},
|
|
8450
|
+
}, mf);
|
|
8389
8451
|
const X = () => {
|
|
8390
|
-
_.stopped || (
|
|
8452
|
+
_.stopped || (b.warn(`Microphone track ended unexpectedly, captureId=${r.substring(0, 8)}`), this.handleRecoverableError(_, new Error("Microphone track ended unexpectedly"), "track-ended"));
|
|
8391
8453
|
};
|
|
8392
8454
|
return _.trackEndedHandler = X, l.addEventListener("ended", X), this.captures.set(r, _), this.pendingCaptures.delete(r), {
|
|
8393
8455
|
captureId: r,
|
|
@@ -8508,7 +8570,7 @@ class Ef {
|
|
|
8508
8570
|
if (e.stopped)
|
|
8509
8571
|
return;
|
|
8510
8572
|
if (e.track.readyState !== "live") {
|
|
8511
|
-
|
|
8573
|
+
b.warn(`Health check: track is ${e.track.readyState}, captureId=${e.captureId.substring(0, 8)}`), this.handleRecoverableError(
|
|
8512
8574
|
e,
|
|
8513
8575
|
new Error(`Microphone track is ${e.track.readyState}`),
|
|
8514
8576
|
"track-ended"
|
|
@@ -8517,19 +8579,19 @@ class Ef {
|
|
|
8517
8579
|
}
|
|
8518
8580
|
const n = e.ctx.state;
|
|
8519
8581
|
if (n === "closed") {
|
|
8520
|
-
|
|
8582
|
+
b.warn(`Health check: AudioContext closed, captureId=${e.captureId.substring(0, 8)}`), this.notifyError(e, new Error("AudioContext was closed"), "context-closed", !1), e.stop("dispose");
|
|
8521
8583
|
return;
|
|
8522
8584
|
}
|
|
8523
8585
|
n === "suspended" && this.attemptResume(e, "healthcheck"), e.track.readyState === "live" && n === "running" && (e.lastStableTime = Date.now());
|
|
8524
8586
|
const r = this.config.mutedInputDetection;
|
|
8525
8587
|
if (e.track.muted) {
|
|
8526
|
-
if (
|
|
8588
|
+
if (b.debug(`Health check: track is muted, captureId=${e.captureId.substring(0, 8)}`), r?.enabled) {
|
|
8527
8589
|
const s = Date.now();
|
|
8528
8590
|
if (e.mutedSinceTime === null)
|
|
8529
8591
|
e.mutedSinceTime = s;
|
|
8530
8592
|
else {
|
|
8531
8593
|
const i = s - e.mutedSinceTime, o = r.durationMs ?? 5e3;
|
|
8532
|
-
i >= o && (
|
|
8594
|
+
i >= o && (b.warn(`Health check: input muted for ${i}ms, captureId=${e.captureId.substring(0, 8)}`), this.notifyError(
|
|
8533
8595
|
e,
|
|
8534
8596
|
new Error(`Microphone input muted for ${Math.round(i / 1e3)}s`),
|
|
8535
8597
|
"input-muted",
|
|
@@ -8596,9 +8658,9 @@ class Ef {
|
|
|
8596
8658
|
return !n || n.stopped ? !1 : this.attemptResumeAsync(n, "userGesture", !0);
|
|
8597
8659
|
}
|
|
8598
8660
|
}
|
|
8599
|
-
const Te = 1280, we = 720,
|
|
8600
|
-
async function
|
|
8601
|
-
const n = e.mime ?? Ds, r = e.quality ??
|
|
8661
|
+
const Te = 1280, we = 720, gf = 30, Ds = "image/jpeg", Cf = 0.92;
|
|
8662
|
+
async function Af(t, e) {
|
|
8663
|
+
const n = e.mime ?? Ds, r = e.quality ?? Cf;
|
|
8602
8664
|
if (typeof OffscreenCanvas < "u" && t instanceof OffscreenCanvas)
|
|
8603
8665
|
try {
|
|
8604
8666
|
return await t.convertToBlob({ type: n, quality: r });
|
|
@@ -8615,7 +8677,7 @@ async function _f(t, e) {
|
|
|
8615
8677
|
);
|
|
8616
8678
|
});
|
|
8617
8679
|
}
|
|
8618
|
-
class
|
|
8680
|
+
class yf {
|
|
8619
8681
|
async acquireCameraStream(e) {
|
|
8620
8682
|
if (!navigator.mediaDevices)
|
|
8621
8683
|
throw new Error("Media devices are not available in this environment");
|
|
@@ -8637,9 +8699,9 @@ class Tf {
|
|
|
8637
8699
|
} catch {
|
|
8638
8700
|
}
|
|
8639
8701
|
try {
|
|
8640
|
-
await new Promise((
|
|
8641
|
-
const T = () =>
|
|
8642
|
-
s.addEventListener("loadedmetadata", T, { once: !0 }), s.addEventListener("error",
|
|
8702
|
+
await new Promise((m, S) => {
|
|
8703
|
+
const T = () => m(), E = () => S(new Error("Failed to load video element"));
|
|
8704
|
+
s.addEventListener("loadedmetadata", T, { once: !0 }), s.addEventListener("error", E, { once: !0 });
|
|
8643
8705
|
});
|
|
8644
8706
|
try {
|
|
8645
8707
|
await s.play();
|
|
@@ -8650,14 +8712,14 @@ class Tf {
|
|
|
8650
8712
|
if (typeof OffscreenCanvas < "u")
|
|
8651
8713
|
l = new OffscreenCanvas(a, c);
|
|
8652
8714
|
else {
|
|
8653
|
-
const
|
|
8654
|
-
|
|
8715
|
+
const m = document.createElement("canvas");
|
|
8716
|
+
m.width = a, m.height = c, l = m;
|
|
8655
8717
|
}
|
|
8656
8718
|
const p = l.getContext("2d", { alpha: !1 });
|
|
8657
8719
|
if (!p)
|
|
8658
8720
|
throw new Error("2D canvas context unavailable");
|
|
8659
8721
|
p.drawImage(s, 0, 0, a, c);
|
|
8660
|
-
const h = await
|
|
8722
|
+
const h = await Af(l, e), d = await h.arrayBuffer();
|
|
8661
8723
|
return {
|
|
8662
8724
|
mime: h.type || e.mime || Ds,
|
|
8663
8725
|
width: a,
|
|
@@ -8684,7 +8746,7 @@ class Tf {
|
|
|
8684
8746
|
}
|
|
8685
8747
|
}
|
|
8686
8748
|
}
|
|
8687
|
-
function
|
|
8749
|
+
function bf(t) {
|
|
8688
8750
|
return new Worker(
|
|
8689
8751
|
"" + new URL("assets/video-capture-worker-reG7QGzz.js", import.meta.url).href,
|
|
8690
8752
|
{
|
|
@@ -8694,17 +8756,17 @@ function wf(t) {
|
|
|
8694
8756
|
);
|
|
8695
8757
|
}
|
|
8696
8758
|
const _e = P("IkonVideoCapture");
|
|
8697
|
-
function
|
|
8759
|
+
function Rf() {
|
|
8698
8760
|
const t = globalThis.crypto;
|
|
8699
8761
|
return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
|
|
8700
8762
|
}
|
|
8701
|
-
function
|
|
8763
|
+
function Nf() {
|
|
8702
8764
|
const t = globalThis.MediaStreamTrackProcessor;
|
|
8703
8765
|
if (!t)
|
|
8704
8766
|
throw new Error("MediaStreamTrackProcessor is not available in this browser");
|
|
8705
8767
|
return t;
|
|
8706
8768
|
}
|
|
8707
|
-
class
|
|
8769
|
+
class kf {
|
|
8708
8770
|
constructor(e) {
|
|
8709
8771
|
this.client = e;
|
|
8710
8772
|
}
|
|
@@ -8720,7 +8782,7 @@ class Cf {
|
|
|
8720
8782
|
ensureWorker() {
|
|
8721
8783
|
if (this.worker)
|
|
8722
8784
|
return this.worker;
|
|
8723
|
-
const e = new
|
|
8785
|
+
const e = new bf();
|
|
8724
8786
|
return this.worker = e, e.addEventListener("message", (n) => {
|
|
8725
8787
|
const r = n.data;
|
|
8726
8788
|
if (r?.type === "error") {
|
|
@@ -8747,7 +8809,7 @@ class Cf {
|
|
|
8747
8809
|
async getMediaStream(e) {
|
|
8748
8810
|
if (!navigator.mediaDevices)
|
|
8749
8811
|
throw new Error("Media devices are not available in this environment");
|
|
8750
|
-
const n = e.constraints ?? {}, r = e.options?.framerate ??
|
|
8812
|
+
const n = e.constraints ?? {}, r = e.options?.framerate ?? gf;
|
|
8751
8813
|
if (e.sourceType === "screen") {
|
|
8752
8814
|
const a = {
|
|
8753
8815
|
...n,
|
|
@@ -8826,12 +8888,12 @@ class Cf {
|
|
|
8826
8888
|
if (this.client.isWebRtcEnabled && e.sourceType === "screen")
|
|
8827
8889
|
return this.startScreenWebRtc(e);
|
|
8828
8890
|
this.ensurePorts();
|
|
8829
|
-
const r =
|
|
8891
|
+
const r = Rf(), s = await this.getMediaStream(e), i = s.getVideoTracks()[0];
|
|
8830
8892
|
if (!i)
|
|
8831
8893
|
throw s.getTracks().forEach((f) => f.stop()), new Error("No video track available");
|
|
8832
8894
|
e.sourceType === "screen" && await new Promise((f) => setTimeout(f, 200));
|
|
8833
|
-
const o = i.getSettings(), a = e.sourceType === "screen" ? o.width ?? Te : e.options?.width ?? o.width ?? Te, c = e.sourceType === "screen" ? o.height ?? we : e.options?.height ?? o.height ?? we, l =
|
|
8834
|
-
|
|
8895
|
+
const o = i.getSettings(), a = e.sourceType === "screen" ? o.width ?? Te : e.options?.width ?? o.width ?? Te, c = e.sourceType === "screen" ? o.height ?? we : e.options?.height ?? o.height ?? we, l = Nf(), h = new l({ track: i }).readable, d = this.allocateTrackId(), m = this.ensureWorker(), S = e.sourceType, T = e.onStopped;
|
|
8896
|
+
m.postMessage(
|
|
8835
8897
|
{
|
|
8836
8898
|
type: "start",
|
|
8837
8899
|
captureId: r,
|
|
@@ -8852,7 +8914,7 @@ class Cf {
|
|
|
8852
8914
|
},
|
|
8853
8915
|
[h]
|
|
8854
8916
|
);
|
|
8855
|
-
const
|
|
8917
|
+
const E = {
|
|
8856
8918
|
captureId: r,
|
|
8857
8919
|
trackId: d,
|
|
8858
8920
|
stream: s,
|
|
@@ -8861,13 +8923,13 @@ class Cf {
|
|
|
8861
8923
|
stopped: !1,
|
|
8862
8924
|
currentOptions: e.options,
|
|
8863
8925
|
stop: async () => {
|
|
8864
|
-
if (!
|
|
8865
|
-
|
|
8926
|
+
if (!E.stopped) {
|
|
8927
|
+
E.stopped = !0, this.captures.delete(r), E.dimensionCheckInterval && (clearInterval(E.dimensionCheckInterval), E.dimensionCheckInterval = void 0);
|
|
8866
8928
|
try {
|
|
8867
8929
|
s.getTracks().forEach((f) => f.stop());
|
|
8868
8930
|
} catch {
|
|
8869
8931
|
}
|
|
8870
|
-
if (
|
|
8932
|
+
if (m.postMessage({ type: "stop", captureId: r }), T)
|
|
8871
8933
|
try {
|
|
8872
8934
|
T();
|
|
8873
8935
|
} catch {
|
|
@@ -8875,9 +8937,9 @@ class Cf {
|
|
|
8875
8937
|
}
|
|
8876
8938
|
},
|
|
8877
8939
|
updateOptions: async (f) => {
|
|
8878
|
-
if (!
|
|
8879
|
-
if (
|
|
8880
|
-
const u = f.width !== void 0 && f.width !==
|
|
8940
|
+
if (!E.stopped) {
|
|
8941
|
+
if (E.sourceType === "camera") {
|
|
8942
|
+
const u = f.width !== void 0 && f.width !== E.currentOptions?.width, v = f.height !== void 0 && f.height !== E.currentOptions?.height, C = f.framerate !== void 0 && f.framerate !== E.currentOptions?.framerate;
|
|
8881
8943
|
if (u || v || C)
|
|
8882
8944
|
try {
|
|
8883
8945
|
const k = {};
|
|
@@ -8886,19 +8948,19 @@ class Cf {
|
|
|
8886
8948
|
_e.warn(`Failed to apply camera constraints: ${k}`);
|
|
8887
8949
|
}
|
|
8888
8950
|
}
|
|
8889
|
-
|
|
8951
|
+
E.currentOptions = f, m.postMessage({ type: "updateOptions", captureId: r, options: f });
|
|
8890
8952
|
}
|
|
8891
8953
|
}
|
|
8892
8954
|
};
|
|
8893
8955
|
if (e.sourceType === "screen") {
|
|
8894
8956
|
let f = a, u = c;
|
|
8895
|
-
|
|
8896
|
-
if (
|
|
8897
|
-
|
|
8957
|
+
E.dimensionCheckInterval = setInterval(() => {
|
|
8958
|
+
if (E.stopped) {
|
|
8959
|
+
E.dimensionCheckInterval && (clearInterval(E.dimensionCheckInterval), E.dimensionCheckInterval = void 0);
|
|
8898
8960
|
return;
|
|
8899
8961
|
}
|
|
8900
8962
|
const v = i.getSettings(), C = v.width ?? f, k = v.height ?? u;
|
|
8901
|
-
(C !== f || k !== u) && (f = C, u = k,
|
|
8963
|
+
(C !== f || k !== u) && (f = C, u = k, m.postMessage({
|
|
8902
8964
|
type: "updateDimensions",
|
|
8903
8965
|
captureId: r,
|
|
8904
8966
|
width: C,
|
|
@@ -8907,16 +8969,16 @@ class Cf {
|
|
|
8907
8969
|
}, 1e3);
|
|
8908
8970
|
}
|
|
8909
8971
|
return i.addEventListener("ended", () => {
|
|
8910
|
-
|
|
8911
|
-
}), this.captures.set(r,
|
|
8972
|
+
E.stop();
|
|
8973
|
+
}), this.captures.set(r, E), {
|
|
8912
8974
|
captureId: r,
|
|
8913
8975
|
streamId: r,
|
|
8914
8976
|
sourceType: e.sourceType,
|
|
8915
8977
|
get currentOptions() {
|
|
8916
|
-
return
|
|
8978
|
+
return E.currentOptions;
|
|
8917
8979
|
},
|
|
8918
|
-
stop:
|
|
8919
|
-
updateOptions:
|
|
8980
|
+
stop: E.stop,
|
|
8981
|
+
updateOptions: E.updateOptions
|
|
8920
8982
|
};
|
|
8921
8983
|
}
|
|
8922
8984
|
async startCamera(e) {
|
|
@@ -8946,12 +9008,12 @@ class Cf {
|
|
|
8946
9008
|
this.protocolPort?.close(), this.protocolPort = null, this.sendPort?.close(), this.sendPort = null;
|
|
8947
9009
|
}
|
|
8948
9010
|
}
|
|
8949
|
-
class
|
|
9011
|
+
class Df {
|
|
8950
9012
|
audio;
|
|
8951
9013
|
video;
|
|
8952
9014
|
image;
|
|
8953
9015
|
constructor(e, n) {
|
|
8954
|
-
this.audio = new
|
|
9016
|
+
this.audio = new Sf(e, n?.audio), this.video = new kf(e), this.image = new yf();
|
|
8955
9017
|
}
|
|
8956
9018
|
dispose() {
|
|
8957
9019
|
this.audio.dispose(), this.video.dispose();
|
|
@@ -8959,16 +9021,16 @@ class Af {
|
|
|
8959
9021
|
}
|
|
8960
9022
|
const vs = P("DebugMode");
|
|
8961
9023
|
let se = !1;
|
|
8962
|
-
function
|
|
8963
|
-
return se =
|
|
9024
|
+
function vf() {
|
|
9025
|
+
return se = wh(), se && (hs(Ve.DEBUG), vs.warn("Debug mode enabled")), se;
|
|
8964
9026
|
}
|
|
8965
|
-
function
|
|
9027
|
+
function Uf() {
|
|
8966
9028
|
return se;
|
|
8967
9029
|
}
|
|
8968
|
-
function
|
|
8969
|
-
se || (se = !0, hs(Ve.DEBUG), vs.warn("Debug mode enabled"),
|
|
9030
|
+
function Of() {
|
|
9031
|
+
se || (se = !0, hs(Ve.DEBUG), vs.warn("Debug mode enabled"), Eh(Ss, "true"));
|
|
8970
9032
|
}
|
|
8971
|
-
function
|
|
9033
|
+
function Mf(t) {
|
|
8972
9034
|
return new Worker(
|
|
8973
9035
|
"" + new URL("assets/protocol-worker-C3oOno6C.js", import.meta.url).href,
|
|
8974
9036
|
{
|
|
@@ -8983,7 +9045,7 @@ const nn = {
|
|
|
8983
9045
|
[N.WebTransportProxy]: 2,
|
|
8984
9046
|
[N.WebSocketProxy]: 3
|
|
8985
9047
|
}, Je = /* @__PURE__ */ new Set([N.WebTransportProxy, N.WebSocketProxy]), Qe = /* @__PURE__ */ new Set([N.WebTransport, N.WebSocket]), rn = /* @__PURE__ */ new Set([N.WebSocket, N.WebSocketProxy]), sn = /* @__PURE__ */ new Set([N.WebTransport, N.WebTransportProxy]), Ze = "ikon_endpoint_type", Ue = "ikon_proxy_preferred";
|
|
8986
|
-
class
|
|
9048
|
+
class Pf {
|
|
8987
9049
|
isLocal;
|
|
8988
9050
|
_proxyMode;
|
|
8989
9051
|
_websocket;
|
|
@@ -9096,10 +9158,10 @@ class kf {
|
|
|
9096
9158
|
}
|
|
9097
9159
|
}
|
|
9098
9160
|
const I = P("IkonClient");
|
|
9099
|
-
function
|
|
9161
|
+
function Lf() {
|
|
9100
9162
|
return typeof __IKON_WAIT_FOR_EXTERNAL_CONNECT_URL__ < "u" && __IKON_WAIT_FOR_EXTERNAL_CONNECT_URL__;
|
|
9101
9163
|
}
|
|
9102
|
-
class
|
|
9164
|
+
class ap {
|
|
9103
9165
|
channelManager = null;
|
|
9104
9166
|
protocolWorker = null;
|
|
9105
9167
|
workerManagerState = null;
|
|
@@ -9158,7 +9220,7 @@ class tp {
|
|
|
9158
9220
|
_reconnectTimer = null;
|
|
9159
9221
|
_serverStopped = !1;
|
|
9160
9222
|
// External connect URL mode
|
|
9161
|
-
_waitForExternalConnectUrl =
|
|
9223
|
+
_waitForExternalConnectUrl = Lf();
|
|
9162
9224
|
_externalConnectUrlCleanup = null;
|
|
9163
9225
|
/**
|
|
9164
9226
|
* SDK-provided media pipelines (audio/video).
|
|
@@ -9230,34 +9292,34 @@ class tp {
|
|
|
9230
9292
|
return this._webRtcSignaling;
|
|
9231
9293
|
}
|
|
9232
9294
|
constructor(e) {
|
|
9233
|
-
this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ??
|
|
9295
|
+
this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ?? rd, this.connectionTimeoutMs = e.timeouts?.connectionTimeoutMs ?? sd;
|
|
9234
9296
|
const n = [e.local, e.apiKey, e.sessionToken].filter(Boolean).length;
|
|
9235
9297
|
if (n === 0)
|
|
9236
9298
|
throw new Error('IkonClient requires one of: "local", "apiKey", or "sessionToken" configuration');
|
|
9237
9299
|
if (n > 1)
|
|
9238
9300
|
throw new Error('IkonClient accepts only one of: "local", "apiKey", or "sessionToken" configuration');
|
|
9239
|
-
ze() &&
|
|
9240
|
-
const r = e.local ? null :
|
|
9241
|
-
this.endpointSelector = new
|
|
9301
|
+
ze() && hd();
|
|
9302
|
+
const r = e.local ? null : Ih() ?? e.proxy ?? null, s = r === !0 ? "force-proxy" : r === !1 ? "force-direct" : "auto", i = e.local ? null : _h(), o = e.local ? null : Th(), a = i ?? e.websocket, c = o ?? e.webtransport;
|
|
9303
|
+
this.endpointSelector = new Pf({
|
|
9242
9304
|
local: e.local,
|
|
9243
9305
|
proxyMode: s,
|
|
9244
9306
|
websocket: a,
|
|
9245
9307
|
webtransport: c
|
|
9246
|
-
}), s !== "auto" ? I.info(`Proxy mode: ${s}`) : this.endpointSelector.proxyPreferred && I.info("Proxy preferred (from previous session)"), (a !== void 0 || c !== void 0) && I.info(`Transport filter: websocket=${a ?? "auto"}, webtransport=${c ?? "auto"}`), this._functionRegistry = new
|
|
9247
|
-
const l =
|
|
9308
|
+
}), s !== "auto" ? I.info(`Proxy mode: ${s}`) : this.endpointSelector.proxyPreferred && I.info("Proxy preferred (from previous session)"), (a !== void 0 || c !== void 0) && I.info(`Transport filter: websocket=${a ?? "auto"}, webtransport=${c ?? "auto"}`), this._functionRegistry = new Dh(), ze() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = Kd(this._functionRegistry), this.unregisterSoundFunctions = $h(this._functionRegistry));
|
|
9309
|
+
const l = gh(), p = Ch(), h = Ah();
|
|
9248
9310
|
this._audioEnabled = l ?? e.audio?.enabled ?? !0, this._videoEnabled = p ?? e.video?.enabled ?? !0;
|
|
9249
9311
|
const d = e.audio ? {
|
|
9250
9312
|
performance: e.audio.performance,
|
|
9251
9313
|
background: e.audio.background,
|
|
9252
9314
|
diagnostics: e.audio.diagnostics
|
|
9253
|
-
} : void 0,
|
|
9254
|
-
this._media = new
|
|
9315
|
+
} : void 0, m = e.video ? { performance: e.video.performance } : void 0;
|
|
9316
|
+
this._media = new df(this, { audio: d, video: m, mediaSession: e.mediaSession }), (h ?? e.webRtc?.enabled) || (this._audioEnabled && this._media.audio.setEnabled(!0), this._videoEnabled && this._media.video.setEnabled(!0)), ze() && (this._mediaCapture = new Df(this, {
|
|
9255
9317
|
audio: {
|
|
9256
9318
|
performance: {
|
|
9257
9319
|
preferWebCodecs: e.audio?.performance?.preferWebCodecs
|
|
9258
9320
|
}
|
|
9259
9321
|
}
|
|
9260
|
-
}), this.unregisterMediaCaptureFunctions =
|
|
9322
|
+
}), this.unregisterMediaCaptureFunctions = Lh(this._functionRegistry, this));
|
|
9261
9323
|
}
|
|
9262
9324
|
_lastError = void 0;
|
|
9263
9325
|
/**
|
|
@@ -9302,7 +9364,7 @@ class tp {
|
|
|
9302
9364
|
if (this.currentState !== "idle")
|
|
9303
9365
|
throw new Error(`Cannot connect: already in state ${this.currentState}`);
|
|
9304
9366
|
this.setupLifecycleHandlers();
|
|
9305
|
-
const e =
|
|
9367
|
+
const e = Sh();
|
|
9306
9368
|
if (e) {
|
|
9307
9369
|
I.info("Found external connect URL in query parameter"), await this.executeConnection(() => xe(e, this.abortController.signal));
|
|
9308
9370
|
return;
|
|
@@ -9324,7 +9386,7 @@ class tp {
|
|
|
9324
9386
|
}, this.connectionTimeoutMs);
|
|
9325
9387
|
try {
|
|
9326
9388
|
const n = await e();
|
|
9327
|
-
this.authResponse = n.authResponse, this._sessionId = n.authResponse.ClientContext.SessionId, I.info(
|
|
9389
|
+
this.authResponse = n.authResponse, this._sessionId = n.authResponse.ClientContext.SessionId, I.info(`Authenticated to Ikon server (${n.authResponse.ServerSessionId})`), await this.connectProtocol(this.authResponse.Entrypoints);
|
|
9328
9390
|
} catch (n) {
|
|
9329
9391
|
if (n instanceof DOMException && n.name === "AbortError")
|
|
9330
9392
|
return;
|
|
@@ -9380,8 +9442,8 @@ class tp {
|
|
|
9380
9442
|
I.warn("Cannot send UpdateClientContext: not connected");
|
|
9381
9443
|
return;
|
|
9382
9444
|
}
|
|
9383
|
-
const n =
|
|
9384
|
-
|
|
9445
|
+
const n = Ol(
|
|
9446
|
+
kl({
|
|
9385
9447
|
ViewportWidth: e.viewportWidth ?? 0,
|
|
9386
9448
|
ViewportHeight: e.viewportHeight ?? 0,
|
|
9387
9449
|
Theme: e.theme ?? "",
|
|
@@ -9542,13 +9604,13 @@ class tp {
|
|
|
9542
9604
|
async authenticate() {
|
|
9543
9605
|
const e = this.abortController?.signal;
|
|
9544
9606
|
if (this.config.local)
|
|
9545
|
-
return
|
|
9607
|
+
return ih(this.config.local, e);
|
|
9546
9608
|
const n = this.endpointSelector.proxyMode, r = this.endpointSelector.proxyPreferred;
|
|
9547
9609
|
let s;
|
|
9548
9610
|
if (this.config.apiKey)
|
|
9549
|
-
s = await
|
|
9611
|
+
s = await oh(this.config.apiKey, e, n, r);
|
|
9550
9612
|
else if (this.config.sessionToken)
|
|
9551
|
-
s = await
|
|
9613
|
+
s = await ah(this.config.sessionToken, e, n, r);
|
|
9552
9614
|
else
|
|
9553
9615
|
throw new Error("No connection configuration provided (need local, apiKey, or sessionToken)");
|
|
9554
9616
|
return s.usedProxyUrl && n === "auto" && this.endpointSelector.markProxyPreferred(), s;
|
|
@@ -9564,8 +9626,8 @@ class tp {
|
|
|
9564
9626
|
this.notifyMessageSubscribers(e, n, r);
|
|
9565
9627
|
return;
|
|
9566
9628
|
}
|
|
9567
|
-
n === g.CORE_GLOBAL_STATE &&
|
|
9568
|
-
this._globalState = s, this._sessionId !== void 0 && this._functionRegistry.syncFromGlobalState(s, this._sessionId), this._globalState.DebugMode &&
|
|
9629
|
+
n === g.CORE_GLOBAL_STATE && Wc(e).then((s) => {
|
|
9630
|
+
this._globalState = s, this._sessionId !== void 0 && this._functionRegistry.syncFromGlobalState(s, this._sessionId), this._globalState.DebugMode && Of(), Uf() && this.protocolWorker && this.protocolWorker.postMessage({ type: "enableDevtools", enabled: !0 }), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
|
|
9569
9631
|
}).catch((s) => {
|
|
9570
9632
|
I.error("Failed to parse GlobalState:", s);
|
|
9571
9633
|
}), this.notifyMessageSubscribers(e, n, r);
|
|
@@ -9668,43 +9730,43 @@ class tp {
|
|
|
9668
9730
|
}
|
|
9669
9731
|
let r;
|
|
9670
9732
|
try {
|
|
9671
|
-
r = new
|
|
9733
|
+
r = new Mf();
|
|
9672
9734
|
} catch (h) {
|
|
9673
9735
|
I.warn(`Failed to create protocol worker, falling back to main thread: ${h}`), await this.connectProtocolOnMainThread(e, n);
|
|
9674
9736
|
return;
|
|
9675
9737
|
}
|
|
9676
9738
|
this.channelManager = null, this.protocolWorker = r, this.workerManagerState = "idle";
|
|
9677
9739
|
const s = new Promise((h, d) => {
|
|
9678
|
-
let
|
|
9740
|
+
let m = !1;
|
|
9679
9741
|
const S = (T) => {
|
|
9680
|
-
const
|
|
9681
|
-
if (
|
|
9682
|
-
const f = new Uint8Array(
|
|
9742
|
+
const E = T.data;
|
|
9743
|
+
if (E?.type === "protocol" && E.message instanceof ArrayBuffer) {
|
|
9744
|
+
const f = new Uint8Array(E.message);
|
|
9683
9745
|
this.handleProtocolMessage(f);
|
|
9684
9746
|
return;
|
|
9685
9747
|
}
|
|
9686
|
-
if (
|
|
9687
|
-
const f =
|
|
9748
|
+
if (E?.type === "state") {
|
|
9749
|
+
const f = E.state;
|
|
9688
9750
|
this.workerManagerState = f;
|
|
9689
|
-
const u =
|
|
9690
|
-
u !== void 0 && this.endpointSelector.rememberWorkingType(u), this.handleChannelManagerStateChange(f), f === "connected" && !
|
|
9751
|
+
const u = E.activeType;
|
|
9752
|
+
u !== void 0 && this.endpointSelector.rememberWorkingType(u), this.handleChannelManagerStateChange(f), f === "connected" && !m && (m = !0, h());
|
|
9691
9753
|
return;
|
|
9692
9754
|
}
|
|
9693
|
-
if (
|
|
9694
|
-
const f =
|
|
9755
|
+
if (E?.type === "error") {
|
|
9756
|
+
const f = E.error, u = new Error(String(f?.message ?? "Worker error"));
|
|
9695
9757
|
u.name = String(f?.name ?? "Error"), d(u);
|
|
9696
9758
|
}
|
|
9697
9759
|
};
|
|
9698
9760
|
r.addEventListener("message", S), r.addEventListener("error", (T) => {
|
|
9699
|
-
const
|
|
9700
|
-
if (
|
|
9761
|
+
const E = [T.message, T.filename, T.lineno, T.colno].filter((f) => f != null && String(f).length > 0);
|
|
9762
|
+
if (m) {
|
|
9701
9763
|
I.error("Protocol worker crashed after connect"), this.workerManagerState = "offline", this.handleChannelManagerStateChange("offline");
|
|
9702
9764
|
return;
|
|
9703
9765
|
}
|
|
9704
|
-
d(new Error(`Protocol worker failed: ${
|
|
9766
|
+
d(new Error(`Protocol worker failed: ${E.join(" ")}`.trim()));
|
|
9705
9767
|
});
|
|
9706
9768
|
}), i = this.computeOrderedEndpointTypes(e), o = this.config.timeouts?.keepaliveTimeoutMs ?? Vt, a = this.config.timeouts?.reconnectBackoffMs ?? Ht, c = this.config.timeouts?.maxReconnectAttempts ?? $t;
|
|
9707
|
-
this.updateWorkerInterestMask(),
|
|
9769
|
+
this.updateWorkerInterestMask(), vf() && r.postMessage({ type: "enableDevtools", enabled: !0 });
|
|
9708
9770
|
const p = this.config.webRtc?.enabled ?? !1;
|
|
9709
9771
|
r.postMessage({
|
|
9710
9772
|
type: "connect",
|
|
@@ -9766,7 +9828,7 @@ class tp {
|
|
|
9766
9828
|
this.onWebRtcTrackMapChanged?.(s);
|
|
9767
9829
|
}
|
|
9768
9830
|
};
|
|
9769
|
-
this._webRtcSignaling = new
|
|
9831
|
+
this._webRtcSignaling = new nd(n);
|
|
9770
9832
|
try {
|
|
9771
9833
|
await this._webRtcSignaling.connect((r) => {
|
|
9772
9834
|
this.sendProtocolMessage(r);
|
|
@@ -9776,7 +9838,7 @@ class tp {
|
|
|
9776
9838
|
}
|
|
9777
9839
|
}
|
|
9778
9840
|
_webRtcAudioUnlockHandler = null;
|
|
9779
|
-
_webRtcMediaSession = new
|
|
9841
|
+
_webRtcMediaSession = new bs();
|
|
9780
9842
|
playWebRtcAudioTrack(e, n) {
|
|
9781
9843
|
if (typeof document > "u")
|
|
9782
9844
|
return;
|
|
@@ -9825,7 +9887,7 @@ class tp {
|
|
|
9825
9887
|
async connectProtocolOnMainThread(e, n = !1) {
|
|
9826
9888
|
this.workerManagerState = null, this.protocolWorker = null;
|
|
9827
9889
|
const r = this.config.webRtc?.enabled ?? !1;
|
|
9828
|
-
I.info(`Connecting on main thread (webRtcEnabled=${r}, entrypoints=${e.length})`), this.channelManager = new
|
|
9890
|
+
I.info(`Connecting on main thread (webRtcEnabled=${r}, entrypoints=${e.length})`), this.channelManager = new Hu({
|
|
9829
9891
|
sessionId: this._sessionId,
|
|
9830
9892
|
keepaliveTimeoutMs: this.config.timeouts?.keepaliveTimeoutMs ?? Vt,
|
|
9831
9893
|
reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ?? Ht,
|
|
@@ -9920,7 +9982,7 @@ class tp {
|
|
|
9920
9982
|
if (this._reauthInProgress)
|
|
9921
9983
|
return;
|
|
9922
9984
|
this.clearReconnectTimer();
|
|
9923
|
-
const n = (this._disconnectedAt !== null ? Date.now() - this._disconnectedAt : 1 / 0) >
|
|
9985
|
+
const n = (this._disconnectedAt !== null ? Date.now() - this._disconnectedAt : 1 / 0) > id;
|
|
9924
9986
|
if (!n && !this._softReconnectAttempted && !this._fullReauthAttempted && this.authResponse) {
|
|
9925
9987
|
I.info("Attempting soft reconnect with cached entrypoints"), this._softReconnectAttempted = !0, this._channelsConnected = !1, this._globalStateReceived = !1, this._joinedHandled = !1, this.disconnectProtocol(), this.connectProtocol(this.authResponse.Entrypoints, !0);
|
|
9926
9988
|
return;
|
|
@@ -9934,7 +9996,7 @@ class tp {
|
|
|
9934
9996
|
scheduleReconnectRetry() {
|
|
9935
9997
|
this.clearReconnectTimer(), I.info("Scheduling reconnect retry in 10 seconds"), this._reconnectTimer = setTimeout(() => {
|
|
9936
9998
|
this._reconnectTimer = null, this.attemptReconnect();
|
|
9937
|
-
},
|
|
9999
|
+
}, od);
|
|
9938
10000
|
}
|
|
9939
10001
|
clearReconnectTimer() {
|
|
9940
10002
|
this._reconnectTimer && (clearTimeout(this._reconnectTimer), this._reconnectTimer = null);
|
|
@@ -10088,165 +10150,165 @@ class tp {
|
|
|
10088
10150
|
}
|
|
10089
10151
|
}
|
|
10090
10152
|
}
|
|
10091
|
-
function
|
|
10153
|
+
function cp(t) {
|
|
10092
10154
|
return t === "waitingForExternalConnectUrl" || t === "connecting" || t === "connectingSlow" || t === "reconnecting";
|
|
10093
10155
|
}
|
|
10094
|
-
function
|
|
10156
|
+
function lp(t) {
|
|
10095
10157
|
return t === "connected";
|
|
10096
10158
|
}
|
|
10097
|
-
function
|
|
10159
|
+
function up(t) {
|
|
10098
10160
|
return t === "offline" || t === "offlineError" || t === "idle";
|
|
10099
10161
|
}
|
|
10100
|
-
function
|
|
10162
|
+
function dp(t) {
|
|
10101
10163
|
return t === "offlineError";
|
|
10102
10164
|
}
|
|
10103
10165
|
const Us = /* @__PURE__ */ new Map();
|
|
10104
10166
|
for (const [t, e] of Object.entries(g))
|
|
10105
10167
|
typeof e == "number" && Us.set(e, t);
|
|
10106
|
-
function
|
|
10168
|
+
function hp(t) {
|
|
10107
10169
|
return Us.get(t) ?? `UNKNOWN_${t}`;
|
|
10108
10170
|
}
|
|
10109
10171
|
const Os = 1e3, Ms = Ve.INFO;
|
|
10110
10172
|
let H = [], dt = Os, Ps = Ms, ht = null;
|
|
10111
|
-
function
|
|
10173
|
+
function Ff(t) {
|
|
10112
10174
|
t.level < Ps || (H.push(t), H.length > dt && (H = H.slice(-dt)));
|
|
10113
10175
|
}
|
|
10114
|
-
function
|
|
10115
|
-
dt = t?.maxBufferSize ?? Os, Ps = t?.minLevel ?? Ms, H = [],
|
|
10176
|
+
function Bf(t) {
|
|
10177
|
+
dt = t?.maxBufferSize ?? Os, Ps = t?.minLevel ?? Ms, H = [], Pu(Ff);
|
|
10116
10178
|
}
|
|
10117
|
-
function
|
|
10179
|
+
function fp(t) {
|
|
10118
10180
|
ht = t;
|
|
10119
10181
|
}
|
|
10120
|
-
function
|
|
10182
|
+
function pp() {
|
|
10121
10183
|
return H;
|
|
10122
10184
|
}
|
|
10123
|
-
function
|
|
10185
|
+
function xf() {
|
|
10124
10186
|
const t = H;
|
|
10125
10187
|
return H = [], t;
|
|
10126
10188
|
}
|
|
10127
|
-
function
|
|
10189
|
+
function mp() {
|
|
10128
10190
|
if (!ht || H.length === 0)
|
|
10129
10191
|
return 0;
|
|
10130
|
-
const t =
|
|
10192
|
+
const t = xf();
|
|
10131
10193
|
return ht(t), t.length;
|
|
10132
10194
|
}
|
|
10133
|
-
function
|
|
10195
|
+
function Ep() {
|
|
10134
10196
|
H = [];
|
|
10135
10197
|
}
|
|
10136
|
-
function
|
|
10198
|
+
function Ip() {
|
|
10137
10199
|
return H.length;
|
|
10138
10200
|
}
|
|
10139
|
-
|
|
10201
|
+
Bf();
|
|
10140
10202
|
export {
|
|
10141
|
-
|
|
10142
|
-
|
|
10143
|
-
|
|
10144
|
-
|
|
10203
|
+
R as AuthenticationError,
|
|
10204
|
+
Vu as Channel,
|
|
10205
|
+
Hu as ChannelManager,
|
|
10206
|
+
Gf as ChannelNotFoundError,
|
|
10145
10207
|
ne as ClientType,
|
|
10146
10208
|
Ct as ConnectionError,
|
|
10147
10209
|
de as ContextType,
|
|
10148
|
-
|
|
10210
|
+
Pf as EndpointSelector,
|
|
10149
10211
|
N as EntrypointType,
|
|
10150
|
-
|
|
10151
|
-
|
|
10152
|
-
|
|
10212
|
+
Nh as FunctionCallError,
|
|
10213
|
+
Dh as FunctionRegistry,
|
|
10214
|
+
ep as IKON_AUTH_BASE_URL,
|
|
10153
10215
|
jt as IKON_AUTH_URL_DEV,
|
|
10154
10216
|
Yt as IKON_AUTH_URL_PROD,
|
|
10155
10217
|
ct as IKON_BACKEND_URL_DEV,
|
|
10156
10218
|
at as IKON_BACKEND_URL_PROD,
|
|
10157
|
-
|
|
10219
|
+
fh as IKON_PARAM_AUDIO,
|
|
10158
10220
|
Ss as IKON_PARAM_DEBUG,
|
|
10159
|
-
|
|
10160
|
-
|
|
10161
|
-
|
|
10162
|
-
|
|
10163
|
-
|
|
10164
|
-
|
|
10165
|
-
|
|
10166
|
-
|
|
10167
|
-
|
|
10168
|
-
|
|
10221
|
+
ip as IKON_PARAM_GIT_BRANCH,
|
|
10222
|
+
sp as IKON_PARAM_GIT_SOURCE,
|
|
10223
|
+
dh as IKON_PARAM_LANG,
|
|
10224
|
+
ch as IKON_PARAM_PROXY,
|
|
10225
|
+
hh as IKON_PARAM_SERVER_URL,
|
|
10226
|
+
ph as IKON_PARAM_VIDEO,
|
|
10227
|
+
mh as IKON_PARAM_WEBRTC,
|
|
10228
|
+
lh as IKON_PARAM_WEBSOCKET,
|
|
10229
|
+
uh as IKON_PARAM_WEBTRANSPORT,
|
|
10230
|
+
Sf as IkonAudioCapture,
|
|
10169
10231
|
Mt as IkonAudioPlayback,
|
|
10170
|
-
|
|
10171
|
-
|
|
10172
|
-
|
|
10173
|
-
|
|
10174
|
-
|
|
10175
|
-
|
|
10232
|
+
ap as IkonClient,
|
|
10233
|
+
yf as IkonImageCapture,
|
|
10234
|
+
df as IkonMedia,
|
|
10235
|
+
Df as IkonMediaCapture,
|
|
10236
|
+
kf as IkonVideoCapture,
|
|
10237
|
+
uf as IkonVideoPlayback,
|
|
10176
10238
|
At as KeepaliveTimeoutError,
|
|
10177
10239
|
Ve as LogLevel,
|
|
10178
|
-
|
|
10179
|
-
|
|
10240
|
+
Ou as MaxRetriesExceededError,
|
|
10241
|
+
Hf as NoChannelsError,
|
|
10180
10242
|
g as Opcode,
|
|
10181
|
-
|
|
10182
|
-
|
|
10243
|
+
Mu as ProvisioningTimeoutError,
|
|
10244
|
+
Vf as SpaceNotFoundError,
|
|
10183
10245
|
q as TransportError,
|
|
10184
10246
|
fe as UserType,
|
|
10185
|
-
|
|
10186
|
-
|
|
10187
|
-
|
|
10188
|
-
|
|
10189
|
-
|
|
10190
|
-
|
|
10191
|
-
|
|
10192
|
-
|
|
10193
|
-
|
|
10194
|
-
|
|
10195
|
-
|
|
10196
|
-
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
|
|
10200
|
-
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10204
|
-
|
|
10205
|
-
|
|
10206
|
-
|
|
10247
|
+
Jf as WEBRTC_AUDIO_BITRATE,
|
|
10248
|
+
Xf as WEBRTC_AUDIO_CHANNELS,
|
|
10249
|
+
jf as WEBRTC_AUDIO_CODEC,
|
|
10250
|
+
$u as WEBRTC_AUDIO_JITTER_BUFFER_TARGET_MS,
|
|
10251
|
+
zf as WEBRTC_AUDIO_SAMPLE_RATE,
|
|
10252
|
+
ju as WEBRTC_BUNDLE_POLICY,
|
|
10253
|
+
Zu as WEBRTC_DATA_CHANNEL_LABEL,
|
|
10254
|
+
ed as WEBRTC_DATA_CHANNEL_MAX_RETRANSMITS,
|
|
10255
|
+
qu as WEBRTC_DATA_CHANNEL_ORDERED,
|
|
10256
|
+
Xu as WEBRTC_ICE_SERVERS,
|
|
10257
|
+
Ju as WEBRTC_MAX_AUDIO_TRACKS,
|
|
10258
|
+
Qu as WEBRTC_MAX_VIDEO_TRACKS,
|
|
10259
|
+
zu as WEBRTC_RTCP_MUX_POLICY,
|
|
10260
|
+
Qf as WEBRTC_VIDEO_CODEC,
|
|
10261
|
+
Ku as WEBRTC_VIDEO_MAX_BITRATE,
|
|
10262
|
+
Zf as WEBRTC_VIDEO_MAX_FRAMERATE,
|
|
10263
|
+
td as WebRTCConnection,
|
|
10264
|
+
nd as WebRTCSignaling,
|
|
10265
|
+
Wf as asProtocolMessage,
|
|
10266
|
+
qf as clearDeviceId,
|
|
10267
|
+
Ep as clearLogBuffer,
|
|
10268
|
+
rp as clearSessionParamsFromUrl,
|
|
10207
10269
|
P as createLogger,
|
|
10208
|
-
|
|
10209
|
-
|
|
10270
|
+
jd as deriveAuthUrl,
|
|
10271
|
+
tp as deriveBackendType,
|
|
10210
10272
|
zt as deriveBackendUrl,
|
|
10211
|
-
|
|
10212
|
-
|
|
10213
|
-
|
|
10214
|
-
|
|
10215
|
-
|
|
10216
|
-
|
|
10217
|
-
|
|
10218
|
-
|
|
10219
|
-
|
|
10220
|
-
|
|
10273
|
+
Yd as extractUserIdFromToken,
|
|
10274
|
+
mp as flushLogs,
|
|
10275
|
+
gh as getAudioParam,
|
|
10276
|
+
pp as getBufferedLogs,
|
|
10277
|
+
wh as getDebugParam,
|
|
10278
|
+
op as getLangParam,
|
|
10279
|
+
Ip as getLogBufferSize,
|
|
10280
|
+
$f as getLogLevel,
|
|
10281
|
+
Kf as getLogSink,
|
|
10282
|
+
hp as getOpcodeName,
|
|
10221
10283
|
$e as getOrCreateDeviceId,
|
|
10222
|
-
|
|
10223
|
-
|
|
10224
|
-
|
|
10225
|
-
|
|
10226
|
-
|
|
10227
|
-
|
|
10228
|
-
|
|
10229
|
-
|
|
10284
|
+
Ih as getProxyParam,
|
|
10285
|
+
Sh as getServerUrlParam,
|
|
10286
|
+
Ch as getVideoParam,
|
|
10287
|
+
Ah as getWebRtcParam,
|
|
10288
|
+
_h as getWebSocketParam,
|
|
10289
|
+
Th as getWebTransportParam,
|
|
10290
|
+
vf as initializeDebugMode,
|
|
10291
|
+
Bf as initializeLogSink,
|
|
10230
10292
|
ys as isAudioWorkletSupported,
|
|
10231
10293
|
ze as isBrowserEnvironment,
|
|
10232
10294
|
vt as isCloudEnvironment,
|
|
10233
|
-
|
|
10234
|
-
|
|
10235
|
-
|
|
10236
|
-
|
|
10237
|
-
|
|
10295
|
+
lp as isConnected,
|
|
10296
|
+
cp as isConnecting,
|
|
10297
|
+
Uf as isDebugModeEnabled,
|
|
10298
|
+
dp as isError,
|
|
10299
|
+
up as isOffline,
|
|
10238
10300
|
Me as isSharedArrayBufferSupported,
|
|
10239
10301
|
fs as isWebTransportSupported,
|
|
10240
|
-
|
|
10302
|
+
np as parseUrlParams,
|
|
10241
10303
|
Se as readOpcode,
|
|
10242
10304
|
Oe as readOpcodeGroup,
|
|
10243
10305
|
ce as readProtocolMessageHeaders,
|
|
10244
|
-
|
|
10306
|
+
Kd as registerBrowserFunctions,
|
|
10245
10307
|
hs as setLogLevel,
|
|
10246
|
-
|
|
10247
|
-
|
|
10248
|
-
|
|
10249
|
-
|
|
10250
|
-
|
|
10251
|
-
|
|
10308
|
+
Pu as setLogSink,
|
|
10309
|
+
Eh as setSdkUrlParam,
|
|
10310
|
+
fp as setSendLogsCallback,
|
|
10311
|
+
Yf as subscribeToLogEvents,
|
|
10312
|
+
xf as takeBufferedLogs,
|
|
10313
|
+
Rh as withResultData
|
|
10252
10314
|
};
|