@ikonai/sdk-ui 1.0.39 → 1.0.41
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/{ui-worker-4F8aYHI_.js → ui-worker-RrFBjoKd.js} +44 -41
- package/index.js +1195 -1192
- package/package.json +1 -1
- package/ui-types.d.ts +1 -0
package/index.js
CHANGED
|
@@ -3,66 +3,66 @@ const P = 27, Zt = {
|
|
|
3
3
|
Compressed: 8
|
|
4
4
|
};
|
|
5
5
|
function te(t) {
|
|
6
|
-
const e = G(t),
|
|
6
|
+
const e = G(t), r = new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
7
7
|
if (e.length < P)
|
|
8
8
|
throw new Error("Protocol payload too short");
|
|
9
|
-
const
|
|
10
|
-
if (P +
|
|
9
|
+
const s = r.getUint32(0, !0), i = r.getUint32(4, !0), n = r.getUint32(8, !0), o = r.getUint32(12, !0), a = r.getUint32(16, !0), I = r.getUint32(20, !0), h = r.getUint8(24), l = r.getUint8(25), E = r.getUint8(26);
|
|
10
|
+
if (P + I * 4 > e.length)
|
|
11
11
|
throw new Error("Protocol header exceeds payload length");
|
|
12
12
|
const _ = [];
|
|
13
13
|
let f = P;
|
|
14
|
-
for (let S = 0; S <
|
|
15
|
-
_.push(
|
|
14
|
+
for (let S = 0; S < I; S++)
|
|
15
|
+
_.push(r.getUint32(f, !0)), f += 4;
|
|
16
16
|
return {
|
|
17
|
-
length:
|
|
17
|
+
length: s,
|
|
18
18
|
opcode: i,
|
|
19
19
|
senderId: n,
|
|
20
20
|
trackId: o,
|
|
21
21
|
sequenceId: a,
|
|
22
22
|
targetIds: _,
|
|
23
23
|
payloadVersion: h,
|
|
24
|
-
payloadType:
|
|
25
|
-
flags:
|
|
24
|
+
payloadType: l,
|
|
25
|
+
flags: E
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
async function
|
|
29
|
-
const
|
|
28
|
+
async function V(t, e, r) {
|
|
29
|
+
const s = G(t), i = te(s);
|
|
30
30
|
if (e !== void 0 && i.opcode !== e)
|
|
31
31
|
throw new Error(`Unexpected opcode ${i.opcode}`);
|
|
32
32
|
if (i.payloadType !== 8)
|
|
33
33
|
throw new Error(`Unexpected payload type ${i.payloadType}`);
|
|
34
34
|
const n = P + i.targetIds.length * 4;
|
|
35
|
-
let o =
|
|
36
|
-
return (i.flags & Zt.Compressed) !== 0 && (o = await
|
|
35
|
+
let o = s.subarray(n, i.length);
|
|
36
|
+
return (i.flags & Zt.Compressed) !== 0 && (o = await re(o)), o;
|
|
37
37
|
}
|
|
38
|
-
function ee(t, e,
|
|
39
|
-
const n = i?.trackId ?? 0, o = i?.sequenceId ?? 0, a = i?.flags ?? 0,
|
|
40
|
-
_.setUint32(0,
|
|
38
|
+
function ee(t, e, r, s, i) {
|
|
39
|
+
const n = i?.trackId ?? 0, o = i?.sequenceId ?? 0, a = i?.flags ?? 0, I = i?.targetIds ?? [], h = i?.payloadType ?? 8, l = P + I.length * 4, E = l + e.length, c = new Uint8Array(E), _ = new DataView(c.buffer);
|
|
40
|
+
_.setUint32(0, E, !0), _.setUint32(4, t >>> 0, !0), _.setUint32(8, s >>> 0, !0), _.setUint32(12, n >>> 0, !0), _.setUint32(16, o >>> 0, !0), _.setUint32(20, I.length >>> 0, !0), _.setUint8(24, r & 255), _.setUint8(25, h & 255), _.setUint8(26, a & 255);
|
|
41
41
|
let f = P;
|
|
42
|
-
for (let S = 0; S <
|
|
43
|
-
_.setUint32(f,
|
|
44
|
-
return
|
|
42
|
+
for (let S = 0; S < I.length; S++)
|
|
43
|
+
_.setUint32(f, I[S] >>> 0, !0), f += 4;
|
|
44
|
+
return c.set(e, l), c;
|
|
45
45
|
}
|
|
46
|
-
async function
|
|
46
|
+
async function re(t) {
|
|
47
47
|
if (typeof DecompressionStream > "u")
|
|
48
48
|
throw new Error("DecompressionStream not supported");
|
|
49
|
-
const e = new DecompressionStream("gzip"),
|
|
50
|
-
|
|
49
|
+
const e = new DecompressionStream("gzip"), r = e.writable.getWriter(), s = new Uint8Array(t);
|
|
50
|
+
r.write(s), r.close();
|
|
51
51
|
const i = e.readable.getReader(), n = [];
|
|
52
52
|
let o = 0;
|
|
53
53
|
for (; ; ) {
|
|
54
|
-
const { done: h, value:
|
|
54
|
+
const { done: h, value: l } = await i.read();
|
|
55
55
|
if (h) break;
|
|
56
|
-
n.push(
|
|
56
|
+
n.push(l), o += l.length;
|
|
57
57
|
}
|
|
58
58
|
const a = new Uint8Array(o);
|
|
59
|
-
let
|
|
59
|
+
let I = 0;
|
|
60
60
|
for (let h = 0; h < n.length; h++)
|
|
61
|
-
a.set(n[h],
|
|
61
|
+
a.set(n[h], I), I += n[h].length;
|
|
62
62
|
return a;
|
|
63
63
|
}
|
|
64
64
|
var U = /* @__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))(U || {});
|
|
65
|
-
const lt = 161, It = 162, W = new TextEncoder(),
|
|
65
|
+
const lt = 161, It = 162, W = new TextEncoder(), se = new TextDecoder("utf-8", { fatal: !0 });
|
|
66
66
|
class B {
|
|
67
67
|
constructor(e = 1) {
|
|
68
68
|
this.version = e, this.buffer.writeByte(lt), this.buffer.writeVarUInt(e >>> 0);
|
|
@@ -70,54 +70,54 @@ class B {
|
|
|
70
70
|
buffer = new b();
|
|
71
71
|
closed = !1;
|
|
72
72
|
cached;
|
|
73
|
-
writeInt32Field(e,
|
|
74
|
-
this.writeFixedField(e, 3, () => this.buffer.writeInt32(
|
|
73
|
+
writeInt32Field(e, r) {
|
|
74
|
+
this.writeFixedField(e, 3, () => this.buffer.writeInt32(r | 0));
|
|
75
75
|
}
|
|
76
|
-
writeUInt32Field(e,
|
|
77
|
-
this.writeFixedField(e, 5, () => this.buffer.writeUInt32(
|
|
76
|
+
writeUInt32Field(e, r) {
|
|
77
|
+
this.writeFixedField(e, 5, () => this.buffer.writeUInt32(r >>> 0));
|
|
78
78
|
}
|
|
79
|
-
writeInt64Field(e,
|
|
80
|
-
this.writeFixedField(e, 4, () => this.buffer.writeBigInt64(
|
|
79
|
+
writeInt64Field(e, r) {
|
|
80
|
+
this.writeFixedField(e, 4, () => this.buffer.writeBigInt64(r));
|
|
81
81
|
}
|
|
82
|
-
writeUInt64Field(e,
|
|
83
|
-
this.writeFixedField(e, 6, () => this.buffer.writeBigUInt64(
|
|
82
|
+
writeUInt64Field(e, r) {
|
|
83
|
+
this.writeFixedField(e, 6, () => this.buffer.writeBigUInt64(r));
|
|
84
84
|
}
|
|
85
|
-
writeFloat32Field(e,
|
|
86
|
-
this.writeFixedField(e, 7, () => this.buffer.writeFloat32(
|
|
85
|
+
writeFloat32Field(e, r) {
|
|
86
|
+
this.writeFixedField(e, 7, () => this.buffer.writeFloat32(r));
|
|
87
87
|
}
|
|
88
|
-
writeFloat64Field(e,
|
|
89
|
-
this.writeFixedField(e, 8, () => this.buffer.writeFloat64(
|
|
88
|
+
writeFloat64Field(e, r) {
|
|
89
|
+
this.writeFixedField(e, 8, () => this.buffer.writeFloat64(r));
|
|
90
90
|
}
|
|
91
|
-
writeBoolField(e,
|
|
92
|
-
this.writeFixedField(e, 2, () => this.buffer.writeByte(
|
|
91
|
+
writeBoolField(e, r) {
|
|
92
|
+
this.writeFixedField(e, 2, () => this.buffer.writeByte(r ? 1 : 0));
|
|
93
93
|
}
|
|
94
|
-
writeGuidField(e,
|
|
95
|
-
const
|
|
96
|
-
if (
|
|
94
|
+
writeGuidField(e, r) {
|
|
95
|
+
const s = r instanceof T ? r.asBytes() : r;
|
|
96
|
+
if (s.length !== 16)
|
|
97
97
|
throw new Error("Guid payload must be 16 bytes");
|
|
98
|
-
this.writeFixedField(e, 14, () => this.buffer.writeBytes(
|
|
98
|
+
this.writeFixedField(e, 14, () => this.buffer.writeBytes(s));
|
|
99
99
|
}
|
|
100
|
-
writeStringField(e,
|
|
101
|
-
const
|
|
102
|
-
this.writeVariableField(e, 12,
|
|
100
|
+
writeStringField(e, r) {
|
|
101
|
+
const s = W.encode(r ?? "");
|
|
102
|
+
this.writeVariableField(e, 12, s);
|
|
103
103
|
}
|
|
104
|
-
writeBinaryField(e,
|
|
105
|
-
this.writeVariableField(e, 13,
|
|
104
|
+
writeBinaryField(e, r) {
|
|
105
|
+
this.writeVariableField(e, 13, r);
|
|
106
106
|
}
|
|
107
|
-
writeObjectField(e,
|
|
108
|
-
const i = new B(
|
|
109
|
-
|
|
107
|
+
writeObjectField(e, r, s) {
|
|
108
|
+
const i = new B(r);
|
|
109
|
+
s(i);
|
|
110
110
|
const n = i.finish();
|
|
111
111
|
this.writeVariableField(e, 11, n);
|
|
112
112
|
}
|
|
113
|
-
writeArrayField(e,
|
|
114
|
-
const i = new Y(
|
|
115
|
-
|
|
113
|
+
writeArrayField(e, r, s) {
|
|
114
|
+
const i = new Y(r);
|
|
115
|
+
s(i);
|
|
116
116
|
const n = i.finish();
|
|
117
117
|
this.writeVariableField(e, 9, n);
|
|
118
118
|
}
|
|
119
|
-
writeDictionaryField(e,
|
|
120
|
-
const n = new Q(
|
|
119
|
+
writeDictionaryField(e, r, s, i) {
|
|
120
|
+
const n = new Q(r, s);
|
|
121
121
|
i(n);
|
|
122
122
|
const o = n.finish();
|
|
123
123
|
this.writeVariableField(e, 10, o);
|
|
@@ -125,14 +125,14 @@ class B {
|
|
|
125
125
|
finish() {
|
|
126
126
|
return this.closed || (this.buffer.writeByte(It), this.closed = !0, this.cached = this.buffer.toUint8Array()), this.cached;
|
|
127
127
|
}
|
|
128
|
-
writeFixedField(e,
|
|
129
|
-
this.writeFieldHeader(e,
|
|
128
|
+
writeFixedField(e, r, s) {
|
|
129
|
+
this.writeFieldHeader(e, r, 0), s();
|
|
130
130
|
}
|
|
131
|
-
writeVariableField(e,
|
|
132
|
-
this.writeFieldHeader(e,
|
|
131
|
+
writeVariableField(e, r, s) {
|
|
132
|
+
this.writeFieldHeader(e, r, s.length), this.buffer.writeBytes(s);
|
|
133
133
|
}
|
|
134
|
-
writeFieldHeader(e,
|
|
135
|
-
this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(K(
|
|
134
|
+
writeFieldHeader(e, r, s) {
|
|
135
|
+
this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(K(r)), le(r) && this.buffer.writeVarUInt(s >>> 0);
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
class Y {
|
|
@@ -188,18 +188,18 @@ class Y {
|
|
|
188
188
|
14
|
|
189
189
|
/* Guid */
|
|
190
190
|
), this.count++;
|
|
191
|
-
const
|
|
192
|
-
if (
|
|
191
|
+
const r = e instanceof T ? e.asBytes() : e;
|
|
192
|
+
if (r.length !== 16)
|
|
193
193
|
throw new Error("Guid payload must be 16 bytes");
|
|
194
|
-
this.payload.writeBytes(
|
|
194
|
+
this.payload.writeBytes(r);
|
|
195
195
|
}
|
|
196
196
|
writeString(e) {
|
|
197
197
|
this.ensureElementType(
|
|
198
198
|
12
|
|
199
199
|
/* String */
|
|
200
200
|
), this.count++;
|
|
201
|
-
const
|
|
202
|
-
this.payload.writeVarUInt(
|
|
201
|
+
const r = W.encode(e ?? "");
|
|
202
|
+
this.payload.writeVarUInt(r.length), this.payload.writeBytes(r);
|
|
203
203
|
}
|
|
204
204
|
writeBinary(e) {
|
|
205
205
|
this.ensureElementType(
|
|
@@ -207,33 +207,33 @@ class Y {
|
|
|
207
207
|
/* Binary */
|
|
208
208
|
), this.count++, this.payload.writeVarUInt(e.length), this.payload.writeBytes(e);
|
|
209
209
|
}
|
|
210
|
-
writeObject(e,
|
|
210
|
+
writeObject(e, r) {
|
|
211
211
|
this.ensureElementType(
|
|
212
212
|
11
|
|
213
213
|
/* Object */
|
|
214
214
|
), this.count++;
|
|
215
|
-
const
|
|
216
|
-
s
|
|
217
|
-
const i =
|
|
215
|
+
const s = new B(e);
|
|
216
|
+
r(s);
|
|
217
|
+
const i = s.finish();
|
|
218
218
|
this.payload.writeVarUInt(i.length), this.payload.writeBytes(i);
|
|
219
219
|
}
|
|
220
|
-
writeArray(e,
|
|
220
|
+
writeArray(e, r) {
|
|
221
221
|
this.ensureElementType(
|
|
222
222
|
9
|
|
223
223
|
/* Array */
|
|
224
224
|
), this.count++;
|
|
225
|
-
const
|
|
226
|
-
s
|
|
227
|
-
const i =
|
|
225
|
+
const s = new Y(e);
|
|
226
|
+
r(s);
|
|
227
|
+
const i = s.finish();
|
|
228
228
|
this.payload.writeBytes(i);
|
|
229
229
|
}
|
|
230
|
-
writeDictionary(e,
|
|
230
|
+
writeDictionary(e, r, s) {
|
|
231
231
|
this.ensureElementType(
|
|
232
232
|
10
|
|
233
233
|
/* Dict */
|
|
234
234
|
), this.count++;
|
|
235
|
-
const i = new Q(e,
|
|
236
|
-
|
|
235
|
+
const i = new Q(e, r);
|
|
236
|
+
s(i);
|
|
237
237
|
const n = i.finish();
|
|
238
238
|
this.payload.writeBytes(n);
|
|
239
239
|
}
|
|
@@ -247,8 +247,8 @@ class Y {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
class Q {
|
|
250
|
-
constructor(e,
|
|
251
|
-
this.keyType = e, this.valueType =
|
|
250
|
+
constructor(e, r) {
|
|
251
|
+
this.keyType = e, this.valueType = r, et(e);
|
|
252
252
|
}
|
|
253
253
|
payload = new b();
|
|
254
254
|
count = 0;
|
|
@@ -268,8 +268,8 @@ class Q {
|
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
class ie {
|
|
271
|
-
constructor(e,
|
|
272
|
-
this.keyType = e, this.valueType =
|
|
271
|
+
constructor(e, r, s, i) {
|
|
272
|
+
this.keyType = e, this.valueType = r, this.payload = s, this.onComplete = i;
|
|
273
273
|
}
|
|
274
274
|
keyWritten = !1;
|
|
275
275
|
valueWritten = !1;
|
|
@@ -321,18 +321,18 @@ class ie {
|
|
|
321
321
|
14
|
|
322
322
|
/* Guid */
|
|
323
323
|
);
|
|
324
|
-
const
|
|
325
|
-
if (
|
|
324
|
+
const r = e instanceof T ? e.asBytes() : e;
|
|
325
|
+
if (r.length !== 16)
|
|
326
326
|
throw new Error("Guid payload must be 16 bytes");
|
|
327
|
-
this.payload.writeBytes(
|
|
327
|
+
this.payload.writeBytes(r), this.keyWritten = !0;
|
|
328
328
|
}
|
|
329
329
|
writeKeyString(e) {
|
|
330
330
|
this.ensureKeyType(
|
|
331
331
|
12
|
|
332
332
|
/* String */
|
|
333
333
|
);
|
|
334
|
-
const
|
|
335
|
-
this.payload.writeVarUInt(
|
|
334
|
+
const r = W.encode(e ?? "");
|
|
335
|
+
this.payload.writeVarUInt(r.length), this.payload.writeBytes(r), this.keyWritten = !0;
|
|
336
336
|
}
|
|
337
337
|
writeKeyBinary(e) {
|
|
338
338
|
this.ensureKeyType(
|
|
@@ -387,10 +387,10 @@ class ie {
|
|
|
387
387
|
14
|
|
388
388
|
/* Guid */
|
|
389
389
|
);
|
|
390
|
-
const
|
|
391
|
-
if (
|
|
390
|
+
const r = e instanceof T ? e.asBytes() : e;
|
|
391
|
+
if (r.length !== 16)
|
|
392
392
|
throw new Error("Guid payload must be 16 bytes");
|
|
393
|
-
this.payload.writeBytes(
|
|
393
|
+
this.payload.writeBytes(r), this.valueWritten = !0;
|
|
394
394
|
}
|
|
395
395
|
writeNullValue() {
|
|
396
396
|
this.ensureValueType(
|
|
@@ -409,36 +409,36 @@ class ie {
|
|
|
409
409
|
12
|
|
410
410
|
/* String */
|
|
411
411
|
);
|
|
412
|
-
const
|
|
413
|
-
this.payload.writeVarUInt(
|
|
412
|
+
const r = W.encode(e ?? "");
|
|
413
|
+
this.payload.writeVarUInt(r.length), this.payload.writeBytes(r), this.valueWritten = !0;
|
|
414
414
|
}
|
|
415
|
-
writeValueObject(e,
|
|
415
|
+
writeValueObject(e, r) {
|
|
416
416
|
this.ensureValueType(
|
|
417
417
|
11
|
|
418
418
|
/* Object */
|
|
419
419
|
);
|
|
420
|
-
const
|
|
421
|
-
s
|
|
422
|
-
const i =
|
|
420
|
+
const s = new B(e);
|
|
421
|
+
r(s);
|
|
422
|
+
const i = s.finish();
|
|
423
423
|
this.payload.writeVarUInt(i.length), this.payload.writeBytes(i), this.valueWritten = !0;
|
|
424
424
|
}
|
|
425
|
-
writeValueArray(e,
|
|
425
|
+
writeValueArray(e, r) {
|
|
426
426
|
this.ensureValueType(
|
|
427
427
|
9
|
|
428
428
|
/* Array */
|
|
429
429
|
);
|
|
430
|
-
const
|
|
431
|
-
s
|
|
432
|
-
const i =
|
|
430
|
+
const s = new Y(e);
|
|
431
|
+
r(s);
|
|
432
|
+
const i = s.finish();
|
|
433
433
|
this.payload.writeBytes(i), this.valueWritten = !0;
|
|
434
434
|
}
|
|
435
|
-
writeValueDictionary(e,
|
|
435
|
+
writeValueDictionary(e, r, s) {
|
|
436
436
|
this.ensureValueType(
|
|
437
437
|
10
|
|
438
438
|
/* Dict */
|
|
439
439
|
);
|
|
440
|
-
const i = new Q(e,
|
|
441
|
-
|
|
440
|
+
const i = new Q(e, r);
|
|
441
|
+
s(i);
|
|
442
442
|
const n = i.finish();
|
|
443
443
|
this.payload.writeBytes(n), this.valueWritten = !0;
|
|
444
444
|
}
|
|
@@ -459,19 +459,19 @@ class ie {
|
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
461
|
class g {
|
|
462
|
-
constructor(e,
|
|
463
|
-
this.buffer = e, this.version =
|
|
462
|
+
constructor(e, r, s) {
|
|
463
|
+
this.buffer = e, this.version = r, this.offset = s, this.end = e.length - 1;
|
|
464
464
|
}
|
|
465
465
|
offset;
|
|
466
466
|
end;
|
|
467
467
|
static create(e) {
|
|
468
|
-
const
|
|
469
|
-
if (
|
|
468
|
+
const r = G(e);
|
|
469
|
+
if (r.length < 2)
|
|
470
470
|
throw new Error("Teleport payload too short");
|
|
471
|
-
if (
|
|
471
|
+
if (r[0] !== lt || r[r.length - 1] !== It)
|
|
472
472
|
throw new Error("Teleport object missing markers");
|
|
473
|
-
const
|
|
474
|
-
return new g(
|
|
473
|
+
const s = { offset: 1 }, i = C(r, s, "InvalidLength");
|
|
474
|
+
return new g(r, i, s.offset);
|
|
475
475
|
}
|
|
476
476
|
next() {
|
|
477
477
|
if (this.offset >= this.end)
|
|
@@ -480,10 +480,10 @@ class g {
|
|
|
480
480
|
throw new Error("Teleport object truncated");
|
|
481
481
|
const e = Ie(this.buffer, this.offset);
|
|
482
482
|
this.offset += 4;
|
|
483
|
-
const
|
|
484
|
-
if ((
|
|
483
|
+
const r = this.buffer[this.offset++], s = r >> 4 & 15;
|
|
484
|
+
if ((r & 15) !== 0)
|
|
485
485
|
throw new Error("Teleport field flags must be zero");
|
|
486
|
-
const i = F(
|
|
486
|
+
const i = F(s);
|
|
487
487
|
let n;
|
|
488
488
|
if (i >= 0)
|
|
489
489
|
N(this.buffer, this.offset, i), n = this.buffer.subarray(this.offset, this.offset + i), this.offset += i;
|
|
@@ -491,12 +491,12 @@ class g {
|
|
|
491
491
|
const o = { offset: this.offset }, a = C(this.buffer, o, "InvalidLength");
|
|
492
492
|
N(this.buffer, o.offset, a), n = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
|
|
493
493
|
}
|
|
494
|
-
return new ne(e,
|
|
494
|
+
return new ne(e, s, n);
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
497
|
class O {
|
|
498
|
-
constructor(e,
|
|
499
|
-
this.type = e, this.payload =
|
|
498
|
+
constructor(e, r) {
|
|
499
|
+
this.type = e, this.payload = r;
|
|
500
500
|
}
|
|
501
501
|
asInt32() {
|
|
502
502
|
return this.ensureType(
|
|
@@ -556,7 +556,7 @@ class O {
|
|
|
556
556
|
return this.ensureType(
|
|
557
557
|
12
|
|
558
558
|
/* String */
|
|
559
|
-
),
|
|
559
|
+
), se.decode(this.payload);
|
|
560
560
|
}
|
|
561
561
|
asGuid() {
|
|
562
562
|
return this.ensureType(
|
|
@@ -588,8 +588,8 @@ class O {
|
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
590
|
class ne extends O {
|
|
591
|
-
constructor(e,
|
|
592
|
-
super(
|
|
591
|
+
constructor(e, r, s) {
|
|
592
|
+
super(r, s), this.fieldId = e;
|
|
593
593
|
}
|
|
594
594
|
get isNull() {
|
|
595
595
|
return this.type === 1;
|
|
@@ -604,11 +604,11 @@ class Z {
|
|
|
604
604
|
constructor(e) {
|
|
605
605
|
if (this.payload = e, e.length === 0)
|
|
606
606
|
throw new Error("Array payload too short");
|
|
607
|
-
const
|
|
608
|
-
if (this.elementType =
|
|
607
|
+
const r = e[0];
|
|
608
|
+
if (this.elementType = r >> 4 & 15, (r & 15) !== 0)
|
|
609
609
|
throw new Error("Array flags must be zero");
|
|
610
|
-
const
|
|
611
|
-
this.count = C(e,
|
|
610
|
+
const s = { offset: 1 };
|
|
611
|
+
this.count = C(e, s, "ArrayMalformed"), this.offset = s.offset;
|
|
612
612
|
}
|
|
613
613
|
static create(e) {
|
|
614
614
|
return new Z(G(e));
|
|
@@ -634,38 +634,38 @@ class Z {
|
|
|
634
634
|
case 14: {
|
|
635
635
|
const e = F(this.elementType);
|
|
636
636
|
N(this.payload, this.offset, e);
|
|
637
|
-
const
|
|
638
|
-
return this.offset += e, new
|
|
637
|
+
const r = this.payload.subarray(this.offset, this.offset + e);
|
|
638
|
+
return this.offset += e, new M(this.elementType, r);
|
|
639
639
|
}
|
|
640
640
|
case 12:
|
|
641
641
|
case 13: {
|
|
642
|
-
const e = { offset: this.offset },
|
|
643
|
-
N(this.payload, e.offset,
|
|
644
|
-
const
|
|
645
|
-
return this.offset = e.offset +
|
|
642
|
+
const e = { offset: this.offset }, r = C(this.payload, e, "ArrayMalformed");
|
|
643
|
+
N(this.payload, e.offset, r);
|
|
644
|
+
const s = this.payload.subarray(e.offset, e.offset + r);
|
|
645
|
+
return this.offset = e.offset + r, new M(this.elementType, s);
|
|
646
646
|
}
|
|
647
647
|
case 11: {
|
|
648
|
-
const e = { offset: this.offset },
|
|
649
|
-
N(this.payload, e.offset,
|
|
650
|
-
const
|
|
651
|
-
return this.offset = e.offset +
|
|
648
|
+
const e = { offset: this.offset }, r = C(this.payload, e, "ArrayMalformed");
|
|
649
|
+
N(this.payload, e.offset, r);
|
|
650
|
+
const s = this.payload.subarray(e.offset, e.offset + r);
|
|
651
|
+
return this.offset = e.offset + r, new M(11, s);
|
|
652
652
|
}
|
|
653
653
|
case 9: {
|
|
654
|
-
const e =
|
|
655
|
-
return this.offset += e, new
|
|
654
|
+
const e = rt(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
655
|
+
return this.offset += e, new M(9, r);
|
|
656
656
|
}
|
|
657
657
|
case 10: {
|
|
658
|
-
const e =
|
|
659
|
-
return this.offset += e, new
|
|
658
|
+
const e = st(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
659
|
+
return this.offset += e, new M(10, r);
|
|
660
660
|
}
|
|
661
661
|
default:
|
|
662
662
|
throw new Error(`Unsupported array element type ${U[this.elementType]}`);
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
|
-
class
|
|
667
|
-
constructor(e,
|
|
668
|
-
super(e,
|
|
666
|
+
class M extends O {
|
|
667
|
+
constructor(e, r) {
|
|
668
|
+
super(e, r);
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
671
|
class tt {
|
|
@@ -681,8 +681,8 @@ class tt {
|
|
|
681
681
|
if (this.keyType = e[0] >> 4 & 15, this.valueType = e[1] >> 4 & 15, (e[0] & 15) !== 0 || (e[1] & 15) !== 0)
|
|
682
682
|
throw new Error("Dictionary key/value flags must be zero");
|
|
683
683
|
et(this.keyType);
|
|
684
|
-
const
|
|
685
|
-
this.count = C(e,
|
|
684
|
+
const r = { offset: 2 };
|
|
685
|
+
this.count = C(e, r, "DictMalformed"), this.offset = r.offset;
|
|
686
686
|
}
|
|
687
687
|
static create(e) {
|
|
688
688
|
return new tt(G(e));
|
|
@@ -693,21 +693,21 @@ class tt {
|
|
|
693
693
|
throw new Error("Dictionary payload contains trailing data");
|
|
694
694
|
return null;
|
|
695
695
|
}
|
|
696
|
-
const e = this.readKey(),
|
|
697
|
-
return this.index++, new oe(e,
|
|
696
|
+
const e = this.readKey(), r = this.readValue();
|
|
697
|
+
return this.index++, new oe(e, r);
|
|
698
698
|
}
|
|
699
699
|
readKey() {
|
|
700
700
|
const e = F(this.keyType);
|
|
701
701
|
if (e >= 0) {
|
|
702
702
|
N(this.payload, this.offset, e);
|
|
703
|
-
const
|
|
704
|
-
return this.offset += e, new O(this.keyType,
|
|
703
|
+
const r = this.payload.subarray(this.offset, this.offset + e);
|
|
704
|
+
return this.offset += e, new O(this.keyType, r);
|
|
705
705
|
}
|
|
706
706
|
if (this.keyType === 12 || this.keyType === 13) {
|
|
707
|
-
const
|
|
708
|
-
N(this.payload,
|
|
709
|
-
const i = this.payload.subarray(
|
|
710
|
-
return this.offset =
|
|
707
|
+
const r = { offset: this.offset }, s = C(this.payload, r, "DictMalformed");
|
|
708
|
+
N(this.payload, r.offset, s);
|
|
709
|
+
const i = this.payload.subarray(r.offset, r.offset + s);
|
|
710
|
+
return this.offset = r.offset + s, new O(this.keyType, i);
|
|
711
711
|
}
|
|
712
712
|
throw new Error("Unsupported dictionary key type");
|
|
713
713
|
}
|
|
@@ -715,24 +715,24 @@ class tt {
|
|
|
715
715
|
switch (this.valueType) {
|
|
716
716
|
case 12:
|
|
717
717
|
case 13: {
|
|
718
|
-
const e = { offset: this.offset },
|
|
719
|
-
N(this.payload, e.offset,
|
|
720
|
-
const
|
|
721
|
-
return this.offset = e.offset +
|
|
718
|
+
const e = { offset: this.offset }, r = C(this.payload, e, "DictMalformed");
|
|
719
|
+
N(this.payload, e.offset, r);
|
|
720
|
+
const s = this.payload.subarray(e.offset, e.offset + r);
|
|
721
|
+
return this.offset = e.offset + r, new O(this.valueType, s);
|
|
722
722
|
}
|
|
723
723
|
case 11: {
|
|
724
|
-
const e = { offset: this.offset },
|
|
725
|
-
N(this.payload, e.offset,
|
|
726
|
-
const
|
|
727
|
-
return this.offset = e.offset +
|
|
724
|
+
const e = { offset: this.offset }, r = C(this.payload, e, "DictMalformed");
|
|
725
|
+
N(this.payload, e.offset, r);
|
|
726
|
+
const s = this.payload.subarray(e.offset, e.offset + r);
|
|
727
|
+
return this.offset = e.offset + r, new O(11, s);
|
|
728
728
|
}
|
|
729
729
|
case 9: {
|
|
730
|
-
const e =
|
|
731
|
-
return this.offset += e, new O(9,
|
|
730
|
+
const e = rt(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
731
|
+
return this.offset += e, new O(9, r);
|
|
732
732
|
}
|
|
733
733
|
case 10: {
|
|
734
|
-
const e =
|
|
735
|
-
return this.offset += e, new O(10,
|
|
734
|
+
const e = st(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
735
|
+
return this.offset += e, new O(10, r);
|
|
736
736
|
}
|
|
737
737
|
case 3:
|
|
738
738
|
case 5:
|
|
@@ -745,8 +745,8 @@ class tt {
|
|
|
745
745
|
case 1: {
|
|
746
746
|
const e = F(this.valueType);
|
|
747
747
|
N(this.payload, this.offset, e);
|
|
748
|
-
const
|
|
749
|
-
return this.offset += e, new O(this.valueType,
|
|
748
|
+
const r = this.payload.subarray(this.offset, this.offset + e);
|
|
749
|
+
return this.offset += e, new O(this.valueType, r);
|
|
750
750
|
}
|
|
751
751
|
default:
|
|
752
752
|
throw new Error(`Unsupported dictionary value type ${U[this.valueType]}`);
|
|
@@ -754,8 +754,8 @@ class tt {
|
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
756
|
class oe {
|
|
757
|
-
constructor(e,
|
|
758
|
-
this.key = e, this.value =
|
|
757
|
+
constructor(e, r) {
|
|
758
|
+
this.key = e, this.value = r;
|
|
759
759
|
}
|
|
760
760
|
}
|
|
761
761
|
class T {
|
|
@@ -765,14 +765,14 @@ class T {
|
|
|
765
765
|
static fromString(e) {
|
|
766
766
|
if (!e)
|
|
767
767
|
throw new Error("Guid string is empty");
|
|
768
|
-
const
|
|
769
|
-
if (
|
|
768
|
+
const r = e.replace(/-/g, "");
|
|
769
|
+
if (r.length !== 32)
|
|
770
770
|
throw new Error("Guid string must be 32 hex characters");
|
|
771
|
-
const
|
|
772
|
-
T.writeUInt32LE(
|
|
771
|
+
const s = new Uint8Array(16), i = T.parseHexSlice(r, 0, 8), n = T.parseHexSlice(r, 8, 4), o = T.parseHexSlice(r, 12, 4);
|
|
772
|
+
T.writeUInt32LE(s, 0, i), T.writeUInt16LE(s, 4, n), T.writeUInt16LE(s, 6, o);
|
|
773
773
|
for (let a = 0; a < 8; a++)
|
|
774
|
-
|
|
775
|
-
return new T(
|
|
774
|
+
s[8 + a] = T.parseHexSlice(r, 16 + a * 2, 2);
|
|
775
|
+
return new T(s);
|
|
776
776
|
}
|
|
777
777
|
static fromBytes(e) {
|
|
778
778
|
if (e.length !== 16)
|
|
@@ -783,12 +783,12 @@ class T {
|
|
|
783
783
|
return new T(new Uint8Array(16));
|
|
784
784
|
}
|
|
785
785
|
static createRandom() {
|
|
786
|
-
const e = new Uint8Array(16),
|
|
787
|
-
if (
|
|
788
|
-
|
|
786
|
+
const e = new Uint8Array(16), r = globalThis.crypto;
|
|
787
|
+
if (r?.getRandomValues)
|
|
788
|
+
r.getRandomValues(e);
|
|
789
789
|
else
|
|
790
|
-
for (let
|
|
791
|
-
e[
|
|
790
|
+
for (let s = 0; s < e.length; s++)
|
|
791
|
+
e[s] = Math.floor(Math.random() * 256);
|
|
792
792
|
return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, new T(e);
|
|
793
793
|
}
|
|
794
794
|
toString() {
|
|
@@ -804,28 +804,28 @@ class T {
|
|
|
804
804
|
asBytes() {
|
|
805
805
|
return this.bytes.slice();
|
|
806
806
|
}
|
|
807
|
-
static parseHexSlice(e,
|
|
808
|
-
const i = e.substr(
|
|
807
|
+
static parseHexSlice(e, r, s) {
|
|
808
|
+
const i = e.substr(r, s), n = Number.parseInt(i, 16);
|
|
809
809
|
if (Number.isNaN(n))
|
|
810
810
|
throw new Error("Guid string contains invalid characters");
|
|
811
811
|
return n >>> 0;
|
|
812
812
|
}
|
|
813
|
-
static writeUInt32LE(e,
|
|
814
|
-
const i =
|
|
815
|
-
e[
|
|
813
|
+
static writeUInt32LE(e, r, s) {
|
|
814
|
+
const i = s >>> 0;
|
|
815
|
+
e[r] = i & 255, e[r + 1] = i >>> 8 & 255, e[r + 2] = i >>> 16 & 255, e[r + 3] = i >>> 24 & 255;
|
|
816
816
|
}
|
|
817
|
-
static writeUInt16LE(e,
|
|
818
|
-
const i =
|
|
819
|
-
e[
|
|
817
|
+
static writeUInt16LE(e, r, s) {
|
|
818
|
+
const i = s & 65535;
|
|
819
|
+
e[r] = i & 255, e[r + 1] = i >>> 8 & 255;
|
|
820
820
|
}
|
|
821
|
-
static readUInt32LE(e,
|
|
822
|
-
return (e[
|
|
821
|
+
static readUInt32LE(e, r) {
|
|
822
|
+
return (e[r] | e[r + 1] << 8 | e[r + 2] << 16 | e[r + 3] << 24) >>> 0;
|
|
823
823
|
}
|
|
824
|
-
static readUInt16LE(e,
|
|
825
|
-
return (e[
|
|
824
|
+
static readUInt16LE(e, r) {
|
|
825
|
+
return (e[r] | e[r + 1] << 8) & 65535;
|
|
826
826
|
}
|
|
827
|
-
static toHex(e,
|
|
828
|
-
return (e >>> 0).toString(16).padStart(
|
|
827
|
+
static toHex(e, r) {
|
|
828
|
+
return (e >>> 0).toString(16).padStart(r, "0");
|
|
829
829
|
}
|
|
830
830
|
}
|
|
831
831
|
class b {
|
|
@@ -837,13 +837,13 @@ class b {
|
|
|
837
837
|
this.buffer = new Uint8Array(b.INITIAL_CAPACITY), this.dataView = new DataView(this.buffer.buffer);
|
|
838
838
|
}
|
|
839
839
|
ensureCapacity(e) {
|
|
840
|
-
const
|
|
841
|
-
if (
|
|
840
|
+
const r = this.length + e;
|
|
841
|
+
if (r <= this.buffer.length)
|
|
842
842
|
return;
|
|
843
|
-
let
|
|
844
|
-
for (;
|
|
845
|
-
|
|
846
|
-
const i = new Uint8Array(
|
|
843
|
+
let s = this.buffer.length;
|
|
844
|
+
for (; s < r; )
|
|
845
|
+
s *= 2;
|
|
846
|
+
const i = new Uint8Array(s);
|
|
847
847
|
i.set(this.buffer.subarray(0, this.length)), this.buffer = i, this.dataView = new DataView(this.buffer.buffer);
|
|
848
848
|
}
|
|
849
849
|
writeByte(e) {
|
|
@@ -871,30 +871,30 @@ class b {
|
|
|
871
871
|
this.ensureCapacity(8), this.dataView.setBigUint64(this.length, e, !0), this.length += 8;
|
|
872
872
|
}
|
|
873
873
|
writeVarUInt(e) {
|
|
874
|
-
let
|
|
875
|
-
for (;
|
|
876
|
-
this.ensureCapacity(1), this.buffer[this.length++] =
|
|
877
|
-
this.ensureCapacity(1), this.buffer[this.length++] =
|
|
874
|
+
let r = e >>> 0;
|
|
875
|
+
for (; r >= 128; )
|
|
876
|
+
this.ensureCapacity(1), this.buffer[this.length++] = r & 127 | 128, r >>>= 7;
|
|
877
|
+
this.ensureCapacity(1), this.buffer[this.length++] = r & 127;
|
|
878
878
|
}
|
|
879
879
|
toUint8Array() {
|
|
880
880
|
return this.buffer.slice(0, this.length);
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
|
-
function C(t, e,
|
|
883
|
+
function C(t, e, r) {
|
|
884
884
|
if (e.offset >= t.length)
|
|
885
|
-
throw new Error(
|
|
886
|
-
let
|
|
885
|
+
throw new Error(r);
|
|
886
|
+
let s = 0, i = 0, n = 0;
|
|
887
887
|
for (; e.offset < t.length; ) {
|
|
888
888
|
const o = t[e.offset++];
|
|
889
|
-
if (n++,
|
|
890
|
-
if (n !== ae(
|
|
889
|
+
if (n++, s |= (o & 127) << i, (o & 128) === 0) {
|
|
890
|
+
if (n !== ae(s))
|
|
891
891
|
throw new Error("Teleport VarUInt is not canonical");
|
|
892
|
-
return
|
|
892
|
+
return s >>> 0;
|
|
893
893
|
}
|
|
894
894
|
if (i += 7, i >= 35)
|
|
895
895
|
throw new Error("Teleport VarUInt exceeds 32-bit range");
|
|
896
896
|
}
|
|
897
|
-
throw new Error(
|
|
897
|
+
throw new Error(r);
|
|
898
898
|
}
|
|
899
899
|
function ae(t) {
|
|
900
900
|
return t < 128 ? 1 : t < 16384 ? 2 : t < 2097152 ? 3 : t < 268435456 ? 4 : 5;
|
|
@@ -931,60 +931,60 @@ function et(t) {
|
|
|
931
931
|
if (t === 9 || t === 11 || t === 10 || t === 1)
|
|
932
932
|
throw new Error("Dictionary keys must be primitive Teleport types");
|
|
933
933
|
}
|
|
934
|
-
function N(t, e,
|
|
935
|
-
if (e < 0 ||
|
|
934
|
+
function N(t, e, r) {
|
|
935
|
+
if (e < 0 || r < 0 || e + r > t.length)
|
|
936
936
|
throw new Error("Teleport payload exceeds bounds");
|
|
937
937
|
}
|
|
938
938
|
function Ie(t, e) {
|
|
939
939
|
return (t[e] | t[e + 1] << 8 | t[e + 2] << 16 | t[e + 3] << 24) >>> 0;
|
|
940
940
|
}
|
|
941
|
-
function
|
|
941
|
+
function rt(t, e) {
|
|
942
942
|
if (e >= t.length)
|
|
943
943
|
throw new Error("Array payload exceeds bounds");
|
|
944
|
-
const
|
|
945
|
-
if ((
|
|
944
|
+
const r = t[e], s = r >> 4 & 15;
|
|
945
|
+
if ((r & 15) !== 0)
|
|
946
946
|
throw new Error("Array flags must be zero");
|
|
947
|
-
const i = { offset: e + 1 }, n = C(t, i, "ArrayMalformed"), o = F(
|
|
947
|
+
const i = { offset: e + 1 }, n = C(t, i, "ArrayMalformed"), o = F(s);
|
|
948
948
|
if (o >= 0) {
|
|
949
|
-
const
|
|
950
|
-
return N(t, i.offset,
|
|
949
|
+
const I = o * n;
|
|
950
|
+
return N(t, i.offset, I), i.offset + I - e;
|
|
951
951
|
}
|
|
952
952
|
let a = i.offset;
|
|
953
|
-
for (let
|
|
954
|
-
a = X(
|
|
953
|
+
for (let I = 0; I < n; I++)
|
|
954
|
+
a = X(s, t, a, "ArrayMalformed");
|
|
955
955
|
return a - e;
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function st(t, e) {
|
|
958
958
|
if (e + 2 > t.length)
|
|
959
959
|
throw new Error("Dictionary payload too short");
|
|
960
|
-
const
|
|
960
|
+
const r = t[e] >> 4 & 15, s = t[e + 1] >> 4 & 15;
|
|
961
961
|
if ((t[e] & 15) !== 0 || (t[e + 1] & 15) !== 0)
|
|
962
962
|
throw new Error("Dictionary key/value flags must be zero");
|
|
963
|
-
et(
|
|
963
|
+
et(r);
|
|
964
964
|
const i = { offset: e + 2 }, n = C(t, i, "DictMalformed");
|
|
965
965
|
let o = i.offset;
|
|
966
966
|
for (let a = 0; a < n; a++)
|
|
967
|
-
o = X(
|
|
967
|
+
o = X(r, t, o, "DictMalformed"), o = X(s, t, o, "DictMalformed");
|
|
968
968
|
return o - e;
|
|
969
969
|
}
|
|
970
|
-
function X(t, e,
|
|
970
|
+
function X(t, e, r, s) {
|
|
971
971
|
const i = F(t);
|
|
972
972
|
if (i >= 0)
|
|
973
|
-
return N(e,
|
|
973
|
+
return N(e, r, i), r + i;
|
|
974
974
|
switch (t) {
|
|
975
975
|
case 12:
|
|
976
976
|
case 13: {
|
|
977
|
-
const n = { offset:
|
|
977
|
+
const n = { offset: r }, o = C(e, n, s);
|
|
978
978
|
return N(e, n.offset, o), n.offset + o;
|
|
979
979
|
}
|
|
980
980
|
case 11: {
|
|
981
|
-
const n = { offset:
|
|
981
|
+
const n = { offset: r }, o = C(e, n, s);
|
|
982
982
|
return N(e, n.offset, o), n.offset + o;
|
|
983
983
|
}
|
|
984
984
|
case 9:
|
|
985
|
-
return
|
|
985
|
+
return r + rt(e, r);
|
|
986
986
|
case 10:
|
|
987
|
-
return
|
|
987
|
+
return r + st(e, r);
|
|
988
988
|
default:
|
|
989
989
|
throw new Error(`Unsupported Teleport type ${U[t]}`);
|
|
990
990
|
}
|
|
@@ -995,7 +995,7 @@ function ot(t) {
|
|
|
995
995
|
function G(t) {
|
|
996
996
|
return t instanceof Uint8Array ? t : new Uint8Array(t);
|
|
997
997
|
}
|
|
998
|
-
var ht = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(ht || {}), ct = /* @__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))(ct || {}), Et = /* @__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))(Et || {}), _t = /* @__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))(_t || {}), ut = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(ut || {}), ft = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(ft || {}), Tt = /* @__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))(Tt || {}), dt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(dt || {}), At = /* @__PURE__ */ ((t) => (t[t.Local = 0] = "Local", t[t.Cloud = 1] = "Cloud", t))(At || {}), St = /* @__PURE__ */ ((t) => (t[t.Bundle = 0] = "Bundle", t[t.GitSource = 1] = "GitSource", t))(St || {}), m = /* @__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.CORE_UPDATE_CLIENT_CONTEXT = 65558] = "CORE_UPDATE_CLIENT_CONTEXT", t[t.CORE_BACKGROUND_WORK_ACTIVE = 65559] = "CORE_BACKGROUND_WORK_ACTIVE", t[t.CORE_WEBRTC_OFFER = 65566] = "CORE_WEBRTC_OFFER", t[t.CORE_WEBRTC_ANSWER = 65567] = "CORE_WEBRTC_ANSWER", t[t.CORE_WEBRTC_ICE_CANDIDATE = 65568] = "CORE_WEBRTC_ICE_CANDIDATE", t[t.CORE_WEBRTC_READY = 65569] = "CORE_WEBRTC_READY", t[t.CORE_WEBRTC_AUDIO_SEGMENT = 65570] = "CORE_WEBRTC_AUDIO_SEGMENT", t[t.CORE_WEBRTC_TRACK_MAP = 65571] = "CORE_WEBRTC_TRACK_MAP", 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.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", t[t.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", t[t.ACTION_FILE_UPLOAD_PRE_START2 = 1048643] = "ACTION_FILE_UPLOAD_PRE_START2", t[t.ACTION_FILE_UPLOAD_PRE_START_RESPONSE2 = 1048644] = "ACTION_FILE_UPLOAD_PRE_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_START2 = 1048645] = "ACTION_FILE_UPLOAD_START2", t[t.ACTION_FILE_UPLOAD_START_RESPONSE2 = 1048646] = "ACTION_FILE_UPLOAD_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_DATA2 = 1048647] = "ACTION_FILE_UPLOAD_DATA2", t[t.ACTION_FILE_UPLOAD_ACK2 = 1048648] = "ACTION_FILE_UPLOAD_ACK2", t[t.ACTION_FILE_UPLOAD_END2 = 1048649] = "ACTION_FILE_UPLOAD_END2", t[t.ACTION_FILE_UPLOAD_COMPLETE2 = 1048650] = "ACTION_FILE_UPLOAD_COMPLETE2", 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))(m || {});
|
|
998
|
+
var ht = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(ht || {}), ct = /* @__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))(ct || {}), Et = /* @__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))(Et || {}), _t = /* @__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))(_t || {}), ut = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(ut || {}), ft = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(ft || {}), Tt = /* @__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))(Tt || {}), dt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(dt || {}), At = /* @__PURE__ */ ((t) => (t[t.Local = 0] = "Local", t[t.Cloud = 1] = "Cloud", t))(At || {}), St = /* @__PURE__ */ ((t) => (t[t.Bundle = 0] = "Bundle", t[t.GitSource = 1] = "GitSource", t))(St || {}), m = /* @__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.CORE_UPDATE_CLIENT_CONTEXT = 65558] = "CORE_UPDATE_CLIENT_CONTEXT", t[t.CORE_BACKGROUND_WORK_ACTIVE = 65559] = "CORE_BACKGROUND_WORK_ACTIVE", t[t.CORE_WEBRTC_OFFER = 65566] = "CORE_WEBRTC_OFFER", t[t.CORE_WEBRTC_ANSWER = 65567] = "CORE_WEBRTC_ANSWER", t[t.CORE_WEBRTC_ICE_CANDIDATE = 65568] = "CORE_WEBRTC_ICE_CANDIDATE", t[t.CORE_WEBRTC_READY = 65569] = "CORE_WEBRTC_READY", t[t.CORE_WEBRTC_AUDIO_SEGMENT = 65570] = "CORE_WEBRTC_AUDIO_SEGMENT", t[t.CORE_WEBRTC_TRACK_MAP = 65571] = "CORE_WEBRTC_TRACK_MAP", 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.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", t[t.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", t[t.ACTION_FILE_UPLOAD_PRE_START2 = 1048643] = "ACTION_FILE_UPLOAD_PRE_START2", t[t.ACTION_FILE_UPLOAD_PRE_START_RESPONSE2 = 1048644] = "ACTION_FILE_UPLOAD_PRE_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_START2 = 1048645] = "ACTION_FILE_UPLOAD_START2", t[t.ACTION_FILE_UPLOAD_START_RESPONSE2 = 1048646] = "ACTION_FILE_UPLOAD_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_DATA2 = 1048647] = "ACTION_FILE_UPLOAD_DATA2", t[t.ACTION_FILE_UPLOAD_ACK2 = 1048648] = "ACTION_FILE_UPLOAD_ACK2", t[t.ACTION_FILE_UPLOAD_END2 = 1048649] = "ACTION_FILE_UPLOAD_END2", t[t.ACTION_FILE_UPLOAD_COMPLETE2 = 1048650] = "ACTION_FILE_UPLOAD_COMPLETE2", t[t.ACTION_FUNCTION_ENUMERATION_ITEM_BATCH = 1048651] = "ACTION_FUNCTION_ENUMERATION_ITEM_BATCH", 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))(m || {});
|
|
999
999
|
const he = 161083277, ce = 265814330, Ee = 1368629611, _e = 2431514951, ue = 2745379226, fe = 3282782683, Te = 3284746250, de = 4101844078;
|
|
1000
1000
|
function yt(t) {
|
|
1001
1001
|
const e = {};
|
|
@@ -1005,63 +1005,63 @@ function Nt(t) {
|
|
|
1005
1005
|
return t.StreamId = "", t.Description = "", t.SourceType = "", t.Codec = ht.Unknown, t.CodecDetails = "", t.SampleRate = 0, t.Channels = 0, t.ShapeSets = void 0, t;
|
|
1006
1006
|
}
|
|
1007
1007
|
function Ae(t, e) {
|
|
1008
|
-
const
|
|
1009
|
-
return Nt(
|
|
1008
|
+
const r = e ?? yt();
|
|
1009
|
+
return Nt(r), Se(t, r), r;
|
|
1010
1010
|
}
|
|
1011
1011
|
function Se(t, e) {
|
|
1012
|
-
let
|
|
1013
|
-
for (; (
|
|
1014
|
-
switch (
|
|
1012
|
+
let r;
|
|
1013
|
+
for (; (r = t.next()) !== null; )
|
|
1014
|
+
switch (r.fieldId) {
|
|
1015
1015
|
case he: {
|
|
1016
|
-
if (
|
|
1017
|
-
e.StreamId =
|
|
1016
|
+
if (r.isNull) throw new Error();
|
|
1017
|
+
e.StreamId = r.asString();
|
|
1018
1018
|
break;
|
|
1019
1019
|
}
|
|
1020
1020
|
case ce: {
|
|
1021
|
-
if (
|
|
1021
|
+
if (r.isNull) {
|
|
1022
1022
|
e.ShapeSets = void 0;
|
|
1023
1023
|
break;
|
|
1024
1024
|
}
|
|
1025
|
-
e.ShapeSets = ye(
|
|
1025
|
+
e.ShapeSets = ye(r.asArray());
|
|
1026
1026
|
break;
|
|
1027
1027
|
}
|
|
1028
1028
|
case Ee: {
|
|
1029
|
-
if (
|
|
1030
|
-
e.Description =
|
|
1029
|
+
if (r.isNull) throw new Error();
|
|
1030
|
+
e.Description = r.asString();
|
|
1031
1031
|
break;
|
|
1032
1032
|
}
|
|
1033
1033
|
case _e: {
|
|
1034
|
-
if (
|
|
1035
|
-
e.Channels =
|
|
1034
|
+
if (r.isNull) throw new Error();
|
|
1035
|
+
e.Channels = r.asInt32();
|
|
1036
1036
|
break;
|
|
1037
1037
|
}
|
|
1038
1038
|
case ue: {
|
|
1039
|
-
if (
|
|
1040
|
-
e.CodecDetails =
|
|
1039
|
+
if (r.isNull) throw new Error();
|
|
1040
|
+
e.CodecDetails = r.asString();
|
|
1041
1041
|
break;
|
|
1042
1042
|
}
|
|
1043
1043
|
case fe: {
|
|
1044
|
-
if (
|
|
1045
|
-
e.SourceType =
|
|
1044
|
+
if (r.isNull) throw new Error();
|
|
1045
|
+
e.SourceType = r.asString();
|
|
1046
1046
|
break;
|
|
1047
1047
|
}
|
|
1048
1048
|
case Te: {
|
|
1049
|
-
if (
|
|
1050
|
-
e.Codec =
|
|
1049
|
+
if (r.isNull) throw new Error();
|
|
1050
|
+
e.Codec = r.asInt32();
|
|
1051
1051
|
break;
|
|
1052
1052
|
}
|
|
1053
1053
|
case de: {
|
|
1054
|
-
if (
|
|
1055
|
-
e.SampleRate =
|
|
1054
|
+
if (r.isNull) throw new Error();
|
|
1055
|
+
e.SampleRate = r.asInt32();
|
|
1056
1056
|
break;
|
|
1057
1057
|
}
|
|
1058
1058
|
}
|
|
1059
1059
|
}
|
|
1060
1060
|
function ye(t) {
|
|
1061
1061
|
const e = [];
|
|
1062
|
-
let
|
|
1063
|
-
for (; (
|
|
1064
|
-
e.push(De(
|
|
1062
|
+
let r;
|
|
1063
|
+
for (; (r = t.next()) !== null; )
|
|
1064
|
+
e.push(De(r.asObject()));
|
|
1065
1065
|
return e;
|
|
1066
1066
|
}
|
|
1067
1067
|
const Ne = 1107713536, we = 1154362099, Ce = 1185721362;
|
|
@@ -1073,370 +1073,370 @@ function wt(t) {
|
|
|
1073
1073
|
return t.SetId = 0, t.Name = "", t.ShapeNames = [], t;
|
|
1074
1074
|
}
|
|
1075
1075
|
function De(t, e) {
|
|
1076
|
-
const
|
|
1077
|
-
return wt(
|
|
1076
|
+
const r = e ?? Ue();
|
|
1077
|
+
return wt(r), Re(t, r), r;
|
|
1078
1078
|
}
|
|
1079
1079
|
function Re(t, e) {
|
|
1080
|
-
let
|
|
1081
|
-
for (; (
|
|
1082
|
-
switch (
|
|
1080
|
+
let r;
|
|
1081
|
+
for (; (r = t.next()) !== null; )
|
|
1082
|
+
switch (r.fieldId) {
|
|
1083
1083
|
case Ne: {
|
|
1084
|
-
if (
|
|
1085
|
-
e.Name =
|
|
1084
|
+
if (r.isNull) throw new Error();
|
|
1085
|
+
e.Name = r.asString();
|
|
1086
1086
|
break;
|
|
1087
1087
|
}
|
|
1088
1088
|
case we: {
|
|
1089
|
-
if (
|
|
1090
|
-
e.SetId =
|
|
1089
|
+
if (r.isNull) throw new Error();
|
|
1090
|
+
e.SetId = r.asUInt32();
|
|
1091
1091
|
break;
|
|
1092
1092
|
}
|
|
1093
1093
|
case Ce: {
|
|
1094
|
-
if (
|
|
1095
|
-
e.ShapeNames = Le(
|
|
1094
|
+
if (r.isNull) throw new Error();
|
|
1095
|
+
e.ShapeNames = Le(r.asArray());
|
|
1096
1096
|
break;
|
|
1097
1097
|
}
|
|
1098
1098
|
}
|
|
1099
1099
|
}
|
|
1100
1100
|
function Le(t) {
|
|
1101
1101
|
const e = [];
|
|
1102
|
-
let
|
|
1103
|
-
for (; (
|
|
1104
|
-
e.push(
|
|
1102
|
+
let r;
|
|
1103
|
+
for (; (r = t.next()) !== null; )
|
|
1104
|
+
e.push(r.asString());
|
|
1105
1105
|
return e;
|
|
1106
1106
|
}
|
|
1107
|
-
const me = 76337612, Oe = 185396121, ge = 250031587, be = 388632637, pe = 417197284, Pe = 469070965, Fe = 470595159, ke = 594855258,
|
|
1108
|
-
function
|
|
1107
|
+
const me = 76337612, Oe = 185396121, ge = 250031587, be = 388632637, pe = 417197284, Pe = 469070965, Fe = 470595159, ke = 594855258, Me = 781727218, ve = 834078886, Ve = 1043273762, Be = 1236999138, Ge = 1286979607, xe = 1368629611, He = 1715899485, We = 1942830531, Ke = 1999510636, Ye = 2033288346, $e = 2079864626, je = 2142346422, Xe = 2232517119, ze = 2598291686, Je = 2719718823, qe = 2810953526, Qe = 2840065720, Ze = 2885165957, tr = 3542818975, er = 3586157513, rr = 3717933110, sr = 4062655306;
|
|
1108
|
+
function ir(t) {
|
|
1109
1109
|
const e = {};
|
|
1110
1110
|
return Ct(e), e;
|
|
1111
1111
|
}
|
|
1112
1112
|
function Ct(t) {
|
|
1113
1113
|
return t.ContextType = Et.Unknown, t.UserType = ft.Unknown, t.PayloadType = _t.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 = ct.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = dt.Unknown, t.ViewportWidth = 0, t.ViewportHeight = 0, t.Theme = "", t.Timezone = "", t.IsTouchDevice = !1, t.InitialPath = "", t;
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1116
|
-
const
|
|
1117
|
-
return Ct(
|
|
1115
|
+
function nr(t, e) {
|
|
1116
|
+
const r = e ?? ir();
|
|
1117
|
+
return Ct(r), or(t, r), r;
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1120
|
-
let
|
|
1121
|
-
for (; (
|
|
1122
|
-
switch (
|
|
1119
|
+
function or(t, e) {
|
|
1120
|
+
let r;
|
|
1121
|
+
for (; (r = t.next()) !== null; )
|
|
1122
|
+
switch (r.fieldId) {
|
|
1123
1123
|
case me: {
|
|
1124
|
-
if (
|
|
1125
|
-
e.DeviceId =
|
|
1124
|
+
if (r.isNull) throw new Error();
|
|
1125
|
+
e.DeviceId = r.asString();
|
|
1126
1126
|
break;
|
|
1127
1127
|
}
|
|
1128
1128
|
case Oe: {
|
|
1129
|
-
if (
|
|
1130
|
-
e.InstallId =
|
|
1129
|
+
if (r.isNull) throw new Error();
|
|
1130
|
+
e.InstallId = r.asString();
|
|
1131
1131
|
break;
|
|
1132
1132
|
}
|
|
1133
1133
|
case ge: {
|
|
1134
|
-
if (
|
|
1135
|
-
e.Theme =
|
|
1134
|
+
if (r.isNull) throw new Error();
|
|
1135
|
+
e.Theme = r.asString();
|
|
1136
1136
|
break;
|
|
1137
1137
|
}
|
|
1138
1138
|
case be: {
|
|
1139
|
-
if (
|
|
1140
|
-
e.UserAgent =
|
|
1139
|
+
if (r.isNull) throw new Error();
|
|
1140
|
+
e.UserAgent = r.asString();
|
|
1141
1141
|
break;
|
|
1142
1142
|
}
|
|
1143
1143
|
case pe: {
|
|
1144
|
-
if (
|
|
1145
|
-
e.ContextType =
|
|
1144
|
+
if (r.isNull) throw new Error();
|
|
1145
|
+
e.ContextType = r.asInt32();
|
|
1146
1146
|
break;
|
|
1147
1147
|
}
|
|
1148
1148
|
case Pe: {
|
|
1149
|
-
if (
|
|
1150
|
-
e.HasInput =
|
|
1149
|
+
if (r.isNull) throw new Error();
|
|
1150
|
+
e.HasInput = r.asBool();
|
|
1151
1151
|
break;
|
|
1152
1152
|
}
|
|
1153
1153
|
case Fe: {
|
|
1154
|
-
if (
|
|
1155
|
-
e.UserType =
|
|
1154
|
+
if (r.isNull) throw new Error();
|
|
1155
|
+
e.UserType = r.asInt32();
|
|
1156
1156
|
break;
|
|
1157
1157
|
}
|
|
1158
1158
|
case ke: {
|
|
1159
|
-
if (
|
|
1160
|
-
e.InitialPath =
|
|
1159
|
+
if (r.isNull) throw new Error();
|
|
1160
|
+
e.InitialPath = r.asString();
|
|
1161
1161
|
break;
|
|
1162
1162
|
}
|
|
1163
|
-
case
|
|
1164
|
-
if (
|
|
1165
|
-
e.UserId =
|
|
1163
|
+
case Me: {
|
|
1164
|
+
if (r.isNull) throw new Error();
|
|
1165
|
+
e.UserId = r.asString();
|
|
1166
1166
|
break;
|
|
1167
1167
|
}
|
|
1168
1168
|
case ve: {
|
|
1169
|
-
if (
|
|
1170
|
-
e.ProductId =
|
|
1169
|
+
if (r.isNull) throw new Error();
|
|
1170
|
+
e.ProductId = r.asString();
|
|
1171
1171
|
break;
|
|
1172
1172
|
}
|
|
1173
|
-
case
|
|
1174
|
-
if (
|
|
1175
|
-
e.AuthSessionId =
|
|
1173
|
+
case Ve: {
|
|
1174
|
+
if (r.isNull) throw new Error();
|
|
1175
|
+
e.AuthSessionId = r.asString();
|
|
1176
1176
|
break;
|
|
1177
1177
|
}
|
|
1178
1178
|
case Be: {
|
|
1179
|
-
if (
|
|
1180
|
-
e.ReceiveAllMessages =
|
|
1179
|
+
if (r.isNull) throw new Error();
|
|
1180
|
+
e.ReceiveAllMessages = r.asBool();
|
|
1181
1181
|
break;
|
|
1182
1182
|
}
|
|
1183
1183
|
case Ge: {
|
|
1184
|
-
if (
|
|
1185
|
-
e.ViewportHeight =
|
|
1184
|
+
if (r.isNull) throw new Error();
|
|
1185
|
+
e.ViewportHeight = r.asInt32();
|
|
1186
1186
|
break;
|
|
1187
1187
|
}
|
|
1188
1188
|
case xe: {
|
|
1189
|
-
if (
|
|
1190
|
-
e.Description =
|
|
1189
|
+
if (r.isNull) throw new Error();
|
|
1190
|
+
e.Description = r.asString();
|
|
1191
1191
|
break;
|
|
1192
1192
|
}
|
|
1193
1193
|
case He: {
|
|
1194
|
-
if (
|
|
1195
|
-
e.Locale =
|
|
1194
|
+
if (r.isNull) throw new Error();
|
|
1195
|
+
e.Locale = r.asString();
|
|
1196
1196
|
break;
|
|
1197
1197
|
}
|
|
1198
1198
|
case We: {
|
|
1199
|
-
if (
|
|
1200
|
-
e.SdkType =
|
|
1199
|
+
if (r.isNull) throw new Error();
|
|
1200
|
+
e.SdkType = r.asInt32();
|
|
1201
1201
|
break;
|
|
1202
1202
|
}
|
|
1203
1203
|
case Ke: {
|
|
1204
|
-
if (
|
|
1205
|
-
e.SessionId =
|
|
1204
|
+
if (r.isNull) throw new Error();
|
|
1205
|
+
e.SessionId = r.asInt32();
|
|
1206
1206
|
break;
|
|
1207
1207
|
}
|
|
1208
1208
|
case Ye: {
|
|
1209
|
-
if (
|
|
1210
|
-
e.ViewportWidth =
|
|
1209
|
+
if (r.isNull) throw new Error();
|
|
1210
|
+
e.ViewportWidth = r.asInt32();
|
|
1211
1211
|
break;
|
|
1212
1212
|
}
|
|
1213
1213
|
case $e: {
|
|
1214
|
-
if (
|
|
1215
|
-
e.PreciseJoinedAt =
|
|
1214
|
+
if (r.isNull) throw new Error();
|
|
1215
|
+
e.PreciseJoinedAt = r.asUInt64();
|
|
1216
1216
|
break;
|
|
1217
1217
|
}
|
|
1218
1218
|
case je: {
|
|
1219
|
-
if (
|
|
1220
|
-
e.PayloadType =
|
|
1219
|
+
if (r.isNull) throw new Error();
|
|
1220
|
+
e.PayloadType = r.asInt32();
|
|
1221
1221
|
break;
|
|
1222
1222
|
}
|
|
1223
1223
|
case Xe: {
|
|
1224
|
-
if (
|
|
1225
|
-
e.IsTouchDevice =
|
|
1224
|
+
if (r.isNull) throw new Error();
|
|
1225
|
+
e.IsTouchDevice = r.asBool();
|
|
1226
1226
|
break;
|
|
1227
1227
|
}
|
|
1228
1228
|
case ze: {
|
|
1229
|
-
if (
|
|
1230
|
-
e.VersionId =
|
|
1229
|
+
if (r.isNull) throw new Error();
|
|
1230
|
+
e.VersionId = r.asString();
|
|
1231
1231
|
break;
|
|
1232
1232
|
}
|
|
1233
1233
|
case Je: {
|
|
1234
|
-
if (
|
|
1235
|
-
e.UniqueSessionId =
|
|
1234
|
+
if (r.isNull) throw new Error();
|
|
1235
|
+
e.UniqueSessionId = r.asString();
|
|
1236
1236
|
break;
|
|
1237
1237
|
}
|
|
1238
1238
|
case qe: {
|
|
1239
|
-
if (
|
|
1240
|
-
e.ClientType =
|
|
1239
|
+
if (r.isNull) throw new Error();
|
|
1240
|
+
e.ClientType = r.asInt32();
|
|
1241
1241
|
break;
|
|
1242
1242
|
}
|
|
1243
1243
|
case Qe: {
|
|
1244
|
-
if (
|
|
1245
|
-
e.IsReady =
|
|
1244
|
+
if (r.isNull) throw new Error();
|
|
1245
|
+
e.IsReady = r.asBool();
|
|
1246
1246
|
break;
|
|
1247
1247
|
}
|
|
1248
1248
|
case Ze: {
|
|
1249
|
-
if (
|
|
1250
|
-
e.Parameters =
|
|
1249
|
+
if (r.isNull) throw new Error();
|
|
1250
|
+
e.Parameters = ar(r.asDictionary());
|
|
1251
1251
|
break;
|
|
1252
1252
|
}
|
|
1253
|
-
case
|
|
1254
|
-
if (
|
|
1255
|
-
e.Timezone =
|
|
1253
|
+
case tr: {
|
|
1254
|
+
if (r.isNull) throw new Error();
|
|
1255
|
+
e.Timezone = r.asString();
|
|
1256
1256
|
break;
|
|
1257
1257
|
}
|
|
1258
|
-
case
|
|
1259
|
-
if (
|
|
1260
|
-
e.IsInternal =
|
|
1258
|
+
case er: {
|
|
1259
|
+
if (r.isNull) throw new Error();
|
|
1260
|
+
e.IsInternal = r.asBool();
|
|
1261
1261
|
break;
|
|
1262
1262
|
}
|
|
1263
|
-
case
|
|
1264
|
-
if (
|
|
1265
|
-
e.ChannelLocale =
|
|
1263
|
+
case rr: {
|
|
1264
|
+
if (r.isNull) throw new Error();
|
|
1265
|
+
e.ChannelLocale = r.asString();
|
|
1266
1266
|
break;
|
|
1267
1267
|
}
|
|
1268
|
-
case
|
|
1269
|
-
if (
|
|
1270
|
-
e.EmbeddedSpaceId =
|
|
1268
|
+
case sr: {
|
|
1269
|
+
if (r.isNull) throw new Error();
|
|
1270
|
+
e.EmbeddedSpaceId = r.asString();
|
|
1271
1271
|
break;
|
|
1272
1272
|
}
|
|
1273
1273
|
}
|
|
1274
1274
|
}
|
|
1275
|
-
function
|
|
1275
|
+
function ar(t) {
|
|
1276
1276
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1277
|
-
let
|
|
1278
|
-
for (; (
|
|
1279
|
-
const
|
|
1280
|
-
e[
|
|
1277
|
+
let r;
|
|
1278
|
+
for (; (r = t.next()) !== null; ) {
|
|
1279
|
+
const s = r.key.asString();
|
|
1280
|
+
e[s] = r.value.asString();
|
|
1281
1281
|
}
|
|
1282
1282
|
return e;
|
|
1283
1283
|
}
|
|
1284
|
-
const
|
|
1285
|
-
function
|
|
1284
|
+
const lr = 703025676, Ir = 814454131, hr = 972460562, cr = 976255570, Er = 1368629611, _r = 1479280922, ur = 1533537016, fr = 1909301063, Tr = 2274386296, dr = 2603556958, Ar = 2885165957, Sr = 3568439632;
|
|
1285
|
+
function yr(t) {
|
|
1286
1286
|
const e = {};
|
|
1287
1287
|
return Ut(e), e;
|
|
1288
1288
|
}
|
|
1289
1289
|
function Ut(t) {
|
|
1290
1290
|
return t.FunctionId = T.fromBytes(new Uint8Array(16)), t.FunctionName = "", t.Parameters = [], t.ResultTypeName = "", t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.IsCancellable = !1, t.Description = "", t.LlmInlineResult = !1, t.LlmCallOnlyOnce = !1, t.RequiresInstance = !1, t.Versions = [], t;
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1293
|
-
const
|
|
1294
|
-
return Ut(
|
|
1292
|
+
function Nr(t, e) {
|
|
1293
|
+
const r = e ?? yr();
|
|
1294
|
+
return Ut(r), wr(t, r), r;
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1297
|
-
let
|
|
1298
|
-
for (; (
|
|
1299
|
-
switch (
|
|
1300
|
-
case
|
|
1301
|
-
if (
|
|
1302
|
-
e.ResultTypeName =
|
|
1296
|
+
function wr(t, e) {
|
|
1297
|
+
let r;
|
|
1298
|
+
for (; (r = t.next()) !== null; )
|
|
1299
|
+
switch (r.fieldId) {
|
|
1300
|
+
case lr: {
|
|
1301
|
+
if (r.isNull) throw new Error();
|
|
1302
|
+
e.ResultTypeName = r.asString();
|
|
1303
1303
|
break;
|
|
1304
1304
|
}
|
|
1305
|
-
case
|
|
1306
|
-
if (
|
|
1307
|
-
e.FunctionName =
|
|
1305
|
+
case Ir: {
|
|
1306
|
+
if (r.isNull) throw new Error();
|
|
1307
|
+
e.FunctionName = r.asString();
|
|
1308
1308
|
break;
|
|
1309
1309
|
}
|
|
1310
|
-
case
|
|
1311
|
-
if (
|
|
1312
|
-
e.EnumerableItemTypeName =
|
|
1310
|
+
case hr: {
|
|
1311
|
+
if (r.isNull) throw new Error();
|
|
1312
|
+
e.EnumerableItemTypeName = r.asString();
|
|
1313
1313
|
break;
|
|
1314
1314
|
}
|
|
1315
|
-
case
|
|
1316
|
-
if (
|
|
1317
|
-
e.FunctionId =
|
|
1315
|
+
case cr: {
|
|
1316
|
+
if (r.isNull) throw new Error();
|
|
1317
|
+
e.FunctionId = r.asGuid();
|
|
1318
1318
|
break;
|
|
1319
1319
|
}
|
|
1320
|
-
case
|
|
1321
|
-
if (
|
|
1322
|
-
e.Description =
|
|
1320
|
+
case Er: {
|
|
1321
|
+
if (r.isNull) throw new Error();
|
|
1322
|
+
e.Description = r.asString();
|
|
1323
1323
|
break;
|
|
1324
1324
|
}
|
|
1325
|
-
case
|
|
1326
|
-
if (
|
|
1327
|
-
e.IsCancellable =
|
|
1325
|
+
case _r: {
|
|
1326
|
+
if (r.isNull) throw new Error();
|
|
1327
|
+
e.IsCancellable = r.asBool();
|
|
1328
1328
|
break;
|
|
1329
1329
|
}
|
|
1330
|
-
case
|
|
1331
|
-
if (
|
|
1332
|
-
e.RequiresInstance =
|
|
1330
|
+
case ur: {
|
|
1331
|
+
if (r.isNull) throw new Error();
|
|
1332
|
+
e.RequiresInstance = r.asBool();
|
|
1333
1333
|
break;
|
|
1334
1334
|
}
|
|
1335
|
-
case
|
|
1336
|
-
if (
|
|
1337
|
-
e.Versions =
|
|
1335
|
+
case fr: {
|
|
1336
|
+
if (r.isNull) throw new Error();
|
|
1337
|
+
e.Versions = Cr(r.asArray());
|
|
1338
1338
|
break;
|
|
1339
1339
|
}
|
|
1340
|
-
case
|
|
1341
|
-
if (
|
|
1342
|
-
e.LlmInlineResult =
|
|
1340
|
+
case Tr: {
|
|
1341
|
+
if (r.isNull) throw new Error();
|
|
1342
|
+
e.LlmInlineResult = r.asBool();
|
|
1343
1343
|
break;
|
|
1344
1344
|
}
|
|
1345
|
-
case
|
|
1346
|
-
if (
|
|
1347
|
-
e.IsEnumerable =
|
|
1345
|
+
case dr: {
|
|
1346
|
+
if (r.isNull) throw new Error();
|
|
1347
|
+
e.IsEnumerable = r.asBool();
|
|
1348
1348
|
break;
|
|
1349
1349
|
}
|
|
1350
|
-
case
|
|
1351
|
-
if (
|
|
1352
|
-
e.Parameters =
|
|
1350
|
+
case Ar: {
|
|
1351
|
+
if (r.isNull) throw new Error();
|
|
1352
|
+
e.Parameters = Ur(r.asArray());
|
|
1353
1353
|
break;
|
|
1354
1354
|
}
|
|
1355
|
-
case
|
|
1356
|
-
if (
|
|
1357
|
-
e.LlmCallOnlyOnce =
|
|
1355
|
+
case Sr: {
|
|
1356
|
+
if (r.isNull) throw new Error();
|
|
1357
|
+
e.LlmCallOnlyOnce = r.asBool();
|
|
1358
1358
|
break;
|
|
1359
1359
|
}
|
|
1360
1360
|
}
|
|
1361
1361
|
}
|
|
1362
|
-
function
|
|
1362
|
+
function Cr(t) {
|
|
1363
1363
|
const e = [];
|
|
1364
|
-
let
|
|
1365
|
-
for (; (
|
|
1366
|
-
e.push(
|
|
1364
|
+
let r;
|
|
1365
|
+
for (; (r = t.next()) !== null; )
|
|
1366
|
+
e.push(r.asString());
|
|
1367
1367
|
return e;
|
|
1368
1368
|
}
|
|
1369
|
-
function
|
|
1369
|
+
function Ur(t) {
|
|
1370
1370
|
const e = [];
|
|
1371
|
-
let
|
|
1372
|
-
for (; (
|
|
1373
|
-
e.push(
|
|
1371
|
+
let r;
|
|
1372
|
+
for (; (r = t.next()) !== null; )
|
|
1373
|
+
e.push(kr(r.asObject()));
|
|
1374
1374
|
return e;
|
|
1375
1375
|
}
|
|
1376
|
-
const
|
|
1377
|
-
function
|
|
1376
|
+
const Dr = 607861992, Rr = 894485888, Lr = 972460562, mr = 1368629611, Or = 1883521406, gr = 2603556958, br = 3609695522, pr = 4075263697, Pr = 4257460908;
|
|
1377
|
+
function Fr(t) {
|
|
1378
1378
|
const e = {};
|
|
1379
1379
|
return Dt(e), e;
|
|
1380
1380
|
}
|
|
1381
1381
|
function Dt(t) {
|
|
1382
1382
|
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;
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1385
|
-
const
|
|
1386
|
-
return Dt(
|
|
1384
|
+
function kr(t, e) {
|
|
1385
|
+
const r = e ?? Fr();
|
|
1386
|
+
return Dt(r), Mr(t, r), r;
|
|
1387
1387
|
}
|
|
1388
|
-
function
|
|
1389
|
-
let
|
|
1390
|
-
for (; (
|
|
1391
|
-
switch (
|
|
1392
|
-
case
|
|
1393
|
-
if (
|
|
1394
|
-
e.HasDefaultValue =
|
|
1388
|
+
function Mr(t, e) {
|
|
1389
|
+
let r;
|
|
1390
|
+
for (; (r = t.next()) !== null; )
|
|
1391
|
+
switch (r.fieldId) {
|
|
1392
|
+
case Dr: {
|
|
1393
|
+
if (r.isNull) throw new Error();
|
|
1394
|
+
e.HasDefaultValue = r.asBool();
|
|
1395
1395
|
break;
|
|
1396
1396
|
}
|
|
1397
|
-
case
|
|
1398
|
-
if (
|
|
1399
|
-
e.DefaultValueJson =
|
|
1397
|
+
case Rr: {
|
|
1398
|
+
if (r.isNull) throw new Error();
|
|
1399
|
+
e.DefaultValueJson = r.asString();
|
|
1400
1400
|
break;
|
|
1401
1401
|
}
|
|
1402
|
-
case
|
|
1403
|
-
if (
|
|
1404
|
-
e.EnumerableItemTypeName =
|
|
1402
|
+
case Lr: {
|
|
1403
|
+
if (r.isNull) throw new Error();
|
|
1404
|
+
e.EnumerableItemTypeName = r.asString();
|
|
1405
1405
|
break;
|
|
1406
1406
|
}
|
|
1407
|
-
case
|
|
1408
|
-
if (
|
|
1409
|
-
e.Description =
|
|
1407
|
+
case mr: {
|
|
1408
|
+
if (r.isNull) throw new Error();
|
|
1409
|
+
e.Description = r.asString();
|
|
1410
1410
|
break;
|
|
1411
1411
|
}
|
|
1412
|
-
case
|
|
1413
|
-
if (
|
|
1414
|
-
e.DefaultValueData =
|
|
1412
|
+
case Or: {
|
|
1413
|
+
if (r.isNull) throw new Error();
|
|
1414
|
+
e.DefaultValueData = r.asBinary();
|
|
1415
1415
|
break;
|
|
1416
1416
|
}
|
|
1417
|
-
case
|
|
1418
|
-
if (
|
|
1419
|
-
e.IsEnumerable =
|
|
1417
|
+
case gr: {
|
|
1418
|
+
if (r.isNull) throw new Error();
|
|
1419
|
+
e.IsEnumerable = r.asBool();
|
|
1420
1420
|
break;
|
|
1421
1421
|
}
|
|
1422
|
-
case
|
|
1423
|
-
if (
|
|
1424
|
-
e.TypeName =
|
|
1422
|
+
case br: {
|
|
1423
|
+
if (r.isNull) throw new Error();
|
|
1424
|
+
e.TypeName = r.asString();
|
|
1425
1425
|
break;
|
|
1426
1426
|
}
|
|
1427
|
-
case
|
|
1428
|
-
if (
|
|
1429
|
-
e.ParameterName =
|
|
1427
|
+
case pr: {
|
|
1428
|
+
if (r.isNull) throw new Error();
|
|
1429
|
+
e.ParameterName = r.asString();
|
|
1430
1430
|
break;
|
|
1431
1431
|
}
|
|
1432
|
-
case
|
|
1433
|
-
if (
|
|
1434
|
-
e.ParameterIndex =
|
|
1432
|
+
case Pr: {
|
|
1433
|
+
if (r.isNull) throw new Error();
|
|
1434
|
+
e.ParameterIndex = r.asInt32();
|
|
1435
1435
|
break;
|
|
1436
1436
|
}
|
|
1437
1437
|
}
|
|
1438
1438
|
}
|
|
1439
|
-
const
|
|
1439
|
+
const vr = 3167053791, Vr = 3342364356, Br = 3612929027;
|
|
1440
1440
|
function Rt(t) {
|
|
1441
1441
|
const e = {};
|
|
1442
1442
|
return Lt(e), e;
|
|
@@ -1444,39 +1444,39 @@ function Rt(t) {
|
|
|
1444
1444
|
function Lt(t) {
|
|
1445
1445
|
return t.Category = "", t.Type = ut.Face, t.FaceBlendshapes = [], t;
|
|
1446
1446
|
}
|
|
1447
|
-
function
|
|
1448
|
-
const
|
|
1449
|
-
return Lt(
|
|
1447
|
+
function Gr(t, e) {
|
|
1448
|
+
const r = e ?? Rt();
|
|
1449
|
+
return Lt(r), xr(t, r), r;
|
|
1450
1450
|
}
|
|
1451
|
-
function
|
|
1452
|
-
let
|
|
1453
|
-
for (; (
|
|
1454
|
-
switch (
|
|
1455
|
-
case
|
|
1456
|
-
if (
|
|
1457
|
-
e.Type =
|
|
1451
|
+
function xr(t, e) {
|
|
1452
|
+
let r;
|
|
1453
|
+
for (; (r = t.next()) !== null; )
|
|
1454
|
+
switch (r.fieldId) {
|
|
1455
|
+
case vr: {
|
|
1456
|
+
if (r.isNull) throw new Error();
|
|
1457
|
+
e.Type = r.asInt32();
|
|
1458
1458
|
break;
|
|
1459
1459
|
}
|
|
1460
|
-
case
|
|
1461
|
-
if (
|
|
1462
|
-
e.FaceBlendshapes =
|
|
1460
|
+
case Vr: {
|
|
1461
|
+
if (r.isNull) throw new Error();
|
|
1462
|
+
e.FaceBlendshapes = Hr(r.asArray());
|
|
1463
1463
|
break;
|
|
1464
1464
|
}
|
|
1465
|
-
case
|
|
1466
|
-
if (
|
|
1467
|
-
e.Category =
|
|
1465
|
+
case Br: {
|
|
1466
|
+
if (r.isNull) throw new Error();
|
|
1467
|
+
e.Category = r.asString();
|
|
1468
1468
|
break;
|
|
1469
1469
|
}
|
|
1470
1470
|
}
|
|
1471
1471
|
}
|
|
1472
|
-
function
|
|
1472
|
+
function Hr(t) {
|
|
1473
1473
|
const e = [];
|
|
1474
|
-
let
|
|
1475
|
-
for (; (
|
|
1476
|
-
e.push(
|
|
1474
|
+
let r;
|
|
1475
|
+
for (; (r = t.next()) !== null; )
|
|
1476
|
+
e.push(r.asString());
|
|
1477
1477
|
return e;
|
|
1478
1478
|
}
|
|
1479
|
-
const
|
|
1479
|
+
const Wr = 3612929027;
|
|
1480
1480
|
function mt(t) {
|
|
1481
1481
|
const e = {};
|
|
1482
1482
|
return Ot(e), e;
|
|
@@ -1484,22 +1484,22 @@ function mt(t) {
|
|
|
1484
1484
|
function Ot(t) {
|
|
1485
1485
|
return t.Category = "", t;
|
|
1486
1486
|
}
|
|
1487
|
-
function
|
|
1488
|
-
const
|
|
1489
|
-
return Ot(
|
|
1487
|
+
function Kr(t, e) {
|
|
1488
|
+
const r = e ?? mt();
|
|
1489
|
+
return Ot(r), Yr(t, r), r;
|
|
1490
1490
|
}
|
|
1491
|
-
function
|
|
1492
|
-
let
|
|
1493
|
-
for (; (
|
|
1494
|
-
switch (
|
|
1495
|
-
case
|
|
1496
|
-
if (
|
|
1497
|
-
e.Category =
|
|
1491
|
+
function Yr(t, e) {
|
|
1492
|
+
let r;
|
|
1493
|
+
for (; (r = t.next()) !== null; )
|
|
1494
|
+
switch (r.fieldId) {
|
|
1495
|
+
case Wr: {
|
|
1496
|
+
if (r.isNull) throw new Error();
|
|
1497
|
+
e.Category = r.asString();
|
|
1498
1498
|
break;
|
|
1499
1499
|
}
|
|
1500
1500
|
}
|
|
1501
1501
|
}
|
|
1502
|
-
const $
|
|
1502
|
+
const $r = 161083277, jr = 164808083, Xr = 1368629611, zr = 2745379226, Jr = 2950031986, qr = 3282782683, Qr = 3284746250, Zr = 4065070594;
|
|
1503
1503
|
function gt(t) {
|
|
1504
1504
|
const e = {};
|
|
1505
1505
|
return bt(e), e;
|
|
@@ -1507,321 +1507,321 @@ function gt(t) {
|
|
|
1507
1507
|
function bt(t) {
|
|
1508
1508
|
return t.StreamId = "", t.Description = "", t.SourceType = "", t.Codec = Tt.H264, t.CodecDetails = "", t.Width = 0, t.Height = 0, t.Framerate = 30, t;
|
|
1509
1509
|
}
|
|
1510
|
-
function
|
|
1511
|
-
const
|
|
1512
|
-
return bt(
|
|
1510
|
+
function ts(t, e) {
|
|
1511
|
+
const r = e ?? gt();
|
|
1512
|
+
return bt(r), es(t, r), r;
|
|
1513
1513
|
}
|
|
1514
|
-
function
|
|
1515
|
-
let
|
|
1516
|
-
for (; (
|
|
1517
|
-
switch (
|
|
1518
|
-
case $
|
|
1519
|
-
if (
|
|
1520
|
-
e.StreamId =
|
|
1514
|
+
function es(t, e) {
|
|
1515
|
+
let r;
|
|
1516
|
+
for (; (r = t.next()) !== null; )
|
|
1517
|
+
switch (r.fieldId) {
|
|
1518
|
+
case $r: {
|
|
1519
|
+
if (r.isNull) throw new Error();
|
|
1520
|
+
e.StreamId = r.asString();
|
|
1521
1521
|
break;
|
|
1522
1522
|
}
|
|
1523
|
-
case
|
|
1524
|
-
if (
|
|
1525
|
-
e.Framerate =
|
|
1523
|
+
case jr: {
|
|
1524
|
+
if (r.isNull) throw new Error();
|
|
1525
|
+
e.Framerate = r.asFloat64();
|
|
1526
1526
|
break;
|
|
1527
1527
|
}
|
|
1528
|
-
case
|
|
1529
|
-
if (
|
|
1530
|
-
e.Description =
|
|
1528
|
+
case Xr: {
|
|
1529
|
+
if (r.isNull) throw new Error();
|
|
1530
|
+
e.Description = r.asString();
|
|
1531
1531
|
break;
|
|
1532
1532
|
}
|
|
1533
|
-
case
|
|
1534
|
-
if (
|
|
1535
|
-
e.CodecDetails =
|
|
1533
|
+
case zr: {
|
|
1534
|
+
if (r.isNull) throw new Error();
|
|
1535
|
+
e.CodecDetails = r.asString();
|
|
1536
1536
|
break;
|
|
1537
1537
|
}
|
|
1538
|
-
case
|
|
1539
|
-
if (
|
|
1540
|
-
e.Height =
|
|
1538
|
+
case Jr: {
|
|
1539
|
+
if (r.isNull) throw new Error();
|
|
1540
|
+
e.Height = r.asInt32();
|
|
1541
1541
|
break;
|
|
1542
1542
|
}
|
|
1543
|
-
case
|
|
1544
|
-
if (
|
|
1545
|
-
e.SourceType =
|
|
1543
|
+
case qr: {
|
|
1544
|
+
if (r.isNull) throw new Error();
|
|
1545
|
+
e.SourceType = r.asString();
|
|
1546
1546
|
break;
|
|
1547
1547
|
}
|
|
1548
|
-
case
|
|
1549
|
-
if (
|
|
1550
|
-
e.Codec =
|
|
1548
|
+
case Qr: {
|
|
1549
|
+
if (r.isNull) throw new Error();
|
|
1550
|
+
e.Codec = r.asInt32();
|
|
1551
1551
|
break;
|
|
1552
1552
|
}
|
|
1553
|
-
case
|
|
1554
|
-
if (
|
|
1555
|
-
e.Width =
|
|
1553
|
+
case Zr: {
|
|
1554
|
+
if (r.isNull) throw new Error();
|
|
1555
|
+
e.Width = r.asInt32();
|
|
1556
1556
|
break;
|
|
1557
1557
|
}
|
|
1558
1558
|
}
|
|
1559
1559
|
}
|
|
1560
|
-
const
|
|
1561
|
-
function
|
|
1560
|
+
const rs = 65539, ss = 693643444, is = 1144553441, ns = 1497620243, os = 1559330978, as = 1976546434, ls = 1999510636, Is = 2271236852, hs = 2277643855, cs = 2469008121, Es = 3042922213, _s = 3064612128, us = 3219210453, fs = 3504054055, Ts = 3678477544, ds = 3696445035, As = 3707543140, Ss = 3712281496, ys = 3895362455, Ns = 3897397815, ws = 4225107827;
|
|
1561
|
+
function Cs(t) {
|
|
1562
1562
|
const e = {};
|
|
1563
1563
|
return pt(e), e;
|
|
1564
1564
|
}
|
|
1565
1565
|
function pt(t) {
|
|
1566
1566
|
return t.Clients = /* @__PURE__ */ Object.create(null), t.Functions = /* @__PURE__ */ Object.create(null), t.UIStreams = /* @__PURE__ */ Object.create(null), t.AudioStreams = /* @__PURE__ */ Object.create(null), t.VideoStreams = /* @__PURE__ */ Object.create(null), t.TrackingStreams = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.SessionId = "", t.ChannelUrl = "", t.SessionChannelUrl = "", t.FirstUserId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.ServerRunType = At.Local, t.AppSourceType = St.Bundle, t.PublicAccess = !1, t.DebugMode = !1, t;
|
|
1567
1567
|
}
|
|
1568
|
-
function
|
|
1569
|
-
const
|
|
1570
|
-
return
|
|
1568
|
+
function Us(t, e) {
|
|
1569
|
+
const r = g.create(t);
|
|
1570
|
+
return Ds(r, e);
|
|
1571
1571
|
}
|
|
1572
|
-
function
|
|
1573
|
-
const
|
|
1574
|
-
return pt(
|
|
1572
|
+
function Ds(t, e) {
|
|
1573
|
+
const r = e ?? Cs();
|
|
1574
|
+
return pt(r), Rs(t, r), r;
|
|
1575
1575
|
}
|
|
1576
|
-
function
|
|
1577
|
-
let
|
|
1578
|
-
for (; (
|
|
1579
|
-
switch (
|
|
1580
|
-
case
|
|
1581
|
-
if (
|
|
1582
|
-
e.FirstUserId =
|
|
1576
|
+
function Rs(t, e) {
|
|
1577
|
+
let r;
|
|
1578
|
+
for (; (r = t.next()) !== null; )
|
|
1579
|
+
switch (r.fieldId) {
|
|
1580
|
+
case ss: {
|
|
1581
|
+
if (r.isNull) throw new Error();
|
|
1582
|
+
e.FirstUserId = r.asString();
|
|
1583
1583
|
break;
|
|
1584
1584
|
}
|
|
1585
|
-
case
|
|
1586
|
-
if (
|
|
1587
|
-
e.Clients =
|
|
1585
|
+
case is: {
|
|
1586
|
+
if (r.isNull) throw new Error();
|
|
1587
|
+
e.Clients = ms(r.asDictionary());
|
|
1588
1588
|
break;
|
|
1589
1589
|
}
|
|
1590
|
-
case
|
|
1591
|
-
if (
|
|
1592
|
-
e.TrackingStreams =
|
|
1590
|
+
case ns: {
|
|
1591
|
+
if (r.isNull) throw new Error();
|
|
1592
|
+
e.TrackingStreams = Os(r.asDictionary());
|
|
1593
1593
|
break;
|
|
1594
1594
|
}
|
|
1595
|
-
case
|
|
1596
|
-
if (
|
|
1597
|
-
e.ChannelId =
|
|
1595
|
+
case os: {
|
|
1596
|
+
if (r.isNull) throw new Error();
|
|
1597
|
+
e.ChannelId = r.asString();
|
|
1598
1598
|
break;
|
|
1599
1599
|
}
|
|
1600
|
-
case
|
|
1601
|
-
if (
|
|
1602
|
-
e.AppSourceType =
|
|
1600
|
+
case as: {
|
|
1601
|
+
if (r.isNull) throw new Error();
|
|
1602
|
+
e.AppSourceType = r.asInt32();
|
|
1603
1603
|
break;
|
|
1604
1604
|
}
|
|
1605
|
-
case
|
|
1606
|
-
if (
|
|
1607
|
-
e.SessionId =
|
|
1605
|
+
case ls: {
|
|
1606
|
+
if (r.isNull) throw new Error();
|
|
1607
|
+
e.SessionId = r.asString();
|
|
1608
1608
|
break;
|
|
1609
1609
|
}
|
|
1610
|
-
case
|
|
1611
|
-
if (
|
|
1612
|
-
e.SessionChannelUrl =
|
|
1610
|
+
case Is: {
|
|
1611
|
+
if (r.isNull) throw new Error();
|
|
1612
|
+
e.SessionChannelUrl = r.asString();
|
|
1613
1613
|
break;
|
|
1614
1614
|
}
|
|
1615
|
-
case
|
|
1616
|
-
if (
|
|
1617
|
-
e.ChannelUrl =
|
|
1615
|
+
case hs: {
|
|
1616
|
+
if (r.isNull) throw new Error();
|
|
1617
|
+
e.ChannelUrl = r.asString();
|
|
1618
1618
|
break;
|
|
1619
1619
|
}
|
|
1620
|
-
case
|
|
1621
|
-
if (
|
|
1622
|
-
e.ChannelName =
|
|
1620
|
+
case cs: {
|
|
1621
|
+
if (r.isNull) throw new Error();
|
|
1622
|
+
e.ChannelName = r.asString();
|
|
1623
1623
|
break;
|
|
1624
1624
|
}
|
|
1625
|
-
case
|
|
1626
|
-
if (
|
|
1627
|
-
e.PublicAccess =
|
|
1625
|
+
case Es: {
|
|
1626
|
+
if (r.isNull) throw new Error();
|
|
1627
|
+
e.PublicAccess = r.asBool();
|
|
1628
1628
|
break;
|
|
1629
1629
|
}
|
|
1630
|
-
case
|
|
1631
|
-
if (
|
|
1632
|
-
e.ServerRunType =
|
|
1630
|
+
case _s: {
|
|
1631
|
+
if (r.isNull) throw new Error();
|
|
1632
|
+
e.ServerRunType = r.asInt32();
|
|
1633
1633
|
break;
|
|
1634
1634
|
}
|
|
1635
|
-
case
|
|
1636
|
-
if (
|
|
1637
|
-
e.OrganisationName =
|
|
1635
|
+
case us: {
|
|
1636
|
+
if (r.isNull) throw new Error();
|
|
1637
|
+
e.OrganisationName = r.asString();
|
|
1638
1638
|
break;
|
|
1639
1639
|
}
|
|
1640
|
-
case
|
|
1641
|
-
if (
|
|
1642
|
-
e.DebugMode =
|
|
1640
|
+
case fs: {
|
|
1641
|
+
if (r.isNull) throw new Error();
|
|
1642
|
+
e.DebugMode = r.asBool();
|
|
1643
1643
|
break;
|
|
1644
1644
|
}
|
|
1645
|
-
case
|
|
1646
|
-
if (
|
|
1647
|
-
e.Functions =
|
|
1645
|
+
case Ts: {
|
|
1646
|
+
if (r.isNull) throw new Error();
|
|
1647
|
+
e.Functions = gs(r.asDictionary());
|
|
1648
1648
|
break;
|
|
1649
1649
|
}
|
|
1650
|
-
case
|
|
1651
|
-
if (
|
|
1652
|
-
e.UIStreams =
|
|
1650
|
+
case ds: {
|
|
1651
|
+
if (r.isNull) throw new Error();
|
|
1652
|
+
e.UIStreams = bs(r.asDictionary());
|
|
1653
1653
|
break;
|
|
1654
1654
|
}
|
|
1655
|
-
case
|
|
1656
|
-
if (
|
|
1657
|
-
e.SpaceId =
|
|
1655
|
+
case As: {
|
|
1656
|
+
if (r.isNull) throw new Error();
|
|
1657
|
+
e.SpaceId = r.asString();
|
|
1658
1658
|
break;
|
|
1659
1659
|
}
|
|
1660
|
-
case
|
|
1661
|
-
if (
|
|
1662
|
-
e.PrimaryUserId =
|
|
1660
|
+
case Ss: {
|
|
1661
|
+
if (r.isNull) throw new Error();
|
|
1662
|
+
e.PrimaryUserId = r.asString();
|
|
1663
1663
|
break;
|
|
1664
1664
|
}
|
|
1665
|
-
case
|
|
1666
|
-
if (
|
|
1667
|
-
e.AudioStreams =
|
|
1665
|
+
case ys: {
|
|
1666
|
+
if (r.isNull) throw new Error();
|
|
1667
|
+
e.AudioStreams = ps(r.asDictionary());
|
|
1668
1668
|
break;
|
|
1669
1669
|
}
|
|
1670
|
-
case
|
|
1671
|
-
if (
|
|
1672
|
-
e.VideoStreams =
|
|
1670
|
+
case Ns: {
|
|
1671
|
+
if (r.isNull) throw new Error();
|
|
1672
|
+
e.VideoStreams = Ps(r.asDictionary());
|
|
1673
1673
|
break;
|
|
1674
1674
|
}
|
|
1675
|
-
case
|
|
1676
|
-
if (
|
|
1677
|
-
e.SpaceName =
|
|
1675
|
+
case ws: {
|
|
1676
|
+
if (r.isNull) throw new Error();
|
|
1677
|
+
e.SpaceName = r.asString();
|
|
1678
1678
|
break;
|
|
1679
1679
|
}
|
|
1680
1680
|
}
|
|
1681
1681
|
}
|
|
1682
|
-
async function
|
|
1683
|
-
const
|
|
1684
|
-
return
|
|
1682
|
+
async function Ls(t, e) {
|
|
1683
|
+
const r = await V(t, rs);
|
|
1684
|
+
return Us(r, e);
|
|
1685
1685
|
}
|
|
1686
|
-
function
|
|
1686
|
+
function ms(t) {
|
|
1687
1687
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1688
|
-
let
|
|
1689
|
-
for (; (
|
|
1690
|
-
const
|
|
1691
|
-
e[
|
|
1688
|
+
let r;
|
|
1689
|
+
for (; (r = t.next()) !== null; ) {
|
|
1690
|
+
const s = r.key.asInt32();
|
|
1691
|
+
e[s] = nr(r.value.asObject());
|
|
1692
1692
|
}
|
|
1693
1693
|
return e;
|
|
1694
1694
|
}
|
|
1695
|
-
function
|
|
1695
|
+
function Os(t) {
|
|
1696
1696
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1697
|
-
let
|
|
1698
|
-
for (; (
|
|
1699
|
-
const
|
|
1700
|
-
e[
|
|
1697
|
+
let r;
|
|
1698
|
+
for (; (r = t.next()) !== null; ) {
|
|
1699
|
+
const s = r.key.asString();
|
|
1700
|
+
e[s] = ai(r.value.asObject());
|
|
1701
1701
|
}
|
|
1702
1702
|
return e;
|
|
1703
1703
|
}
|
|
1704
|
-
function
|
|
1704
|
+
function gs(t) {
|
|
1705
1705
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1706
|
-
let
|
|
1707
|
-
for (; (
|
|
1708
|
-
const
|
|
1709
|
-
e[
|
|
1706
|
+
let r;
|
|
1707
|
+
for (; (r = t.next()) !== null; ) {
|
|
1708
|
+
const s = r.key.asInt32();
|
|
1709
|
+
e[s] = Fs(r.value.asArray());
|
|
1710
1710
|
}
|
|
1711
1711
|
return e;
|
|
1712
1712
|
}
|
|
1713
|
-
function
|
|
1713
|
+
function bs(t) {
|
|
1714
1714
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1715
|
-
let
|
|
1716
|
-
for (; (
|
|
1717
|
-
const
|
|
1718
|
-
e[
|
|
1715
|
+
let r;
|
|
1716
|
+
for (; (r = t.next()) !== null; ) {
|
|
1717
|
+
const s = r.key.asString();
|
|
1718
|
+
e[s] = Gs(r.value.asObject());
|
|
1719
1719
|
}
|
|
1720
1720
|
return e;
|
|
1721
1721
|
}
|
|
1722
|
-
function
|
|
1722
|
+
function ps(t) {
|
|
1723
1723
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1724
|
-
let
|
|
1725
|
-
for (; (
|
|
1726
|
-
const
|
|
1727
|
-
e[
|
|
1724
|
+
let r;
|
|
1725
|
+
for (; (r = t.next()) !== null; ) {
|
|
1726
|
+
const s = r.key.asString();
|
|
1727
|
+
e[s] = js(r.value.asObject());
|
|
1728
1728
|
}
|
|
1729
1729
|
return e;
|
|
1730
1730
|
}
|
|
1731
|
-
function
|
|
1731
|
+
function Ps(t) {
|
|
1732
1732
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1733
|
-
let
|
|
1734
|
-
for (; (
|
|
1735
|
-
const
|
|
1736
|
-
e[
|
|
1733
|
+
let r;
|
|
1734
|
+
for (; (r = t.next()) !== null; ) {
|
|
1735
|
+
const s = r.key.asString();
|
|
1736
|
+
e[s] = ti(r.value.asObject());
|
|
1737
1737
|
}
|
|
1738
1738
|
return e;
|
|
1739
1739
|
}
|
|
1740
|
-
function
|
|
1740
|
+
function Fs(t) {
|
|
1741
1741
|
const e = [];
|
|
1742
|
-
let
|
|
1743
|
-
for (; (
|
|
1744
|
-
e.push(
|
|
1742
|
+
let r;
|
|
1743
|
+
for (; (r = t.next()) !== null; )
|
|
1744
|
+
e.push(Nr(r.asObject()));
|
|
1745
1745
|
return e;
|
|
1746
1746
|
}
|
|
1747
|
-
const
|
|
1748
|
-
function
|
|
1747
|
+
const ks = 161083277, Ms = 325678206, vs = 3469892363, Vs = 3645544153;
|
|
1748
|
+
function Bs(t) {
|
|
1749
1749
|
const e = {};
|
|
1750
1750
|
return Pt(e), e;
|
|
1751
1751
|
}
|
|
1752
1752
|
function Pt(t) {
|
|
1753
1753
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = mt(), t;
|
|
1754
1754
|
}
|
|
1755
|
-
function
|
|
1756
|
-
const
|
|
1757
|
-
return Pt(
|
|
1755
|
+
function Gs(t, e) {
|
|
1756
|
+
const r = e ?? Bs();
|
|
1757
|
+
return Pt(r), xs(t, r), r;
|
|
1758
1758
|
}
|
|
1759
|
-
function
|
|
1760
|
-
let
|
|
1761
|
-
for (; (
|
|
1762
|
-
switch (
|
|
1763
|
-
case
|
|
1764
|
-
if (
|
|
1765
|
-
e.StreamId =
|
|
1759
|
+
function xs(t, e) {
|
|
1760
|
+
let r;
|
|
1761
|
+
for (; (r = t.next()) !== null; )
|
|
1762
|
+
switch (r.fieldId) {
|
|
1763
|
+
case ks: {
|
|
1764
|
+
if (r.isNull) throw new Error();
|
|
1765
|
+
e.StreamId = r.asString();
|
|
1766
1766
|
break;
|
|
1767
1767
|
}
|
|
1768
|
-
case
|
|
1769
|
-
if (
|
|
1770
|
-
e.ClientSessionId =
|
|
1768
|
+
case Ms: {
|
|
1769
|
+
if (r.isNull) throw new Error();
|
|
1770
|
+
e.ClientSessionId = r.asInt32();
|
|
1771
1771
|
break;
|
|
1772
1772
|
}
|
|
1773
|
-
case
|
|
1774
|
-
if (
|
|
1775
|
-
e.TrackId =
|
|
1773
|
+
case vs: {
|
|
1774
|
+
if (r.isNull) throw new Error();
|
|
1775
|
+
e.TrackId = r.asInt32();
|
|
1776
1776
|
break;
|
|
1777
1777
|
}
|
|
1778
|
-
case
|
|
1779
|
-
if (
|
|
1780
|
-
e.Info =
|
|
1778
|
+
case Vs: {
|
|
1779
|
+
if (r.isNull) throw new Error();
|
|
1780
|
+
e.Info = Kr(r.asObject());
|
|
1781
1781
|
break;
|
|
1782
1782
|
}
|
|
1783
1783
|
}
|
|
1784
1784
|
}
|
|
1785
|
-
const
|
|
1786
|
-
function $
|
|
1785
|
+
const Hs = 161083277, Ws = 325678206, Ks = 3469892363, Ys = 3645544153;
|
|
1786
|
+
function $s(t) {
|
|
1787
1787
|
const e = {};
|
|
1788
1788
|
return Ft(e), e;
|
|
1789
1789
|
}
|
|
1790
1790
|
function Ft(t) {
|
|
1791
1791
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = yt(), t;
|
|
1792
1792
|
}
|
|
1793
|
-
function
|
|
1794
|
-
const
|
|
1795
|
-
return Ft(
|
|
1793
|
+
function js(t, e) {
|
|
1794
|
+
const r = e ?? $s();
|
|
1795
|
+
return Ft(r), Xs(t, r), r;
|
|
1796
1796
|
}
|
|
1797
|
-
function
|
|
1798
|
-
let
|
|
1799
|
-
for (; (
|
|
1800
|
-
switch (
|
|
1801
|
-
case
|
|
1802
|
-
if (
|
|
1803
|
-
e.StreamId =
|
|
1797
|
+
function Xs(t, e) {
|
|
1798
|
+
let r;
|
|
1799
|
+
for (; (r = t.next()) !== null; )
|
|
1800
|
+
switch (r.fieldId) {
|
|
1801
|
+
case Hs: {
|
|
1802
|
+
if (r.isNull) throw new Error();
|
|
1803
|
+
e.StreamId = r.asString();
|
|
1804
1804
|
break;
|
|
1805
1805
|
}
|
|
1806
|
-
case
|
|
1807
|
-
if (
|
|
1808
|
-
e.ClientSessionId =
|
|
1806
|
+
case Ws: {
|
|
1807
|
+
if (r.isNull) throw new Error();
|
|
1808
|
+
e.ClientSessionId = r.asInt32();
|
|
1809
1809
|
break;
|
|
1810
1810
|
}
|
|
1811
|
-
case
|
|
1812
|
-
if (
|
|
1813
|
-
e.TrackId =
|
|
1811
|
+
case Ks: {
|
|
1812
|
+
if (r.isNull) throw new Error();
|
|
1813
|
+
e.TrackId = r.asInt32();
|
|
1814
1814
|
break;
|
|
1815
1815
|
}
|
|
1816
|
-
case
|
|
1817
|
-
if (
|
|
1818
|
-
e.Info = Ae(
|
|
1816
|
+
case Ys: {
|
|
1817
|
+
if (r.isNull) throw new Error();
|
|
1818
|
+
e.Info = Ae(r.asObject());
|
|
1819
1819
|
break;
|
|
1820
1820
|
}
|
|
1821
1821
|
}
|
|
1822
1822
|
}
|
|
1823
|
-
const
|
|
1824
|
-
function
|
|
1823
|
+
const zs = 161083277, Js = 325678206, qs = 3469892363, Qs = 3645544153;
|
|
1824
|
+
function Zs(t) {
|
|
1825
1825
|
const e = {};
|
|
1826
1826
|
return kt(e), e;
|
|
1827
1827
|
}
|
|
@@ -1829,69 +1829,69 @@ function kt(t) {
|
|
|
1829
1829
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = gt(), t;
|
|
1830
1830
|
}
|
|
1831
1831
|
function ti(t, e) {
|
|
1832
|
-
const
|
|
1833
|
-
return kt(
|
|
1832
|
+
const r = e ?? Zs();
|
|
1833
|
+
return kt(r), ei(t, r), r;
|
|
1834
1834
|
}
|
|
1835
1835
|
function ei(t, e) {
|
|
1836
|
-
let
|
|
1837
|
-
for (; (
|
|
1838
|
-
switch (
|
|
1839
|
-
case
|
|
1840
|
-
if (
|
|
1841
|
-
e.StreamId =
|
|
1836
|
+
let r;
|
|
1837
|
+
for (; (r = t.next()) !== null; )
|
|
1838
|
+
switch (r.fieldId) {
|
|
1839
|
+
case zs: {
|
|
1840
|
+
if (r.isNull) throw new Error();
|
|
1841
|
+
e.StreamId = r.asString();
|
|
1842
1842
|
break;
|
|
1843
1843
|
}
|
|
1844
|
-
case
|
|
1845
|
-
if (
|
|
1846
|
-
e.ClientSessionId =
|
|
1844
|
+
case Js: {
|
|
1845
|
+
if (r.isNull) throw new Error();
|
|
1846
|
+
e.ClientSessionId = r.asInt32();
|
|
1847
1847
|
break;
|
|
1848
1848
|
}
|
|
1849
|
-
case
|
|
1850
|
-
if (
|
|
1851
|
-
e.TrackId =
|
|
1849
|
+
case qs: {
|
|
1850
|
+
if (r.isNull) throw new Error();
|
|
1851
|
+
e.TrackId = r.asInt32();
|
|
1852
1852
|
break;
|
|
1853
1853
|
}
|
|
1854
|
-
case
|
|
1855
|
-
if (
|
|
1856
|
-
e.Info =
|
|
1854
|
+
case Qs: {
|
|
1855
|
+
if (r.isNull) throw new Error();
|
|
1856
|
+
e.Info = ts(r.asObject());
|
|
1857
1857
|
break;
|
|
1858
1858
|
}
|
|
1859
1859
|
}
|
|
1860
1860
|
}
|
|
1861
|
-
const
|
|
1861
|
+
const ri = 161083277, si = 325678206, ii = 3469892363, ni = 3645544153;
|
|
1862
1862
|
function oi(t) {
|
|
1863
1863
|
const e = {};
|
|
1864
|
-
return
|
|
1864
|
+
return Mt(e), e;
|
|
1865
1865
|
}
|
|
1866
|
-
function
|
|
1866
|
+
function Mt(t) {
|
|
1867
1867
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Rt(), t;
|
|
1868
1868
|
}
|
|
1869
1869
|
function ai(t, e) {
|
|
1870
|
-
const
|
|
1871
|
-
return
|
|
1870
|
+
const r = e ?? oi();
|
|
1871
|
+
return Mt(r), li(t, r), r;
|
|
1872
1872
|
}
|
|
1873
1873
|
function li(t, e) {
|
|
1874
|
-
let
|
|
1875
|
-
for (; (
|
|
1876
|
-
switch (
|
|
1877
|
-
case
|
|
1878
|
-
if (
|
|
1879
|
-
e.StreamId =
|
|
1874
|
+
let r;
|
|
1875
|
+
for (; (r = t.next()) !== null; )
|
|
1876
|
+
switch (r.fieldId) {
|
|
1877
|
+
case ri: {
|
|
1878
|
+
if (r.isNull) throw new Error();
|
|
1879
|
+
e.StreamId = r.asString();
|
|
1880
1880
|
break;
|
|
1881
1881
|
}
|
|
1882
|
-
case
|
|
1883
|
-
if (
|
|
1884
|
-
e.ClientSessionId =
|
|
1882
|
+
case si: {
|
|
1883
|
+
if (r.isNull) throw new Error();
|
|
1884
|
+
e.ClientSessionId = r.asInt32();
|
|
1885
1885
|
break;
|
|
1886
1886
|
}
|
|
1887
1887
|
case ii: {
|
|
1888
|
-
if (
|
|
1889
|
-
e.TrackId =
|
|
1888
|
+
if (r.isNull) throw new Error();
|
|
1889
|
+
e.TrackId = r.asInt32();
|
|
1890
1890
|
break;
|
|
1891
1891
|
}
|
|
1892
1892
|
case ni: {
|
|
1893
|
-
if (
|
|
1894
|
-
e.Info =
|
|
1893
|
+
if (r.isNull) throw new Error();
|
|
1894
|
+
e.Info = Gr(r.asObject());
|
|
1895
1895
|
break;
|
|
1896
1896
|
}
|
|
1897
1897
|
}
|
|
@@ -1905,21 +1905,21 @@ function vt(t) {
|
|
|
1905
1905
|
return t.MimeType = "", t.Value = new Uint8Array(0), t;
|
|
1906
1906
|
}
|
|
1907
1907
|
function Ei(t, e) {
|
|
1908
|
-
const
|
|
1909
|
-
return vt(
|
|
1908
|
+
const r = e ?? ci();
|
|
1909
|
+
return vt(r), _i(t, r), r;
|
|
1910
1910
|
}
|
|
1911
1911
|
function _i(t, e) {
|
|
1912
|
-
let
|
|
1913
|
-
for (; (
|
|
1914
|
-
switch (
|
|
1912
|
+
let r;
|
|
1913
|
+
for (; (r = t.next()) !== null; )
|
|
1914
|
+
switch (r.fieldId) {
|
|
1915
1915
|
case Ii: {
|
|
1916
|
-
if (
|
|
1917
|
-
e.Value =
|
|
1916
|
+
if (r.isNull) throw new Error();
|
|
1917
|
+
e.Value = r.asBinary();
|
|
1918
1918
|
break;
|
|
1919
1919
|
}
|
|
1920
1920
|
case hi: {
|
|
1921
|
-
if (
|
|
1922
|
-
e.MimeType =
|
|
1921
|
+
if (r.isNull) throw new Error();
|
|
1922
|
+
e.MimeType = r.asString();
|
|
1923
1923
|
break;
|
|
1924
1924
|
}
|
|
1925
1925
|
}
|
|
@@ -1927,45 +1927,45 @@ function _i(t, e) {
|
|
|
1927
1927
|
const ui = 2097188, fi = 979822885, Ti = 2374537704;
|
|
1928
1928
|
function di(t) {
|
|
1929
1929
|
const e = {};
|
|
1930
|
-
return
|
|
1930
|
+
return Vt(e), e;
|
|
1931
1931
|
}
|
|
1932
|
-
function
|
|
1932
|
+
function Vt(t) {
|
|
1933
1933
|
return t.StyleId = "", t.Style = /* @__PURE__ */ Object.create(null), t;
|
|
1934
1934
|
}
|
|
1935
1935
|
function Ai(t, e) {
|
|
1936
|
-
const
|
|
1937
|
-
return Si(
|
|
1936
|
+
const r = g.create(t);
|
|
1937
|
+
return Si(r, e);
|
|
1938
1938
|
}
|
|
1939
1939
|
function Si(t, e) {
|
|
1940
|
-
const
|
|
1941
|
-
return
|
|
1940
|
+
const r = e ?? di();
|
|
1941
|
+
return Vt(r), yi(t, r), r;
|
|
1942
1942
|
}
|
|
1943
1943
|
function yi(t, e) {
|
|
1944
|
-
let
|
|
1945
|
-
for (; (
|
|
1946
|
-
switch (
|
|
1944
|
+
let r;
|
|
1945
|
+
for (; (r = t.next()) !== null; )
|
|
1946
|
+
switch (r.fieldId) {
|
|
1947
1947
|
case fi: {
|
|
1948
|
-
if (
|
|
1949
|
-
e.StyleId =
|
|
1948
|
+
if (r.isNull) throw new Error();
|
|
1949
|
+
e.StyleId = r.asString();
|
|
1950
1950
|
break;
|
|
1951
1951
|
}
|
|
1952
1952
|
case Ti: {
|
|
1953
|
-
if (
|
|
1954
|
-
e.Style = wi(
|
|
1953
|
+
if (r.isNull) throw new Error();
|
|
1954
|
+
e.Style = wi(r.asDictionary());
|
|
1955
1955
|
break;
|
|
1956
1956
|
}
|
|
1957
1957
|
}
|
|
1958
1958
|
}
|
|
1959
1959
|
async function Ni(t, e) {
|
|
1960
|
-
const
|
|
1961
|
-
return Ai(
|
|
1960
|
+
const r = await V(t, ui);
|
|
1961
|
+
return Ai(r, e);
|
|
1962
1962
|
}
|
|
1963
1963
|
function wi(t) {
|
|
1964
1964
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1965
|
-
let
|
|
1966
|
-
for (; (
|
|
1967
|
-
const
|
|
1968
|
-
e[
|
|
1965
|
+
let r;
|
|
1966
|
+
for (; (r = t.next()) !== null; ) {
|
|
1967
|
+
const s = r.key.asString();
|
|
1968
|
+
e[s] = r.value.asString();
|
|
1969
1969
|
}
|
|
1970
1970
|
return e;
|
|
1971
1971
|
}
|
|
@@ -1978,33 +1978,33 @@ function Bt(t) {
|
|
|
1978
1978
|
return t.Styles = [], t;
|
|
1979
1979
|
}
|
|
1980
1980
|
function Ri(t, e) {
|
|
1981
|
-
const
|
|
1982
|
-
return Li(
|
|
1981
|
+
const r = g.create(t);
|
|
1982
|
+
return Li(r, e);
|
|
1983
1983
|
}
|
|
1984
1984
|
function Li(t, e) {
|
|
1985
|
-
const
|
|
1986
|
-
return Bt(
|
|
1985
|
+
const r = e ?? Di();
|
|
1986
|
+
return Bt(r), mi(t, r), r;
|
|
1987
1987
|
}
|
|
1988
1988
|
function mi(t, e) {
|
|
1989
|
-
let
|
|
1990
|
-
for (; (
|
|
1991
|
-
switch (
|
|
1989
|
+
let r;
|
|
1990
|
+
for (; (r = t.next()) !== null; )
|
|
1991
|
+
switch (r.fieldId) {
|
|
1992
1992
|
case Ui: {
|
|
1993
|
-
if (
|
|
1994
|
-
e.Styles = gi(
|
|
1993
|
+
if (r.isNull) throw new Error();
|
|
1994
|
+
e.Styles = gi(r.asArray());
|
|
1995
1995
|
break;
|
|
1996
1996
|
}
|
|
1997
1997
|
}
|
|
1998
1998
|
}
|
|
1999
1999
|
async function Oi(t, e) {
|
|
2000
|
-
const
|
|
2001
|
-
return Ri(
|
|
2000
|
+
const r = await V(t, Ci);
|
|
2001
|
+
return Ri(r, e);
|
|
2002
2002
|
}
|
|
2003
2003
|
function gi(t) {
|
|
2004
2004
|
const e = [];
|
|
2005
|
-
let
|
|
2006
|
-
for (; (
|
|
2007
|
-
e.push(Fi(
|
|
2005
|
+
let r;
|
|
2006
|
+
for (; (r = t.next()) !== null; )
|
|
2007
|
+
e.push(Fi(r.asObject()));
|
|
2008
2008
|
return e;
|
|
2009
2009
|
}
|
|
2010
2010
|
const bi = 979822885, pi = 2374537704;
|
|
@@ -2016,35 +2016,35 @@ function Gt(t) {
|
|
|
2016
2016
|
return t.StyleId = "", t.Style = /* @__PURE__ */ Object.create(null), t;
|
|
2017
2017
|
}
|
|
2018
2018
|
function Fi(t, e) {
|
|
2019
|
-
const
|
|
2020
|
-
return Gt(
|
|
2019
|
+
const r = e ?? Pi();
|
|
2020
|
+
return Gt(r), ki(t, r), r;
|
|
2021
2021
|
}
|
|
2022
2022
|
function ki(t, e) {
|
|
2023
|
-
let
|
|
2024
|
-
for (; (
|
|
2025
|
-
switch (
|
|
2023
|
+
let r;
|
|
2024
|
+
for (; (r = t.next()) !== null; )
|
|
2025
|
+
switch (r.fieldId) {
|
|
2026
2026
|
case bi: {
|
|
2027
|
-
if (
|
|
2028
|
-
e.StyleId =
|
|
2027
|
+
if (r.isNull) throw new Error();
|
|
2028
|
+
e.StyleId = r.asString();
|
|
2029
2029
|
break;
|
|
2030
2030
|
}
|
|
2031
2031
|
case pi: {
|
|
2032
|
-
if (
|
|
2033
|
-
e.Style =
|
|
2032
|
+
if (r.isNull) throw new Error();
|
|
2033
|
+
e.Style = Mi(r.asDictionary());
|
|
2034
2034
|
break;
|
|
2035
2035
|
}
|
|
2036
2036
|
}
|
|
2037
2037
|
}
|
|
2038
|
-
function
|
|
2038
|
+
function Mi(t) {
|
|
2039
2039
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2040
|
-
let
|
|
2041
|
-
for (; (
|
|
2042
|
-
const
|
|
2043
|
-
e[
|
|
2040
|
+
let r;
|
|
2041
|
+
for (; (r = t.next()) !== null; ) {
|
|
2042
|
+
const s = r.key.asString();
|
|
2043
|
+
e[s] = r.value.asString();
|
|
2044
2044
|
}
|
|
2045
2045
|
return e;
|
|
2046
2046
|
}
|
|
2047
|
-
const vi = 2097193,
|
|
2047
|
+
const vi = 2097193, Vi = 1415642792;
|
|
2048
2048
|
function Bi(t) {
|
|
2049
2049
|
const e = {};
|
|
2050
2050
|
return xt(e), e;
|
|
@@ -2053,33 +2053,33 @@ function xt(t) {
|
|
|
2053
2053
|
return t.StyleIds = [], t;
|
|
2054
2054
|
}
|
|
2055
2055
|
function Gi(t, e) {
|
|
2056
|
-
const
|
|
2057
|
-
return xi(
|
|
2056
|
+
const r = g.create(t);
|
|
2057
|
+
return xi(r, e);
|
|
2058
2058
|
}
|
|
2059
2059
|
function xi(t, e) {
|
|
2060
|
-
const
|
|
2061
|
-
return xt(
|
|
2060
|
+
const r = e ?? Bi();
|
|
2061
|
+
return xt(r), Hi(t, r), r;
|
|
2062
2062
|
}
|
|
2063
2063
|
function Hi(t, e) {
|
|
2064
|
-
let
|
|
2065
|
-
for (; (
|
|
2066
|
-
switch (
|
|
2067
|
-
case
|
|
2068
|
-
if (
|
|
2069
|
-
e.StyleIds = Ki(
|
|
2064
|
+
let r;
|
|
2065
|
+
for (; (r = t.next()) !== null; )
|
|
2066
|
+
switch (r.fieldId) {
|
|
2067
|
+
case Vi: {
|
|
2068
|
+
if (r.isNull) throw new Error();
|
|
2069
|
+
e.StyleIds = Ki(r.asArray());
|
|
2070
2070
|
break;
|
|
2071
2071
|
}
|
|
2072
2072
|
}
|
|
2073
2073
|
}
|
|
2074
2074
|
async function Wi(t, e) {
|
|
2075
|
-
const
|
|
2076
|
-
return Gi(
|
|
2075
|
+
const r = await V(t, vi);
|
|
2076
|
+
return Gi(r, e);
|
|
2077
2077
|
}
|
|
2078
2078
|
function Ki(t) {
|
|
2079
2079
|
const e = [];
|
|
2080
|
-
let
|
|
2081
|
-
for (; (
|
|
2082
|
-
e.push(
|
|
2080
|
+
let r;
|
|
2081
|
+
for (; (r = t.next()) !== null; )
|
|
2082
|
+
e.push(r.asString());
|
|
2083
2083
|
return e;
|
|
2084
2084
|
}
|
|
2085
2085
|
const Yi = 2097190, $i = 425183262, ji = 653781469;
|
|
@@ -2091,117 +2091,118 @@ function Ht(t) {
|
|
|
2091
2091
|
return t.Json = "", t.Payloads = /* @__PURE__ */ Object.create(null), t;
|
|
2092
2092
|
}
|
|
2093
2093
|
function zi(t, e) {
|
|
2094
|
-
const
|
|
2095
|
-
return Ji(
|
|
2094
|
+
const r = g.create(t);
|
|
2095
|
+
return Ji(r, e);
|
|
2096
2096
|
}
|
|
2097
2097
|
function Ji(t, e) {
|
|
2098
|
-
const
|
|
2099
|
-
return Ht(
|
|
2098
|
+
const r = e ?? Xi();
|
|
2099
|
+
return Ht(r), qi(t, r), r;
|
|
2100
2100
|
}
|
|
2101
2101
|
function qi(t, e) {
|
|
2102
|
-
let
|
|
2103
|
-
for (; (
|
|
2104
|
-
switch (
|
|
2102
|
+
let r;
|
|
2103
|
+
for (; (r = t.next()) !== null; )
|
|
2104
|
+
switch (r.fieldId) {
|
|
2105
2105
|
case $i: {
|
|
2106
|
-
if (
|
|
2107
|
-
e.Json =
|
|
2106
|
+
if (r.isNull) throw new Error();
|
|
2107
|
+
e.Json = r.asString();
|
|
2108
2108
|
break;
|
|
2109
2109
|
}
|
|
2110
2110
|
case ji: {
|
|
2111
|
-
if (
|
|
2112
|
-
e.Payloads = Zi(
|
|
2111
|
+
if (r.isNull) throw new Error();
|
|
2112
|
+
e.Payloads = Zi(r.asDictionary());
|
|
2113
2113
|
break;
|
|
2114
2114
|
}
|
|
2115
2115
|
}
|
|
2116
2116
|
}
|
|
2117
2117
|
async function Qi(t, e) {
|
|
2118
|
-
const
|
|
2119
|
-
return zi(
|
|
2118
|
+
const r = await V(t, Yi);
|
|
2119
|
+
return zi(r, e);
|
|
2120
2120
|
}
|
|
2121
2121
|
function Zi(t) {
|
|
2122
2122
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2123
|
-
let
|
|
2124
|
-
for (; (
|
|
2125
|
-
const
|
|
2126
|
-
e[
|
|
2123
|
+
let r;
|
|
2124
|
+
for (; (r = t.next()) !== null; ) {
|
|
2125
|
+
const s = r.key.asString();
|
|
2126
|
+
e[s] = Ei(r.value.asObject());
|
|
2127
2127
|
}
|
|
2128
2128
|
return e;
|
|
2129
2129
|
}
|
|
2130
2130
|
const Wt = 1, tn = 1048636, en = 2610786289;
|
|
2131
|
-
function
|
|
2131
|
+
function rn(t) {
|
|
2132
2132
|
const e = new B(Wt);
|
|
2133
|
-
return
|
|
2133
|
+
return sn(t, e), e.finish();
|
|
2134
2134
|
}
|
|
2135
|
-
function
|
|
2135
|
+
function sn(t, e) {
|
|
2136
2136
|
e.writeUInt32Field(en, t.Version >>> 0);
|
|
2137
2137
|
}
|
|
2138
|
-
function nn(t, e,
|
|
2139
|
-
const
|
|
2140
|
-
return ee(tn,
|
|
2138
|
+
function nn(t, e, r) {
|
|
2139
|
+
const s = rn(t);
|
|
2140
|
+
return ee(tn, s, Wt, e, r);
|
|
2141
2141
|
}
|
|
2142
2142
|
function w(t) {
|
|
2143
2143
|
return typeof t == "object" && t !== null && !Array.isArray(t);
|
|
2144
2144
|
}
|
|
2145
2145
|
function Kt(t) {
|
|
2146
|
-
const e = {},
|
|
2147
|
-
for (let
|
|
2148
|
-
const i = s
|
|
2146
|
+
const e = {}, r = Object.keys(t);
|
|
2147
|
+
for (let s = 0; s < r.length; s++) {
|
|
2148
|
+
const i = r[s];
|
|
2149
2149
|
e[i] = t[i];
|
|
2150
2150
|
}
|
|
2151
2151
|
return e;
|
|
2152
2152
|
}
|
|
2153
|
-
function Yt(t, e,
|
|
2154
|
-
if (!(t === void 0 &&
|
|
2153
|
+
function Yt(t, e, r, s) {
|
|
2154
|
+
if (!(t === void 0 && s)) {
|
|
2155
2155
|
if (Array.isArray(t)) {
|
|
2156
2156
|
const i = [];
|
|
2157
2157
|
for (let n = 0; n < t.length; n++) {
|
|
2158
2158
|
const o = t[n];
|
|
2159
2159
|
if (typeof o != "string")
|
|
2160
|
-
throw new Error(`Invalid styleIds entry at ${e}.styleIds[${n}] for element ${
|
|
2160
|
+
throw new Error(`Invalid styleIds entry at ${e}.styleIds[${n}] for element ${r}`);
|
|
2161
2161
|
const a = o.trim();
|
|
2162
2162
|
a.length !== 0 && i.push(a);
|
|
2163
2163
|
}
|
|
2164
2164
|
return i;
|
|
2165
2165
|
}
|
|
2166
2166
|
if (t != null)
|
|
2167
|
-
throw new Error(`Invalid styleIds for element ${
|
|
2167
|
+
throw new Error(`Invalid styleIds for element ${r}`);
|
|
2168
2168
|
return [];
|
|
2169
2169
|
}
|
|
2170
2170
|
}
|
|
2171
2171
|
function it(t, e) {
|
|
2172
2172
|
if (!t || typeof t != "object")
|
|
2173
2173
|
throw new Error(`Invalid UI node at ${e}`);
|
|
2174
|
-
const
|
|
2175
|
-
if (typeof s != "string")
|
|
2176
|
-
throw new Error(`Invalid or missing node id at ${e}`);
|
|
2174
|
+
const r = t.Id, s = t.Type, i = t.Props, n = t.Children, o = t.StyleIds;
|
|
2177
2175
|
if (typeof r != "string")
|
|
2178
|
-
throw new Error(`Invalid or missing node
|
|
2176
|
+
throw new Error(`Invalid or missing node id at ${e}`);
|
|
2177
|
+
if (typeof s != "string")
|
|
2178
|
+
throw new Error(`Invalid or missing node type for ${r}`);
|
|
2179
2179
|
let a = {};
|
|
2180
2180
|
if (i != null) {
|
|
2181
2181
|
if (!w(i))
|
|
2182
|
-
throw new Error(`Invalid props for node ${
|
|
2182
|
+
throw new Error(`Invalid props for node ${r}`);
|
|
2183
2183
|
a = Kt(i);
|
|
2184
2184
|
}
|
|
2185
|
-
let
|
|
2186
|
-
Array.isArray(n) && (
|
|
2187
|
-
(
|
|
2185
|
+
let I = [];
|
|
2186
|
+
Array.isArray(n) && (I = n.map(
|
|
2187
|
+
(E, c) => it(E ?? {}, `${e}.children[${c}]`)
|
|
2188
2188
|
));
|
|
2189
|
-
const h = Yt(o, e,
|
|
2189
|
+
const h = Yt(o, e, r, !1), l = typeof t.SourceMarker == "string" ? t.SourceMarker : void 0;
|
|
2190
2190
|
return {
|
|
2191
|
-
id:
|
|
2192
|
-
type:
|
|
2191
|
+
id: r,
|
|
2192
|
+
type: s,
|
|
2193
2193
|
props: a,
|
|
2194
|
-
children:
|
|
2195
|
-
styleIds: h ?? []
|
|
2194
|
+
children: I,
|
|
2195
|
+
styleIds: h ?? [],
|
|
2196
|
+
...l ? { sourceMarker: l } : {}
|
|
2196
2197
|
};
|
|
2197
2198
|
}
|
|
2198
2199
|
function on(t, e) {
|
|
2199
2200
|
if (!w(t))
|
|
2200
2201
|
throw new Error(`Invalid text delta at ${e}`);
|
|
2201
|
-
const
|
|
2202
|
-
if (typeof s != "string" || s.length === 0)
|
|
2203
|
-
throw new Error(`Invalid text delta node id at ${e}`);
|
|
2202
|
+
const r = t.NodeId, s = t.PropertyName, i = t.Start, n = t.End, o = t.InsertedText;
|
|
2204
2203
|
if (typeof r != "string" || r.length === 0)
|
|
2204
|
+
throw new Error(`Invalid text delta node id at ${e}`);
|
|
2205
|
+
if (typeof s != "string" || s.length === 0)
|
|
2205
2206
|
throw new Error(`Invalid text delta property name at ${e}`);
|
|
2206
2207
|
if (typeof i != "number" || !Number.isFinite(i))
|
|
2207
2208
|
throw new Error(`Invalid text delta start at ${e}`);
|
|
@@ -2215,8 +2216,8 @@ function on(t, e) {
|
|
|
2215
2216
|
} else if (n != null)
|
|
2216
2217
|
throw new Error(`Invalid text delta end at ${e}`);
|
|
2217
2218
|
return {
|
|
2218
|
-
nodeId:
|
|
2219
|
-
propertyName:
|
|
2219
|
+
nodeId: r,
|
|
2220
|
+
propertyName: s,
|
|
2220
2221
|
start: i,
|
|
2221
2222
|
end: a,
|
|
2222
2223
|
insertedText: o
|
|
@@ -2225,74 +2226,74 @@ function on(t, e) {
|
|
|
2225
2226
|
function an(t, e) {
|
|
2226
2227
|
if (!w(t))
|
|
2227
2228
|
throw new Error(`Invalid child insert at ${e}`);
|
|
2228
|
-
const
|
|
2229
|
-
if (typeof
|
|
2229
|
+
const r = t.Index, s = t.Node;
|
|
2230
|
+
if (typeof r != "number" || !Number.isFinite(r))
|
|
2230
2231
|
throw new Error(`Invalid child insert index at ${e}`);
|
|
2231
|
-
if (!w(
|
|
2232
|
+
if (!w(s))
|
|
2232
2233
|
throw new Error(`Invalid child insert node at ${e}`);
|
|
2233
2234
|
return {
|
|
2234
|
-
index:
|
|
2235
|
-
node: it(
|
|
2235
|
+
index: r,
|
|
2236
|
+
node: it(s, `${e}.node`)
|
|
2236
2237
|
};
|
|
2237
2238
|
}
|
|
2238
2239
|
function ln(t, e) {
|
|
2239
2240
|
if (!w(t))
|
|
2240
2241
|
throw new Error(`Invalid child move at ${e}`);
|
|
2241
|
-
const
|
|
2242
|
-
if (typeof
|
|
2242
|
+
const r = t.NodeId, s = t.FromIndex, i = t.ToIndex;
|
|
2243
|
+
if (typeof r != "string" || r.length === 0)
|
|
2243
2244
|
throw new Error(`Invalid child move nodeId at ${e}`);
|
|
2244
|
-
if (typeof
|
|
2245
|
+
if (typeof s != "number" || !Number.isFinite(s))
|
|
2245
2246
|
throw new Error(`Invalid child move fromIndex at ${e}`);
|
|
2246
2247
|
if (typeof i != "number" || !Number.isFinite(i))
|
|
2247
2248
|
throw new Error(`Invalid child move toIndex at ${e}`);
|
|
2248
2249
|
return {
|
|
2249
|
-
nodeId:
|
|
2250
|
-
fromIndex:
|
|
2250
|
+
nodeId: r,
|
|
2251
|
+
fromIndex: s,
|
|
2251
2252
|
toIndex: i
|
|
2252
2253
|
};
|
|
2253
2254
|
}
|
|
2254
2255
|
function In(t, e) {
|
|
2255
2256
|
if (!w(t))
|
|
2256
2257
|
throw new Error(`Invalid child remove at ${e}`);
|
|
2257
|
-
const
|
|
2258
|
-
if (typeof
|
|
2258
|
+
const r = t.NodeId, s = t.Index;
|
|
2259
|
+
if (typeof r != "string" || r.length === 0)
|
|
2259
2260
|
throw new Error(`Invalid child remove nodeId at ${e}`);
|
|
2260
|
-
if (typeof
|
|
2261
|
+
if (typeof s != "number" || !Number.isFinite(s))
|
|
2261
2262
|
throw new Error(`Invalid child remove index at ${e}`);
|
|
2262
2263
|
return {
|
|
2263
|
-
nodeId:
|
|
2264
|
-
index:
|
|
2264
|
+
nodeId: r,
|
|
2265
|
+
index: s
|
|
2265
2266
|
};
|
|
2266
2267
|
}
|
|
2267
2268
|
function hn(t, e) {
|
|
2268
2269
|
if (!w(t))
|
|
2269
2270
|
throw new Error(`Invalid node change at ${e}`);
|
|
2270
|
-
const
|
|
2271
|
-
if (typeof
|
|
2271
|
+
const r = t.nodeId;
|
|
2272
|
+
if (typeof r != "string" || r.length === 0)
|
|
2272
2273
|
throw new Error(`Invalid node change nodeId at ${e}`);
|
|
2273
|
-
const
|
|
2274
|
-
(
|
|
2274
|
+
const s = Array.isArray(t.inserts) ? t.inserts.map(
|
|
2275
|
+
(l, E) => an(l ?? {}, `${e}.inserts[${E}]`)
|
|
2275
2276
|
) : void 0, i = Array.isArray(t.moves) ? t.moves.map(
|
|
2276
|
-
(
|
|
2277
|
+
(l, E) => ln(l ?? {}, `${e}.moves[${E}]`)
|
|
2277
2278
|
) : void 0, n = Array.isArray(t.removals) ? t.removals.map(
|
|
2278
|
-
(
|
|
2279
|
+
(l, E) => In(l ?? {}, `${e}.removals[${E}]`)
|
|
2279
2280
|
) : void 0;
|
|
2280
2281
|
let o;
|
|
2281
2282
|
if (w(t.changedProps)) {
|
|
2282
2283
|
o = /* @__PURE__ */ new Map();
|
|
2283
|
-
for (const [
|
|
2284
|
-
if (!w(
|
|
2284
|
+
for (const [l, E] of Object.entries(t.changedProps)) {
|
|
2285
|
+
if (!w(E))
|
|
2285
2286
|
continue;
|
|
2286
|
-
const
|
|
2287
|
-
|
|
2287
|
+
const c = E.New;
|
|
2288
|
+
c === void 0 ? o.set(l, void 0) : w(c) ? o.set(l, Kt(c)) : o.set(l, c);
|
|
2288
2289
|
}
|
|
2289
2290
|
}
|
|
2290
2291
|
const a = Array.isArray(t.textUpdates) ? t.textUpdates.map(
|
|
2291
|
-
(
|
|
2292
|
-
) : void 0,
|
|
2292
|
+
(l, E) => on(l ?? {}, `${e}.textUpdates[${E}]`)
|
|
2293
|
+
) : void 0, I = t.styleIds, h = I !== void 0 ? Yt(I, e, r, !0) : void 0;
|
|
2293
2294
|
return {
|
|
2294
|
-
nodeId:
|
|
2295
|
-
...
|
|
2295
|
+
nodeId: r,
|
|
2296
|
+
...s && s.length > 0 ? { inserts: s } : {},
|
|
2296
2297
|
...i && i.length > 0 ? { moves: i } : {},
|
|
2297
2298
|
...n && n.length > 0 ? { removals: n } : {},
|
|
2298
2299
|
...o && o.size > 0 ? { changedProps: o } : {},
|
|
@@ -2302,79 +2303,79 @@ function hn(t, e) {
|
|
|
2302
2303
|
}
|
|
2303
2304
|
function cn(t) {
|
|
2304
2305
|
const e = /* @__PURE__ */ new Map();
|
|
2305
|
-
for (const [
|
|
2306
|
-
e.set(
|
|
2306
|
+
for (const [r, s] of Object.entries(t))
|
|
2307
|
+
e.set(r, s);
|
|
2307
2308
|
return e;
|
|
2308
2309
|
}
|
|
2309
|
-
function En(t, e,
|
|
2310
|
+
function En(t, e, r) {
|
|
2310
2311
|
if (!t || typeof t != "object")
|
|
2311
2312
|
throw new D("UI update graph is missing");
|
|
2312
|
-
const
|
|
2313
|
-
if (
|
|
2313
|
+
const s = it(t, "graph");
|
|
2314
|
+
if (s.type !== "root")
|
|
2314
2315
|
throw new D('UI update root element must have type "root"');
|
|
2315
|
-
const i = un(
|
|
2316
|
+
const i = un(s.props, e);
|
|
2316
2317
|
return {
|
|
2317
2318
|
type: "full",
|
|
2318
|
-
version:
|
|
2319
|
-
root:
|
|
2319
|
+
version: r,
|
|
2320
|
+
root: s,
|
|
2320
2321
|
metadata: i
|
|
2321
2322
|
};
|
|
2322
2323
|
}
|
|
2323
|
-
function _n(t, e,
|
|
2324
|
+
function _n(t, e, r) {
|
|
2324
2325
|
if (!Array.isArray(t))
|
|
2325
2326
|
throw new D("UI diff changes must be an array");
|
|
2326
2327
|
if (!w(e))
|
|
2327
2328
|
throw new D("UI diff metadata must be an object");
|
|
2328
|
-
const
|
|
2329
|
-
if (typeof
|
|
2329
|
+
const s = e.viewId;
|
|
2330
|
+
if (typeof s != "string" || s.length === 0)
|
|
2330
2331
|
throw new D("UI diff metadata is missing viewId");
|
|
2331
2332
|
const i = t.map(
|
|
2332
|
-
(
|
|
2333
|
-
), n = e.optimisticActionId === null || typeof e.optimisticActionId == "string" ? e.optimisticActionId : void 0, o = typeof e.isOptimistic == "boolean" ? e.isOptimistic : void 0, a = typeof e.isUpdate == "boolean" ? e.isUpdate : void 0,
|
|
2334
|
-
viewId:
|
|
2333
|
+
(E, c) => hn(E ?? {}, `changes[${c}]`)
|
|
2334
|
+
), n = e.optimisticActionId === null || typeof e.optimisticActionId == "string" ? e.optimisticActionId : void 0, o = typeof e.isOptimistic == "boolean" ? e.isOptimistic : void 0, a = typeof e.isUpdate == "boolean" ? e.isUpdate : void 0, I = z(e.optimisticPatch), h = J(e.optimisticReconcile), l = {
|
|
2335
|
+
viewId: s,
|
|
2335
2336
|
...n !== void 0 ? { optimisticActionId: n } : {},
|
|
2336
2337
|
...o !== void 0 ? { isOptimistic: o } : {},
|
|
2337
2338
|
...a !== void 0 ? { isUpdate: a } : {},
|
|
2338
|
-
...
|
|
2339
|
+
...I ? { optimisticPatch: I } : {},
|
|
2339
2340
|
...h ? { optimisticReconcile: h } : {}
|
|
2340
2341
|
};
|
|
2341
2342
|
return {
|
|
2342
2343
|
type: "diff",
|
|
2343
|
-
version:
|
|
2344
|
+
version: r,
|
|
2344
2345
|
changes: i,
|
|
2345
|
-
metadata:
|
|
2346
|
+
metadata: l
|
|
2346
2347
|
};
|
|
2347
2348
|
}
|
|
2348
2349
|
function un(t, e) {
|
|
2349
|
-
const
|
|
2350
|
-
if (typeof
|
|
2350
|
+
const r = t.viewId;
|
|
2351
|
+
if (typeof r != "string" || r.length === 0)
|
|
2351
2352
|
throw new D("UI update root is missing viewId");
|
|
2352
|
-
let
|
|
2353
|
-
return w(e) && (typeof e.viewId == "string" && e.viewId.length > 0 && (
|
|
2354
|
-
viewId:
|
|
2353
|
+
let s = r, i = t.optimisticActionId === null || typeof t.optimisticActionId == "string" ? t.optimisticActionId : void 0, n = typeof t.isOptimistic == "boolean" ? t.isOptimistic : void 0, o = typeof t.isUpdate == "boolean" ? t.isUpdate : void 0, a = z(t.optimisticPatch), I = J(t.optimisticReconcile);
|
|
2354
|
+
return w(e) && (typeof e.viewId == "string" && e.viewId.length > 0 && (s = e.viewId), (e.optimisticActionId === null || typeof e.optimisticActionId == "string") && (i = e.optimisticActionId), typeof e.isOptimistic == "boolean" && (n = e.isOptimistic), typeof e.isUpdate == "boolean" && (o = e.isUpdate), e.optimisticPatch !== void 0 && (a = z(e.optimisticPatch)), e.optimisticReconcile !== void 0 && (I = J(e.optimisticReconcile))), {
|
|
2355
|
+
viewId: s,
|
|
2355
2356
|
...i !== void 0 ? { optimisticActionId: i } : {},
|
|
2356
2357
|
...n !== void 0 ? { isOptimistic: n } : {},
|
|
2357
2358
|
...o !== void 0 ? { isUpdate: o } : {},
|
|
2358
2359
|
...a ? { optimisticPatch: a } : {},
|
|
2359
|
-
...
|
|
2360
|
+
...I ? { optimisticReconcile: I } : {}
|
|
2360
2361
|
};
|
|
2361
2362
|
}
|
|
2362
2363
|
function z(t) {
|
|
2363
2364
|
if (!w(t))
|
|
2364
2365
|
return;
|
|
2365
|
-
const e = t,
|
|
2366
|
-
if (typeof
|
|
2366
|
+
const e = t, r = e.id, s = e.actionId, i = e.ordinal, n = e.baseVersion, o = e.supersedes;
|
|
2367
|
+
if (typeof r != "string" || r.length === 0 || typeof s != "string" || s.length === 0 || typeof i != "number" || !Number.isFinite(i) || typeof n != "number" || !Number.isFinite(n))
|
|
2367
2368
|
return;
|
|
2368
2369
|
let a;
|
|
2369
2370
|
if (Array.isArray(o)) {
|
|
2370
|
-
const
|
|
2371
|
+
const I = [];
|
|
2371
2372
|
for (const h of o)
|
|
2372
|
-
typeof h == "string" && h.length > 0 &&
|
|
2373
|
-
a =
|
|
2373
|
+
typeof h == "string" && h.length > 0 && I.push(h);
|
|
2374
|
+
a = I;
|
|
2374
2375
|
}
|
|
2375
2376
|
return {
|
|
2376
|
-
id:
|
|
2377
|
-
actionId:
|
|
2377
|
+
id: r,
|
|
2378
|
+
actionId: s,
|
|
2378
2379
|
ordinal: i,
|
|
2379
2380
|
baseVersion: n,
|
|
2380
2381
|
...a && a.length > 0 ? { supersedes: a } : {}
|
|
@@ -2383,24 +2384,24 @@ function z(t) {
|
|
|
2383
2384
|
function J(t) {
|
|
2384
2385
|
if (!w(t))
|
|
2385
2386
|
return;
|
|
2386
|
-
const e = t,
|
|
2387
|
-
if (typeof
|
|
2387
|
+
const e = t, r = e.baseVersion, s = e.drop;
|
|
2388
|
+
if (typeof r != "number" || !Number.isFinite(r))
|
|
2388
2389
|
return;
|
|
2389
2390
|
let i;
|
|
2390
|
-
if (Array.isArray(
|
|
2391
|
+
if (Array.isArray(s)) {
|
|
2391
2392
|
const n = [];
|
|
2392
|
-
for (const o of
|
|
2393
|
+
for (const o of s)
|
|
2393
2394
|
typeof o == "string" && o.length > 0 && n.push(o);
|
|
2394
2395
|
i = n;
|
|
2395
2396
|
}
|
|
2396
2397
|
return {
|
|
2397
|
-
baseVersion:
|
|
2398
|
+
baseVersion: r,
|
|
2398
2399
|
...i && i.length > 0 ? { drop: i } : {}
|
|
2399
2400
|
};
|
|
2400
2401
|
}
|
|
2401
2402
|
class D extends Error {
|
|
2402
|
-
constructor(e,
|
|
2403
|
-
super(e), this.causeError =
|
|
2403
|
+
constructor(e, r) {
|
|
2404
|
+
super(e), this.causeError = r, this.name = "UiUpdateParseError", r instanceof Error && (this.stack = r.stack);
|
|
2404
2405
|
}
|
|
2405
2406
|
}
|
|
2406
2407
|
function fn(t) {
|
|
@@ -2412,12 +2413,12 @@ function fn(t) {
|
|
|
2412
2413
|
}
|
|
2413
2414
|
if (!e || typeof e != "object")
|
|
2414
2415
|
throw new D("UI update snapshot must be an object");
|
|
2415
|
-
const { type:
|
|
2416
|
-
if (
|
|
2417
|
-
throw new D(`Unknown UI update type: ${String(
|
|
2418
|
-
if (typeof
|
|
2416
|
+
const { type: r, version: s } = e;
|
|
2417
|
+
if (r !== "full" && r !== "diff")
|
|
2418
|
+
throw new D(`Unknown UI update type: ${String(r)}`);
|
|
2419
|
+
if (typeof s != "number")
|
|
2419
2420
|
throw new D("UI update version must be a number");
|
|
2420
|
-
const i =
|
|
2421
|
+
const i = r === "full" ? En(e.graph, e.metadata, s) : _n(e.changes, e.metadata, s), n = t.Payloads ? cn(t.Payloads) : /* @__PURE__ */ new Map();
|
|
2421
2422
|
return {
|
|
2422
2423
|
snapshot: i,
|
|
2423
2424
|
payloads: n
|
|
@@ -2430,66 +2431,66 @@ class Tn {
|
|
|
2430
2431
|
* Get a cached void handler (no payload) for a node/action combination.
|
|
2431
2432
|
* Creates and caches the handler if it doesn't exist.
|
|
2432
2433
|
*/
|
|
2433
|
-
getHandler(e,
|
|
2434
|
-
const i = `${e}:${
|
|
2434
|
+
getHandler(e, r, s) {
|
|
2435
|
+
const i = `${e}:${r}`;
|
|
2435
2436
|
let n = this.cache.get(i);
|
|
2436
|
-
return n || (n = () => r
|
|
2437
|
+
return n || (n = () => s(r), this.cache.set(i, n)), n;
|
|
2437
2438
|
}
|
|
2438
2439
|
/**
|
|
2439
2440
|
* Get a cached handler that accepts a payload.
|
|
2440
2441
|
* Creates and caches the handler if it doesn't exist.
|
|
2441
2442
|
*/
|
|
2442
|
-
getHandlerWithPayload(e,
|
|
2443
|
-
const i = `${e}:${
|
|
2443
|
+
getHandlerWithPayload(e, r, s) {
|
|
2444
|
+
const i = `${e}:${r}:payload`;
|
|
2444
2445
|
let n = this.cache.get(i);
|
|
2445
|
-
return n || (n = (o) => r
|
|
2446
|
+
return n || (n = (o) => s(r, o), this.cache.set(i, n)), n;
|
|
2446
2447
|
}
|
|
2447
2448
|
/**
|
|
2448
2449
|
* Get a cached handler for boolean payloads.
|
|
2449
2450
|
*/
|
|
2450
|
-
getBooleanHandler(e,
|
|
2451
|
-
return this.getHandlerWithPayload(e,
|
|
2451
|
+
getBooleanHandler(e, r, s) {
|
|
2452
|
+
return this.getHandlerWithPayload(e, r, s);
|
|
2452
2453
|
}
|
|
2453
2454
|
/**
|
|
2454
2455
|
* Get a cached handler for string payloads.
|
|
2455
2456
|
*/
|
|
2456
|
-
getStringHandler(e,
|
|
2457
|
-
return this.getHandlerWithPayload(e,
|
|
2457
|
+
getStringHandler(e, r, s) {
|
|
2458
|
+
return this.getHandlerWithPayload(e, r, s);
|
|
2458
2459
|
}
|
|
2459
2460
|
/**
|
|
2460
2461
|
* Get a cached handler for number payloads.
|
|
2461
2462
|
*/
|
|
2462
|
-
getNumberHandler(e,
|
|
2463
|
-
return this.getHandlerWithPayload(e,
|
|
2463
|
+
getNumberHandler(e, r, s) {
|
|
2464
|
+
return this.getHandlerWithPayload(e, r, s);
|
|
2464
2465
|
}
|
|
2465
2466
|
/**
|
|
2466
2467
|
* Get a cached handler for number array payloads.
|
|
2467
2468
|
*/
|
|
2468
|
-
getNumberArrayHandler(e,
|
|
2469
|
-
return this.getHandlerWithPayload(e,
|
|
2469
|
+
getNumberArrayHandler(e, r, s) {
|
|
2470
|
+
return this.getHandlerWithPayload(e, r, s);
|
|
2470
2471
|
}
|
|
2471
2472
|
/**
|
|
2472
2473
|
* Get a cached handler for nullable boolean payloads.
|
|
2473
2474
|
*/
|
|
2474
|
-
getNullableBooleanHandler(e,
|
|
2475
|
-
const i = `${e}:${
|
|
2475
|
+
getNullableBooleanHandler(e, r, s) {
|
|
2476
|
+
const i = `${e}:${r}:nullable-bool`;
|
|
2476
2477
|
let n = this.cache.get(i);
|
|
2477
|
-
return n || (n = (o) => r
|
|
2478
|
+
return n || (n = (o) => s(r, o ?? null), this.cache.set(i, n)), n;
|
|
2478
2479
|
}
|
|
2479
2480
|
/**
|
|
2480
2481
|
* Invalidate all cached handlers for a specific node.
|
|
2481
2482
|
* Call this when a node is removed from the tree.
|
|
2482
2483
|
*/
|
|
2483
2484
|
invalidateNode(e) {
|
|
2484
|
-
const
|
|
2485
|
-
for (const
|
|
2486
|
-
|
|
2485
|
+
const r = `${e}:`;
|
|
2486
|
+
for (const s of this.cache.keys())
|
|
2487
|
+
s.startsWith(r) && this.cache.delete(s);
|
|
2487
2488
|
}
|
|
2488
2489
|
/**
|
|
2489
2490
|
* Invalidate a specific handler.
|
|
2490
2491
|
*/
|
|
2491
|
-
invalidateHandler(e,
|
|
2492
|
-
this.cache.delete(`${e}:${
|
|
2492
|
+
invalidateHandler(e, r) {
|
|
2493
|
+
this.cache.delete(`${e}:${r}`), this.cache.delete(`${e}:${r}:payload`), this.cache.delete(`${e}:${r}:nullable-bool`);
|
|
2493
2494
|
}
|
|
2494
2495
|
/**
|
|
2495
2496
|
* Clear all cached handlers.
|
|
@@ -2528,18 +2529,18 @@ class dn {
|
|
|
2528
2529
|
// Handler cache for stable event handlers
|
|
2529
2530
|
handlerCache = new Tn();
|
|
2530
2531
|
getSortedPatches(e) {
|
|
2531
|
-
const
|
|
2532
|
-
if (e.sortedPatchesCacheKey ===
|
|
2532
|
+
const r = this.buildPatchCacheKey(e.patches);
|
|
2533
|
+
if (e.sortedPatchesCacheKey === r && e.sortedPatchesCache)
|
|
2533
2534
|
return e.sortedPatchesCache;
|
|
2534
|
-
const
|
|
2535
|
-
return e.sortedPatchesCache =
|
|
2535
|
+
const s = [...e.patches.values()].sort((i, n) => i.ordinal - n.ordinal);
|
|
2536
|
+
return e.sortedPatchesCache = s, e.sortedPatchesCacheKey = r, s;
|
|
2536
2537
|
}
|
|
2537
2538
|
buildPatchCacheKey(e) {
|
|
2538
2539
|
if (e.size === 0) return "";
|
|
2539
|
-
let
|
|
2540
|
-
for (const [
|
|
2541
|
-
|
|
2542
|
-
return
|
|
2540
|
+
let r = "";
|
|
2541
|
+
for (const [s, i] of e)
|
|
2542
|
+
r += r ? `,${s}:${i.ordinal}` : `${s}:${i.ordinal}`;
|
|
2543
|
+
return r;
|
|
2543
2544
|
}
|
|
2544
2545
|
invalidatePatchCache(e) {
|
|
2545
2546
|
e.sortedPatchesCache = void 0, e.sortedPatchesCacheKey = void 0;
|
|
@@ -2555,124 +2556,124 @@ class dn {
|
|
|
2555
2556
|
version: -1
|
|
2556
2557
|
};
|
|
2557
2558
|
}
|
|
2558
|
-
const { snapshot:
|
|
2559
|
+
const { snapshot: r, payloads: s } = e, { metadata: i } = r, { viewId: n } = i;
|
|
2559
2560
|
let o = this.views.get(n);
|
|
2560
2561
|
o || (o = {
|
|
2561
2562
|
version: 0,
|
|
2562
2563
|
baselineVersion: 0,
|
|
2563
2564
|
patches: /* @__PURE__ */ new Map()
|
|
2564
2565
|
}, this.views.set(n, o));
|
|
2565
|
-
const a =
|
|
2566
|
-
if (
|
|
2566
|
+
const a = r.type === "diff" && i.isUpdate === !0;
|
|
2567
|
+
if (r.version < o.version || r.version === o.version && !a)
|
|
2567
2568
|
return !1;
|
|
2568
|
-
let
|
|
2569
|
-
if (this.rootViewId || (this.rootViewId = n,
|
|
2570
|
-
for (const
|
|
2571
|
-
o.patches.delete(
|
|
2569
|
+
let I = !1;
|
|
2570
|
+
if (this.rootViewId || (this.rootViewId = n, I = !0, this.structureChanged = !0), i.optimisticReconcile?.drop)
|
|
2571
|
+
for (const l of i.optimisticReconcile.drop)
|
|
2572
|
+
o.patches.delete(l) && (I = !0, this.patchesDirty = !0, this.invalidatePatchCache(o));
|
|
2572
2573
|
if (i.optimisticPatch?.supersedes)
|
|
2573
|
-
for (const
|
|
2574
|
-
o.patches.delete(
|
|
2574
|
+
for (const l of i.optimisticPatch.supersedes)
|
|
2575
|
+
o.patches.delete(l) && (I = !0, this.patchesDirty = !0, this.invalidatePatchCache(o));
|
|
2575
2576
|
const h = o.composite ?? o.baseline;
|
|
2576
|
-
if (
|
|
2577
|
-
o.baseline =
|
|
2577
|
+
if (r.type === "full")
|
|
2578
|
+
o.baseline = r.root, o.composite = r.root, o.baselineVersion = i.optimisticReconcile?.baseVersion ?? r.version, o.patches.clear(), this.invalidatePatchCache(o), o.version = r.version, I = !0, this.viewsDirty = !0, this.patchesDirty = !0, this.structureChanged = !0, r.root && p(r.root, this.changedNodeIds);
|
|
2578
2579
|
else if (i.optimisticPatch) {
|
|
2579
2580
|
if (!h)
|
|
2580
2581
|
return !1;
|
|
2581
|
-
const
|
|
2582
|
-
|
|
2583
|
-
const
|
|
2584
|
-
id:
|
|
2585
|
-
actionId:
|
|
2586
|
-
ordinal:
|
|
2587
|
-
baseVersion:
|
|
2588
|
-
changes:
|
|
2582
|
+
const l = j(h, r.changes);
|
|
2583
|
+
l !== h && (o.composite = l, I = !0, this.viewsDirty = !0, H(h, l, this.changedNodeIds));
|
|
2584
|
+
const E = i.optimisticPatch, c = {
|
|
2585
|
+
id: E.id,
|
|
2586
|
+
actionId: E.actionId,
|
|
2587
|
+
ordinal: E.ordinal,
|
|
2588
|
+
baseVersion: E.baseVersion,
|
|
2589
|
+
changes: r.changes
|
|
2589
2590
|
};
|
|
2590
|
-
o.patches.set(
|
|
2591
|
+
o.patches.set(c.id, c), this.invalidatePatchCache(o), I = !0, this.patchesDirty = !0, o.version = r.version;
|
|
2591
2592
|
} else {
|
|
2592
|
-
const
|
|
2593
|
-
if (!
|
|
2593
|
+
const l = o.baseline ?? h;
|
|
2594
|
+
if (!l)
|
|
2594
2595
|
return !1;
|
|
2595
|
-
const
|
|
2596
|
-
|
|
2597
|
-
let
|
|
2596
|
+
const E = j(l, r.changes);
|
|
2597
|
+
E !== l ? (o.baseline = E, I = !0, this.viewsDirty = !0) : o.baseline = E, o.baselineVersion = i.optimisticReconcile?.baseVersion ?? r.version;
|
|
2598
|
+
let c = o.baseline ?? E;
|
|
2598
2599
|
const _ = this.getSortedPatches(o);
|
|
2599
2600
|
for (const f of _) {
|
|
2600
|
-
const S = j(
|
|
2601
|
-
S !==
|
|
2601
|
+
const S = j(c, f.changes);
|
|
2602
|
+
S !== c && (I = !0, this.viewsDirty = !0), c = S, f.baseVersion = o.baselineVersion;
|
|
2602
2603
|
}
|
|
2603
|
-
o.composite !==
|
|
2604
|
+
o.composite !== c && (o.composite = c, I = !0, this.viewsDirty = !0), h && c ? H(h, c, this.changedNodeIds) : c && p(c, this.changedNodeIds), o.version = r.version;
|
|
2604
2605
|
}
|
|
2605
|
-
for (const [
|
|
2606
|
-
this.payloads.get(
|
|
2607
|
-
return
|
|
2606
|
+
for (const [l, E] of s)
|
|
2607
|
+
this.payloads.get(l) !== E && (this.payloads.set(l, E), I = !0, this.payloadsDirty = !0);
|
|
2608
|
+
return I ? (this.commitSnapshot(), this.notify(), !0) : (o.version = r.version, !1);
|
|
2608
2609
|
}
|
|
2609
2610
|
replaceFromWire(e) {
|
|
2610
|
-
const
|
|
2611
|
+
const r = {
|
|
2611
2612
|
rootViewId: e.rootViewId,
|
|
2612
2613
|
views: new Map(e.views),
|
|
2613
2614
|
payloads: new Map(e.payloads),
|
|
2614
2615
|
optimisticPatches: new Map(e.optimisticPatches),
|
|
2615
2616
|
version: e.version
|
|
2616
2617
|
};
|
|
2617
|
-
return this.replaceSnapshot(
|
|
2618
|
+
return this.replaceSnapshot(r);
|
|
2618
2619
|
}
|
|
2619
2620
|
patchFromOp(e) {
|
|
2620
2621
|
this.snapshotMode = !0;
|
|
2621
|
-
const
|
|
2622
|
-
if (
|
|
2622
|
+
const r = e.expectedBaseVersion;
|
|
2623
|
+
if (r !== void 0 && this.snapshot.version !== r)
|
|
2623
2624
|
return !1;
|
|
2624
|
-
let
|
|
2625
|
-
const a = () => (i || (i = new Map(this.snapshot.views)), i),
|
|
2625
|
+
let s = !1, i = null, n = null, o = null;
|
|
2626
|
+
const a = () => (i || (i = new Map(this.snapshot.views)), i), I = () => (n || (n = new Map(this.snapshot.payloads)), n), h = () => (o || (o = new Map(this.snapshot.optimisticPatches)), o);
|
|
2626
2627
|
if (e.deleteViews && e.deleteViews.length > 0)
|
|
2627
|
-
for (const
|
|
2628
|
-
a().delete(
|
|
2628
|
+
for (const c of e.deleteViews)
|
|
2629
|
+
a().delete(c) && (s = !0, this.structureChanged = !0);
|
|
2629
2630
|
if (e.upsertViews && e.upsertViews.length > 0)
|
|
2630
|
-
for (const [
|
|
2631
|
-
const f = a(), S = f.get(
|
|
2632
|
-
S !== _ && (f.set(
|
|
2631
|
+
for (const [c, _] of e.upsertViews) {
|
|
2632
|
+
const f = a(), S = f.get(c);
|
|
2633
|
+
S !== _ && (f.set(c, _), s = !0, S ? H(S, _, this.changedNodeIds) : (p(_, this.changedNodeIds), this.structureChanged = !0));
|
|
2633
2634
|
}
|
|
2634
2635
|
if (e.deletePayloads && e.deletePayloads.length > 0)
|
|
2635
|
-
for (const
|
|
2636
|
-
|
|
2636
|
+
for (const c of e.deletePayloads)
|
|
2637
|
+
I().delete(c) && (s = !0);
|
|
2637
2638
|
if (e.upsertPayloads && e.upsertPayloads.length > 0)
|
|
2638
|
-
for (const [
|
|
2639
|
-
const f =
|
|
2640
|
-
f.get(
|
|
2639
|
+
for (const [c, _] of e.upsertPayloads) {
|
|
2640
|
+
const f = I();
|
|
2641
|
+
f.get(c) !== _ && (f.set(c, _), s = !0);
|
|
2641
2642
|
}
|
|
2642
2643
|
if (e.deleteOptimisticPatchesForViews && e.deleteOptimisticPatchesForViews.length > 0)
|
|
2643
|
-
for (const
|
|
2644
|
-
h().delete(
|
|
2644
|
+
for (const c of e.deleteOptimisticPatchesForViews)
|
|
2645
|
+
h().delete(c) && (s = !0);
|
|
2645
2646
|
if (e.upsertOptimisticPatches && e.upsertOptimisticPatches.length > 0)
|
|
2646
|
-
for (const [
|
|
2647
|
-
const f = h(), S = f.get(
|
|
2648
|
-
Nn(S, _) || (f.set(
|
|
2649
|
-
}
|
|
2650
|
-
const
|
|
2651
|
-
|
|
2652
|
-
const
|
|
2653
|
-
if (
|
|
2654
|
-
return this.snapshot = { ...this.snapshot, version:
|
|
2655
|
-
for (const
|
|
2656
|
-
this.nodeVersions.set(
|
|
2647
|
+
for (const [c, _] of e.upsertOptimisticPatches) {
|
|
2648
|
+
const f = h(), S = f.get(c);
|
|
2649
|
+
Nn(S, _) || (f.set(c, _), s = !0);
|
|
2650
|
+
}
|
|
2651
|
+
const l = e.rootViewId ?? this.snapshot.rootViewId;
|
|
2652
|
+
l !== this.snapshot.rootViewId && (s = !0, this.structureChanged = !0);
|
|
2653
|
+
const E = e.nextVersion;
|
|
2654
|
+
if (E !== this.snapshot.version && (s = !0), !s)
|
|
2655
|
+
return this.snapshot = { ...this.snapshot, version: E }, !1;
|
|
2656
|
+
for (const c of this.changedNodeIds)
|
|
2657
|
+
this.nodeVersions.set(c, (this.nodeVersions.get(c) ?? 0) + 1);
|
|
2657
2658
|
return this.snapshot = {
|
|
2658
|
-
rootViewId:
|
|
2659
|
+
rootViewId: l,
|
|
2659
2660
|
views: i ?? new Map(this.snapshot.views),
|
|
2660
2661
|
payloads: n ?? new Map(this.snapshot.payloads),
|
|
2661
2662
|
optimisticPatches: o ?? new Map(this.snapshot.optimisticPatches),
|
|
2662
|
-
version:
|
|
2663
|
+
version: E
|
|
2663
2664
|
}, this.notify(), !0;
|
|
2664
2665
|
}
|
|
2665
2666
|
replaceSnapshot(e) {
|
|
2666
2667
|
this.snapshotMode = !0;
|
|
2667
|
-
const
|
|
2668
|
-
(
|
|
2668
|
+
const r = this.snapshot, s = r.version !== e.version || r.rootViewId !== e.rootViewId || r.views.size !== e.views.size || r.payloads.size !== e.payloads.size || r.optimisticPatches.size !== e.optimisticPatches.size;
|
|
2669
|
+
(r.rootViewId !== e.rootViewId || r.views.size !== e.views.size) && (this.structureChanged = !0);
|
|
2669
2670
|
for (const [i, n] of e.views) {
|
|
2670
|
-
const o =
|
|
2671
|
+
const o = r.views.get(i);
|
|
2671
2672
|
o ? H(o, n, this.changedNodeIds) : (p(n, this.changedNodeIds), this.structureChanged = !0);
|
|
2672
2673
|
}
|
|
2673
2674
|
for (const i of this.changedNodeIds)
|
|
2674
2675
|
this.nodeVersions.set(i, (this.nodeVersions.get(i) ?? 0) + 1);
|
|
2675
|
-
return this.snapshot = e,
|
|
2676
|
+
return this.snapshot = e, s && this.notify(), s;
|
|
2676
2677
|
}
|
|
2677
2678
|
clear() {
|
|
2678
2679
|
(this.snapshot.rootViewId === void 0 || this.snapshot.rootViewId.length === 0) && this.snapshot.views.size === 0 && this.snapshot.payloads.size === 0 && this.snapshot.optimisticPatches.size === 0 || (this.snapshotMode = !0, this.views.clear(), this.payloads.clear(), this.rootViewId = void 0, this.viewsDirty = !0, this.patchesDirty = !0, this.payloadsDirty = !0, this.snapshot = {
|
|
@@ -2690,18 +2691,18 @@ class dn {
|
|
|
2690
2691
|
this.listeners.delete(e);
|
|
2691
2692
|
};
|
|
2692
2693
|
}
|
|
2693
|
-
subscribeNode(e,
|
|
2694
|
-
let
|
|
2695
|
-
return
|
|
2696
|
-
|
|
2694
|
+
subscribeNode(e, r) {
|
|
2695
|
+
let s = this.nodeListeners.get(e);
|
|
2696
|
+
return s || (s = /* @__PURE__ */ new Set(), this.nodeListeners.set(e, s)), s.add(r), () => {
|
|
2697
|
+
s && (s.delete(r), s.size === 0 && this.nodeListeners.delete(e));
|
|
2697
2698
|
};
|
|
2698
2699
|
}
|
|
2699
2700
|
getNode(e) {
|
|
2700
|
-
const
|
|
2701
|
-
if (
|
|
2702
|
-
return
|
|
2703
|
-
for (const
|
|
2704
|
-
const i = Xt(
|
|
2701
|
+
const r = this.snapshot.views.get(e);
|
|
2702
|
+
if (r)
|
|
2703
|
+
return r;
|
|
2704
|
+
for (const s of this.snapshot.views.values()) {
|
|
2705
|
+
const i = Xt(s, e);
|
|
2705
2706
|
if (i)
|
|
2706
2707
|
return i;
|
|
2707
2708
|
}
|
|
@@ -2715,15 +2716,15 @@ class dn {
|
|
|
2715
2716
|
return;
|
|
2716
2717
|
}
|
|
2717
2718
|
for (const e of this.changedNodeIds) {
|
|
2718
|
-
const
|
|
2719
|
-
if (
|
|
2720
|
-
for (const
|
|
2721
|
-
|
|
2719
|
+
const r = this.nodeListeners.get(e);
|
|
2720
|
+
if (r)
|
|
2721
|
+
for (const s of r)
|
|
2722
|
+
s();
|
|
2722
2723
|
}
|
|
2723
2724
|
this.changedNodeIds.clear();
|
|
2724
2725
|
}
|
|
2725
2726
|
commitSnapshot() {
|
|
2726
|
-
let e,
|
|
2727
|
+
let e, r, s;
|
|
2727
2728
|
if (this.viewsDirty) {
|
|
2728
2729
|
const n = /* @__PURE__ */ new Map();
|
|
2729
2730
|
for (const [o, a] of this.views)
|
|
@@ -2735,10 +2736,10 @@ class dn {
|
|
|
2735
2736
|
const n = /* @__PURE__ */ new Map();
|
|
2736
2737
|
for (const [o, a] of this.views)
|
|
2737
2738
|
if (a.patches.size > 0) {
|
|
2738
|
-
const
|
|
2739
|
+
const I = this.getSortedPatches(a);
|
|
2739
2740
|
n.set(
|
|
2740
2741
|
o,
|
|
2741
|
-
|
|
2742
|
+
I.map((h) => ({
|
|
2742
2743
|
id: h.id,
|
|
2743
2744
|
actionId: h.actionId,
|
|
2744
2745
|
ordinal: h.ordinal,
|
|
@@ -2746,10 +2747,10 @@ class dn {
|
|
|
2746
2747
|
}))
|
|
2747
2748
|
);
|
|
2748
2749
|
}
|
|
2749
|
-
|
|
2750
|
+
r = n, this.patchesDirty = !1;
|
|
2750
2751
|
} else
|
|
2751
|
-
|
|
2752
|
-
this.payloadsDirty ? (
|
|
2752
|
+
r = this.snapshot.optimisticPatches;
|
|
2753
|
+
this.payloadsDirty ? (s = new Map(this.payloads), this.payloadsDirty = !1) : s = this.snapshot.payloads;
|
|
2753
2754
|
let i = this.rootViewId && this.views.has(this.rootViewId) ? this.views.get(this.rootViewId)?.version : void 0;
|
|
2754
2755
|
if (i === void 0)
|
|
2755
2756
|
for (const n of this.views.values())
|
|
@@ -2757,8 +2758,8 @@ class dn {
|
|
|
2757
2758
|
this.snapshot = {
|
|
2758
2759
|
rootViewId: this.rootViewId,
|
|
2759
2760
|
views: e,
|
|
2760
|
-
payloads:
|
|
2761
|
-
optimisticPatches:
|
|
2761
|
+
payloads: s,
|
|
2762
|
+
optimisticPatches: r,
|
|
2762
2763
|
version: i
|
|
2763
2764
|
};
|
|
2764
2765
|
for (const n of this.changedNodeIds)
|
|
@@ -2775,56 +2776,56 @@ class dn {
|
|
|
2775
2776
|
class An {
|
|
2776
2777
|
streams = /* @__PURE__ */ new Map();
|
|
2777
2778
|
listeners = /* @__PURE__ */ new Set();
|
|
2778
|
-
apply(e,
|
|
2779
|
-
const i = this.getOrCreateStreamEntry(e).store.apply(
|
|
2779
|
+
apply(e, r) {
|
|
2780
|
+
const i = this.getOrCreateStreamEntry(e).store.apply(r);
|
|
2780
2781
|
return i && this.notify(e), i;
|
|
2781
2782
|
}
|
|
2782
2783
|
applyStoreOp(e) {
|
|
2783
2784
|
if (e.type === "ReplaceStreamSnapshot") {
|
|
2784
|
-
const
|
|
2785
|
-
return
|
|
2785
|
+
const r = this.getOrCreateStreamEntry(e.snapshot.streamId), s = r.category !== e.snapshot.category;
|
|
2786
|
+
return r.category = e.snapshot.category, r.store.replaceFromWire(e.snapshot) || s ? (this.notify(e.snapshot.streamId), !0) : !1;
|
|
2786
2787
|
}
|
|
2787
2788
|
if (e.type === "PatchStreamSnapshot") {
|
|
2788
|
-
const
|
|
2789
|
-
return e.category !== void 0 && (
|
|
2789
|
+
const r = this.getOrCreateStreamEntry(e.streamId), s = e.category !== void 0 && r.category !== e.category;
|
|
2790
|
+
return e.category !== void 0 && (r.category = e.category), r.store.patchFromOp(e) || s ? (this.notify(e.streamId), !0) : !1;
|
|
2790
2791
|
}
|
|
2791
2792
|
if (e.type === "ClearStream") {
|
|
2792
|
-
const
|
|
2793
|
-
return
|
|
2793
|
+
const r = this.streams.get(e.streamId);
|
|
2794
|
+
return r ? (r.store.clear(), this.notify(e.streamId), !0) : !1;
|
|
2794
2795
|
}
|
|
2795
2796
|
return e.type === "RemoveStream" ? this.streams.delete(e.streamId) ? (this.notify(e.streamId), !0) : !1 : e.type === "SetStreamCategory" ? (this.setCategory(e.streamId, e.category), !0) : !1;
|
|
2796
2797
|
}
|
|
2797
2798
|
applyStoreOps(e) {
|
|
2798
|
-
for (const
|
|
2799
|
-
this.applyStoreOp(
|
|
2799
|
+
for (const r of e)
|
|
2800
|
+
this.applyStoreOp(r);
|
|
2800
2801
|
}
|
|
2801
2802
|
clear(e) {
|
|
2802
|
-
const
|
|
2803
|
-
|
|
2803
|
+
const r = this.streams.get(e);
|
|
2804
|
+
r && (r.store.clear(), this.notify(e));
|
|
2804
2805
|
}
|
|
2805
2806
|
remove(e) {
|
|
2806
2807
|
this.streams.delete(e) && this.notify(e);
|
|
2807
2808
|
}
|
|
2808
|
-
setCategory(e,
|
|
2809
|
-
const
|
|
2810
|
-
|
|
2809
|
+
setCategory(e, r) {
|
|
2810
|
+
const s = this.getOrCreateStreamEntry(e);
|
|
2811
|
+
s.category !== r && (s.category = r, this.notify(e));
|
|
2811
2812
|
}
|
|
2812
2813
|
getSnapshot(e) {
|
|
2813
|
-
const
|
|
2814
|
-
return
|
|
2815
|
-
...
|
|
2814
|
+
const r = this.streams.get(e);
|
|
2815
|
+
return r ? {
|
|
2816
|
+
...r.store.getSnapshot(),
|
|
2816
2817
|
streamId: e,
|
|
2817
|
-
category:
|
|
2818
|
+
category: r.category
|
|
2818
2819
|
} : void 0;
|
|
2819
2820
|
}
|
|
2820
2821
|
getSnapshots() {
|
|
2821
2822
|
const e = [];
|
|
2822
|
-
for (const [
|
|
2823
|
-
const i =
|
|
2823
|
+
for (const [r, s] of this.streams) {
|
|
2824
|
+
const i = s.store.getSnapshot();
|
|
2824
2825
|
e.push({
|
|
2825
2826
|
...i,
|
|
2826
|
-
streamId:
|
|
2827
|
-
category:
|
|
2827
|
+
streamId: r,
|
|
2828
|
+
category: s.category
|
|
2828
2829
|
});
|
|
2829
2830
|
}
|
|
2830
2831
|
return e;
|
|
@@ -2835,32 +2836,32 @@ class An {
|
|
|
2835
2836
|
};
|
|
2836
2837
|
}
|
|
2837
2838
|
getOrCreateStreamEntry(e) {
|
|
2838
|
-
let
|
|
2839
|
-
return
|
|
2839
|
+
let r = this.streams.get(e);
|
|
2840
|
+
return r || (r = { store: new dn() }, this.streams.set(e, r)), r;
|
|
2840
2841
|
}
|
|
2841
2842
|
notify(e) {
|
|
2842
|
-
for (const
|
|
2843
|
-
|
|
2843
|
+
for (const r of this.listeners)
|
|
2844
|
+
r(e);
|
|
2844
2845
|
}
|
|
2845
2846
|
}
|
|
2846
|
-
function j(t, e,
|
|
2847
|
+
function j(t, e, r) {
|
|
2847
2848
|
if (e.length === 0)
|
|
2848
2849
|
return t;
|
|
2849
|
-
const
|
|
2850
|
+
const s = /* @__PURE__ */ new Map();
|
|
2850
2851
|
for (const i of e)
|
|
2851
|
-
|
|
2852
|
-
return $t(t,
|
|
2852
|
+
s.set(i.nodeId, i);
|
|
2853
|
+
return $t(t, s);
|
|
2853
2854
|
}
|
|
2854
|
-
function $t(t, e,
|
|
2855
|
-
const
|
|
2855
|
+
function $t(t, e, r) {
|
|
2856
|
+
const s = e.get(t.id);
|
|
2856
2857
|
let i = t, n = !1;
|
|
2857
|
-
if (
|
|
2858
|
-
const u = Cn(t,
|
|
2858
|
+
if (s?.textUpdates && s.textUpdates.length > 0) {
|
|
2859
|
+
const u = Cn(t, s.textUpdates);
|
|
2859
2860
|
i = u.node, n = u.changed;
|
|
2860
2861
|
}
|
|
2861
2862
|
let o = !1, a = i.props;
|
|
2862
|
-
if (
|
|
2863
|
-
for (const [u, y] of
|
|
2863
|
+
if (s?.changedProps && s.changedProps.size > 0)
|
|
2864
|
+
for (const [u, y] of s.changedProps.entries()) {
|
|
2864
2865
|
const d = a[u];
|
|
2865
2866
|
if (y === void 0)
|
|
2866
2867
|
(d !== void 0 || u in a) && (o || (a = v(a), o = !0), delete a[u]);
|
|
@@ -2870,14 +2871,14 @@ function $t(t, e, s) {
|
|
|
2870
2871
|
} else
|
|
2871
2872
|
k(y, d) || (o || (a = v(a), o = !0), a[u] = y);
|
|
2872
2873
|
}
|
|
2873
|
-
let
|
|
2874
|
-
|
|
2875
|
-
const
|
|
2876
|
-
let
|
|
2877
|
-
if (
|
|
2878
|
-
const u =
|
|
2879
|
-
if (
|
|
2880
|
-
const y = [...
|
|
2874
|
+
let I = !1, h = i.styleIds;
|
|
2875
|
+
s?.styleIds !== void 0 && (zt(i.styleIds, s.styleIds) || (h = s.styleIds, I = !0));
|
|
2876
|
+
const l = i.children ?? [];
|
|
2877
|
+
let E = l, c = !1;
|
|
2878
|
+
if (s?.removals && s.removals.length > 0 || s?.moves && s.moves.length > 0 || s?.inserts && s.inserts.length > 0) {
|
|
2879
|
+
const u = E.slice();
|
|
2880
|
+
if (s?.removals && s.removals.length > 0) {
|
|
2881
|
+
const y = [...s.removals].sort((d, A) => A.index - d.index);
|
|
2881
2882
|
for (const d of y)
|
|
2882
2883
|
if (d.index >= 0 && d.index < u.length && u[d.index].id === d.nodeId)
|
|
2883
2884
|
u.splice(d.index, 1);
|
|
@@ -2885,10 +2886,10 @@ function $t(t, e, s) {
|
|
|
2885
2886
|
const A = u.findIndex((R) => R.id === d.nodeId);
|
|
2886
2887
|
A >= 0 && u.splice(A, 1);
|
|
2887
2888
|
}
|
|
2888
|
-
|
|
2889
|
+
c = !0;
|
|
2889
2890
|
}
|
|
2890
|
-
if (
|
|
2891
|
-
const y = [...
|
|
2891
|
+
if (s?.moves && s.moves.length > 0) {
|
|
2892
|
+
const y = [...s.moves].sort((A, R) => A.toIndex - R.toIndex), d = /* @__PURE__ */ new Map();
|
|
2892
2893
|
for (const A of y) {
|
|
2893
2894
|
const R = u.findIndex(($) => $.id === A.nodeId);
|
|
2894
2895
|
R >= 0 && (d.set(A.nodeId, u[R]), u.splice(R, 1));
|
|
@@ -2900,35 +2901,36 @@ function $t(t, e, s) {
|
|
|
2900
2901
|
u.splice($, 0, R);
|
|
2901
2902
|
}
|
|
2902
2903
|
}
|
|
2903
|
-
|
|
2904
|
+
c = !0;
|
|
2904
2905
|
}
|
|
2905
|
-
if (
|
|
2906
|
-
const y = [...
|
|
2906
|
+
if (s?.inserts && s.inserts.length > 0) {
|
|
2907
|
+
const y = [...s.inserts].sort((d, A) => d.index - A.index);
|
|
2907
2908
|
for (const d of y) {
|
|
2908
2909
|
const A = Math.min(d.index, u.length);
|
|
2909
2910
|
u.splice(A, 0, d.node);
|
|
2910
2911
|
}
|
|
2911
|
-
|
|
2912
|
+
c = !0;
|
|
2912
2913
|
}
|
|
2913
|
-
|
|
2914
|
+
E = u;
|
|
2914
2915
|
}
|
|
2915
2916
|
let f;
|
|
2916
|
-
for (let u = 0; u <
|
|
2917
|
-
const y =
|
|
2918
|
-
d !== y && (f || (f =
|
|
2917
|
+
for (let u = 0; u < E.length; u++) {
|
|
2918
|
+
const y = E[u], d = $t(y, e);
|
|
2919
|
+
d !== y && (f || (f = E.slice()), f[u] = d);
|
|
2919
2920
|
}
|
|
2920
|
-
return f && (
|
|
2921
|
+
return f && (E = f, c = !0), n || o || I || c ? !o && !c && !I ? i : {
|
|
2921
2922
|
id: t.id,
|
|
2922
2923
|
type: t.type,
|
|
2923
2924
|
props: o ? a : i.props,
|
|
2924
|
-
children:
|
|
2925
|
-
styleIds:
|
|
2925
|
+
children: c ? E : l,
|
|
2926
|
+
styleIds: I ? h : i.styleIds,
|
|
2927
|
+
...t.sourceMarker ? { sourceMarker: t.sourceMarker } : {}
|
|
2926
2928
|
} : t;
|
|
2927
2929
|
}
|
|
2928
2930
|
function p(t, e) {
|
|
2929
2931
|
if (e.add(t.id), t.children)
|
|
2930
|
-
for (const
|
|
2931
|
-
p(
|
|
2932
|
+
for (const r of t.children)
|
|
2933
|
+
p(r, e);
|
|
2932
2934
|
}
|
|
2933
2935
|
const x = [];
|
|
2934
2936
|
function Sn(t) {
|
|
@@ -2936,24 +2938,24 @@ function Sn(t) {
|
|
|
2936
2938
|
x.push(/* @__PURE__ */ new Map());
|
|
2937
2939
|
return x[t].clear(), x[t];
|
|
2938
2940
|
}
|
|
2939
|
-
function H(t, e,
|
|
2940
|
-
jt(t, e,
|
|
2941
|
+
function H(t, e, r) {
|
|
2942
|
+
jt(t, e, r, 0);
|
|
2941
2943
|
}
|
|
2942
|
-
function jt(t, e,
|
|
2944
|
+
function jt(t, e, r, s) {
|
|
2943
2945
|
if (t === e)
|
|
2944
2946
|
return;
|
|
2945
|
-
(t.type !== e.type || !yn(t.props, e.props) || !zt(t.styleIds, e.styleIds)) &&
|
|
2947
|
+
(t.type !== e.type || !yn(t.props, e.props) || !zt(t.styleIds, e.styleIds)) && r.add(e.id);
|
|
2946
2948
|
const n = t.children ?? [], o = e.children ?? [];
|
|
2947
2949
|
if (n !== o) {
|
|
2948
|
-
const a = Sn(
|
|
2950
|
+
const a = Sn(s);
|
|
2949
2951
|
for (const h of n)
|
|
2950
2952
|
a.set(h.id, h);
|
|
2951
|
-
let
|
|
2953
|
+
let I = !1;
|
|
2952
2954
|
for (let h = 0; h < o.length; h++) {
|
|
2953
|
-
const
|
|
2954
|
-
|
|
2955
|
+
const l = o[h], E = a.get(l.id);
|
|
2956
|
+
E ? (jt(E, l, r, s + 1), !I && h < n.length && n[h].id !== l.id && (I = !0)) : (p(l, r), I = !0);
|
|
2955
2957
|
}
|
|
2956
|
-
(n.length !== o.length ||
|
|
2958
|
+
(n.length !== o.length || I) && r.add(e.id);
|
|
2957
2959
|
}
|
|
2958
2960
|
}
|
|
2959
2961
|
function yn(t, e) {
|
|
@@ -2963,10 +2965,10 @@ function Xt(t, e) {
|
|
|
2963
2965
|
if (t.id === e)
|
|
2964
2966
|
return t;
|
|
2965
2967
|
if (t.children)
|
|
2966
|
-
for (const
|
|
2967
|
-
const
|
|
2968
|
-
if (
|
|
2969
|
-
return
|
|
2968
|
+
for (const r of t.children) {
|
|
2969
|
+
const s = Xt(r, e);
|
|
2970
|
+
if (s)
|
|
2971
|
+
return s;
|
|
2970
2972
|
}
|
|
2971
2973
|
}
|
|
2972
2974
|
function zt(t, e) {
|
|
@@ -2975,9 +2977,9 @@ function zt(t, e) {
|
|
|
2975
2977
|
function Nn(t, e) {
|
|
2976
2978
|
if (t === e) return !0;
|
|
2977
2979
|
if (!t || !e || t.length !== e.length) return !1;
|
|
2978
|
-
for (let
|
|
2979
|
-
const
|
|
2980
|
-
if (
|
|
2980
|
+
for (let r = 0; r < t.length; r++) {
|
|
2981
|
+
const s = t[r], i = e[r];
|
|
2982
|
+
if (s.id !== i.id || s.actionId !== i.actionId || s.ordinal !== i.ordinal || s.baseVersion !== i.baseVersion)
|
|
2981
2983
|
return !1;
|
|
2982
2984
|
}
|
|
2983
2985
|
return !0;
|
|
@@ -2985,80 +2987,81 @@ function Nn(t, e) {
|
|
|
2985
2987
|
function wn(t, e) {
|
|
2986
2988
|
if (e.length === 0)
|
|
2987
2989
|
return t;
|
|
2988
|
-
const
|
|
2989
|
-
let
|
|
2990
|
-
for (const n of
|
|
2991
|
-
const o = at(n.start + i, 0,
|
|
2990
|
+
const r = [...e].sort((n, o) => n.start - o.start);
|
|
2991
|
+
let s = t, i = 0;
|
|
2992
|
+
for (const n of r) {
|
|
2993
|
+
const o = at(n.start + i, 0, s.length);
|
|
2992
2994
|
if (n.end == null) {
|
|
2993
|
-
const
|
|
2994
|
-
|
|
2995
|
+
const l = s.slice(o), E = Un(l, n.insertedText);
|
|
2996
|
+
s = s.slice(0, o) + n.insertedText + l.slice(E), i += n.insertedText.length - E;
|
|
2995
2997
|
continue;
|
|
2996
2998
|
}
|
|
2997
|
-
const a = n.end + i,
|
|
2998
|
-
|
|
2999
|
+
const a = n.end + i, I = at(a, o, s.length), h = I - o;
|
|
3000
|
+
s = s.slice(0, o) + n.insertedText + s.slice(I), i += n.insertedText.length - h;
|
|
2999
3001
|
}
|
|
3000
|
-
return
|
|
3002
|
+
return s;
|
|
3001
3003
|
}
|
|
3002
|
-
function Cn(t, e,
|
|
3004
|
+
function Cn(t, e, r) {
|
|
3003
3005
|
if (e.length === 0)
|
|
3004
3006
|
return { node: t, changed: !1 };
|
|
3005
|
-
const
|
|
3007
|
+
const s = /* @__PURE__ */ new Map();
|
|
3006
3008
|
for (const i of e) {
|
|
3007
|
-
const n =
|
|
3008
|
-
n ? n.push(i) :
|
|
3009
|
+
const n = s.get(i.nodeId);
|
|
3010
|
+
n ? n.push(i) : s.set(i.nodeId, [i]);
|
|
3009
3011
|
}
|
|
3010
|
-
return Jt(t,
|
|
3012
|
+
return Jt(t, s);
|
|
3011
3013
|
}
|
|
3012
|
-
function Jt(t, e,
|
|
3013
|
-
const
|
|
3014
|
+
function Jt(t, e, r) {
|
|
3015
|
+
const s = e.get(t.id) ?? [];
|
|
3014
3016
|
let i = !1, n = t.props;
|
|
3015
|
-
if (
|
|
3017
|
+
if (s.length > 0) {
|
|
3016
3018
|
const h = /* @__PURE__ */ new Map();
|
|
3017
|
-
for (const
|
|
3018
|
-
const
|
|
3019
|
-
|
|
3019
|
+
for (const l of s) {
|
|
3020
|
+
const E = h.get(l.propertyName);
|
|
3021
|
+
E ? E.push(l) : h.set(l.propertyName, [l]);
|
|
3020
3022
|
}
|
|
3021
|
-
for (const [
|
|
3022
|
-
const
|
|
3023
|
-
i || (n = v(n), i = !0), n[
|
|
3023
|
+
for (const [l, E] of h.entries()) {
|
|
3024
|
+
const c = n[l], f = wn(typeof c == "string" ? c : "", E);
|
|
3025
|
+
i || (n = v(n), i = !0), n[l] = f;
|
|
3024
3026
|
}
|
|
3025
3027
|
}
|
|
3026
3028
|
let o = !1;
|
|
3027
3029
|
const a = t.children ?? [];
|
|
3028
|
-
let
|
|
3030
|
+
let I = a;
|
|
3029
3031
|
if (a.length > 0) {
|
|
3030
3032
|
let h;
|
|
3031
|
-
for (let
|
|
3032
|
-
const
|
|
3033
|
-
|
|
3033
|
+
for (let l = 0; l < a.length; l++) {
|
|
3034
|
+
const E = a[l], c = Jt(E, e);
|
|
3035
|
+
c.changed && (h || (h = [...a]), h[l] = c.node);
|
|
3034
3036
|
}
|
|
3035
|
-
h && (
|
|
3037
|
+
h && (I = h, o = !0);
|
|
3036
3038
|
}
|
|
3037
3039
|
return !i && !o ? { node: t, changed: !1 } : {
|
|
3038
3040
|
node: {
|
|
3039
3041
|
id: t.id,
|
|
3040
3042
|
type: t.type,
|
|
3041
3043
|
props: i ? n : t.props,
|
|
3042
|
-
children: o ?
|
|
3043
|
-
styleIds: t.styleIds
|
|
3044
|
+
children: o ? I : a,
|
|
3045
|
+
styleIds: t.styleIds,
|
|
3046
|
+
...t.sourceMarker ? { sourceMarker: t.sourceMarker } : {}
|
|
3044
3047
|
},
|
|
3045
3048
|
changed: !0
|
|
3046
3049
|
};
|
|
3047
3050
|
}
|
|
3048
|
-
function at(t, e,
|
|
3049
|
-
return Math.max(e, Math.min(
|
|
3051
|
+
function at(t, e, r) {
|
|
3052
|
+
return Math.max(e, Math.min(r, t));
|
|
3050
3053
|
}
|
|
3051
3054
|
function Un(t, e) {
|
|
3052
|
-
const
|
|
3053
|
-
let
|
|
3054
|
-
for (;
|
|
3055
|
-
|
|
3056
|
-
return
|
|
3055
|
+
const r = Math.min(t.length, e.length);
|
|
3056
|
+
let s = 0;
|
|
3057
|
+
for (; s < r && t.charCodeAt(s) === e.charCodeAt(s); )
|
|
3058
|
+
s++;
|
|
3059
|
+
return s;
|
|
3057
3060
|
}
|
|
3058
3061
|
function v(t) {
|
|
3059
|
-
const e = {},
|
|
3060
|
-
for (let
|
|
3061
|
-
const i = s
|
|
3062
|
+
const e = {}, r = Object.keys(t);
|
|
3063
|
+
for (let s = 0; s < r.length; s++) {
|
|
3064
|
+
const i = r[s];
|
|
3062
3065
|
e[i] = t[i];
|
|
3063
3066
|
}
|
|
3064
3067
|
return e;
|
|
@@ -3072,16 +3075,16 @@ function k(t, e) {
|
|
|
3072
3075
|
if (Array.isArray(t) && Array.isArray(e)) {
|
|
3073
3076
|
if (t.length !== e.length)
|
|
3074
3077
|
return !1;
|
|
3075
|
-
for (let
|
|
3076
|
-
if (!k(t[
|
|
3078
|
+
for (let r = 0; r < t.length; r++)
|
|
3079
|
+
if (!k(t[r], e[r]))
|
|
3077
3080
|
return !1;
|
|
3078
3081
|
return !0;
|
|
3079
3082
|
}
|
|
3080
3083
|
if (q(t) && q(e)) {
|
|
3081
|
-
const
|
|
3082
|
-
if (
|
|
3084
|
+
const r = Object.keys(t), s = Object.keys(e);
|
|
3085
|
+
if (r.length !== s.length)
|
|
3083
3086
|
return !1;
|
|
3084
|
-
for (const i of
|
|
3087
|
+
for (const i of r)
|
|
3085
3088
|
if (!k(t[i], e[i]))
|
|
3086
3089
|
return !1;
|
|
3087
3090
|
return !0;
|
|
@@ -3090,7 +3093,7 @@ function k(t, e) {
|
|
|
3090
3093
|
}
|
|
3091
3094
|
function Dn(t) {
|
|
3092
3095
|
return new Worker(
|
|
3093
|
-
"" + new URL("assets/ui-worker-
|
|
3096
|
+
"" + new URL("assets/ui-worker-RrFBjoKd.js", import.meta.url).href,
|
|
3094
3097
|
{
|
|
3095
3098
|
type: "module",
|
|
3096
3099
|
name: t?.name
|
|
@@ -3111,8 +3114,8 @@ class mn {
|
|
|
3111
3114
|
uiStreamClearedListeners = /* @__PURE__ */ new Set();
|
|
3112
3115
|
useUiWorker;
|
|
3113
3116
|
constructor(e) {
|
|
3114
|
-
const
|
|
3115
|
-
this.useUiWorker =
|
|
3117
|
+
const r = e?.threading?.uiWorker ?? "auto";
|
|
3118
|
+
this.useUiWorker = r !== "disabled" && typeof Worker < "u", e?.client && this.initialize(e.client, e);
|
|
3116
3119
|
}
|
|
3117
3120
|
dispose() {
|
|
3118
3121
|
this.unsubscribeProtocolMessages?.(), this.unsubscribeState?.(), this.uiWorker?.terminate(), this.uiWorker = null, this.client = null, this.uiStyleListeners.clear(), this.uiStyleDeleteListeners.clear(), this.uiStyles.clear();
|
|
@@ -3146,9 +3149,9 @@ class mn {
|
|
|
3146
3149
|
getUiStyles() {
|
|
3147
3150
|
return Array.from(this.uiStyles.values());
|
|
3148
3151
|
}
|
|
3149
|
-
initialize(e,
|
|
3150
|
-
this.client = e, this.useUiWorker && this.startUiWorker(
|
|
3151
|
-
const
|
|
3152
|
+
initialize(e, r) {
|
|
3153
|
+
this.client = e, this.useUiWorker && this.startUiWorker(r);
|
|
3154
|
+
const s = {
|
|
3152
3155
|
opcodeGroupsMask: m.GROUP_CORE | m.GROUP_UI | m.GROUP_ACTIONS
|
|
3153
3156
|
};
|
|
3154
3157
|
this.unsubscribeProtocolMessages = e.subscribeToProtocolMessages((n) => {
|
|
@@ -3157,7 +3160,7 @@ class mn {
|
|
|
3157
3160
|
return;
|
|
3158
3161
|
}
|
|
3159
3162
|
this.handleProtocolMessage(n);
|
|
3160
|
-
},
|
|
3163
|
+
}, s);
|
|
3161
3164
|
let i = !1;
|
|
3162
3165
|
this.unsubscribeState = e.subscribeToState((n) => {
|
|
3163
3166
|
n === "reconnecting" ? i = !0 : n === "connected" && i ? (i = !1, this.clearAllState()) : (i = !1, (n === "offline" || n === "offlineError") && this.clearAllState());
|
|
@@ -3170,8 +3173,8 @@ class mn {
|
|
|
3170
3173
|
L.warn("Failed to create UI worker, falling back to main thread", i), this.uiWorker = null;
|
|
3171
3174
|
return;
|
|
3172
3175
|
}
|
|
3173
|
-
const
|
|
3174
|
-
this.uiWorker.postMessage({ type: "configure", flushIntervalMs:
|
|
3176
|
+
const r = e?.threading?.flushIntervalMs, s = e?.threading?.maxLatencyMs;
|
|
3177
|
+
this.uiWorker.postMessage({ type: "configure", flushIntervalMs: r, maxLatencyMs: s }), this.uiWorker.addEventListener("message", (i) => {
|
|
3175
3178
|
this.handleUiStoreOpBatch(i.data);
|
|
3176
3179
|
}), this.uiWorker.addEventListener("error", (i) => {
|
|
3177
3180
|
const n = [i.message, i.filename, i.lineno, i.colno].filter((o) => o != null && String(o).length > 0);
|
|
@@ -3182,36 +3185,36 @@ class mn {
|
|
|
3182
3185
|
for (const e of this.uiStore.getSnapshots()) {
|
|
3183
3186
|
if (!e.rootViewId)
|
|
3184
3187
|
continue;
|
|
3185
|
-
const
|
|
3186
|
-
if (!
|
|
3188
|
+
const r = e.views.get(e.rootViewId);
|
|
3189
|
+
if (!r)
|
|
3187
3190
|
continue;
|
|
3188
|
-
const
|
|
3191
|
+
const s = {
|
|
3189
3192
|
snapshot: {
|
|
3190
3193
|
type: "full",
|
|
3191
3194
|
version: e.version ?? 0,
|
|
3192
3195
|
metadata: { viewId: e.rootViewId },
|
|
3193
|
-
root:
|
|
3196
|
+
root: r
|
|
3194
3197
|
},
|
|
3195
3198
|
payloads: e.payloads
|
|
3196
3199
|
};
|
|
3197
|
-
this.uiStore.apply(e.streamId,
|
|
3200
|
+
this.uiStore.apply(e.streamId, s);
|
|
3198
3201
|
}
|
|
3199
3202
|
}
|
|
3200
3203
|
forwardMessageToWorker(e) {
|
|
3201
3204
|
if (this.uiWorker)
|
|
3202
3205
|
try {
|
|
3203
|
-
const
|
|
3204
|
-
this.uiWorker.postMessage({ type: "protocol", message:
|
|
3205
|
-
} catch (
|
|
3206
|
-
L.warn("Failed to forward message to UI worker",
|
|
3206
|
+
const r = e.slice().buffer;
|
|
3207
|
+
this.uiWorker.postMessage({ type: "protocol", message: r }, [r]);
|
|
3208
|
+
} catch (r) {
|
|
3209
|
+
L.warn("Failed to forward message to UI worker", r);
|
|
3207
3210
|
}
|
|
3208
3211
|
}
|
|
3209
3212
|
handleUiStoreOpBatch(e) {
|
|
3210
|
-
for (const
|
|
3211
|
-
this.applyUiStoreOp(
|
|
3213
|
+
for (const r of e.ops)
|
|
3214
|
+
this.applyUiStoreOp(r);
|
|
3212
3215
|
if (e.acks && e.acks.length > 0)
|
|
3213
|
-
for (const
|
|
3214
|
-
this.sendUiUpdateAck(
|
|
3216
|
+
for (const r of e.acks)
|
|
3217
|
+
this.sendUiUpdateAck(r.trackId, r.version, r.senderId);
|
|
3215
3218
|
}
|
|
3216
3219
|
applyUiStoreOp(e) {
|
|
3217
3220
|
if (e.type === "UpsertUiStyle") {
|
|
@@ -3237,7 +3240,7 @@ class mn {
|
|
|
3237
3240
|
if (e.type === "ReplaceStreamSnapshot" || e.type === "PatchStreamSnapshot") {
|
|
3238
3241
|
if (!this.uiStore.applyStoreOp(e))
|
|
3239
3242
|
return;
|
|
3240
|
-
const
|
|
3243
|
+
const s = e.type === "ReplaceStreamSnapshot" ? e.snapshot.streamId : e.streamId, i = this.uiStore.getSnapshot(s);
|
|
3241
3244
|
if (!i?.rootViewId)
|
|
3242
3245
|
return;
|
|
3243
3246
|
const n = i.views.get(i.rootViewId);
|
|
@@ -3252,7 +3255,7 @@ class mn {
|
|
|
3252
3255
|
},
|
|
3253
3256
|
payloads: i.payloads
|
|
3254
3257
|
};
|
|
3255
|
-
this.notifyUiUpdate(
|
|
3258
|
+
this.notifyUiUpdate(s, o);
|
|
3256
3259
|
return;
|
|
3257
3260
|
}
|
|
3258
3261
|
}
|
|
@@ -3281,89 +3284,89 @@ class mn {
|
|
|
3281
3284
|
}
|
|
3282
3285
|
}
|
|
3283
3286
|
handleGlobalState(e) {
|
|
3284
|
-
|
|
3285
|
-
const
|
|
3286
|
-
for (const i of Object.values(
|
|
3287
|
-
|
|
3287
|
+
Ls(e).then((r) => {
|
|
3288
|
+
const s = /* @__PURE__ */ new Set();
|
|
3289
|
+
for (const i of Object.values(r.UIStreams ?? {}))
|
|
3290
|
+
s.add(i.StreamId), this.uiStore.setCategory(i.StreamId, i.Info?.Category);
|
|
3288
3291
|
for (const i of this.uiStore.getSnapshots())
|
|
3289
|
-
|
|
3290
|
-
}).catch((
|
|
3291
|
-
L.error("Failed to handle global state",
|
|
3292
|
+
s.has(i.streamId) || (this.uiStore.remove(i.streamId), this.notifyUiStreamCleared(i.streamId));
|
|
3293
|
+
}).catch((r) => {
|
|
3294
|
+
L.error("Failed to handle global state", r);
|
|
3292
3295
|
});
|
|
3293
3296
|
}
|
|
3294
3297
|
handleUiUpdate(e) {
|
|
3295
|
-
const
|
|
3298
|
+
const r = nt(e), s = `${r.senderId}_${r.trackId}`;
|
|
3296
3299
|
Qi(e).then((i) => {
|
|
3297
3300
|
const n = fn(i);
|
|
3298
|
-
this.notifyUiUpdate(
|
|
3301
|
+
this.notifyUiUpdate(s, n), this.uiStore.apply(s, n), this.sendUiUpdateAck(r.trackId, n.snapshot.version, r.senderId);
|
|
3299
3302
|
}).catch((i) => {
|
|
3300
3303
|
i instanceof D ? L.warn("Failed to parse UI update", i.causeError ?? i) : L.error("Failed to apply UI update", i);
|
|
3301
3304
|
});
|
|
3302
3305
|
}
|
|
3303
3306
|
handleUiStyles(e) {
|
|
3304
|
-
Ni(e).then((
|
|
3305
|
-
if (!
|
|
3306
|
-
const
|
|
3307
|
-
styleId:
|
|
3308
|
-
css:
|
|
3309
|
-
common:
|
|
3307
|
+
Ni(e).then((r) => {
|
|
3308
|
+
if (!r.StyleId) return;
|
|
3309
|
+
const s = {
|
|
3310
|
+
styleId: r.StyleId,
|
|
3311
|
+
css: r.Style?.css,
|
|
3312
|
+
common: r.Style?.common
|
|
3310
3313
|
};
|
|
3311
|
-
this.uiStyles.set(
|
|
3312
|
-
}).catch((
|
|
3313
|
-
L.error("Failed to handle UI styles",
|
|
3314
|
+
this.uiStyles.set(s.styleId, s), this.notifyUiStyle(s);
|
|
3315
|
+
}).catch((r) => {
|
|
3316
|
+
L.error("Failed to handle UI styles", r);
|
|
3314
3317
|
});
|
|
3315
3318
|
}
|
|
3316
3319
|
handleUiStylesBatch(e) {
|
|
3317
|
-
Oi(e).then((
|
|
3318
|
-
if (
|
|
3319
|
-
for (const
|
|
3320
|
-
if (!
|
|
3320
|
+
Oi(e).then((r) => {
|
|
3321
|
+
if (r.Styles)
|
|
3322
|
+
for (const s of r.Styles) {
|
|
3323
|
+
if (!s.StyleId) continue;
|
|
3321
3324
|
const i = {
|
|
3322
|
-
styleId:
|
|
3323
|
-
css:
|
|
3324
|
-
common:
|
|
3325
|
+
styleId: s.StyleId,
|
|
3326
|
+
css: s.Style?.css,
|
|
3327
|
+
common: s.Style?.common
|
|
3325
3328
|
};
|
|
3326
3329
|
this.uiStyles.set(i.styleId, i), this.notifyUiStyle(i);
|
|
3327
3330
|
}
|
|
3328
|
-
}).catch((
|
|
3329
|
-
L.error("Failed to handle UI styles batch",
|
|
3331
|
+
}).catch((r) => {
|
|
3332
|
+
L.error("Failed to handle UI styles batch", r);
|
|
3330
3333
|
});
|
|
3331
3334
|
}
|
|
3332
3335
|
handleUiStylesDelete(e) {
|
|
3333
|
-
Wi(e).then((
|
|
3334
|
-
if (!(!
|
|
3335
|
-
for (const
|
|
3336
|
-
this.uiStyles.delete(
|
|
3337
|
-
this.notifyUiStyleDelete(
|
|
3338
|
-
}
|
|
3339
|
-
}).catch((
|
|
3340
|
-
L.error("Failed to handle UI styles delete",
|
|
3336
|
+
Wi(e).then((r) => {
|
|
3337
|
+
if (!(!r.StyleIds || r.StyleIds.length === 0)) {
|
|
3338
|
+
for (const s of r.StyleIds)
|
|
3339
|
+
this.uiStyles.delete(s);
|
|
3340
|
+
this.notifyUiStyleDelete(r.StyleIds);
|
|
3341
|
+
}
|
|
3342
|
+
}).catch((r) => {
|
|
3343
|
+
L.error("Failed to handle UI styles delete", r);
|
|
3341
3344
|
});
|
|
3342
3345
|
}
|
|
3343
3346
|
handleClearStream(e) {
|
|
3344
|
-
const
|
|
3345
|
-
this.uiStore.clear(
|
|
3347
|
+
const r = nt(e), s = `${r.senderId}_${r.trackId}`;
|
|
3348
|
+
this.uiStore.clear(s), this.notifyUiStreamCleared(s);
|
|
3346
3349
|
}
|
|
3347
|
-
notifyUiUpdate(e,
|
|
3348
|
-
for (const
|
|
3349
|
-
|
|
3350
|
+
notifyUiUpdate(e, r) {
|
|
3351
|
+
for (const s of this.uiUpdateListeners)
|
|
3352
|
+
s(e, r);
|
|
3350
3353
|
}
|
|
3351
3354
|
notifyUiStyle(e) {
|
|
3352
|
-
for (const
|
|
3353
|
-
|
|
3355
|
+
for (const r of this.uiStyleListeners)
|
|
3356
|
+
r(e);
|
|
3354
3357
|
}
|
|
3355
3358
|
notifyUiStyleDelete(e) {
|
|
3356
|
-
for (const
|
|
3357
|
-
|
|
3359
|
+
for (const r of this.uiStyleDeleteListeners)
|
|
3360
|
+
r(e);
|
|
3358
3361
|
}
|
|
3359
3362
|
notifyUiStreamCleared(e) {
|
|
3360
|
-
for (const
|
|
3361
|
-
|
|
3363
|
+
for (const r of this.uiStreamClearedListeners)
|
|
3364
|
+
r(e);
|
|
3362
3365
|
}
|
|
3363
|
-
sendUiUpdateAck(e,
|
|
3364
|
-
if (this.client && !(!Number.isFinite(
|
|
3366
|
+
sendUiUpdateAck(e, r, s) {
|
|
3367
|
+
if (this.client && !(!Number.isFinite(r) || r < 0))
|
|
3365
3368
|
try {
|
|
3366
|
-
const i =
|
|
3369
|
+
const i = s !== void 0 ? { trackId: e, targetIds: [s] } : { trackId: e }, n = nn({ Version: r }, this.client.sessionId ?? 0, i);
|
|
3367
3370
|
this.client.sendProtocolMessage(n);
|
|
3368
3371
|
} catch (i) {
|
|
3369
3372
|
L.warn("Failed to send UI update ack", i);
|