@ikonai/sdk 1.0.5 → 1.0.7
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/client/connection-state.d.ts +1 -1
- package/client/ikon-client.d.ts +15 -0
- package/connection/authenticator.d.ts +4 -0
- package/index.js +868 -835
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const
|
|
1
|
+
const Wr = {
|
|
2
2
|
Compressed: 8
|
|
3
3
|
};
|
|
4
|
-
function
|
|
4
|
+
function _l(t) {
|
|
5
5
|
return t;
|
|
6
6
|
}
|
|
7
7
|
function ue(t) {
|
|
@@ -35,7 +35,7 @@ function ne(t) {
|
|
|
35
35
|
flags: d
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
async function
|
|
38
|
+
async function Le(t, e, r) {
|
|
39
39
|
const n = se(t), s = ne(n);
|
|
40
40
|
if (e !== void 0 && s.opcode !== e)
|
|
41
41
|
throw new Error(`Unexpected opcode ${s.opcode}`);
|
|
@@ -43,7 +43,7 @@ async function Oe(t, e, r) {
|
|
|
43
43
|
throw new Error(`Unexpected payload type ${s.payloadType}`);
|
|
44
44
|
const i = 27 + s.targetIds.length * 4;
|
|
45
45
|
let o = n.subarray(i, s.length);
|
|
46
|
-
return (s.flags &
|
|
46
|
+
return (s.flags & Wr.Compressed) !== 0 && (o = await Hr(o)), o;
|
|
47
47
|
}
|
|
48
48
|
function F(t, e, r, n, s) {
|
|
49
49
|
const i = s?.trackId ?? 0, o = s?.sequenceId ?? 0, a = s?.flags ?? 0, c = s?.targetIds ?? [], l = s?.payloadType ?? 8, f = 27 + c.length * 4, d = f + e.length, h = new Uint8Array(d), E = new DataView(h.buffer);
|
|
@@ -53,7 +53,7 @@ function F(t, e, r, n, s) {
|
|
|
53
53
|
E.setUint32(m, c[I] >>> 0, !0), m += 4;
|
|
54
54
|
return h.set(e, f), h;
|
|
55
55
|
}
|
|
56
|
-
async function
|
|
56
|
+
async function Hr(t) {
|
|
57
57
|
if (typeof DecompressionStream > "u")
|
|
58
58
|
throw new Error("DecompressionStream not supported");
|
|
59
59
|
const e = new DecompressionStream("gzip"), r = e.writable.getWriter(), n = new Uint8Array(t);
|
|
@@ -72,7 +72,7 @@ async function Vr(t) {
|
|
|
72
72
|
return a;
|
|
73
73
|
}
|
|
74
74
|
var b = /* @__PURE__ */ ((t) => (t[t.Null = 1] = "Null", t[t.Bool = 2] = "Bool", t[t.Int32 = 3] = "Int32", t[t.Int64 = 4] = "Int64", t[t.UInt32 = 5] = "UInt32", t[t.UInt64 = 6] = "UInt64", t[t.Float32 = 7] = "Float32", t[t.Float64 = 8] = "Float64", t[t.Array = 9] = "Array", t[t.Dict = 10] = "Dict", t[t.Object = 11] = "Object", t[t.String = 12] = "String", t[t.Binary = 13] = "Binary", t[t.Guid = 14] = "Guid", t))(b || {});
|
|
75
|
-
const ht = 161, dt = 162, he = new TextEncoder(),
|
|
75
|
+
const ht = 161, dt = 162, he = new TextEncoder(), Kr = new TextDecoder("utf-8", { fatal: !0 });
|
|
76
76
|
class D {
|
|
77
77
|
constructor(e = 1) {
|
|
78
78
|
this.version = e, this.buffer.writeByte(ht), this.buffer.writeVarUInt(e >>> 0);
|
|
@@ -127,7 +127,7 @@ class D {
|
|
|
127
127
|
this.writeVariableField(e, 9, i);
|
|
128
128
|
}
|
|
129
129
|
writeDictionaryField(e, r, n, s) {
|
|
130
|
-
const i = new
|
|
130
|
+
const i = new ve(r, n);
|
|
131
131
|
s(i);
|
|
132
132
|
const o = i.finish();
|
|
133
133
|
this.writeVariableField(e, 10, o);
|
|
@@ -142,7 +142,7 @@ class D {
|
|
|
142
142
|
this.writeFieldHeader(e, r, n.length), this.buffer.writeBytes(n);
|
|
143
143
|
}
|
|
144
144
|
writeFieldHeader(e, r, n) {
|
|
145
|
-
this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(de(r)),
|
|
145
|
+
this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(de(r)), Xr(r) && this.buffer.writeVarUInt(n >>> 0);
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
class _e {
|
|
@@ -242,7 +242,7 @@ class _e {
|
|
|
242
242
|
10
|
|
243
243
|
/* Dict */
|
|
244
244
|
), this.count++;
|
|
245
|
-
const s = new
|
|
245
|
+
const s = new ve(e, r);
|
|
246
246
|
n(s);
|
|
247
247
|
const i = s.finish();
|
|
248
248
|
this.payload.writeBytes(i);
|
|
@@ -256,9 +256,9 @@ class _e {
|
|
|
256
256
|
throw new Error(`Array element type is ${b[this.elementType]}, expected ${b[e]}`);
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
|
-
class
|
|
259
|
+
class ve {
|
|
260
260
|
constructor(e, r) {
|
|
261
|
-
this.keyType = e, this.valueType = r,
|
|
261
|
+
this.keyType = e, this.valueType = r, Be(e);
|
|
262
262
|
}
|
|
263
263
|
payload = new H();
|
|
264
264
|
count = 0;
|
|
@@ -266,7 +266,7 @@ class Le {
|
|
|
266
266
|
beginEntry() {
|
|
267
267
|
if (this.entryOpen)
|
|
268
268
|
throw new Error("Previous dictionary entry not completed");
|
|
269
|
-
return this.count++, this.entryOpen = !0, new
|
|
269
|
+
return this.count++, this.entryOpen = !0, new $r(this.keyType, this.valueType, this.payload, () => {
|
|
270
270
|
this.entryOpen = !1;
|
|
271
271
|
});
|
|
272
272
|
}
|
|
@@ -277,7 +277,7 @@ class Le {
|
|
|
277
277
|
return e.writeByte(de(this.keyType)), e.writeByte(de(this.valueType)), e.writeVarUInt(this.count), e.writeBytes(this.payload.toUint8Array()), e.toUint8Array();
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
|
-
class
|
|
280
|
+
class $r {
|
|
281
281
|
constructor(e, r, n, s) {
|
|
282
282
|
this.keyType = e, this.valueType = r, this.payload = n, this.onComplete = s;
|
|
283
283
|
}
|
|
@@ -447,7 +447,7 @@ class Hr {
|
|
|
447
447
|
10
|
|
448
448
|
/* Dict */
|
|
449
449
|
);
|
|
450
|
-
const s = new
|
|
450
|
+
const s = new ve(e, r);
|
|
451
451
|
n(s);
|
|
452
452
|
const i = s.finish();
|
|
453
453
|
this.payload.writeBytes(i), this.valueWritten = !0;
|
|
@@ -488,7 +488,7 @@ class z {
|
|
|
488
488
|
return null;
|
|
489
489
|
if (this.offset + 5 > this.buffer.length)
|
|
490
490
|
throw new Error("Teleport object truncated");
|
|
491
|
-
const e =
|
|
491
|
+
const e = Jr(this.buffer, this.offset);
|
|
492
492
|
this.offset += 4;
|
|
493
493
|
const r = this.buffer[this.offset++], n = r >> 4 & 15;
|
|
494
494
|
if ((r & 15) !== 0)
|
|
@@ -501,7 +501,7 @@ class z {
|
|
|
501
501
|
const o = { offset: this.offset }, a = U(this.buffer, o, "InvalidLength");
|
|
502
502
|
C(this.buffer, o.offset, a), i = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
|
|
503
503
|
}
|
|
504
|
-
return new
|
|
504
|
+
return new Yr(e, n, i);
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
class P {
|
|
@@ -566,7 +566,7 @@ class P {
|
|
|
566
566
|
return this.ensureType(
|
|
567
567
|
12
|
|
568
568
|
/* String */
|
|
569
|
-
),
|
|
569
|
+
), Kr.decode(this.payload);
|
|
570
570
|
}
|
|
571
571
|
asGuid() {
|
|
572
572
|
return this.ensureType(
|
|
@@ -584,20 +584,20 @@ class P {
|
|
|
584
584
|
return this.ensureType(
|
|
585
585
|
9
|
|
586
586
|
/* Array */
|
|
587
|
-
),
|
|
587
|
+
), Pe.create(this.payload);
|
|
588
588
|
}
|
|
589
589
|
asDictionary() {
|
|
590
590
|
return this.ensureType(
|
|
591
591
|
10
|
|
592
592
|
/* Dict */
|
|
593
|
-
),
|
|
593
|
+
), Fe.create(this.payload);
|
|
594
594
|
}
|
|
595
595
|
ensureType(e) {
|
|
596
596
|
if (this.type !== e)
|
|
597
597
|
throw new Error(`Teleport value has type ${b[this.type]}, expected ${b[e]}`);
|
|
598
598
|
}
|
|
599
599
|
}
|
|
600
|
-
class
|
|
600
|
+
class Yr extends P {
|
|
601
601
|
constructor(e, r, n) {
|
|
602
602
|
super(r, n), this.fieldId = e;
|
|
603
603
|
}
|
|
@@ -605,7 +605,7 @@ class $r extends P {
|
|
|
605
605
|
return this.type === 1;
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
|
-
class
|
|
608
|
+
class Pe {
|
|
609
609
|
payload;
|
|
610
610
|
elementType;
|
|
611
611
|
count;
|
|
@@ -621,7 +621,7 @@ class ve {
|
|
|
621
621
|
this.count = U(e, n, "ArrayMalformed"), this.offset = n.offset;
|
|
622
622
|
}
|
|
623
623
|
static create(e) {
|
|
624
|
-
return new
|
|
624
|
+
return new Pe(se(e));
|
|
625
625
|
}
|
|
626
626
|
next() {
|
|
627
627
|
if (this.index >= this.count) {
|
|
@@ -661,7 +661,7 @@ class ve {
|
|
|
661
661
|
return this.offset = e.offset + r, new q(11, n);
|
|
662
662
|
}
|
|
663
663
|
case 9: {
|
|
664
|
-
const e =
|
|
664
|
+
const e = xe(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
665
665
|
return this.offset += e, new q(9, r);
|
|
666
666
|
}
|
|
667
667
|
case 10: {
|
|
@@ -678,7 +678,7 @@ class q extends P {
|
|
|
678
678
|
super(e, r);
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
|
-
class
|
|
681
|
+
class Fe {
|
|
682
682
|
payload;
|
|
683
683
|
keyType;
|
|
684
684
|
valueType;
|
|
@@ -690,12 +690,12 @@ class Pe {
|
|
|
690
690
|
throw new Error("Dictionary payload too short");
|
|
691
691
|
if (this.keyType = e[0] >> 4 & 15, this.valueType = e[1] >> 4 & 15, (e[0] & 15) !== 0 || (e[1] & 15) !== 0)
|
|
692
692
|
throw new Error("Dictionary key/value flags must be zero");
|
|
693
|
-
|
|
693
|
+
Be(this.keyType);
|
|
694
694
|
const r = { offset: 2 };
|
|
695
695
|
this.count = U(e, r, "DictMalformed"), this.offset = r.offset;
|
|
696
696
|
}
|
|
697
697
|
static create(e) {
|
|
698
|
-
return new
|
|
698
|
+
return new Fe(se(e));
|
|
699
699
|
}
|
|
700
700
|
next() {
|
|
701
701
|
if (this.index >= this.count) {
|
|
@@ -704,7 +704,7 @@ class Pe {
|
|
|
704
704
|
return null;
|
|
705
705
|
}
|
|
706
706
|
const e = this.readKey(), r = this.readValue();
|
|
707
|
-
return this.index++, new
|
|
707
|
+
return this.index++, new jr(e, r);
|
|
708
708
|
}
|
|
709
709
|
readKey() {
|
|
710
710
|
const e = Y(this.keyType);
|
|
@@ -737,7 +737,7 @@ class Pe {
|
|
|
737
737
|
return this.offset = e.offset + r, new P(11, n);
|
|
738
738
|
}
|
|
739
739
|
case 9: {
|
|
740
|
-
const e =
|
|
740
|
+
const e = xe(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
741
741
|
return this.offset += e, new P(9, r);
|
|
742
742
|
}
|
|
743
743
|
case 10: {
|
|
@@ -763,7 +763,7 @@ class Pe {
|
|
|
763
763
|
}
|
|
764
764
|
}
|
|
765
765
|
}
|
|
766
|
-
class
|
|
766
|
+
class jr {
|
|
767
767
|
constructor(e, r) {
|
|
768
768
|
this.key = e, this.value = r;
|
|
769
769
|
}
|
|
@@ -897,7 +897,7 @@ function U(t, e, r) {
|
|
|
897
897
|
for (; e.offset < t.length; ) {
|
|
898
898
|
const o = t[e.offset++];
|
|
899
899
|
if (i++, n |= (o & 127) << s, (o & 128) === 0) {
|
|
900
|
-
if (i !==
|
|
900
|
+
if (i !== zr(n))
|
|
901
901
|
throw new Error("Teleport VarUInt is not canonical");
|
|
902
902
|
return n >>> 0;
|
|
903
903
|
}
|
|
@@ -906,7 +906,7 @@ function U(t, e, r) {
|
|
|
906
906
|
}
|
|
907
907
|
throw new Error(r);
|
|
908
908
|
}
|
|
909
|
-
function
|
|
909
|
+
function zr(t) {
|
|
910
910
|
return t < 128 ? 1 : t < 16384 ? 2 : t < 2097152 ? 3 : t < 268435456 ? 4 : 5;
|
|
911
911
|
}
|
|
912
912
|
function de(t, e = 0) {
|
|
@@ -914,7 +914,7 @@ function de(t, e = 0) {
|
|
|
914
914
|
throw new Error("Teleport flags must fit into 4 bits");
|
|
915
915
|
return (t & 15) << 4 | e & 15;
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function Xr(t) {
|
|
918
918
|
return t === 12 || t === 13 || t === 9 || t === 11 || t === 10;
|
|
919
919
|
}
|
|
920
920
|
function Y(t) {
|
|
@@ -937,7 +937,7 @@ function Y(t) {
|
|
|
937
937
|
return -1;
|
|
938
938
|
}
|
|
939
939
|
}
|
|
940
|
-
function
|
|
940
|
+
function Be(t) {
|
|
941
941
|
if (t === 9 || t === 11 || t === 10 || t === 1)
|
|
942
942
|
throw new Error("Dictionary keys must be primitive Teleport types");
|
|
943
943
|
}
|
|
@@ -945,10 +945,10 @@ function C(t, e, r) {
|
|
|
945
945
|
if (e < 0 || r < 0 || e + r > t.length)
|
|
946
946
|
throw new Error("Teleport payload exceeds bounds");
|
|
947
947
|
}
|
|
948
|
-
function
|
|
948
|
+
function Jr(t, e) {
|
|
949
949
|
return (t[e] | t[e + 1] << 8 | t[e + 2] << 16 | t[e + 3] << 24) >>> 0;
|
|
950
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function xe(t, e) {
|
|
952
952
|
if (e >= t.length)
|
|
953
953
|
throw new Error("Array payload exceeds bounds");
|
|
954
954
|
const r = t[e], n = r >> 4 & 15;
|
|
@@ -961,7 +961,7 @@ function Be(t, e) {
|
|
|
961
961
|
}
|
|
962
962
|
let a = s.offset;
|
|
963
963
|
for (let c = 0; c < i; c++)
|
|
964
|
-
a =
|
|
964
|
+
a = ge(n, t, a, "ArrayMalformed");
|
|
965
965
|
return a - e;
|
|
966
966
|
}
|
|
967
967
|
function Ge(t, e) {
|
|
@@ -970,14 +970,14 @@ function Ge(t, e) {
|
|
|
970
970
|
const r = t[e] >> 4 & 15, n = t[e + 1] >> 4 & 15;
|
|
971
971
|
if ((t[e] & 15) !== 0 || (t[e + 1] & 15) !== 0)
|
|
972
972
|
throw new Error("Dictionary key/value flags must be zero");
|
|
973
|
-
|
|
973
|
+
Be(r);
|
|
974
974
|
const s = { offset: e + 2 }, i = U(t, s, "DictMalformed");
|
|
975
975
|
let o = s.offset;
|
|
976
976
|
for (let a = 0; a < i; a++)
|
|
977
|
-
o =
|
|
977
|
+
o = ge(r, t, o, "DictMalformed"), o = ge(n, t, o, "DictMalformed");
|
|
978
978
|
return o - e;
|
|
979
979
|
}
|
|
980
|
-
function
|
|
980
|
+
function ge(t, e, r, n) {
|
|
981
981
|
const s = Y(t);
|
|
982
982
|
if (s >= 0)
|
|
983
983
|
return C(e, r, s), r + s;
|
|
@@ -992,7 +992,7 @@ function Ne(t, e, r, n) {
|
|
|
992
992
|
return C(e, i.offset, o), i.offset + o;
|
|
993
993
|
}
|
|
994
994
|
case 9:
|
|
995
|
-
return r +
|
|
995
|
+
return r + xe(e, r);
|
|
996
996
|
case 10:
|
|
997
997
|
return r + Ge(e, r);
|
|
998
998
|
default:
|
|
@@ -1005,309 +1005,309 @@ function Xe(t) {
|
|
|
1005
1005
|
function se(t) {
|
|
1006
1006
|
return t instanceof Uint8Array ? t : new Uint8Array(t);
|
|
1007
1007
|
}
|
|
1008
|
-
var ft = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(ft || {}), X = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MobileWeb = 1] = "MobileWeb", t[t.MobileApp = 2] = "MobileApp", t[t.DesktopWeb = 3] = "DesktopWeb", t[t.DesktopApp = 4] = "DesktopApp", t))(X || {}), J = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Backend = 2] = "Backend", t[t.Server = 4] = "Server", t[t.Plugin = 8] = "Plugin", t[t.Browser = 16] = "Browser", t))(J || {}), k = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.WebSocket = 1] = "WebSocket", t[t.WebSocketProxy = 2] = "WebSocketProxy", t[t.WebTransport = 4] = "WebTransport", t[t.WebTransportProxy = 8] = "WebTransportProxy", t[t.Tcp = 16] = "Tcp", t[t.TcpProxy = 32] = "TcpProxy", t[t.Https = 64] = "Https", t))(k || {}), Q = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MessagePack = 1] = "MessagePack", t[t.MemoryPack = 2] = "MemoryPack", t[t.Json = 4] = "Json", t[t.Teleport = 8] = "Teleport", t[t.All = 15] = "All", t))(Q || {}), Et = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(Et || {}), Z = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(Z || {}), pt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.H264 = 1] = "H264", t[t.Vp8 = 2] = "Vp8", t[t.Vp9 = 3] = "Vp9", t[t.Av1 = 4] = "Av1", t))(pt || {}), xe = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(xe || {}), S = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", t[t.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", t[t.GROUP_CORE = 65536] = "GROUP_CORE", t[t.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", t[t.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", t[t.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", t[t.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", t[t.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", t[t.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", t[t.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", t[t.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", t[t.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", t[t.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", t[t.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", t[t.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", t[t.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", t[t.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", t[t.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", t[t.CORE_SERVER_START = 65552] = "CORE_SERVER_START", t[t.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", t[t.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", t[t.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", t[t.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", t[t.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", t[t.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", t[t.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", t[t.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", t[t.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", t[t.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", t[t.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", t[t.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", t[t.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", t[t.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", t[t.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", t[t.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", t[t.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", t[t.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", t[t.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", t[t.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", t[t.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", t[t.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", t[t.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", t[t.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", t[t.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", t[t.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", t[t.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", t[t.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", t[t.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", t[t.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", t[t.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", t[t.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", t[t.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", t[t.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", t[t.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", t[t.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", t[t.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", t[t.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", t[t.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", t[t.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", t[t.GROUP_UI = 2097152] = "GROUP_UI", t[t.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", t[t.UI_STREAM_END = 2097154] = "UI_STREAM_END", t[t.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", t[t.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", t[t.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", t[t.UI_SECTION_END = 2097158] = "UI_SECTION_END", t[t.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", t[t.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", t[t.UI_LIST_END = 2097161] = "UI_LIST_END", t[t.UI_TEXT = 2097162] = "UI_TEXT", t[t.UI_HEADER = 2097163] = "UI_HEADER", t[t.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", t[t.UI_BUTTON = 2097165] = "UI_BUTTON", t[t.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", t[t.UI_IMAGE = 2097167] = "UI_IMAGE", t[t.UI_FILE = 2097168] = "UI_FILE", t[t.UI_BADGE = 2097169] = "UI_BADGE", t[t.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", t[t.UI_MAP = 2097171] = "UI_MAP", t[t.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", t[t.UI_ICON = 2097173] = "UI_ICON", t[t.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", t[t.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", t[t.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", t[t.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", t[t.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", t[t.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", t[t.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", t[t.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", t[t.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", t[t.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", t[t.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", t[t.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", t[t.UI_QS = 2097186] = "UI_QS", t[t.UI_ELEMENT = 2097187] = "UI_ELEMENT", t[t.UI_STYLES = 2097188] = "UI_STYLES", t[t.UI_SVG = 2097189] = "UI_SVG", t[t.UI_UPDATE = 2097190] = "UI_UPDATE", t[t.UI_INIT = 2097191] = "UI_INIT", t[t.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", t[t.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", t[t.GROUP_COMMON = 4128768] = "GROUP_COMMON", t[t.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", t[t.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", t[t.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", t[t.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", t[t.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", t[t.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(S || {});
|
|
1009
|
-
const
|
|
1010
|
-
function
|
|
1011
|
-
const e = new D(
|
|
1012
|
-
return
|
|
1008
|
+
var ft = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(ft || {}), X = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MobileWeb = 1] = "MobileWeb", t[t.MobileApp = 2] = "MobileApp", t[t.DesktopWeb = 3] = "DesktopWeb", t[t.DesktopApp = 4] = "DesktopApp", t))(X || {}), J = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Backend = 2] = "Backend", t[t.Server = 4] = "Server", t[t.Plugin = 8] = "Plugin", t[t.Browser = 16] = "Browser", t))(J || {}), k = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.WebSocket = 1] = "WebSocket", t[t.WebSocketProxy = 2] = "WebSocketProxy", t[t.WebTransport = 4] = "WebTransport", t[t.WebTransportProxy = 8] = "WebTransportProxy", t[t.Tcp = 16] = "Tcp", t[t.TcpProxy = 32] = "TcpProxy", t[t.Https = 64] = "Https", t))(k || {}), Q = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MessagePack = 1] = "MessagePack", t[t.MemoryPack = 2] = "MemoryPack", t[t.Json = 4] = "Json", t[t.Teleport = 8] = "Teleport", t[t.All = 15] = "All", t))(Q || {}), Et = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(Et || {}), Z = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(Z || {}), pt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.H264 = 1] = "H264", t[t.Vp8 = 2] = "Vp8", t[t.Vp9 = 3] = "Vp9", t[t.Av1 = 4] = "Av1", t))(pt || {}), Ve = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(Ve || {}), It = /* @__PURE__ */ ((t) => (t[t.Local = 0] = "Local", t[t.Cloud = 1] = "Cloud", t))(It || {}), mt = /* @__PURE__ */ ((t) => (t[t.Bundle = 0] = "Bundle", t[t.GitSource = 1] = "GitSource", t))(mt || {}), S = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", t[t.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", t[t.GROUP_CORE = 65536] = "GROUP_CORE", t[t.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", t[t.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", t[t.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", t[t.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", t[t.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", t[t.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", t[t.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", t[t.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", t[t.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", t[t.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", t[t.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", t[t.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", t[t.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", t[t.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", t[t.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", t[t.CORE_SERVER_START = 65552] = "CORE_SERVER_START", t[t.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", t[t.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", t[t.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", t[t.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", t[t.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", t[t.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", t[t.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", t[t.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", t[t.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", t[t.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", t[t.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", t[t.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", t[t.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", t[t.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", t[t.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", t[t.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", t[t.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", t[t.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", t[t.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", t[t.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", t[t.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", t[t.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", t[t.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", t[t.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", t[t.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", t[t.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", t[t.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", t[t.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", t[t.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", t[t.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", t[t.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", t[t.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", t[t.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", t[t.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", t[t.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", t[t.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", t[t.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", t[t.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", t[t.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", t[t.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", t[t.GROUP_UI = 2097152] = "GROUP_UI", t[t.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", t[t.UI_STREAM_END = 2097154] = "UI_STREAM_END", t[t.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", t[t.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", t[t.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", t[t.UI_SECTION_END = 2097158] = "UI_SECTION_END", t[t.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", t[t.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", t[t.UI_LIST_END = 2097161] = "UI_LIST_END", t[t.UI_TEXT = 2097162] = "UI_TEXT", t[t.UI_HEADER = 2097163] = "UI_HEADER", t[t.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", t[t.UI_BUTTON = 2097165] = "UI_BUTTON", t[t.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", t[t.UI_IMAGE = 2097167] = "UI_IMAGE", t[t.UI_FILE = 2097168] = "UI_FILE", t[t.UI_BADGE = 2097169] = "UI_BADGE", t[t.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", t[t.UI_MAP = 2097171] = "UI_MAP", t[t.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", t[t.UI_ICON = 2097173] = "UI_ICON", t[t.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", t[t.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", t[t.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", t[t.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", t[t.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", t[t.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", t[t.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", t[t.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", t[t.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", t[t.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", t[t.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", t[t.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", t[t.UI_QS = 2097186] = "UI_QS", t[t.UI_ELEMENT = 2097187] = "UI_ELEMENT", t[t.UI_STYLES = 2097188] = "UI_STYLES", t[t.UI_SVG = 2097189] = "UI_SVG", t[t.UI_UPDATE = 2097190] = "UI_UPDATE", t[t.UI_INIT = 2097191] = "UI_INIT", t[t.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", t[t.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", t[t.GROUP_COMMON = 4128768] = "GROUP_COMMON", t[t.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", t[t.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", t[t.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", t[t.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", t[t.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", t[t.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(S || {});
|
|
1009
|
+
const _t = 1, Qr = 1048637, Zr = 727023925, qr = 3395085689;
|
|
1010
|
+
function en(t) {
|
|
1011
|
+
const e = new D(_t);
|
|
1012
|
+
return tn(t, e), e.finish();
|
|
1013
1013
|
}
|
|
1014
|
-
function
|
|
1015
|
-
e.writeGuidField(
|
|
1014
|
+
function tn(t, e) {
|
|
1015
|
+
e.writeGuidField(Zr, t.ActionId), e.writeStringField(qr, t.PayloadJson);
|
|
1016
1016
|
}
|
|
1017
|
-
function
|
|
1018
|
-
const n =
|
|
1019
|
-
return F(
|
|
1017
|
+
function rn(t, e, r) {
|
|
1018
|
+
const n = en(t);
|
|
1019
|
+
return F(Qr, n, _t, e, r);
|
|
1020
1020
|
}
|
|
1021
|
-
const
|
|
1022
|
-
function
|
|
1021
|
+
const nn = 467348717, sn = 972460562, on = 1911490601, an = 2603556958, cn = 3609695522, ln = 4094837378, un = 4257460908;
|
|
1022
|
+
function hn(t) {
|
|
1023
1023
|
const e = {};
|
|
1024
|
-
return
|
|
1024
|
+
return Tt(e), e;
|
|
1025
1025
|
}
|
|
1026
|
-
function
|
|
1026
|
+
function Tt(t) {
|
|
1027
1027
|
return t.ParameterIndex = 0, t.TypeName = "", t.ValueJson = "", t.ValueData = new Uint8Array(0), t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.EnumerationId = _.fromBytes(new Uint8Array(16)), t;
|
|
1028
1028
|
}
|
|
1029
|
-
function
|
|
1030
|
-
const r = e ??
|
|
1031
|
-
return
|
|
1029
|
+
function dn(t, e) {
|
|
1030
|
+
const r = e ?? hn();
|
|
1031
|
+
return Tt(r), fn(t, r), r;
|
|
1032
1032
|
}
|
|
1033
|
-
function
|
|
1033
|
+
function fn(t, e) {
|
|
1034
1034
|
let r;
|
|
1035
1035
|
for (; (r = t.next()) !== null; )
|
|
1036
1036
|
switch (r.fieldId) {
|
|
1037
|
-
case
|
|
1037
|
+
case nn: {
|
|
1038
1038
|
if (r.isNull) throw new Error();
|
|
1039
1039
|
e.EnumerationId = r.asGuid();
|
|
1040
1040
|
break;
|
|
1041
1041
|
}
|
|
1042
|
-
case
|
|
1042
|
+
case sn: {
|
|
1043
1043
|
if (r.isNull) throw new Error();
|
|
1044
1044
|
e.EnumerableItemTypeName = r.asString();
|
|
1045
1045
|
break;
|
|
1046
1046
|
}
|
|
1047
|
-
case
|
|
1047
|
+
case on: {
|
|
1048
1048
|
if (r.isNull) throw new Error();
|
|
1049
1049
|
e.ValueJson = r.asString();
|
|
1050
1050
|
break;
|
|
1051
1051
|
}
|
|
1052
|
-
case
|
|
1052
|
+
case an: {
|
|
1053
1053
|
if (r.isNull) throw new Error();
|
|
1054
1054
|
e.IsEnumerable = r.asBool();
|
|
1055
1055
|
break;
|
|
1056
1056
|
}
|
|
1057
|
-
case
|
|
1057
|
+
case cn: {
|
|
1058
1058
|
if (r.isNull) throw new Error();
|
|
1059
1059
|
e.TypeName = r.asString();
|
|
1060
1060
|
break;
|
|
1061
1061
|
}
|
|
1062
|
-
case
|
|
1062
|
+
case ln: {
|
|
1063
1063
|
if (r.isNull) throw new Error();
|
|
1064
1064
|
e.ValueData = r.asBinary();
|
|
1065
1065
|
break;
|
|
1066
1066
|
}
|
|
1067
|
-
case
|
|
1067
|
+
case un: {
|
|
1068
1068
|
if (r.isNull) throw new Error();
|
|
1069
1069
|
e.ParameterIndex = r.asInt32();
|
|
1070
1070
|
break;
|
|
1071
1071
|
}
|
|
1072
1072
|
}
|
|
1073
1073
|
}
|
|
1074
|
-
const
|
|
1075
|
-
function
|
|
1074
|
+
const En = 265814330, pn = 1368629611, In = 2431514951, mn = 2914494629, _n = 3284746250, Tn = 4101844078;
|
|
1075
|
+
function St(t) {
|
|
1076
1076
|
const e = {};
|
|
1077
|
-
return
|
|
1077
|
+
return wt(e), e;
|
|
1078
1078
|
}
|
|
1079
|
-
function
|
|
1079
|
+
function wt(t) {
|
|
1080
1080
|
return t.Description = "", t.Codec = ft.Unknown, t.SampleRate = 0, t.Channels = 0, t.BitDepth = 0, t.ShapeSets = void 0, t;
|
|
1081
1081
|
}
|
|
1082
|
-
function
|
|
1083
|
-
const r = e ??
|
|
1084
|
-
return
|
|
1082
|
+
function Sn(t, e) {
|
|
1083
|
+
const r = e ?? St();
|
|
1084
|
+
return wt(r), wn(t, r), r;
|
|
1085
1085
|
}
|
|
1086
|
-
function
|
|
1086
|
+
function wn(t, e) {
|
|
1087
1087
|
let r;
|
|
1088
1088
|
for (; (r = t.next()) !== null; )
|
|
1089
1089
|
switch (r.fieldId) {
|
|
1090
|
-
case
|
|
1090
|
+
case En: {
|
|
1091
1091
|
if (r.isNull) {
|
|
1092
1092
|
e.ShapeSets = void 0;
|
|
1093
1093
|
break;
|
|
1094
1094
|
}
|
|
1095
|
-
e.ShapeSets =
|
|
1095
|
+
e.ShapeSets = An(r.asArray());
|
|
1096
1096
|
break;
|
|
1097
1097
|
}
|
|
1098
|
-
case
|
|
1098
|
+
case pn: {
|
|
1099
1099
|
if (r.isNull) throw new Error();
|
|
1100
1100
|
e.Description = r.asString();
|
|
1101
1101
|
break;
|
|
1102
1102
|
}
|
|
1103
|
-
case
|
|
1103
|
+
case In: {
|
|
1104
1104
|
if (r.isNull) throw new Error();
|
|
1105
1105
|
e.Channels = r.asInt32();
|
|
1106
1106
|
break;
|
|
1107
1107
|
}
|
|
1108
|
-
case
|
|
1108
|
+
case mn: {
|
|
1109
1109
|
if (r.isNull) throw new Error();
|
|
1110
1110
|
e.BitDepth = r.asInt32();
|
|
1111
1111
|
break;
|
|
1112
1112
|
}
|
|
1113
|
-
case
|
|
1113
|
+
case _n: {
|
|
1114
1114
|
if (r.isNull) throw new Error();
|
|
1115
1115
|
e.Codec = r.asInt32();
|
|
1116
1116
|
break;
|
|
1117
1117
|
}
|
|
1118
|
-
case
|
|
1118
|
+
case Tn: {
|
|
1119
1119
|
if (r.isNull) throw new Error();
|
|
1120
1120
|
e.SampleRate = r.asInt32();
|
|
1121
1121
|
break;
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
1124
|
}
|
|
1125
|
-
function
|
|
1125
|
+
function An(t) {
|
|
1126
1126
|
const e = [];
|
|
1127
1127
|
let r;
|
|
1128
1128
|
for (; (r = t.next()) !== null; )
|
|
1129
|
-
e.push(
|
|
1129
|
+
e.push(bn(r.asObject()));
|
|
1130
1130
|
return e;
|
|
1131
1131
|
}
|
|
1132
|
-
const
|
|
1133
|
-
function
|
|
1132
|
+
const yn = 1107713536, Nn = 1154362099, gn = 1185721362;
|
|
1133
|
+
function Cn(t) {
|
|
1134
1134
|
const e = {};
|
|
1135
|
-
return
|
|
1135
|
+
return At(e), e;
|
|
1136
1136
|
}
|
|
1137
|
-
function
|
|
1137
|
+
function At(t) {
|
|
1138
1138
|
return t.SetId = 0, t.Name = "", t.ShapeNames = [], t;
|
|
1139
1139
|
}
|
|
1140
|
-
function
|
|
1141
|
-
const r = e ??
|
|
1142
|
-
return
|
|
1140
|
+
function bn(t, e) {
|
|
1141
|
+
const r = e ?? Cn();
|
|
1142
|
+
return At(r), Rn(t, r), r;
|
|
1143
1143
|
}
|
|
1144
|
-
function
|
|
1144
|
+
function Rn(t, e) {
|
|
1145
1145
|
let r;
|
|
1146
1146
|
for (; (r = t.next()) !== null; )
|
|
1147
1147
|
switch (r.fieldId) {
|
|
1148
|
-
case
|
|
1148
|
+
case yn: {
|
|
1149
1149
|
if (r.isNull) throw new Error();
|
|
1150
1150
|
e.Name = r.asString();
|
|
1151
1151
|
break;
|
|
1152
1152
|
}
|
|
1153
|
-
case
|
|
1153
|
+
case Nn: {
|
|
1154
1154
|
if (r.isNull) throw new Error();
|
|
1155
1155
|
e.SetId = r.asUInt32();
|
|
1156
1156
|
break;
|
|
1157
1157
|
}
|
|
1158
|
-
case
|
|
1158
|
+
case gn: {
|
|
1159
1159
|
if (r.isNull) throw new Error();
|
|
1160
|
-
e.ShapeNames =
|
|
1160
|
+
e.ShapeNames = kn(r.asArray());
|
|
1161
1161
|
break;
|
|
1162
1162
|
}
|
|
1163
1163
|
}
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1165
|
+
function kn(t) {
|
|
1166
1166
|
const e = [];
|
|
1167
1167
|
let r;
|
|
1168
1168
|
for (; (r = t.next()) !== null; )
|
|
1169
1169
|
e.push(r.asString());
|
|
1170
1170
|
return e;
|
|
1171
1171
|
}
|
|
1172
|
-
const
|
|
1173
|
-
function
|
|
1172
|
+
const Un = 76337612, Dn = 185396121, Mn = 388632637, On = 417197284, Ln = 469070965, vn = 470595159, Pn = 781727218, Fn = 834078886, Bn = 1043273762, xn = 1236999138, Gn = 1368629611, Vn = 1715899485, Wn = 1942830531, Hn = 1999510636, Kn = 2079864626, $n = 2142346422, Yn = 2598291686, jn = 2719718823, zn = 2810953526, Xn = 2840065720, Jn = 2885165957, Qn = 3586157513, Zn = 3717933110, qn = 4062655306;
|
|
1173
|
+
function Ce(t) {
|
|
1174
1174
|
const e = {};
|
|
1175
|
-
return
|
|
1175
|
+
return yt(e), e;
|
|
1176
1176
|
}
|
|
1177
|
-
function
|
|
1178
|
-
return t.ContextType = J.Unknown, t.UserType = Z.Unknown, t.PayloadType = Q.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 = X.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType =
|
|
1177
|
+
function yt(t) {
|
|
1178
|
+
return t.ContextType = J.Unknown, t.UserType = Z.Unknown, t.PayloadType = Q.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 = X.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = Ve.Unknown, t;
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1181
|
-
const r = e ??
|
|
1182
|
-
return
|
|
1180
|
+
function be(t, e) {
|
|
1181
|
+
const r = e ?? Ce();
|
|
1182
|
+
return yt(r), es(t, r), r;
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1184
|
+
function es(t, e) {
|
|
1185
1185
|
let r;
|
|
1186
1186
|
for (; (r = t.next()) !== null; )
|
|
1187
1187
|
switch (r.fieldId) {
|
|
1188
|
-
case
|
|
1188
|
+
case Un: {
|
|
1189
1189
|
if (r.isNull) throw new Error();
|
|
1190
1190
|
e.DeviceId = r.asString();
|
|
1191
1191
|
break;
|
|
1192
1192
|
}
|
|
1193
|
-
case
|
|
1193
|
+
case Dn: {
|
|
1194
1194
|
if (r.isNull) throw new Error();
|
|
1195
1195
|
e.InstallId = r.asString();
|
|
1196
1196
|
break;
|
|
1197
1197
|
}
|
|
1198
|
-
case
|
|
1198
|
+
case Mn: {
|
|
1199
1199
|
if (r.isNull) throw new Error();
|
|
1200
1200
|
e.UserAgent = r.asString();
|
|
1201
1201
|
break;
|
|
1202
1202
|
}
|
|
1203
|
-
case
|
|
1203
|
+
case On: {
|
|
1204
1204
|
if (r.isNull) throw new Error();
|
|
1205
1205
|
e.ContextType = r.asInt32();
|
|
1206
1206
|
break;
|
|
1207
1207
|
}
|
|
1208
|
-
case
|
|
1208
|
+
case Ln: {
|
|
1209
1209
|
if (r.isNull) throw new Error();
|
|
1210
1210
|
e.HasInput = r.asBool();
|
|
1211
1211
|
break;
|
|
1212
1212
|
}
|
|
1213
|
-
case
|
|
1213
|
+
case vn: {
|
|
1214
1214
|
if (r.isNull) throw new Error();
|
|
1215
1215
|
e.UserType = r.asInt32();
|
|
1216
1216
|
break;
|
|
1217
1217
|
}
|
|
1218
|
-
case
|
|
1218
|
+
case Pn: {
|
|
1219
1219
|
if (r.isNull) throw new Error();
|
|
1220
1220
|
e.UserId = r.asString();
|
|
1221
1221
|
break;
|
|
1222
1222
|
}
|
|
1223
|
-
case
|
|
1223
|
+
case Fn: {
|
|
1224
1224
|
if (r.isNull) throw new Error();
|
|
1225
1225
|
e.ProductId = r.asString();
|
|
1226
1226
|
break;
|
|
1227
1227
|
}
|
|
1228
|
-
case
|
|
1228
|
+
case Bn: {
|
|
1229
1229
|
if (r.isNull) throw new Error();
|
|
1230
1230
|
e.AuthSessionId = r.asString();
|
|
1231
1231
|
break;
|
|
1232
1232
|
}
|
|
1233
|
-
case
|
|
1233
|
+
case xn: {
|
|
1234
1234
|
if (r.isNull) throw new Error();
|
|
1235
1235
|
e.ReceiveAllMessages = r.asBool();
|
|
1236
1236
|
break;
|
|
1237
1237
|
}
|
|
1238
|
-
case
|
|
1238
|
+
case Gn: {
|
|
1239
1239
|
if (r.isNull) throw new Error();
|
|
1240
1240
|
e.Description = r.asString();
|
|
1241
1241
|
break;
|
|
1242
1242
|
}
|
|
1243
|
-
case
|
|
1243
|
+
case Vn: {
|
|
1244
1244
|
if (r.isNull) throw new Error();
|
|
1245
1245
|
e.Locale = r.asString();
|
|
1246
1246
|
break;
|
|
1247
1247
|
}
|
|
1248
|
-
case
|
|
1248
|
+
case Wn: {
|
|
1249
1249
|
if (r.isNull) throw new Error();
|
|
1250
1250
|
e.SdkType = r.asInt32();
|
|
1251
1251
|
break;
|
|
1252
1252
|
}
|
|
1253
|
-
case
|
|
1253
|
+
case Hn: {
|
|
1254
1254
|
if (r.isNull) throw new Error();
|
|
1255
1255
|
e.SessionId = r.asInt32();
|
|
1256
1256
|
break;
|
|
1257
1257
|
}
|
|
1258
|
-
case
|
|
1258
|
+
case Kn: {
|
|
1259
1259
|
if (r.isNull) throw new Error();
|
|
1260
1260
|
e.PreciseJoinedAt = r.asUInt64();
|
|
1261
1261
|
break;
|
|
1262
1262
|
}
|
|
1263
|
-
case
|
|
1263
|
+
case $n: {
|
|
1264
1264
|
if (r.isNull) throw new Error();
|
|
1265
1265
|
e.PayloadType = r.asInt32();
|
|
1266
1266
|
break;
|
|
1267
1267
|
}
|
|
1268
|
-
case
|
|
1268
|
+
case Yn: {
|
|
1269
1269
|
if (r.isNull) throw new Error();
|
|
1270
1270
|
e.VersionId = r.asString();
|
|
1271
1271
|
break;
|
|
1272
1272
|
}
|
|
1273
|
-
case
|
|
1273
|
+
case jn: {
|
|
1274
1274
|
if (r.isNull) throw new Error();
|
|
1275
1275
|
e.UniqueSessionId = r.asString();
|
|
1276
1276
|
break;
|
|
1277
1277
|
}
|
|
1278
|
-
case
|
|
1278
|
+
case zn: {
|
|
1279
1279
|
if (r.isNull) throw new Error();
|
|
1280
1280
|
e.ClientType = r.asInt32();
|
|
1281
1281
|
break;
|
|
1282
1282
|
}
|
|
1283
|
-
case
|
|
1283
|
+
case Xn: {
|
|
1284
1284
|
if (r.isNull) throw new Error();
|
|
1285
1285
|
e.IsReady = r.asBool();
|
|
1286
1286
|
break;
|
|
1287
1287
|
}
|
|
1288
|
-
case
|
|
1288
|
+
case Jn: {
|
|
1289
1289
|
if (r.isNull) throw new Error();
|
|
1290
|
-
e.Parameters =
|
|
1290
|
+
e.Parameters = ts(r.asDictionary());
|
|
1291
1291
|
break;
|
|
1292
1292
|
}
|
|
1293
|
-
case
|
|
1293
|
+
case Qn: {
|
|
1294
1294
|
if (r.isNull) throw new Error();
|
|
1295
1295
|
e.IsInternal = r.asBool();
|
|
1296
1296
|
break;
|
|
1297
1297
|
}
|
|
1298
|
-
case
|
|
1298
|
+
case Zn: {
|
|
1299
1299
|
if (r.isNull) throw new Error();
|
|
1300
1300
|
e.ChannelLocale = r.asString();
|
|
1301
1301
|
break;
|
|
1302
1302
|
}
|
|
1303
|
-
case
|
|
1303
|
+
case qn: {
|
|
1304
1304
|
if (r.isNull) throw new Error();
|
|
1305
1305
|
e.EmbeddedSpaceId = r.asString();
|
|
1306
1306
|
break;
|
|
1307
1307
|
}
|
|
1308
1308
|
}
|
|
1309
1309
|
}
|
|
1310
|
-
function
|
|
1310
|
+
function ts(t) {
|
|
1311
1311
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1312
1312
|
let r;
|
|
1313
1313
|
for (; (r = t.next()) !== null; ) {
|
|
@@ -1316,138 +1316,138 @@ function qn(t) {
|
|
|
1316
1316
|
}
|
|
1317
1317
|
return e;
|
|
1318
1318
|
}
|
|
1319
|
-
const
|
|
1320
|
-
function
|
|
1319
|
+
const rs = 746516514, ns = 877841741, ss = 1175184220, is = 1368629611, os = 2341021724, as = 3167053791, cs = 3686066300;
|
|
1320
|
+
function ls(t) {
|
|
1321
1321
|
const e = {};
|
|
1322
|
-
return
|
|
1322
|
+
return Nt(e), e;
|
|
1323
1323
|
}
|
|
1324
|
-
function
|
|
1324
|
+
function Nt(t) {
|
|
1325
1325
|
return t.Type = k.None, t.Uri = "", t.OpcodeGroupsFromServer = S.NONE, t.OpcodeGroupsToServer = S.NONE, t.Priority = 0, t.Description = "", t.AuthTicket = new Uint8Array(0), t;
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1328
|
-
const r = e ??
|
|
1329
|
-
return
|
|
1327
|
+
function us(t, e) {
|
|
1328
|
+
const r = e ?? ls();
|
|
1329
|
+
return Nt(r), hs(t, r), r;
|
|
1330
1330
|
}
|
|
1331
|
-
function
|
|
1331
|
+
function hs(t, e) {
|
|
1332
1332
|
let r;
|
|
1333
1333
|
for (; (r = t.next()) !== null; )
|
|
1334
1334
|
switch (r.fieldId) {
|
|
1335
|
-
case
|
|
1335
|
+
case rs: {
|
|
1336
1336
|
if (r.isNull) throw new Error();
|
|
1337
1337
|
e.AuthTicket = r.asBinary();
|
|
1338
1338
|
break;
|
|
1339
1339
|
}
|
|
1340
|
-
case
|
|
1340
|
+
case ns: {
|
|
1341
1341
|
if (r.isNull) throw new Error();
|
|
1342
1342
|
e.Priority = r.asInt32();
|
|
1343
1343
|
break;
|
|
1344
1344
|
}
|
|
1345
|
-
case
|
|
1345
|
+
case ss: {
|
|
1346
1346
|
if (r.isNull) throw new Error();
|
|
1347
1347
|
e.OpcodeGroupsFromServer = r.asInt32();
|
|
1348
1348
|
break;
|
|
1349
1349
|
}
|
|
1350
|
-
case
|
|
1350
|
+
case is: {
|
|
1351
1351
|
if (r.isNull) throw new Error();
|
|
1352
1352
|
e.Description = r.asString();
|
|
1353
1353
|
break;
|
|
1354
1354
|
}
|
|
1355
|
-
case
|
|
1355
|
+
case os: {
|
|
1356
1356
|
if (r.isNull) throw new Error();
|
|
1357
1357
|
e.Uri = r.asString();
|
|
1358
1358
|
break;
|
|
1359
1359
|
}
|
|
1360
|
-
case
|
|
1360
|
+
case as: {
|
|
1361
1361
|
if (r.isNull) throw new Error();
|
|
1362
1362
|
e.Type = r.asInt32();
|
|
1363
1363
|
break;
|
|
1364
1364
|
}
|
|
1365
|
-
case
|
|
1365
|
+
case cs: {
|
|
1366
1366
|
if (r.isNull) throw new Error();
|
|
1367
1367
|
e.OpcodeGroupsToServer = r.asInt32();
|
|
1368
1368
|
break;
|
|
1369
1369
|
}
|
|
1370
1370
|
}
|
|
1371
1371
|
}
|
|
1372
|
-
const
|
|
1373
|
-
function
|
|
1372
|
+
const ds = 65537, fs = 166277978, Es = 1482635149, ps = 1559330978, Is = 2802434353, ms = 3085883711, _s = 3669484338, Ts = 3707543140, Ss = 3712281496, ws = 3823842552;
|
|
1373
|
+
function As(t) {
|
|
1374
1374
|
const e = {};
|
|
1375
|
-
return
|
|
1375
|
+
return gt(e), e;
|
|
1376
1376
|
}
|
|
1377
|
-
function
|
|
1378
|
-
return t.ClientContext =
|
|
1377
|
+
function gt(t) {
|
|
1378
|
+
return t.ClientContext = Ce(), t.ServerContext = Ce(), t.CertHash = "", t.Entrypoints = [], t.FeatureFlags = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.ChannelInstanceId = "", t.PrimaryUserId = "", t;
|
|
1379
1379
|
}
|
|
1380
|
-
function
|
|
1380
|
+
function ys(t, e) {
|
|
1381
1381
|
const r = z.create(t);
|
|
1382
|
-
return
|
|
1382
|
+
return Ns(r, e);
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1385
|
-
const r = e ??
|
|
1386
|
-
return
|
|
1384
|
+
function Ns(t, e) {
|
|
1385
|
+
const r = e ?? As();
|
|
1386
|
+
return gt(r), gs(t, r), r;
|
|
1387
1387
|
}
|
|
1388
|
-
function
|
|
1388
|
+
function gs(t, e) {
|
|
1389
1389
|
let r;
|
|
1390
1390
|
for (; (r = t.next()) !== null; )
|
|
1391
1391
|
switch (r.fieldId) {
|
|
1392
|
-
case
|
|
1392
|
+
case fs: {
|
|
1393
1393
|
if (r.isNull) throw new Error();
|
|
1394
1394
|
e.CertHash = r.asString();
|
|
1395
1395
|
break;
|
|
1396
1396
|
}
|
|
1397
|
-
case
|
|
1397
|
+
case Es: {
|
|
1398
1398
|
if (r.isNull) throw new Error();
|
|
1399
|
-
e.Entrypoints =
|
|
1399
|
+
e.Entrypoints = bs(r.asArray());
|
|
1400
1400
|
break;
|
|
1401
1401
|
}
|
|
1402
|
-
case
|
|
1402
|
+
case ps: {
|
|
1403
1403
|
if (r.isNull) throw new Error();
|
|
1404
1404
|
e.ChannelId = r.asString();
|
|
1405
1405
|
break;
|
|
1406
1406
|
}
|
|
1407
|
-
case
|
|
1407
|
+
case Is: {
|
|
1408
1408
|
if (r.isNull) throw new Error();
|
|
1409
|
-
e.ClientContext =
|
|
1409
|
+
e.ClientContext = be(r.asObject());
|
|
1410
1410
|
break;
|
|
1411
1411
|
}
|
|
1412
|
-
case
|
|
1412
|
+
case ms: {
|
|
1413
1413
|
if (r.isNull) throw new Error();
|
|
1414
|
-
e.ServerContext =
|
|
1414
|
+
e.ServerContext = be(r.asObject());
|
|
1415
1415
|
break;
|
|
1416
1416
|
}
|
|
1417
|
-
case
|
|
1417
|
+
case _s: {
|
|
1418
1418
|
if (r.isNull) throw new Error();
|
|
1419
|
-
e.FeatureFlags =
|
|
1419
|
+
e.FeatureFlags = Rs(r.asDictionary());
|
|
1420
1420
|
break;
|
|
1421
1421
|
}
|
|
1422
|
-
case
|
|
1422
|
+
case Ts: {
|
|
1423
1423
|
if (r.isNull) throw new Error();
|
|
1424
1424
|
e.SpaceId = r.asString();
|
|
1425
1425
|
break;
|
|
1426
1426
|
}
|
|
1427
|
-
case
|
|
1427
|
+
case Ss: {
|
|
1428
1428
|
if (r.isNull) throw new Error();
|
|
1429
1429
|
e.PrimaryUserId = r.asString();
|
|
1430
1430
|
break;
|
|
1431
1431
|
}
|
|
1432
|
-
case
|
|
1432
|
+
case ws: {
|
|
1433
1433
|
if (r.isNull) throw new Error();
|
|
1434
|
-
e.
|
|
1434
|
+
e.ChannelInstanceId = r.asString();
|
|
1435
1435
|
break;
|
|
1436
1436
|
}
|
|
1437
1437
|
}
|
|
1438
1438
|
}
|
|
1439
|
-
async function
|
|
1440
|
-
const r = await
|
|
1441
|
-
return
|
|
1439
|
+
async function Cs(t, e) {
|
|
1440
|
+
const r = await Le(t, ds);
|
|
1441
|
+
return ys(r, e);
|
|
1442
1442
|
}
|
|
1443
|
-
function
|
|
1443
|
+
function bs(t) {
|
|
1444
1444
|
const e = [];
|
|
1445
1445
|
let r;
|
|
1446
1446
|
for (; (r = t.next()) !== null; )
|
|
1447
|
-
e.push(
|
|
1447
|
+
e.push(us(r.asObject()));
|
|
1448
1448
|
return e;
|
|
1449
1449
|
}
|
|
1450
|
-
function
|
|
1450
|
+
function Rs(t) {
|
|
1451
1451
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1452
1452
|
let r;
|
|
1453
1453
|
for (; (r = t.next()) !== null; ) {
|
|
@@ -1456,493 +1456,493 @@ function Cs(t) {
|
|
|
1456
1456
|
}
|
|
1457
1457
|
return e;
|
|
1458
1458
|
}
|
|
1459
|
-
function
|
|
1459
|
+
function ks(t) {
|
|
1460
1460
|
const e = {};
|
|
1461
|
-
return
|
|
1461
|
+
return Us(e), t && Object.assign(e, t), e;
|
|
1462
1462
|
}
|
|
1463
|
-
function
|
|
1464
|
-
return t.ServerSessionId = "", t.ContextType = J.Unknown, t.UserType = Z.Unknown, t.PayloadType = Q.Unknown, t.IsInternal = !1, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.OpcodeGroupsFromServer = S.NONE, t.OpcodeGroupsToServer = S.NONE, t.ProtocolVersion = 0, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.UserAgent = "", t.ClientType = X.Unknown, t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType =
|
|
1463
|
+
function Us(t) {
|
|
1464
|
+
return t.ServerSessionId = "", t.ContextType = J.Unknown, t.UserType = Z.Unknown, t.PayloadType = Q.Unknown, t.IsInternal = !1, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.OpcodeGroupsFromServer = S.NONE, t.OpcodeGroupsToServer = S.NONE, t.ProtocolVersion = 0, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.UserAgent = "", t.ClientType = X.Unknown, t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = Ve.Unknown, t;
|
|
1465
1465
|
}
|
|
1466
|
-
const
|
|
1467
|
-
function
|
|
1466
|
+
const Ct = 1, Ds = 1048632, Ms = 3748161056, Os = 4289118421;
|
|
1467
|
+
function Ls(t) {
|
|
1468
1468
|
const e = {};
|
|
1469
|
-
return
|
|
1469
|
+
return vs(e), t && Object.assign(e, t), e;
|
|
1470
1470
|
}
|
|
1471
|
-
function
|
|
1471
|
+
function vs(t) {
|
|
1472
1472
|
return t.CallId = _.fromBytes(new Uint8Array(16)), t.InstanceId = _.fromBytes(new Uint8Array(16)), t;
|
|
1473
1473
|
}
|
|
1474
|
-
function
|
|
1475
|
-
const e = new D(
|
|
1476
|
-
return
|
|
1474
|
+
function Ps(t) {
|
|
1475
|
+
const e = new D(Ct);
|
|
1476
|
+
return Fs(t, e), e.finish();
|
|
1477
1477
|
}
|
|
1478
|
-
function
|
|
1479
|
-
e.writeGuidField(
|
|
1478
|
+
function Fs(t, e) {
|
|
1479
|
+
e.writeGuidField(Ms, t.CallId), e.writeGuidField(Os, t.InstanceId);
|
|
1480
1480
|
}
|
|
1481
|
-
function
|
|
1482
|
-
const n =
|
|
1483
|
-
return F(
|
|
1481
|
+
function Bs(t, e, r) {
|
|
1482
|
+
const n = Ps(t);
|
|
1483
|
+
return F(Ds, n, Ct, e, r);
|
|
1484
1484
|
}
|
|
1485
|
-
const
|
|
1486
|
-
function
|
|
1485
|
+
const xs = 1048601, Gs = 112005851, Vs = 814454131, Ws = 976255570, Hs = 1123310456, Ks = 2885165957, $s = 3748161056, Ys = 4289118421;
|
|
1486
|
+
function js(t) {
|
|
1487
1487
|
const e = {};
|
|
1488
|
-
return
|
|
1488
|
+
return bt(e), e;
|
|
1489
1489
|
}
|
|
1490
|
-
function
|
|
1490
|
+
function bt(t) {
|
|
1491
1491
|
return t.FunctionId = _.fromBytes(new Uint8Array(16)), t.CallId = _.fromBytes(new Uint8Array(16)), t.InstanceId = _.fromBytes(new Uint8Array(16)), t.FunctionName = "", t.Parameters = [], t.ClientBackendToken = "", t.Scopes = [], t;
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1493
|
+
function zs(t, e) {
|
|
1494
1494
|
const r = z.create(t);
|
|
1495
|
-
return
|
|
1495
|
+
return Xs(r, e);
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1498
|
-
const r = e ??
|
|
1499
|
-
return
|
|
1497
|
+
function Xs(t, e) {
|
|
1498
|
+
const r = e ?? js();
|
|
1499
|
+
return bt(r), Js(t, r), r;
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1501
|
+
function Js(t, e) {
|
|
1502
1502
|
let r;
|
|
1503
1503
|
for (; (r = t.next()) !== null; )
|
|
1504
1504
|
switch (r.fieldId) {
|
|
1505
|
-
case
|
|
1505
|
+
case Gs: {
|
|
1506
1506
|
if (r.isNull) throw new Error();
|
|
1507
|
-
e.Scopes =
|
|
1507
|
+
e.Scopes = Zs(r.asArray());
|
|
1508
1508
|
break;
|
|
1509
1509
|
}
|
|
1510
|
-
case
|
|
1510
|
+
case Vs: {
|
|
1511
1511
|
if (r.isNull) throw new Error();
|
|
1512
1512
|
e.FunctionName = r.asString();
|
|
1513
1513
|
break;
|
|
1514
1514
|
}
|
|
1515
|
-
case
|
|
1515
|
+
case Ws: {
|
|
1516
1516
|
if (r.isNull) throw new Error();
|
|
1517
1517
|
e.FunctionId = r.asGuid();
|
|
1518
1518
|
break;
|
|
1519
1519
|
}
|
|
1520
|
-
case
|
|
1520
|
+
case Hs: {
|
|
1521
1521
|
if (r.isNull) throw new Error();
|
|
1522
1522
|
e.ClientBackendToken = r.asString();
|
|
1523
1523
|
break;
|
|
1524
1524
|
}
|
|
1525
|
-
case
|
|
1525
|
+
case Ks: {
|
|
1526
1526
|
if (r.isNull) throw new Error();
|
|
1527
|
-
e.Parameters =
|
|
1527
|
+
e.Parameters = qs(r.asArray());
|
|
1528
1528
|
break;
|
|
1529
1529
|
}
|
|
1530
|
-
case
|
|
1530
|
+
case $s: {
|
|
1531
1531
|
if (r.isNull) throw new Error();
|
|
1532
1532
|
e.CallId = r.asGuid();
|
|
1533
1533
|
break;
|
|
1534
1534
|
}
|
|
1535
|
-
case
|
|
1535
|
+
case Ys: {
|
|
1536
1536
|
if (r.isNull) throw new Error();
|
|
1537
1537
|
e.InstanceId = r.asGuid();
|
|
1538
1538
|
break;
|
|
1539
1539
|
}
|
|
1540
1540
|
}
|
|
1541
1541
|
}
|
|
1542
|
-
async function
|
|
1543
|
-
const r = await
|
|
1544
|
-
return
|
|
1542
|
+
async function Qs(t, e) {
|
|
1543
|
+
const r = await Le(t, xs);
|
|
1544
|
+
return zs(r, e);
|
|
1545
1545
|
}
|
|
1546
|
-
function
|
|
1546
|
+
function Zs(t) {
|
|
1547
1547
|
const e = [];
|
|
1548
1548
|
let r;
|
|
1549
1549
|
for (; (r = t.next()) !== null; )
|
|
1550
|
-
e.push(
|
|
1550
|
+
e.push(ni(r.asObject()));
|
|
1551
1551
|
return e;
|
|
1552
1552
|
}
|
|
1553
|
-
function
|
|
1553
|
+
function qs(t) {
|
|
1554
1554
|
const e = [];
|
|
1555
1555
|
let r;
|
|
1556
1556
|
for (; (r = t.next()) !== null; )
|
|
1557
|
-
e.push(
|
|
1557
|
+
e.push(dn(r.asObject()));
|
|
1558
1558
|
return e;
|
|
1559
1559
|
}
|
|
1560
|
-
const
|
|
1561
|
-
function
|
|
1560
|
+
const ei = 2994044322, ti = 3167053791;
|
|
1561
|
+
function ri(t) {
|
|
1562
1562
|
const e = {};
|
|
1563
|
-
return
|
|
1563
|
+
return Rt(e), e;
|
|
1564
1564
|
}
|
|
1565
|
-
function
|
|
1565
|
+
function Rt(t) {
|
|
1566
1566
|
return t.Type = "", t.Id = "", t;
|
|
1567
1567
|
}
|
|
1568
|
-
function
|
|
1569
|
-
const r = e ??
|
|
1570
|
-
return
|
|
1568
|
+
function ni(t, e) {
|
|
1569
|
+
const r = e ?? ri();
|
|
1570
|
+
return Rt(r), si(t, r), r;
|
|
1571
1571
|
}
|
|
1572
|
-
function
|
|
1572
|
+
function si(t, e) {
|
|
1573
1573
|
let r;
|
|
1574
1574
|
for (; (r = t.next()) !== null; )
|
|
1575
1575
|
switch (r.fieldId) {
|
|
1576
|
-
case
|
|
1576
|
+
case ei: {
|
|
1577
1577
|
if (r.isNull) throw new Error();
|
|
1578
1578
|
e.Id = r.asString();
|
|
1579
1579
|
break;
|
|
1580
1580
|
}
|
|
1581
|
-
case
|
|
1581
|
+
case ti: {
|
|
1582
1582
|
if (r.isNull) throw new Error();
|
|
1583
1583
|
e.Type = r.asString();
|
|
1584
1584
|
break;
|
|
1585
1585
|
}
|
|
1586
1586
|
}
|
|
1587
1587
|
}
|
|
1588
|
-
const
|
|
1589
|
-
function
|
|
1588
|
+
const kt = 1, ii = 1048631, oi = 2205234621, ai = 2838554230, ci = 3748161056, li = 4194102057, ui = 4289118421;
|
|
1589
|
+
function hi(t) {
|
|
1590
1590
|
const e = {};
|
|
1591
|
-
return
|
|
1591
|
+
return di(e), t && Object.assign(e, t), e;
|
|
1592
1592
|
}
|
|
1593
|
-
function
|
|
1593
|
+
function di(t) {
|
|
1594
1594
|
return t.CallId = _.fromBytes(new Uint8Array(16)), t.InstanceId = _.fromBytes(new Uint8Array(16)), t.ErrorMessage = "", t.ErrorTypeName = "", t.StackTrace = "", t;
|
|
1595
1595
|
}
|
|
1596
|
-
function
|
|
1597
|
-
const e = new D(
|
|
1598
|
-
return
|
|
1596
|
+
function fi(t) {
|
|
1597
|
+
const e = new D(kt);
|
|
1598
|
+
return Ei(t, e), e.finish();
|
|
1599
1599
|
}
|
|
1600
|
-
function
|
|
1601
|
-
e.writeStringField(
|
|
1600
|
+
function Ei(t, e) {
|
|
1601
|
+
e.writeStringField(oi, t.ErrorTypeName), e.writeStringField(ai, t.ErrorMessage), e.writeGuidField(ci, t.CallId), e.writeStringField(li, t.StackTrace), e.writeGuidField(ui, t.InstanceId);
|
|
1602
1602
|
}
|
|
1603
|
-
function
|
|
1604
|
-
const n =
|
|
1605
|
-
return F(
|
|
1603
|
+
function pi(t, e, r) {
|
|
1604
|
+
const n = fi(t);
|
|
1605
|
+
return F(ii, n, kt, e, r);
|
|
1606
1606
|
}
|
|
1607
|
-
const
|
|
1608
|
-
function
|
|
1607
|
+
const We = 1, Ii = 1048600, Ut = 703025676, Dt = 814454131, Mt = 972460562, Ot = 976255570, Lt = 1368629611, vt = 1479280922, Pt = 1533537016, Ft = 2274386296, Bt = 2603556958, xt = 2885165957, Gt = 3568439632;
|
|
1608
|
+
function mi(t) {
|
|
1609
1609
|
const e = {};
|
|
1610
|
-
return
|
|
1610
|
+
return Vt(e), e;
|
|
1611
1611
|
}
|
|
1612
|
-
function
|
|
1612
|
+
function Vt(t) {
|
|
1613
1613
|
return t.FunctionId = _.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;
|
|
1614
1614
|
}
|
|
1615
|
-
function
|
|
1616
|
-
const e = new D(
|
|
1617
|
-
return
|
|
1615
|
+
function _i(t) {
|
|
1616
|
+
const e = new D(We);
|
|
1617
|
+
return Wt(t, e), e.finish();
|
|
1618
1618
|
}
|
|
1619
|
-
function
|
|
1620
|
-
e.writeStringField(
|
|
1619
|
+
function Wt(t, e) {
|
|
1620
|
+
e.writeStringField(Ut, t.ResultTypeName), e.writeStringField(Dt, t.FunctionName), e.writeStringField(Mt, t.EnumerableItemTypeName), e.writeGuidField(Ot, t.FunctionId), e.writeStringField(Lt, t.Description), e.writeBoolField(vt, t.IsCancellable), e.writeBoolField(Pt, t.RequiresInstance), e.writeBoolField(Ft, t.LlmInlineResult), e.writeBoolField(Bt, t.IsEnumerable), e.writeArrayField(xt, b.Object, (r) => {
|
|
1621
1621
|
for (const n of t.Parameters)
|
|
1622
|
-
r.writeObject(
|
|
1623
|
-
|
|
1622
|
+
r.writeObject(yi, (s) => {
|
|
1623
|
+
gi(n, s);
|
|
1624
1624
|
});
|
|
1625
|
-
}), e.writeBoolField(
|
|
1625
|
+
}), e.writeBoolField(Gt, t.LlmCallOnlyOnce);
|
|
1626
1626
|
}
|
|
1627
|
-
function
|
|
1628
|
-
const r = e ??
|
|
1629
|
-
return
|
|
1627
|
+
function Ti(t, e) {
|
|
1628
|
+
const r = e ?? mi();
|
|
1629
|
+
return Vt(r), Si(t, r), r;
|
|
1630
1630
|
}
|
|
1631
|
-
function
|
|
1631
|
+
function Si(t, e) {
|
|
1632
1632
|
let r;
|
|
1633
1633
|
for (; (r = t.next()) !== null; )
|
|
1634
1634
|
switch (r.fieldId) {
|
|
1635
|
-
case
|
|
1635
|
+
case Ut: {
|
|
1636
1636
|
if (r.isNull) throw new Error();
|
|
1637
1637
|
e.ResultTypeName = r.asString();
|
|
1638
1638
|
break;
|
|
1639
1639
|
}
|
|
1640
|
-
case
|
|
1640
|
+
case Dt: {
|
|
1641
1641
|
if (r.isNull) throw new Error();
|
|
1642
1642
|
e.FunctionName = r.asString();
|
|
1643
1643
|
break;
|
|
1644
1644
|
}
|
|
1645
|
-
case
|
|
1645
|
+
case Mt: {
|
|
1646
1646
|
if (r.isNull) throw new Error();
|
|
1647
1647
|
e.EnumerableItemTypeName = r.asString();
|
|
1648
1648
|
break;
|
|
1649
1649
|
}
|
|
1650
|
-
case
|
|
1650
|
+
case Ot: {
|
|
1651
1651
|
if (r.isNull) throw new Error();
|
|
1652
1652
|
e.FunctionId = r.asGuid();
|
|
1653
1653
|
break;
|
|
1654
1654
|
}
|
|
1655
|
-
case
|
|
1655
|
+
case Lt: {
|
|
1656
1656
|
if (r.isNull) throw new Error();
|
|
1657
1657
|
e.Description = r.asString();
|
|
1658
1658
|
break;
|
|
1659
1659
|
}
|
|
1660
|
-
case
|
|
1660
|
+
case vt: {
|
|
1661
1661
|
if (r.isNull) throw new Error();
|
|
1662
1662
|
e.IsCancellable = r.asBool();
|
|
1663
1663
|
break;
|
|
1664
1664
|
}
|
|
1665
|
-
case
|
|
1665
|
+
case Pt: {
|
|
1666
1666
|
if (r.isNull) throw new Error();
|
|
1667
1667
|
e.RequiresInstance = r.asBool();
|
|
1668
1668
|
break;
|
|
1669
1669
|
}
|
|
1670
|
-
case
|
|
1670
|
+
case Ft: {
|
|
1671
1671
|
if (r.isNull) throw new Error();
|
|
1672
1672
|
e.LlmInlineResult = r.asBool();
|
|
1673
1673
|
break;
|
|
1674
1674
|
}
|
|
1675
|
-
case
|
|
1675
|
+
case Bt: {
|
|
1676
1676
|
if (r.isNull) throw new Error();
|
|
1677
1677
|
e.IsEnumerable = r.asBool();
|
|
1678
1678
|
break;
|
|
1679
1679
|
}
|
|
1680
|
-
case
|
|
1680
|
+
case xt: {
|
|
1681
1681
|
if (r.isNull) throw new Error();
|
|
1682
|
-
e.Parameters =
|
|
1682
|
+
e.Parameters = Ai(r.asArray());
|
|
1683
1683
|
break;
|
|
1684
1684
|
}
|
|
1685
|
-
case
|
|
1685
|
+
case Gt: {
|
|
1686
1686
|
if (r.isNull) throw new Error();
|
|
1687
1687
|
e.LlmCallOnlyOnce = r.asBool();
|
|
1688
1688
|
break;
|
|
1689
1689
|
}
|
|
1690
1690
|
}
|
|
1691
1691
|
}
|
|
1692
|
-
function
|
|
1693
|
-
const n =
|
|
1694
|
-
return F(
|
|
1692
|
+
function wi(t, e, r) {
|
|
1693
|
+
const n = _i(t);
|
|
1694
|
+
return F(Ii, n, We, e, r);
|
|
1695
1695
|
}
|
|
1696
|
-
function
|
|
1696
|
+
function Ai(t) {
|
|
1697
1697
|
const e = [];
|
|
1698
1698
|
let r;
|
|
1699
1699
|
for (; (r = t.next()) !== null; )
|
|
1700
|
-
e.push(
|
|
1700
|
+
e.push(Ci(r.asObject()));
|
|
1701
1701
|
return e;
|
|
1702
1702
|
}
|
|
1703
|
-
const
|
|
1704
|
-
function
|
|
1703
|
+
const yi = 1, Ht = 607861992, Kt = 894485888, $t = 972460562, Yt = 1368629611, jt = 1883521406, zt = 2603556958, Xt = 3609695522, Jt = 4075263697, Qt = 4257460908;
|
|
1704
|
+
function Ni(t) {
|
|
1705
1705
|
const e = {};
|
|
1706
|
-
return
|
|
1706
|
+
return Zt(e), e;
|
|
1707
1707
|
}
|
|
1708
|
-
function
|
|
1708
|
+
function Zt(t) {
|
|
1709
1709
|
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;
|
|
1710
1710
|
}
|
|
1711
|
-
function
|
|
1712
|
-
e.writeBoolField(
|
|
1711
|
+
function gi(t, e) {
|
|
1712
|
+
e.writeBoolField(Ht, t.HasDefaultValue), e.writeStringField(Kt, t.DefaultValueJson), e.writeStringField($t, t.EnumerableItemTypeName), e.writeStringField(Yt, t.Description), e.writeBinaryField(jt, t.DefaultValueData), e.writeBoolField(zt, t.IsEnumerable), e.writeStringField(Xt, t.TypeName), e.writeStringField(Jt, t.ParameterName), e.writeInt32Field(Qt, t.ParameterIndex | 0);
|
|
1713
1713
|
}
|
|
1714
|
-
function
|
|
1715
|
-
const r = e ??
|
|
1716
|
-
return
|
|
1714
|
+
function Ci(t, e) {
|
|
1715
|
+
const r = e ?? Ni();
|
|
1716
|
+
return Zt(r), bi(t, r), r;
|
|
1717
1717
|
}
|
|
1718
|
-
function
|
|
1718
|
+
function bi(t, e) {
|
|
1719
1719
|
let r;
|
|
1720
1720
|
for (; (r = t.next()) !== null; )
|
|
1721
1721
|
switch (r.fieldId) {
|
|
1722
|
-
case
|
|
1722
|
+
case Ht: {
|
|
1723
1723
|
if (r.isNull) throw new Error();
|
|
1724
1724
|
e.HasDefaultValue = r.asBool();
|
|
1725
1725
|
break;
|
|
1726
1726
|
}
|
|
1727
|
-
case
|
|
1727
|
+
case Kt: {
|
|
1728
1728
|
if (r.isNull) throw new Error();
|
|
1729
1729
|
e.DefaultValueJson = r.asString();
|
|
1730
1730
|
break;
|
|
1731
1731
|
}
|
|
1732
|
-
case
|
|
1732
|
+
case $t: {
|
|
1733
1733
|
if (r.isNull) throw new Error();
|
|
1734
1734
|
e.EnumerableItemTypeName = r.asString();
|
|
1735
1735
|
break;
|
|
1736
1736
|
}
|
|
1737
|
-
case
|
|
1737
|
+
case Yt: {
|
|
1738
1738
|
if (r.isNull) throw new Error();
|
|
1739
1739
|
e.Description = r.asString();
|
|
1740
1740
|
break;
|
|
1741
1741
|
}
|
|
1742
|
-
case
|
|
1742
|
+
case jt: {
|
|
1743
1743
|
if (r.isNull) throw new Error();
|
|
1744
1744
|
e.DefaultValueData = r.asBinary();
|
|
1745
1745
|
break;
|
|
1746
1746
|
}
|
|
1747
|
-
case
|
|
1747
|
+
case zt: {
|
|
1748
1748
|
if (r.isNull) throw new Error();
|
|
1749
1749
|
e.IsEnumerable = r.asBool();
|
|
1750
1750
|
break;
|
|
1751
1751
|
}
|
|
1752
|
-
case
|
|
1752
|
+
case Xt: {
|
|
1753
1753
|
if (r.isNull) throw new Error();
|
|
1754
1754
|
e.TypeName = r.asString();
|
|
1755
1755
|
break;
|
|
1756
1756
|
}
|
|
1757
|
-
case
|
|
1757
|
+
case Jt: {
|
|
1758
1758
|
if (r.isNull) throw new Error();
|
|
1759
1759
|
e.ParameterName = r.asString();
|
|
1760
1760
|
break;
|
|
1761
1761
|
}
|
|
1762
|
-
case
|
|
1762
|
+
case Qt: {
|
|
1763
1763
|
if (r.isNull) throw new Error();
|
|
1764
1764
|
e.ParameterIndex = r.asInt32();
|
|
1765
1765
|
break;
|
|
1766
1766
|
}
|
|
1767
1767
|
}
|
|
1768
1768
|
}
|
|
1769
|
-
const
|
|
1770
|
-
function
|
|
1769
|
+
const qt = 1, Ri = 1048638, ki = 3678477544;
|
|
1770
|
+
function Ui(t) {
|
|
1771
1771
|
const e = {};
|
|
1772
|
-
return
|
|
1772
|
+
return Di(e), t && Object.assign(e, t), e;
|
|
1773
1773
|
}
|
|
1774
|
-
function
|
|
1774
|
+
function Di(t) {
|
|
1775
1775
|
return t.Functions = [], t;
|
|
1776
1776
|
}
|
|
1777
|
-
function
|
|
1778
|
-
const e = new D(
|
|
1779
|
-
return
|
|
1777
|
+
function Mi(t) {
|
|
1778
|
+
const e = new D(qt);
|
|
1779
|
+
return Oi(t, e), e.finish();
|
|
1780
1780
|
}
|
|
1781
|
-
function
|
|
1782
|
-
e.writeArrayField(
|
|
1781
|
+
function Oi(t, e) {
|
|
1782
|
+
e.writeArrayField(ki, b.Object, (r) => {
|
|
1783
1783
|
for (const n of t.Functions)
|
|
1784
|
-
r.writeObject(
|
|
1785
|
-
|
|
1784
|
+
r.writeObject(We, (s) => {
|
|
1785
|
+
Wt(n, s);
|
|
1786
1786
|
});
|
|
1787
1787
|
});
|
|
1788
1788
|
}
|
|
1789
|
-
function
|
|
1790
|
-
const n =
|
|
1791
|
-
return F(
|
|
1789
|
+
function Li(t, e, r) {
|
|
1790
|
+
const n = Mi(t);
|
|
1791
|
+
return F(Ri, n, qt, e, r);
|
|
1792
1792
|
}
|
|
1793
|
-
const
|
|
1794
|
-
function
|
|
1793
|
+
const er = 1, vi = 1048602, Pi = 349453957, Fi = 703025676, Bi = 3403385840, xi = 3748161056, Gi = 4289118421;
|
|
1794
|
+
function Vi(t) {
|
|
1795
1795
|
const e = {};
|
|
1796
|
-
return
|
|
1796
|
+
return Wi(e), t && Object.assign(e, t), e;
|
|
1797
1797
|
}
|
|
1798
|
-
function
|
|
1798
|
+
function Wi(t) {
|
|
1799
1799
|
return t.CallId = _.fromBytes(new Uint8Array(16)), t.InstanceId = _.fromBytes(new Uint8Array(16)), t.ResultTypeName = "", t.ResultJson = "", t.ResultData = new Uint8Array(0), t;
|
|
1800
1800
|
}
|
|
1801
|
-
function
|
|
1802
|
-
const e = new D(
|
|
1803
|
-
return
|
|
1801
|
+
function Hi(t) {
|
|
1802
|
+
const e = new D(er);
|
|
1803
|
+
return Ki(t, e), e.finish();
|
|
1804
1804
|
}
|
|
1805
|
-
function
|
|
1806
|
-
e.writeBinaryField(
|
|
1805
|
+
function Ki(t, e) {
|
|
1806
|
+
e.writeBinaryField(Pi, t.ResultData), e.writeStringField(Fi, t.ResultTypeName), e.writeStringField(Bi, t.ResultJson), e.writeGuidField(xi, t.CallId), e.writeGuidField(Gi, t.InstanceId);
|
|
1807
1807
|
}
|
|
1808
|
-
function
|
|
1809
|
-
const n =
|
|
1810
|
-
return F(
|
|
1808
|
+
function $i(t, e, r) {
|
|
1809
|
+
const n = Hi(t);
|
|
1810
|
+
return F(vi, n, er, e, r);
|
|
1811
1811
|
}
|
|
1812
|
-
const
|
|
1812
|
+
const tr = 1, Yi = 65549;
|
|
1813
1813
|
function Je(t) {
|
|
1814
1814
|
return {};
|
|
1815
1815
|
}
|
|
1816
|
-
function
|
|
1817
|
-
return new D(
|
|
1816
|
+
function ji(t) {
|
|
1817
|
+
return new D(tr).finish();
|
|
1818
1818
|
}
|
|
1819
1819
|
function Qe(t, e, r) {
|
|
1820
|
-
const n =
|
|
1821
|
-
return F(
|
|
1820
|
+
const n = ji();
|
|
1821
|
+
return F(Yi, n, tr, e, r);
|
|
1822
1822
|
}
|
|
1823
|
-
const
|
|
1824
|
-
function
|
|
1823
|
+
const zi = 3167053791, Xi = 3342364356, Ji = 3612929027;
|
|
1824
|
+
function rr(t) {
|
|
1825
1825
|
const e = {};
|
|
1826
|
-
return
|
|
1826
|
+
return nr(e), e;
|
|
1827
1827
|
}
|
|
1828
|
-
function
|
|
1828
|
+
function nr(t) {
|
|
1829
1829
|
return t.Category = "", t.Type = Et.Face, t.FaceBlendshapes = [], t;
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1832
|
-
const r = e ??
|
|
1833
|
-
return
|
|
1831
|
+
function Qi(t, e) {
|
|
1832
|
+
const r = e ?? rr();
|
|
1833
|
+
return nr(r), Zi(t, r), r;
|
|
1834
1834
|
}
|
|
1835
|
-
function
|
|
1835
|
+
function Zi(t, e) {
|
|
1836
1836
|
let r;
|
|
1837
1837
|
for (; (r = t.next()) !== null; )
|
|
1838
1838
|
switch (r.fieldId) {
|
|
1839
|
-
case
|
|
1839
|
+
case zi: {
|
|
1840
1840
|
if (r.isNull) throw new Error();
|
|
1841
1841
|
e.Type = r.asInt32();
|
|
1842
1842
|
break;
|
|
1843
1843
|
}
|
|
1844
|
-
case
|
|
1844
|
+
case Xi: {
|
|
1845
1845
|
if (r.isNull) throw new Error();
|
|
1846
|
-
e.FaceBlendshapes =
|
|
1846
|
+
e.FaceBlendshapes = qi(r.asArray());
|
|
1847
1847
|
break;
|
|
1848
1848
|
}
|
|
1849
|
-
case
|
|
1849
|
+
case Ji: {
|
|
1850
1850
|
if (r.isNull) throw new Error();
|
|
1851
1851
|
e.Category = r.asString();
|
|
1852
1852
|
break;
|
|
1853
1853
|
}
|
|
1854
1854
|
}
|
|
1855
1855
|
}
|
|
1856
|
-
function
|
|
1856
|
+
function qi(t) {
|
|
1857
1857
|
const e = [];
|
|
1858
1858
|
let r;
|
|
1859
1859
|
for (; (r = t.next()) !== null; )
|
|
1860
1860
|
e.push(r.asString());
|
|
1861
1861
|
return e;
|
|
1862
1862
|
}
|
|
1863
|
-
const
|
|
1864
|
-
function
|
|
1863
|
+
const eo = 3612929027;
|
|
1864
|
+
function sr(t) {
|
|
1865
1865
|
const e = {};
|
|
1866
|
-
return
|
|
1866
|
+
return ir(e), e;
|
|
1867
1867
|
}
|
|
1868
|
-
function
|
|
1868
|
+
function ir(t) {
|
|
1869
1869
|
return t.Category = "", t;
|
|
1870
1870
|
}
|
|
1871
|
-
function
|
|
1872
|
-
const r = e ??
|
|
1873
|
-
return
|
|
1871
|
+
function to(t, e) {
|
|
1872
|
+
const r = e ?? sr();
|
|
1873
|
+
return ir(r), ro(t, r), r;
|
|
1874
1874
|
}
|
|
1875
|
-
function
|
|
1875
|
+
function ro(t, e) {
|
|
1876
1876
|
let r;
|
|
1877
1877
|
for (; (r = t.next()) !== null; )
|
|
1878
1878
|
switch (r.fieldId) {
|
|
1879
|
-
case
|
|
1879
|
+
case eo: {
|
|
1880
1880
|
if (r.isNull) throw new Error();
|
|
1881
1881
|
e.Category = r.asString();
|
|
1882
1882
|
break;
|
|
1883
1883
|
}
|
|
1884
1884
|
}
|
|
1885
1885
|
}
|
|
1886
|
-
const
|
|
1887
|
-
function
|
|
1886
|
+
const no = 164808083, so = 1368629611, io = 2739413426, oo = 2768375929, ao = 2950031986, co = 3284746250, lo = 4065070594;
|
|
1887
|
+
function or(t) {
|
|
1888
1888
|
const e = {};
|
|
1889
|
-
return
|
|
1889
|
+
return ar(e), e;
|
|
1890
1890
|
}
|
|
1891
|
-
function
|
|
1891
|
+
function ar(t) {
|
|
1892
1892
|
return t.Description = "", t.Codec = pt.H264, t.Width = 0, t.Height = 0, t.Framerate = 30, t.Bitrate = 0, t.IsHardwareAccelerated = !1, t;
|
|
1893
1893
|
}
|
|
1894
|
-
function
|
|
1895
|
-
const r = e ??
|
|
1896
|
-
return
|
|
1894
|
+
function uo(t, e) {
|
|
1895
|
+
const r = e ?? or();
|
|
1896
|
+
return ar(r), ho(t, r), r;
|
|
1897
1897
|
}
|
|
1898
|
-
function
|
|
1898
|
+
function ho(t, e) {
|
|
1899
1899
|
let r;
|
|
1900
1900
|
for (; (r = t.next()) !== null; )
|
|
1901
1901
|
switch (r.fieldId) {
|
|
1902
|
-
case
|
|
1902
|
+
case no: {
|
|
1903
1903
|
if (r.isNull) throw new Error();
|
|
1904
1904
|
e.Framerate = r.asInt32();
|
|
1905
1905
|
break;
|
|
1906
1906
|
}
|
|
1907
|
-
case
|
|
1907
|
+
case so: {
|
|
1908
1908
|
if (r.isNull) throw new Error();
|
|
1909
1909
|
e.Description = r.asString();
|
|
1910
1910
|
break;
|
|
1911
1911
|
}
|
|
1912
|
-
case
|
|
1912
|
+
case io: {
|
|
1913
1913
|
if (r.isNull) throw new Error();
|
|
1914
1914
|
e.IsHardwareAccelerated = r.asBool();
|
|
1915
1915
|
break;
|
|
1916
1916
|
}
|
|
1917
|
-
case
|
|
1917
|
+
case oo: {
|
|
1918
1918
|
if (r.isNull) throw new Error();
|
|
1919
1919
|
e.Bitrate = r.asInt32();
|
|
1920
1920
|
break;
|
|
1921
1921
|
}
|
|
1922
|
-
case
|
|
1922
|
+
case ao: {
|
|
1923
1923
|
if (r.isNull) throw new Error();
|
|
1924
1924
|
e.Height = r.asInt32();
|
|
1925
1925
|
break;
|
|
1926
1926
|
}
|
|
1927
|
-
case
|
|
1927
|
+
case co: {
|
|
1928
1928
|
if (r.isNull) throw new Error();
|
|
1929
1929
|
e.Codec = r.asInt32();
|
|
1930
1930
|
break;
|
|
1931
1931
|
}
|
|
1932
|
-
case
|
|
1932
|
+
case lo: {
|
|
1933
1933
|
if (r.isNull) throw new Error();
|
|
1934
1934
|
e.Width = r.asInt32();
|
|
1935
1935
|
break;
|
|
1936
1936
|
}
|
|
1937
1937
|
}
|
|
1938
1938
|
}
|
|
1939
|
-
const
|
|
1939
|
+
const fo = 65539, Eo = 693643444, po = 1144553441, Io = 1497620243, mo = 1559330978, _o = 1976546434, To = 1999510636, So = 2277643855, wo = 2469008121, Ao = 3042922213, yo = 3064612128, No = 3219210453, go = 3504054055, Co = 3678477544, bo = 3696445035, Ro = 3707543140, ko = 3712281496, Uo = 3895362455, Do = 3897397815, Mo = 4225107827;
|
|
1940
1940
|
function Oo(t) {
|
|
1941
1941
|
const e = {};
|
|
1942
|
-
return
|
|
1942
|
+
return cr(e), e;
|
|
1943
1943
|
}
|
|
1944
|
-
function
|
|
1945
|
-
return t.Clients = /* @__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.
|
|
1944
|
+
function cr(t) {
|
|
1945
|
+
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.FirstUserId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.ServerRunType = It.Local, t.AppSourceType = mt.Bundle, t.PublicAccess = !1, t.DebugMode = !1, t;
|
|
1946
1946
|
}
|
|
1947
1947
|
function Lo(t, e) {
|
|
1948
1948
|
const r = z.create(t);
|
|
@@ -1950,100 +1950,90 @@ function Lo(t, e) {
|
|
|
1950
1950
|
}
|
|
1951
1951
|
function vo(t, e) {
|
|
1952
1952
|
const r = e ?? Oo();
|
|
1953
|
-
return
|
|
1953
|
+
return cr(r), Po(t, r), r;
|
|
1954
1954
|
}
|
|
1955
1955
|
function Po(t, e) {
|
|
1956
1956
|
let r;
|
|
1957
1957
|
for (; (r = t.next()) !== null; )
|
|
1958
1958
|
switch (r.fieldId) {
|
|
1959
|
-
case ho: {
|
|
1960
|
-
if (r.isNull) throw new Error();
|
|
1961
|
-
e.IsGitSource = r.asBool();
|
|
1962
|
-
break;
|
|
1963
|
-
}
|
|
1964
|
-
case fo: {
|
|
1965
|
-
if (r.isNull) throw new Error();
|
|
1966
|
-
e.FirstUserId = r.asString();
|
|
1967
|
-
break;
|
|
1968
|
-
}
|
|
1969
1959
|
case Eo: {
|
|
1970
1960
|
if (r.isNull) throw new Error();
|
|
1971
|
-
e.
|
|
1961
|
+
e.FirstUserId = r.asString();
|
|
1972
1962
|
break;
|
|
1973
1963
|
}
|
|
1974
1964
|
case po: {
|
|
1975
1965
|
if (r.isNull) throw new Error();
|
|
1976
|
-
e.
|
|
1966
|
+
e.Clients = Bo(r.asDictionary());
|
|
1977
1967
|
break;
|
|
1978
1968
|
}
|
|
1979
1969
|
case Io: {
|
|
1980
1970
|
if (r.isNull) throw new Error();
|
|
1981
|
-
e.
|
|
1971
|
+
e.TrackingStreams = xo(r.asDictionary());
|
|
1982
1972
|
break;
|
|
1983
1973
|
}
|
|
1984
1974
|
case mo: {
|
|
1985
1975
|
if (r.isNull) throw new Error();
|
|
1986
|
-
e.
|
|
1976
|
+
e.ChannelId = r.asString();
|
|
1987
1977
|
break;
|
|
1988
1978
|
}
|
|
1989
1979
|
case _o: {
|
|
1990
1980
|
if (r.isNull) throw new Error();
|
|
1991
|
-
e.
|
|
1981
|
+
e.AppSourceType = r.asInt32();
|
|
1992
1982
|
break;
|
|
1993
1983
|
}
|
|
1994
1984
|
case To: {
|
|
1995
1985
|
if (r.isNull) throw new Error();
|
|
1996
|
-
e.
|
|
1986
|
+
e.SessionId = r.asString();
|
|
1997
1987
|
break;
|
|
1998
1988
|
}
|
|
1999
1989
|
case So: {
|
|
2000
1990
|
if (r.isNull) throw new Error();
|
|
2001
|
-
e.
|
|
1991
|
+
e.ChannelUrl = r.asString();
|
|
2002
1992
|
break;
|
|
2003
1993
|
}
|
|
2004
1994
|
case wo: {
|
|
2005
1995
|
if (r.isNull) throw new Error();
|
|
2006
|
-
e.
|
|
1996
|
+
e.ChannelName = r.asString();
|
|
2007
1997
|
break;
|
|
2008
1998
|
}
|
|
2009
1999
|
case Ao: {
|
|
2010
2000
|
if (r.isNull) throw new Error();
|
|
2011
|
-
e.
|
|
2001
|
+
e.PublicAccess = r.asBool();
|
|
2012
2002
|
break;
|
|
2013
2003
|
}
|
|
2014
2004
|
case yo: {
|
|
2015
2005
|
if (r.isNull) throw new Error();
|
|
2016
|
-
e.
|
|
2006
|
+
e.ServerRunType = r.asInt32();
|
|
2017
2007
|
break;
|
|
2018
2008
|
}
|
|
2019
2009
|
case No: {
|
|
2020
2010
|
if (r.isNull) throw new Error();
|
|
2021
|
-
e.
|
|
2011
|
+
e.OrganisationName = r.asString();
|
|
2022
2012
|
break;
|
|
2023
2013
|
}
|
|
2024
2014
|
case go: {
|
|
2025
2015
|
if (r.isNull) throw new Error();
|
|
2026
|
-
e.
|
|
2016
|
+
e.DebugMode = r.asBool();
|
|
2027
2017
|
break;
|
|
2028
2018
|
}
|
|
2029
2019
|
case Co: {
|
|
2030
2020
|
if (r.isNull) throw new Error();
|
|
2031
|
-
e.
|
|
2021
|
+
e.Functions = Go(r.asDictionary());
|
|
2032
2022
|
break;
|
|
2033
2023
|
}
|
|
2034
2024
|
case bo: {
|
|
2035
2025
|
if (r.isNull) throw new Error();
|
|
2036
|
-
e.
|
|
2026
|
+
e.UIStreams = Vo(r.asDictionary());
|
|
2037
2027
|
break;
|
|
2038
2028
|
}
|
|
2039
2029
|
case Ro: {
|
|
2040
2030
|
if (r.isNull) throw new Error();
|
|
2041
|
-
e.
|
|
2031
|
+
e.SpaceId = r.asString();
|
|
2042
2032
|
break;
|
|
2043
2033
|
}
|
|
2044
2034
|
case ko: {
|
|
2045
2035
|
if (r.isNull) throw new Error();
|
|
2046
|
-
e.
|
|
2036
|
+
e.PrimaryUserId = r.asString();
|
|
2047
2037
|
break;
|
|
2048
2038
|
}
|
|
2049
2039
|
case Uo: {
|
|
@@ -2064,7 +2054,7 @@ function Po(t, e) {
|
|
|
2064
2054
|
}
|
|
2065
2055
|
}
|
|
2066
2056
|
async function Fo(t, e) {
|
|
2067
|
-
const r = await
|
|
2057
|
+
const r = await Le(t, fo);
|
|
2068
2058
|
return Lo(r, e);
|
|
2069
2059
|
}
|
|
2070
2060
|
function Bo(t) {
|
|
@@ -2072,11 +2062,11 @@ function Bo(t) {
|
|
|
2072
2062
|
let r;
|
|
2073
2063
|
for (; (r = t.next()) !== null; ) {
|
|
2074
2064
|
const n = r.key.asInt32();
|
|
2075
|
-
e[n] =
|
|
2065
|
+
e[n] = be(r.value.asObject());
|
|
2076
2066
|
}
|
|
2077
2067
|
return e;
|
|
2078
2068
|
}
|
|
2079
|
-
function
|
|
2069
|
+
function xo(t) {
|
|
2080
2070
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2081
2071
|
let r;
|
|
2082
2072
|
for (; (r = t.next()) !== null; ) {
|
|
@@ -2085,12 +2075,12 @@ function Go(t) {
|
|
|
2085
2075
|
}
|
|
2086
2076
|
return e;
|
|
2087
2077
|
}
|
|
2088
|
-
function
|
|
2078
|
+
function Go(t) {
|
|
2089
2079
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2090
2080
|
let r;
|
|
2091
2081
|
for (; (r = t.next()) !== null; ) {
|
|
2092
2082
|
const n = r.key.asInt32();
|
|
2093
|
-
e[n] =
|
|
2083
|
+
e[n] = Ko(r.value.asArray());
|
|
2094
2084
|
}
|
|
2095
2085
|
return e;
|
|
2096
2086
|
}
|
|
@@ -2121,30 +2111,30 @@ function Ho(t) {
|
|
|
2121
2111
|
}
|
|
2122
2112
|
return e;
|
|
2123
2113
|
}
|
|
2124
|
-
function
|
|
2114
|
+
function Ko(t) {
|
|
2125
2115
|
const e = [];
|
|
2126
2116
|
let r;
|
|
2127
2117
|
for (; (r = t.next()) !== null; )
|
|
2128
|
-
e.push(
|
|
2118
|
+
e.push(Ti(r.asObject()));
|
|
2129
2119
|
return e;
|
|
2130
2120
|
}
|
|
2131
|
-
const
|
|
2121
|
+
const $o = 161083277, Yo = 325678206, jo = 3469892363, zo = 3645544153;
|
|
2132
2122
|
function Xo(t) {
|
|
2133
2123
|
const e = {};
|
|
2134
|
-
return
|
|
2124
|
+
return lr(e), e;
|
|
2135
2125
|
}
|
|
2136
|
-
function
|
|
2137
|
-
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info =
|
|
2126
|
+
function lr(t) {
|
|
2127
|
+
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = sr(), t;
|
|
2138
2128
|
}
|
|
2139
2129
|
function Jo(t, e) {
|
|
2140
2130
|
const r = e ?? Xo();
|
|
2141
|
-
return
|
|
2131
|
+
return lr(r), Qo(t, r), r;
|
|
2142
2132
|
}
|
|
2143
2133
|
function Qo(t, e) {
|
|
2144
2134
|
let r;
|
|
2145
2135
|
for (; (r = t.next()) !== null; )
|
|
2146
2136
|
switch (r.fieldId) {
|
|
2147
|
-
case
|
|
2137
|
+
case $o: {
|
|
2148
2138
|
if (r.isNull) throw new Error();
|
|
2149
2139
|
e.StreamId = r.asString();
|
|
2150
2140
|
break;
|
|
@@ -2161,7 +2151,7 @@ function Qo(t, e) {
|
|
|
2161
2151
|
}
|
|
2162
2152
|
case zo: {
|
|
2163
2153
|
if (r.isNull) throw new Error();
|
|
2164
|
-
e.Info =
|
|
2154
|
+
e.Info = to(r.asObject());
|
|
2165
2155
|
break;
|
|
2166
2156
|
}
|
|
2167
2157
|
}
|
|
@@ -2169,14 +2159,14 @@ function Qo(t, e) {
|
|
|
2169
2159
|
const Zo = 161083277, qo = 325678206, ea = 3469892363, ta = 3645544153;
|
|
2170
2160
|
function ra(t) {
|
|
2171
2161
|
const e = {};
|
|
2172
|
-
return
|
|
2162
|
+
return ur(e), e;
|
|
2173
2163
|
}
|
|
2174
|
-
function
|
|
2175
|
-
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info =
|
|
2164
|
+
function ur(t) {
|
|
2165
|
+
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = St(), t;
|
|
2176
2166
|
}
|
|
2177
2167
|
function na(t, e) {
|
|
2178
2168
|
const r = e ?? ra();
|
|
2179
|
-
return
|
|
2169
|
+
return ur(r), sa(t, r), r;
|
|
2180
2170
|
}
|
|
2181
2171
|
function sa(t, e) {
|
|
2182
2172
|
let r;
|
|
@@ -2199,7 +2189,7 @@ function sa(t, e) {
|
|
|
2199
2189
|
}
|
|
2200
2190
|
case ta: {
|
|
2201
2191
|
if (r.isNull) throw new Error();
|
|
2202
|
-
e.Info =
|
|
2192
|
+
e.Info = Sn(r.asObject());
|
|
2203
2193
|
break;
|
|
2204
2194
|
}
|
|
2205
2195
|
}
|
|
@@ -2207,14 +2197,14 @@ function sa(t, e) {
|
|
|
2207
2197
|
const ia = 161083277, oa = 325678206, aa = 3469892363, ca = 3645544153;
|
|
2208
2198
|
function la(t) {
|
|
2209
2199
|
const e = {};
|
|
2210
|
-
return
|
|
2200
|
+
return hr(e), e;
|
|
2211
2201
|
}
|
|
2212
|
-
function
|
|
2213
|
-
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info =
|
|
2202
|
+
function hr(t) {
|
|
2203
|
+
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = or(), t;
|
|
2214
2204
|
}
|
|
2215
2205
|
function ua(t, e) {
|
|
2216
2206
|
const r = e ?? la();
|
|
2217
|
-
return
|
|
2207
|
+
return hr(r), ha(t, r), r;
|
|
2218
2208
|
}
|
|
2219
2209
|
function ha(t, e) {
|
|
2220
2210
|
let r;
|
|
@@ -2237,7 +2227,7 @@ function ha(t, e) {
|
|
|
2237
2227
|
}
|
|
2238
2228
|
case ca: {
|
|
2239
2229
|
if (r.isNull) throw new Error();
|
|
2240
|
-
e.Info =
|
|
2230
|
+
e.Info = uo(r.asObject());
|
|
2241
2231
|
break;
|
|
2242
2232
|
}
|
|
2243
2233
|
}
|
|
@@ -2245,14 +2235,14 @@ function ha(t, e) {
|
|
|
2245
2235
|
const da = 161083277, fa = 325678206, Ea = 3469892363, pa = 3645544153;
|
|
2246
2236
|
function Ia(t) {
|
|
2247
2237
|
const e = {};
|
|
2248
|
-
return
|
|
2238
|
+
return dr(e), e;
|
|
2249
2239
|
}
|
|
2250
|
-
function
|
|
2251
|
-
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info =
|
|
2240
|
+
function dr(t) {
|
|
2241
|
+
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = rr(), t;
|
|
2252
2242
|
}
|
|
2253
2243
|
function ma(t, e) {
|
|
2254
2244
|
const r = e ?? Ia();
|
|
2255
|
-
return
|
|
2245
|
+
return dr(r), _a(t, r), r;
|
|
2256
2246
|
}
|
|
2257
2247
|
function _a(t, e) {
|
|
2258
2248
|
let r;
|
|
@@ -2275,88 +2265,79 @@ function _a(t, e) {
|
|
|
2275
2265
|
}
|
|
2276
2266
|
case pa: {
|
|
2277
2267
|
if (r.isNull) throw new Error();
|
|
2278
|
-
e.Info =
|
|
2268
|
+
e.Info = Qi(r.asObject());
|
|
2279
2269
|
break;
|
|
2280
2270
|
}
|
|
2281
2271
|
}
|
|
2282
2272
|
}
|
|
2283
|
-
const
|
|
2284
|
-
function
|
|
2273
|
+
const fr = 1, Ta = 131074;
|
|
2274
|
+
function Er(t) {
|
|
2285
2275
|
return {};
|
|
2286
2276
|
}
|
|
2287
2277
|
function Sa(t) {
|
|
2288
|
-
return new D(
|
|
2278
|
+
return new D(fr).finish();
|
|
2289
2279
|
}
|
|
2290
|
-
function
|
|
2280
|
+
function pr(t, e, r) {
|
|
2291
2281
|
const n = Sa();
|
|
2292
|
-
return F(Ta, n,
|
|
2282
|
+
return F(Ta, n, fr, e, r);
|
|
2293
2283
|
}
|
|
2294
|
-
const
|
|
2284
|
+
const Ir = 1, wa = 8388612;
|
|
2295
2285
|
function Aa(t) {
|
|
2296
2286
|
return {};
|
|
2297
2287
|
}
|
|
2298
2288
|
function ya(t) {
|
|
2299
|
-
return new D(
|
|
2289
|
+
return new D(Ir).finish();
|
|
2300
2290
|
}
|
|
2301
2291
|
function Na(t, e, r) {
|
|
2302
2292
|
const n = ya();
|
|
2303
|
-
return F(wa, n,
|
|
2304
|
-
}
|
|
2305
|
-
function ga(t) {
|
|
2306
|
-
return new Worker(
|
|
2307
|
-
"" + new URL("assets/protocol-worker-DIKCgk1A.js", import.meta.url).href,
|
|
2308
|
-
{
|
|
2309
|
-
type: "module",
|
|
2310
|
-
name: t?.name
|
|
2311
|
-
}
|
|
2312
|
-
);
|
|
2293
|
+
return F(wa, n, Ir, e, r);
|
|
2313
2294
|
}
|
|
2314
|
-
class
|
|
2295
|
+
class He extends Error {
|
|
2315
2296
|
constructor(e, r) {
|
|
2316
2297
|
super(e), this.cause = r, this.name = "ConnectionError";
|
|
2317
2298
|
}
|
|
2318
2299
|
}
|
|
2319
|
-
class y extends
|
|
2300
|
+
class y extends He {
|
|
2320
2301
|
constructor(e, r) {
|
|
2321
2302
|
super(e, r), this.name = "AuthenticationError";
|
|
2322
2303
|
}
|
|
2323
2304
|
}
|
|
2324
|
-
class W extends
|
|
2305
|
+
class W extends He {
|
|
2325
2306
|
constructor(e, r) {
|
|
2326
2307
|
super(e, r), this.name = "TransportError";
|
|
2327
2308
|
}
|
|
2328
2309
|
}
|
|
2329
|
-
class
|
|
2310
|
+
class Ke extends W {
|
|
2330
2311
|
constructor(e) {
|
|
2331
2312
|
super(`No keepalive received within ${e}ms`), this.name = "KeepaliveTimeoutError";
|
|
2332
2313
|
}
|
|
2333
2314
|
}
|
|
2334
|
-
class
|
|
2315
|
+
class ga extends He {
|
|
2335
2316
|
constructor(e) {
|
|
2336
2317
|
super(`Maximum reconnection attempts (${e}) exceeded`), this.name = "MaxRetriesExceededError";
|
|
2337
2318
|
}
|
|
2338
2319
|
}
|
|
2339
|
-
class
|
|
2320
|
+
class Ca extends y {
|
|
2340
2321
|
constructor(e) {
|
|
2341
2322
|
super(`Channel provisioning timeout after ${e}ms`), this.name = "ProvisioningTimeoutError";
|
|
2342
2323
|
}
|
|
2343
2324
|
}
|
|
2344
|
-
class
|
|
2325
|
+
class Tl extends y {
|
|
2345
2326
|
constructor(e) {
|
|
2346
2327
|
super(`Channel not found: ${e}`), this.name = "ChannelNotFoundError";
|
|
2347
2328
|
}
|
|
2348
2329
|
}
|
|
2349
|
-
class
|
|
2330
|
+
class Sl extends y {
|
|
2350
2331
|
constructor(e) {
|
|
2351
2332
|
super(`Space not found for domain: ${e}`), this.name = "SpaceNotFoundError";
|
|
2352
2333
|
}
|
|
2353
2334
|
}
|
|
2354
|
-
class
|
|
2335
|
+
class wl extends y {
|
|
2355
2336
|
constructor() {
|
|
2356
2337
|
super("No channels available in this space"), this.name = "NoChannelsError";
|
|
2357
2338
|
}
|
|
2358
2339
|
}
|
|
2359
|
-
function
|
|
2340
|
+
function mr(t, e) {
|
|
2360
2341
|
return new Promise((r, n) => {
|
|
2361
2342
|
const s = () => {
|
|
2362
2343
|
clearTimeout(i), n(new Error("Aborted"));
|
|
@@ -2370,32 +2351,32 @@ function pr(t, e) {
|
|
|
2370
2351
|
e?.addEventListener("abort", s, { once: !0 });
|
|
2371
2352
|
});
|
|
2372
2353
|
}
|
|
2373
|
-
var
|
|
2354
|
+
var _r = /* @__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))(_r || {});
|
|
2374
2355
|
let $e = 1, fe = null;
|
|
2375
|
-
function
|
|
2356
|
+
function Al(t) {
|
|
2376
2357
|
$e = t;
|
|
2377
2358
|
}
|
|
2378
|
-
function
|
|
2359
|
+
function yl() {
|
|
2379
2360
|
return $e;
|
|
2380
2361
|
}
|
|
2381
|
-
function
|
|
2362
|
+
function ba(t) {
|
|
2382
2363
|
fe = t;
|
|
2383
2364
|
}
|
|
2384
|
-
function
|
|
2365
|
+
function Nl() {
|
|
2385
2366
|
return fe;
|
|
2386
2367
|
}
|
|
2387
|
-
const
|
|
2368
|
+
const Ra = {
|
|
2388
2369
|
0: "DEBUG",
|
|
2389
2370
|
1: "INFO",
|
|
2390
2371
|
2: "WARN",
|
|
2391
2372
|
3: "ERROR",
|
|
2392
2373
|
4: "NONE"
|
|
2393
2374
|
};
|
|
2394
|
-
function
|
|
2375
|
+
function ka(t, e) {
|
|
2395
2376
|
return `[${t}] ${e}`;
|
|
2396
2377
|
}
|
|
2397
2378
|
function ie(t, e, r, n) {
|
|
2398
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), i =
|
|
2379
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), i = Ra[t];
|
|
2399
2380
|
if (fe && fe({
|
|
2400
2381
|
timestamp: s,
|
|
2401
2382
|
level: t,
|
|
@@ -2404,7 +2385,7 @@ function ie(t, e, r, n) {
|
|
|
2404
2385
|
message: r,
|
|
2405
2386
|
args: n
|
|
2406
2387
|
}), $e <= t) {
|
|
2407
|
-
const o =
|
|
2388
|
+
const o = ka(e, r);
|
|
2408
2389
|
switch (t) {
|
|
2409
2390
|
case 0:
|
|
2410
2391
|
console.debug(o, ...n);
|
|
@@ -2437,8 +2418,8 @@ function L(t) {
|
|
|
2437
2418
|
}
|
|
2438
2419
|
};
|
|
2439
2420
|
}
|
|
2440
|
-
const oe = L("WebSocketTransport"),
|
|
2441
|
-
class
|
|
2421
|
+
const oe = L("WebSocketTransport"), Ua = 1e4;
|
|
2422
|
+
class Da {
|
|
2442
2423
|
ws = null;
|
|
2443
2424
|
keepaliveTimeout = null;
|
|
2444
2425
|
// Pre-allocated keepalive response message to avoid allocation per keepalive
|
|
@@ -2465,7 +2446,7 @@ class Ma {
|
|
|
2465
2446
|
clearTimeout(c), this.ws && (this.ws.onopen = null, this.ws.onerror = null, this.ws.onclose = null, this.ws.onmessage = null);
|
|
2466
2447
|
}, c = setTimeout(() => {
|
|
2467
2448
|
o || (o = !0, a(), this.ws?.close(), s(new W("WebSocket connection timeout")));
|
|
2468
|
-
},
|
|
2449
|
+
}, Ua);
|
|
2469
2450
|
this.ws.onopen = () => {
|
|
2470
2451
|
i = !0, clearTimeout(c), this.ws.send(r), this.resetKeepaliveTimeout(), o || (o = !0, n());
|
|
2471
2452
|
}, this.ws.onerror = () => {
|
|
@@ -2492,7 +2473,7 @@ class Ma {
|
|
|
2492
2473
|
* Get or create a cached keepalive response message.
|
|
2493
2474
|
*/
|
|
2494
2475
|
getKeepaliveResponse() {
|
|
2495
|
-
return this.keepaliveResponseMessage || (this.keepaliveResponseMessage =
|
|
2476
|
+
return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = pr(Er(), this.sessionId)), this.keepaliveResponseMessage;
|
|
2496
2477
|
}
|
|
2497
2478
|
handleProtocolMessage(e) {
|
|
2498
2479
|
try {
|
|
@@ -2507,18 +2488,18 @@ class Ma {
|
|
|
2507
2488
|
}
|
|
2508
2489
|
resetKeepaliveTimeout() {
|
|
2509
2490
|
this.clearKeepaliveTimeout(), this.keepaliveTimeout = setTimeout(() => {
|
|
2510
|
-
oe.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new
|
|
2491
|
+
oe.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new Ke(this.keepaliveTimeoutMs)), this.close();
|
|
2511
2492
|
}, this.keepaliveTimeoutMs);
|
|
2512
2493
|
}
|
|
2513
2494
|
clearKeepaliveTimeout() {
|
|
2514
2495
|
this.keepaliveTimeout && (clearTimeout(this.keepaliveTimeout), this.keepaliveTimeout = null);
|
|
2515
2496
|
}
|
|
2516
2497
|
}
|
|
2517
|
-
const B = L("WebTransportTransport"), Ze = 4,
|
|
2518
|
-
function
|
|
2498
|
+
const B = L("WebTransportTransport"), Ze = 4, Ma = 65536;
|
|
2499
|
+
function Tr() {
|
|
2519
2500
|
return typeof WebTransport < "u";
|
|
2520
2501
|
}
|
|
2521
|
-
class
|
|
2502
|
+
class Oa {
|
|
2522
2503
|
transport = null;
|
|
2523
2504
|
stream = null;
|
|
2524
2505
|
reader = null;
|
|
@@ -2526,7 +2507,7 @@ class La {
|
|
|
2526
2507
|
keepaliveTimeout = null;
|
|
2527
2508
|
readLoopActive = !1;
|
|
2528
2509
|
// Grow-only receive buffer with offset/length tracking to minimize allocations
|
|
2529
|
-
receiveBuffer = new Uint8Array(
|
|
2510
|
+
receiveBuffer = new Uint8Array(Ma);
|
|
2530
2511
|
receiveBufferOffset = 0;
|
|
2531
2512
|
receiveBufferLength = 0;
|
|
2532
2513
|
// Cached DataView to avoid allocation per message
|
|
@@ -2544,7 +2525,7 @@ class La {
|
|
|
2544
2525
|
return this.transport !== null && this.writer !== null;
|
|
2545
2526
|
}
|
|
2546
2527
|
async connect(e, r) {
|
|
2547
|
-
if (!
|
|
2528
|
+
if (!Tr())
|
|
2548
2529
|
throw new W("WebTransport is not supported in this browser");
|
|
2549
2530
|
try {
|
|
2550
2531
|
this.transport = new WebTransport(e), await this.transport.ready, B.debug(`Connected to WebTransport entrypoint: ${e}`), this.transport.closed.then(() => {
|
|
@@ -2611,7 +2592,7 @@ class La {
|
|
|
2611
2592
|
* Get or create a cached keepalive response message.
|
|
2612
2593
|
*/
|
|
2613
2594
|
getKeepaliveResponse() {
|
|
2614
|
-
return this.keepaliveResponseMessage || (this.keepaliveResponseMessage =
|
|
2595
|
+
return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = pr(Er(), this.sessionId)), this.keepaliveResponseMessage;
|
|
2615
2596
|
}
|
|
2616
2597
|
/**
|
|
2617
2598
|
* Process complete messages from the receive buffer.
|
|
@@ -2658,7 +2639,7 @@ class La {
|
|
|
2658
2639
|
*/
|
|
2659
2640
|
resetKeepaliveTimeout() {
|
|
2660
2641
|
this.clearKeepaliveTimeout(), this.keepaliveTimeout = setTimeout(() => {
|
|
2661
|
-
B.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new
|
|
2642
|
+
B.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new Ke(this.keepaliveTimeoutMs)), this.close();
|
|
2662
2643
|
}, this.keepaliveTimeoutMs);
|
|
2663
2644
|
}
|
|
2664
2645
|
/**
|
|
@@ -2681,7 +2662,7 @@ class La {
|
|
|
2681
2662
|
}
|
|
2682
2663
|
}
|
|
2683
2664
|
const ee = L("Channel");
|
|
2684
|
-
class
|
|
2665
|
+
class La {
|
|
2685
2666
|
state = "disconnected";
|
|
2686
2667
|
transport = null;
|
|
2687
2668
|
config;
|
|
@@ -2758,13 +2739,13 @@ class va {
|
|
|
2758
2739
|
switch (e.Type) {
|
|
2759
2740
|
case k.WebSocket:
|
|
2760
2741
|
case k.WebSocketProxy:
|
|
2761
|
-
this.transport = new
|
|
2742
|
+
this.transport = new Da(r);
|
|
2762
2743
|
break;
|
|
2763
2744
|
case k.WebTransport:
|
|
2764
2745
|
case k.WebTransportProxy:
|
|
2765
|
-
if (!
|
|
2746
|
+
if (!Tr())
|
|
2766
2747
|
throw new Error("WebTransport is not supported in this browser");
|
|
2767
|
-
this.transport = new
|
|
2748
|
+
this.transport = new Oa(r);
|
|
2768
2749
|
break;
|
|
2769
2750
|
default:
|
|
2770
2751
|
throw new Error(`Unsupported entrypoint type: ${k[e.Type]}`);
|
|
@@ -2796,7 +2777,7 @@ class va {
|
|
|
2796
2777
|
* Handle transport error.
|
|
2797
2778
|
*/
|
|
2798
2779
|
handleError(e) {
|
|
2799
|
-
ee.error("Channel error:", e), this.config.onError?.(e), e instanceof
|
|
2780
|
+
ee.error("Channel error:", e), this.config.onError?.(e), e instanceof Ke && this.handleClose("Keepalive timeout", !1);
|
|
2800
2781
|
}
|
|
2801
2782
|
/**
|
|
2802
2783
|
* Update and notify state change.
|
|
@@ -2805,8 +2786,8 @@ class va {
|
|
|
2805
2786
|
this.state !== e && (this.state = e, this.config.onStateChange?.(e));
|
|
2806
2787
|
}
|
|
2807
2788
|
}
|
|
2808
|
-
const
|
|
2809
|
-
class
|
|
2789
|
+
const x = L("ChannelManager");
|
|
2790
|
+
class va {
|
|
2810
2791
|
channels = /* @__PURE__ */ new Map();
|
|
2811
2792
|
// keyed by opcode group
|
|
2812
2793
|
activeType = null;
|
|
@@ -2856,7 +2837,7 @@ class Pa {
|
|
|
2856
2837
|
s.send(e);
|
|
2857
2838
|
return;
|
|
2858
2839
|
}
|
|
2859
|
-
|
|
2840
|
+
x.warn("No channel found for message");
|
|
2860
2841
|
}
|
|
2861
2842
|
/**
|
|
2862
2843
|
* Send a protocol message to all channels (for broadcast messages).
|
|
@@ -2887,10 +2868,10 @@ class Pa {
|
|
|
2887
2868
|
await this.connectAllChannels(i), this.config.endpointSelector?.rememberWorkingType(s), this.config.onRememberWorkingType?.(s), this.activeType = s, this.reconnectAttempts = 0, this.setState("connected");
|
|
2888
2869
|
return;
|
|
2889
2870
|
} catch (o) {
|
|
2890
|
-
|
|
2871
|
+
x.warn(`Failed to connect using ${k[s]}: ${o}`), this.disconnectAll();
|
|
2891
2872
|
}
|
|
2892
2873
|
}
|
|
2893
|
-
throw
|
|
2874
|
+
throw x.error("All endpoint types failed"), e || this.setState("offline"), new Error("Failed to connect using any endpoint type");
|
|
2894
2875
|
}
|
|
2895
2876
|
/**
|
|
2896
2877
|
* Connect all channels for a given endpoint type in parallel.
|
|
@@ -2908,7 +2889,7 @@ class Pa {
|
|
|
2908
2889
|
* Connect a single channel.
|
|
2909
2890
|
*/
|
|
2910
2891
|
async connectChannel(e) {
|
|
2911
|
-
const r = new
|
|
2892
|
+
const r = new La({
|
|
2912
2893
|
entrypoint: e,
|
|
2913
2894
|
sessionId: this.config.sessionId,
|
|
2914
2895
|
keepaliveTimeoutMs: this.config.keepaliveTimeoutMs,
|
|
@@ -2950,10 +2931,10 @@ class Pa {
|
|
|
2950
2931
|
handleChannelClose(e, r, n, s) {
|
|
2951
2932
|
if (!(this.state === "idle" || this.state === "stopped" || this.state === "offline")) {
|
|
2952
2933
|
if (n || s) {
|
|
2953
|
-
|
|
2934
|
+
x.debug("Channel closed by server"), this.shouldReconnect = !1, this.disconnectAll(), this.setState("stopped");
|
|
2954
2935
|
return;
|
|
2955
2936
|
}
|
|
2956
|
-
this.state === "connected" && (
|
|
2937
|
+
this.state === "connected" && (x.error("Channel closed unexpectedly, attempting reconnect"), this.disconnectAll(), this.attemptReconnect());
|
|
2957
2938
|
}
|
|
2958
2939
|
}
|
|
2959
2940
|
/**
|
|
@@ -2963,16 +2944,16 @@ class Pa {
|
|
|
2963
2944
|
if (!this.shouldReconnect)
|
|
2964
2945
|
return;
|
|
2965
2946
|
if (this.reconnectAttempts >= this.config.maxReconnectAttempts) {
|
|
2966
|
-
|
|
2947
|
+
x.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new ga(this.config.maxReconnectAttempts));
|
|
2967
2948
|
return;
|
|
2968
2949
|
}
|
|
2969
2950
|
this.setState("reconnecting"), this.reconnectAttempts++;
|
|
2970
2951
|
const e = this.config.reconnectBackoffMs * Math.pow(2, this.reconnectAttempts - 1);
|
|
2971
|
-
if (
|
|
2952
|
+
if (x.info(`Reconnecting in ${e}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), await mr(e, this.abortController?.signal), !!this.shouldReconnect)
|
|
2972
2953
|
try {
|
|
2973
2954
|
await this.connectInternal(!0);
|
|
2974
2955
|
} catch (r) {
|
|
2975
|
-
|
|
2956
|
+
x.error("Reconnect failed:", r), await this.attemptReconnect();
|
|
2976
2957
|
}
|
|
2977
2958
|
}
|
|
2978
2959
|
/**
|
|
@@ -2990,25 +2971,25 @@ class Pa {
|
|
|
2990
2971
|
this.state !== e && (this.state = e, this.config.onStateChange?.(e));
|
|
2991
2972
|
}
|
|
2992
2973
|
}
|
|
2993
|
-
const
|
|
2994
|
-
function
|
|
2974
|
+
const Pa = 5e3, Fa = 3e4, qe = 35e3, et = 500, tt = 6, Sr = 6e4, Re = "ikon_device_id";
|
|
2975
|
+
function Ye() {
|
|
2995
2976
|
if (typeof window > "u" || typeof localStorage > "u")
|
|
2996
2977
|
return crypto.randomUUID();
|
|
2997
2978
|
try {
|
|
2998
|
-
let t = localStorage.getItem(
|
|
2999
|
-
return t || (t = crypto.randomUUID(), localStorage.setItem(
|
|
2979
|
+
let t = localStorage.getItem(Re);
|
|
2980
|
+
return t || (t = crypto.randomUUID(), localStorage.setItem(Re, t)), t;
|
|
3000
2981
|
} catch {
|
|
3001
2982
|
return crypto.randomUUID();
|
|
3002
2983
|
}
|
|
3003
2984
|
}
|
|
3004
|
-
function
|
|
2985
|
+
function gl() {
|
|
3005
2986
|
if (!(typeof localStorage > "u"))
|
|
3006
2987
|
try {
|
|
3007
|
-
localStorage.removeItem(
|
|
2988
|
+
localStorage.removeItem(Re);
|
|
3008
2989
|
} catch {
|
|
3009
2990
|
}
|
|
3010
2991
|
}
|
|
3011
|
-
function
|
|
2992
|
+
function Cl(t) {
|
|
3012
2993
|
try {
|
|
3013
2994
|
const e = t.split(".");
|
|
3014
2995
|
return e.length !== 3 ? null : JSON.parse(atob(e[1])).id ?? null;
|
|
@@ -3016,26 +2997,26 @@ function gl(t) {
|
|
|
3016
2997
|
return null;
|
|
3017
2998
|
}
|
|
3018
2999
|
}
|
|
3019
|
-
const Ee = {},
|
|
3020
|
-
function
|
|
3021
|
-
return t === "development" ? pe :
|
|
3000
|
+
const Ee = {}, ke = "https://api.prod.ikon.live", pe = "https://api.dev.ikon.live", rt = "https://auth.ikonai.com", nt = "https://auth.dev.ikonai.com", bl = "https://auth.ikonai.com";
|
|
3001
|
+
function wr(t) {
|
|
3002
|
+
return t === "development" ? pe : ke;
|
|
3022
3003
|
}
|
|
3023
|
-
function
|
|
3004
|
+
function Rl() {
|
|
3024
3005
|
const t = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_URL : void 0;
|
|
3025
|
-
return t || (typeof window > "u" ?
|
|
3006
|
+
return t || (typeof window > "u" ? ke : !je() || window.location.hostname.includes(".dev.") ? pe : ke);
|
|
3026
3007
|
}
|
|
3027
|
-
function
|
|
3008
|
+
function kl() {
|
|
3028
3009
|
const t = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_TYPE : void 0;
|
|
3029
3010
|
if (t === "development" || t === "production")
|
|
3030
3011
|
return t;
|
|
3031
3012
|
const e = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_URL : void 0;
|
|
3032
|
-
return e ? e.includes(".dev.") ? "development" : "production" : typeof window > "u" ? "production" :
|
|
3013
|
+
return e ? e.includes(".dev.") ? "development" : "production" : typeof window > "u" ? "production" : je() ? window.location.hostname.includes(".dev.") ? "development" : "production" : "development";
|
|
3033
3014
|
}
|
|
3034
|
-
function
|
|
3015
|
+
function Ul() {
|
|
3035
3016
|
const t = typeof import.meta < "u" ? Ee?.VITE_IKON_AUTH_URL : void 0;
|
|
3036
|
-
return t || (typeof window > "u" ? rt : !
|
|
3017
|
+
return t || (typeof window > "u" ? rt : !je() || window.location.hostname.includes(".dev.") ? nt : rt);
|
|
3037
3018
|
}
|
|
3038
|
-
function
|
|
3019
|
+
function Ar() {
|
|
3039
3020
|
if (typeof window > "u")
|
|
3040
3021
|
return {};
|
|
3041
3022
|
const t = new URLSearchParams(window.location.search), e = {};
|
|
@@ -3043,8 +3024,8 @@ function Sr() {
|
|
|
3043
3024
|
e[r] = n;
|
|
3044
3025
|
return e;
|
|
3045
3026
|
}
|
|
3046
|
-
const
|
|
3047
|
-
function
|
|
3027
|
+
const Ba = ["ikon_token", "ikon_provider", "error"];
|
|
3028
|
+
function Dl() {
|
|
3048
3029
|
if (typeof window > "u")
|
|
3049
3030
|
return { parameters: {} };
|
|
3050
3031
|
const t = window.location.pathname;
|
|
@@ -3054,12 +3035,12 @@ function Ul() {
|
|
|
3054
3035
|
const s = t.match(/^\/c\/([^/]+)/);
|
|
3055
3036
|
if (s && (r = decodeURIComponent(s[1])), e && r)
|
|
3056
3037
|
throw new Error("URL cannot contain both /s/[sessionId] and /c/[channelKey]");
|
|
3057
|
-
const i =
|
|
3038
|
+
const i = Ar(), o = {};
|
|
3058
3039
|
for (const [a, c] of Object.entries(i))
|
|
3059
|
-
|
|
3040
|
+
Ba.includes(a) || (o[a] = c);
|
|
3060
3041
|
return { sessionId: e, channelKey: r, parameters: o };
|
|
3061
3042
|
}
|
|
3062
|
-
function
|
|
3043
|
+
function je() {
|
|
3063
3044
|
if (typeof window > "u") return !1;
|
|
3064
3045
|
const t = window.location.hostname;
|
|
3065
3046
|
if (t === "localhost" || t === "127.0.0.1" || t === "::1" || t.startsWith("10.") || t.startsWith("192.168."))
|
|
@@ -3071,8 +3052,8 @@ function Ye() {
|
|
|
3071
3052
|
}
|
|
3072
3053
|
return !0;
|
|
3073
3054
|
}
|
|
3074
|
-
const Ie = L("Authenticator"), j = S.GROUP_CORE | S.GROUP_KEEPALIVE | S.GROUP_EVENTS | S.GROUP_ACTIONS | S.GROUP_UI | S.GROUP_AUDIO | S.GROUP_VIDEO | S.GROUP_ANALYTICS, xa = 1e3,
|
|
3075
|
-
async function
|
|
3055
|
+
const Ie = L("Authenticator"), j = S.GROUP_CORE | S.GROUP_KEEPALIVE | S.GROUP_EVENTS | S.GROUP_ACTIONS | S.GROUP_UI | S.GROUP_AUDIO | S.GROUP_VIDEO | S.GROUP_ANALYTICS, xa = 1e3, Ga = 5e3;
|
|
3056
|
+
async function Va(t) {
|
|
3076
3057
|
try {
|
|
3077
3058
|
const e = await fetch(`${pe}/users/me`, {
|
|
3078
3059
|
credentials: "include",
|
|
@@ -3083,7 +3064,7 @@ async function Wa(t) {
|
|
|
3083
3064
|
return;
|
|
3084
3065
|
}
|
|
3085
3066
|
}
|
|
3086
|
-
function
|
|
3067
|
+
function yr(t, e, r) {
|
|
3087
3068
|
const n = {
|
|
3088
3069
|
method: "POST",
|
|
3089
3070
|
headers: {
|
|
@@ -3095,56 +3076,56 @@ function wr(t, e, r) {
|
|
|
3095
3076
|
};
|
|
3096
3077
|
return e || (n.credentials = "include"), n;
|
|
3097
3078
|
}
|
|
3098
|
-
async function
|
|
3079
|
+
async function Nr(t, e, r, n, s, i, o) {
|
|
3099
3080
|
const a = `${t}/rooms`, c = {
|
|
3100
3081
|
space: e,
|
|
3101
3082
|
...r ? { key: r } : {},
|
|
3102
3083
|
...n && Object.keys(n).length > 0 ? { params: n } : {},
|
|
3103
3084
|
...s ? { hash: s } : {}
|
|
3104
|
-
}, l = await fetch(a,
|
|
3085
|
+
}, l = await fetch(a, yr(c, i, o));
|
|
3105
3086
|
if (!l.ok) {
|
|
3106
3087
|
const d = await l.text().catch(() => "Unknown error");
|
|
3107
3088
|
throw new y(`Failed to request channel: ${l.status} ${d}`);
|
|
3108
3089
|
}
|
|
3109
3090
|
return await l.json();
|
|
3110
3091
|
}
|
|
3111
|
-
async function
|
|
3112
|
-
const s = `${t}/rooms/connect`, i = await fetch(s,
|
|
3092
|
+
async function Wa(t, e, r, n) {
|
|
3093
|
+
const s = `${t}/rooms/connect`, i = await fetch(s, yr(e, r, n));
|
|
3113
3094
|
if (!i.ok) {
|
|
3114
3095
|
const o = await i.text().catch(() => "Unknown error");
|
|
3115
3096
|
throw new y(`Backend connect failed: ${i.status} ${o}`);
|
|
3116
3097
|
}
|
|
3117
3098
|
return i.json();
|
|
3118
3099
|
}
|
|
3119
|
-
async function
|
|
3100
|
+
async function gr(t, e, r, n, s) {
|
|
3120
3101
|
const i = Date.now();
|
|
3121
3102
|
let o = xa;
|
|
3122
3103
|
for (; ; ) {
|
|
3123
3104
|
if (s?.aborted)
|
|
3124
3105
|
throw new y("Connection aborted");
|
|
3125
3106
|
if (Date.now() - i >= r)
|
|
3126
|
-
throw new
|
|
3127
|
-
const c = await
|
|
3107
|
+
throw new Ca(r);
|
|
3108
|
+
const c = await Wa(t, e, n, s), l = c.state?.toLowerCase();
|
|
3128
3109
|
if (l === "running")
|
|
3129
3110
|
return c;
|
|
3130
3111
|
if (l === "provisioning") {
|
|
3131
|
-
await
|
|
3112
|
+
await mr(o, s), o = Math.min(o * 1.5, Ga);
|
|
3132
3113
|
continue;
|
|
3133
3114
|
}
|
|
3134
3115
|
throw new y(`Unexpected channel state: ${c.state}`);
|
|
3135
3116
|
}
|
|
3136
3117
|
}
|
|
3137
|
-
async function
|
|
3118
|
+
async function Te(t, e) {
|
|
3138
3119
|
const r = await fetch(t, { signal: e });
|
|
3139
3120
|
if (!r.ok) {
|
|
3140
3121
|
const o = await r.text().catch(() => "Unknown error");
|
|
3141
3122
|
throw new y(`Failed to connect: ${r.status} ${o}`);
|
|
3142
3123
|
}
|
|
3143
3124
|
const n = await r.arrayBuffer(), s = new Uint8Array(n);
|
|
3144
|
-
return { authResponse: await
|
|
3125
|
+
return { authResponse: await Cs(s) };
|
|
3145
3126
|
}
|
|
3146
|
-
function
|
|
3147
|
-
return
|
|
3127
|
+
function Ha(t, e) {
|
|
3128
|
+
return ks({
|
|
3148
3129
|
ServerSessionId: "",
|
|
3149
3130
|
// Server will fill this in
|
|
3150
3131
|
ContextType: J.Browser,
|
|
@@ -3153,7 +3134,7 @@ function $a(t, e) {
|
|
|
3153
3134
|
IsInternal: !1,
|
|
3154
3135
|
Description: t.description ?? "Ikon SDK TypeScript",
|
|
3155
3136
|
UserId: e,
|
|
3156
|
-
DeviceId: t.deviceId ??
|
|
3137
|
+
DeviceId: t.deviceId ?? Ye(),
|
|
3157
3138
|
ProductId: t.productId ?? "ikon-sdk",
|
|
3158
3139
|
VersionId: t.versionId ?? "1.0.0",
|
|
3159
3140
|
InstallId: t.installId ?? "",
|
|
@@ -3198,13 +3179,13 @@ function Ka(t) {
|
|
|
3198
3179
|
Parameters: t.Parameters
|
|
3199
3180
|
};
|
|
3200
3181
|
}
|
|
3201
|
-
async function
|
|
3182
|
+
async function $a(t, e) {
|
|
3202
3183
|
const r = `https://${t.host}:${t.httpsPort}`;
|
|
3203
3184
|
Ie.debug(`Authenticating with local server: ${r}`);
|
|
3204
|
-
const s = { ...
|
|
3185
|
+
const s = { ...Ar(), ...t.parameters };
|
|
3205
3186
|
let i = t.userId;
|
|
3206
|
-
i || (i = await
|
|
3207
|
-
const o =
|
|
3187
|
+
i || (i = await Va(e), i || (i = "local", Ie.warn('Could not determine user ID. Using fallback "local". To fix: either provide userId in config, or log in to the Ikon portal at https://portal.dev.ikon.live')));
|
|
3188
|
+
const o = Ha({ ...t, parameters: s }, i), a = Ka(o), c = await fetch(`${r}/connect-token`, {
|
|
3208
3189
|
method: "POST",
|
|
3209
3190
|
headers: {
|
|
3210
3191
|
"Content-Type": "application/json"
|
|
@@ -3220,12 +3201,12 @@ async function Ya(t, e) {
|
|
|
3220
3201
|
if (!f)
|
|
3221
3202
|
throw new y("Server did not return a token");
|
|
3222
3203
|
const d = `${r}/connect?token=${encodeURIComponent(f)}`;
|
|
3223
|
-
return
|
|
3204
|
+
return Te(d, e);
|
|
3224
3205
|
}
|
|
3225
|
-
async function
|
|
3206
|
+
async function Ya(t, e) {
|
|
3226
3207
|
if (t.sessionId && t.channelKey)
|
|
3227
3208
|
throw new y("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
3228
|
-
const r =
|
|
3209
|
+
const r = wr(t.backendType);
|
|
3229
3210
|
Ie.debug(`Authenticating with cloud server: ${r}, space ID: ${t.spaceId}`);
|
|
3230
3211
|
const n = await fetch(`${r}/auth/api-key`, {
|
|
3231
3212
|
method: "POST",
|
|
@@ -3258,13 +3239,13 @@ async function ja(t, e) {
|
|
|
3258
3239
|
throw new y(`Failed to get or create profile: ${o.status} ${h}`);
|
|
3259
3240
|
}
|
|
3260
3241
|
const c = {
|
|
3261
|
-
code: (await
|
|
3242
|
+
code: (await Nr(r, t.spaceId, t.channelKey, t.parameters, t.sessionId, i, e)).code,
|
|
3262
3243
|
contextType: J.Plugin,
|
|
3263
3244
|
userType: t.userType ?? Z.Human,
|
|
3264
3245
|
clientType: t.clientType ?? X.DesktopWeb,
|
|
3265
3246
|
payloadType: Q.Teleport,
|
|
3266
3247
|
description: t.description ?? "Ikon SDK TypeScript",
|
|
3267
|
-
deviceId: t.deviceId ??
|
|
3248
|
+
deviceId: t.deviceId ?? Ye(),
|
|
3268
3249
|
productId: t.productId ?? "",
|
|
3269
3250
|
versionId: t.versionId ?? "",
|
|
3270
3251
|
installId: t.installId ?? "",
|
|
@@ -3276,16 +3257,16 @@ async function ja(t, e) {
|
|
|
3276
3257
|
launchParams: t.parameters,
|
|
3277
3258
|
hash: t.sessionId,
|
|
3278
3259
|
waitForRunning: !0
|
|
3279
|
-
}, l = t.provisioningTimeoutMs ??
|
|
3260
|
+
}, l = t.provisioningTimeoutMs ?? Sr, f = await gr(r, c, l, i, e);
|
|
3280
3261
|
if (!f.configuration?.url)
|
|
3281
3262
|
throw new y("Backend did not return a connect URL");
|
|
3282
3263
|
const d = f.configuration.url;
|
|
3283
|
-
return
|
|
3264
|
+
return Te(d, e);
|
|
3284
3265
|
}
|
|
3285
|
-
async function
|
|
3266
|
+
async function ja(t, e) {
|
|
3286
3267
|
if (t.sessionId && t.channelKey)
|
|
3287
3268
|
throw new y("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
3288
|
-
const r =
|
|
3269
|
+
const r = wr(t.backendType), n = t.token;
|
|
3289
3270
|
Ie.debug(`Authenticating with session token to: ${r}, space ID: ${t.spaceId}`);
|
|
3290
3271
|
const s = await fetch(`${r}/profiles/me?space=${encodeURIComponent(t.spaceId)}`, {
|
|
3291
3272
|
method: "GET",
|
|
@@ -3299,13 +3280,13 @@ async function za(t, e) {
|
|
|
3299
3280
|
throw new y(`Failed to get or create profile: ${s.status} ${f}`);
|
|
3300
3281
|
}
|
|
3301
3282
|
const o = {
|
|
3302
|
-
code: (await
|
|
3283
|
+
code: (await Nr(r, t.spaceId, t.channelKey, t.parameters, t.sessionId, n, e)).code,
|
|
3303
3284
|
contextType: J.Browser,
|
|
3304
3285
|
userType: Z.Human,
|
|
3305
3286
|
clientType: X.DesktopWeb,
|
|
3306
3287
|
payloadType: Q.Teleport,
|
|
3307
3288
|
description: t.description ?? "Ikon SDK TypeScript",
|
|
3308
|
-
deviceId: t.deviceId ??
|
|
3289
|
+
deviceId: t.deviceId ?? Ye(),
|
|
3309
3290
|
productId: t.productId ?? "",
|
|
3310
3291
|
versionId: t.versionId ?? "",
|
|
3311
3292
|
installId: t.installId ?? "",
|
|
@@ -3317,28 +3298,28 @@ async function za(t, e) {
|
|
|
3317
3298
|
launchParams: t.parameters,
|
|
3318
3299
|
hash: t.sessionId,
|
|
3319
3300
|
waitForRunning: !0
|
|
3320
|
-
}, a = t.provisioningTimeoutMs ??
|
|
3301
|
+
}, a = t.provisioningTimeoutMs ?? Sr, c = await gr(r, o, a, n, e);
|
|
3321
3302
|
if (!c.configuration?.url)
|
|
3322
3303
|
throw new y("Backend did not return a connect URL");
|
|
3323
3304
|
const l = c.configuration.url;
|
|
3324
|
-
return
|
|
3305
|
+
return Te(l, e);
|
|
3325
3306
|
}
|
|
3326
|
-
const
|
|
3327
|
-
function
|
|
3307
|
+
const Cr = "ikon.theme", Ue = "ikon.theme-user", za = "ikon.theme-change";
|
|
3308
|
+
function br(t) {
|
|
3328
3309
|
typeof document < "u" && document.documentElement && document.documentElement.setAttribute("data-theme", t);
|
|
3329
3310
|
}
|
|
3330
|
-
const
|
|
3311
|
+
const Xa = {
|
|
3331
3312
|
name: "ikon.client.getTheme",
|
|
3332
3313
|
description: "Get the currently selected client theme",
|
|
3333
3314
|
returnType: { kind: "string", nullable: !0 }
|
|
3334
3315
|
};
|
|
3335
|
-
function
|
|
3316
|
+
function Ja() {
|
|
3336
3317
|
if (typeof window > "u" || !window.localStorage)
|
|
3337
3318
|
return null;
|
|
3338
|
-
const t = window.localStorage.getItem(
|
|
3339
|
-
return
|
|
3319
|
+
const t = window.localStorage.getItem(Ue) ?? window.localStorage.getItem(Cr) ?? "light";
|
|
3320
|
+
return br(t), t;
|
|
3340
3321
|
}
|
|
3341
|
-
const
|
|
3322
|
+
const Qa = {
|
|
3342
3323
|
name: "ikon.client.setTheme",
|
|
3343
3324
|
description: "Update the client UI theme",
|
|
3344
3325
|
returnType: { kind: "boolean" },
|
|
@@ -3347,49 +3328,49 @@ const Za = {
|
|
|
3347
3328
|
{ name: "persist", type: { kind: "boolean", nullable: !0 }, description: "Whether to persist as user preference" }
|
|
3348
3329
|
]
|
|
3349
3330
|
};
|
|
3350
|
-
function
|
|
3331
|
+
function Za(t, e) {
|
|
3351
3332
|
if (typeof window > "u" || !window.localStorage || typeof t != "string")
|
|
3352
3333
|
return !1;
|
|
3353
3334
|
const r = t.trim().toLowerCase();
|
|
3354
3335
|
if (!r)
|
|
3355
3336
|
return !1;
|
|
3356
3337
|
const n = e === void 0 ? !0 : !!e, s = window.localStorage;
|
|
3357
|
-
n ? s.setItem(
|
|
3338
|
+
n ? s.setItem(Ue, r) : s.removeItem(Ue), s.setItem(Cr, r);
|
|
3358
3339
|
try {
|
|
3359
|
-
window.dispatchEvent(new CustomEvent(
|
|
3340
|
+
window.dispatchEvent(new CustomEvent(za, { detail: { mode: r } }));
|
|
3360
3341
|
} catch {
|
|
3361
3342
|
}
|
|
3362
|
-
return
|
|
3343
|
+
return br(r), !0;
|
|
3363
3344
|
}
|
|
3364
|
-
const
|
|
3345
|
+
const qa = {
|
|
3365
3346
|
name: "ikon.client.getLanguage",
|
|
3366
3347
|
description: "Get the browser language preference",
|
|
3367
3348
|
returnType: { kind: "string" }
|
|
3368
3349
|
};
|
|
3369
|
-
function
|
|
3350
|
+
function ec() {
|
|
3370
3351
|
return typeof navigator > "u" ? "en-US" : navigator.language || "en-US";
|
|
3371
3352
|
}
|
|
3372
|
-
const
|
|
3353
|
+
const tc = {
|
|
3373
3354
|
name: "ikon.client.getTimezone",
|
|
3374
3355
|
description: "Get the browser timezone (IANA format)",
|
|
3375
3356
|
returnType: { kind: "string" }
|
|
3376
3357
|
};
|
|
3377
|
-
function
|
|
3358
|
+
function rc() {
|
|
3378
3359
|
try {
|
|
3379
3360
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
3380
3361
|
} catch {
|
|
3381
3362
|
return "UTC";
|
|
3382
3363
|
}
|
|
3383
3364
|
}
|
|
3384
|
-
const
|
|
3365
|
+
const nc = {
|
|
3385
3366
|
name: "ikon.client.getUrl",
|
|
3386
3367
|
description: "Get the current browser URL path and query string",
|
|
3387
3368
|
returnType: { kind: "string", nullable: !0 }
|
|
3388
3369
|
};
|
|
3389
|
-
function
|
|
3370
|
+
function sc() {
|
|
3390
3371
|
return typeof window > "u" ? null : window.location.pathname + window.location.search;
|
|
3391
3372
|
}
|
|
3392
|
-
const
|
|
3373
|
+
const ic = {
|
|
3393
3374
|
name: "ikon.client.setUrl",
|
|
3394
3375
|
description: "Update the browser URL without triggering a page reload",
|
|
3395
3376
|
returnType: { kind: "boolean" },
|
|
@@ -3398,7 +3379,7 @@ const oc = {
|
|
|
3398
3379
|
{ name: "replace", type: { kind: "boolean", nullable: !0 }, description: "If true, replaces current history entry instead of adding new one" }
|
|
3399
3380
|
]
|
|
3400
3381
|
};
|
|
3401
|
-
function
|
|
3382
|
+
function oc(t, e) {
|
|
3402
3383
|
if (typeof window > "u" || !window.history || typeof t != "string")
|
|
3403
3384
|
return !1;
|
|
3404
3385
|
const r = t.trim();
|
|
@@ -3410,13 +3391,13 @@ function ac(t, e) {
|
|
|
3410
3391
|
return !1;
|
|
3411
3392
|
}
|
|
3412
3393
|
}
|
|
3413
|
-
const
|
|
3394
|
+
const ac = {
|
|
3414
3395
|
name: "ikon.client.vibrate",
|
|
3415
3396
|
description: "Trigger haptic feedback on supported devices",
|
|
3416
3397
|
returnType: { kind: "boolean" },
|
|
3417
3398
|
parameters: [{ name: "pattern", type: { kind: "string" }, description: 'Duration in ms, or comma-separated pattern (e.g., "200" or "100,50,100")' }]
|
|
3418
3399
|
};
|
|
3419
|
-
function
|
|
3400
|
+
function cc(t) {
|
|
3420
3401
|
if (typeof navigator > "u" || !navigator.vibrate || typeof t != "string")
|
|
3421
3402
|
return !1;
|
|
3422
3403
|
try {
|
|
@@ -3427,13 +3408,13 @@ function lc(t) {
|
|
|
3427
3408
|
}
|
|
3428
3409
|
}
|
|
3429
3410
|
let te = null;
|
|
3430
|
-
const
|
|
3411
|
+
const lc = {
|
|
3431
3412
|
name: "ikon.client.keepScreenAwake",
|
|
3432
3413
|
description: "Prevent or allow the screen to sleep",
|
|
3433
3414
|
returnType: { kind: "boolean" },
|
|
3434
3415
|
parameters: [{ name: "enabled", type: { kind: "boolean" }, description: "Whether to keep the screen awake" }]
|
|
3435
3416
|
};
|
|
3436
|
-
async function
|
|
3417
|
+
async function uc(t) {
|
|
3437
3418
|
if (typeof navigator > "u" || !("wakeLock" in navigator))
|
|
3438
3419
|
return !1;
|
|
3439
3420
|
try {
|
|
@@ -3442,15 +3423,15 @@ async function hc(t) {
|
|
|
3442
3423
|
return !1;
|
|
3443
3424
|
}
|
|
3444
3425
|
}
|
|
3445
|
-
const
|
|
3426
|
+
const hc = {
|
|
3446
3427
|
name: "ikon.client.getVisibility",
|
|
3447
3428
|
description: "Get the current page visibility state",
|
|
3448
3429
|
returnType: { kind: "string", nullable: !0 }
|
|
3449
3430
|
};
|
|
3450
|
-
function
|
|
3431
|
+
function dc() {
|
|
3451
3432
|
return typeof document > "u" ? null : document.visibilityState || null;
|
|
3452
3433
|
}
|
|
3453
|
-
const
|
|
3434
|
+
const fc = {
|
|
3454
3435
|
name: "ikon.client.scrollTo",
|
|
3455
3436
|
description: "Scroll the page to a specific position",
|
|
3456
3437
|
returnType: { kind: "boolean" },
|
|
@@ -3460,7 +3441,7 @@ const Ec = {
|
|
|
3460
3441
|
{ name: "smooth", type: { kind: "boolean", nullable: !0 }, description: "Whether to animate the scroll" }
|
|
3461
3442
|
]
|
|
3462
3443
|
};
|
|
3463
|
-
function
|
|
3444
|
+
function Ec(t, e, r) {
|
|
3464
3445
|
if (typeof window > "u" || typeof t != "number" || typeof e != "number")
|
|
3465
3446
|
return !1;
|
|
3466
3447
|
try {
|
|
@@ -3473,12 +3454,12 @@ function pc(t, e, r) {
|
|
|
3473
3454
|
return !1;
|
|
3474
3455
|
}
|
|
3475
3456
|
}
|
|
3476
|
-
const
|
|
3457
|
+
const pc = {
|
|
3477
3458
|
name: "ikon.client.getBatteryLevel",
|
|
3478
3459
|
description: "Get the current battery level (0-100)",
|
|
3479
3460
|
returnType: { kind: "number", nullable: !0 }
|
|
3480
3461
|
};
|
|
3481
|
-
async function
|
|
3462
|
+
async function Ic() {
|
|
3482
3463
|
if (typeof navigator > "u" || !("getBattery" in navigator))
|
|
3483
3464
|
return null;
|
|
3484
3465
|
try {
|
|
@@ -3488,39 +3469,39 @@ async function mc() {
|
|
|
3488
3469
|
return null;
|
|
3489
3470
|
}
|
|
3490
3471
|
}
|
|
3491
|
-
const
|
|
3472
|
+
const mc = {
|
|
3492
3473
|
name: "ikon.client.getNetworkType",
|
|
3493
3474
|
description: "Get the current network connection type",
|
|
3494
3475
|
returnType: { kind: "string", nullable: !0 }
|
|
3495
3476
|
};
|
|
3496
|
-
function
|
|
3477
|
+
function _c() {
|
|
3497
3478
|
if (typeof navigator > "u")
|
|
3498
3479
|
return null;
|
|
3499
3480
|
const t = navigator.connection;
|
|
3500
3481
|
return t && (t.effectiveType || t.type) || null;
|
|
3501
3482
|
}
|
|
3502
|
-
const
|
|
3503
|
-
{ definition:
|
|
3504
|
-
{ definition:
|
|
3505
|
-
{ definition:
|
|
3506
|
-
{ definition:
|
|
3507
|
-
{ definition:
|
|
3508
|
-
{ definition:
|
|
3509
|
-
{ definition:
|
|
3510
|
-
{ definition:
|
|
3511
|
-
{ definition:
|
|
3512
|
-
{ definition:
|
|
3513
|
-
{ definition:
|
|
3514
|
-
{ definition:
|
|
3483
|
+
const Tc = [
|
|
3484
|
+
{ definition: Xa, handler: Ja },
|
|
3485
|
+
{ definition: Qa, handler: Za },
|
|
3486
|
+
{ definition: qa, handler: ec },
|
|
3487
|
+
{ definition: tc, handler: rc },
|
|
3488
|
+
{ definition: nc, handler: sc },
|
|
3489
|
+
{ definition: ic, handler: oc },
|
|
3490
|
+
{ definition: ac, handler: cc },
|
|
3491
|
+
{ definition: lc, handler: uc },
|
|
3492
|
+
{ definition: hc, handler: dc },
|
|
3493
|
+
{ definition: fc, handler: Ec },
|
|
3494
|
+
{ definition: pc, handler: Ic },
|
|
3495
|
+
{ definition: mc, handler: _c }
|
|
3515
3496
|
];
|
|
3516
|
-
function
|
|
3517
|
-
const e =
|
|
3497
|
+
function Sc(t) {
|
|
3498
|
+
const e = Tc.map(({ definition: r, handler: n }) => t.register(r, n));
|
|
3518
3499
|
return () => e.forEach((r) => r());
|
|
3519
3500
|
}
|
|
3520
3501
|
function st() {
|
|
3521
3502
|
return typeof window < "u" && typeof navigator < "u";
|
|
3522
3503
|
}
|
|
3523
|
-
const
|
|
3504
|
+
const wc = new Uint8Array(0);
|
|
3524
3505
|
function me(t) {
|
|
3525
3506
|
switch (t.kind) {
|
|
3526
3507
|
case "array":
|
|
@@ -3570,7 +3551,7 @@ function it(t, e) {
|
|
|
3570
3551
|
}
|
|
3571
3552
|
return r;
|
|
3572
3553
|
}
|
|
3573
|
-
function
|
|
3554
|
+
function Rr(t, e) {
|
|
3574
3555
|
if (t === void 0)
|
|
3575
3556
|
return "null";
|
|
3576
3557
|
if (t === null) {
|
|
@@ -3580,9 +3561,9 @@ function Cr(t, e) {
|
|
|
3580
3561
|
}
|
|
3581
3562
|
return JSON.stringify(t);
|
|
3582
3563
|
}
|
|
3583
|
-
function
|
|
3564
|
+
function Ac(t, e) {
|
|
3584
3565
|
const r = (t.parameters ?? []).map((i) => {
|
|
3585
|
-
const o = me(i.type), a = Object.prototype.hasOwnProperty.call(i, "defaultValue"), c = a ?
|
|
3566
|
+
const o = me(i.type), a = Object.prototype.hasOwnProperty.call(i, "defaultValue"), c = a ? Rr(i.defaultValue, o) : "";
|
|
3586
3567
|
return {
|
|
3587
3568
|
name: i.name,
|
|
3588
3569
|
descriptor: o,
|
|
@@ -3607,7 +3588,7 @@ function yc(t, e) {
|
|
|
3607
3588
|
TypeName: re(i.descriptor),
|
|
3608
3589
|
HasDefaultValue: i.hasDefaultValue,
|
|
3609
3590
|
DefaultValueJson: i.defaultValueJson,
|
|
3610
|
-
DefaultValueData:
|
|
3591
|
+
DefaultValueData: wc,
|
|
3611
3592
|
IsEnumerable: !1,
|
|
3612
3593
|
EnumerableItemTypeName: "",
|
|
3613
3594
|
Description: i.description ?? ""
|
|
@@ -3621,11 +3602,11 @@ function yc(t, e) {
|
|
|
3621
3602
|
returnType: n
|
|
3622
3603
|
};
|
|
3623
3604
|
}
|
|
3624
|
-
const
|
|
3625
|
-
function
|
|
3605
|
+
const we = L("FunctionRegistry"), yc = new Uint8Array(0);
|
|
3606
|
+
function Nc(t) {
|
|
3626
3607
|
return !t || typeof t != "object" ? !1 : t.data instanceof Uint8Array;
|
|
3627
3608
|
}
|
|
3628
|
-
class
|
|
3609
|
+
class gc {
|
|
3629
3610
|
functions = /* @__PURE__ */ new Map();
|
|
3630
3611
|
config = null;
|
|
3631
3612
|
isConnected = !1;
|
|
@@ -3647,7 +3628,7 @@ class Cc {
|
|
|
3647
3628
|
* If already connected, sends registration to server immediately.
|
|
3648
3629
|
*/
|
|
3649
3630
|
register(e, r) {
|
|
3650
|
-
const n =
|
|
3631
|
+
const n = Ac(e, r);
|
|
3651
3632
|
return this.functions.set(e.name, n), this.isConnected && this.config && this.sendRegistration(n), () => this.unregister(e.name);
|
|
3652
3633
|
}
|
|
3653
3634
|
/**
|
|
@@ -3682,7 +3663,7 @@ class Cc {
|
|
|
3682
3663
|
if (r === S.ACTION_FUNCTION_CALL) {
|
|
3683
3664
|
const n = ne(e);
|
|
3684
3665
|
return this.handleFunctionCall(e, n.senderId).catch((s) => {
|
|
3685
|
-
|
|
3666
|
+
we.error("Failed to handle function call:", s);
|
|
3686
3667
|
}), !0;
|
|
3687
3668
|
}
|
|
3688
3669
|
return !1;
|
|
@@ -3694,7 +3675,7 @@ class Cc {
|
|
|
3694
3675
|
sendAllRegistrations() {
|
|
3695
3676
|
if (!this.config || this.functions.size === 0)
|
|
3696
3677
|
return;
|
|
3697
|
-
const e = Array.from(this.functions.values()).map((s) => s.registerPayload), r =
|
|
3678
|
+
const e = Array.from(this.functions.values()).map((s) => s.registerPayload), r = Ui({ Functions: e }), n = Li(r, this.config.sessionId);
|
|
3698
3679
|
this.config.sendProtocolMessage(n);
|
|
3699
3680
|
}
|
|
3700
3681
|
/**
|
|
@@ -3703,16 +3684,16 @@ class Cc {
|
|
|
3703
3684
|
sendRegistration(e) {
|
|
3704
3685
|
if (!this.config)
|
|
3705
3686
|
return;
|
|
3706
|
-
const r =
|
|
3687
|
+
const r = wi(e.registerPayload, this.config.sessionId);
|
|
3707
3688
|
this.config.sendProtocolMessage(r);
|
|
3708
3689
|
}
|
|
3709
3690
|
/**
|
|
3710
3691
|
* Handle an incoming function call.
|
|
3711
3692
|
*/
|
|
3712
3693
|
async handleFunctionCall(e, r) {
|
|
3713
|
-
const n = await
|
|
3694
|
+
const n = await Qs(e), s = this.functions.get(n.FunctionName);
|
|
3714
3695
|
if (!s) {
|
|
3715
|
-
|
|
3696
|
+
we.warn(`Received call for unknown function: ${n.FunctionName}`), this.sendError(n.CallId, n.InstanceId, r, new Error(`Unknown function: ${n.FunctionName}`));
|
|
3716
3697
|
return;
|
|
3717
3698
|
}
|
|
3718
3699
|
this.sendAck(n.CallId, n.InstanceId, r), this.executeFunction(s, n, r);
|
|
@@ -3728,12 +3709,12 @@ class Cc {
|
|
|
3728
3709
|
h === void 0 || h === "" ? f.hasDefaultValue ? s.push(it(f.defaultValueJson, f.descriptor)) : s.push(void 0) : s.push(it(h, f.descriptor));
|
|
3729
3710
|
}
|
|
3730
3711
|
const i = await e.handler(...s);
|
|
3731
|
-
let o = i, a =
|
|
3732
|
-
|
|
3733
|
-
const c =
|
|
3712
|
+
let o = i, a = yc;
|
|
3713
|
+
Nc(i) && (o = i.value, a = new Uint8Array(i.data));
|
|
3714
|
+
const c = Rr(o, e.returnType);
|
|
3734
3715
|
this.sendResult(r.CallId, r.InstanceId, n, e, c, a);
|
|
3735
3716
|
} catch (s) {
|
|
3736
|
-
|
|
3717
|
+
we.error(`Function ${r.FunctionName} execution failed:`, s), this.sendError(r.CallId, r.InstanceId, n, s instanceof Error ? s : new Error(String(s)));
|
|
3737
3718
|
}
|
|
3738
3719
|
}
|
|
3739
3720
|
/**
|
|
@@ -3742,7 +3723,7 @@ class Cc {
|
|
|
3742
3723
|
sendAck(e, r, n) {
|
|
3743
3724
|
if (!this.config)
|
|
3744
3725
|
return;
|
|
3745
|
-
const s =
|
|
3726
|
+
const s = Bs(Ls({ CallId: e, InstanceId: r }), this.config.sessionId, { targetIds: [n] });
|
|
3746
3727
|
this.config.sendProtocolMessage(s);
|
|
3747
3728
|
}
|
|
3748
3729
|
/**
|
|
@@ -3751,8 +3732,8 @@ class Cc {
|
|
|
3751
3732
|
sendResult(e, r, n, s, i, o) {
|
|
3752
3733
|
if (!this.config)
|
|
3753
3734
|
return;
|
|
3754
|
-
const a =
|
|
3755
|
-
|
|
3735
|
+
const a = $i(
|
|
3736
|
+
Vi({
|
|
3756
3737
|
CallId: e,
|
|
3757
3738
|
InstanceId: r,
|
|
3758
3739
|
ResultTypeName: re(s.returnType),
|
|
@@ -3770,8 +3751,8 @@ class Cc {
|
|
|
3770
3751
|
sendError(e, r, n, s) {
|
|
3771
3752
|
if (!this.config)
|
|
3772
3753
|
return;
|
|
3773
|
-
const i =
|
|
3774
|
-
|
|
3754
|
+
const i = pi(
|
|
3755
|
+
hi({
|
|
3775
3756
|
CallId: e,
|
|
3776
3757
|
InstanceId: r,
|
|
3777
3758
|
ErrorMessage: s.message,
|
|
@@ -3784,10 +3765,10 @@ class Cc {
|
|
|
3784
3765
|
this.config.sendProtocolMessage(i);
|
|
3785
3766
|
}
|
|
3786
3767
|
}
|
|
3787
|
-
function
|
|
3768
|
+
function Cc(t, e) {
|
|
3788
3769
|
return { value: t, data: e };
|
|
3789
3770
|
}
|
|
3790
|
-
function
|
|
3771
|
+
function Ae(t) {
|
|
3791
3772
|
if (!(typeof t != "string" || !t.trim()))
|
|
3792
3773
|
try {
|
|
3793
3774
|
return JSON.parse(t);
|
|
@@ -3795,55 +3776,55 @@ function we(t) {
|
|
|
3795
3776
|
return;
|
|
3796
3777
|
}
|
|
3797
3778
|
}
|
|
3798
|
-
const
|
|
3779
|
+
const Se = {
|
|
3799
3780
|
StartVideoCapture: "ikon.client.startVideoCapture",
|
|
3800
3781
|
StartAudioCapture: "ikon.client.startAudioCapture",
|
|
3801
3782
|
StopCapture: "ikon.client.stopCapture",
|
|
3802
3783
|
CaptureImage: "ikon.client.captureImage"
|
|
3803
|
-
},
|
|
3804
|
-
name:
|
|
3784
|
+
}, bc = {
|
|
3785
|
+
name: Se.StartVideoCapture,
|
|
3805
3786
|
description: "Start camera or screen capture and stream video frames to the server",
|
|
3806
3787
|
returnType: { kind: "string" },
|
|
3807
3788
|
parameters: [
|
|
3808
3789
|
{ name: "source", type: { kind: "string", nullable: !0 }, description: "camera or screen" },
|
|
3809
3790
|
{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }
|
|
3810
3791
|
]
|
|
3811
|
-
},
|
|
3812
|
-
name:
|
|
3792
|
+
}, Rc = {
|
|
3793
|
+
name: Se.StartAudioCapture,
|
|
3813
3794
|
description: "Start microphone capture and stream audio frames to the server",
|
|
3814
3795
|
returnType: { kind: "string" },
|
|
3815
3796
|
parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
|
|
3816
|
-
},
|
|
3817
|
-
name:
|
|
3797
|
+
}, kc = {
|
|
3798
|
+
name: Se.StopCapture,
|
|
3818
3799
|
description: "Stop a previously started capture by captureId",
|
|
3819
3800
|
returnType: { kind: "boolean" },
|
|
3820
3801
|
parameters: [{ name: "captureId", type: { kind: "string" }, description: "Capture ID to stop" }]
|
|
3821
|
-
},
|
|
3822
|
-
name:
|
|
3802
|
+
}, Uc = {
|
|
3803
|
+
name: Se.CaptureImage,
|
|
3823
3804
|
description: "Capture a single image from the camera and return metadata (JSON) plus binary image data",
|
|
3824
3805
|
returnType: { kind: "string" },
|
|
3825
3806
|
parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
|
|
3826
3807
|
};
|
|
3827
|
-
function
|
|
3808
|
+
function Dc(t, e) {
|
|
3828
3809
|
const r = [];
|
|
3829
3810
|
return r.push(
|
|
3830
|
-
t.register(
|
|
3811
|
+
t.register(bc, async (n, s) => {
|
|
3831
3812
|
const i = e.mediaCapture;
|
|
3832
3813
|
if (!i)
|
|
3833
3814
|
throw new Error("Media capture is not available in this environment");
|
|
3834
|
-
const o =
|
|
3815
|
+
const o = Ae(s);
|
|
3835
3816
|
return ((typeof n == "string" && n.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 })).captureId;
|
|
3836
3817
|
})
|
|
3837
3818
|
), r.push(
|
|
3838
|
-
t.register(
|
|
3819
|
+
t.register(Rc, async (n) => {
|
|
3839
3820
|
const s = e.mediaCapture;
|
|
3840
3821
|
if (!s)
|
|
3841
3822
|
throw new Error("Media capture is not available in this environment");
|
|
3842
|
-
const i =
|
|
3823
|
+
const i = Ae(n);
|
|
3843
3824
|
return (await s.audio.startMic({ userGesture: !1, options: i, constraints: i?.constraints })).captureId;
|
|
3844
3825
|
})
|
|
3845
3826
|
), r.push(
|
|
3846
|
-
t.register(
|
|
3827
|
+
t.register(kc, async (n) => {
|
|
3847
3828
|
const s = e.mediaCapture;
|
|
3848
3829
|
if (!s || typeof n != "string" || !n.trim())
|
|
3849
3830
|
return !1;
|
|
@@ -3851,11 +3832,11 @@ function Mc(t, e) {
|
|
|
3851
3832
|
return i || o;
|
|
3852
3833
|
})
|
|
3853
3834
|
), r.push(
|
|
3854
|
-
t.register(
|
|
3835
|
+
t.register(Uc, async (n) => {
|
|
3855
3836
|
const s = e.mediaCapture;
|
|
3856
3837
|
if (!s)
|
|
3857
3838
|
throw new Error("Media capture is not available in this environment");
|
|
3858
|
-
const i =
|
|
3839
|
+
const i = Ae(n) ?? {}, o = await s.image.captureFromCamera({
|
|
3859
3840
|
userGesture: !1,
|
|
3860
3841
|
constraints: i.constraints,
|
|
3861
3842
|
mime: i.mime,
|
|
@@ -3863,21 +3844,21 @@ function Mc(t, e) {
|
|
|
3863
3844
|
width: i.width,
|
|
3864
3845
|
height: i.height
|
|
3865
3846
|
}), a = JSON.stringify({ mime: o.mime, width: o.width, height: o.height });
|
|
3866
|
-
return
|
|
3847
|
+
return Cc(a, o.data);
|
|
3867
3848
|
})
|
|
3868
3849
|
), () => {
|
|
3869
3850
|
for (const n of r)
|
|
3870
3851
|
n();
|
|
3871
3852
|
};
|
|
3872
3853
|
}
|
|
3873
|
-
const
|
|
3854
|
+
const kr = () => {
|
|
3874
3855
|
if (typeof navigator > "u")
|
|
3875
3856
|
return !1;
|
|
3876
3857
|
const t = navigator.userAgent, e = /iPad|iPhone|iPod/.test(t), r = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
|
|
3877
3858
|
return e || r;
|
|
3878
|
-
},
|
|
3859
|
+
}, Mc = globalThis;
|
|
3879
3860
|
function le() {
|
|
3880
|
-
if (typeof SharedArrayBuffer > "u" || typeof Atomics > "u" ||
|
|
3861
|
+
if (typeof SharedArrayBuffer > "u" || typeof Atomics > "u" || Mc.crossOriginIsolated === !1)
|
|
3881
3862
|
return !1;
|
|
3882
3863
|
try {
|
|
3883
3864
|
new SharedArrayBuffer(1);
|
|
@@ -3886,10 +3867,10 @@ function le() {
|
|
|
3886
3867
|
}
|
|
3887
3868
|
return !0;
|
|
3888
3869
|
}
|
|
3889
|
-
function
|
|
3870
|
+
function Ur(t) {
|
|
3890
3871
|
return typeof AudioWorkletNode != "function" ? !1 : typeof t.audioWorklet?.addModule == "function";
|
|
3891
3872
|
}
|
|
3892
|
-
function
|
|
3873
|
+
function Oc(t) {
|
|
3893
3874
|
return new Worker(
|
|
3894
3875
|
"" + new URL("assets/audio-playback-worker-DPybcm1k.js", import.meta.url).href,
|
|
3895
3876
|
{
|
|
@@ -3898,7 +3879,7 @@ function Lc(t) {
|
|
|
3898
3879
|
}
|
|
3899
3880
|
);
|
|
3900
3881
|
}
|
|
3901
|
-
const ae = 48e3, R = 2,
|
|
3882
|
+
const ae = 48e3, R = 2, Dr = 1500, ot = 512, at = "playback", Lc = 120, vc = 300, Pc = 4, Fc = 200, Bc = 100, xc = 8e3, Gc = 10, Mr = 100, De = 50, Or = 128, Vc = 20, Wc = !0, G = 1500, Hc = -20, Kc = -100, $c = 200, g = L("IkonAudioPlayback"), Yc = () => {
|
|
3902
3883
|
if (typeof navigator > "u" || typeof window > "u")
|
|
3903
3884
|
return !1;
|
|
3904
3885
|
const t = navigator.userAgent, e = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t), r = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
|
|
@@ -3907,22 +3888,22 @@ const ae = 48e3, R = 2, kr = 1500, ot = 512, at = "playback", vc = 120, Pc = 300
|
|
|
3907
3888
|
enabled: !1,
|
|
3908
3889
|
statusIntervalMs: 1e3
|
|
3909
3890
|
};
|
|
3910
|
-
function
|
|
3891
|
+
function $(t) {
|
|
3911
3892
|
return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
|
|
3912
3893
|
}
|
|
3913
|
-
function
|
|
3894
|
+
function jc(t) {
|
|
3914
3895
|
return `
|
|
3915
3896
|
// Audio buffer constants
|
|
3916
3897
|
const OUTPUT_SAMPLE_RATE_HZ = ${t.outputSampleRateHz};
|
|
3917
3898
|
const DEFAULT_FRAME_SAMPLES_PER_CHANNEL = Math.max(1, Math.round(OUTPUT_SAMPLE_RATE_HZ * 0.02));
|
|
3918
|
-
const BUFFER_TARGET_MIN_MS = ${
|
|
3919
|
-
const BUFFER_TARGET_MAX_MS = ${
|
|
3920
|
-
const JITTER_MULTIPLIER = ${
|
|
3921
|
-
const LOCAL_BUFFER_MAX_MS = ${
|
|
3922
|
-
const CONTROL_PERIOD_MS = ${
|
|
3923
|
-
const UNDERRUN_JUMP_MS = ${
|
|
3899
|
+
const BUFFER_TARGET_MIN_MS = ${Lc};
|
|
3900
|
+
const BUFFER_TARGET_MAX_MS = ${vc};
|
|
3901
|
+
const JITTER_MULTIPLIER = ${Pc};
|
|
3902
|
+
const LOCAL_BUFFER_MAX_MS = ${Dr};
|
|
3903
|
+
const CONTROL_PERIOD_MS = ${Fc};
|
|
3904
|
+
const UNDERRUN_JUMP_MS = ${Bc};
|
|
3924
3905
|
const STABLE_TIME_TO_DECREASE_MS = ${xc};
|
|
3925
|
-
const DECREASE_STEP_MS = ${
|
|
3906
|
+
const DECREASE_STEP_MS = ${Gc};
|
|
3926
3907
|
const DEFAULT_STATS_INTERVAL_SAMPLES = OUTPUT_SAMPLE_RATE_HZ;
|
|
3927
3908
|
|
|
3928
3909
|
// Pre-computed reciprocals for division-free calculations
|
|
@@ -3930,18 +3911,18 @@ const INV_OUTPUT_SAMPLE_RATE_HZ = 1 / OUTPUT_SAMPLE_RATE_HZ;
|
|
|
3930
3911
|
const MS_PER_SAMPLE = 1000 * INV_OUTPUT_SAMPLE_RATE_HZ;
|
|
3931
3912
|
|
|
3932
3913
|
// Fade envelope constants
|
|
3933
|
-
const FADE_IN_DURATION_MS = ${
|
|
3934
|
-
const FADE_OUT_DURATION_MS = ${
|
|
3914
|
+
const FADE_IN_DURATION_MS = ${Mr};
|
|
3915
|
+
const FADE_OUT_DURATION_MS = ${De};
|
|
3935
3916
|
const FADE_IN_DURATION_SAMPLES = Math.round(OUTPUT_SAMPLE_RATE_HZ * FADE_IN_DURATION_MS / 1000);
|
|
3936
3917
|
const FADE_OUT_DURATION_SAMPLES = Math.round(OUTPUT_SAMPLE_RATE_HZ * FADE_OUT_DURATION_MS / 1000);
|
|
3937
3918
|
const FADE_IN_INCREMENT = 1.0 / FADE_IN_DURATION_SAMPLES;
|
|
3938
3919
|
const FADE_OUT_INCREMENT = 1.0 / FADE_OUT_DURATION_SAMPLES;
|
|
3939
3920
|
|
|
3940
3921
|
// Render quantum size (standard Web Audio API value)
|
|
3941
|
-
const RENDER_QUANTUM_SIZE = ${
|
|
3922
|
+
const RENDER_QUANTUM_SIZE = ${Or};
|
|
3942
3923
|
|
|
3943
3924
|
// Buffer reduction crossfade constants (align to quantum boundary to avoid partial quanta)
|
|
3944
|
-
const BUFFER_REDUCTION_CROSSFADE_MS = ${
|
|
3925
|
+
const BUFFER_REDUCTION_CROSSFADE_MS = ${Vc};
|
|
3945
3926
|
const BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW = Math.round(OUTPUT_SAMPLE_RATE_HZ * BUFFER_REDUCTION_CROSSFADE_MS / 1000);
|
|
3946
3927
|
const BUFFER_REDUCTION_CROSSFADE_SAMPLES = Math.ceil(BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW / RENDER_QUANTUM_SIZE) * RENDER_QUANTUM_SIZE;
|
|
3947
3928
|
|
|
@@ -4152,7 +4133,7 @@ class IkonAudioPlayerProcessor extends AudioWorkletProcessor {
|
|
|
4152
4133
|
this.statsIntervalSamples = Math.max(1, Math.round((OUTPUT_SAMPLE_RATE_HZ * statusIntervalMs) / 1000));
|
|
4153
4134
|
|
|
4154
4135
|
// Normalization config (hardcoded)
|
|
4155
|
-
this.normalizationEnabled = ${
|
|
4136
|
+
this.normalizationEnabled = ${Wc};
|
|
4156
4137
|
|
|
4157
4138
|
// Stream states for audio buffer
|
|
4158
4139
|
this.streams = new Map();
|
|
@@ -4828,7 +4809,7 @@ class ze {
|
|
|
4828
4809
|
config;
|
|
4829
4810
|
enabled = !1;
|
|
4830
4811
|
stateUnsubscribe = null;
|
|
4831
|
-
isMobile =
|
|
4812
|
+
isMobile = Yc();
|
|
4832
4813
|
boundVisibilityChange = null;
|
|
4833
4814
|
boundPageHide = null;
|
|
4834
4815
|
unlockHandler = null;
|
|
@@ -4939,7 +4920,7 @@ class ze {
|
|
|
4939
4920
|
* (e.g., button click/release) to ensure the AudioContext can be recreated.
|
|
4940
4921
|
*/
|
|
4941
4922
|
requestRecovery() {
|
|
4942
|
-
if (this.enabled &&
|
|
4923
|
+
if (this.enabled && kr() && this.audioContext) {
|
|
4943
4924
|
this.stopAudioGraph();
|
|
4944
4925
|
try {
|
|
4945
4926
|
const e = new AudioContext({
|
|
@@ -5040,11 +5021,11 @@ class ze {
|
|
|
5040
5021
|
const o = r - i.playbackStartContextTime;
|
|
5041
5022
|
if (o < 0)
|
|
5042
5023
|
continue;
|
|
5043
|
-
const a = o * n * s, c = i.frames, l = i.count, d = (i.head - l +
|
|
5024
|
+
const a = o * n * s, c = i.frames, l = i.count, d = (i.head - l + G) % G;
|
|
5044
5025
|
let h = null, E = null;
|
|
5045
5026
|
for (let u = 0; u < l; u++) {
|
|
5046
|
-
const N = (d + u) %
|
|
5047
|
-
if (
|
|
5027
|
+
const N = (d + u) % G, A = c[N], v = A.samplePosition + Math.max(A.frameSamples, 1);
|
|
5028
|
+
if (A.samplePosition <= a && (h = A), v > a && !E && (E = A, A.samplePosition <= a))
|
|
5048
5029
|
break;
|
|
5049
5030
|
}
|
|
5050
5031
|
if (!h)
|
|
@@ -5092,17 +5073,17 @@ class ze {
|
|
|
5092
5073
|
try {
|
|
5093
5074
|
this.audioContext = new AudioContext();
|
|
5094
5075
|
} catch (d) {
|
|
5095
|
-
g.warn(`Failed to create AudioContext: ${
|
|
5076
|
+
g.warn(`Failed to create AudioContext: ${$(d)}`), this.audioContext = null;
|
|
5096
5077
|
return;
|
|
5097
5078
|
}
|
|
5098
|
-
g.debug(`AudioContext latencyHint unsupported: ${
|
|
5079
|
+
g.debug(`AudioContext latencyHint unsupported: ${$(f)}`);
|
|
5099
5080
|
}
|
|
5100
|
-
g.debug(`AudioContext sample rate request unsupported: ${
|
|
5081
|
+
g.debug(`AudioContext sample rate request unsupported: ${$(l)}`);
|
|
5101
5082
|
}
|
|
5102
5083
|
this.outputSampleRateHz = this.audioContext.sampleRate || ae, this.outputSampleRateHz !== a && g.debug(`AudioContext running at ${this.outputSampleRateHz}Hz (requested ${a}Hz)`), this.attachAudioContextHealthHandlers(this.audioContext);
|
|
5103
5084
|
}
|
|
5104
5085
|
const n = this.audioContext, s = this.resolveDiagnosticsConfig();
|
|
5105
|
-
if ((this.config.performance?.preferAudioWorklet ?? !0) &&
|
|
5086
|
+
if ((this.config.performance?.preferAudioWorklet ?? !0) && Ur(n)) {
|
|
5106
5087
|
await this.ensureAudioWorklet(n, s, e, r);
|
|
5107
5088
|
return;
|
|
5108
5089
|
}
|
|
@@ -5262,10 +5243,10 @@ class ze {
|
|
|
5262
5243
|
URL.revokeObjectURL(this.workletModuleUrl);
|
|
5263
5244
|
} catch {
|
|
5264
5245
|
}
|
|
5265
|
-
this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([
|
|
5246
|
+
this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([jc({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: R })], { type: "text/javascript" }));
|
|
5266
5247
|
}
|
|
5267
5248
|
this.workletReady || (this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl).catch((f) => {
|
|
5268
|
-
throw g.warn(`Failed to load AudioWorklet module, falling back: ${
|
|
5249
|
+
throw g.warn(`Failed to load AudioWorklet module, falling back: ${$(f)}`), f;
|
|
5269
5250
|
}));
|
|
5270
5251
|
try {
|
|
5271
5252
|
await this.workletReady;
|
|
@@ -5311,7 +5292,7 @@ class ze {
|
|
|
5311
5292
|
if (this.scriptProcessorNode)
|
|
5312
5293
|
return;
|
|
5313
5294
|
this.stopAudioWorklet(), this.pendingWorkletMessages = [];
|
|
5314
|
-
const n = 1024, s = new Float32Array(n * R), i = Math.round(this.outputSampleRateHz *
|
|
5295
|
+
const n = 1024, s = new Float32Array(n * R), i = Math.round(this.outputSampleRateHz * Mr / 1e3), o = Math.round(this.outputSampleRateHz * De / 1e3), a = 1 / i, c = 1 / o, l = new Array(R), f = [], d = e.createScriptProcessor(n, 0, R);
|
|
5315
5296
|
d.onaudioprocess = (h) => {
|
|
5316
5297
|
const E = h.outputBuffer, m = E.numberOfChannels, I = E.length;
|
|
5317
5298
|
for (let p = 0; p < m; p++) {
|
|
@@ -5321,18 +5302,18 @@ class ze {
|
|
|
5321
5302
|
let T = 0;
|
|
5322
5303
|
f.length = 0;
|
|
5323
5304
|
for (const [p, u] of this.fallbackQueues.entries()) {
|
|
5324
|
-
u.totalSamples > 0 && (T += 1), (u.ending || u.inputDrained) && u.fadeDirection !== "out" && u.totalSamples / m * 1e3 / this.outputSampleRateHz <=
|
|
5325
|
-
for (let
|
|
5305
|
+
u.totalSamples > 0 && (T += 1), (u.ending || u.inputDrained) && u.fadeDirection !== "out" && u.totalSamples / m * 1e3 / this.outputSampleRateHz <= De * 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);
|
|
5306
|
+
for (let A = 0; A < I; A++) {
|
|
5326
5307
|
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"));
|
|
5327
5308
|
for (let v = 0; v < m; v++) {
|
|
5328
|
-
const M = s[
|
|
5329
|
-
l[v][
|
|
5309
|
+
const M = s[A * m + v];
|
|
5310
|
+
l[v][A] += M * u.fadeGain;
|
|
5330
5311
|
}
|
|
5331
5312
|
}
|
|
5332
5313
|
const N = u.ending || u.inputDrained;
|
|
5333
5314
|
if (N && u.totalSamples <= 0) {
|
|
5334
5315
|
if (u.fadeDirection === "out" && u.fadeGain > 1e-3) {
|
|
5335
|
-
for (let
|
|
5316
|
+
for (let A = 0; A < I; A++)
|
|
5336
5317
|
if (u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 1e-3) {
|
|
5337
5318
|
u.fadeGain = 0, u.fadeDirection = "none";
|
|
5338
5319
|
break;
|
|
@@ -5341,12 +5322,12 @@ class ze {
|
|
|
5341
5322
|
u.fadeGain <= 1e-3 && u.ending && f.push(p);
|
|
5342
5323
|
} else if (!N && u.totalSamples <= 0 && u.hasLastOut && u.lastOut && u.fadeGain > 1e-3) {
|
|
5343
5324
|
u.fadeDirection = "out", u.underrunPending = !0;
|
|
5344
|
-
const
|
|
5325
|
+
const A = u.lastOut, v = I - 1;
|
|
5345
5326
|
for (let M = 0; M < I; M++) {
|
|
5346
5327
|
u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 0 && (u.fadeDirection = "none");
|
|
5347
|
-
for (let
|
|
5348
|
-
const
|
|
5349
|
-
l[
|
|
5328
|
+
for (let K = 0; K < m; K++) {
|
|
5329
|
+
const Vr = A[v * m + K];
|
|
5330
|
+
l[K][M] += Vr * u.fadeGain;
|
|
5350
5331
|
}
|
|
5351
5332
|
}
|
|
5352
5333
|
}
|
|
@@ -5387,7 +5368,7 @@ class ze {
|
|
|
5387
5368
|
e.totalSamples < 0 && (e.totalSamples = 0), this.compactFallbackQueue(e);
|
|
5388
5369
|
}
|
|
5389
5370
|
trimFallbackQueue(e) {
|
|
5390
|
-
const r = Math.floor(this.outputSampleRateHz * R *
|
|
5371
|
+
const r = Math.floor(this.outputSampleRateHz * R * Dr / 1e3), n = e.totalSamples - r;
|
|
5391
5372
|
n <= 0 || this.skipFromFallbackQueue(e, n);
|
|
5392
5373
|
}
|
|
5393
5374
|
stopScriptProcessorDiagnostics() {
|
|
@@ -5434,7 +5415,7 @@ class ze {
|
|
|
5434
5415
|
try {
|
|
5435
5416
|
await this.resumeWithTimeout(e), this.removeUnlockHandler();
|
|
5436
5417
|
} catch (o) {
|
|
5437
|
-
g.warn(`Failed to resume AudioContext: ${
|
|
5418
|
+
g.warn(`Failed to resume AudioContext: ${$(o)}`), this.addUnlockHandler();
|
|
5438
5419
|
}
|
|
5439
5420
|
}
|
|
5440
5421
|
async recoverAudioContext(e) {
|
|
@@ -5508,9 +5489,9 @@ class ze {
|
|
|
5508
5489
|
}
|
|
5509
5490
|
this.protocolPort = e;
|
|
5510
5491
|
try {
|
|
5511
|
-
this.audioWorker = new
|
|
5492
|
+
this.audioWorker = new Oc();
|
|
5512
5493
|
} catch (d) {
|
|
5513
|
-
g.warn(`Failed to create audio worker: ${
|
|
5494
|
+
g.warn(`Failed to create audio worker: ${$(d)}`), this.protocolPort.close(), this.protocolPort = null;
|
|
5514
5495
|
return;
|
|
5515
5496
|
}
|
|
5516
5497
|
const r = this.audioWorker;
|
|
@@ -5532,8 +5513,8 @@ class ze {
|
|
|
5532
5513
|
onAudioWorkerMessage(e) {
|
|
5533
5514
|
if (e.type === "streamBegin") {
|
|
5534
5515
|
if (this.activeStreams.add(e.streamId), e.shapeSets && e.shapeSets.length > 0 && (this.streamShapeSets.set(e.streamId, e.shapeSets), this.currentShapeSetValues.set(e.streamId, /* @__PURE__ */ new Map()), e.shapeSets.some((s) => s.Name === "Viseme"))) {
|
|
5535
|
-
const s = new Array(
|
|
5536
|
-
for (let i = 0; i <
|
|
5516
|
+
const s = new Array(G);
|
|
5517
|
+
for (let i = 0; i < G; i++)
|
|
5537
5518
|
s[i] = { samplePosition: 0, frameSamples: 0, mouthOpenY: 0, mouthForm: 0 };
|
|
5538
5519
|
this.visemeBuffers.set(e.streamId, {
|
|
5539
5520
|
frames: s,
|
|
@@ -5592,14 +5573,14 @@ class ze {
|
|
|
5592
5573
|
s.epochTimestampSamples = e.timestampInterleavedSamples;
|
|
5593
5574
|
const c = this.audioContext;
|
|
5594
5575
|
if (c) {
|
|
5595
|
-
const l = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), f =
|
|
5576
|
+
const l = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), f = Hc + l * 1e3, d = Math.min($c, Math.max(Kc, f));
|
|
5596
5577
|
s.playbackStartContextTime = c.currentTime + d / 1e3;
|
|
5597
5578
|
}
|
|
5598
5579
|
s.timingEstablished = !0;
|
|
5599
5580
|
}
|
|
5600
5581
|
if (e.frameSizeInterleavedSamples > 0) {
|
|
5601
5582
|
const c = s.frames[s.head];
|
|
5602
|
-
c.samplePosition = e.timestampInterleavedSamples - s.epochTimestampSamples, c.frameSamples = e.frameSizeInterleavedSamples, c.mouthOpenY = a.Values[0], c.mouthForm = a.Values[1], s.head = (s.head + 1) %
|
|
5583
|
+
c.samplePosition = e.timestampInterleavedSamples - s.epochTimestampSamples, c.frameSamples = e.frameSizeInterleavedSamples, c.mouthOpenY = a.Values[0], c.mouthForm = a.Values[1], s.head = (s.head + 1) % G, s.count < G && s.count++;
|
|
5603
5584
|
}
|
|
5604
5585
|
}
|
|
5605
5586
|
}
|
|
@@ -5715,7 +5696,7 @@ class ze {
|
|
|
5715
5696
|
}));
|
|
5716
5697
|
}
|
|
5717
5698
|
}
|
|
5718
|
-
function
|
|
5699
|
+
function zc(t) {
|
|
5719
5700
|
return new Worker(
|
|
5720
5701
|
"" + new URL("assets/video-playback-worker-qauTQ7Et.js", import.meta.url).href,
|
|
5721
5702
|
{
|
|
@@ -5725,10 +5706,10 @@ function Xc(t) {
|
|
|
5725
5706
|
);
|
|
5726
5707
|
}
|
|
5727
5708
|
const V = L("IkonVideoPlayback");
|
|
5728
|
-
function
|
|
5709
|
+
function ye(t) {
|
|
5729
5710
|
return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
|
|
5730
5711
|
}
|
|
5731
|
-
class
|
|
5712
|
+
class Xc {
|
|
5732
5713
|
client;
|
|
5733
5714
|
config;
|
|
5734
5715
|
enabled = !0;
|
|
@@ -5803,9 +5784,9 @@ class Jc {
|
|
|
5803
5784
|
}
|
|
5804
5785
|
let e;
|
|
5805
5786
|
try {
|
|
5806
|
-
e = new
|
|
5787
|
+
e = new zc();
|
|
5807
5788
|
} catch (r) {
|
|
5808
|
-
V.warn(`Failed to create video worker: ${
|
|
5789
|
+
V.warn(`Failed to create video worker: ${ye(r)}`);
|
|
5809
5790
|
return;
|
|
5810
5791
|
}
|
|
5811
5792
|
this.worker = e, e.addEventListener("message", (r) => this.onWorkerMessage(r.data)), e.addEventListener("error", (r) => {
|
|
@@ -5874,7 +5855,7 @@ class Jc {
|
|
|
5874
5855
|
const n = r.canvas.transferControlToOffscreen();
|
|
5875
5856
|
this.worker.postMessage({ type: "attachSurface", streamId: e, canvas: n }, [n]), r.attachedToWorker = !0;
|
|
5876
5857
|
} catch (n) {
|
|
5877
|
-
V.warn(`Failed to attach offscreen canvas for stream ${e}: ${
|
|
5858
|
+
V.warn(`Failed to attach offscreen canvas for stream ${e}: ${ye(n)}`), r.mode = "bitmap", r.ctxBitmap = r.canvas.getContext("bitmaprenderer", { alpha: !1 }), r.ctxBitmap || (r.ctx2d = r.canvas.getContext("2d", { alpha: !1, desynchronized: !0 }));
|
|
5878
5859
|
try {
|
|
5879
5860
|
this.worker.postMessage({ type: "watchStream", streamId: e }), r.attachedToWorker = !0;
|
|
5880
5861
|
} catch {
|
|
@@ -5923,7 +5904,7 @@ class Jc {
|
|
|
5923
5904
|
try {
|
|
5924
5905
|
this.worker.postMessage({ type: "attachProtocolPort", port: e.port }, [e.port]);
|
|
5925
5906
|
} catch (r) {
|
|
5926
|
-
V.warn(`Failed to attach video protocol port: ${
|
|
5907
|
+
V.warn(`Failed to attach video protocol port: ${ye(r)}`), this.protocolPort.close(), this.protocolPort = null;
|
|
5927
5908
|
}
|
|
5928
5909
|
}
|
|
5929
5910
|
}
|
|
@@ -5952,11 +5933,11 @@ class Jc {
|
|
|
5952
5933
|
}));
|
|
5953
5934
|
}
|
|
5954
5935
|
}
|
|
5955
|
-
class
|
|
5936
|
+
class Jc {
|
|
5956
5937
|
audio;
|
|
5957
5938
|
video;
|
|
5958
5939
|
constructor(e, r) {
|
|
5959
|
-
this.audio = new ze(e, r?.audio), this.video = new
|
|
5940
|
+
this.audio = new ze(e, r?.audio), this.video = new Xc(e, r?.video), r?.mediaSession && this.audio.setMediaSession(r.mediaSession);
|
|
5960
5941
|
}
|
|
5961
5942
|
/**
|
|
5962
5943
|
* Releases media resources (workers, audio graph, decoders).
|
|
@@ -5967,7 +5948,7 @@ class Qc {
|
|
|
5967
5948
|
this.audio.dispose(), this.video.dispose();
|
|
5968
5949
|
}
|
|
5969
5950
|
}
|
|
5970
|
-
class
|
|
5951
|
+
class Qc {
|
|
5971
5952
|
static getStorageForCapacity(e, r) {
|
|
5972
5953
|
const n = Int32Array.BYTES_PER_ELEMENT * 2, s = r.BYTES_PER_ELEMENT * e;
|
|
5973
5954
|
return new SharedArrayBuffer(n + s);
|
|
@@ -6021,7 +6002,7 @@ class Zc {
|
|
|
6021
6002
|
return n = (n + r) % this.capacity, Atomics.store(this.readWrite, 0, n), r;
|
|
6022
6003
|
}
|
|
6023
6004
|
}
|
|
6024
|
-
function
|
|
6005
|
+
function Zc(t) {
|
|
6025
6006
|
return new Worker(
|
|
6026
6007
|
"" + new URL("assets/audio-capture-worker-kpORDYGU.js", import.meta.url).href,
|
|
6027
6008
|
{
|
|
@@ -6030,12 +6011,12 @@ function qc(t) {
|
|
|
6030
6011
|
}
|
|
6031
6012
|
);
|
|
6032
6013
|
}
|
|
6033
|
-
const
|
|
6034
|
-
function
|
|
6014
|
+
const qc = L("IkonAudioCapture");
|
|
6015
|
+
function el() {
|
|
6035
6016
|
const t = globalThis.crypto;
|
|
6036
6017
|
return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
|
|
6037
6018
|
}
|
|
6038
|
-
function
|
|
6019
|
+
function tl() {
|
|
6039
6020
|
return `
|
|
6040
6021
|
class RingBuffer {
|
|
6041
6022
|
static getStorageForCapacity(capacity, type) {
|
|
@@ -6092,7 +6073,7 @@ class RingBuffer {
|
|
|
6092
6073
|
}
|
|
6093
6074
|
}
|
|
6094
6075
|
|
|
6095
|
-
const RENDER_QUANTUM_SIZE = ${
|
|
6076
|
+
const RENDER_QUANTUM_SIZE = ${Or};
|
|
6096
6077
|
|
|
6097
6078
|
class IkonAudioCaptureProcessor extends AudioWorkletProcessor {
|
|
6098
6079
|
constructor(options) {
|
|
@@ -6164,7 +6145,7 @@ class IkonAudioCaptureProcessor extends AudioWorkletProcessor {
|
|
|
6164
6145
|
registerProcessor('ikon-audio-capture', IkonAudioCaptureProcessor);
|
|
6165
6146
|
`;
|
|
6166
6147
|
}
|
|
6167
|
-
class
|
|
6148
|
+
class rl {
|
|
6168
6149
|
constructor(e, r) {
|
|
6169
6150
|
this.client = e, this.config = r ?? {};
|
|
6170
6151
|
}
|
|
@@ -6184,12 +6165,12 @@ class nl {
|
|
|
6184
6165
|
ensureWorker() {
|
|
6185
6166
|
if (this.worker)
|
|
6186
6167
|
return this.worker;
|
|
6187
|
-
const e = new
|
|
6168
|
+
const e = new Zc();
|
|
6188
6169
|
return this.worker = e, e.addEventListener("message", (r) => {
|
|
6189
6170
|
const n = r.data;
|
|
6190
6171
|
if (n?.type === "error") {
|
|
6191
6172
|
const s = n.error;
|
|
6192
|
-
|
|
6173
|
+
qc.warn(`Audio capture worker error: ${s?.name ?? "Error"} ${s?.message ?? ""}`);
|
|
6193
6174
|
}
|
|
6194
6175
|
}), e;
|
|
6195
6176
|
}
|
|
@@ -6225,9 +6206,9 @@ class nl {
|
|
|
6225
6206
|
return await navigator.mediaDevices.getUserMedia({ audio: n });
|
|
6226
6207
|
}
|
|
6227
6208
|
async ensureWorklet(e) {
|
|
6228
|
-
if (!
|
|
6209
|
+
if (!Ur(e))
|
|
6229
6210
|
throw new Error("AudioWorklet is not supported in this browser");
|
|
6230
|
-
this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([
|
|
6211
|
+
this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([tl()], { type: "text/javascript" }))), (!this.workletReady || this.workletContext !== e) && (this.workletContext = e, this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl));
|
|
6231
6212
|
try {
|
|
6232
6213
|
await this.workletReady;
|
|
6233
6214
|
} catch (r) {
|
|
@@ -6243,13 +6224,13 @@ class nl {
|
|
|
6243
6224
|
if (!i)
|
|
6244
6225
|
throw s.getTracks().forEach((p) => p.stop()), new Error("No audio track available");
|
|
6245
6226
|
await this.ensureWorklet(n);
|
|
6246
|
-
const o =
|
|
6227
|
+
const o = el(), a = this.allocateTrackId(), c = n.createMediaStreamSource(s), l = n.createGain();
|
|
6247
6228
|
l.gain.value = 0, l.connect(n.destination);
|
|
6248
6229
|
const h = le() ? "sab" : "pcm";
|
|
6249
6230
|
let E;
|
|
6250
6231
|
if (h === "sab") {
|
|
6251
6232
|
const p = Math.floor(n.sampleRate * 2);
|
|
6252
|
-
E =
|
|
6233
|
+
E = Qc.getStorageForCapacity(p, Float32Array);
|
|
6253
6234
|
}
|
|
6254
6235
|
const m = this.ensureWorker();
|
|
6255
6236
|
m.postMessage({
|
|
@@ -6267,18 +6248,18 @@ class nl {
|
|
|
6267
6248
|
sharedArrayBuffer: E
|
|
6268
6249
|
}), await new Promise((p, u) => {
|
|
6269
6250
|
const N = setTimeout(() => {
|
|
6270
|
-
m.removeEventListener("message",
|
|
6271
|
-
}, 1e4),
|
|
6251
|
+
m.removeEventListener("message", A), u(new Error("Audio capture worker start timeout"));
|
|
6252
|
+
}, 1e4), A = (v) => {
|
|
6272
6253
|
const M = v.data;
|
|
6273
6254
|
if (M?.type === "started" && M.captureId === o)
|
|
6274
|
-
clearTimeout(N), m.removeEventListener("message",
|
|
6255
|
+
clearTimeout(N), m.removeEventListener("message", A), p();
|
|
6275
6256
|
else if (M?.type === "error" && M.captureId === o) {
|
|
6276
|
-
clearTimeout(N), m.removeEventListener("message",
|
|
6277
|
-
const
|
|
6278
|
-
u(new Error(
|
|
6257
|
+
clearTimeout(N), m.removeEventListener("message", A);
|
|
6258
|
+
const K = M.error;
|
|
6259
|
+
u(new Error(K?.message ?? "Audio capture failed to start"));
|
|
6279
6260
|
}
|
|
6280
6261
|
};
|
|
6281
|
-
m.addEventListener("message",
|
|
6262
|
+
m.addEventListener("message", A);
|
|
6282
6263
|
});
|
|
6283
6264
|
const I = new AudioWorkletNode(n, "ikon-audio-capture", {
|
|
6284
6265
|
numberOfInputs: 1,
|
|
@@ -6311,7 +6292,7 @@ class nl {
|
|
|
6311
6292
|
T.stopped || m.postMessage({ type: "startSegment", captureId: o });
|
|
6312
6293
|
},
|
|
6313
6294
|
endSegment: () => {
|
|
6314
|
-
T.stopped || (m.postMessage({ type: "endSegment", captureId: o }),
|
|
6295
|
+
T.stopped || (m.postMessage({ type: "endSegment", captureId: o }), kr() && T.stop());
|
|
6315
6296
|
},
|
|
6316
6297
|
stop: async () => {
|
|
6317
6298
|
if (!T.stopped) {
|
|
@@ -6390,9 +6371,9 @@ class nl {
|
|
|
6390
6371
|
}
|
|
6391
6372
|
}
|
|
6392
6373
|
}
|
|
6393
|
-
const
|
|
6394
|
-
async function
|
|
6395
|
-
const r = e.mime ??
|
|
6374
|
+
const Lr = 1280, vr = 720, nl = 30, Pr = "image/jpeg", sl = 0.92;
|
|
6375
|
+
async function il(t, e) {
|
|
6376
|
+
const r = e.mime ?? Pr, n = e.quality ?? sl;
|
|
6396
6377
|
if (typeof OffscreenCanvas < "u" && t instanceof OffscreenCanvas)
|
|
6397
6378
|
try {
|
|
6398
6379
|
return await t.convertToBlob({ type: r, quality: n });
|
|
@@ -6409,7 +6390,7 @@ async function ol(t, e) {
|
|
|
6409
6390
|
);
|
|
6410
6391
|
});
|
|
6411
6392
|
}
|
|
6412
|
-
class
|
|
6393
|
+
class ol {
|
|
6413
6394
|
async acquireCameraStream(e) {
|
|
6414
6395
|
if (!navigator.mediaDevices)
|
|
6415
6396
|
throw new Error("Media devices are not available in this environment");
|
|
@@ -6434,7 +6415,7 @@ class al {
|
|
|
6434
6415
|
await s.play();
|
|
6435
6416
|
} catch {
|
|
6436
6417
|
}
|
|
6437
|
-
const i = s.videoWidth || (n.getSettings().width ??
|
|
6418
|
+
const i = s.videoWidth || (n.getSettings().width ?? Lr), o = s.videoHeight || (n.getSettings().height ?? vr), a = e.width ? Math.max(1, Math.floor(e.width)) : i, c = e.height ? Math.max(1, Math.floor(e.height)) : o;
|
|
6438
6419
|
let l;
|
|
6439
6420
|
if (typeof OffscreenCanvas < "u")
|
|
6440
6421
|
l = new OffscreenCanvas(a, c);
|
|
@@ -6446,9 +6427,9 @@ class al {
|
|
|
6446
6427
|
if (!f)
|
|
6447
6428
|
throw new Error("2D canvas context unavailable");
|
|
6448
6429
|
f.drawImage(s, 0, 0, a, c);
|
|
6449
|
-
const d = await
|
|
6430
|
+
const d = await il(l, e), h = await d.arrayBuffer();
|
|
6450
6431
|
return {
|
|
6451
|
-
mime: d.type || e.mime ||
|
|
6432
|
+
mime: d.type || e.mime || Pr,
|
|
6452
6433
|
width: a,
|
|
6453
6434
|
height: c,
|
|
6454
6435
|
data: new Uint8Array(h)
|
|
@@ -6473,7 +6454,7 @@ class al {
|
|
|
6473
6454
|
}
|
|
6474
6455
|
}
|
|
6475
6456
|
}
|
|
6476
|
-
function
|
|
6457
|
+
function al(t) {
|
|
6477
6458
|
return new Worker(
|
|
6478
6459
|
"" + new URL("assets/video-capture-worker-DP3lFDjq.js", import.meta.url).href,
|
|
6479
6460
|
{
|
|
@@ -6483,17 +6464,17 @@ function cl(t) {
|
|
|
6483
6464
|
);
|
|
6484
6465
|
}
|
|
6485
6466
|
const lt = L("IkonVideoCapture");
|
|
6486
|
-
function
|
|
6467
|
+
function cl() {
|
|
6487
6468
|
const t = globalThis.crypto;
|
|
6488
6469
|
return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
|
|
6489
6470
|
}
|
|
6490
|
-
function
|
|
6471
|
+
function ll() {
|
|
6491
6472
|
const t = globalThis.MediaStreamTrackProcessor;
|
|
6492
6473
|
if (!t)
|
|
6493
6474
|
throw new Error("MediaStreamTrackProcessor is not available in this browser");
|
|
6494
6475
|
return t;
|
|
6495
6476
|
}
|
|
6496
|
-
class
|
|
6477
|
+
class ul {
|
|
6497
6478
|
constructor(e) {
|
|
6498
6479
|
this.client = e;
|
|
6499
6480
|
}
|
|
@@ -6509,7 +6490,7 @@ class hl {
|
|
|
6509
6490
|
ensureWorker() {
|
|
6510
6491
|
if (this.worker)
|
|
6511
6492
|
return this.worker;
|
|
6512
|
-
const e = new
|
|
6493
|
+
const e = new al();
|
|
6513
6494
|
return this.worker = e, e.addEventListener("message", (r) => {
|
|
6514
6495
|
const n = r.data;
|
|
6515
6496
|
if (n?.type === "error") {
|
|
@@ -6536,7 +6517,7 @@ class hl {
|
|
|
6536
6517
|
async getMediaStream(e) {
|
|
6537
6518
|
if (!navigator.mediaDevices)
|
|
6538
6519
|
throw new Error("Media devices are not available in this environment");
|
|
6539
|
-
const r = e.constraints ?? {}, n = e.options?.framerate ??
|
|
6520
|
+
const r = e.constraints ?? {}, n = e.options?.framerate ?? nl, s = {
|
|
6540
6521
|
...r,
|
|
6541
6522
|
frameRate: r.frameRate ?? { ideal: n }
|
|
6542
6523
|
};
|
|
@@ -6547,10 +6528,10 @@ class hl {
|
|
|
6547
6528
|
if (!r)
|
|
6548
6529
|
throw new Error("Cannot start video capture before client is connected");
|
|
6549
6530
|
this.ensurePorts();
|
|
6550
|
-
const n =
|
|
6531
|
+
const n = cl(), s = await this.getMediaStream(e), i = s.getVideoTracks()[0];
|
|
6551
6532
|
if (!i)
|
|
6552
6533
|
throw s.getTracks().forEach((I) => I.stop()), new Error("No video track available");
|
|
6553
|
-
const o = i.getSettings(), a = e.options?.width ?? o.width ??
|
|
6534
|
+
const o = i.getSettings(), a = e.options?.width ?? o.width ?? Lr, c = e.options?.height ?? o.height ?? vr, l = ll(), d = new l({ track: i }).readable, h = this.allocateTrackId(), E = this.ensureWorker();
|
|
6554
6535
|
E.postMessage(
|
|
6555
6536
|
{
|
|
6556
6537
|
type: "start",
|
|
@@ -6618,23 +6599,32 @@ class hl {
|
|
|
6618
6599
|
this.protocolPort?.close(), this.protocolPort = null, this.sendPort?.close(), this.sendPort = null;
|
|
6619
6600
|
}
|
|
6620
6601
|
}
|
|
6621
|
-
class
|
|
6602
|
+
class hl {
|
|
6622
6603
|
audio;
|
|
6623
6604
|
video;
|
|
6624
6605
|
image;
|
|
6625
6606
|
constructor(e, r) {
|
|
6626
|
-
this.audio = new
|
|
6607
|
+
this.audio = new rl(e, r?.audio), this.video = new ul(e), this.image = new ol();
|
|
6627
6608
|
}
|
|
6628
6609
|
dispose() {
|
|
6629
6610
|
this.audio.dispose(), this.video.dispose();
|
|
6630
6611
|
}
|
|
6631
6612
|
}
|
|
6613
|
+
function dl(t) {
|
|
6614
|
+
return new Worker(
|
|
6615
|
+
"" + new URL("assets/protocol-worker-DIKCgk1A.js", import.meta.url).href,
|
|
6616
|
+
{
|
|
6617
|
+
type: "module",
|
|
6618
|
+
name: t?.name
|
|
6619
|
+
}
|
|
6620
|
+
);
|
|
6621
|
+
}
|
|
6632
6622
|
const ut = {
|
|
6633
6623
|
[k.WebTransport]: 0,
|
|
6634
6624
|
[k.WebSocket]: 1,
|
|
6635
6625
|
[k.WebTransportProxy]: 2,
|
|
6636
6626
|
[k.WebSocketProxy]: 3
|
|
6637
|
-
},
|
|
6627
|
+
}, Ne = "ikon_endpoint_type";
|
|
6638
6628
|
class fl {
|
|
6639
6629
|
isLocal;
|
|
6640
6630
|
workingEndpointType = null;
|
|
@@ -6667,7 +6657,7 @@ class fl {
|
|
|
6667
6657
|
if (!this.isLocal) {
|
|
6668
6658
|
this.workingEndpointType = e;
|
|
6669
6659
|
try {
|
|
6670
|
-
localStorage.setItem(
|
|
6660
|
+
localStorage.setItem(Ne, String(e));
|
|
6671
6661
|
} catch {
|
|
6672
6662
|
}
|
|
6673
6663
|
}
|
|
@@ -6678,7 +6668,7 @@ class fl {
|
|
|
6678
6668
|
clearRememberedType() {
|
|
6679
6669
|
this.workingEndpointType = null;
|
|
6680
6670
|
try {
|
|
6681
|
-
localStorage.removeItem(
|
|
6671
|
+
localStorage.removeItem(Ne);
|
|
6682
6672
|
} catch {
|
|
6683
6673
|
}
|
|
6684
6674
|
}
|
|
@@ -6687,7 +6677,7 @@ class fl {
|
|
|
6687
6677
|
*/
|
|
6688
6678
|
loadRememberedType() {
|
|
6689
6679
|
try {
|
|
6690
|
-
const e = localStorage.getItem(
|
|
6680
|
+
const e = localStorage.getItem(Ne);
|
|
6691
6681
|
if (e !== null) {
|
|
6692
6682
|
const r = Number(e);
|
|
6693
6683
|
k[r] !== void 0 && (this.workingEndpointType = r);
|
|
@@ -6696,8 +6686,11 @@ class fl {
|
|
|
6696
6686
|
}
|
|
6697
6687
|
}
|
|
6698
6688
|
}
|
|
6699
|
-
const
|
|
6700
|
-
|
|
6689
|
+
const w = L("IkonClient");
|
|
6690
|
+
function El() {
|
|
6691
|
+
return typeof __IKON_EXTERNAL_TOKEN__ < "u" && __IKON_EXTERNAL_TOKEN__;
|
|
6692
|
+
}
|
|
6693
|
+
class Ml {
|
|
6701
6694
|
channelManager = null;
|
|
6702
6695
|
protocolWorker = null;
|
|
6703
6696
|
workerManagerState = null;
|
|
@@ -6734,6 +6727,9 @@ class Dl {
|
|
|
6734
6727
|
nextProtocolSendPortId = 1;
|
|
6735
6728
|
_media;
|
|
6736
6729
|
_mediaCapture = null;
|
|
6730
|
+
// External token mode
|
|
6731
|
+
_externalTokenMode = El();
|
|
6732
|
+
_externalTokenCleanup = null;
|
|
6737
6733
|
/**
|
|
6738
6734
|
* SDK-provided media pipelines (audio/video).
|
|
6739
6735
|
*
|
|
@@ -6752,7 +6748,7 @@ class Dl {
|
|
|
6752
6748
|
return this._mediaCapture;
|
|
6753
6749
|
}
|
|
6754
6750
|
constructor(e) {
|
|
6755
|
-
this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ??
|
|
6751
|
+
this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ?? Pa, this.connectionTimeoutMs = e.timeouts?.connectionTimeoutMs ?? Fa;
|
|
6756
6752
|
const r = [e.local, e.apiKey, e.sessionToken].filter(Boolean).length;
|
|
6757
6753
|
if (r === 0)
|
|
6758
6754
|
throw new Error('IkonClient requires one of: "local", "apiKey", or "sessionToken" configuration');
|
|
@@ -6760,19 +6756,19 @@ class Dl {
|
|
|
6760
6756
|
throw new Error('IkonClient accepts only one of: "local", "apiKey", or "sessionToken" configuration');
|
|
6761
6757
|
this.endpointSelector = new fl({
|
|
6762
6758
|
local: e.local
|
|
6763
|
-
}), this._functionRegistry = new
|
|
6759
|
+
}), this._functionRegistry = new gc(), st() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = Sc(this._functionRegistry));
|
|
6764
6760
|
const n = e.audio ? {
|
|
6765
6761
|
performance: e.audio.performance,
|
|
6766
6762
|
background: e.audio.background,
|
|
6767
6763
|
diagnostics: e.audio.diagnostics
|
|
6768
6764
|
} : void 0, s = e.video ? { performance: e.video.performance } : void 0;
|
|
6769
|
-
this._media = new
|
|
6765
|
+
this._media = new Jc(this, { audio: n, video: s, mediaSession: e.mediaSession }), this._media.audio.setEnabled(!0), this._media.video.setEnabled(!0), st() && (this._mediaCapture = new hl(this, {
|
|
6770
6766
|
audio: {
|
|
6771
6767
|
performance: {
|
|
6772
6768
|
preferWebCodecs: e.audio?.performance?.preferWebCodecs
|
|
6773
6769
|
}
|
|
6774
6770
|
}
|
|
6775
|
-
}), this.unregisterMediaCaptureFunctions =
|
|
6771
|
+
}), this.unregisterMediaCaptureFunctions = Dc(this._functionRegistry, this));
|
|
6776
6772
|
}
|
|
6777
6773
|
_lastError = void 0;
|
|
6778
6774
|
/**
|
|
@@ -6816,28 +6812,38 @@ class Dl {
|
|
|
6816
6812
|
async connect() {
|
|
6817
6813
|
if (this.currentState !== "idle")
|
|
6818
6814
|
throw new Error(`Cannot connect: already in state ${this.currentState}`);
|
|
6819
|
-
|
|
6815
|
+
if (this.setupLifecycleHandlers(), this._externalTokenMode) {
|
|
6816
|
+
w.info("External token mode enabled, waiting for token from parent window"), this.setState("waitingForToken"), this._externalTokenCleanup = this.setupExternalTokenListener();
|
|
6817
|
+
return;
|
|
6818
|
+
}
|
|
6819
|
+
w.info("Connecting to Ikon server"), await this.executeConnection(() => this.authenticate());
|
|
6820
|
+
}
|
|
6821
|
+
/**
|
|
6822
|
+
* Execute the connection flow with the provided authentication function.
|
|
6823
|
+
*/
|
|
6824
|
+
async executeConnection(e) {
|
|
6825
|
+
this._lastError = void 0, this.abortController = new AbortController(), this.setState("connecting"), this.slowConnectionTimer = setTimeout(() => {
|
|
6820
6826
|
this.currentState === "connecting" && this.setState("connectingSlow");
|
|
6821
6827
|
}, this.slowConnectionThresholdMs), this.connectionTimer = setTimeout(() => {
|
|
6822
|
-
(this.currentState === "connecting" || this.currentState === "connectingSlow") && (
|
|
6828
|
+
(this.currentState === "connecting" || this.currentState === "connectingSlow") && (w.error("Connection timeout"), this.abortController?.abort(), this.setState("offline"), this.config.onError?.(new Error("Connection timeout")));
|
|
6823
6829
|
}, this.connectionTimeoutMs);
|
|
6824
6830
|
try {
|
|
6825
|
-
const
|
|
6826
|
-
this.authResponse =
|
|
6827
|
-
} catch (
|
|
6828
|
-
if (
|
|
6831
|
+
const r = await e();
|
|
6832
|
+
this.authResponse = r.authResponse, this._sessionId = r.authResponse.ClientContext.SessionId, w.info("Authenticated to Ikon server"), await this.connectProtocol(this.authResponse.Entrypoints);
|
|
6833
|
+
} catch (r) {
|
|
6834
|
+
if (r instanceof DOMException && r.name === "AbortError")
|
|
6829
6835
|
return;
|
|
6830
|
-
throw
|
|
6836
|
+
throw w.error("Connection failed:", r), this.clearTimers(), this.setState("offline"), this.config.onError?.(r instanceof Error ? r : new Error(String(r))), r;
|
|
6831
6837
|
}
|
|
6832
6838
|
}
|
|
6833
6839
|
/**
|
|
6834
6840
|
* Disconnect from the server.
|
|
6835
6841
|
*/
|
|
6836
6842
|
disconnect() {
|
|
6837
|
-
|
|
6843
|
+
w.info("Disconnecting from Ikon server"), this.clearTimers(), this.cleanupLifecycleHandlers(), this._externalTokenCleanup && (this._externalTokenCleanup(), this._externalTokenCleanup = null), this._mediaCapture?.dispose(), this.unregisterMediaCaptureFunctions && (this.unregisterMediaCaptureFunctions(), this.unregisterMediaCaptureFunctions = null), this.unregisterBrowserFunctions && (this.unregisterBrowserFunctions(), this.unregisterBrowserFunctions = null), this.abortController?.abort(), this.abortController = null, this.disconnectProtocol(), this.authResponse = null, this._sessionId = void 0, this._globalState = null, this._globalStateReceived = !1, this._channelsConnected = !1, this._joinedHandled = !1, this._functionRegistry.detach(), this.setState("idle");
|
|
6838
6844
|
}
|
|
6839
6845
|
sendActionCall(e, r) {
|
|
6840
|
-
const n =
|
|
6846
|
+
const n = rn(
|
|
6841
6847
|
{
|
|
6842
6848
|
ActionId: _.fromString(e),
|
|
6843
6849
|
PayloadJson: r ?? "{}"
|
|
@@ -6860,7 +6866,7 @@ class Dl {
|
|
|
6860
6866
|
this.channelManager.sendProtocolMessage(e);
|
|
6861
6867
|
return;
|
|
6862
6868
|
}
|
|
6863
|
-
|
|
6869
|
+
w.warn("Cannot send: not connected");
|
|
6864
6870
|
}
|
|
6865
6871
|
/**
|
|
6866
6872
|
* Create a MessagePort that receives raw protocol message buffers.
|
|
@@ -6957,7 +6963,7 @@ class Dl {
|
|
|
6957
6963
|
return;
|
|
6958
6964
|
this.channelManager?.sendProtocolMessage(c);
|
|
6959
6965
|
} catch (c) {
|
|
6960
|
-
|
|
6966
|
+
w.warn(`Failed to forward protocol send port message: ${c}`);
|
|
6961
6967
|
}
|
|
6962
6968
|
};
|
|
6963
6969
|
try {
|
|
@@ -7013,11 +7019,11 @@ class Dl {
|
|
|
7013
7019
|
async authenticate() {
|
|
7014
7020
|
const e = this.abortController?.signal;
|
|
7015
7021
|
if (this.config.local)
|
|
7016
|
-
return
|
|
7022
|
+
return $a(this.config.local, e);
|
|
7017
7023
|
if (this.config.apiKey)
|
|
7018
|
-
return
|
|
7024
|
+
return Ya(this.config.apiKey, e);
|
|
7019
7025
|
if (this.config.sessionToken)
|
|
7020
|
-
return
|
|
7026
|
+
return ja(this.config.sessionToken, e);
|
|
7021
7027
|
throw new Error("No connection configuration provided (need local, apiKey, or sessionToken)");
|
|
7022
7028
|
}
|
|
7023
7029
|
/**
|
|
@@ -7032,7 +7038,7 @@ class Dl {
|
|
|
7032
7038
|
r === S.CORE_GLOBAL_STATE && Fo(e).then((s) => {
|
|
7033
7039
|
this._globalState = s, this._globalState.DebugMode && this.protocolWorker && this.protocolWorker.postMessage({ type: "enableDevtools", enabled: !0 }), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
|
|
7034
7040
|
}).catch((s) => {
|
|
7035
|
-
|
|
7041
|
+
w.error("Failed to parse GlobalState:", s);
|
|
7036
7042
|
}), this.notifyMessageSubscribers(e, r, n);
|
|
7037
7043
|
}
|
|
7038
7044
|
/**
|
|
@@ -7056,7 +7062,7 @@ class Dl {
|
|
|
7056
7062
|
}
|
|
7057
7063
|
s[a](e);
|
|
7058
7064
|
} catch (l) {
|
|
7059
|
-
|
|
7065
|
+
w.error("Message subscriber error:", l);
|
|
7060
7066
|
}
|
|
7061
7067
|
}
|
|
7062
7068
|
}
|
|
@@ -7073,7 +7079,7 @@ class Dl {
|
|
|
7073
7079
|
this.currentState === "connected" && this.setState("reconnecting");
|
|
7074
7080
|
break;
|
|
7075
7081
|
case "stopped":
|
|
7076
|
-
|
|
7082
|
+
w.info("Ikon server has stopped"), this.clearTimers(), this.setState("offline");
|
|
7077
7083
|
break;
|
|
7078
7084
|
case "offline":
|
|
7079
7085
|
this.currentState !== "idle" && (this.clearTimers(), this.setState("offline"));
|
|
@@ -7098,7 +7104,7 @@ class Dl {
|
|
|
7098
7104
|
try {
|
|
7099
7105
|
r(e);
|
|
7100
7106
|
} catch (n) {
|
|
7101
|
-
|
|
7107
|
+
w.error("State subscriber error:", n);
|
|
7102
7108
|
}
|
|
7103
7109
|
this.config.onConnectionStateChange?.(e);
|
|
7104
7110
|
}
|
|
@@ -7108,7 +7114,7 @@ class Dl {
|
|
|
7108
7114
|
* Use this for unrecoverable SDK internal errors.
|
|
7109
7115
|
*/
|
|
7110
7116
|
setErrorState(e) {
|
|
7111
|
-
|
|
7117
|
+
w.error("SDK error, going offline:", e), this._lastError = e, this.clearTimers(), this.cleanupLifecycleHandlers(), this.disconnectProtocol(), this.currentState = "offlineError", this.config.onConnectionStateChange?.("offlineError"), this.config.onError?.(e);
|
|
7112
7118
|
}
|
|
7113
7119
|
async connectProtocol(e) {
|
|
7114
7120
|
if (typeof Worker > "u") {
|
|
@@ -7117,9 +7123,9 @@ class Dl {
|
|
|
7117
7123
|
}
|
|
7118
7124
|
let r;
|
|
7119
7125
|
try {
|
|
7120
|
-
r = new
|
|
7126
|
+
r = new dl();
|
|
7121
7127
|
} catch (h) {
|
|
7122
|
-
|
|
7128
|
+
w.warn(`Failed to create protocol worker, falling back to main thread: ${h}`), await this.connectProtocolOnMainThread(e);
|
|
7123
7129
|
return;
|
|
7124
7130
|
}
|
|
7125
7131
|
this.channelManager = null, this.protocolWorker = r, this.workerManagerState = "idle";
|
|
@@ -7164,11 +7170,11 @@ class Dl {
|
|
|
7164
7170
|
try {
|
|
7165
7171
|
await n;
|
|
7166
7172
|
} catch (h) {
|
|
7167
|
-
|
|
7173
|
+
w.warn(`Protocol worker connect failed, falling back to main thread: ${h}`), this.disconnectProtocol(), await this.connectProtocolOnMainThread(e);
|
|
7168
7174
|
}
|
|
7169
7175
|
}
|
|
7170
7176
|
async connectProtocolOnMainThread(e) {
|
|
7171
|
-
this.workerManagerState = null, this.protocolWorker = null, this.channelManager = new
|
|
7177
|
+
this.workerManagerState = null, this.protocolWorker = null, this.channelManager = new va({
|
|
7172
7178
|
sessionId: this._sessionId,
|
|
7173
7179
|
keepaliveTimeoutMs: this.config.timeouts?.keepaliveTimeoutMs ?? qe,
|
|
7174
7180
|
reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ?? et,
|
|
@@ -7246,14 +7252,14 @@ class Dl {
|
|
|
7246
7252
|
* Close connection cleanly to avoid orphaned connections on the server.
|
|
7247
7253
|
*/
|
|
7248
7254
|
handleBeforeUnload() {
|
|
7249
|
-
|
|
7255
|
+
w.debug("Page unloading, closing connection..."), this.disconnect();
|
|
7250
7256
|
}
|
|
7251
7257
|
/**
|
|
7252
7258
|
* Handle page hide event (mobile-friendly, bfcache compatible).
|
|
7253
7259
|
* Only disconnect if page is actually being unloaded (not persisted).
|
|
7254
7260
|
*/
|
|
7255
7261
|
handlePageHide(e) {
|
|
7256
|
-
e.persisted || (
|
|
7262
|
+
e.persisted || (w.debug("Page hidden (not persisted), closing connection..."), this.disconnect());
|
|
7257
7263
|
}
|
|
7258
7264
|
/**
|
|
7259
7265
|
* Handle visibility change event.
|
|
@@ -7269,10 +7275,10 @@ class Dl {
|
|
|
7269
7275
|
*/
|
|
7270
7276
|
checkConnectionHealth() {
|
|
7271
7277
|
if (this.protocolWorker) {
|
|
7272
|
-
this.currentState === "connected" && this.workerManagerState !== "connected" && (
|
|
7278
|
+
this.currentState === "connected" && this.workerManagerState !== "connected" && (w.warn("Connection lost while page was backgrounded, reconnecting..."), this.setState("reconnecting"));
|
|
7273
7279
|
return;
|
|
7274
7280
|
}
|
|
7275
|
-
this.channelManager && this.currentState === "connected" && this.channelManager.managerState !== "connected" && (
|
|
7281
|
+
this.channelManager && this.currentState === "connected" && this.channelManager.managerState !== "connected" && (w.warn("Connection lost while page was backgrounded, reconnecting..."), this.setState("reconnecting"));
|
|
7276
7282
|
}
|
|
7277
7283
|
/**
|
|
7278
7284
|
* Try to handle joined state - only proceeds if both channels are connected and GlobalState is received.
|
|
@@ -7293,127 +7299,154 @@ class Dl {
|
|
|
7293
7299
|
const e = Qe(Je(), this._sessionId ?? 0);
|
|
7294
7300
|
this.sendProtocolMessage(e);
|
|
7295
7301
|
} catch (e) {
|
|
7296
|
-
|
|
7302
|
+
w.error("onJoined callback error:", e);
|
|
7297
7303
|
const r = Qe(Je(), this._sessionId ?? 0);
|
|
7298
7304
|
this.sendProtocolMessage(r);
|
|
7299
7305
|
}
|
|
7300
7306
|
}
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
|
|
7307
|
+
/**
|
|
7308
|
+
* Set up listener for external token from parent window.
|
|
7309
|
+
* Returns cleanup function to remove the listener.
|
|
7310
|
+
*/
|
|
7311
|
+
setupExternalTokenListener() {
|
|
7312
|
+
const e = (r) => {
|
|
7313
|
+
r.data?.type === "IKON_PREVIEW_TOKEN" && typeof r.data.serverUrl == "string" && (w.info("Received external token from parent window"), this.handleExternalToken(r.data.serverUrl).catch((n) => {
|
|
7314
|
+
w.error("Failed to connect with external token:", n), this.config.onError?.(n instanceof Error ? n : new Error(String(n))), this.setState("offlineError");
|
|
7315
|
+
}));
|
|
7316
|
+
};
|
|
7317
|
+
return window.addEventListener("message", e), w.debug("External token listener registered"), () => {
|
|
7318
|
+
window.removeEventListener("message", e), w.debug("External token listener removed");
|
|
7319
|
+
};
|
|
7320
|
+
}
|
|
7321
|
+
/**
|
|
7322
|
+
* Handle external token injection from parent window.
|
|
7323
|
+
*/
|
|
7324
|
+
async handleExternalToken(e) {
|
|
7325
|
+
if (this.currentState !== "waitingForToken")
|
|
7326
|
+
throw new Error(`Cannot connect with external token: already in state ${this.currentState}`);
|
|
7327
|
+
w.info("Connecting with external token");
|
|
7328
|
+
try {
|
|
7329
|
+
await this.executeConnection(() => Te(e, this.abortController.signal));
|
|
7330
|
+
} finally {
|
|
7331
|
+
this._externalTokenCleanup && (this._externalTokenCleanup(), this._externalTokenCleanup = null);
|
|
7332
|
+
}
|
|
7333
|
+
}
|
|
7304
7334
|
}
|
|
7305
7335
|
function Ol(t) {
|
|
7306
|
-
return t === "
|
|
7336
|
+
return t === "waitingForToken" || t === "connecting" || t === "connectingSlow" || t === "reconnecting";
|
|
7307
7337
|
}
|
|
7308
7338
|
function Ll(t) {
|
|
7309
|
-
return t === "
|
|
7339
|
+
return t === "connected";
|
|
7310
7340
|
}
|
|
7311
7341
|
function vl(t) {
|
|
7312
|
-
return t === "offlineError";
|
|
7342
|
+
return t === "offline" || t === "offlineError" || t === "idle";
|
|
7313
7343
|
}
|
|
7314
|
-
const vr = /* @__PURE__ */ new Map();
|
|
7315
|
-
for (const [t, e] of Object.entries(S))
|
|
7316
|
-
typeof e == "number" && vr.set(e, t);
|
|
7317
7344
|
function Pl(t) {
|
|
7318
|
-
return
|
|
7345
|
+
return t === "offlineError";
|
|
7319
7346
|
}
|
|
7320
|
-
const
|
|
7321
|
-
|
|
7322
|
-
|
|
7323
|
-
|
|
7347
|
+
const Fr = /* @__PURE__ */ new Map();
|
|
7348
|
+
for (const [t, e] of Object.entries(S))
|
|
7349
|
+
typeof e == "number" && Fr.set(e, t);
|
|
7350
|
+
function Fl(t) {
|
|
7351
|
+
return Fr.get(t) ?? `UNKNOWN_${t}`;
|
|
7324
7352
|
}
|
|
7353
|
+
const Br = 1e3, xr = _r.INFO;
|
|
7354
|
+
let O = [], Me = Br, Gr = xr, Oe = null;
|
|
7325
7355
|
function pl(t) {
|
|
7326
|
-
|
|
7356
|
+
t.level < Gr || (O.push(t), O.length > Me && (O = O.slice(-Me)));
|
|
7327
7357
|
}
|
|
7328
|
-
function
|
|
7329
|
-
Me = t;
|
|
7358
|
+
function Il(t) {
|
|
7359
|
+
Me = t?.maxBufferSize ?? Br, Gr = t?.minLevel ?? xr, O = [], ba(pl);
|
|
7330
7360
|
}
|
|
7331
|
-
function Bl() {
|
|
7361
|
+
function Bl(t) {
|
|
7362
|
+
Oe = t;
|
|
7363
|
+
}
|
|
7364
|
+
function xl() {
|
|
7332
7365
|
return O;
|
|
7333
7366
|
}
|
|
7334
|
-
function
|
|
7367
|
+
function ml() {
|
|
7335
7368
|
const t = O;
|
|
7336
7369
|
return O = [], t;
|
|
7337
7370
|
}
|
|
7338
7371
|
function Gl() {
|
|
7339
|
-
if (!
|
|
7372
|
+
if (!Oe || O.length === 0)
|
|
7340
7373
|
return 0;
|
|
7341
|
-
const t =
|
|
7342
|
-
return
|
|
7374
|
+
const t = ml();
|
|
7375
|
+
return Oe(t), t.length;
|
|
7343
7376
|
}
|
|
7344
|
-
function
|
|
7377
|
+
function Vl() {
|
|
7345
7378
|
O = [];
|
|
7346
7379
|
}
|
|
7347
|
-
function
|
|
7380
|
+
function Wl() {
|
|
7348
7381
|
return O.length;
|
|
7349
7382
|
}
|
|
7350
|
-
|
|
7383
|
+
Il();
|
|
7351
7384
|
export {
|
|
7352
7385
|
y as AuthenticationError,
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7386
|
+
La as Channel,
|
|
7387
|
+
va as ChannelManager,
|
|
7388
|
+
Tl as ChannelNotFoundError,
|
|
7356
7389
|
X as ClientType,
|
|
7357
|
-
|
|
7390
|
+
He as ConnectionError,
|
|
7358
7391
|
J as ContextType,
|
|
7359
7392
|
fl as EndpointSelector,
|
|
7360
7393
|
k as EntrypointType,
|
|
7361
|
-
|
|
7362
|
-
|
|
7394
|
+
gc as FunctionRegistry,
|
|
7395
|
+
bl as IKON_AUTH_BASE_URL,
|
|
7363
7396
|
nt as IKON_AUTH_URL_DEV,
|
|
7364
7397
|
rt as IKON_AUTH_URL_PROD,
|
|
7365
7398
|
pe as IKON_BACKEND_URL_DEV,
|
|
7366
|
-
|
|
7367
|
-
|
|
7399
|
+
ke as IKON_BACKEND_URL_PROD,
|
|
7400
|
+
rl as IkonAudioCapture,
|
|
7368
7401
|
ze as IkonAudioPlayback,
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
|
|
7373
|
-
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
|
|
7402
|
+
Ml as IkonClient,
|
|
7403
|
+
ol as IkonImageCapture,
|
|
7404
|
+
Jc as IkonMedia,
|
|
7405
|
+
hl as IkonMediaCapture,
|
|
7406
|
+
ul as IkonVideoCapture,
|
|
7407
|
+
Xc as IkonVideoPlayback,
|
|
7408
|
+
Ke as KeepaliveTimeoutError,
|
|
7409
|
+
_r as LogLevel,
|
|
7410
|
+
ga as MaxRetriesExceededError,
|
|
7411
|
+
wl as NoChannelsError,
|
|
7379
7412
|
S as Opcode,
|
|
7380
|
-
|
|
7381
|
-
|
|
7413
|
+
Ca as ProvisioningTimeoutError,
|
|
7414
|
+
Sl as SpaceNotFoundError,
|
|
7382
7415
|
W as TransportError,
|
|
7383
7416
|
Z as UserType,
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7417
|
+
_l as asProtocolMessage,
|
|
7418
|
+
gl as clearDeviceId,
|
|
7419
|
+
Vl as clearLogBuffer,
|
|
7387
7420
|
L as createLogger,
|
|
7388
|
-
|
|
7389
|
-
|
|
7390
|
-
|
|
7391
|
-
|
|
7421
|
+
Ul as deriveAuthUrl,
|
|
7422
|
+
kl as deriveBackendType,
|
|
7423
|
+
Rl as deriveBackendUrl,
|
|
7424
|
+
Cl as extractUserIdFromToken,
|
|
7392
7425
|
Gl as flushLogs,
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7426
|
+
xl as getBufferedLogs,
|
|
7427
|
+
Wl as getLogBufferSize,
|
|
7428
|
+
yl as getLogLevel,
|
|
7429
|
+
Nl as getLogSink,
|
|
7430
|
+
Fl as getOpcodeName,
|
|
7431
|
+
Ye as getOrCreateDeviceId,
|
|
7432
|
+
Il as initializeLogSink,
|
|
7433
|
+
Ur as isAudioWorkletSupported,
|
|
7401
7434
|
st as isBrowserEnvironment,
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
|
|
7406
|
-
|
|
7435
|
+
je as isCloudEnvironment,
|
|
7436
|
+
Ll as isConnected,
|
|
7437
|
+
Ol as isConnecting,
|
|
7438
|
+
Pl as isError,
|
|
7439
|
+
vl as isOffline,
|
|
7407
7440
|
le as isSharedArrayBufferSupported,
|
|
7408
|
-
|
|
7409
|
-
|
|
7441
|
+
Tr as isWebTransportSupported,
|
|
7442
|
+
Dl as parseUrlParams,
|
|
7410
7443
|
ue as readOpcode,
|
|
7411
7444
|
ce as readOpcodeGroup,
|
|
7412
7445
|
ne as readProtocolMessageHeaders,
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7446
|
+
Sc as registerBrowserFunctions,
|
|
7447
|
+
Al as setLogLevel,
|
|
7448
|
+
ba as setLogSink,
|
|
7449
|
+
Bl as setSendLogsCallback,
|
|
7450
|
+
ml as takeBufferedLogs,
|
|
7451
|
+
Cc as withResultData
|
|
7419
7452
|
};
|