@ikonai/sdk 1.0.4 → 1.0.5
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/assets/{audio-playback-worker-CGBVb9zd.js → audio-playback-worker-DPybcm1k.js} +235 -213
- package/assets/{protocol-worker-BnPqA34K.js → protocol-worker-DIKCgk1A.js} +69 -73
- package/assets/{video-capture-worker-y4Nlx7f9.js → video-capture-worker-DP3lFDjq.js} +62 -62
- package/assets/{video-playback-worker-Dylqg54c.js → video-playback-worker-qauTQ7Et.js} +274 -252
- package/index.js +824 -802
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
const xr = {
|
|
2
|
+
Compressed: 8
|
|
3
|
+
};
|
|
4
|
+
function ml(t) {
|
|
2
5
|
return t;
|
|
3
6
|
}
|
|
4
7
|
function ue(t) {
|
|
@@ -13,7 +16,7 @@ function ne(t) {
|
|
|
13
16
|
const e = se(t), r = new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
14
17
|
if (e.length < 27)
|
|
15
18
|
throw new Error("Protocol payload too short");
|
|
16
|
-
const n = r.getUint32(0, !0), s = r.getUint32(4, !0), i = r.getUint32(8, !0), o = r.getUint32(12, !0), a = r.getUint32(16, !0), c = r.getUint32(20, !0),
|
|
19
|
+
const n = r.getUint32(0, !0), s = r.getUint32(4, !0), i = r.getUint32(8, !0), o = r.getUint32(12, !0), a = r.getUint32(16, !0), c = r.getUint32(20, !0), l = r.getUint8(24), f = r.getUint8(25), d = r.getUint8(26);
|
|
17
20
|
if (27 + c * 4 > e.length)
|
|
18
21
|
throw new Error("Protocol header exceeds payload length");
|
|
19
22
|
const E = [];
|
|
@@ -27,30 +30,49 @@ function ne(t) {
|
|
|
27
30
|
trackId: o,
|
|
28
31
|
sequenceId: a,
|
|
29
32
|
targetIds: E,
|
|
30
|
-
payloadVersion:
|
|
33
|
+
payloadVersion: l,
|
|
31
34
|
payloadType: f,
|
|
32
35
|
flags: d
|
|
33
36
|
};
|
|
34
37
|
}
|
|
35
|
-
function
|
|
38
|
+
async function Oe(t, e, r) {
|
|
36
39
|
const n = se(t), s = ne(n);
|
|
37
40
|
if (e !== void 0 && s.opcode !== e)
|
|
38
41
|
throw new Error(`Unexpected opcode ${s.opcode}`);
|
|
39
42
|
if (s.payloadType !== 8)
|
|
40
43
|
throw new Error(`Unexpected payload type ${s.payloadType}`);
|
|
41
44
|
const i = 27 + s.targetIds.length * 4;
|
|
42
|
-
|
|
45
|
+
let o = n.subarray(i, s.length);
|
|
46
|
+
return (s.flags & xr.Compressed) !== 0 && (o = await Vr(o)), o;
|
|
43
47
|
}
|
|
44
48
|
function F(t, e, r, n, s) {
|
|
45
|
-
const i = s?.trackId ?? 0, o = s?.sequenceId ?? 0, a = s?.flags ?? 0, c = s?.targetIds ?? [],
|
|
46
|
-
E.setUint32(0, d, !0), E.setUint32(4, t >>> 0, !0), E.setUint32(8, n >>> 0, !0), E.setUint32(12, i >>> 0, !0), E.setUint32(16, o >>> 0, !0), E.setUint32(20, c.length >>> 0, !0), E.setUint8(24, r & 255), E.setUint8(25,
|
|
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);
|
|
50
|
+
E.setUint32(0, d, !0), E.setUint32(4, t >>> 0, !0), E.setUint32(8, n >>> 0, !0), E.setUint32(12, i >>> 0, !0), E.setUint32(16, o >>> 0, !0), E.setUint32(20, c.length >>> 0, !0), E.setUint8(24, r & 255), E.setUint8(25, l & 255), E.setUint8(26, a & 255);
|
|
47
51
|
let m = 27;
|
|
48
52
|
for (let I = 0; I < c.length; I++)
|
|
49
53
|
E.setUint32(m, c[I] >>> 0, !0), m += 4;
|
|
50
54
|
return h.set(e, f), h;
|
|
51
55
|
}
|
|
56
|
+
async function Vr(t) {
|
|
57
|
+
if (typeof DecompressionStream > "u")
|
|
58
|
+
throw new Error("DecompressionStream not supported");
|
|
59
|
+
const e = new DecompressionStream("gzip"), r = e.writable.getWriter(), n = new Uint8Array(t);
|
|
60
|
+
r.write(n), r.close();
|
|
61
|
+
const s = e.readable.getReader(), i = [];
|
|
62
|
+
let o = 0;
|
|
63
|
+
for (; ; ) {
|
|
64
|
+
const { done: l, value: f } = await s.read();
|
|
65
|
+
if (l) break;
|
|
66
|
+
i.push(f), o += f.length;
|
|
67
|
+
}
|
|
68
|
+
const a = new Uint8Array(o);
|
|
69
|
+
let c = 0;
|
|
70
|
+
for (let l = 0; l < i.length; l++)
|
|
71
|
+
a.set(i[l], c), c += i[l].length;
|
|
72
|
+
return a;
|
|
73
|
+
}
|
|
52
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 || {});
|
|
53
|
-
const ht = 161, dt = 162, he = new TextEncoder(),
|
|
75
|
+
const ht = 161, dt = 162, he = new TextEncoder(), Wr = new TextDecoder("utf-8", { fatal: !0 });
|
|
54
76
|
class D {
|
|
55
77
|
constructor(e = 1) {
|
|
56
78
|
this.version = e, this.buffer.writeByte(ht), this.buffer.writeVarUInt(e >>> 0);
|
|
@@ -105,7 +127,7 @@ class D {
|
|
|
105
127
|
this.writeVariableField(e, 9, i);
|
|
106
128
|
}
|
|
107
129
|
writeDictionaryField(e, r, n, s) {
|
|
108
|
-
const i = new
|
|
130
|
+
const i = new Le(r, n);
|
|
109
131
|
s(i);
|
|
110
132
|
const o = i.finish();
|
|
111
133
|
this.writeVariableField(e, 10, o);
|
|
@@ -120,7 +142,7 @@ class D {
|
|
|
120
142
|
this.writeFieldHeader(e, r, n.length), this.buffer.writeBytes(n);
|
|
121
143
|
}
|
|
122
144
|
writeFieldHeader(e, r, n) {
|
|
123
|
-
this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(de(r)),
|
|
145
|
+
this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(de(r)), jr(r) && this.buffer.writeVarUInt(n >>> 0);
|
|
124
146
|
}
|
|
125
147
|
}
|
|
126
148
|
class _e {
|
|
@@ -220,7 +242,7 @@ class _e {
|
|
|
220
242
|
10
|
|
221
243
|
/* Dict */
|
|
222
244
|
), this.count++;
|
|
223
|
-
const s = new
|
|
245
|
+
const s = new Le(e, r);
|
|
224
246
|
n(s);
|
|
225
247
|
const i = s.finish();
|
|
226
248
|
this.payload.writeBytes(i);
|
|
@@ -234,9 +256,9 @@ class _e {
|
|
|
234
256
|
throw new Error(`Array element type is ${b[this.elementType]}, expected ${b[e]}`);
|
|
235
257
|
}
|
|
236
258
|
}
|
|
237
|
-
class
|
|
259
|
+
class Le {
|
|
238
260
|
constructor(e, r) {
|
|
239
|
-
this.keyType = e, this.valueType = r,
|
|
261
|
+
this.keyType = e, this.valueType = r, Fe(e);
|
|
240
262
|
}
|
|
241
263
|
payload = new H();
|
|
242
264
|
count = 0;
|
|
@@ -244,7 +266,7 @@ class Oe {
|
|
|
244
266
|
beginEntry() {
|
|
245
267
|
if (this.entryOpen)
|
|
246
268
|
throw new Error("Previous dictionary entry not completed");
|
|
247
|
-
return this.count++, this.entryOpen = !0, new
|
|
269
|
+
return this.count++, this.entryOpen = !0, new Hr(this.keyType, this.valueType, this.payload, () => {
|
|
248
270
|
this.entryOpen = !1;
|
|
249
271
|
});
|
|
250
272
|
}
|
|
@@ -255,7 +277,7 @@ class Oe {
|
|
|
255
277
|
return e.writeByte(de(this.keyType)), e.writeByte(de(this.valueType)), e.writeVarUInt(this.count), e.writeBytes(this.payload.toUint8Array()), e.toUint8Array();
|
|
256
278
|
}
|
|
257
279
|
}
|
|
258
|
-
class
|
|
280
|
+
class Hr {
|
|
259
281
|
constructor(e, r, n, s) {
|
|
260
282
|
this.keyType = e, this.valueType = r, this.payload = n, this.onComplete = s;
|
|
261
283
|
}
|
|
@@ -425,7 +447,7 @@ class Vr {
|
|
|
425
447
|
10
|
|
426
448
|
/* Dict */
|
|
427
449
|
);
|
|
428
|
-
const s = new
|
|
450
|
+
const s = new Le(e, r);
|
|
429
451
|
n(s);
|
|
430
452
|
const i = s.finish();
|
|
431
453
|
this.payload.writeBytes(i), this.valueWritten = !0;
|
|
@@ -466,7 +488,7 @@ class z {
|
|
|
466
488
|
return null;
|
|
467
489
|
if (this.offset + 5 > this.buffer.length)
|
|
468
490
|
throw new Error("Teleport object truncated");
|
|
469
|
-
const e =
|
|
491
|
+
const e = zr(this.buffer, this.offset);
|
|
470
492
|
this.offset += 4;
|
|
471
493
|
const r = this.buffer[this.offset++], n = r >> 4 & 15;
|
|
472
494
|
if ((r & 15) !== 0)
|
|
@@ -479,7 +501,7 @@ class z {
|
|
|
479
501
|
const o = { offset: this.offset }, a = U(this.buffer, o, "InvalidLength");
|
|
480
502
|
C(this.buffer, o.offset, a), i = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
|
|
481
503
|
}
|
|
482
|
-
return new
|
|
504
|
+
return new $r(e, n, i);
|
|
483
505
|
}
|
|
484
506
|
}
|
|
485
507
|
class P {
|
|
@@ -544,7 +566,7 @@ class P {
|
|
|
544
566
|
return this.ensureType(
|
|
545
567
|
12
|
|
546
568
|
/* String */
|
|
547
|
-
),
|
|
569
|
+
), Wr.decode(this.payload);
|
|
548
570
|
}
|
|
549
571
|
asGuid() {
|
|
550
572
|
return this.ensureType(
|
|
@@ -562,20 +584,20 @@ class P {
|
|
|
562
584
|
return this.ensureType(
|
|
563
585
|
9
|
|
564
586
|
/* Array */
|
|
565
|
-
),
|
|
587
|
+
), ve.create(this.payload);
|
|
566
588
|
}
|
|
567
589
|
asDictionary() {
|
|
568
590
|
return this.ensureType(
|
|
569
591
|
10
|
|
570
592
|
/* Dict */
|
|
571
|
-
),
|
|
593
|
+
), Pe.create(this.payload);
|
|
572
594
|
}
|
|
573
595
|
ensureType(e) {
|
|
574
596
|
if (this.type !== e)
|
|
575
597
|
throw new Error(`Teleport value has type ${b[this.type]}, expected ${b[e]}`);
|
|
576
598
|
}
|
|
577
599
|
}
|
|
578
|
-
class
|
|
600
|
+
class $r extends P {
|
|
579
601
|
constructor(e, r, n) {
|
|
580
602
|
super(r, n), this.fieldId = e;
|
|
581
603
|
}
|
|
@@ -583,7 +605,7 @@ class Wr extends P {
|
|
|
583
605
|
return this.type === 1;
|
|
584
606
|
}
|
|
585
607
|
}
|
|
586
|
-
class
|
|
608
|
+
class ve {
|
|
587
609
|
payload;
|
|
588
610
|
elementType;
|
|
589
611
|
count;
|
|
@@ -599,7 +621,7 @@ class Le {
|
|
|
599
621
|
this.count = U(e, n, "ArrayMalformed"), this.offset = n.offset;
|
|
600
622
|
}
|
|
601
623
|
static create(e) {
|
|
602
|
-
return new
|
|
624
|
+
return new ve(se(e));
|
|
603
625
|
}
|
|
604
626
|
next() {
|
|
605
627
|
if (this.index >= this.count) {
|
|
@@ -639,11 +661,11 @@ class Le {
|
|
|
639
661
|
return this.offset = e.offset + r, new q(11, n);
|
|
640
662
|
}
|
|
641
663
|
case 9: {
|
|
642
|
-
const e =
|
|
664
|
+
const e = Be(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
643
665
|
return this.offset += e, new q(9, r);
|
|
644
666
|
}
|
|
645
667
|
case 10: {
|
|
646
|
-
const e =
|
|
668
|
+
const e = Ge(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
647
669
|
return this.offset += e, new q(10, r);
|
|
648
670
|
}
|
|
649
671
|
default:
|
|
@@ -656,7 +678,7 @@ class q extends P {
|
|
|
656
678
|
super(e, r);
|
|
657
679
|
}
|
|
658
680
|
}
|
|
659
|
-
class
|
|
681
|
+
class Pe {
|
|
660
682
|
payload;
|
|
661
683
|
keyType;
|
|
662
684
|
valueType;
|
|
@@ -668,12 +690,12 @@ class ve {
|
|
|
668
690
|
throw new Error("Dictionary payload too short");
|
|
669
691
|
if (this.keyType = e[0] >> 4 & 15, this.valueType = e[1] >> 4 & 15, (e[0] & 15) !== 0 || (e[1] & 15) !== 0)
|
|
670
692
|
throw new Error("Dictionary key/value flags must be zero");
|
|
671
|
-
|
|
693
|
+
Fe(this.keyType);
|
|
672
694
|
const r = { offset: 2 };
|
|
673
695
|
this.count = U(e, r, "DictMalformed"), this.offset = r.offset;
|
|
674
696
|
}
|
|
675
697
|
static create(e) {
|
|
676
|
-
return new
|
|
698
|
+
return new Pe(se(e));
|
|
677
699
|
}
|
|
678
700
|
next() {
|
|
679
701
|
if (this.index >= this.count) {
|
|
@@ -682,7 +704,7 @@ class ve {
|
|
|
682
704
|
return null;
|
|
683
705
|
}
|
|
684
706
|
const e = this.readKey(), r = this.readValue();
|
|
685
|
-
return this.index++, new
|
|
707
|
+
return this.index++, new Kr(e, r);
|
|
686
708
|
}
|
|
687
709
|
readKey() {
|
|
688
710
|
const e = Y(this.keyType);
|
|
@@ -715,11 +737,11 @@ class ve {
|
|
|
715
737
|
return this.offset = e.offset + r, new P(11, n);
|
|
716
738
|
}
|
|
717
739
|
case 9: {
|
|
718
|
-
const e =
|
|
740
|
+
const e = Be(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
719
741
|
return this.offset += e, new P(9, r);
|
|
720
742
|
}
|
|
721
743
|
case 10: {
|
|
722
|
-
const e =
|
|
744
|
+
const e = Ge(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
723
745
|
return this.offset += e, new P(10, r);
|
|
724
746
|
}
|
|
725
747
|
case 3:
|
|
@@ -741,7 +763,7 @@ class ve {
|
|
|
741
763
|
}
|
|
742
764
|
}
|
|
743
765
|
}
|
|
744
|
-
class
|
|
766
|
+
class Kr {
|
|
745
767
|
constructor(e, r) {
|
|
746
768
|
this.key = e, this.value = r;
|
|
747
769
|
}
|
|
@@ -785,8 +807,8 @@ class _ {
|
|
|
785
807
|
_.toHex(_.readUInt32LE(e, 0), 8),
|
|
786
808
|
_.toHex(_.readUInt16LE(e, 4), 4),
|
|
787
809
|
_.toHex(_.readUInt16LE(e, 6), 4),
|
|
788
|
-
|
|
789
|
-
|
|
810
|
+
Xe(e.subarray(8, 10)),
|
|
811
|
+
Xe(e.subarray(10, 16))
|
|
790
812
|
].join("-");
|
|
791
813
|
}
|
|
792
814
|
asBytes() {
|
|
@@ -875,7 +897,7 @@ function U(t, e, r) {
|
|
|
875
897
|
for (; e.offset < t.length; ) {
|
|
876
898
|
const o = t[e.offset++];
|
|
877
899
|
if (i++, n |= (o & 127) << s, (o & 128) === 0) {
|
|
878
|
-
if (i !==
|
|
900
|
+
if (i !== Yr(n))
|
|
879
901
|
throw new Error("Teleport VarUInt is not canonical");
|
|
880
902
|
return n >>> 0;
|
|
881
903
|
}
|
|
@@ -884,7 +906,7 @@ function U(t, e, r) {
|
|
|
884
906
|
}
|
|
885
907
|
throw new Error(r);
|
|
886
908
|
}
|
|
887
|
-
function
|
|
909
|
+
function Yr(t) {
|
|
888
910
|
return t < 128 ? 1 : t < 16384 ? 2 : t < 2097152 ? 3 : t < 268435456 ? 4 : 5;
|
|
889
911
|
}
|
|
890
912
|
function de(t, e = 0) {
|
|
@@ -892,7 +914,7 @@ function de(t, e = 0) {
|
|
|
892
914
|
throw new Error("Teleport flags must fit into 4 bits");
|
|
893
915
|
return (t & 15) << 4 | e & 15;
|
|
894
916
|
}
|
|
895
|
-
function
|
|
917
|
+
function jr(t) {
|
|
896
918
|
return t === 12 || t === 13 || t === 9 || t === 11 || t === 10;
|
|
897
919
|
}
|
|
898
920
|
function Y(t) {
|
|
@@ -915,7 +937,7 @@ function Y(t) {
|
|
|
915
937
|
return -1;
|
|
916
938
|
}
|
|
917
939
|
}
|
|
918
|
-
function
|
|
940
|
+
function Fe(t) {
|
|
919
941
|
if (t === 9 || t === 11 || t === 10 || t === 1)
|
|
920
942
|
throw new Error("Dictionary keys must be primitive Teleport types");
|
|
921
943
|
}
|
|
@@ -923,10 +945,10 @@ function C(t, e, r) {
|
|
|
923
945
|
if (e < 0 || r < 0 || e + r > t.length)
|
|
924
946
|
throw new Error("Teleport payload exceeds bounds");
|
|
925
947
|
}
|
|
926
|
-
function
|
|
948
|
+
function zr(t, e) {
|
|
927
949
|
return (t[e] | t[e + 1] << 8 | t[e + 2] << 16 | t[e + 3] << 24) >>> 0;
|
|
928
950
|
}
|
|
929
|
-
function
|
|
951
|
+
function Be(t, e) {
|
|
930
952
|
if (e >= t.length)
|
|
931
953
|
throw new Error("Array payload exceeds bounds");
|
|
932
954
|
const r = t[e], n = r >> 4 & 15;
|
|
@@ -939,23 +961,23 @@ function Fe(t, e) {
|
|
|
939
961
|
}
|
|
940
962
|
let a = s.offset;
|
|
941
963
|
for (let c = 0; c < i; c++)
|
|
942
|
-
a =
|
|
964
|
+
a = Ne(n, t, a, "ArrayMalformed");
|
|
943
965
|
return a - e;
|
|
944
966
|
}
|
|
945
|
-
function
|
|
967
|
+
function Ge(t, e) {
|
|
946
968
|
if (e + 2 > t.length)
|
|
947
969
|
throw new Error("Dictionary payload too short");
|
|
948
970
|
const r = t[e] >> 4 & 15, n = t[e + 1] >> 4 & 15;
|
|
949
971
|
if ((t[e] & 15) !== 0 || (t[e + 1] & 15) !== 0)
|
|
950
972
|
throw new Error("Dictionary key/value flags must be zero");
|
|
951
|
-
|
|
973
|
+
Fe(r);
|
|
952
974
|
const s = { offset: e + 2 }, i = U(t, s, "DictMalformed");
|
|
953
975
|
let o = s.offset;
|
|
954
976
|
for (let a = 0; a < i; a++)
|
|
955
|
-
o =
|
|
977
|
+
o = Ne(r, t, o, "DictMalformed"), o = Ne(n, t, o, "DictMalformed");
|
|
956
978
|
return o - e;
|
|
957
979
|
}
|
|
958
|
-
function
|
|
980
|
+
function Ne(t, e, r, n) {
|
|
959
981
|
const s = Y(t);
|
|
960
982
|
if (s >= 0)
|
|
961
983
|
return C(e, r, s), r + s;
|
|
@@ -970,86 +992,86 @@ function ye(t, e, r, n) {
|
|
|
970
992
|
return C(e, i.offset, o), i.offset + o;
|
|
971
993
|
}
|
|
972
994
|
case 9:
|
|
973
|
-
return r + Fe(e, r);
|
|
974
|
-
case 10:
|
|
975
995
|
return r + Be(e, r);
|
|
996
|
+
case 10:
|
|
997
|
+
return r + Ge(e, r);
|
|
976
998
|
default:
|
|
977
999
|
throw new Error(`Unsupported Teleport type ${b[t]}`);
|
|
978
1000
|
}
|
|
979
1001
|
}
|
|
980
|
-
function
|
|
1002
|
+
function Xe(t) {
|
|
981
1003
|
return Array.from(t).map((e) => e.toString(16).padStart(2, "0")).join("");
|
|
982
1004
|
}
|
|
983
1005
|
function se(t) {
|
|
984
1006
|
return t instanceof Uint8Array ? t : new Uint8Array(t);
|
|
985
1007
|
}
|
|
986
|
-
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 || {}), Ge = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(Ge || {}), 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.ANALYTICS_DEVTOOLS_CONSOLE_OUTPUT = 524297] = "ANALYTICS_DEVTOOLS_CONSOLE_OUTPUT", 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.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 || {});
|
|
987
|
-
const It = 1,
|
|
988
|
-
function
|
|
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 It = 1, Xr = 1048637, Jr = 727023925, Qr = 3395085689;
|
|
1010
|
+
function Zr(t) {
|
|
989
1011
|
const e = new D(It);
|
|
990
|
-
return
|
|
1012
|
+
return qr(t, e), e.finish();
|
|
991
1013
|
}
|
|
992
|
-
function
|
|
993
|
-
e.writeGuidField(
|
|
1014
|
+
function qr(t, e) {
|
|
1015
|
+
e.writeGuidField(Jr, t.ActionId), e.writeStringField(Qr, t.PayloadJson);
|
|
994
1016
|
}
|
|
995
|
-
function
|
|
996
|
-
const n =
|
|
997
|
-
return F(
|
|
1017
|
+
function en(t, e, r) {
|
|
1018
|
+
const n = Zr(t);
|
|
1019
|
+
return F(Xr, n, It, e, r);
|
|
998
1020
|
}
|
|
999
|
-
const
|
|
1000
|
-
function
|
|
1021
|
+
const tn = 467348717, rn = 972460562, nn = 1911490601, sn = 2603556958, on = 3609695522, an = 4094837378, cn = 4257460908;
|
|
1022
|
+
function ln(t) {
|
|
1001
1023
|
const e = {};
|
|
1002
1024
|
return mt(e), e;
|
|
1003
1025
|
}
|
|
1004
1026
|
function mt(t) {
|
|
1005
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;
|
|
1006
1028
|
}
|
|
1007
|
-
function
|
|
1008
|
-
const r = e ??
|
|
1009
|
-
return mt(r),
|
|
1029
|
+
function un(t, e) {
|
|
1030
|
+
const r = e ?? ln();
|
|
1031
|
+
return mt(r), hn(t, r), r;
|
|
1010
1032
|
}
|
|
1011
|
-
function
|
|
1033
|
+
function hn(t, e) {
|
|
1012
1034
|
let r;
|
|
1013
1035
|
for (; (r = t.next()) !== null; )
|
|
1014
1036
|
switch (r.fieldId) {
|
|
1015
|
-
case
|
|
1037
|
+
case tn: {
|
|
1016
1038
|
if (r.isNull) throw new Error();
|
|
1017
1039
|
e.EnumerationId = r.asGuid();
|
|
1018
1040
|
break;
|
|
1019
1041
|
}
|
|
1020
|
-
case
|
|
1042
|
+
case rn: {
|
|
1021
1043
|
if (r.isNull) throw new Error();
|
|
1022
1044
|
e.EnumerableItemTypeName = r.asString();
|
|
1023
1045
|
break;
|
|
1024
1046
|
}
|
|
1025
|
-
case
|
|
1047
|
+
case nn: {
|
|
1026
1048
|
if (r.isNull) throw new Error();
|
|
1027
1049
|
e.ValueJson = r.asString();
|
|
1028
1050
|
break;
|
|
1029
1051
|
}
|
|
1030
|
-
case
|
|
1052
|
+
case sn: {
|
|
1031
1053
|
if (r.isNull) throw new Error();
|
|
1032
1054
|
e.IsEnumerable = r.asBool();
|
|
1033
1055
|
break;
|
|
1034
1056
|
}
|
|
1035
|
-
case
|
|
1057
|
+
case on: {
|
|
1036
1058
|
if (r.isNull) throw new Error();
|
|
1037
1059
|
e.TypeName = r.asString();
|
|
1038
1060
|
break;
|
|
1039
1061
|
}
|
|
1040
|
-
case
|
|
1062
|
+
case an: {
|
|
1041
1063
|
if (r.isNull) throw new Error();
|
|
1042
1064
|
e.ValueData = r.asBinary();
|
|
1043
1065
|
break;
|
|
1044
1066
|
}
|
|
1045
|
-
case
|
|
1067
|
+
case cn: {
|
|
1046
1068
|
if (r.isNull) throw new Error();
|
|
1047
1069
|
e.ParameterIndex = r.asInt32();
|
|
1048
1070
|
break;
|
|
1049
1071
|
}
|
|
1050
1072
|
}
|
|
1051
1073
|
}
|
|
1052
|
-
const
|
|
1074
|
+
const dn = 265814330, fn = 1368629611, En = 2431514951, pn = 2914494629, In = 3284746250, mn = 4101844078;
|
|
1053
1075
|
function _t(t) {
|
|
1054
1076
|
const e = {};
|
|
1055
1077
|
return Tt(e), e;
|
|
@@ -1057,235 +1079,235 @@ function _t(t) {
|
|
|
1057
1079
|
function Tt(t) {
|
|
1058
1080
|
return t.Description = "", t.Codec = ft.Unknown, t.SampleRate = 0, t.Channels = 0, t.BitDepth = 0, t.ShapeSets = void 0, t;
|
|
1059
1081
|
}
|
|
1060
|
-
function
|
|
1082
|
+
function _n(t, e) {
|
|
1061
1083
|
const r = e ?? _t();
|
|
1062
|
-
return Tt(r),
|
|
1084
|
+
return Tt(r), Tn(t, r), r;
|
|
1063
1085
|
}
|
|
1064
|
-
function
|
|
1086
|
+
function Tn(t, e) {
|
|
1065
1087
|
let r;
|
|
1066
1088
|
for (; (r = t.next()) !== null; )
|
|
1067
1089
|
switch (r.fieldId) {
|
|
1068
|
-
case
|
|
1090
|
+
case dn: {
|
|
1069
1091
|
if (r.isNull) {
|
|
1070
1092
|
e.ShapeSets = void 0;
|
|
1071
1093
|
break;
|
|
1072
1094
|
}
|
|
1073
|
-
e.ShapeSets =
|
|
1095
|
+
e.ShapeSets = Sn(r.asArray());
|
|
1074
1096
|
break;
|
|
1075
1097
|
}
|
|
1076
|
-
case
|
|
1098
|
+
case fn: {
|
|
1077
1099
|
if (r.isNull) throw new Error();
|
|
1078
1100
|
e.Description = r.asString();
|
|
1079
1101
|
break;
|
|
1080
1102
|
}
|
|
1081
|
-
case
|
|
1103
|
+
case En: {
|
|
1082
1104
|
if (r.isNull) throw new Error();
|
|
1083
1105
|
e.Channels = r.asInt32();
|
|
1084
1106
|
break;
|
|
1085
1107
|
}
|
|
1086
|
-
case
|
|
1108
|
+
case pn: {
|
|
1087
1109
|
if (r.isNull) throw new Error();
|
|
1088
1110
|
e.BitDepth = r.asInt32();
|
|
1089
1111
|
break;
|
|
1090
1112
|
}
|
|
1091
|
-
case
|
|
1113
|
+
case In: {
|
|
1092
1114
|
if (r.isNull) throw new Error();
|
|
1093
1115
|
e.Codec = r.asInt32();
|
|
1094
1116
|
break;
|
|
1095
1117
|
}
|
|
1096
|
-
case
|
|
1118
|
+
case mn: {
|
|
1097
1119
|
if (r.isNull) throw new Error();
|
|
1098
1120
|
e.SampleRate = r.asInt32();
|
|
1099
1121
|
break;
|
|
1100
1122
|
}
|
|
1101
1123
|
}
|
|
1102
1124
|
}
|
|
1103
|
-
function
|
|
1125
|
+
function Sn(t) {
|
|
1104
1126
|
const e = [];
|
|
1105
1127
|
let r;
|
|
1106
1128
|
for (; (r = t.next()) !== null; )
|
|
1107
|
-
e.push(
|
|
1129
|
+
e.push(gn(r.asObject()));
|
|
1108
1130
|
return e;
|
|
1109
1131
|
}
|
|
1110
|
-
const
|
|
1111
|
-
function
|
|
1132
|
+
const wn = 1107713536, An = 1154362099, yn = 1185721362;
|
|
1133
|
+
function Nn(t) {
|
|
1112
1134
|
const e = {};
|
|
1113
1135
|
return St(e), e;
|
|
1114
1136
|
}
|
|
1115
1137
|
function St(t) {
|
|
1116
1138
|
return t.SetId = 0, t.Name = "", t.ShapeNames = [], t;
|
|
1117
1139
|
}
|
|
1118
|
-
function
|
|
1119
|
-
const r = e ??
|
|
1120
|
-
return St(r),
|
|
1140
|
+
function gn(t, e) {
|
|
1141
|
+
const r = e ?? Nn();
|
|
1142
|
+
return St(r), Cn(t, r), r;
|
|
1121
1143
|
}
|
|
1122
|
-
function
|
|
1144
|
+
function Cn(t, e) {
|
|
1123
1145
|
let r;
|
|
1124
1146
|
for (; (r = t.next()) !== null; )
|
|
1125
1147
|
switch (r.fieldId) {
|
|
1126
|
-
case
|
|
1148
|
+
case wn: {
|
|
1127
1149
|
if (r.isNull) throw new Error();
|
|
1128
1150
|
e.Name = r.asString();
|
|
1129
1151
|
break;
|
|
1130
1152
|
}
|
|
1131
|
-
case
|
|
1153
|
+
case An: {
|
|
1132
1154
|
if (r.isNull) throw new Error();
|
|
1133
1155
|
e.SetId = r.asUInt32();
|
|
1134
1156
|
break;
|
|
1135
1157
|
}
|
|
1136
|
-
case
|
|
1158
|
+
case yn: {
|
|
1137
1159
|
if (r.isNull) throw new Error();
|
|
1138
|
-
e.ShapeNames =
|
|
1160
|
+
e.ShapeNames = bn(r.asArray());
|
|
1139
1161
|
break;
|
|
1140
1162
|
}
|
|
1141
1163
|
}
|
|
1142
1164
|
}
|
|
1143
|
-
function
|
|
1165
|
+
function bn(t) {
|
|
1144
1166
|
const e = [];
|
|
1145
1167
|
let r;
|
|
1146
1168
|
for (; (r = t.next()) !== null; )
|
|
1147
1169
|
e.push(r.asString());
|
|
1148
1170
|
return e;
|
|
1149
1171
|
}
|
|
1150
|
-
const
|
|
1151
|
-
function
|
|
1172
|
+
const Rn = 76337612, kn = 185396121, Un = 388632637, Dn = 417197284, Mn = 469070965, On = 470595159, Ln = 781727218, vn = 834078886, Pn = 1043273762, Fn = 1236999138, Bn = 1368629611, Gn = 1715899485, xn = 1942830531, Vn = 1999510636, Wn = 2079864626, Hn = 2142346422, $n = 2598291686, Kn = 2719718823, Yn = 2810953526, jn = 2840065720, zn = 2885165957, Xn = 3586157513, Jn = 3717933110, Qn = 4062655306;
|
|
1173
|
+
function ge(t) {
|
|
1152
1174
|
const e = {};
|
|
1153
1175
|
return wt(e), e;
|
|
1154
1176
|
}
|
|
1155
1177
|
function wt(t) {
|
|
1156
|
-
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 =
|
|
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 = xe.Unknown, t;
|
|
1157
1179
|
}
|
|
1158
|
-
function
|
|
1159
|
-
const r = e ??
|
|
1160
|
-
return wt(r),
|
|
1180
|
+
function Ce(t, e) {
|
|
1181
|
+
const r = e ?? ge();
|
|
1182
|
+
return wt(r), Zn(t, r), r;
|
|
1161
1183
|
}
|
|
1162
|
-
function
|
|
1184
|
+
function Zn(t, e) {
|
|
1163
1185
|
let r;
|
|
1164
1186
|
for (; (r = t.next()) !== null; )
|
|
1165
1187
|
switch (r.fieldId) {
|
|
1166
|
-
case
|
|
1188
|
+
case Rn: {
|
|
1167
1189
|
if (r.isNull) throw new Error();
|
|
1168
1190
|
e.DeviceId = r.asString();
|
|
1169
1191
|
break;
|
|
1170
1192
|
}
|
|
1171
|
-
case
|
|
1193
|
+
case kn: {
|
|
1172
1194
|
if (r.isNull) throw new Error();
|
|
1173
1195
|
e.InstallId = r.asString();
|
|
1174
1196
|
break;
|
|
1175
1197
|
}
|
|
1176
|
-
case
|
|
1198
|
+
case Un: {
|
|
1177
1199
|
if (r.isNull) throw new Error();
|
|
1178
1200
|
e.UserAgent = r.asString();
|
|
1179
1201
|
break;
|
|
1180
1202
|
}
|
|
1181
|
-
case
|
|
1203
|
+
case Dn: {
|
|
1182
1204
|
if (r.isNull) throw new Error();
|
|
1183
1205
|
e.ContextType = r.asInt32();
|
|
1184
1206
|
break;
|
|
1185
1207
|
}
|
|
1186
|
-
case
|
|
1208
|
+
case Mn: {
|
|
1187
1209
|
if (r.isNull) throw new Error();
|
|
1188
1210
|
e.HasInput = r.asBool();
|
|
1189
1211
|
break;
|
|
1190
1212
|
}
|
|
1191
|
-
case
|
|
1213
|
+
case On: {
|
|
1192
1214
|
if (r.isNull) throw new Error();
|
|
1193
1215
|
e.UserType = r.asInt32();
|
|
1194
1216
|
break;
|
|
1195
1217
|
}
|
|
1196
|
-
case
|
|
1218
|
+
case Ln: {
|
|
1197
1219
|
if (r.isNull) throw new Error();
|
|
1198
1220
|
e.UserId = r.asString();
|
|
1199
1221
|
break;
|
|
1200
1222
|
}
|
|
1201
|
-
case
|
|
1223
|
+
case vn: {
|
|
1202
1224
|
if (r.isNull) throw new Error();
|
|
1203
1225
|
e.ProductId = r.asString();
|
|
1204
1226
|
break;
|
|
1205
1227
|
}
|
|
1206
|
-
case
|
|
1228
|
+
case Pn: {
|
|
1207
1229
|
if (r.isNull) throw new Error();
|
|
1208
1230
|
e.AuthSessionId = r.asString();
|
|
1209
1231
|
break;
|
|
1210
1232
|
}
|
|
1211
|
-
case
|
|
1233
|
+
case Fn: {
|
|
1212
1234
|
if (r.isNull) throw new Error();
|
|
1213
1235
|
e.ReceiveAllMessages = r.asBool();
|
|
1214
1236
|
break;
|
|
1215
1237
|
}
|
|
1216
|
-
case
|
|
1238
|
+
case Bn: {
|
|
1217
1239
|
if (r.isNull) throw new Error();
|
|
1218
1240
|
e.Description = r.asString();
|
|
1219
1241
|
break;
|
|
1220
1242
|
}
|
|
1221
|
-
case
|
|
1243
|
+
case Gn: {
|
|
1222
1244
|
if (r.isNull) throw new Error();
|
|
1223
1245
|
e.Locale = r.asString();
|
|
1224
1246
|
break;
|
|
1225
1247
|
}
|
|
1226
|
-
case
|
|
1248
|
+
case xn: {
|
|
1227
1249
|
if (r.isNull) throw new Error();
|
|
1228
1250
|
e.SdkType = r.asInt32();
|
|
1229
1251
|
break;
|
|
1230
1252
|
}
|
|
1231
|
-
case
|
|
1253
|
+
case Vn: {
|
|
1232
1254
|
if (r.isNull) throw new Error();
|
|
1233
1255
|
e.SessionId = r.asInt32();
|
|
1234
1256
|
break;
|
|
1235
1257
|
}
|
|
1236
|
-
case
|
|
1258
|
+
case Wn: {
|
|
1237
1259
|
if (r.isNull) throw new Error();
|
|
1238
1260
|
e.PreciseJoinedAt = r.asUInt64();
|
|
1239
1261
|
break;
|
|
1240
1262
|
}
|
|
1241
|
-
case
|
|
1263
|
+
case Hn: {
|
|
1242
1264
|
if (r.isNull) throw new Error();
|
|
1243
1265
|
e.PayloadType = r.asInt32();
|
|
1244
1266
|
break;
|
|
1245
1267
|
}
|
|
1246
|
-
case
|
|
1268
|
+
case $n: {
|
|
1247
1269
|
if (r.isNull) throw new Error();
|
|
1248
1270
|
e.VersionId = r.asString();
|
|
1249
1271
|
break;
|
|
1250
1272
|
}
|
|
1251
|
-
case
|
|
1273
|
+
case Kn: {
|
|
1252
1274
|
if (r.isNull) throw new Error();
|
|
1253
1275
|
e.UniqueSessionId = r.asString();
|
|
1254
1276
|
break;
|
|
1255
1277
|
}
|
|
1256
|
-
case
|
|
1278
|
+
case Yn: {
|
|
1257
1279
|
if (r.isNull) throw new Error();
|
|
1258
1280
|
e.ClientType = r.asInt32();
|
|
1259
1281
|
break;
|
|
1260
1282
|
}
|
|
1261
|
-
case
|
|
1283
|
+
case jn: {
|
|
1262
1284
|
if (r.isNull) throw new Error();
|
|
1263
1285
|
e.IsReady = r.asBool();
|
|
1264
1286
|
break;
|
|
1265
1287
|
}
|
|
1266
|
-
case
|
|
1288
|
+
case zn: {
|
|
1267
1289
|
if (r.isNull) throw new Error();
|
|
1268
|
-
e.Parameters =
|
|
1290
|
+
e.Parameters = qn(r.asDictionary());
|
|
1269
1291
|
break;
|
|
1270
1292
|
}
|
|
1271
|
-
case
|
|
1293
|
+
case Xn: {
|
|
1272
1294
|
if (r.isNull) throw new Error();
|
|
1273
1295
|
e.IsInternal = r.asBool();
|
|
1274
1296
|
break;
|
|
1275
1297
|
}
|
|
1276
|
-
case
|
|
1298
|
+
case Jn: {
|
|
1277
1299
|
if (r.isNull) throw new Error();
|
|
1278
1300
|
e.ChannelLocale = r.asString();
|
|
1279
1301
|
break;
|
|
1280
1302
|
}
|
|
1281
|
-
case
|
|
1303
|
+
case Qn: {
|
|
1282
1304
|
if (r.isNull) throw new Error();
|
|
1283
1305
|
e.EmbeddedSpaceId = r.asString();
|
|
1284
1306
|
break;
|
|
1285
1307
|
}
|
|
1286
1308
|
}
|
|
1287
1309
|
}
|
|
1288
|
-
function
|
|
1310
|
+
function qn(t) {
|
|
1289
1311
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1290
1312
|
let r;
|
|
1291
1313
|
for (; (r = t.next()) !== null; ) {
|
|
@@ -1294,138 +1316,138 @@ function Qn(t) {
|
|
|
1294
1316
|
}
|
|
1295
1317
|
return e;
|
|
1296
1318
|
}
|
|
1297
|
-
const
|
|
1298
|
-
function
|
|
1319
|
+
const es = 746516514, ts = 877841741, rs = 1175184220, ns = 1368629611, ss = 2341021724, is = 3167053791, os = 3686066300;
|
|
1320
|
+
function as(t) {
|
|
1299
1321
|
const e = {};
|
|
1300
1322
|
return At(e), e;
|
|
1301
1323
|
}
|
|
1302
1324
|
function At(t) {
|
|
1303
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;
|
|
1304
1326
|
}
|
|
1305
|
-
function
|
|
1306
|
-
const r = e ??
|
|
1307
|
-
return At(r),
|
|
1327
|
+
function cs(t, e) {
|
|
1328
|
+
const r = e ?? as();
|
|
1329
|
+
return At(r), ls(t, r), r;
|
|
1308
1330
|
}
|
|
1309
|
-
function
|
|
1331
|
+
function ls(t, e) {
|
|
1310
1332
|
let r;
|
|
1311
1333
|
for (; (r = t.next()) !== null; )
|
|
1312
1334
|
switch (r.fieldId) {
|
|
1313
|
-
case
|
|
1335
|
+
case es: {
|
|
1314
1336
|
if (r.isNull) throw new Error();
|
|
1315
1337
|
e.AuthTicket = r.asBinary();
|
|
1316
1338
|
break;
|
|
1317
1339
|
}
|
|
1318
|
-
case
|
|
1340
|
+
case ts: {
|
|
1319
1341
|
if (r.isNull) throw new Error();
|
|
1320
1342
|
e.Priority = r.asInt32();
|
|
1321
1343
|
break;
|
|
1322
1344
|
}
|
|
1323
|
-
case
|
|
1345
|
+
case rs: {
|
|
1324
1346
|
if (r.isNull) throw new Error();
|
|
1325
1347
|
e.OpcodeGroupsFromServer = r.asInt32();
|
|
1326
1348
|
break;
|
|
1327
1349
|
}
|
|
1328
|
-
case
|
|
1350
|
+
case ns: {
|
|
1329
1351
|
if (r.isNull) throw new Error();
|
|
1330
1352
|
e.Description = r.asString();
|
|
1331
1353
|
break;
|
|
1332
1354
|
}
|
|
1333
|
-
case
|
|
1355
|
+
case ss: {
|
|
1334
1356
|
if (r.isNull) throw new Error();
|
|
1335
1357
|
e.Uri = r.asString();
|
|
1336
1358
|
break;
|
|
1337
1359
|
}
|
|
1338
|
-
case
|
|
1360
|
+
case is: {
|
|
1339
1361
|
if (r.isNull) throw new Error();
|
|
1340
1362
|
e.Type = r.asInt32();
|
|
1341
1363
|
break;
|
|
1342
1364
|
}
|
|
1343
|
-
case
|
|
1365
|
+
case os: {
|
|
1344
1366
|
if (r.isNull) throw new Error();
|
|
1345
1367
|
e.OpcodeGroupsToServer = r.asInt32();
|
|
1346
1368
|
break;
|
|
1347
1369
|
}
|
|
1348
1370
|
}
|
|
1349
1371
|
}
|
|
1350
|
-
const
|
|
1351
|
-
function
|
|
1372
|
+
const us = 65537, hs = 166277978, ds = 1482635149, fs = 1559330978, Es = 2802434353, ps = 3085883711, Is = 3669484338, ms = 3707543140, _s = 3712281496, Ts = 4160646707;
|
|
1373
|
+
function Ss(t) {
|
|
1352
1374
|
const e = {};
|
|
1353
1375
|
return yt(e), e;
|
|
1354
1376
|
}
|
|
1355
1377
|
function yt(t) {
|
|
1356
|
-
return t.ClientContext =
|
|
1378
|
+
return t.ClientContext = ge(), t.ServerContext = ge(), t.CertHash = "", t.Entrypoints = [], t.FeatureFlags = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.PrimaryUserId = "", t.ChannelTemplateId = "", t;
|
|
1357
1379
|
}
|
|
1358
|
-
function
|
|
1380
|
+
function ws(t, e) {
|
|
1359
1381
|
const r = z.create(t);
|
|
1360
|
-
return
|
|
1382
|
+
return As(r, e);
|
|
1361
1383
|
}
|
|
1362
|
-
function
|
|
1363
|
-
const r = e ??
|
|
1364
|
-
return yt(r),
|
|
1384
|
+
function As(t, e) {
|
|
1385
|
+
const r = e ?? Ss();
|
|
1386
|
+
return yt(r), ys(t, r), r;
|
|
1365
1387
|
}
|
|
1366
|
-
function
|
|
1388
|
+
function ys(t, e) {
|
|
1367
1389
|
let r;
|
|
1368
1390
|
for (; (r = t.next()) !== null; )
|
|
1369
1391
|
switch (r.fieldId) {
|
|
1370
|
-
case
|
|
1392
|
+
case hs: {
|
|
1371
1393
|
if (r.isNull) throw new Error();
|
|
1372
1394
|
e.CertHash = r.asString();
|
|
1373
1395
|
break;
|
|
1374
1396
|
}
|
|
1375
|
-
case
|
|
1397
|
+
case ds: {
|
|
1376
1398
|
if (r.isNull) throw new Error();
|
|
1377
|
-
e.Entrypoints =
|
|
1399
|
+
e.Entrypoints = gs(r.asArray());
|
|
1378
1400
|
break;
|
|
1379
1401
|
}
|
|
1380
|
-
case
|
|
1402
|
+
case fs: {
|
|
1381
1403
|
if (r.isNull) throw new Error();
|
|
1382
1404
|
e.ChannelId = r.asString();
|
|
1383
1405
|
break;
|
|
1384
1406
|
}
|
|
1385
|
-
case
|
|
1407
|
+
case Es: {
|
|
1386
1408
|
if (r.isNull) throw new Error();
|
|
1387
|
-
e.ClientContext =
|
|
1409
|
+
e.ClientContext = Ce(r.asObject());
|
|
1388
1410
|
break;
|
|
1389
1411
|
}
|
|
1390
|
-
case
|
|
1412
|
+
case ps: {
|
|
1391
1413
|
if (r.isNull) throw new Error();
|
|
1392
|
-
e.ServerContext =
|
|
1414
|
+
e.ServerContext = Ce(r.asObject());
|
|
1393
1415
|
break;
|
|
1394
1416
|
}
|
|
1395
|
-
case
|
|
1417
|
+
case Is: {
|
|
1396
1418
|
if (r.isNull) throw new Error();
|
|
1397
|
-
e.FeatureFlags =
|
|
1419
|
+
e.FeatureFlags = Cs(r.asDictionary());
|
|
1398
1420
|
break;
|
|
1399
1421
|
}
|
|
1400
|
-
case
|
|
1422
|
+
case ms: {
|
|
1401
1423
|
if (r.isNull) throw new Error();
|
|
1402
1424
|
e.SpaceId = r.asString();
|
|
1403
1425
|
break;
|
|
1404
1426
|
}
|
|
1405
|
-
case
|
|
1427
|
+
case _s: {
|
|
1406
1428
|
if (r.isNull) throw new Error();
|
|
1407
1429
|
e.PrimaryUserId = r.asString();
|
|
1408
1430
|
break;
|
|
1409
1431
|
}
|
|
1410
|
-
case
|
|
1432
|
+
case Ts: {
|
|
1411
1433
|
if (r.isNull) throw new Error();
|
|
1412
1434
|
e.ChannelTemplateId = r.asString();
|
|
1413
1435
|
break;
|
|
1414
1436
|
}
|
|
1415
1437
|
}
|
|
1416
1438
|
}
|
|
1417
|
-
function
|
|
1418
|
-
const r =
|
|
1419
|
-
return
|
|
1439
|
+
async function Ns(t, e) {
|
|
1440
|
+
const r = await Oe(t, us);
|
|
1441
|
+
return ws(r, e);
|
|
1420
1442
|
}
|
|
1421
|
-
function
|
|
1443
|
+
function gs(t) {
|
|
1422
1444
|
const e = [];
|
|
1423
1445
|
let r;
|
|
1424
1446
|
for (; (r = t.next()) !== null; )
|
|
1425
|
-
e.push(
|
|
1447
|
+
e.push(cs(r.asObject()));
|
|
1426
1448
|
return e;
|
|
1427
1449
|
}
|
|
1428
|
-
function
|
|
1450
|
+
function Cs(t) {
|
|
1429
1451
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1430
1452
|
let r;
|
|
1431
1453
|
for (; (r = t.next()) !== null; ) {
|
|
@@ -1434,179 +1456,179 @@ function Ns(t) {
|
|
|
1434
1456
|
}
|
|
1435
1457
|
return e;
|
|
1436
1458
|
}
|
|
1437
|
-
function
|
|
1459
|
+
function bs(t) {
|
|
1438
1460
|
const e = {};
|
|
1439
|
-
return
|
|
1461
|
+
return Rs(e), t && Object.assign(e, t), e;
|
|
1440
1462
|
}
|
|
1441
|
-
function
|
|
1442
|
-
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 Rs(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 = xe.Unknown, t;
|
|
1443
1465
|
}
|
|
1444
|
-
const Nt = 1,
|
|
1445
|
-
function
|
|
1466
|
+
const Nt = 1, ks = 1048632, Us = 3748161056, Ds = 4289118421;
|
|
1467
|
+
function Ms(t) {
|
|
1446
1468
|
const e = {};
|
|
1447
|
-
return
|
|
1469
|
+
return Os(e), t && Object.assign(e, t), e;
|
|
1448
1470
|
}
|
|
1449
|
-
function
|
|
1471
|
+
function Os(t) {
|
|
1450
1472
|
return t.CallId = _.fromBytes(new Uint8Array(16)), t.InstanceId = _.fromBytes(new Uint8Array(16)), t;
|
|
1451
1473
|
}
|
|
1452
|
-
function
|
|
1474
|
+
function Ls(t) {
|
|
1453
1475
|
const e = new D(Nt);
|
|
1454
|
-
return
|
|
1476
|
+
return vs(t, e), e.finish();
|
|
1455
1477
|
}
|
|
1456
|
-
function
|
|
1457
|
-
e.writeGuidField(
|
|
1478
|
+
function vs(t, e) {
|
|
1479
|
+
e.writeGuidField(Us, t.CallId), e.writeGuidField(Ds, t.InstanceId);
|
|
1458
1480
|
}
|
|
1459
|
-
function
|
|
1460
|
-
const n =
|
|
1461
|
-
return F(
|
|
1481
|
+
function Ps(t, e, r) {
|
|
1482
|
+
const n = Ls(t);
|
|
1483
|
+
return F(ks, n, Nt, e, r);
|
|
1462
1484
|
}
|
|
1463
|
-
const
|
|
1464
|
-
function
|
|
1485
|
+
const Fs = 1048601, Bs = 112005851, Gs = 814454131, xs = 976255570, Vs = 1123310456, Ws = 2885165957, Hs = 3748161056, $s = 4289118421;
|
|
1486
|
+
function Ks(t) {
|
|
1465
1487
|
const e = {};
|
|
1466
1488
|
return gt(e), e;
|
|
1467
1489
|
}
|
|
1468
1490
|
function gt(t) {
|
|
1469
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;
|
|
1470
1492
|
}
|
|
1471
|
-
function
|
|
1493
|
+
function Ys(t, e) {
|
|
1472
1494
|
const r = z.create(t);
|
|
1473
|
-
return
|
|
1495
|
+
return js(r, e);
|
|
1474
1496
|
}
|
|
1475
|
-
function
|
|
1476
|
-
const r = e ??
|
|
1477
|
-
return gt(r),
|
|
1497
|
+
function js(t, e) {
|
|
1498
|
+
const r = e ?? Ks();
|
|
1499
|
+
return gt(r), zs(t, r), r;
|
|
1478
1500
|
}
|
|
1479
|
-
function
|
|
1501
|
+
function zs(t, e) {
|
|
1480
1502
|
let r;
|
|
1481
1503
|
for (; (r = t.next()) !== null; )
|
|
1482
1504
|
switch (r.fieldId) {
|
|
1483
|
-
case
|
|
1505
|
+
case Bs: {
|
|
1484
1506
|
if (r.isNull) throw new Error();
|
|
1485
|
-
e.Scopes =
|
|
1507
|
+
e.Scopes = Js(r.asArray());
|
|
1486
1508
|
break;
|
|
1487
1509
|
}
|
|
1488
|
-
case
|
|
1510
|
+
case Gs: {
|
|
1489
1511
|
if (r.isNull) throw new Error();
|
|
1490
1512
|
e.FunctionName = r.asString();
|
|
1491
1513
|
break;
|
|
1492
1514
|
}
|
|
1493
|
-
case
|
|
1515
|
+
case xs: {
|
|
1494
1516
|
if (r.isNull) throw new Error();
|
|
1495
1517
|
e.FunctionId = r.asGuid();
|
|
1496
1518
|
break;
|
|
1497
1519
|
}
|
|
1498
|
-
case
|
|
1520
|
+
case Vs: {
|
|
1499
1521
|
if (r.isNull) throw new Error();
|
|
1500
1522
|
e.ClientBackendToken = r.asString();
|
|
1501
1523
|
break;
|
|
1502
1524
|
}
|
|
1503
|
-
case
|
|
1525
|
+
case Ws: {
|
|
1504
1526
|
if (r.isNull) throw new Error();
|
|
1505
|
-
e.Parameters =
|
|
1527
|
+
e.Parameters = Qs(r.asArray());
|
|
1506
1528
|
break;
|
|
1507
1529
|
}
|
|
1508
|
-
case
|
|
1530
|
+
case Hs: {
|
|
1509
1531
|
if (r.isNull) throw new Error();
|
|
1510
1532
|
e.CallId = r.asGuid();
|
|
1511
1533
|
break;
|
|
1512
1534
|
}
|
|
1513
|
-
case
|
|
1535
|
+
case $s: {
|
|
1514
1536
|
if (r.isNull) throw new Error();
|
|
1515
1537
|
e.InstanceId = r.asGuid();
|
|
1516
1538
|
break;
|
|
1517
1539
|
}
|
|
1518
1540
|
}
|
|
1519
1541
|
}
|
|
1520
|
-
function
|
|
1521
|
-
const r =
|
|
1522
|
-
return
|
|
1542
|
+
async function Xs(t, e) {
|
|
1543
|
+
const r = await Oe(t, Fs);
|
|
1544
|
+
return Ys(r, e);
|
|
1523
1545
|
}
|
|
1524
|
-
function
|
|
1546
|
+
function Js(t) {
|
|
1525
1547
|
const e = [];
|
|
1526
1548
|
let r;
|
|
1527
1549
|
for (; (r = t.next()) !== null; )
|
|
1528
|
-
e.push(
|
|
1550
|
+
e.push(ti(r.asObject()));
|
|
1529
1551
|
return e;
|
|
1530
1552
|
}
|
|
1531
|
-
function
|
|
1553
|
+
function Qs(t) {
|
|
1532
1554
|
const e = [];
|
|
1533
1555
|
let r;
|
|
1534
1556
|
for (; (r = t.next()) !== null; )
|
|
1535
|
-
e.push(
|
|
1557
|
+
e.push(un(r.asObject()));
|
|
1536
1558
|
return e;
|
|
1537
1559
|
}
|
|
1538
|
-
const
|
|
1539
|
-
function
|
|
1560
|
+
const Zs = 2994044322, qs = 3167053791;
|
|
1561
|
+
function ei(t) {
|
|
1540
1562
|
const e = {};
|
|
1541
1563
|
return Ct(e), e;
|
|
1542
1564
|
}
|
|
1543
1565
|
function Ct(t) {
|
|
1544
1566
|
return t.Type = "", t.Id = "", t;
|
|
1545
1567
|
}
|
|
1546
|
-
function
|
|
1547
|
-
const r = e ??
|
|
1548
|
-
return Ct(r),
|
|
1568
|
+
function ti(t, e) {
|
|
1569
|
+
const r = e ?? ei();
|
|
1570
|
+
return Ct(r), ri(t, r), r;
|
|
1549
1571
|
}
|
|
1550
|
-
function
|
|
1572
|
+
function ri(t, e) {
|
|
1551
1573
|
let r;
|
|
1552
1574
|
for (; (r = t.next()) !== null; )
|
|
1553
1575
|
switch (r.fieldId) {
|
|
1554
|
-
case
|
|
1576
|
+
case Zs: {
|
|
1555
1577
|
if (r.isNull) throw new Error();
|
|
1556
1578
|
e.Id = r.asString();
|
|
1557
1579
|
break;
|
|
1558
1580
|
}
|
|
1559
|
-
case
|
|
1581
|
+
case qs: {
|
|
1560
1582
|
if (r.isNull) throw new Error();
|
|
1561
1583
|
e.Type = r.asString();
|
|
1562
1584
|
break;
|
|
1563
1585
|
}
|
|
1564
1586
|
}
|
|
1565
1587
|
}
|
|
1566
|
-
const bt = 1,
|
|
1567
|
-
function
|
|
1588
|
+
const bt = 1, ni = 1048631, si = 2205234621, ii = 2838554230, oi = 3748161056, ai = 4194102057, ci = 4289118421;
|
|
1589
|
+
function li(t) {
|
|
1568
1590
|
const e = {};
|
|
1569
|
-
return
|
|
1591
|
+
return ui(e), t && Object.assign(e, t), e;
|
|
1570
1592
|
}
|
|
1571
|
-
function
|
|
1593
|
+
function ui(t) {
|
|
1572
1594
|
return t.CallId = _.fromBytes(new Uint8Array(16)), t.InstanceId = _.fromBytes(new Uint8Array(16)), t.ErrorMessage = "", t.ErrorTypeName = "", t.StackTrace = "", t;
|
|
1573
1595
|
}
|
|
1574
|
-
function
|
|
1596
|
+
function hi(t) {
|
|
1575
1597
|
const e = new D(bt);
|
|
1576
|
-
return
|
|
1598
|
+
return di(t, e), e.finish();
|
|
1577
1599
|
}
|
|
1578
|
-
function
|
|
1579
|
-
e.writeStringField(
|
|
1600
|
+
function di(t, e) {
|
|
1601
|
+
e.writeStringField(si, t.ErrorTypeName), e.writeStringField(ii, t.ErrorMessage), e.writeGuidField(oi, t.CallId), e.writeStringField(ai, t.StackTrace), e.writeGuidField(ci, t.InstanceId);
|
|
1580
1602
|
}
|
|
1581
|
-
function
|
|
1582
|
-
const n =
|
|
1583
|
-
return F(
|
|
1603
|
+
function fi(t, e, r) {
|
|
1604
|
+
const n = hi(t);
|
|
1605
|
+
return F(ni, n, bt, e, r);
|
|
1584
1606
|
}
|
|
1585
|
-
const
|
|
1586
|
-
function
|
|
1607
|
+
const Ve = 1, Ei = 1048600, Rt = 703025676, kt = 814454131, Ut = 972460562, Dt = 976255570, Mt = 1368629611, Ot = 1479280922, Lt = 1533537016, vt = 2274386296, Pt = 2603556958, Ft = 2885165957, Bt = 3568439632;
|
|
1608
|
+
function pi(t) {
|
|
1587
1609
|
const e = {};
|
|
1588
1610
|
return Gt(e), e;
|
|
1589
1611
|
}
|
|
1590
1612
|
function Gt(t) {
|
|
1591
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;
|
|
1592
1614
|
}
|
|
1593
|
-
function
|
|
1594
|
-
const e = new D(
|
|
1615
|
+
function Ii(t) {
|
|
1616
|
+
const e = new D(Ve);
|
|
1595
1617
|
return xt(t, e), e.finish();
|
|
1596
1618
|
}
|
|
1597
1619
|
function xt(t, e) {
|
|
1598
1620
|
e.writeStringField(Rt, t.ResultTypeName), e.writeStringField(kt, t.FunctionName), e.writeStringField(Ut, t.EnumerableItemTypeName), e.writeGuidField(Dt, t.FunctionId), e.writeStringField(Mt, t.Description), e.writeBoolField(Ot, t.IsCancellable), e.writeBoolField(Lt, t.RequiresInstance), e.writeBoolField(vt, t.LlmInlineResult), e.writeBoolField(Pt, t.IsEnumerable), e.writeArrayField(Ft, b.Object, (r) => {
|
|
1599
1621
|
for (const n of t.Parameters)
|
|
1600
|
-
r.writeObject(
|
|
1601
|
-
|
|
1622
|
+
r.writeObject(wi, (s) => {
|
|
1623
|
+
yi(n, s);
|
|
1602
1624
|
});
|
|
1603
1625
|
}), e.writeBoolField(Bt, t.LlmCallOnlyOnce);
|
|
1604
1626
|
}
|
|
1605
|
-
function
|
|
1606
|
-
const r = e ??
|
|
1607
|
-
return Gt(r),
|
|
1627
|
+
function mi(t, e) {
|
|
1628
|
+
const r = e ?? pi();
|
|
1629
|
+
return Gt(r), _i(t, r), r;
|
|
1608
1630
|
}
|
|
1609
|
-
function
|
|
1631
|
+
function _i(t, e) {
|
|
1610
1632
|
let r;
|
|
1611
1633
|
for (; (r = t.next()) !== null; )
|
|
1612
1634
|
switch (r.fieldId) {
|
|
@@ -1657,7 +1679,7 @@ function Ii(t, e) {
|
|
|
1657
1679
|
}
|
|
1658
1680
|
case Ft: {
|
|
1659
1681
|
if (r.isNull) throw new Error();
|
|
1660
|
-
e.Parameters =
|
|
1682
|
+
e.Parameters = Si(r.asArray());
|
|
1661
1683
|
break;
|
|
1662
1684
|
}
|
|
1663
1685
|
case Bt: {
|
|
@@ -1667,33 +1689,33 @@ function Ii(t, e) {
|
|
|
1667
1689
|
}
|
|
1668
1690
|
}
|
|
1669
1691
|
}
|
|
1670
|
-
function
|
|
1671
|
-
const n =
|
|
1672
|
-
return F(
|
|
1692
|
+
function Ti(t, e, r) {
|
|
1693
|
+
const n = Ii(t);
|
|
1694
|
+
return F(Ei, n, Ve, e, r);
|
|
1673
1695
|
}
|
|
1674
|
-
function
|
|
1696
|
+
function Si(t) {
|
|
1675
1697
|
const e = [];
|
|
1676
1698
|
let r;
|
|
1677
1699
|
for (; (r = t.next()) !== null; )
|
|
1678
|
-
e.push(
|
|
1700
|
+
e.push(Ni(r.asObject()));
|
|
1679
1701
|
return e;
|
|
1680
1702
|
}
|
|
1681
|
-
const
|
|
1682
|
-
function
|
|
1703
|
+
const wi = 1, Vt = 607861992, Wt = 894485888, Ht = 972460562, $t = 1368629611, Kt = 1883521406, Yt = 2603556958, jt = 3609695522, zt = 4075263697, Xt = 4257460908;
|
|
1704
|
+
function Ai(t) {
|
|
1683
1705
|
const e = {};
|
|
1684
1706
|
return Jt(e), e;
|
|
1685
1707
|
}
|
|
1686
1708
|
function Jt(t) {
|
|
1687
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;
|
|
1688
1710
|
}
|
|
1689
|
-
function
|
|
1711
|
+
function yi(t, e) {
|
|
1690
1712
|
e.writeBoolField(Vt, t.HasDefaultValue), e.writeStringField(Wt, t.DefaultValueJson), e.writeStringField(Ht, t.EnumerableItemTypeName), e.writeStringField($t, t.Description), e.writeBinaryField(Kt, t.DefaultValueData), e.writeBoolField(Yt, t.IsEnumerable), e.writeStringField(jt, t.TypeName), e.writeStringField(zt, t.ParameterName), e.writeInt32Field(Xt, t.ParameterIndex | 0);
|
|
1691
1713
|
}
|
|
1692
|
-
function
|
|
1693
|
-
const r = e ??
|
|
1694
|
-
return Jt(r),
|
|
1714
|
+
function Ni(t, e) {
|
|
1715
|
+
const r = e ?? Ai();
|
|
1716
|
+
return Jt(r), gi(t, r), r;
|
|
1695
1717
|
}
|
|
1696
|
-
function
|
|
1718
|
+
function gi(t, e) {
|
|
1697
1719
|
let r;
|
|
1698
1720
|
for (; (r = t.next()) !== null; )
|
|
1699
1721
|
switch (r.fieldId) {
|
|
@@ -1744,61 +1766,61 @@ function yi(t, e) {
|
|
|
1744
1766
|
}
|
|
1745
1767
|
}
|
|
1746
1768
|
}
|
|
1747
|
-
const Qt = 1,
|
|
1748
|
-
function
|
|
1769
|
+
const Qt = 1, Ci = 1048638, bi = 3678477544;
|
|
1770
|
+
function Ri(t) {
|
|
1749
1771
|
const e = {};
|
|
1750
|
-
return
|
|
1772
|
+
return ki(e), t && Object.assign(e, t), e;
|
|
1751
1773
|
}
|
|
1752
|
-
function
|
|
1774
|
+
function ki(t) {
|
|
1753
1775
|
return t.Functions = [], t;
|
|
1754
1776
|
}
|
|
1755
|
-
function
|
|
1777
|
+
function Ui(t) {
|
|
1756
1778
|
const e = new D(Qt);
|
|
1757
|
-
return
|
|
1779
|
+
return Di(t, e), e.finish();
|
|
1758
1780
|
}
|
|
1759
|
-
function
|
|
1760
|
-
e.writeArrayField(
|
|
1781
|
+
function Di(t, e) {
|
|
1782
|
+
e.writeArrayField(bi, b.Object, (r) => {
|
|
1761
1783
|
for (const n of t.Functions)
|
|
1762
|
-
r.writeObject(
|
|
1784
|
+
r.writeObject(Ve, (s) => {
|
|
1763
1785
|
xt(n, s);
|
|
1764
1786
|
});
|
|
1765
1787
|
});
|
|
1766
1788
|
}
|
|
1767
|
-
function
|
|
1768
|
-
const n =
|
|
1769
|
-
return F(
|
|
1789
|
+
function Mi(t, e, r) {
|
|
1790
|
+
const n = Ui(t);
|
|
1791
|
+
return F(Ci, n, Qt, e, r);
|
|
1770
1792
|
}
|
|
1771
|
-
const Zt = 1,
|
|
1772
|
-
function
|
|
1793
|
+
const Zt = 1, Oi = 1048602, Li = 349453957, vi = 703025676, Pi = 3403385840, Fi = 3748161056, Bi = 4289118421;
|
|
1794
|
+
function Gi(t) {
|
|
1773
1795
|
const e = {};
|
|
1774
|
-
return
|
|
1796
|
+
return xi(e), t && Object.assign(e, t), e;
|
|
1775
1797
|
}
|
|
1776
|
-
function
|
|
1798
|
+
function xi(t) {
|
|
1777
1799
|
return t.CallId = _.fromBytes(new Uint8Array(16)), t.InstanceId = _.fromBytes(new Uint8Array(16)), t.ResultTypeName = "", t.ResultJson = "", t.ResultData = new Uint8Array(0), t;
|
|
1778
1800
|
}
|
|
1779
|
-
function
|
|
1801
|
+
function Vi(t) {
|
|
1780
1802
|
const e = new D(Zt);
|
|
1781
|
-
return
|
|
1803
|
+
return Wi(t, e), e.finish();
|
|
1782
1804
|
}
|
|
1783
|
-
function
|
|
1784
|
-
e.writeBinaryField(
|
|
1805
|
+
function Wi(t, e) {
|
|
1806
|
+
e.writeBinaryField(Li, t.ResultData), e.writeStringField(vi, t.ResultTypeName), e.writeStringField(Pi, t.ResultJson), e.writeGuidField(Fi, t.CallId), e.writeGuidField(Bi, t.InstanceId);
|
|
1785
1807
|
}
|
|
1786
|
-
function
|
|
1787
|
-
const n =
|
|
1788
|
-
return F(
|
|
1808
|
+
function Hi(t, e, r) {
|
|
1809
|
+
const n = Vi(t);
|
|
1810
|
+
return F(Oi, n, Zt, e, r);
|
|
1789
1811
|
}
|
|
1790
|
-
const qt = 1,
|
|
1791
|
-
function
|
|
1812
|
+
const qt = 1, $i = 65549;
|
|
1813
|
+
function Je(t) {
|
|
1792
1814
|
return {};
|
|
1793
1815
|
}
|
|
1794
|
-
function
|
|
1816
|
+
function Ki(t) {
|
|
1795
1817
|
return new D(qt).finish();
|
|
1796
1818
|
}
|
|
1797
|
-
function
|
|
1798
|
-
const n =
|
|
1799
|
-
return F(
|
|
1819
|
+
function Qe(t, e, r) {
|
|
1820
|
+
const n = Ki();
|
|
1821
|
+
return F($i, n, qt, e, r);
|
|
1800
1822
|
}
|
|
1801
|
-
const
|
|
1823
|
+
const Yi = 3167053791, ji = 3342364356, zi = 3612929027;
|
|
1802
1824
|
function er(t) {
|
|
1803
1825
|
const e = {};
|
|
1804
1826
|
return tr(e), e;
|
|
@@ -1806,39 +1828,39 @@ function er(t) {
|
|
|
1806
1828
|
function tr(t) {
|
|
1807
1829
|
return t.Category = "", t.Type = Et.Face, t.FaceBlendshapes = [], t;
|
|
1808
1830
|
}
|
|
1809
|
-
function
|
|
1831
|
+
function Xi(t, e) {
|
|
1810
1832
|
const r = e ?? er();
|
|
1811
|
-
return tr(r),
|
|
1833
|
+
return tr(r), Ji(t, r), r;
|
|
1812
1834
|
}
|
|
1813
|
-
function
|
|
1835
|
+
function Ji(t, e) {
|
|
1814
1836
|
let r;
|
|
1815
1837
|
for (; (r = t.next()) !== null; )
|
|
1816
1838
|
switch (r.fieldId) {
|
|
1817
|
-
case
|
|
1839
|
+
case Yi: {
|
|
1818
1840
|
if (r.isNull) throw new Error();
|
|
1819
1841
|
e.Type = r.asInt32();
|
|
1820
1842
|
break;
|
|
1821
1843
|
}
|
|
1822
|
-
case
|
|
1844
|
+
case ji: {
|
|
1823
1845
|
if (r.isNull) throw new Error();
|
|
1824
|
-
e.FaceBlendshapes =
|
|
1846
|
+
e.FaceBlendshapes = Qi(r.asArray());
|
|
1825
1847
|
break;
|
|
1826
1848
|
}
|
|
1827
|
-
case
|
|
1849
|
+
case zi: {
|
|
1828
1850
|
if (r.isNull) throw new Error();
|
|
1829
1851
|
e.Category = r.asString();
|
|
1830
1852
|
break;
|
|
1831
1853
|
}
|
|
1832
1854
|
}
|
|
1833
1855
|
}
|
|
1834
|
-
function
|
|
1856
|
+
function Qi(t) {
|
|
1835
1857
|
const e = [];
|
|
1836
1858
|
let r;
|
|
1837
1859
|
for (; (r = t.next()) !== null; )
|
|
1838
1860
|
e.push(r.asString());
|
|
1839
1861
|
return e;
|
|
1840
1862
|
}
|
|
1841
|
-
const
|
|
1863
|
+
const Zi = 3612929027;
|
|
1842
1864
|
function rr(t) {
|
|
1843
1865
|
const e = {};
|
|
1844
1866
|
return nr(e), e;
|
|
@@ -1846,22 +1868,22 @@ function rr(t) {
|
|
|
1846
1868
|
function nr(t) {
|
|
1847
1869
|
return t.Category = "", t;
|
|
1848
1870
|
}
|
|
1849
|
-
function
|
|
1871
|
+
function qi(t, e) {
|
|
1850
1872
|
const r = e ?? rr();
|
|
1851
|
-
return nr(r),
|
|
1873
|
+
return nr(r), eo(t, r), r;
|
|
1852
1874
|
}
|
|
1853
|
-
function
|
|
1875
|
+
function eo(t, e) {
|
|
1854
1876
|
let r;
|
|
1855
1877
|
for (; (r = t.next()) !== null; )
|
|
1856
1878
|
switch (r.fieldId) {
|
|
1857
|
-
case
|
|
1879
|
+
case Zi: {
|
|
1858
1880
|
if (r.isNull) throw new Error();
|
|
1859
1881
|
e.Category = r.asString();
|
|
1860
1882
|
break;
|
|
1861
1883
|
}
|
|
1862
1884
|
}
|
|
1863
1885
|
}
|
|
1864
|
-
const
|
|
1886
|
+
const to = 164808083, ro = 1368629611, no = 2739413426, so = 2768375929, io = 2950031986, oo = 3284746250, ao = 4065070594;
|
|
1865
1887
|
function sr(t) {
|
|
1866
1888
|
const e = {};
|
|
1867
1889
|
return ir(e), e;
|
|
@@ -1869,467 +1891,467 @@ function sr(t) {
|
|
|
1869
1891
|
function ir(t) {
|
|
1870
1892
|
return t.Description = "", t.Codec = pt.H264, t.Width = 0, t.Height = 0, t.Framerate = 30, t.Bitrate = 0, t.IsHardwareAccelerated = !1, t;
|
|
1871
1893
|
}
|
|
1872
|
-
function
|
|
1894
|
+
function co(t, e) {
|
|
1873
1895
|
const r = e ?? sr();
|
|
1874
|
-
return ir(r),
|
|
1896
|
+
return ir(r), lo(t, r), r;
|
|
1875
1897
|
}
|
|
1876
|
-
function
|
|
1898
|
+
function lo(t, e) {
|
|
1877
1899
|
let r;
|
|
1878
1900
|
for (; (r = t.next()) !== null; )
|
|
1879
1901
|
switch (r.fieldId) {
|
|
1880
|
-
case
|
|
1902
|
+
case to: {
|
|
1881
1903
|
if (r.isNull) throw new Error();
|
|
1882
1904
|
e.Framerate = r.asInt32();
|
|
1883
1905
|
break;
|
|
1884
1906
|
}
|
|
1885
|
-
case
|
|
1907
|
+
case ro: {
|
|
1886
1908
|
if (r.isNull) throw new Error();
|
|
1887
1909
|
e.Description = r.asString();
|
|
1888
1910
|
break;
|
|
1889
1911
|
}
|
|
1890
|
-
case
|
|
1912
|
+
case no: {
|
|
1891
1913
|
if (r.isNull) throw new Error();
|
|
1892
1914
|
e.IsHardwareAccelerated = r.asBool();
|
|
1893
1915
|
break;
|
|
1894
1916
|
}
|
|
1895
|
-
case
|
|
1917
|
+
case so: {
|
|
1896
1918
|
if (r.isNull) throw new Error();
|
|
1897
1919
|
e.Bitrate = r.asInt32();
|
|
1898
1920
|
break;
|
|
1899
1921
|
}
|
|
1900
|
-
case
|
|
1922
|
+
case io: {
|
|
1901
1923
|
if (r.isNull) throw new Error();
|
|
1902
1924
|
e.Height = r.asInt32();
|
|
1903
1925
|
break;
|
|
1904
1926
|
}
|
|
1905
|
-
case
|
|
1927
|
+
case oo: {
|
|
1906
1928
|
if (r.isNull) throw new Error();
|
|
1907
1929
|
e.Codec = r.asInt32();
|
|
1908
1930
|
break;
|
|
1909
1931
|
}
|
|
1910
|
-
case
|
|
1932
|
+
case ao: {
|
|
1911
1933
|
if (r.isNull) throw new Error();
|
|
1912
1934
|
e.Width = r.asInt32();
|
|
1913
1935
|
break;
|
|
1914
1936
|
}
|
|
1915
1937
|
}
|
|
1916
1938
|
}
|
|
1917
|
-
const
|
|
1918
|
-
function
|
|
1939
|
+
const uo = 65539, ho = 414670648, fo = 693643444, Eo = 1144553441, po = 1497620243, Io = 1559330978, mo = 1999510636, _o = 2277643855, To = 2469008121, So = 3042922213, wo = 3219210453, Ao = 3504054055, yo = 3642827795, No = 3678477544, go = 3696445035, Co = 3707543140, bo = 3712281496, Ro = 3748214980, ko = 3823842552, Uo = 3895362455, Do = 3897397815, Mo = 4225107827;
|
|
1940
|
+
function Oo(t) {
|
|
1919
1941
|
const e = {};
|
|
1920
1942
|
return or(e), e;
|
|
1921
1943
|
}
|
|
1922
1944
|
function or(t) {
|
|
1923
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.ChannelInstanceId = "", t.FirstUserId = "", t.ChannelUrl = "", t.ChannelId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.SessionId = "", t.RunnerType = "", t.BootType = "", t.PublicAccess = !1, t.DebugMode = !1, t.IsGitSource = !1, t.Functions = /* @__PURE__ */ Object.create(null), t;
|
|
1924
1946
|
}
|
|
1925
|
-
function
|
|
1947
|
+
function Lo(t, e) {
|
|
1926
1948
|
const r = z.create(t);
|
|
1927
|
-
return
|
|
1949
|
+
return vo(r, e);
|
|
1928
1950
|
}
|
|
1929
|
-
function
|
|
1930
|
-
const r = e ??
|
|
1931
|
-
return or(r),
|
|
1951
|
+
function vo(t, e) {
|
|
1952
|
+
const r = e ?? Oo();
|
|
1953
|
+
return or(r), Po(t, r), r;
|
|
1932
1954
|
}
|
|
1933
|
-
function
|
|
1955
|
+
function Po(t, e) {
|
|
1934
1956
|
let r;
|
|
1935
1957
|
for (; (r = t.next()) !== null; )
|
|
1936
1958
|
switch (r.fieldId) {
|
|
1937
|
-
case
|
|
1959
|
+
case ho: {
|
|
1938
1960
|
if (r.isNull) throw new Error();
|
|
1939
1961
|
e.IsGitSource = r.asBool();
|
|
1940
1962
|
break;
|
|
1941
1963
|
}
|
|
1942
|
-
case
|
|
1964
|
+
case fo: {
|
|
1943
1965
|
if (r.isNull) throw new Error();
|
|
1944
1966
|
e.FirstUserId = r.asString();
|
|
1945
1967
|
break;
|
|
1946
1968
|
}
|
|
1947
|
-
case
|
|
1969
|
+
case Eo: {
|
|
1948
1970
|
if (r.isNull) throw new Error();
|
|
1949
|
-
e.Clients =
|
|
1971
|
+
e.Clients = Bo(r.asDictionary());
|
|
1950
1972
|
break;
|
|
1951
1973
|
}
|
|
1952
|
-
case
|
|
1974
|
+
case po: {
|
|
1953
1975
|
if (r.isNull) throw new Error();
|
|
1954
|
-
e.TrackingStreams =
|
|
1976
|
+
e.TrackingStreams = Go(r.asDictionary());
|
|
1955
1977
|
break;
|
|
1956
1978
|
}
|
|
1957
|
-
case
|
|
1979
|
+
case Io: {
|
|
1958
1980
|
if (r.isNull) throw new Error();
|
|
1959
1981
|
e.ChannelId = r.asString();
|
|
1960
1982
|
break;
|
|
1961
1983
|
}
|
|
1962
|
-
case
|
|
1984
|
+
case mo: {
|
|
1963
1985
|
if (r.isNull) throw new Error();
|
|
1964
1986
|
e.SessionId = r.asString();
|
|
1965
1987
|
break;
|
|
1966
1988
|
}
|
|
1967
|
-
case
|
|
1989
|
+
case _o: {
|
|
1968
1990
|
if (r.isNull) throw new Error();
|
|
1969
1991
|
e.ChannelUrl = r.asString();
|
|
1970
1992
|
break;
|
|
1971
1993
|
}
|
|
1972
|
-
case
|
|
1994
|
+
case To: {
|
|
1973
1995
|
if (r.isNull) throw new Error();
|
|
1974
1996
|
e.ChannelName = r.asString();
|
|
1975
1997
|
break;
|
|
1976
1998
|
}
|
|
1977
|
-
case
|
|
1999
|
+
case So: {
|
|
1978
2000
|
if (r.isNull) throw new Error();
|
|
1979
2001
|
e.PublicAccess = r.asBool();
|
|
1980
2002
|
break;
|
|
1981
2003
|
}
|
|
1982
|
-
case
|
|
2004
|
+
case wo: {
|
|
1983
2005
|
if (r.isNull) throw new Error();
|
|
1984
2006
|
e.OrganisationName = r.asString();
|
|
1985
2007
|
break;
|
|
1986
2008
|
}
|
|
1987
|
-
case
|
|
2009
|
+
case Ao: {
|
|
1988
2010
|
if (r.isNull) throw new Error();
|
|
1989
2011
|
e.DebugMode = r.asBool();
|
|
1990
2012
|
break;
|
|
1991
2013
|
}
|
|
1992
|
-
case
|
|
2014
|
+
case yo: {
|
|
1993
2015
|
if (r.isNull) throw new Error();
|
|
1994
2016
|
e.RunnerType = r.asString();
|
|
1995
2017
|
break;
|
|
1996
2018
|
}
|
|
1997
|
-
case
|
|
2019
|
+
case No: {
|
|
1998
2020
|
if (r.isNull) throw new Error();
|
|
1999
|
-
e.Functions =
|
|
2021
|
+
e.Functions = xo(r.asDictionary());
|
|
2000
2022
|
break;
|
|
2001
2023
|
}
|
|
2002
|
-
case
|
|
2024
|
+
case go: {
|
|
2003
2025
|
if (r.isNull) throw new Error();
|
|
2004
|
-
e.UIStreams =
|
|
2026
|
+
e.UIStreams = Vo(r.asDictionary());
|
|
2005
2027
|
break;
|
|
2006
2028
|
}
|
|
2007
|
-
case
|
|
2029
|
+
case Co: {
|
|
2008
2030
|
if (r.isNull) throw new Error();
|
|
2009
2031
|
e.SpaceId = r.asString();
|
|
2010
2032
|
break;
|
|
2011
2033
|
}
|
|
2012
|
-
case
|
|
2034
|
+
case bo: {
|
|
2013
2035
|
if (r.isNull) throw new Error();
|
|
2014
2036
|
e.PrimaryUserId = r.asString();
|
|
2015
2037
|
break;
|
|
2016
2038
|
}
|
|
2017
|
-
case
|
|
2039
|
+
case Ro: {
|
|
2018
2040
|
if (r.isNull) throw new Error();
|
|
2019
2041
|
e.BootType = r.asString();
|
|
2020
2042
|
break;
|
|
2021
2043
|
}
|
|
2022
|
-
case
|
|
2044
|
+
case ko: {
|
|
2023
2045
|
if (r.isNull) throw new Error();
|
|
2024
2046
|
e.ChannelInstanceId = r.asString();
|
|
2025
2047
|
break;
|
|
2026
2048
|
}
|
|
2027
|
-
case
|
|
2049
|
+
case Uo: {
|
|
2028
2050
|
if (r.isNull) throw new Error();
|
|
2029
|
-
e.AudioStreams =
|
|
2051
|
+
e.AudioStreams = Wo(r.asDictionary());
|
|
2030
2052
|
break;
|
|
2031
2053
|
}
|
|
2032
|
-
case
|
|
2054
|
+
case Do: {
|
|
2033
2055
|
if (r.isNull) throw new Error();
|
|
2034
|
-
e.VideoStreams =
|
|
2056
|
+
e.VideoStreams = Ho(r.asDictionary());
|
|
2035
2057
|
break;
|
|
2036
2058
|
}
|
|
2037
|
-
case
|
|
2059
|
+
case Mo: {
|
|
2038
2060
|
if (r.isNull) throw new Error();
|
|
2039
2061
|
e.SpaceName = r.asString();
|
|
2040
2062
|
break;
|
|
2041
2063
|
}
|
|
2042
2064
|
}
|
|
2043
2065
|
}
|
|
2044
|
-
function
|
|
2045
|
-
const r =
|
|
2046
|
-
return
|
|
2066
|
+
async function Fo(t, e) {
|
|
2067
|
+
const r = await Oe(t, uo);
|
|
2068
|
+
return Lo(r, e);
|
|
2047
2069
|
}
|
|
2048
|
-
function
|
|
2070
|
+
function Bo(t) {
|
|
2049
2071
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2050
2072
|
let r;
|
|
2051
2073
|
for (; (r = t.next()) !== null; ) {
|
|
2052
2074
|
const n = r.key.asInt32();
|
|
2053
|
-
e[n] =
|
|
2075
|
+
e[n] = Ce(r.value.asObject());
|
|
2054
2076
|
}
|
|
2055
2077
|
return e;
|
|
2056
2078
|
}
|
|
2057
|
-
function
|
|
2079
|
+
function Go(t) {
|
|
2058
2080
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2059
2081
|
let r;
|
|
2060
2082
|
for (; (r = t.next()) !== null; ) {
|
|
2061
2083
|
const n = r.key.asString();
|
|
2062
|
-
e[n] =
|
|
2084
|
+
e[n] = ma(r.value.asObject());
|
|
2063
2085
|
}
|
|
2064
2086
|
return e;
|
|
2065
2087
|
}
|
|
2066
|
-
function
|
|
2088
|
+
function xo(t) {
|
|
2067
2089
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2068
2090
|
let r;
|
|
2069
2091
|
for (; (r = t.next()) !== null; ) {
|
|
2070
2092
|
const n = r.key.asInt32();
|
|
2071
|
-
e[n] =
|
|
2093
|
+
e[n] = $o(r.value.asArray());
|
|
2072
2094
|
}
|
|
2073
2095
|
return e;
|
|
2074
2096
|
}
|
|
2075
|
-
function
|
|
2097
|
+
function Vo(t) {
|
|
2076
2098
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2077
2099
|
let r;
|
|
2078
2100
|
for (; (r = t.next()) !== null; ) {
|
|
2079
2101
|
const n = r.key.asString();
|
|
2080
|
-
e[n] =
|
|
2102
|
+
e[n] = Jo(r.value.asObject());
|
|
2081
2103
|
}
|
|
2082
2104
|
return e;
|
|
2083
2105
|
}
|
|
2084
|
-
function
|
|
2106
|
+
function Wo(t) {
|
|
2085
2107
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2086
2108
|
let r;
|
|
2087
2109
|
for (; (r = t.next()) !== null; ) {
|
|
2088
2110
|
const n = r.key.asString();
|
|
2089
|
-
e[n] =
|
|
2111
|
+
e[n] = na(r.value.asObject());
|
|
2090
2112
|
}
|
|
2091
2113
|
return e;
|
|
2092
2114
|
}
|
|
2093
|
-
function
|
|
2115
|
+
function Ho(t) {
|
|
2094
2116
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2095
2117
|
let r;
|
|
2096
2118
|
for (; (r = t.next()) !== null; ) {
|
|
2097
2119
|
const n = r.key.asString();
|
|
2098
|
-
e[n] =
|
|
2120
|
+
e[n] = ua(r.value.asObject());
|
|
2099
2121
|
}
|
|
2100
2122
|
return e;
|
|
2101
2123
|
}
|
|
2102
|
-
function
|
|
2124
|
+
function $o(t) {
|
|
2103
2125
|
const e = [];
|
|
2104
2126
|
let r;
|
|
2105
2127
|
for (; (r = t.next()) !== null; )
|
|
2106
|
-
e.push(
|
|
2128
|
+
e.push(mi(r.asObject()));
|
|
2107
2129
|
return e;
|
|
2108
2130
|
}
|
|
2109
|
-
const
|
|
2110
|
-
function
|
|
2131
|
+
const Ko = 161083277, Yo = 325678206, jo = 3469892363, zo = 3645544153;
|
|
2132
|
+
function Xo(t) {
|
|
2111
2133
|
const e = {};
|
|
2112
2134
|
return ar(e), e;
|
|
2113
2135
|
}
|
|
2114
2136
|
function ar(t) {
|
|
2115
2137
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = rr(), t;
|
|
2116
2138
|
}
|
|
2117
|
-
function
|
|
2118
|
-
const r = e ??
|
|
2119
|
-
return ar(r),
|
|
2139
|
+
function Jo(t, e) {
|
|
2140
|
+
const r = e ?? Xo();
|
|
2141
|
+
return ar(r), Qo(t, r), r;
|
|
2120
2142
|
}
|
|
2121
|
-
function
|
|
2143
|
+
function Qo(t, e) {
|
|
2122
2144
|
let r;
|
|
2123
2145
|
for (; (r = t.next()) !== null; )
|
|
2124
2146
|
switch (r.fieldId) {
|
|
2125
|
-
case
|
|
2147
|
+
case Ko: {
|
|
2126
2148
|
if (r.isNull) throw new Error();
|
|
2127
2149
|
e.StreamId = r.asString();
|
|
2128
2150
|
break;
|
|
2129
2151
|
}
|
|
2130
|
-
case
|
|
2152
|
+
case Yo: {
|
|
2131
2153
|
if (r.isNull) throw new Error();
|
|
2132
2154
|
e.ClientSessionId = r.asInt32();
|
|
2133
2155
|
break;
|
|
2134
2156
|
}
|
|
2135
|
-
case
|
|
2157
|
+
case jo: {
|
|
2136
2158
|
if (r.isNull) throw new Error();
|
|
2137
2159
|
e.TrackId = r.asInt32();
|
|
2138
2160
|
break;
|
|
2139
2161
|
}
|
|
2140
|
-
case
|
|
2162
|
+
case zo: {
|
|
2141
2163
|
if (r.isNull) throw new Error();
|
|
2142
|
-
e.Info =
|
|
2164
|
+
e.Info = qi(r.asObject());
|
|
2143
2165
|
break;
|
|
2144
2166
|
}
|
|
2145
2167
|
}
|
|
2146
2168
|
}
|
|
2147
|
-
const
|
|
2148
|
-
function
|
|
2169
|
+
const Zo = 161083277, qo = 325678206, ea = 3469892363, ta = 3645544153;
|
|
2170
|
+
function ra(t) {
|
|
2149
2171
|
const e = {};
|
|
2150
2172
|
return cr(e), e;
|
|
2151
2173
|
}
|
|
2152
2174
|
function cr(t) {
|
|
2153
2175
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = _t(), t;
|
|
2154
2176
|
}
|
|
2155
|
-
function
|
|
2156
|
-
const r = e ??
|
|
2157
|
-
return cr(r),
|
|
2177
|
+
function na(t, e) {
|
|
2178
|
+
const r = e ?? ra();
|
|
2179
|
+
return cr(r), sa(t, r), r;
|
|
2158
2180
|
}
|
|
2159
|
-
function
|
|
2181
|
+
function sa(t, e) {
|
|
2160
2182
|
let r;
|
|
2161
2183
|
for (; (r = t.next()) !== null; )
|
|
2162
2184
|
switch (r.fieldId) {
|
|
2163
|
-
case
|
|
2185
|
+
case Zo: {
|
|
2164
2186
|
if (r.isNull) throw new Error();
|
|
2165
2187
|
e.StreamId = r.asString();
|
|
2166
2188
|
break;
|
|
2167
2189
|
}
|
|
2168
|
-
case
|
|
2190
|
+
case qo: {
|
|
2169
2191
|
if (r.isNull) throw new Error();
|
|
2170
2192
|
e.ClientSessionId = r.asInt32();
|
|
2171
2193
|
break;
|
|
2172
2194
|
}
|
|
2173
|
-
case
|
|
2195
|
+
case ea: {
|
|
2174
2196
|
if (r.isNull) throw new Error();
|
|
2175
2197
|
e.TrackId = r.asInt32();
|
|
2176
2198
|
break;
|
|
2177
2199
|
}
|
|
2178
|
-
case
|
|
2200
|
+
case ta: {
|
|
2179
2201
|
if (r.isNull) throw new Error();
|
|
2180
|
-
e.Info =
|
|
2202
|
+
e.Info = _n(r.asObject());
|
|
2181
2203
|
break;
|
|
2182
2204
|
}
|
|
2183
2205
|
}
|
|
2184
2206
|
}
|
|
2185
|
-
const
|
|
2186
|
-
function
|
|
2207
|
+
const ia = 161083277, oa = 325678206, aa = 3469892363, ca = 3645544153;
|
|
2208
|
+
function la(t) {
|
|
2187
2209
|
const e = {};
|
|
2188
2210
|
return lr(e), e;
|
|
2189
2211
|
}
|
|
2190
2212
|
function lr(t) {
|
|
2191
2213
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = sr(), t;
|
|
2192
2214
|
}
|
|
2193
|
-
function
|
|
2194
|
-
const r = e ??
|
|
2195
|
-
return lr(r),
|
|
2215
|
+
function ua(t, e) {
|
|
2216
|
+
const r = e ?? la();
|
|
2217
|
+
return lr(r), ha(t, r), r;
|
|
2196
2218
|
}
|
|
2197
|
-
function
|
|
2219
|
+
function ha(t, e) {
|
|
2198
2220
|
let r;
|
|
2199
2221
|
for (; (r = t.next()) !== null; )
|
|
2200
2222
|
switch (r.fieldId) {
|
|
2201
|
-
case
|
|
2223
|
+
case ia: {
|
|
2202
2224
|
if (r.isNull) throw new Error();
|
|
2203
2225
|
e.StreamId = r.asString();
|
|
2204
2226
|
break;
|
|
2205
2227
|
}
|
|
2206
|
-
case
|
|
2228
|
+
case oa: {
|
|
2207
2229
|
if (r.isNull) throw new Error();
|
|
2208
2230
|
e.ClientSessionId = r.asInt32();
|
|
2209
2231
|
break;
|
|
2210
2232
|
}
|
|
2211
|
-
case
|
|
2233
|
+
case aa: {
|
|
2212
2234
|
if (r.isNull) throw new Error();
|
|
2213
2235
|
e.TrackId = r.asInt32();
|
|
2214
2236
|
break;
|
|
2215
2237
|
}
|
|
2216
|
-
case
|
|
2238
|
+
case ca: {
|
|
2217
2239
|
if (r.isNull) throw new Error();
|
|
2218
|
-
e.Info =
|
|
2240
|
+
e.Info = co(r.asObject());
|
|
2219
2241
|
break;
|
|
2220
2242
|
}
|
|
2221
2243
|
}
|
|
2222
2244
|
}
|
|
2223
|
-
const
|
|
2224
|
-
function
|
|
2245
|
+
const da = 161083277, fa = 325678206, Ea = 3469892363, pa = 3645544153;
|
|
2246
|
+
function Ia(t) {
|
|
2225
2247
|
const e = {};
|
|
2226
2248
|
return ur(e), e;
|
|
2227
2249
|
}
|
|
2228
2250
|
function ur(t) {
|
|
2229
2251
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = er(), t;
|
|
2230
2252
|
}
|
|
2231
|
-
function
|
|
2232
|
-
const r = e ??
|
|
2233
|
-
return ur(r),
|
|
2253
|
+
function ma(t, e) {
|
|
2254
|
+
const r = e ?? Ia();
|
|
2255
|
+
return ur(r), _a(t, r), r;
|
|
2234
2256
|
}
|
|
2235
|
-
function
|
|
2257
|
+
function _a(t, e) {
|
|
2236
2258
|
let r;
|
|
2237
2259
|
for (; (r = t.next()) !== null; )
|
|
2238
2260
|
switch (r.fieldId) {
|
|
2239
|
-
case
|
|
2261
|
+
case da: {
|
|
2240
2262
|
if (r.isNull) throw new Error();
|
|
2241
2263
|
e.StreamId = r.asString();
|
|
2242
2264
|
break;
|
|
2243
2265
|
}
|
|
2244
|
-
case
|
|
2266
|
+
case fa: {
|
|
2245
2267
|
if (r.isNull) throw new Error();
|
|
2246
2268
|
e.ClientSessionId = r.asInt32();
|
|
2247
2269
|
break;
|
|
2248
2270
|
}
|
|
2249
|
-
case
|
|
2271
|
+
case Ea: {
|
|
2250
2272
|
if (r.isNull) throw new Error();
|
|
2251
2273
|
e.TrackId = r.asInt32();
|
|
2252
2274
|
break;
|
|
2253
2275
|
}
|
|
2254
|
-
case
|
|
2276
|
+
case pa: {
|
|
2255
2277
|
if (r.isNull) throw new Error();
|
|
2256
|
-
e.Info =
|
|
2278
|
+
e.Info = Xi(r.asObject());
|
|
2257
2279
|
break;
|
|
2258
2280
|
}
|
|
2259
2281
|
}
|
|
2260
2282
|
}
|
|
2261
|
-
const hr = 1,
|
|
2283
|
+
const hr = 1, Ta = 131074;
|
|
2262
2284
|
function dr(t) {
|
|
2263
2285
|
return {};
|
|
2264
2286
|
}
|
|
2265
|
-
function
|
|
2287
|
+
function Sa(t) {
|
|
2266
2288
|
return new D(hr).finish();
|
|
2267
2289
|
}
|
|
2268
2290
|
function fr(t, e, r) {
|
|
2269
|
-
const n =
|
|
2270
|
-
return F(
|
|
2291
|
+
const n = Sa();
|
|
2292
|
+
return F(Ta, n, hr, e, r);
|
|
2271
2293
|
}
|
|
2272
|
-
const Er = 1,
|
|
2273
|
-
function
|
|
2294
|
+
const Er = 1, wa = 8388612;
|
|
2295
|
+
function Aa(t) {
|
|
2274
2296
|
return {};
|
|
2275
2297
|
}
|
|
2276
|
-
function
|
|
2298
|
+
function ya(t) {
|
|
2277
2299
|
return new D(Er).finish();
|
|
2278
2300
|
}
|
|
2279
|
-
function
|
|
2280
|
-
const n =
|
|
2281
|
-
return F(
|
|
2301
|
+
function Na(t, e, r) {
|
|
2302
|
+
const n = ya();
|
|
2303
|
+
return F(wa, n, Er, e, r);
|
|
2282
2304
|
}
|
|
2283
|
-
function
|
|
2305
|
+
function ga(t) {
|
|
2284
2306
|
return new Worker(
|
|
2285
|
-
"" + new URL("assets/protocol-worker-
|
|
2307
|
+
"" + new URL("assets/protocol-worker-DIKCgk1A.js", import.meta.url).href,
|
|
2286
2308
|
{
|
|
2287
2309
|
type: "module",
|
|
2288
2310
|
name: t?.name
|
|
2289
2311
|
}
|
|
2290
2312
|
);
|
|
2291
2313
|
}
|
|
2292
|
-
class
|
|
2314
|
+
class We extends Error {
|
|
2293
2315
|
constructor(e, r) {
|
|
2294
2316
|
super(e), this.cause = r, this.name = "ConnectionError";
|
|
2295
2317
|
}
|
|
2296
2318
|
}
|
|
2297
|
-
class y extends
|
|
2319
|
+
class y extends We {
|
|
2298
2320
|
constructor(e, r) {
|
|
2299
2321
|
super(e, r), this.name = "AuthenticationError";
|
|
2300
2322
|
}
|
|
2301
2323
|
}
|
|
2302
|
-
class W extends
|
|
2324
|
+
class W extends We {
|
|
2303
2325
|
constructor(e, r) {
|
|
2304
2326
|
super(e, r), this.name = "TransportError";
|
|
2305
2327
|
}
|
|
2306
2328
|
}
|
|
2307
|
-
class
|
|
2329
|
+
class He extends W {
|
|
2308
2330
|
constructor(e) {
|
|
2309
2331
|
super(`No keepalive received within ${e}ms`), this.name = "KeepaliveTimeoutError";
|
|
2310
2332
|
}
|
|
2311
2333
|
}
|
|
2312
|
-
class
|
|
2334
|
+
class Ca extends We {
|
|
2313
2335
|
constructor(e) {
|
|
2314
2336
|
super(`Maximum reconnection attempts (${e}) exceeded`), this.name = "MaxRetriesExceededError";
|
|
2315
2337
|
}
|
|
2316
2338
|
}
|
|
2317
|
-
class
|
|
2339
|
+
class ba extends y {
|
|
2318
2340
|
constructor(e) {
|
|
2319
2341
|
super(`Channel provisioning timeout after ${e}ms`), this.name = "ProvisioningTimeoutError";
|
|
2320
2342
|
}
|
|
2321
2343
|
}
|
|
2322
|
-
class
|
|
2344
|
+
class _l extends y {
|
|
2323
2345
|
constructor(e) {
|
|
2324
2346
|
super(`Channel not found: ${e}`), this.name = "ChannelNotFoundError";
|
|
2325
2347
|
}
|
|
2326
2348
|
}
|
|
2327
|
-
class
|
|
2349
|
+
class Tl extends y {
|
|
2328
2350
|
constructor(e) {
|
|
2329
2351
|
super(`Space not found for domain: ${e}`), this.name = "SpaceNotFoundError";
|
|
2330
2352
|
}
|
|
2331
2353
|
}
|
|
2332
|
-
class
|
|
2354
|
+
class Sl extends y {
|
|
2333
2355
|
constructor() {
|
|
2334
2356
|
super("No channels available in this space"), this.name = "NoChannelsError";
|
|
2335
2357
|
}
|
|
@@ -2349,31 +2371,31 @@ function pr(t, e) {
|
|
|
2349
2371
|
});
|
|
2350
2372
|
}
|
|
2351
2373
|
var Ir = /* @__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))(Ir || {});
|
|
2352
|
-
let
|
|
2353
|
-
function
|
|
2354
|
-
|
|
2374
|
+
let $e = 1, fe = null;
|
|
2375
|
+
function wl(t) {
|
|
2376
|
+
$e = t;
|
|
2355
2377
|
}
|
|
2356
|
-
function
|
|
2357
|
-
return
|
|
2378
|
+
function Al() {
|
|
2379
|
+
return $e;
|
|
2358
2380
|
}
|
|
2359
|
-
function
|
|
2381
|
+
function Ra(t) {
|
|
2360
2382
|
fe = t;
|
|
2361
2383
|
}
|
|
2362
|
-
function
|
|
2384
|
+
function yl() {
|
|
2363
2385
|
return fe;
|
|
2364
2386
|
}
|
|
2365
|
-
const
|
|
2387
|
+
const ka = {
|
|
2366
2388
|
0: "DEBUG",
|
|
2367
2389
|
1: "INFO",
|
|
2368
2390
|
2: "WARN",
|
|
2369
2391
|
3: "ERROR",
|
|
2370
2392
|
4: "NONE"
|
|
2371
2393
|
};
|
|
2372
|
-
function
|
|
2394
|
+
function Ua(t, e) {
|
|
2373
2395
|
return `[${t}] ${e}`;
|
|
2374
2396
|
}
|
|
2375
2397
|
function ie(t, e, r, n) {
|
|
2376
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), i =
|
|
2398
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), i = ka[t];
|
|
2377
2399
|
if (fe && fe({
|
|
2378
2400
|
timestamp: s,
|
|
2379
2401
|
level: t,
|
|
@@ -2381,8 +2403,8 @@ function ie(t, e, r, n) {
|
|
|
2381
2403
|
component: e,
|
|
2382
2404
|
message: r,
|
|
2383
2405
|
args: n
|
|
2384
|
-
}),
|
|
2385
|
-
const o =
|
|
2406
|
+
}), $e <= t) {
|
|
2407
|
+
const o = Ua(e, r);
|
|
2386
2408
|
switch (t) {
|
|
2387
2409
|
case 0:
|
|
2388
2410
|
console.debug(o, ...n);
|
|
@@ -2415,8 +2437,8 @@ function L(t) {
|
|
|
2415
2437
|
}
|
|
2416
2438
|
};
|
|
2417
2439
|
}
|
|
2418
|
-
const oe = L("WebSocketTransport"),
|
|
2419
|
-
class
|
|
2440
|
+
const oe = L("WebSocketTransport"), Da = 1e4;
|
|
2441
|
+
class Ma {
|
|
2420
2442
|
ws = null;
|
|
2421
2443
|
keepaliveTimeout = null;
|
|
2422
2444
|
// Pre-allocated keepalive response message to avoid allocation per keepalive
|
|
@@ -2434,8 +2456,8 @@ class Ua {
|
|
|
2434
2456
|
return new Promise((n, s) => {
|
|
2435
2457
|
try {
|
|
2436
2458
|
this.ws = new WebSocket(e), this.ws.binaryType = "arraybuffer";
|
|
2437
|
-
} catch (
|
|
2438
|
-
s(new W(`Failed to create WebSocket: ${
|
|
2459
|
+
} catch (l) {
|
|
2460
|
+
s(new W(`Failed to create WebSocket: ${l}`, l instanceof Error ? l : void 0));
|
|
2439
2461
|
return;
|
|
2440
2462
|
}
|
|
2441
2463
|
let i = !1, o = !1;
|
|
@@ -2443,20 +2465,20 @@ class Ua {
|
|
|
2443
2465
|
clearTimeout(c), this.ws && (this.ws.onopen = null, this.ws.onerror = null, this.ws.onclose = null, this.ws.onmessage = null);
|
|
2444
2466
|
}, c = setTimeout(() => {
|
|
2445
2467
|
o || (o = !0, a(), this.ws?.close(), s(new W("WebSocket connection timeout")));
|
|
2446
|
-
},
|
|
2468
|
+
}, Da);
|
|
2447
2469
|
this.ws.onopen = () => {
|
|
2448
2470
|
i = !0, clearTimeout(c), this.ws.send(r), this.resetKeepaliveTimeout(), o || (o = !0, n());
|
|
2449
2471
|
}, this.ws.onerror = () => {
|
|
2450
2472
|
clearTimeout(c), oe.error("WebSocket error"), o || (o = !0, a(), s(new W("WebSocket connection failed")));
|
|
2451
|
-
}, this.ws.onclose = (
|
|
2473
|
+
}, this.ws.onclose = (l) => {
|
|
2452
2474
|
if (this.clearKeepaliveTimeout(), !i && !o) {
|
|
2453
2475
|
o = !0, a(), s(new W("WebSocket connection closed before opening"));
|
|
2454
2476
|
return;
|
|
2455
2477
|
}
|
|
2456
|
-
const f =
|
|
2478
|
+
const f = l.wasClean && (l.code === 1e3 || l.code === 1001), d = l.code === 1e3 || l.code === 1001, h = l.reason || `code=${l.code}`;
|
|
2457
2479
|
this.callbacks.onClose(h, f, d);
|
|
2458
|
-
}, this.ws.onmessage = (
|
|
2459
|
-
this.handleProtocolMessage(new Uint8Array(
|
|
2480
|
+
}, this.ws.onmessage = (l) => {
|
|
2481
|
+
this.handleProtocolMessage(new Uint8Array(l.data));
|
|
2460
2482
|
};
|
|
2461
2483
|
});
|
|
2462
2484
|
}
|
|
@@ -2485,18 +2507,18 @@ class Ua {
|
|
|
2485
2507
|
}
|
|
2486
2508
|
resetKeepaliveTimeout() {
|
|
2487
2509
|
this.clearKeepaliveTimeout(), this.keepaliveTimeout = setTimeout(() => {
|
|
2488
|
-
oe.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new
|
|
2510
|
+
oe.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new He(this.keepaliveTimeoutMs)), this.close();
|
|
2489
2511
|
}, this.keepaliveTimeoutMs);
|
|
2490
2512
|
}
|
|
2491
2513
|
clearKeepaliveTimeout() {
|
|
2492
2514
|
this.keepaliveTimeout && (clearTimeout(this.keepaliveTimeout), this.keepaliveTimeout = null);
|
|
2493
2515
|
}
|
|
2494
2516
|
}
|
|
2495
|
-
const B = L("WebTransportTransport"),
|
|
2517
|
+
const B = L("WebTransportTransport"), Ze = 4, Oa = 65536;
|
|
2496
2518
|
function mr() {
|
|
2497
2519
|
return typeof WebTransport < "u";
|
|
2498
2520
|
}
|
|
2499
|
-
class
|
|
2521
|
+
class La {
|
|
2500
2522
|
transport = null;
|
|
2501
2523
|
stream = null;
|
|
2502
2524
|
reader = null;
|
|
@@ -2504,7 +2526,7 @@ class Ma {
|
|
|
2504
2526
|
keepaliveTimeout = null;
|
|
2505
2527
|
readLoopActive = !1;
|
|
2506
2528
|
// Grow-only receive buffer with offset/length tracking to minimize allocations
|
|
2507
|
-
receiveBuffer = new Uint8Array(
|
|
2529
|
+
receiveBuffer = new Uint8Array(Oa);
|
|
2508
2530
|
receiveBufferOffset = 0;
|
|
2509
2531
|
receiveBufferLength = 0;
|
|
2510
2532
|
// Cached DataView to avoid allocation per message
|
|
@@ -2598,9 +2620,9 @@ class Ma {
|
|
|
2598
2620
|
*/
|
|
2599
2621
|
processBufferedMessages() {
|
|
2600
2622
|
const e = this.getReceiveDataView();
|
|
2601
|
-
for (; this.receiveBufferLength >=
|
|
2623
|
+
for (; this.receiveBufferLength >= Ze; ) {
|
|
2602
2624
|
const r = e.getUint32(this.receiveBufferOffset, !0);
|
|
2603
|
-
if (r <
|
|
2625
|
+
if (r < Ze) {
|
|
2604
2626
|
B.error(`Invalid message length: ${r}`), this.callbacks.onError(new Error(`Invalid protocol message length: ${r}`)), this.receiveBufferOffset = 0, this.receiveBufferLength = 0;
|
|
2605
2627
|
return;
|
|
2606
2628
|
}
|
|
@@ -2636,7 +2658,7 @@ class Ma {
|
|
|
2636
2658
|
*/
|
|
2637
2659
|
resetKeepaliveTimeout() {
|
|
2638
2660
|
this.clearKeepaliveTimeout(), this.keepaliveTimeout = setTimeout(() => {
|
|
2639
|
-
B.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new
|
|
2661
|
+
B.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new He(this.keepaliveTimeoutMs)), this.close();
|
|
2640
2662
|
}, this.keepaliveTimeoutMs);
|
|
2641
2663
|
}
|
|
2642
2664
|
/**
|
|
@@ -2659,7 +2681,7 @@ class Ma {
|
|
|
2659
2681
|
}
|
|
2660
2682
|
}
|
|
2661
2683
|
const ee = L("Channel");
|
|
2662
|
-
class
|
|
2684
|
+
class va {
|
|
2663
2685
|
state = "disconnected";
|
|
2664
2686
|
transport = null;
|
|
2665
2687
|
config;
|
|
@@ -2736,13 +2758,13 @@ class Oa {
|
|
|
2736
2758
|
switch (e.Type) {
|
|
2737
2759
|
case k.WebSocket:
|
|
2738
2760
|
case k.WebSocketProxy:
|
|
2739
|
-
this.transport = new
|
|
2761
|
+
this.transport = new Ma(r);
|
|
2740
2762
|
break;
|
|
2741
2763
|
case k.WebTransport:
|
|
2742
2764
|
case k.WebTransportProxy:
|
|
2743
2765
|
if (!mr())
|
|
2744
2766
|
throw new Error("WebTransport is not supported in this browser");
|
|
2745
|
-
this.transport = new
|
|
2767
|
+
this.transport = new La(r);
|
|
2746
2768
|
break;
|
|
2747
2769
|
default:
|
|
2748
2770
|
throw new Error(`Unsupported entrypoint type: ${k[e.Type]}`);
|
|
@@ -2774,7 +2796,7 @@ class Oa {
|
|
|
2774
2796
|
* Handle transport error.
|
|
2775
2797
|
*/
|
|
2776
2798
|
handleError(e) {
|
|
2777
|
-
ee.error("Channel error:", e), this.config.onError?.(e), e instanceof
|
|
2799
|
+
ee.error("Channel error:", e), this.config.onError?.(e), e instanceof He && this.handleClose("Keepalive timeout", !1);
|
|
2778
2800
|
}
|
|
2779
2801
|
/**
|
|
2780
2802
|
* Update and notify state change.
|
|
@@ -2784,7 +2806,7 @@ class Oa {
|
|
|
2784
2806
|
}
|
|
2785
2807
|
}
|
|
2786
2808
|
const G = L("ChannelManager");
|
|
2787
|
-
class
|
|
2809
|
+
class Pa {
|
|
2788
2810
|
channels = /* @__PURE__ */ new Map();
|
|
2789
2811
|
// keyed by opcode group
|
|
2790
2812
|
activeType = null;
|
|
@@ -2886,7 +2908,7 @@ class La {
|
|
|
2886
2908
|
* Connect a single channel.
|
|
2887
2909
|
*/
|
|
2888
2910
|
async connectChannel(e) {
|
|
2889
|
-
const r = new
|
|
2911
|
+
const r = new va({
|
|
2890
2912
|
entrypoint: e,
|
|
2891
2913
|
sessionId: this.config.sessionId,
|
|
2892
2914
|
keepaliveTimeoutMs: this.config.keepaliveTimeoutMs,
|
|
@@ -2941,7 +2963,7 @@ class La {
|
|
|
2941
2963
|
if (!this.shouldReconnect)
|
|
2942
2964
|
return;
|
|
2943
2965
|
if (this.reconnectAttempts >= this.config.maxReconnectAttempts) {
|
|
2944
|
-
G.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new
|
|
2966
|
+
G.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new Ca(this.config.maxReconnectAttempts));
|
|
2945
2967
|
return;
|
|
2946
2968
|
}
|
|
2947
2969
|
this.setState("reconnecting"), this.reconnectAttempts++;
|
|
@@ -2968,25 +2990,25 @@ class La {
|
|
|
2968
2990
|
this.state !== e && (this.state = e, this.config.onStateChange?.(e));
|
|
2969
2991
|
}
|
|
2970
2992
|
}
|
|
2971
|
-
const
|
|
2972
|
-
function
|
|
2993
|
+
const Fa = 5e3, Ba = 3e4, qe = 35e3, et = 500, tt = 6, _r = 6e4, be = "ikon_device_id";
|
|
2994
|
+
function Ke() {
|
|
2973
2995
|
if (typeof window > "u" || typeof localStorage > "u")
|
|
2974
2996
|
return crypto.randomUUID();
|
|
2975
2997
|
try {
|
|
2976
|
-
let t = localStorage.getItem(
|
|
2977
|
-
return t || (t = crypto.randomUUID(), localStorage.setItem(
|
|
2998
|
+
let t = localStorage.getItem(be);
|
|
2999
|
+
return t || (t = crypto.randomUUID(), localStorage.setItem(be, t)), t;
|
|
2978
3000
|
} catch {
|
|
2979
3001
|
return crypto.randomUUID();
|
|
2980
3002
|
}
|
|
2981
3003
|
}
|
|
2982
|
-
function
|
|
3004
|
+
function Nl() {
|
|
2983
3005
|
if (!(typeof localStorage > "u"))
|
|
2984
3006
|
try {
|
|
2985
|
-
localStorage.removeItem(
|
|
3007
|
+
localStorage.removeItem(be);
|
|
2986
3008
|
} catch {
|
|
2987
3009
|
}
|
|
2988
3010
|
}
|
|
2989
|
-
function
|
|
3011
|
+
function gl(t) {
|
|
2990
3012
|
try {
|
|
2991
3013
|
const e = t.split(".");
|
|
2992
3014
|
return e.length !== 3 ? null : JSON.parse(atob(e[1])).id ?? null;
|
|
@@ -2994,24 +3016,24 @@ function yl(t) {
|
|
|
2994
3016
|
return null;
|
|
2995
3017
|
}
|
|
2996
3018
|
}
|
|
2997
|
-
const Ee = {},
|
|
3019
|
+
const Ee = {}, Re = "https://api.prod.ikon.live", pe = "https://api.dev.ikon.live", rt = "https://auth.ikonai.com", nt = "https://auth.dev.ikonai.com", Cl = "https://auth.ikonai.com";
|
|
2998
3020
|
function Tr(t) {
|
|
2999
|
-
return t === "development" ? pe :
|
|
3021
|
+
return t === "development" ? pe : Re;
|
|
3000
3022
|
}
|
|
3001
|
-
function
|
|
3023
|
+
function bl() {
|
|
3002
3024
|
const t = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_URL : void 0;
|
|
3003
|
-
return t || (typeof window > "u" ?
|
|
3025
|
+
return t || (typeof window > "u" ? Re : !Ye() || window.location.hostname.includes(".dev.") ? pe : Re);
|
|
3004
3026
|
}
|
|
3005
|
-
function
|
|
3027
|
+
function Rl() {
|
|
3006
3028
|
const t = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_TYPE : void 0;
|
|
3007
3029
|
if (t === "development" || t === "production")
|
|
3008
3030
|
return t;
|
|
3009
3031
|
const e = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_URL : void 0;
|
|
3010
|
-
return e ? e.includes(".dev.") ? "development" : "production" : typeof window > "u" ? "production" :
|
|
3032
|
+
return e ? e.includes(".dev.") ? "development" : "production" : typeof window > "u" ? "production" : Ye() ? window.location.hostname.includes(".dev.") ? "development" : "production" : "development";
|
|
3011
3033
|
}
|
|
3012
|
-
function
|
|
3034
|
+
function kl() {
|
|
3013
3035
|
const t = typeof import.meta < "u" ? Ee?.VITE_IKON_AUTH_URL : void 0;
|
|
3014
|
-
return t || (typeof window > "u" ?
|
|
3036
|
+
return t || (typeof window > "u" ? rt : !Ye() || window.location.hostname.includes(".dev.") ? nt : rt);
|
|
3015
3037
|
}
|
|
3016
3038
|
function Sr() {
|
|
3017
3039
|
if (typeof window > "u")
|
|
@@ -3021,8 +3043,8 @@ function Sr() {
|
|
|
3021
3043
|
e[r] = n;
|
|
3022
3044
|
return e;
|
|
3023
3045
|
}
|
|
3024
|
-
const
|
|
3025
|
-
function
|
|
3046
|
+
const Ga = ["ikon_token", "ikon_provider", "error"];
|
|
3047
|
+
function Ul() {
|
|
3026
3048
|
if (typeof window > "u")
|
|
3027
3049
|
return { parameters: {} };
|
|
3028
3050
|
const t = window.location.pathname;
|
|
@@ -3034,10 +3056,10 @@ function Rl() {
|
|
|
3034
3056
|
throw new Error("URL cannot contain both /s/[sessionId] and /c/[channelKey]");
|
|
3035
3057
|
const i = Sr(), o = {};
|
|
3036
3058
|
for (const [a, c] of Object.entries(i))
|
|
3037
|
-
|
|
3059
|
+
Ga.includes(a) || (o[a] = c);
|
|
3038
3060
|
return { sessionId: e, channelKey: r, parameters: o };
|
|
3039
3061
|
}
|
|
3040
|
-
function
|
|
3062
|
+
function Ye() {
|
|
3041
3063
|
if (typeof window > "u") return !1;
|
|
3042
3064
|
const t = window.location.hostname;
|
|
3043
3065
|
if (t === "localhost" || t === "127.0.0.1" || t === "::1" || t.startsWith("10.") || t.startsWith("192.168."))
|
|
@@ -3049,8 +3071,8 @@ function Ke() {
|
|
|
3049
3071
|
}
|
|
3050
3072
|
return !0;
|
|
3051
3073
|
}
|
|
3052
|
-
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,
|
|
3053
|
-
async function
|
|
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, Va = 5e3;
|
|
3075
|
+
async function Wa(t) {
|
|
3054
3076
|
try {
|
|
3055
3077
|
const e = await fetch(`${pe}/users/me`, {
|
|
3056
3078
|
credentials: "include",
|
|
@@ -3079,14 +3101,14 @@ async function Ar(t, e, r, n, s, i, o) {
|
|
|
3079
3101
|
...r ? { key: r } : {},
|
|
3080
3102
|
...n && Object.keys(n).length > 0 ? { params: n } : {},
|
|
3081
3103
|
...s ? { hash: s } : {}
|
|
3082
|
-
},
|
|
3083
|
-
if (!
|
|
3084
|
-
const d = await
|
|
3085
|
-
throw new y(`Failed to request channel: ${
|
|
3104
|
+
}, l = await fetch(a, wr(c, i, o));
|
|
3105
|
+
if (!l.ok) {
|
|
3106
|
+
const d = await l.text().catch(() => "Unknown error");
|
|
3107
|
+
throw new y(`Failed to request channel: ${l.status} ${d}`);
|
|
3086
3108
|
}
|
|
3087
|
-
return await
|
|
3109
|
+
return await l.json();
|
|
3088
3110
|
}
|
|
3089
|
-
async function
|
|
3111
|
+
async function Ha(t, e, r, n) {
|
|
3090
3112
|
const s = `${t}/rooms/connect`, i = await fetch(s, wr(e, r, n));
|
|
3091
3113
|
if (!i.ok) {
|
|
3092
3114
|
const o = await i.text().catch(() => "Unknown error");
|
|
@@ -3096,33 +3118,33 @@ async function Va(t, e, r, n) {
|
|
|
3096
3118
|
}
|
|
3097
3119
|
async function yr(t, e, r, n, s) {
|
|
3098
3120
|
const i = Date.now();
|
|
3099
|
-
let o =
|
|
3121
|
+
let o = xa;
|
|
3100
3122
|
for (; ; ) {
|
|
3101
3123
|
if (s?.aborted)
|
|
3102
3124
|
throw new y("Connection aborted");
|
|
3103
3125
|
if (Date.now() - i >= r)
|
|
3104
|
-
throw new
|
|
3105
|
-
const c = await
|
|
3106
|
-
if (
|
|
3126
|
+
throw new ba(r);
|
|
3127
|
+
const c = await Ha(t, e, n, s), l = c.state?.toLowerCase();
|
|
3128
|
+
if (l === "running")
|
|
3107
3129
|
return c;
|
|
3108
|
-
if (
|
|
3109
|
-
await pr(o, s), o = Math.min(o * 1.5,
|
|
3130
|
+
if (l === "provisioning") {
|
|
3131
|
+
await pr(o, s), o = Math.min(o * 1.5, Va);
|
|
3110
3132
|
continue;
|
|
3111
3133
|
}
|
|
3112
3134
|
throw new y(`Unexpected channel state: ${c.state}`);
|
|
3113
3135
|
}
|
|
3114
3136
|
}
|
|
3115
|
-
async function
|
|
3137
|
+
async function je(t, e) {
|
|
3116
3138
|
const r = await fetch(t, { signal: e });
|
|
3117
3139
|
if (!r.ok) {
|
|
3118
3140
|
const o = await r.text().catch(() => "Unknown error");
|
|
3119
3141
|
throw new y(`Failed to connect: ${r.status} ${o}`);
|
|
3120
3142
|
}
|
|
3121
3143
|
const n = await r.arrayBuffer(), s = new Uint8Array(n);
|
|
3122
|
-
return { authResponse:
|
|
3144
|
+
return { authResponse: await Ns(s) };
|
|
3123
3145
|
}
|
|
3124
|
-
function
|
|
3125
|
-
return
|
|
3146
|
+
function $a(t, e) {
|
|
3147
|
+
return bs({
|
|
3126
3148
|
ServerSessionId: "",
|
|
3127
3149
|
// Server will fill this in
|
|
3128
3150
|
ContextType: J.Browser,
|
|
@@ -3131,7 +3153,7 @@ function Wa(t, e) {
|
|
|
3131
3153
|
IsInternal: !1,
|
|
3132
3154
|
Description: t.description ?? "Ikon SDK TypeScript",
|
|
3133
3155
|
UserId: e,
|
|
3134
|
-
DeviceId: t.deviceId ??
|
|
3156
|
+
DeviceId: t.deviceId ?? Ke(),
|
|
3135
3157
|
ProductId: t.productId ?? "ikon-sdk",
|
|
3136
3158
|
VersionId: t.versionId ?? "1.0.0",
|
|
3137
3159
|
InstallId: t.installId ?? "",
|
|
@@ -3149,7 +3171,7 @@ function Wa(t, e) {
|
|
|
3149
3171
|
Parameters: t.parameters ?? {}
|
|
3150
3172
|
});
|
|
3151
3173
|
}
|
|
3152
|
-
function
|
|
3174
|
+
function Ka(t) {
|
|
3153
3175
|
return {
|
|
3154
3176
|
ServerSessionId: t.ServerSessionId,
|
|
3155
3177
|
ContextType: t.ContextType,
|
|
@@ -3176,13 +3198,13 @@ function Ha(t) {
|
|
|
3176
3198
|
Parameters: t.Parameters
|
|
3177
3199
|
};
|
|
3178
3200
|
}
|
|
3179
|
-
async function
|
|
3201
|
+
async function Ya(t, e) {
|
|
3180
3202
|
const r = `https://${t.host}:${t.httpsPort}`;
|
|
3181
3203
|
Ie.debug(`Authenticating with local server: ${r}`);
|
|
3182
3204
|
const s = { ...Sr(), ...t.parameters };
|
|
3183
3205
|
let i = t.userId;
|
|
3184
|
-
i || (i = await
|
|
3185
|
-
const o =
|
|
3206
|
+
i || (i = await Wa(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')));
|
|
3207
|
+
const o = $a({ ...t, parameters: s }, i), a = Ka(o), c = await fetch(`${r}/connect-token`, {
|
|
3186
3208
|
method: "POST",
|
|
3187
3209
|
headers: {
|
|
3188
3210
|
"Content-Type": "application/json"
|
|
@@ -3198,9 +3220,9 @@ async function $a(t, e) {
|
|
|
3198
3220
|
if (!f)
|
|
3199
3221
|
throw new y("Server did not return a token");
|
|
3200
3222
|
const d = `${r}/connect?token=${encodeURIComponent(f)}`;
|
|
3201
|
-
return
|
|
3223
|
+
return je(d, e);
|
|
3202
3224
|
}
|
|
3203
|
-
async function
|
|
3225
|
+
async function ja(t, e) {
|
|
3204
3226
|
if (t.sessionId && t.channelKey)
|
|
3205
3227
|
throw new y("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
3206
3228
|
const r = Tr(t.backendType);
|
|
@@ -3242,7 +3264,7 @@ async function Ka(t, e) {
|
|
|
3242
3264
|
clientType: t.clientType ?? X.DesktopWeb,
|
|
3243
3265
|
payloadType: Q.Teleport,
|
|
3244
3266
|
description: t.description ?? "Ikon SDK TypeScript",
|
|
3245
|
-
deviceId: t.deviceId ??
|
|
3267
|
+
deviceId: t.deviceId ?? Ke(),
|
|
3246
3268
|
productId: t.productId ?? "",
|
|
3247
3269
|
versionId: t.versionId ?? "",
|
|
3248
3270
|
installId: t.installId ?? "",
|
|
@@ -3254,13 +3276,13 @@ async function Ka(t, e) {
|
|
|
3254
3276
|
launchParams: t.parameters,
|
|
3255
3277
|
hash: t.sessionId,
|
|
3256
3278
|
waitForRunning: !0
|
|
3257
|
-
},
|
|
3279
|
+
}, l = t.provisioningTimeoutMs ?? _r, f = await yr(r, c, l, i, e);
|
|
3258
3280
|
if (!f.configuration?.url)
|
|
3259
3281
|
throw new y("Backend did not return a connect URL");
|
|
3260
3282
|
const d = f.configuration.url;
|
|
3261
|
-
return
|
|
3283
|
+
return je(d, e);
|
|
3262
3284
|
}
|
|
3263
|
-
async function
|
|
3285
|
+
async function za(t, e) {
|
|
3264
3286
|
if (t.sessionId && t.channelKey)
|
|
3265
3287
|
throw new y("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
3266
3288
|
const r = Tr(t.backendType), n = t.token;
|
|
@@ -3283,7 +3305,7 @@ async function Ya(t, e) {
|
|
|
3283
3305
|
clientType: X.DesktopWeb,
|
|
3284
3306
|
payloadType: Q.Teleport,
|
|
3285
3307
|
description: t.description ?? "Ikon SDK TypeScript",
|
|
3286
|
-
deviceId: t.deviceId ??
|
|
3308
|
+
deviceId: t.deviceId ?? Ke(),
|
|
3287
3309
|
productId: t.productId ?? "",
|
|
3288
3310
|
versionId: t.versionId ?? "",
|
|
3289
3311
|
installId: t.installId ?? "",
|
|
@@ -3298,25 +3320,25 @@ async function Ya(t, e) {
|
|
|
3298
3320
|
}, a = t.provisioningTimeoutMs ?? _r, c = await yr(r, o, a, n, e);
|
|
3299
3321
|
if (!c.configuration?.url)
|
|
3300
3322
|
throw new y("Backend did not return a connect URL");
|
|
3301
|
-
const
|
|
3302
|
-
return
|
|
3323
|
+
const l = c.configuration.url;
|
|
3324
|
+
return je(l, e);
|
|
3303
3325
|
}
|
|
3304
|
-
const Nr = "ikon.theme",
|
|
3326
|
+
const Nr = "ikon.theme", ke = "ikon.theme-user", Xa = "ikon.theme-change";
|
|
3305
3327
|
function gr(t) {
|
|
3306
3328
|
typeof document < "u" && document.documentElement && document.documentElement.setAttribute("data-theme", t);
|
|
3307
3329
|
}
|
|
3308
|
-
const
|
|
3330
|
+
const Ja = {
|
|
3309
3331
|
name: "ikon.client.getTheme",
|
|
3310
3332
|
description: "Get the currently selected client theme",
|
|
3311
3333
|
returnType: { kind: "string", nullable: !0 }
|
|
3312
3334
|
};
|
|
3313
|
-
function
|
|
3335
|
+
function Qa() {
|
|
3314
3336
|
if (typeof window > "u" || !window.localStorage)
|
|
3315
3337
|
return null;
|
|
3316
|
-
const t = window.localStorage.getItem(
|
|
3338
|
+
const t = window.localStorage.getItem(ke) ?? window.localStorage.getItem(Nr) ?? "light";
|
|
3317
3339
|
return gr(t), t;
|
|
3318
3340
|
}
|
|
3319
|
-
const
|
|
3341
|
+
const Za = {
|
|
3320
3342
|
name: "ikon.client.setTheme",
|
|
3321
3343
|
description: "Update the client UI theme",
|
|
3322
3344
|
returnType: { kind: "boolean" },
|
|
@@ -3325,49 +3347,49 @@ const Ja = {
|
|
|
3325
3347
|
{ name: "persist", type: { kind: "boolean", nullable: !0 }, description: "Whether to persist as user preference" }
|
|
3326
3348
|
]
|
|
3327
3349
|
};
|
|
3328
|
-
function
|
|
3350
|
+
function qa(t, e) {
|
|
3329
3351
|
if (typeof window > "u" || !window.localStorage || typeof t != "string")
|
|
3330
3352
|
return !1;
|
|
3331
3353
|
const r = t.trim().toLowerCase();
|
|
3332
3354
|
if (!r)
|
|
3333
3355
|
return !1;
|
|
3334
3356
|
const n = e === void 0 ? !0 : !!e, s = window.localStorage;
|
|
3335
|
-
n ? s.setItem(
|
|
3357
|
+
n ? s.setItem(ke, r) : s.removeItem(ke), s.setItem(Nr, r);
|
|
3336
3358
|
try {
|
|
3337
|
-
window.dispatchEvent(new CustomEvent(
|
|
3359
|
+
window.dispatchEvent(new CustomEvent(Xa, { detail: { mode: r } }));
|
|
3338
3360
|
} catch {
|
|
3339
3361
|
}
|
|
3340
3362
|
return gr(r), !0;
|
|
3341
3363
|
}
|
|
3342
|
-
const
|
|
3364
|
+
const ec = {
|
|
3343
3365
|
name: "ikon.client.getLanguage",
|
|
3344
3366
|
description: "Get the browser language preference",
|
|
3345
3367
|
returnType: { kind: "string" }
|
|
3346
3368
|
};
|
|
3347
|
-
function
|
|
3369
|
+
function tc() {
|
|
3348
3370
|
return typeof navigator > "u" ? "en-US" : navigator.language || "en-US";
|
|
3349
3371
|
}
|
|
3350
|
-
const
|
|
3372
|
+
const rc = {
|
|
3351
3373
|
name: "ikon.client.getTimezone",
|
|
3352
3374
|
description: "Get the browser timezone (IANA format)",
|
|
3353
3375
|
returnType: { kind: "string" }
|
|
3354
3376
|
};
|
|
3355
|
-
function
|
|
3377
|
+
function nc() {
|
|
3356
3378
|
try {
|
|
3357
3379
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
3358
3380
|
} catch {
|
|
3359
3381
|
return "UTC";
|
|
3360
3382
|
}
|
|
3361
3383
|
}
|
|
3362
|
-
const
|
|
3384
|
+
const sc = {
|
|
3363
3385
|
name: "ikon.client.getUrl",
|
|
3364
3386
|
description: "Get the current browser URL path and query string",
|
|
3365
3387
|
returnType: { kind: "string", nullable: !0 }
|
|
3366
3388
|
};
|
|
3367
|
-
function
|
|
3389
|
+
function ic() {
|
|
3368
3390
|
return typeof window > "u" ? null : window.location.pathname + window.location.search;
|
|
3369
3391
|
}
|
|
3370
|
-
const
|
|
3392
|
+
const oc = {
|
|
3371
3393
|
name: "ikon.client.setUrl",
|
|
3372
3394
|
description: "Update the browser URL without triggering a page reload",
|
|
3373
3395
|
returnType: { kind: "boolean" },
|
|
@@ -3376,7 +3398,7 @@ const sc = {
|
|
|
3376
3398
|
{ name: "replace", type: { kind: "boolean", nullable: !0 }, description: "If true, replaces current history entry instead of adding new one" }
|
|
3377
3399
|
]
|
|
3378
3400
|
};
|
|
3379
|
-
function
|
|
3401
|
+
function ac(t, e) {
|
|
3380
3402
|
if (typeof window > "u" || !window.history || typeof t != "string")
|
|
3381
3403
|
return !1;
|
|
3382
3404
|
const r = t.trim();
|
|
@@ -3388,13 +3410,13 @@ function ic(t, e) {
|
|
|
3388
3410
|
return !1;
|
|
3389
3411
|
}
|
|
3390
3412
|
}
|
|
3391
|
-
const
|
|
3413
|
+
const cc = {
|
|
3392
3414
|
name: "ikon.client.vibrate",
|
|
3393
3415
|
description: "Trigger haptic feedback on supported devices",
|
|
3394
3416
|
returnType: { kind: "boolean" },
|
|
3395
3417
|
parameters: [{ name: "pattern", type: { kind: "string" }, description: 'Duration in ms, or comma-separated pattern (e.g., "200" or "100,50,100")' }]
|
|
3396
3418
|
};
|
|
3397
|
-
function
|
|
3419
|
+
function lc(t) {
|
|
3398
3420
|
if (typeof navigator > "u" || !navigator.vibrate || typeof t != "string")
|
|
3399
3421
|
return !1;
|
|
3400
3422
|
try {
|
|
@@ -3405,13 +3427,13 @@ function ac(t) {
|
|
|
3405
3427
|
}
|
|
3406
3428
|
}
|
|
3407
3429
|
let te = null;
|
|
3408
|
-
const
|
|
3430
|
+
const uc = {
|
|
3409
3431
|
name: "ikon.client.keepScreenAwake",
|
|
3410
3432
|
description: "Prevent or allow the screen to sleep",
|
|
3411
3433
|
returnType: { kind: "boolean" },
|
|
3412
3434
|
parameters: [{ name: "enabled", type: { kind: "boolean" }, description: "Whether to keep the screen awake" }]
|
|
3413
3435
|
};
|
|
3414
|
-
async function
|
|
3436
|
+
async function hc(t) {
|
|
3415
3437
|
if (typeof navigator > "u" || !("wakeLock" in navigator))
|
|
3416
3438
|
return !1;
|
|
3417
3439
|
try {
|
|
@@ -3420,15 +3442,15 @@ async function lc(t) {
|
|
|
3420
3442
|
return !1;
|
|
3421
3443
|
}
|
|
3422
3444
|
}
|
|
3423
|
-
const
|
|
3445
|
+
const dc = {
|
|
3424
3446
|
name: "ikon.client.getVisibility",
|
|
3425
3447
|
description: "Get the current page visibility state",
|
|
3426
3448
|
returnType: { kind: "string", nullable: !0 }
|
|
3427
3449
|
};
|
|
3428
|
-
function
|
|
3450
|
+
function fc() {
|
|
3429
3451
|
return typeof document > "u" ? null : document.visibilityState || null;
|
|
3430
3452
|
}
|
|
3431
|
-
const
|
|
3453
|
+
const Ec = {
|
|
3432
3454
|
name: "ikon.client.scrollTo",
|
|
3433
3455
|
description: "Scroll the page to a specific position",
|
|
3434
3456
|
returnType: { kind: "boolean" },
|
|
@@ -3438,7 +3460,7 @@ const dc = {
|
|
|
3438
3460
|
{ name: "smooth", type: { kind: "boolean", nullable: !0 }, description: "Whether to animate the scroll" }
|
|
3439
3461
|
]
|
|
3440
3462
|
};
|
|
3441
|
-
function
|
|
3463
|
+
function pc(t, e, r) {
|
|
3442
3464
|
if (typeof window > "u" || typeof t != "number" || typeof e != "number")
|
|
3443
3465
|
return !1;
|
|
3444
3466
|
try {
|
|
@@ -3451,12 +3473,12 @@ function fc(t, e, r) {
|
|
|
3451
3473
|
return !1;
|
|
3452
3474
|
}
|
|
3453
3475
|
}
|
|
3454
|
-
const
|
|
3476
|
+
const Ic = {
|
|
3455
3477
|
name: "ikon.client.getBatteryLevel",
|
|
3456
3478
|
description: "Get the current battery level (0-100)",
|
|
3457
3479
|
returnType: { kind: "number", nullable: !0 }
|
|
3458
3480
|
};
|
|
3459
|
-
async function
|
|
3481
|
+
async function mc() {
|
|
3460
3482
|
if (typeof navigator > "u" || !("getBattery" in navigator))
|
|
3461
3483
|
return null;
|
|
3462
3484
|
try {
|
|
@@ -3466,19 +3488,18 @@ async function pc() {
|
|
|
3466
3488
|
return null;
|
|
3467
3489
|
}
|
|
3468
3490
|
}
|
|
3469
|
-
const
|
|
3491
|
+
const _c = {
|
|
3470
3492
|
name: "ikon.client.getNetworkType",
|
|
3471
3493
|
description: "Get the current network connection type",
|
|
3472
3494
|
returnType: { kind: "string", nullable: !0 }
|
|
3473
3495
|
};
|
|
3474
|
-
function
|
|
3496
|
+
function Tc() {
|
|
3475
3497
|
if (typeof navigator > "u")
|
|
3476
3498
|
return null;
|
|
3477
3499
|
const t = navigator.connection;
|
|
3478
3500
|
return t && (t.effectiveType || t.type) || null;
|
|
3479
3501
|
}
|
|
3480
|
-
const
|
|
3481
|
-
{ definition: za, handler: Xa },
|
|
3502
|
+
const Sc = [
|
|
3482
3503
|
{ definition: Ja, handler: Qa },
|
|
3483
3504
|
{ definition: Za, handler: qa },
|
|
3484
3505
|
{ definition: ec, handler: tc },
|
|
@@ -3489,16 +3510,17 @@ const _c = [
|
|
|
3489
3510
|
{ definition: uc, handler: hc },
|
|
3490
3511
|
{ definition: dc, handler: fc },
|
|
3491
3512
|
{ definition: Ec, handler: pc },
|
|
3492
|
-
{ definition: Ic, handler: mc }
|
|
3513
|
+
{ definition: Ic, handler: mc },
|
|
3514
|
+
{ definition: _c, handler: Tc }
|
|
3493
3515
|
];
|
|
3494
|
-
function
|
|
3495
|
-
const e =
|
|
3516
|
+
function wc(t) {
|
|
3517
|
+
const e = Sc.map(({ definition: r, handler: n }) => t.register(r, n));
|
|
3496
3518
|
return () => e.forEach((r) => r());
|
|
3497
3519
|
}
|
|
3498
|
-
function
|
|
3520
|
+
function st() {
|
|
3499
3521
|
return typeof window < "u" && typeof navigator < "u";
|
|
3500
3522
|
}
|
|
3501
|
-
const
|
|
3523
|
+
const Ac = new Uint8Array(0);
|
|
3502
3524
|
function me(t) {
|
|
3503
3525
|
switch (t.kind) {
|
|
3504
3526
|
case "array":
|
|
@@ -3537,7 +3559,7 @@ function re(t) {
|
|
|
3537
3559
|
return t;
|
|
3538
3560
|
}
|
|
3539
3561
|
}
|
|
3540
|
-
function
|
|
3562
|
+
function it(t, e) {
|
|
3541
3563
|
if (t === void 0 || t === "")
|
|
3542
3564
|
return;
|
|
3543
3565
|
const r = JSON.parse(t);
|
|
@@ -3558,7 +3580,7 @@ function Cr(t, e) {
|
|
|
3558
3580
|
}
|
|
3559
3581
|
return JSON.stringify(t);
|
|
3560
3582
|
}
|
|
3561
|
-
function
|
|
3583
|
+
function yc(t, e) {
|
|
3562
3584
|
const r = (t.parameters ?? []).map((i) => {
|
|
3563
3585
|
const o = me(i.type), a = Object.prototype.hasOwnProperty.call(i, "defaultValue"), c = a ? Cr(i.defaultValue, o) : "";
|
|
3564
3586
|
return {
|
|
@@ -3585,7 +3607,7 @@ function wc(t, e) {
|
|
|
3585
3607
|
TypeName: re(i.descriptor),
|
|
3586
3608
|
HasDefaultValue: i.hasDefaultValue,
|
|
3587
3609
|
DefaultValueJson: i.defaultValueJson,
|
|
3588
|
-
DefaultValueData:
|
|
3610
|
+
DefaultValueData: Ac,
|
|
3589
3611
|
IsEnumerable: !1,
|
|
3590
3612
|
EnumerableItemTypeName: "",
|
|
3591
3613
|
Description: i.description ?? ""
|
|
@@ -3599,11 +3621,11 @@ function wc(t, e) {
|
|
|
3599
3621
|
returnType: n
|
|
3600
3622
|
};
|
|
3601
3623
|
}
|
|
3602
|
-
const
|
|
3603
|
-
function
|
|
3624
|
+
const Se = L("FunctionRegistry"), Nc = new Uint8Array(0);
|
|
3625
|
+
function gc(t) {
|
|
3604
3626
|
return !t || typeof t != "object" ? !1 : t.data instanceof Uint8Array;
|
|
3605
3627
|
}
|
|
3606
|
-
class
|
|
3628
|
+
class Cc {
|
|
3607
3629
|
functions = /* @__PURE__ */ new Map();
|
|
3608
3630
|
config = null;
|
|
3609
3631
|
isConnected = !1;
|
|
@@ -3625,7 +3647,7 @@ class Nc {
|
|
|
3625
3647
|
* If already connected, sends registration to server immediately.
|
|
3626
3648
|
*/
|
|
3627
3649
|
register(e, r) {
|
|
3628
|
-
const n =
|
|
3650
|
+
const n = yc(e, r);
|
|
3629
3651
|
return this.functions.set(e.name, n), this.isConnected && this.config && this.sendRegistration(n), () => this.unregister(e.name);
|
|
3630
3652
|
}
|
|
3631
3653
|
/**
|
|
@@ -3659,7 +3681,9 @@ class Nc {
|
|
|
3659
3681
|
handleProtocolMessage(e, r) {
|
|
3660
3682
|
if (r === S.ACTION_FUNCTION_CALL) {
|
|
3661
3683
|
const n = ne(e);
|
|
3662
|
-
return this.handleFunctionCall(e, n.senderId)
|
|
3684
|
+
return this.handleFunctionCall(e, n.senderId).catch((s) => {
|
|
3685
|
+
Se.error("Failed to handle function call:", s);
|
|
3686
|
+
}), !0;
|
|
3663
3687
|
}
|
|
3664
3688
|
return !1;
|
|
3665
3689
|
}
|
|
@@ -3670,7 +3694,7 @@ class Nc {
|
|
|
3670
3694
|
sendAllRegistrations() {
|
|
3671
3695
|
if (!this.config || this.functions.size === 0)
|
|
3672
3696
|
return;
|
|
3673
|
-
const e = Array.from(this.functions.values()).map((s) => s.registerPayload), r =
|
|
3697
|
+
const e = Array.from(this.functions.values()).map((s) => s.registerPayload), r = Ri({ Functions: e }), n = Mi(r, this.config.sessionId);
|
|
3674
3698
|
this.config.sendProtocolMessage(n);
|
|
3675
3699
|
}
|
|
3676
3700
|
/**
|
|
@@ -3679,16 +3703,16 @@ class Nc {
|
|
|
3679
3703
|
sendRegistration(e) {
|
|
3680
3704
|
if (!this.config)
|
|
3681
3705
|
return;
|
|
3682
|
-
const r =
|
|
3706
|
+
const r = Ti(e.registerPayload, this.config.sessionId);
|
|
3683
3707
|
this.config.sendProtocolMessage(r);
|
|
3684
3708
|
}
|
|
3685
3709
|
/**
|
|
3686
3710
|
* Handle an incoming function call.
|
|
3687
3711
|
*/
|
|
3688
|
-
handleFunctionCall(e, r) {
|
|
3689
|
-
const n =
|
|
3712
|
+
async handleFunctionCall(e, r) {
|
|
3713
|
+
const n = await Xs(e), s = this.functions.get(n.FunctionName);
|
|
3690
3714
|
if (!s) {
|
|
3691
|
-
|
|
3715
|
+
Se.warn(`Received call for unknown function: ${n.FunctionName}`), this.sendError(n.CallId, n.InstanceId, r, new Error(`Unknown function: ${n.FunctionName}`));
|
|
3692
3716
|
return;
|
|
3693
3717
|
}
|
|
3694
3718
|
this.sendAck(n.CallId, n.InstanceId, r), this.executeFunction(s, n, r);
|
|
@@ -3699,17 +3723,17 @@ class Nc {
|
|
|
3699
3723
|
async executeFunction(e, r, n) {
|
|
3700
3724
|
try {
|
|
3701
3725
|
const s = [];
|
|
3702
|
-
for (let
|
|
3703
|
-
const f = e.parameters[
|
|
3704
|
-
h === void 0 || h === "" ? f.hasDefaultValue ? s.push(
|
|
3726
|
+
for (let l = 0; l < e.parameters.length; l++) {
|
|
3727
|
+
const f = e.parameters[l], h = r.Parameters?.[l]?.ValueJson;
|
|
3728
|
+
h === void 0 || h === "" ? f.hasDefaultValue ? s.push(it(f.defaultValueJson, f.descriptor)) : s.push(void 0) : s.push(it(h, f.descriptor));
|
|
3705
3729
|
}
|
|
3706
3730
|
const i = await e.handler(...s);
|
|
3707
|
-
let o = i, a =
|
|
3708
|
-
|
|
3731
|
+
let o = i, a = Nc;
|
|
3732
|
+
gc(i) && (o = i.value, a = new Uint8Array(i.data));
|
|
3709
3733
|
const c = Cr(o, e.returnType);
|
|
3710
3734
|
this.sendResult(r.CallId, r.InstanceId, n, e, c, a);
|
|
3711
3735
|
} catch (s) {
|
|
3712
|
-
|
|
3736
|
+
Se.error(`Function ${r.FunctionName} execution failed:`, s), this.sendError(r.CallId, r.InstanceId, n, s instanceof Error ? s : new Error(String(s)));
|
|
3713
3737
|
}
|
|
3714
3738
|
}
|
|
3715
3739
|
/**
|
|
@@ -3718,7 +3742,7 @@ class Nc {
|
|
|
3718
3742
|
sendAck(e, r, n) {
|
|
3719
3743
|
if (!this.config)
|
|
3720
3744
|
return;
|
|
3721
|
-
const s =
|
|
3745
|
+
const s = Ps(Ms({ CallId: e, InstanceId: r }), this.config.sessionId, { targetIds: [n] });
|
|
3722
3746
|
this.config.sendProtocolMessage(s);
|
|
3723
3747
|
}
|
|
3724
3748
|
/**
|
|
@@ -3727,8 +3751,8 @@ class Nc {
|
|
|
3727
3751
|
sendResult(e, r, n, s, i, o) {
|
|
3728
3752
|
if (!this.config)
|
|
3729
3753
|
return;
|
|
3730
|
-
const a =
|
|
3731
|
-
|
|
3754
|
+
const a = Hi(
|
|
3755
|
+
Gi({
|
|
3732
3756
|
CallId: e,
|
|
3733
3757
|
InstanceId: r,
|
|
3734
3758
|
ResultTypeName: re(s.returnType),
|
|
@@ -3746,8 +3770,8 @@ class Nc {
|
|
|
3746
3770
|
sendError(e, r, n, s) {
|
|
3747
3771
|
if (!this.config)
|
|
3748
3772
|
return;
|
|
3749
|
-
const i =
|
|
3750
|
-
|
|
3773
|
+
const i = fi(
|
|
3774
|
+
li({
|
|
3751
3775
|
CallId: e,
|
|
3752
3776
|
InstanceId: r,
|
|
3753
3777
|
ErrorMessage: s.message,
|
|
@@ -3760,10 +3784,10 @@ class Nc {
|
|
|
3760
3784
|
this.config.sendProtocolMessage(i);
|
|
3761
3785
|
}
|
|
3762
3786
|
}
|
|
3763
|
-
function
|
|
3787
|
+
function bc(t, e) {
|
|
3764
3788
|
return { value: t, data: e };
|
|
3765
3789
|
}
|
|
3766
|
-
function
|
|
3790
|
+
function we(t) {
|
|
3767
3791
|
if (!(typeof t != "string" || !t.trim()))
|
|
3768
3792
|
try {
|
|
3769
3793
|
return JSON.parse(t);
|
|
@@ -3776,7 +3800,7 @@ const Te = {
|
|
|
3776
3800
|
StartAudioCapture: "ikon.client.startAudioCapture",
|
|
3777
3801
|
StopCapture: "ikon.client.stopCapture",
|
|
3778
3802
|
CaptureImage: "ikon.client.captureImage"
|
|
3779
|
-
},
|
|
3803
|
+
}, Rc = {
|
|
3780
3804
|
name: Te.StartVideoCapture,
|
|
3781
3805
|
description: "Start camera or screen capture and stream video frames to the server",
|
|
3782
3806
|
returnType: { kind: "string" },
|
|
@@ -3784,42 +3808,42 @@ const Te = {
|
|
|
3784
3808
|
{ name: "source", type: { kind: "string", nullable: !0 }, description: "camera or screen" },
|
|
3785
3809
|
{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }
|
|
3786
3810
|
]
|
|
3787
|
-
},
|
|
3811
|
+
}, kc = {
|
|
3788
3812
|
name: Te.StartAudioCapture,
|
|
3789
3813
|
description: "Start microphone capture and stream audio frames to the server",
|
|
3790
3814
|
returnType: { kind: "string" },
|
|
3791
3815
|
parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
|
|
3792
|
-
},
|
|
3816
|
+
}, Uc = {
|
|
3793
3817
|
name: Te.StopCapture,
|
|
3794
3818
|
description: "Stop a previously started capture by captureId",
|
|
3795
3819
|
returnType: { kind: "boolean" },
|
|
3796
3820
|
parameters: [{ name: "captureId", type: { kind: "string" }, description: "Capture ID to stop" }]
|
|
3797
|
-
},
|
|
3821
|
+
}, Dc = {
|
|
3798
3822
|
name: Te.CaptureImage,
|
|
3799
3823
|
description: "Capture a single image from the camera and return metadata (JSON) plus binary image data",
|
|
3800
3824
|
returnType: { kind: "string" },
|
|
3801
3825
|
parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
|
|
3802
3826
|
};
|
|
3803
|
-
function
|
|
3827
|
+
function Mc(t, e) {
|
|
3804
3828
|
const r = [];
|
|
3805
3829
|
return r.push(
|
|
3806
|
-
t.register(
|
|
3830
|
+
t.register(Rc, async (n, s) => {
|
|
3807
3831
|
const i = e.mediaCapture;
|
|
3808
3832
|
if (!i)
|
|
3809
3833
|
throw new Error("Media capture is not available in this environment");
|
|
3810
|
-
const o =
|
|
3834
|
+
const o = we(s);
|
|
3811
3835
|
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;
|
|
3812
3836
|
})
|
|
3813
3837
|
), r.push(
|
|
3814
|
-
t.register(
|
|
3838
|
+
t.register(kc, async (n) => {
|
|
3815
3839
|
const s = e.mediaCapture;
|
|
3816
3840
|
if (!s)
|
|
3817
3841
|
throw new Error("Media capture is not available in this environment");
|
|
3818
|
-
const i =
|
|
3842
|
+
const i = we(n);
|
|
3819
3843
|
return (await s.audio.startMic({ userGesture: !1, options: i, constraints: i?.constraints })).captureId;
|
|
3820
3844
|
})
|
|
3821
3845
|
), r.push(
|
|
3822
|
-
t.register(
|
|
3846
|
+
t.register(Uc, async (n) => {
|
|
3823
3847
|
const s = e.mediaCapture;
|
|
3824
3848
|
if (!s || typeof n != "string" || !n.trim())
|
|
3825
3849
|
return !1;
|
|
@@ -3827,11 +3851,11 @@ function Uc(t, e) {
|
|
|
3827
3851
|
return i || o;
|
|
3828
3852
|
})
|
|
3829
3853
|
), r.push(
|
|
3830
|
-
t.register(
|
|
3854
|
+
t.register(Dc, async (n) => {
|
|
3831
3855
|
const s = e.mediaCapture;
|
|
3832
3856
|
if (!s)
|
|
3833
3857
|
throw new Error("Media capture is not available in this environment");
|
|
3834
|
-
const i =
|
|
3858
|
+
const i = we(n) ?? {}, o = await s.image.captureFromCamera({
|
|
3835
3859
|
userGesture: !1,
|
|
3836
3860
|
constraints: i.constraints,
|
|
3837
3861
|
mime: i.mime,
|
|
@@ -3839,7 +3863,7 @@ function Uc(t, e) {
|
|
|
3839
3863
|
width: i.width,
|
|
3840
3864
|
height: i.height
|
|
3841
3865
|
}), a = JSON.stringify({ mime: o.mime, width: o.width, height: o.height });
|
|
3842
|
-
return
|
|
3866
|
+
return bc(a, o.data);
|
|
3843
3867
|
})
|
|
3844
3868
|
), () => {
|
|
3845
3869
|
for (const n of r)
|
|
@@ -3851,9 +3875,9 @@ const br = () => {
|
|
|
3851
3875
|
return !1;
|
|
3852
3876
|
const t = navigator.userAgent, e = /iPad|iPhone|iPod/.test(t), r = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
|
|
3853
3877
|
return e || r;
|
|
3854
|
-
},
|
|
3878
|
+
}, Oc = globalThis;
|
|
3855
3879
|
function le() {
|
|
3856
|
-
if (typeof SharedArrayBuffer > "u" || typeof Atomics > "u" ||
|
|
3880
|
+
if (typeof SharedArrayBuffer > "u" || typeof Atomics > "u" || Oc.crossOriginIsolated === !1)
|
|
3857
3881
|
return !1;
|
|
3858
3882
|
try {
|
|
3859
3883
|
new SharedArrayBuffer(1);
|
|
@@ -3865,16 +3889,16 @@ function le() {
|
|
|
3865
3889
|
function Rr(t) {
|
|
3866
3890
|
return typeof AudioWorkletNode != "function" ? !1 : typeof t.audioWorklet?.addModule == "function";
|
|
3867
3891
|
}
|
|
3868
|
-
function
|
|
3892
|
+
function Lc(t) {
|
|
3869
3893
|
return new Worker(
|
|
3870
|
-
"" + new URL("assets/audio-playback-worker-
|
|
3894
|
+
"" + new URL("assets/audio-playback-worker-DPybcm1k.js", import.meta.url).href,
|
|
3871
3895
|
{
|
|
3872
3896
|
type: "module",
|
|
3873
3897
|
name: t?.name
|
|
3874
3898
|
}
|
|
3875
3899
|
);
|
|
3876
3900
|
}
|
|
3877
|
-
const ae = 48e3, R = 2, kr = 1500, ot = 512, at = "playback",
|
|
3901
|
+
const ae = 48e3, R = 2, kr = 1500, ot = 512, at = "playback", vc = 120, Pc = 300, Fc = 4, Bc = 200, Gc = 100, xc = 8e3, Vc = 10, Ur = 100, Ue = 50, Dr = 128, Wc = 20, Hc = !0, x = 1500, $c = -20, Kc = -100, Yc = 200, g = L("IkonAudioPlayback"), jc = () => {
|
|
3878
3902
|
if (typeof navigator > "u" || typeof window > "u")
|
|
3879
3903
|
return !1;
|
|
3880
3904
|
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;
|
|
@@ -3886,19 +3910,19 @@ const ae = 48e3, R = 2, kr = 1500, ot = 512, at = "playback", Oc = 120, Lc = 300
|
|
|
3886
3910
|
function K(t) {
|
|
3887
3911
|
return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
|
|
3888
3912
|
}
|
|
3889
|
-
function
|
|
3913
|
+
function zc(t) {
|
|
3890
3914
|
return `
|
|
3891
3915
|
// Audio buffer constants
|
|
3892
3916
|
const OUTPUT_SAMPLE_RATE_HZ = ${t.outputSampleRateHz};
|
|
3893
3917
|
const DEFAULT_FRAME_SAMPLES_PER_CHANNEL = Math.max(1, Math.round(OUTPUT_SAMPLE_RATE_HZ * 0.02));
|
|
3894
|
-
const BUFFER_TARGET_MIN_MS = ${
|
|
3895
|
-
const BUFFER_TARGET_MAX_MS = ${
|
|
3896
|
-
const JITTER_MULTIPLIER = ${
|
|
3918
|
+
const BUFFER_TARGET_MIN_MS = ${vc};
|
|
3919
|
+
const BUFFER_TARGET_MAX_MS = ${Pc};
|
|
3920
|
+
const JITTER_MULTIPLIER = ${Fc};
|
|
3897
3921
|
const LOCAL_BUFFER_MAX_MS = ${kr};
|
|
3898
|
-
const CONTROL_PERIOD_MS = ${
|
|
3899
|
-
const UNDERRUN_JUMP_MS = ${
|
|
3900
|
-
const STABLE_TIME_TO_DECREASE_MS = ${
|
|
3901
|
-
const DECREASE_STEP_MS = ${
|
|
3922
|
+
const CONTROL_PERIOD_MS = ${Bc};
|
|
3923
|
+
const UNDERRUN_JUMP_MS = ${Gc};
|
|
3924
|
+
const STABLE_TIME_TO_DECREASE_MS = ${xc};
|
|
3925
|
+
const DECREASE_STEP_MS = ${Vc};
|
|
3902
3926
|
const DEFAULT_STATS_INTERVAL_SAMPLES = OUTPUT_SAMPLE_RATE_HZ;
|
|
3903
3927
|
|
|
3904
3928
|
// Pre-computed reciprocals for division-free calculations
|
|
@@ -3907,7 +3931,7 @@ const MS_PER_SAMPLE = 1000 * INV_OUTPUT_SAMPLE_RATE_HZ;
|
|
|
3907
3931
|
|
|
3908
3932
|
// Fade envelope constants
|
|
3909
3933
|
const FADE_IN_DURATION_MS = ${Ur};
|
|
3910
|
-
const FADE_OUT_DURATION_MS = ${
|
|
3934
|
+
const FADE_OUT_DURATION_MS = ${Ue};
|
|
3911
3935
|
const FADE_IN_DURATION_SAMPLES = Math.round(OUTPUT_SAMPLE_RATE_HZ * FADE_IN_DURATION_MS / 1000);
|
|
3912
3936
|
const FADE_OUT_DURATION_SAMPLES = Math.round(OUTPUT_SAMPLE_RATE_HZ * FADE_OUT_DURATION_MS / 1000);
|
|
3913
3937
|
const FADE_IN_INCREMENT = 1.0 / FADE_IN_DURATION_SAMPLES;
|
|
@@ -3917,7 +3941,7 @@ const FADE_OUT_INCREMENT = 1.0 / FADE_OUT_DURATION_SAMPLES;
|
|
|
3917
3941
|
const RENDER_QUANTUM_SIZE = ${Dr};
|
|
3918
3942
|
|
|
3919
3943
|
// Buffer reduction crossfade constants (align to quantum boundary to avoid partial quanta)
|
|
3920
|
-
const BUFFER_REDUCTION_CROSSFADE_MS = ${
|
|
3944
|
+
const BUFFER_REDUCTION_CROSSFADE_MS = ${Wc};
|
|
3921
3945
|
const BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW = Math.round(OUTPUT_SAMPLE_RATE_HZ * BUFFER_REDUCTION_CROSSFADE_MS / 1000);
|
|
3922
3946
|
const BUFFER_REDUCTION_CROSSFADE_SAMPLES = Math.ceil(BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW / RENDER_QUANTUM_SIZE) * RENDER_QUANTUM_SIZE;
|
|
3923
3947
|
|
|
@@ -4128,7 +4152,7 @@ class IkonAudioPlayerProcessor extends AudioWorkletProcessor {
|
|
|
4128
4152
|
this.statsIntervalSamples = Math.max(1, Math.round((OUTPUT_SAMPLE_RATE_HZ * statusIntervalMs) / 1000));
|
|
4129
4153
|
|
|
4130
4154
|
// Normalization config (hardcoded)
|
|
4131
|
-
this.normalizationEnabled = ${
|
|
4155
|
+
this.normalizationEnabled = ${Hc};
|
|
4132
4156
|
|
|
4133
4157
|
// Stream states for audio buffer
|
|
4134
4158
|
this.streams = new Map();
|
|
@@ -4799,12 +4823,12 @@ class IkonAudioPlayerProcessor extends AudioWorkletProcessor {
|
|
|
4799
4823
|
registerProcessor('ikon-audio-player', IkonAudioPlayerProcessor);
|
|
4800
4824
|
`;
|
|
4801
4825
|
}
|
|
4802
|
-
class
|
|
4826
|
+
class ze {
|
|
4803
4827
|
client;
|
|
4804
4828
|
config;
|
|
4805
4829
|
enabled = !1;
|
|
4806
4830
|
stateUnsubscribe = null;
|
|
4807
|
-
isMobile =
|
|
4831
|
+
isMobile = jc();
|
|
4808
4832
|
boundVisibilityChange = null;
|
|
4809
4833
|
boundPageHide = null;
|
|
4810
4834
|
unlockHandler = null;
|
|
@@ -5016,10 +5040,10 @@ class je {
|
|
|
5016
5040
|
const o = r - i.playbackStartContextTime;
|
|
5017
5041
|
if (o < 0)
|
|
5018
5042
|
continue;
|
|
5019
|
-
const a = o * n * s, c = i.frames,
|
|
5043
|
+
const a = o * n * s, c = i.frames, l = i.count, d = (i.head - l + x) % x;
|
|
5020
5044
|
let h = null, E = null;
|
|
5021
|
-
for (let
|
|
5022
|
-
const N = (d +
|
|
5045
|
+
for (let u = 0; u < l; u++) {
|
|
5046
|
+
const N = (d + u) % x, w = c[N], v = w.samplePosition + Math.max(w.frameSamples, 1);
|
|
5023
5047
|
if (w.samplePosition <= a && (h = w), v > a && !E && (E = w, w.samplePosition <= a))
|
|
5024
5048
|
break;
|
|
5025
5049
|
}
|
|
@@ -5032,8 +5056,8 @@ class je {
|
|
|
5032
5056
|
return this._visemeResult.mouthOpenY = h.mouthOpenY, this._visemeResult.mouthForm = h.mouthForm, this._visemeResult;
|
|
5033
5057
|
const I = h.samplePosition, T = Math.max(h.frameSamples, 1), p = I + T;
|
|
5034
5058
|
if (h !== E && E.samplePosition > h.samplePosition && p > I) {
|
|
5035
|
-
const
|
|
5036
|
-
this._visemeResult.mouthOpenY = h.mouthOpenY +
|
|
5059
|
+
const u = Math.min(1, Math.max(0, (a - I) / (p - I)));
|
|
5060
|
+
this._visemeResult.mouthOpenY = h.mouthOpenY + u * (E.mouthOpenY - h.mouthOpenY), this._visemeResult.mouthForm = h.mouthForm + u * (E.mouthForm - h.mouthForm);
|
|
5037
5061
|
} else
|
|
5038
5062
|
this._visemeResult.mouthOpenY = h.mouthOpenY, this._visemeResult.mouthForm = h.mouthForm;
|
|
5039
5063
|
return this._visemeResult;
|
|
@@ -5061,7 +5085,7 @@ class je {
|
|
|
5061
5085
|
const a = ae, c = at;
|
|
5062
5086
|
try {
|
|
5063
5087
|
this.audioContext = new AudioContext({ sampleRate: a, latencyHint: c });
|
|
5064
|
-
} catch (
|
|
5088
|
+
} catch (l) {
|
|
5065
5089
|
try {
|
|
5066
5090
|
this.audioContext = new AudioContext({ latencyHint: c });
|
|
5067
5091
|
} catch (f) {
|
|
@@ -5073,7 +5097,7 @@ class je {
|
|
|
5073
5097
|
}
|
|
5074
5098
|
g.debug(`AudioContext latencyHint unsupported: ${K(f)}`);
|
|
5075
5099
|
}
|
|
5076
|
-
g.debug(`AudioContext sample rate request unsupported: ${K(
|
|
5100
|
+
g.debug(`AudioContext sample rate request unsupported: ${K(l)}`);
|
|
5077
5101
|
}
|
|
5078
5102
|
this.outputSampleRateHz = this.audioContext.sampleRate || ae, this.outputSampleRateHz !== a && g.debug(`AudioContext running at ${this.outputSampleRateHz}Hz (requested ${a}Hz)`), this.attachAudioContextHealthHandlers(this.audioContext);
|
|
5079
5103
|
}
|
|
@@ -5128,9 +5152,9 @@ class je {
|
|
|
5128
5152
|
setupMediaSession() {
|
|
5129
5153
|
if (!(typeof document > "u")) {
|
|
5130
5154
|
if (!this.silentAudioElement) {
|
|
5131
|
-
const s = new ArrayBuffer(882044), i = new DataView(s), o = (
|
|
5155
|
+
const s = new ArrayBuffer(882044), i = new DataView(s), o = (l, f) => {
|
|
5132
5156
|
for (let d = 0; d < f.length; d++)
|
|
5133
|
-
i.setUint8(
|
|
5157
|
+
i.setUint8(l + d, f.charCodeAt(d));
|
|
5134
5158
|
};
|
|
5135
5159
|
o(0, "RIFF"), i.setUint32(4, 36 + 441e3 * 2, !0), o(8, "WAVE"), o(12, "fmt "), i.setUint32(16, 16, !0), i.setUint16(20, 1, !0), i.setUint16(22, 1, !0), i.setUint32(24, 44100, !0), i.setUint32(28, 44100 * 2, !0), i.setUint16(32, 2, !0), i.setUint16(34, 16, !0), o(36, "data"), i.setUint32(40, 441e3 * 2, !0);
|
|
5136
5160
|
const a = new Blob([s], { type: "audio/wav" }), c = URL.createObjectURL(a);
|
|
@@ -5217,7 +5241,7 @@ class je {
|
|
|
5217
5241
|
*/
|
|
5218
5242
|
async resumeWithTimeout(e) {
|
|
5219
5243
|
const r = e.resume(), n = new Promise((s, i) => {
|
|
5220
|
-
setTimeout(() => i(new Error("AudioContext.resume() timed out")),
|
|
5244
|
+
setTimeout(() => i(new Error("AudioContext.resume() timed out")), ze.RESUME_TIMEOUT_MS);
|
|
5221
5245
|
});
|
|
5222
5246
|
await Promise.race([r, n]);
|
|
5223
5247
|
}
|
|
@@ -5238,7 +5262,7 @@ class je {
|
|
|
5238
5262
|
URL.revokeObjectURL(this.workletModuleUrl);
|
|
5239
5263
|
} catch {
|
|
5240
5264
|
}
|
|
5241
|
-
this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([
|
|
5265
|
+
this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([zc({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: R })], { type: "text/javascript" }));
|
|
5242
5266
|
}
|
|
5243
5267
|
this.workletReady || (this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl).catch((f) => {
|
|
5244
5268
|
throw g.warn(`Failed to load AudioWorklet module, falling back: ${K(f)}`), f;
|
|
@@ -5280,49 +5304,49 @@ class je {
|
|
|
5280
5304
|
const c = this.pendingWorkletMessages.splice(0);
|
|
5281
5305
|
for (const f of c)
|
|
5282
5306
|
this.postToWorklet(f);
|
|
5283
|
-
const
|
|
5284
|
-
this.notifyPlaybackActive(
|
|
5307
|
+
const l = this.getContextState(e) === "running";
|
|
5308
|
+
this.notifyPlaybackActive(l);
|
|
5285
5309
|
}
|
|
5286
5310
|
ensureScriptProcessor(e, r) {
|
|
5287
5311
|
if (this.scriptProcessorNode)
|
|
5288
5312
|
return;
|
|
5289
5313
|
this.stopAudioWorklet(), this.pendingWorkletMessages = [];
|
|
5290
|
-
const n = 1024, s = new Float32Array(n * R), i = Math.round(this.outputSampleRateHz * Ur / 1e3), o = Math.round(this.outputSampleRateHz *
|
|
5314
|
+
const n = 1024, s = new Float32Array(n * R), i = Math.round(this.outputSampleRateHz * Ur / 1e3), o = Math.round(this.outputSampleRateHz * Ue / 1e3), a = 1 / i, c = 1 / o, l = new Array(R), f = [], d = e.createScriptProcessor(n, 0, R);
|
|
5291
5315
|
d.onaudioprocess = (h) => {
|
|
5292
5316
|
const E = h.outputBuffer, m = E.numberOfChannels, I = E.length;
|
|
5293
5317
|
for (let p = 0; p < m; p++) {
|
|
5294
|
-
const
|
|
5295
|
-
|
|
5318
|
+
const u = E.getChannelData(p);
|
|
5319
|
+
u.fill(0), l[p] = u;
|
|
5296
5320
|
}
|
|
5297
5321
|
let T = 0;
|
|
5298
5322
|
f.length = 0;
|
|
5299
|
-
for (const [p,
|
|
5300
|
-
|
|
5323
|
+
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 <= Ue * 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);
|
|
5301
5325
|
for (let w = 0; w < I; w++) {
|
|
5302
|
-
|
|
5326
|
+
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"));
|
|
5303
5327
|
for (let v = 0; v < m; v++) {
|
|
5304
5328
|
const M = s[w * m + v];
|
|
5305
|
-
|
|
5329
|
+
l[v][w] += M * u.fadeGain;
|
|
5306
5330
|
}
|
|
5307
5331
|
}
|
|
5308
|
-
const N =
|
|
5309
|
-
if (N &&
|
|
5310
|
-
if (
|
|
5332
|
+
const N = u.ending || u.inputDrained;
|
|
5333
|
+
if (N && u.totalSamples <= 0) {
|
|
5334
|
+
if (u.fadeDirection === "out" && u.fadeGain > 1e-3) {
|
|
5311
5335
|
for (let w = 0; w < I; w++)
|
|
5312
|
-
if (
|
|
5313
|
-
|
|
5336
|
+
if (u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 1e-3) {
|
|
5337
|
+
u.fadeGain = 0, u.fadeDirection = "none";
|
|
5314
5338
|
break;
|
|
5315
5339
|
}
|
|
5316
5340
|
}
|
|
5317
|
-
|
|
5318
|
-
} else if (!N &&
|
|
5319
|
-
|
|
5320
|
-
const w =
|
|
5341
|
+
u.fadeGain <= 1e-3 && u.ending && f.push(p);
|
|
5342
|
+
} else if (!N && u.totalSamples <= 0 && u.hasLastOut && u.lastOut && u.fadeGain > 1e-3) {
|
|
5343
|
+
u.fadeDirection = "out", u.underrunPending = !0;
|
|
5344
|
+
const w = u.lastOut, v = I - 1;
|
|
5321
5345
|
for (let M = 0; M < I; M++) {
|
|
5322
|
-
|
|
5346
|
+
u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 0 && (u.fadeDirection = "none");
|
|
5323
5347
|
for (let $ = 0; $ < m; $++) {
|
|
5324
5348
|
const Gr = w[v * m + $];
|
|
5325
|
-
|
|
5349
|
+
l[$][M] += Gr * u.fadeGain;
|
|
5326
5350
|
}
|
|
5327
5351
|
}
|
|
5328
5352
|
}
|
|
@@ -5334,14 +5358,14 @@ class je {
|
|
|
5334
5358
|
}
|
|
5335
5359
|
if (T > 1) {
|
|
5336
5360
|
const p = 1 / Math.sqrt(T);
|
|
5337
|
-
for (let
|
|
5361
|
+
for (let u = 0; u < I; u++)
|
|
5338
5362
|
for (let N = 0; N < m; N++)
|
|
5339
|
-
|
|
5363
|
+
l[N][u] *= p;
|
|
5340
5364
|
}
|
|
5341
5365
|
for (let p = 0; p < I; p++)
|
|
5342
|
-
for (let
|
|
5343
|
-
const N = u
|
|
5344
|
-
u
|
|
5366
|
+
for (let u = 0; u < m; u++) {
|
|
5367
|
+
const N = l[u][p];
|
|
5368
|
+
l[u][p] = N > 1 ? 1 : N < -1 ? -1 : N;
|
|
5345
5369
|
}
|
|
5346
5370
|
}, d.connect(e.destination), this.scriptProcessorNode = d, this.ensureScriptProcessorDiagnostics(r);
|
|
5347
5371
|
}
|
|
@@ -5484,7 +5508,7 @@ class je {
|
|
|
5484
5508
|
}
|
|
5485
5509
|
this.protocolPort = e;
|
|
5486
5510
|
try {
|
|
5487
|
-
this.audioWorker = new
|
|
5511
|
+
this.audioWorker = new Lc();
|
|
5488
5512
|
} catch (d) {
|
|
5489
5513
|
g.warn(`Failed to create audio worker: ${K(d)}`), this.protocolPort.close(), this.protocolPort = null;
|
|
5490
5514
|
return;
|
|
@@ -5568,7 +5592,7 @@ class je {
|
|
|
5568
5592
|
s.epochTimestampSamples = e.timestampInterleavedSamples;
|
|
5569
5593
|
const c = this.audioContext;
|
|
5570
5594
|
if (c) {
|
|
5571
|
-
const
|
|
5595
|
+
const l = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), f = $c + l * 1e3, d = Math.min(Yc, Math.max(Kc, f));
|
|
5572
5596
|
s.playbackStartContextTime = c.currentTime + d / 1e3;
|
|
5573
5597
|
}
|
|
5574
5598
|
s.timingEstablished = !0;
|
|
@@ -5691,9 +5715,9 @@ class je {
|
|
|
5691
5715
|
}));
|
|
5692
5716
|
}
|
|
5693
5717
|
}
|
|
5694
|
-
function
|
|
5718
|
+
function Xc(t) {
|
|
5695
5719
|
return new Worker(
|
|
5696
|
-
"" + new URL("assets/video-playback-worker-
|
|
5720
|
+
"" + new URL("assets/video-playback-worker-qauTQ7Et.js", import.meta.url).href,
|
|
5697
5721
|
{
|
|
5698
5722
|
type: "module",
|
|
5699
5723
|
name: t?.name
|
|
@@ -5701,10 +5725,10 @@ function jc(t) {
|
|
|
5701
5725
|
);
|
|
5702
5726
|
}
|
|
5703
5727
|
const V = L("IkonVideoPlayback");
|
|
5704
|
-
function
|
|
5728
|
+
function Ae(t) {
|
|
5705
5729
|
return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
|
|
5706
5730
|
}
|
|
5707
|
-
class
|
|
5731
|
+
class Jc {
|
|
5708
5732
|
client;
|
|
5709
5733
|
config;
|
|
5710
5734
|
enabled = !0;
|
|
@@ -5779,9 +5803,9 @@ class zc {
|
|
|
5779
5803
|
}
|
|
5780
5804
|
let e;
|
|
5781
5805
|
try {
|
|
5782
|
-
e = new
|
|
5806
|
+
e = new Xc();
|
|
5783
5807
|
} catch (r) {
|
|
5784
|
-
V.warn(`Failed to create video worker: ${
|
|
5808
|
+
V.warn(`Failed to create video worker: ${Ae(r)}`);
|
|
5785
5809
|
return;
|
|
5786
5810
|
}
|
|
5787
5811
|
this.worker = e, e.addEventListener("message", (r) => this.onWorkerMessage(r.data)), e.addEventListener("error", (r) => {
|
|
@@ -5850,7 +5874,7 @@ class zc {
|
|
|
5850
5874
|
const n = r.canvas.transferControlToOffscreen();
|
|
5851
5875
|
this.worker.postMessage({ type: "attachSurface", streamId: e, canvas: n }, [n]), r.attachedToWorker = !0;
|
|
5852
5876
|
} catch (n) {
|
|
5853
|
-
V.warn(`Failed to attach offscreen canvas for stream ${e}: ${
|
|
5877
|
+
V.warn(`Failed to attach offscreen canvas for stream ${e}: ${Ae(n)}`), r.mode = "bitmap", r.ctxBitmap = r.canvas.getContext("bitmaprenderer", { alpha: !1 }), r.ctxBitmap || (r.ctx2d = r.canvas.getContext("2d", { alpha: !1, desynchronized: !0 }));
|
|
5854
5878
|
try {
|
|
5855
5879
|
this.worker.postMessage({ type: "watchStream", streamId: e }), r.attachedToWorker = !0;
|
|
5856
5880
|
} catch {
|
|
@@ -5868,7 +5892,7 @@ class zc {
|
|
|
5868
5892
|
const r = this.parseStreamId(e);
|
|
5869
5893
|
if (!r)
|
|
5870
5894
|
return;
|
|
5871
|
-
const n = Aa(
|
|
5895
|
+
const n = Na(Aa(), this.client.sessionId ?? 0, {
|
|
5872
5896
|
trackId: r.trackId,
|
|
5873
5897
|
targetIds: [r.senderId]
|
|
5874
5898
|
});
|
|
@@ -5899,7 +5923,7 @@ class zc {
|
|
|
5899
5923
|
try {
|
|
5900
5924
|
this.worker.postMessage({ type: "attachProtocolPort", port: e.port }, [e.port]);
|
|
5901
5925
|
} catch (r) {
|
|
5902
|
-
V.warn(`Failed to attach video protocol port: ${
|
|
5926
|
+
V.warn(`Failed to attach video protocol port: ${Ae(r)}`), this.protocolPort.close(), this.protocolPort = null;
|
|
5903
5927
|
}
|
|
5904
5928
|
}
|
|
5905
5929
|
}
|
|
@@ -5928,11 +5952,11 @@ class zc {
|
|
|
5928
5952
|
}));
|
|
5929
5953
|
}
|
|
5930
5954
|
}
|
|
5931
|
-
class
|
|
5955
|
+
class Qc {
|
|
5932
5956
|
audio;
|
|
5933
5957
|
video;
|
|
5934
5958
|
constructor(e, r) {
|
|
5935
|
-
this.audio = new
|
|
5959
|
+
this.audio = new ze(e, r?.audio), this.video = new Jc(e, r?.video), r?.mediaSession && this.audio.setMediaSession(r.mediaSession);
|
|
5936
5960
|
}
|
|
5937
5961
|
/**
|
|
5938
5962
|
* Releases media resources (workers, audio graph, decoders).
|
|
@@ -5943,7 +5967,7 @@ class Xc {
|
|
|
5943
5967
|
this.audio.dispose(), this.video.dispose();
|
|
5944
5968
|
}
|
|
5945
5969
|
}
|
|
5946
|
-
class
|
|
5970
|
+
class Zc {
|
|
5947
5971
|
static getStorageForCapacity(e, r) {
|
|
5948
5972
|
const n = Int32Array.BYTES_PER_ELEMENT * 2, s = r.BYTES_PER_ELEMENT * e;
|
|
5949
5973
|
return new SharedArrayBuffer(n + s);
|
|
@@ -5997,7 +6021,7 @@ class Jc {
|
|
|
5997
6021
|
return n = (n + r) % this.capacity, Atomics.store(this.readWrite, 0, n), r;
|
|
5998
6022
|
}
|
|
5999
6023
|
}
|
|
6000
|
-
function
|
|
6024
|
+
function qc(t) {
|
|
6001
6025
|
return new Worker(
|
|
6002
6026
|
"" + new URL("assets/audio-capture-worker-kpORDYGU.js", import.meta.url).href,
|
|
6003
6027
|
{
|
|
@@ -6006,12 +6030,12 @@ function Qc(t) {
|
|
|
6006
6030
|
}
|
|
6007
6031
|
);
|
|
6008
6032
|
}
|
|
6009
|
-
const
|
|
6010
|
-
function
|
|
6033
|
+
const el = L("IkonAudioCapture");
|
|
6034
|
+
function tl() {
|
|
6011
6035
|
const t = globalThis.crypto;
|
|
6012
6036
|
return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
|
|
6013
6037
|
}
|
|
6014
|
-
function
|
|
6038
|
+
function rl() {
|
|
6015
6039
|
return `
|
|
6016
6040
|
class RingBuffer {
|
|
6017
6041
|
static getStorageForCapacity(capacity, type) {
|
|
@@ -6140,7 +6164,7 @@ class IkonAudioCaptureProcessor extends AudioWorkletProcessor {
|
|
|
6140
6164
|
registerProcessor('ikon-audio-capture', IkonAudioCaptureProcessor);
|
|
6141
6165
|
`;
|
|
6142
6166
|
}
|
|
6143
|
-
class
|
|
6167
|
+
class nl {
|
|
6144
6168
|
constructor(e, r) {
|
|
6145
6169
|
this.client = e, this.config = r ?? {};
|
|
6146
6170
|
}
|
|
@@ -6160,12 +6184,12 @@ class tl {
|
|
|
6160
6184
|
ensureWorker() {
|
|
6161
6185
|
if (this.worker)
|
|
6162
6186
|
return this.worker;
|
|
6163
|
-
const e = new
|
|
6187
|
+
const e = new qc();
|
|
6164
6188
|
return this.worker = e, e.addEventListener("message", (r) => {
|
|
6165
6189
|
const n = r.data;
|
|
6166
6190
|
if (n?.type === "error") {
|
|
6167
6191
|
const s = n.error;
|
|
6168
|
-
|
|
6192
|
+
el.warn(`Audio capture worker error: ${s?.name ?? "Error"} ${s?.message ?? ""}`);
|
|
6169
6193
|
}
|
|
6170
6194
|
}), e;
|
|
6171
6195
|
}
|
|
@@ -6203,7 +6227,7 @@ class tl {
|
|
|
6203
6227
|
async ensureWorklet(e) {
|
|
6204
6228
|
if (!Rr(e))
|
|
6205
6229
|
throw new Error("AudioWorklet is not supported in this browser");
|
|
6206
|
-
this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([
|
|
6230
|
+
this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([rl()], { type: "text/javascript" }))), (!this.workletReady || this.workletContext !== e) && (this.workletContext = e, this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl));
|
|
6207
6231
|
try {
|
|
6208
6232
|
await this.workletReady;
|
|
6209
6233
|
} catch (r) {
|
|
@@ -6219,13 +6243,13 @@ class tl {
|
|
|
6219
6243
|
if (!i)
|
|
6220
6244
|
throw s.getTracks().forEach((p) => p.stop()), new Error("No audio track available");
|
|
6221
6245
|
await this.ensureWorklet(n);
|
|
6222
|
-
const o =
|
|
6223
|
-
|
|
6246
|
+
const o = tl(), a = this.allocateTrackId(), c = n.createMediaStreamSource(s), l = n.createGain();
|
|
6247
|
+
l.gain.value = 0, l.connect(n.destination);
|
|
6224
6248
|
const h = le() ? "sab" : "pcm";
|
|
6225
6249
|
let E;
|
|
6226
6250
|
if (h === "sab") {
|
|
6227
6251
|
const p = Math.floor(n.sampleRate * 2);
|
|
6228
|
-
E =
|
|
6252
|
+
E = Zc.getStorageForCapacity(p, Float32Array);
|
|
6229
6253
|
}
|
|
6230
6254
|
const m = this.ensureWorker();
|
|
6231
6255
|
m.postMessage({
|
|
@@ -6241,9 +6265,9 @@ class tl {
|
|
|
6241
6265
|
},
|
|
6242
6266
|
transport: h,
|
|
6243
6267
|
sharedArrayBuffer: E
|
|
6244
|
-
}), await new Promise((p,
|
|
6268
|
+
}), await new Promise((p, u) => {
|
|
6245
6269
|
const N = setTimeout(() => {
|
|
6246
|
-
m.removeEventListener("message", w),
|
|
6270
|
+
m.removeEventListener("message", w), u(new Error("Audio capture worker start timeout"));
|
|
6247
6271
|
}, 1e4), w = (v) => {
|
|
6248
6272
|
const M = v.data;
|
|
6249
6273
|
if (M?.type === "started" && M.captureId === o)
|
|
@@ -6251,7 +6275,7 @@ class tl {
|
|
|
6251
6275
|
else if (M?.type === "error" && M.captureId === o) {
|
|
6252
6276
|
clearTimeout(N), m.removeEventListener("message", w);
|
|
6253
6277
|
const $ = M.error;
|
|
6254
|
-
|
|
6278
|
+
u(new Error($?.message ?? "Audio capture failed to start"));
|
|
6255
6279
|
}
|
|
6256
6280
|
};
|
|
6257
6281
|
m.addEventListener("message", w);
|
|
@@ -6266,10 +6290,10 @@ class tl {
|
|
|
6266
6290
|
sharedArrayBuffer: E
|
|
6267
6291
|
}
|
|
6268
6292
|
});
|
|
6269
|
-
c.connect(I), I.connect(
|
|
6270
|
-
const
|
|
6271
|
-
if (!(!
|
|
6272
|
-
const N =
|
|
6293
|
+
c.connect(I), I.connect(l), h === "pcm" && (I.port.onmessage = (p) => {
|
|
6294
|
+
const u = p.data;
|
|
6295
|
+
if (!(!u || typeof u != "object") && u.type === "pcm" && u.pcm instanceof Float32Array) {
|
|
6296
|
+
const N = u.pcm;
|
|
6273
6297
|
m.postMessage({ type: "pcm", captureId: o, pcm: N }, [N.buffer]);
|
|
6274
6298
|
}
|
|
6275
6299
|
});
|
|
@@ -6281,7 +6305,7 @@ class tl {
|
|
|
6281
6305
|
ctx: n,
|
|
6282
6306
|
source: c,
|
|
6283
6307
|
worklet: I,
|
|
6284
|
-
gain:
|
|
6308
|
+
gain: l,
|
|
6285
6309
|
stopped: !1,
|
|
6286
6310
|
startSegment: () => {
|
|
6287
6311
|
T.stopped || m.postMessage({ type: "startSegment", captureId: o });
|
|
@@ -6301,7 +6325,7 @@ class tl {
|
|
|
6301
6325
|
} catch {
|
|
6302
6326
|
}
|
|
6303
6327
|
try {
|
|
6304
|
-
|
|
6328
|
+
l.disconnect();
|
|
6305
6329
|
} catch {
|
|
6306
6330
|
}
|
|
6307
6331
|
try {
|
|
@@ -6366,9 +6390,9 @@ class tl {
|
|
|
6366
6390
|
}
|
|
6367
6391
|
}
|
|
6368
6392
|
}
|
|
6369
|
-
const Mr = 1280, Or = 720,
|
|
6370
|
-
async function
|
|
6371
|
-
const r = e.mime ?? Lr, n = e.quality ??
|
|
6393
|
+
const Mr = 1280, Or = 720, sl = 30, Lr = "image/jpeg", il = 0.92;
|
|
6394
|
+
async function ol(t, e) {
|
|
6395
|
+
const r = e.mime ?? Lr, n = e.quality ?? il;
|
|
6372
6396
|
if (typeof OffscreenCanvas < "u" && t instanceof OffscreenCanvas)
|
|
6373
6397
|
try {
|
|
6374
6398
|
return await t.convertToBlob({ type: r, quality: n });
|
|
@@ -6385,7 +6409,7 @@ async function sl(t, e) {
|
|
|
6385
6409
|
);
|
|
6386
6410
|
});
|
|
6387
6411
|
}
|
|
6388
|
-
class
|
|
6412
|
+
class al {
|
|
6389
6413
|
async acquireCameraStream(e) {
|
|
6390
6414
|
if (!navigator.mediaDevices)
|
|
6391
6415
|
throw new Error("Media devices are not available in this environment");
|
|
@@ -6411,18 +6435,18 @@ class il {
|
|
|
6411
6435
|
} catch {
|
|
6412
6436
|
}
|
|
6413
6437
|
const i = s.videoWidth || (n.getSettings().width ?? Mr), o = s.videoHeight || (n.getSettings().height ?? Or), a = e.width ? Math.max(1, Math.floor(e.width)) : i, c = e.height ? Math.max(1, Math.floor(e.height)) : o;
|
|
6414
|
-
let
|
|
6438
|
+
let l;
|
|
6415
6439
|
if (typeof OffscreenCanvas < "u")
|
|
6416
|
-
|
|
6440
|
+
l = new OffscreenCanvas(a, c);
|
|
6417
6441
|
else {
|
|
6418
6442
|
const E = document.createElement("canvas");
|
|
6419
|
-
E.width = a, E.height = c,
|
|
6443
|
+
E.width = a, E.height = c, l = E;
|
|
6420
6444
|
}
|
|
6421
|
-
const f =
|
|
6445
|
+
const f = l.getContext("2d", { alpha: !1 });
|
|
6422
6446
|
if (!f)
|
|
6423
6447
|
throw new Error("2D canvas context unavailable");
|
|
6424
6448
|
f.drawImage(s, 0, 0, a, c);
|
|
6425
|
-
const d = await
|
|
6449
|
+
const d = await ol(l, e), h = await d.arrayBuffer();
|
|
6426
6450
|
return {
|
|
6427
6451
|
mime: d.type || e.mime || Lr,
|
|
6428
6452
|
width: a,
|
|
@@ -6449,9 +6473,9 @@ class il {
|
|
|
6449
6473
|
}
|
|
6450
6474
|
}
|
|
6451
6475
|
}
|
|
6452
|
-
function
|
|
6476
|
+
function cl(t) {
|
|
6453
6477
|
return new Worker(
|
|
6454
|
-
"" + new URL("assets/video-capture-worker-
|
|
6478
|
+
"" + new URL("assets/video-capture-worker-DP3lFDjq.js", import.meta.url).href,
|
|
6455
6479
|
{
|
|
6456
6480
|
type: "module",
|
|
6457
6481
|
name: t?.name
|
|
@@ -6459,17 +6483,17 @@ function ol(t) {
|
|
|
6459
6483
|
);
|
|
6460
6484
|
}
|
|
6461
6485
|
const lt = L("IkonVideoCapture");
|
|
6462
|
-
function
|
|
6486
|
+
function ll() {
|
|
6463
6487
|
const t = globalThis.crypto;
|
|
6464
6488
|
return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
|
|
6465
6489
|
}
|
|
6466
|
-
function
|
|
6490
|
+
function ul() {
|
|
6467
6491
|
const t = globalThis.MediaStreamTrackProcessor;
|
|
6468
6492
|
if (!t)
|
|
6469
6493
|
throw new Error("MediaStreamTrackProcessor is not available in this browser");
|
|
6470
6494
|
return t;
|
|
6471
6495
|
}
|
|
6472
|
-
class
|
|
6496
|
+
class hl {
|
|
6473
6497
|
constructor(e) {
|
|
6474
6498
|
this.client = e;
|
|
6475
6499
|
}
|
|
@@ -6485,7 +6509,7 @@ class ll {
|
|
|
6485
6509
|
ensureWorker() {
|
|
6486
6510
|
if (this.worker)
|
|
6487
6511
|
return this.worker;
|
|
6488
|
-
const e = new
|
|
6512
|
+
const e = new cl();
|
|
6489
6513
|
return this.worker = e, e.addEventListener("message", (r) => {
|
|
6490
6514
|
const n = r.data;
|
|
6491
6515
|
if (n?.type === "error") {
|
|
@@ -6512,7 +6536,7 @@ class ll {
|
|
|
6512
6536
|
async getMediaStream(e) {
|
|
6513
6537
|
if (!navigator.mediaDevices)
|
|
6514
6538
|
throw new Error("Media devices are not available in this environment");
|
|
6515
|
-
const r = e.constraints ?? {}, n = e.options?.framerate ??
|
|
6539
|
+
const r = e.constraints ?? {}, n = e.options?.framerate ?? sl, s = {
|
|
6516
6540
|
...r,
|
|
6517
6541
|
frameRate: r.frameRate ?? { ideal: n }
|
|
6518
6542
|
};
|
|
@@ -6523,10 +6547,10 @@ class ll {
|
|
|
6523
6547
|
if (!r)
|
|
6524
6548
|
throw new Error("Cannot start video capture before client is connected");
|
|
6525
6549
|
this.ensurePorts();
|
|
6526
|
-
const n =
|
|
6550
|
+
const n = ll(), s = await this.getMediaStream(e), i = s.getVideoTracks()[0];
|
|
6527
6551
|
if (!i)
|
|
6528
6552
|
throw s.getTracks().forEach((I) => I.stop()), new Error("No video track available");
|
|
6529
|
-
const o = i.getSettings(), a = e.options?.width ?? o.width ?? Mr, c = e.options?.height ?? o.height ?? Or,
|
|
6553
|
+
const o = i.getSettings(), a = e.options?.width ?? o.width ?? Mr, c = e.options?.height ?? o.height ?? Or, l = ul(), d = new l({ track: i }).readable, h = this.allocateTrackId(), E = this.ensureWorker();
|
|
6530
6554
|
E.postMessage(
|
|
6531
6555
|
{
|
|
6532
6556
|
type: "start",
|
|
@@ -6594,12 +6618,12 @@ class ll {
|
|
|
6594
6618
|
this.protocolPort?.close(), this.protocolPort = null, this.sendPort?.close(), this.sendPort = null;
|
|
6595
6619
|
}
|
|
6596
6620
|
}
|
|
6597
|
-
class
|
|
6621
|
+
class dl {
|
|
6598
6622
|
audio;
|
|
6599
6623
|
video;
|
|
6600
6624
|
image;
|
|
6601
6625
|
constructor(e, r) {
|
|
6602
|
-
this.audio = new
|
|
6626
|
+
this.audio = new nl(e, r?.audio), this.video = new hl(e), this.image = new al();
|
|
6603
6627
|
}
|
|
6604
6628
|
dispose() {
|
|
6605
6629
|
this.audio.dispose(), this.video.dispose();
|
|
@@ -6610,8 +6634,8 @@ const ut = {
|
|
|
6610
6634
|
[k.WebSocket]: 1,
|
|
6611
6635
|
[k.WebTransportProxy]: 2,
|
|
6612
6636
|
[k.WebSocketProxy]: 3
|
|
6613
|
-
},
|
|
6614
|
-
class
|
|
6637
|
+
}, ye = "ikon_endpoint_type";
|
|
6638
|
+
class fl {
|
|
6615
6639
|
isLocal;
|
|
6616
6640
|
workingEndpointType = null;
|
|
6617
6641
|
constructor(e) {
|
|
@@ -6643,7 +6667,7 @@ class hl {
|
|
|
6643
6667
|
if (!this.isLocal) {
|
|
6644
6668
|
this.workingEndpointType = e;
|
|
6645
6669
|
try {
|
|
6646
|
-
localStorage.setItem(
|
|
6670
|
+
localStorage.setItem(ye, String(e));
|
|
6647
6671
|
} catch {
|
|
6648
6672
|
}
|
|
6649
6673
|
}
|
|
@@ -6654,7 +6678,7 @@ class hl {
|
|
|
6654
6678
|
clearRememberedType() {
|
|
6655
6679
|
this.workingEndpointType = null;
|
|
6656
6680
|
try {
|
|
6657
|
-
localStorage.removeItem(
|
|
6681
|
+
localStorage.removeItem(ye);
|
|
6658
6682
|
} catch {
|
|
6659
6683
|
}
|
|
6660
6684
|
}
|
|
@@ -6663,7 +6687,7 @@ class hl {
|
|
|
6663
6687
|
*/
|
|
6664
6688
|
loadRememberedType() {
|
|
6665
6689
|
try {
|
|
6666
|
-
const e = localStorage.getItem(
|
|
6690
|
+
const e = localStorage.getItem(ye);
|
|
6667
6691
|
if (e !== null) {
|
|
6668
6692
|
const r = Number(e);
|
|
6669
6693
|
k[r] !== void 0 && (this.workingEndpointType = r);
|
|
@@ -6673,7 +6697,7 @@ class hl {
|
|
|
6673
6697
|
}
|
|
6674
6698
|
}
|
|
6675
6699
|
const A = L("IkonClient");
|
|
6676
|
-
class
|
|
6700
|
+
class Dl {
|
|
6677
6701
|
channelManager = null;
|
|
6678
6702
|
protocolWorker = null;
|
|
6679
6703
|
workerManagerState = null;
|
|
@@ -6728,27 +6752,27 @@ class kl {
|
|
|
6728
6752
|
return this._mediaCapture;
|
|
6729
6753
|
}
|
|
6730
6754
|
constructor(e) {
|
|
6731
|
-
this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ??
|
|
6755
|
+
this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ?? Fa, this.connectionTimeoutMs = e.timeouts?.connectionTimeoutMs ?? Ba;
|
|
6732
6756
|
const r = [e.local, e.apiKey, e.sessionToken].filter(Boolean).length;
|
|
6733
6757
|
if (r === 0)
|
|
6734
6758
|
throw new Error('IkonClient requires one of: "local", "apiKey", or "sessionToken" configuration');
|
|
6735
6759
|
if (r > 1)
|
|
6736
6760
|
throw new Error('IkonClient accepts only one of: "local", "apiKey", or "sessionToken" configuration');
|
|
6737
|
-
this.endpointSelector = new
|
|
6761
|
+
this.endpointSelector = new fl({
|
|
6738
6762
|
local: e.local
|
|
6739
|
-
}), this._functionRegistry = new
|
|
6763
|
+
}), this._functionRegistry = new Cc(), st() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = wc(this._functionRegistry));
|
|
6740
6764
|
const n = e.audio ? {
|
|
6741
6765
|
performance: e.audio.performance,
|
|
6742
6766
|
background: e.audio.background,
|
|
6743
6767
|
diagnostics: e.audio.diagnostics
|
|
6744
6768
|
} : void 0, s = e.video ? { performance: e.video.performance } : void 0;
|
|
6745
|
-
this._media = new
|
|
6769
|
+
this._media = new Qc(this, { audio: n, video: s, mediaSession: e.mediaSession }), this._media.audio.setEnabled(!0), this._media.video.setEnabled(!0), st() && (this._mediaCapture = new dl(this, {
|
|
6746
6770
|
audio: {
|
|
6747
6771
|
performance: {
|
|
6748
6772
|
preferWebCodecs: e.audio?.performance?.preferWebCodecs
|
|
6749
6773
|
}
|
|
6750
6774
|
}
|
|
6751
|
-
}), this.unregisterMediaCaptureFunctions =
|
|
6775
|
+
}), this.unregisterMediaCaptureFunctions = Mc(this._functionRegistry, this));
|
|
6752
6776
|
}
|
|
6753
6777
|
_lastError = void 0;
|
|
6754
6778
|
/**
|
|
@@ -6813,7 +6837,7 @@ class kl {
|
|
|
6813
6837
|
A.info("Disconnecting from Ikon server"), this.clearTimers(), this.cleanupLifecycleHandlers(), 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");
|
|
6814
6838
|
}
|
|
6815
6839
|
sendActionCall(e, r) {
|
|
6816
|
-
const n =
|
|
6840
|
+
const n = en(
|
|
6817
6841
|
{
|
|
6818
6842
|
ActionId: _.fromString(e),
|
|
6819
6843
|
PayloadJson: r ?? "{}"
|
|
@@ -6989,11 +7013,11 @@ class kl {
|
|
|
6989
7013
|
async authenticate() {
|
|
6990
7014
|
const e = this.abortController?.signal;
|
|
6991
7015
|
if (this.config.local)
|
|
6992
|
-
return
|
|
7016
|
+
return Ya(this.config.local, e);
|
|
6993
7017
|
if (this.config.apiKey)
|
|
6994
|
-
return
|
|
7018
|
+
return ja(this.config.apiKey, e);
|
|
6995
7019
|
if (this.config.sessionToken)
|
|
6996
|
-
return
|
|
7020
|
+
return za(this.config.sessionToken, e);
|
|
6997
7021
|
throw new Error("No connection configuration provided (need local, apiKey, or sessionToken)");
|
|
6998
7022
|
}
|
|
6999
7023
|
/**
|
|
@@ -7005,13 +7029,11 @@ class kl {
|
|
|
7005
7029
|
this.notifyMessageSubscribers(e, r, n);
|
|
7006
7030
|
return;
|
|
7007
7031
|
}
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
}
|
|
7014
|
-
this.notifyMessageSubscribers(e, r, n);
|
|
7032
|
+
r === S.CORE_GLOBAL_STATE && Fo(e).then((s) => {
|
|
7033
|
+
this._globalState = s, this._globalState.DebugMode && this.protocolWorker && this.protocolWorker.postMessage({ type: "enableDevtools", enabled: !0 }), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
|
|
7034
|
+
}).catch((s) => {
|
|
7035
|
+
A.error("Failed to parse GlobalState:", s);
|
|
7036
|
+
}), this.notifyMessageSubscribers(e, r, n);
|
|
7015
7037
|
}
|
|
7016
7038
|
/**
|
|
7017
7039
|
* Notify config callback and message subscribers.
|
|
@@ -7027,14 +7049,14 @@ class kl {
|
|
|
7027
7049
|
if (c.opcodeGroupsMask !== void 0 && ((n ?? ce(e)) & c.opcodeGroupsMask) === 0)
|
|
7028
7050
|
continue;
|
|
7029
7051
|
if (c.opcodes && c.opcodes.length > 0) {
|
|
7030
|
-
const
|
|
7031
|
-
if (!c.opcodes.includes(
|
|
7052
|
+
const l = r ?? ue(e);
|
|
7053
|
+
if (!c.opcodes.includes(l))
|
|
7032
7054
|
continue;
|
|
7033
7055
|
}
|
|
7034
7056
|
}
|
|
7035
7057
|
s[a](e);
|
|
7036
|
-
} catch (
|
|
7037
|
-
A.error("Message subscriber error:",
|
|
7058
|
+
} catch (l) {
|
|
7059
|
+
A.error("Message subscriber error:", l);
|
|
7038
7060
|
}
|
|
7039
7061
|
}
|
|
7040
7062
|
}
|
|
@@ -7095,7 +7117,7 @@ class kl {
|
|
|
7095
7117
|
}
|
|
7096
7118
|
let r;
|
|
7097
7119
|
try {
|
|
7098
|
-
r = new
|
|
7120
|
+
r = new ga();
|
|
7099
7121
|
} catch (h) {
|
|
7100
7122
|
A.warn(`Failed to create protocol worker, falling back to main thread: ${h}`), await this.connectProtocolOnMainThread(e);
|
|
7101
7123
|
return;
|
|
@@ -7112,25 +7134,25 @@ class kl {
|
|
|
7112
7134
|
if (T?.type === "state") {
|
|
7113
7135
|
const p = T.state;
|
|
7114
7136
|
this.workerManagerState = p;
|
|
7115
|
-
const
|
|
7116
|
-
|
|
7137
|
+
const u = T.activeType;
|
|
7138
|
+
u !== void 0 && this.endpointSelector.rememberWorkingType(u), this.handleChannelManagerStateChange(p), p === "connected" && h();
|
|
7117
7139
|
return;
|
|
7118
7140
|
}
|
|
7119
7141
|
if (T?.type === "error") {
|
|
7120
|
-
const p = T.error,
|
|
7121
|
-
|
|
7142
|
+
const p = T.error, u = new Error(String(p?.message ?? "Worker error"));
|
|
7143
|
+
u.name = String(p?.name ?? "Error"), E(u);
|
|
7122
7144
|
}
|
|
7123
7145
|
};
|
|
7124
7146
|
r.addEventListener("message", m), r.addEventListener("error", (I) => {
|
|
7125
7147
|
const T = [I.message, I.filename, I.lineno, I.colno].filter((p) => p != null && String(p).length > 0);
|
|
7126
7148
|
E(new Error(`Protocol worker failed: ${T.join(" ")}`.trim()));
|
|
7127
7149
|
});
|
|
7128
|
-
}), s = this.computeOrderedEndpointTypes(e), i = this.config.timeouts?.keepaliveTimeoutMs ??
|
|
7150
|
+
}), s = this.computeOrderedEndpointTypes(e), i = this.config.timeouts?.keepaliveTimeoutMs ?? qe, o = this.config.timeouts?.reconnectBackoffMs ?? et, a = this.config.timeouts?.maxReconnectAttempts ?? tt;
|
|
7129
7151
|
this.updateWorkerInterestMask();
|
|
7130
|
-
const c = typeof window < "u" ? new URLSearchParams(window.location.search) : null,
|
|
7131
|
-
|
|
7152
|
+
const c = typeof window < "u" ? new URLSearchParams(window.location.search) : null, l = c?.get("devtools") === "true" || c?.get("debug") === "true";
|
|
7153
|
+
l && typeof sessionStorage < "u" && sessionStorage.setItem("ikon:devtools", "true");
|
|
7132
7154
|
const f = typeof sessionStorage < "u" && sessionStorage.getItem("ikon:devtools") === "true";
|
|
7133
|
-
(this.config.debug?.devtools ||
|
|
7155
|
+
(this.config.debug?.devtools || l || f) && r.postMessage({ type: "enableDevtools", enabled: !0 }), r.postMessage({
|
|
7134
7156
|
type: "connect",
|
|
7135
7157
|
sessionId: this._sessionId,
|
|
7136
7158
|
entrypoints: e,
|
|
@@ -7146,11 +7168,11 @@ class kl {
|
|
|
7146
7168
|
}
|
|
7147
7169
|
}
|
|
7148
7170
|
async connectProtocolOnMainThread(e) {
|
|
7149
|
-
this.workerManagerState = null, this.protocolWorker = null, this.channelManager = new
|
|
7171
|
+
this.workerManagerState = null, this.protocolWorker = null, this.channelManager = new Pa({
|
|
7150
7172
|
sessionId: this._sessionId,
|
|
7151
|
-
keepaliveTimeoutMs: this.config.timeouts?.keepaliveTimeoutMs ??
|
|
7152
|
-
reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ??
|
|
7153
|
-
maxReconnectAttempts: this.config.timeouts?.maxReconnectAttempts ??
|
|
7173
|
+
keepaliveTimeoutMs: this.config.timeouts?.keepaliveTimeoutMs ?? qe,
|
|
7174
|
+
reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ?? et,
|
|
7175
|
+
maxReconnectAttempts: this.config.timeouts?.maxReconnectAttempts ?? tt,
|
|
7154
7176
|
endpointSelector: this.endpointSelector,
|
|
7155
7177
|
onProtocolMessage: (r) => {
|
|
7156
7178
|
this.handleProtocolMessage(r);
|
|
@@ -7268,130 +7290,130 @@ class kl {
|
|
|
7268
7290
|
sendProtocolMessage: (r) => this.sendProtocolMessage(r),
|
|
7269
7291
|
sessionId: this._sessionId
|
|
7270
7292
|
}), await this.config.onJoined?.();
|
|
7271
|
-
const e = Je(
|
|
7293
|
+
const e = Qe(Je(), this._sessionId ?? 0);
|
|
7272
7294
|
this.sendProtocolMessage(e);
|
|
7273
7295
|
} catch (e) {
|
|
7274
7296
|
A.error("onJoined callback error:", e);
|
|
7275
|
-
const r = Je(
|
|
7297
|
+
const r = Qe(Je(), this._sessionId ?? 0);
|
|
7276
7298
|
this.sendProtocolMessage(r);
|
|
7277
7299
|
}
|
|
7278
7300
|
}
|
|
7279
7301
|
}
|
|
7280
|
-
function
|
|
7302
|
+
function Ml(t) {
|
|
7281
7303
|
return t === "connecting" || t === "connectingSlow" || t === "reconnecting";
|
|
7282
7304
|
}
|
|
7283
|
-
function
|
|
7305
|
+
function Ol(t) {
|
|
7284
7306
|
return t === "connected";
|
|
7285
7307
|
}
|
|
7286
|
-
function
|
|
7308
|
+
function Ll(t) {
|
|
7287
7309
|
return t === "offline" || t === "offlineError" || t === "idle";
|
|
7288
7310
|
}
|
|
7289
|
-
function
|
|
7311
|
+
function vl(t) {
|
|
7290
7312
|
return t === "offlineError";
|
|
7291
7313
|
}
|
|
7292
7314
|
const vr = /* @__PURE__ */ new Map();
|
|
7293
7315
|
for (const [t, e] of Object.entries(S))
|
|
7294
7316
|
typeof e == "number" && vr.set(e, t);
|
|
7295
|
-
function
|
|
7317
|
+
function Pl(t) {
|
|
7296
7318
|
return vr.get(t) ?? `UNKNOWN_${t}`;
|
|
7297
7319
|
}
|
|
7298
7320
|
const Pr = 1e3, Fr = Ir.INFO;
|
|
7299
|
-
let O = [],
|
|
7300
|
-
function
|
|
7301
|
-
t.level < Br || (O.push(t), O.length >
|
|
7321
|
+
let O = [], De = Pr, Br = Fr, Me = null;
|
|
7322
|
+
function El(t) {
|
|
7323
|
+
t.level < Br || (O.push(t), O.length > De && (O = O.slice(-De)));
|
|
7302
7324
|
}
|
|
7303
|
-
function
|
|
7304
|
-
|
|
7325
|
+
function pl(t) {
|
|
7326
|
+
De = t?.maxBufferSize ?? Pr, Br = t?.minLevel ?? Fr, O = [], Ra(El);
|
|
7305
7327
|
}
|
|
7306
|
-
function
|
|
7307
|
-
|
|
7328
|
+
function Fl(t) {
|
|
7329
|
+
Me = t;
|
|
7308
7330
|
}
|
|
7309
|
-
function
|
|
7331
|
+
function Bl() {
|
|
7310
7332
|
return O;
|
|
7311
7333
|
}
|
|
7312
|
-
function
|
|
7334
|
+
function Il() {
|
|
7313
7335
|
const t = O;
|
|
7314
7336
|
return O = [], t;
|
|
7315
7337
|
}
|
|
7316
|
-
function
|
|
7317
|
-
if (!
|
|
7338
|
+
function Gl() {
|
|
7339
|
+
if (!Me || O.length === 0)
|
|
7318
7340
|
return 0;
|
|
7319
|
-
const t =
|
|
7320
|
-
return
|
|
7341
|
+
const t = Il();
|
|
7342
|
+
return Me(t), t.length;
|
|
7321
7343
|
}
|
|
7322
|
-
function
|
|
7344
|
+
function xl() {
|
|
7323
7345
|
O = [];
|
|
7324
7346
|
}
|
|
7325
|
-
function
|
|
7347
|
+
function Vl() {
|
|
7326
7348
|
return O.length;
|
|
7327
7349
|
}
|
|
7328
|
-
|
|
7350
|
+
pl();
|
|
7329
7351
|
export {
|
|
7330
7352
|
y as AuthenticationError,
|
|
7331
|
-
|
|
7332
|
-
|
|
7333
|
-
|
|
7353
|
+
va as Channel,
|
|
7354
|
+
Pa as ChannelManager,
|
|
7355
|
+
_l as ChannelNotFoundError,
|
|
7334
7356
|
X as ClientType,
|
|
7335
|
-
|
|
7357
|
+
We as ConnectionError,
|
|
7336
7358
|
J as ContextType,
|
|
7337
|
-
|
|
7359
|
+
fl as EndpointSelector,
|
|
7338
7360
|
k as EntrypointType,
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
|
|
7342
|
-
|
|
7361
|
+
Cc as FunctionRegistry,
|
|
7362
|
+
Cl as IKON_AUTH_BASE_URL,
|
|
7363
|
+
nt as IKON_AUTH_URL_DEV,
|
|
7364
|
+
rt as IKON_AUTH_URL_PROD,
|
|
7343
7365
|
pe as IKON_BACKEND_URL_DEV,
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7366
|
+
Re as IKON_BACKEND_URL_PROD,
|
|
7367
|
+
nl as IkonAudioCapture,
|
|
7368
|
+
ze as IkonAudioPlayback,
|
|
7369
|
+
Dl as IkonClient,
|
|
7370
|
+
al as IkonImageCapture,
|
|
7371
|
+
Qc as IkonMedia,
|
|
7372
|
+
dl as IkonMediaCapture,
|
|
7373
|
+
hl as IkonVideoCapture,
|
|
7374
|
+
Jc as IkonVideoPlayback,
|
|
7375
|
+
He as KeepaliveTimeoutError,
|
|
7354
7376
|
Ir as LogLevel,
|
|
7355
|
-
|
|
7356
|
-
|
|
7377
|
+
Ca as MaxRetriesExceededError,
|
|
7378
|
+
Sl as NoChannelsError,
|
|
7357
7379
|
S as Opcode,
|
|
7358
|
-
|
|
7359
|
-
|
|
7380
|
+
ba as ProvisioningTimeoutError,
|
|
7381
|
+
Tl as SpaceNotFoundError,
|
|
7360
7382
|
W as TransportError,
|
|
7361
7383
|
Z as UserType,
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7384
|
+
ml as asProtocolMessage,
|
|
7385
|
+
Nl as clearDeviceId,
|
|
7386
|
+
xl as clearLogBuffer,
|
|
7365
7387
|
L as createLogger,
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
|
|
7373
|
-
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
|
|
7388
|
+
kl as deriveAuthUrl,
|
|
7389
|
+
Rl as deriveBackendType,
|
|
7390
|
+
bl as deriveBackendUrl,
|
|
7391
|
+
gl as extractUserIdFromToken,
|
|
7392
|
+
Gl as flushLogs,
|
|
7393
|
+
Bl as getBufferedLogs,
|
|
7394
|
+
Vl as getLogBufferSize,
|
|
7395
|
+
Al as getLogLevel,
|
|
7396
|
+
yl as getLogSink,
|
|
7397
|
+
Pl as getOpcodeName,
|
|
7398
|
+
Ke as getOrCreateDeviceId,
|
|
7399
|
+
pl as initializeLogSink,
|
|
7378
7400
|
Rr as isAudioWorkletSupported,
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7401
|
+
st as isBrowserEnvironment,
|
|
7402
|
+
Ye as isCloudEnvironment,
|
|
7403
|
+
Ol as isConnected,
|
|
7404
|
+
Ml as isConnecting,
|
|
7405
|
+
vl as isError,
|
|
7406
|
+
Ll as isOffline,
|
|
7385
7407
|
le as isSharedArrayBufferSupported,
|
|
7386
7408
|
mr as isWebTransportSupported,
|
|
7387
|
-
|
|
7409
|
+
Ul as parseUrlParams,
|
|
7388
7410
|
ue as readOpcode,
|
|
7389
7411
|
ce as readOpcodeGroup,
|
|
7390
7412
|
ne as readProtocolMessageHeaders,
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7413
|
+
wc as registerBrowserFunctions,
|
|
7414
|
+
wl as setLogLevel,
|
|
7415
|
+
Ra as setLogSink,
|
|
7416
|
+
Fl as setSendLogsCallback,
|
|
7417
|
+
Il as takeBufferedLogs,
|
|
7418
|
+
bc as withResultData
|
|
7397
7419
|
};
|