@ikonai/sdk-ui 1.0.74 → 1.0.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{audio-playback-worker-DLkTvKgj.js → audio-playback-worker-DDtsnLoq.js} +41 -41
- package/assets/{protocol-worker-BfR3vj38.js → protocol-worker-BoZcMF0x.js} +10 -10
- package/assets/{ui-worker-D4YPac0e.js → ui-worker-Di0peIgz.js} +667 -638
- package/assets/{video-capture-worker-ZDlmU6Ta.js → video-capture-worker-DxgvFTcw.js} +372 -372
- package/assets/{video-playback-worker-BMnMLk3U.js → video-playback-worker-Ca4XVGqt.js} +20 -20
- package/assets/{viseme-worker-BOyyqInI.js → viseme-worker-DVWM4pRh.js} +9 -9
- package/ikon-ui-core.d.ts +3 -0
- package/index.js +1417 -1355
- package/package.json +1 -1
- package/ui-store-ops.d.ts +4 -0
- package/ui-store.d.ts +6 -0
package/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { createLogger as Z, readOpcode as
|
|
2
|
-
const F = 27,
|
|
1
|
+
import { createLogger as Z, readOpcode as it, readProtocolMessageHeaders as ae } from "@ikonai/sdk";
|
|
2
|
+
const F = 27, ot = {
|
|
3
3
|
Compressed: 8
|
|
4
4
|
};
|
|
5
|
-
function
|
|
6
|
-
const t = x(e),
|
|
5
|
+
function at(e) {
|
|
6
|
+
const t = x(e), s = new DataView(t.buffer, t.byteOffset, t.byteLength);
|
|
7
7
|
if (t.length < F)
|
|
8
8
|
throw new Error("Protocol payload too short");
|
|
9
|
-
const
|
|
9
|
+
const r = s.getUint32(0, !0), n = s.getUint32(4, !0), i = s.getUint32(8, !0), o = s.getUint32(12, !0), a = s.getUint32(16, !0), I = s.getUint32(20, !0), _ = s.getUint8(24), l = s.getUint8(25), E = s.getUint8(26);
|
|
10
10
|
if (F + I * 4 > t.length)
|
|
11
11
|
throw new Error("Protocol header exceeds payload length");
|
|
12
12
|
const T = [];
|
|
13
13
|
let N = F;
|
|
14
14
|
for (let g = 0; g < I; g++)
|
|
15
|
-
T.push(
|
|
15
|
+
T.push(s.getUint32(N, !0)), N += 4;
|
|
16
16
|
return {
|
|
17
|
-
length:
|
|
17
|
+
length: r,
|
|
18
18
|
opcode: n,
|
|
19
19
|
senderId: i,
|
|
20
20
|
trackId: o,
|
|
@@ -25,29 +25,29 @@ function it(e) {
|
|
|
25
25
|
flags: E
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
async function
|
|
29
|
-
const
|
|
28
|
+
async function G(e, t, s) {
|
|
29
|
+
const r = x(e), n = at(r);
|
|
30
30
|
if (t !== void 0 && n.opcode !== t)
|
|
31
31
|
throw new Error(`Unexpected opcode ${n.opcode}`);
|
|
32
32
|
if (n.payloadType !== 8)
|
|
33
33
|
throw new Error(`Unexpected payload type ${n.payloadType}`);
|
|
34
34
|
const i = F + n.targetIds.length * 4;
|
|
35
|
-
let o =
|
|
36
|
-
return (n.flags &
|
|
35
|
+
let o = r.subarray(i, n.length);
|
|
36
|
+
return (n.flags & ot.Compressed) !== 0 && (o = await lt(o)), o;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function he(e, t, s, r, n) {
|
|
39
39
|
const i = n?.trackId ?? 0, o = n?.sequenceId ?? 0, a = n?.flags ?? 0, I = n?.targetIds ?? [], _ = n?.payloadType ?? 8, l = F + I.length * 4, E = l + t.length, h = new Uint8Array(E), T = new DataView(h.buffer);
|
|
40
|
-
T.setUint32(0, E, !0), T.setUint32(4, e >>> 0, !0), T.setUint32(8,
|
|
40
|
+
T.setUint32(0, E, !0), T.setUint32(4, e >>> 0, !0), T.setUint32(8, r >>> 0, !0), T.setUint32(12, i >>> 0, !0), T.setUint32(16, o >>> 0, !0), T.setUint32(20, I.length >>> 0, !0), T.setUint8(24, s & 255), T.setUint8(25, _ & 255), T.setUint8(26, a & 255);
|
|
41
41
|
let N = F;
|
|
42
42
|
for (let g = 0; g < I.length; g++)
|
|
43
43
|
T.setUint32(N, I[g] >>> 0, !0), N += 4;
|
|
44
44
|
return h.set(t, l), h;
|
|
45
45
|
}
|
|
46
|
-
async function
|
|
46
|
+
async function lt(e) {
|
|
47
47
|
if (typeof DecompressionStream > "u")
|
|
48
48
|
throw new Error("DecompressionStream not supported");
|
|
49
|
-
const t = new DecompressionStream("gzip"),
|
|
50
|
-
|
|
49
|
+
const t = new DecompressionStream("gzip"), s = t.writable.getWriter(), r = new Uint8Array(e);
|
|
50
|
+
s.write(r), s.close();
|
|
51
51
|
const n = t.readable.getReader(), i = [];
|
|
52
52
|
let o = 0;
|
|
53
53
|
for (; ; ) {
|
|
@@ -62,77 +62,77 @@ async function at(e) {
|
|
|
62
62
|
return a;
|
|
63
63
|
}
|
|
64
64
|
var U = /* @__PURE__ */ ((e) => (e[e.Null = 1] = "Null", e[e.Bool = 2] = "Bool", e[e.Int32 = 3] = "Int32", e[e.Int64 = 4] = "Int64", e[e.UInt32 = 5] = "UInt32", e[e.UInt64 = 6] = "UInt64", e[e.Float32 = 7] = "Float32", e[e.Float64 = 8] = "Float64", e[e.Array = 9] = "Array", e[e.Dict = 10] = "Dict", e[e.Object = 11] = "Object", e[e.String = 12] = "String", e[e.Binary = 13] = "Binary", e[e.Guid = 14] = "Guid", e))(U || {});
|
|
65
|
-
const
|
|
66
|
-
class
|
|
65
|
+
const ue = 161, ce = 162, Y = new TextEncoder(), It = new TextDecoder("utf-8", { fatal: !0 });
|
|
66
|
+
class k {
|
|
67
67
|
constructor(t = 1) {
|
|
68
|
-
this.version = t, this.buffer.writeByte(
|
|
68
|
+
this.version = t, this.buffer.writeByte(ue), this.buffer.writeVarUInt(t >>> 0);
|
|
69
69
|
}
|
|
70
70
|
buffer = new b();
|
|
71
71
|
closed = !1;
|
|
72
72
|
cached;
|
|
73
|
-
writeInt32Field(t,
|
|
74
|
-
this.writeFixedField(t, 3, () => this.buffer.writeInt32(
|
|
73
|
+
writeInt32Field(t, s) {
|
|
74
|
+
this.writeFixedField(t, 3, () => this.buffer.writeInt32(s | 0));
|
|
75
75
|
}
|
|
76
|
-
writeUInt32Field(t,
|
|
77
|
-
this.writeFixedField(t, 5, () => this.buffer.writeUInt32(
|
|
76
|
+
writeUInt32Field(t, s) {
|
|
77
|
+
this.writeFixedField(t, 5, () => this.buffer.writeUInt32(s >>> 0));
|
|
78
78
|
}
|
|
79
|
-
writeInt64Field(t,
|
|
80
|
-
this.writeFixedField(t, 4, () => this.buffer.writeBigInt64(
|
|
79
|
+
writeInt64Field(t, s) {
|
|
80
|
+
this.writeFixedField(t, 4, () => this.buffer.writeBigInt64(s));
|
|
81
81
|
}
|
|
82
|
-
writeUInt64Field(t,
|
|
83
|
-
this.writeFixedField(t, 6, () => this.buffer.writeBigUInt64(
|
|
82
|
+
writeUInt64Field(t, s) {
|
|
83
|
+
this.writeFixedField(t, 6, () => this.buffer.writeBigUInt64(s));
|
|
84
84
|
}
|
|
85
|
-
writeFloat32Field(t,
|
|
86
|
-
this.writeFixedField(t, 7, () => this.buffer.writeFloat32(
|
|
85
|
+
writeFloat32Field(t, s) {
|
|
86
|
+
this.writeFixedField(t, 7, () => this.buffer.writeFloat32(s));
|
|
87
87
|
}
|
|
88
|
-
writeFloat64Field(t,
|
|
89
|
-
this.writeFixedField(t, 8, () => this.buffer.writeFloat64(
|
|
88
|
+
writeFloat64Field(t, s) {
|
|
89
|
+
this.writeFixedField(t, 8, () => this.buffer.writeFloat64(s));
|
|
90
90
|
}
|
|
91
|
-
writeBoolField(t,
|
|
92
|
-
this.writeFixedField(t, 2, () => this.buffer.writeByte(
|
|
91
|
+
writeBoolField(t, s) {
|
|
92
|
+
this.writeFixedField(t, 2, () => this.buffer.writeByte(s ? 1 : 0));
|
|
93
93
|
}
|
|
94
|
-
writeGuidField(t,
|
|
95
|
-
const
|
|
96
|
-
if (
|
|
94
|
+
writeGuidField(t, s) {
|
|
95
|
+
const r = s instanceof f ? s.asBytes() : s;
|
|
96
|
+
if (r.length !== 16)
|
|
97
97
|
throw new Error("Guid payload must be 16 bytes");
|
|
98
|
-
this.writeFixedField(t, 14, () => this.buffer.writeBytes(
|
|
98
|
+
this.writeFixedField(t, 14, () => this.buffer.writeBytes(r));
|
|
99
99
|
}
|
|
100
|
-
writeStringField(t,
|
|
101
|
-
const
|
|
102
|
-
this.writeVariableField(t, 12,
|
|
100
|
+
writeStringField(t, s) {
|
|
101
|
+
const r = Y.encode(s ?? "");
|
|
102
|
+
this.writeVariableField(t, 12, r);
|
|
103
103
|
}
|
|
104
|
-
writeBinaryField(t,
|
|
105
|
-
this.writeVariableField(t, 13,
|
|
104
|
+
writeBinaryField(t, s) {
|
|
105
|
+
this.writeVariableField(t, 13, s);
|
|
106
106
|
}
|
|
107
|
-
writeObjectField(t,
|
|
108
|
-
const n = new
|
|
109
|
-
|
|
107
|
+
writeObjectField(t, s, r) {
|
|
108
|
+
const n = new k(s);
|
|
109
|
+
r(n);
|
|
110
110
|
const i = n.finish();
|
|
111
111
|
this.writeVariableField(t, 11, i);
|
|
112
112
|
}
|
|
113
|
-
writeArrayField(t,
|
|
114
|
-
const n = new $(
|
|
115
|
-
|
|
113
|
+
writeArrayField(t, s, r) {
|
|
114
|
+
const n = new $(s);
|
|
115
|
+
r(n);
|
|
116
116
|
const i = n.finish();
|
|
117
117
|
this.writeVariableField(t, 9, i);
|
|
118
118
|
}
|
|
119
|
-
writeDictionaryField(t,
|
|
120
|
-
const i = new ee(
|
|
119
|
+
writeDictionaryField(t, s, r, n) {
|
|
120
|
+
const i = new ee(s, r);
|
|
121
121
|
n(i);
|
|
122
122
|
const o = i.finish();
|
|
123
123
|
this.writeVariableField(t, 10, o);
|
|
124
124
|
}
|
|
125
125
|
finish() {
|
|
126
|
-
return this.closed || (this.buffer.writeByte(
|
|
126
|
+
return this.closed || (this.buffer.writeByte(ce), this.closed = !0, this.cached = this.buffer.toUint8Array()), this.cached;
|
|
127
127
|
}
|
|
128
|
-
writeFixedField(t,
|
|
129
|
-
this.writeFieldHeader(t,
|
|
128
|
+
writeFixedField(t, s, r) {
|
|
129
|
+
this.writeFieldHeader(t, s, 0), r();
|
|
130
130
|
}
|
|
131
|
-
writeVariableField(t,
|
|
132
|
-
this.writeFieldHeader(t,
|
|
131
|
+
writeVariableField(t, s, r) {
|
|
132
|
+
this.writeFieldHeader(t, s, r.length), this.buffer.writeBytes(r);
|
|
133
133
|
}
|
|
134
|
-
writeFieldHeader(t,
|
|
135
|
-
this.buffer.writeUInt32(t >>> 0), this.buffer.writeByte(W(
|
|
134
|
+
writeFieldHeader(t, s, r) {
|
|
135
|
+
this.buffer.writeUInt32(t >>> 0), this.buffer.writeByte(W(s)), ct(s) && this.buffer.writeVarUInt(r >>> 0);
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
class $ {
|
|
@@ -188,18 +188,18 @@ class $ {
|
|
|
188
188
|
14
|
|
189
189
|
/* Guid */
|
|
190
190
|
), this.count++;
|
|
191
|
-
const
|
|
192
|
-
if (
|
|
191
|
+
const s = t instanceof f ? t.asBytes() : t;
|
|
192
|
+
if (s.length !== 16)
|
|
193
193
|
throw new Error("Guid payload must be 16 bytes");
|
|
194
|
-
this.payload.writeBytes(
|
|
194
|
+
this.payload.writeBytes(s);
|
|
195
195
|
}
|
|
196
196
|
writeString(t) {
|
|
197
197
|
this.ensureElementType(
|
|
198
198
|
12
|
|
199
199
|
/* String */
|
|
200
200
|
), this.count++;
|
|
201
|
-
const
|
|
202
|
-
this.payload.writeVarUInt(
|
|
201
|
+
const s = Y.encode(t ?? "");
|
|
202
|
+
this.payload.writeVarUInt(s.length), this.payload.writeBytes(s);
|
|
203
203
|
}
|
|
204
204
|
writeBinary(t) {
|
|
205
205
|
this.ensureElementType(
|
|
@@ -207,33 +207,33 @@ class $ {
|
|
|
207
207
|
/* Binary */
|
|
208
208
|
), this.count++, this.payload.writeVarUInt(t.length), this.payload.writeBytes(t);
|
|
209
209
|
}
|
|
210
|
-
writeObject(t,
|
|
210
|
+
writeObject(t, s) {
|
|
211
211
|
this.ensureElementType(
|
|
212
212
|
11
|
|
213
213
|
/* Object */
|
|
214
214
|
), this.count++;
|
|
215
|
-
const
|
|
216
|
-
r
|
|
217
|
-
const n =
|
|
215
|
+
const r = new k(t);
|
|
216
|
+
s(r);
|
|
217
|
+
const n = r.finish();
|
|
218
218
|
this.payload.writeVarUInt(n.length), this.payload.writeBytes(n);
|
|
219
219
|
}
|
|
220
|
-
writeArray(t,
|
|
220
|
+
writeArray(t, s) {
|
|
221
221
|
this.ensureElementType(
|
|
222
222
|
9
|
|
223
223
|
/* Array */
|
|
224
224
|
), this.count++;
|
|
225
|
-
const
|
|
226
|
-
r
|
|
227
|
-
const n =
|
|
225
|
+
const r = new $(t);
|
|
226
|
+
s(r);
|
|
227
|
+
const n = r.finish();
|
|
228
228
|
this.payload.writeBytes(n);
|
|
229
229
|
}
|
|
230
|
-
writeDictionary(t,
|
|
230
|
+
writeDictionary(t, s, r) {
|
|
231
231
|
this.ensureElementType(
|
|
232
232
|
10
|
|
233
233
|
/* Dict */
|
|
234
234
|
), this.count++;
|
|
235
|
-
const n = new ee(t,
|
|
236
|
-
|
|
235
|
+
const n = new ee(t, s);
|
|
236
|
+
r(n);
|
|
237
237
|
const i = n.finish();
|
|
238
238
|
this.payload.writeBytes(i);
|
|
239
239
|
}
|
|
@@ -247,8 +247,8 @@ class $ {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
class ee {
|
|
250
|
-
constructor(t,
|
|
251
|
-
this.keyType = t, this.valueType =
|
|
250
|
+
constructor(t, s) {
|
|
251
|
+
this.keyType = t, this.valueType = s, re(t);
|
|
252
252
|
}
|
|
253
253
|
payload = new b();
|
|
254
254
|
count = 0;
|
|
@@ -256,7 +256,7 @@ class ee {
|
|
|
256
256
|
beginEntry() {
|
|
257
257
|
if (this.entryOpen)
|
|
258
258
|
throw new Error("Previous dictionary entry not completed");
|
|
259
|
-
return this.count++, this.entryOpen = !0, new
|
|
259
|
+
return this.count++, this.entryOpen = !0, new Et(this.keyType, this.valueType, this.payload, () => {
|
|
260
260
|
this.entryOpen = !1;
|
|
261
261
|
});
|
|
262
262
|
}
|
|
@@ -267,9 +267,9 @@ class ee {
|
|
|
267
267
|
return t.writeByte(W(this.keyType)), t.writeByte(W(this.valueType)), t.writeVarUInt(this.count), t.writeBytes(this.payload.toUint8Array()), t.toUint8Array();
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
|
-
class
|
|
271
|
-
constructor(t,
|
|
272
|
-
this.keyType = t, this.valueType =
|
|
270
|
+
class Et {
|
|
271
|
+
constructor(t, s, r, n) {
|
|
272
|
+
this.keyType = t, this.valueType = s, this.payload = r, this.onComplete = n;
|
|
273
273
|
}
|
|
274
274
|
keyWritten = !1;
|
|
275
275
|
valueWritten = !1;
|
|
@@ -321,18 +321,18 @@ class It {
|
|
|
321
321
|
14
|
|
322
322
|
/* Guid */
|
|
323
323
|
);
|
|
324
|
-
const
|
|
325
|
-
if (
|
|
324
|
+
const s = t instanceof f ? t.asBytes() : t;
|
|
325
|
+
if (s.length !== 16)
|
|
326
326
|
throw new Error("Guid payload must be 16 bytes");
|
|
327
|
-
this.payload.writeBytes(
|
|
327
|
+
this.payload.writeBytes(s), this.keyWritten = !0;
|
|
328
328
|
}
|
|
329
329
|
writeKeyString(t) {
|
|
330
330
|
this.ensureKeyType(
|
|
331
331
|
12
|
|
332
332
|
/* String */
|
|
333
333
|
);
|
|
334
|
-
const
|
|
335
|
-
this.payload.writeVarUInt(
|
|
334
|
+
const s = Y.encode(t ?? "");
|
|
335
|
+
this.payload.writeVarUInt(s.length), this.payload.writeBytes(s), this.keyWritten = !0;
|
|
336
336
|
}
|
|
337
337
|
writeKeyBinary(t) {
|
|
338
338
|
this.ensureKeyType(
|
|
@@ -387,10 +387,10 @@ class It {
|
|
|
387
387
|
14
|
|
388
388
|
/* Guid */
|
|
389
389
|
);
|
|
390
|
-
const
|
|
391
|
-
if (
|
|
390
|
+
const s = t instanceof f ? t.asBytes() : t;
|
|
391
|
+
if (s.length !== 16)
|
|
392
392
|
throw new Error("Guid payload must be 16 bytes");
|
|
393
|
-
this.payload.writeBytes(
|
|
393
|
+
this.payload.writeBytes(s), this.valueWritten = !0;
|
|
394
394
|
}
|
|
395
395
|
writeNullValue() {
|
|
396
396
|
this.ensureValueType(
|
|
@@ -409,36 +409,36 @@ class It {
|
|
|
409
409
|
12
|
|
410
410
|
/* String */
|
|
411
411
|
);
|
|
412
|
-
const
|
|
413
|
-
this.payload.writeVarUInt(
|
|
412
|
+
const s = Y.encode(t ?? "");
|
|
413
|
+
this.payload.writeVarUInt(s.length), this.payload.writeBytes(s), this.valueWritten = !0;
|
|
414
414
|
}
|
|
415
|
-
writeValueObject(t,
|
|
415
|
+
writeValueObject(t, s) {
|
|
416
416
|
this.ensureValueType(
|
|
417
417
|
11
|
|
418
418
|
/* Object */
|
|
419
419
|
);
|
|
420
|
-
const
|
|
421
|
-
r
|
|
422
|
-
const n =
|
|
420
|
+
const r = new k(t);
|
|
421
|
+
s(r);
|
|
422
|
+
const n = r.finish();
|
|
423
423
|
this.payload.writeVarUInt(n.length), this.payload.writeBytes(n), this.valueWritten = !0;
|
|
424
424
|
}
|
|
425
|
-
writeValueArray(t,
|
|
425
|
+
writeValueArray(t, s) {
|
|
426
426
|
this.ensureValueType(
|
|
427
427
|
9
|
|
428
428
|
/* Array */
|
|
429
429
|
);
|
|
430
|
-
const
|
|
431
|
-
r
|
|
432
|
-
const n =
|
|
430
|
+
const r = new $(t);
|
|
431
|
+
s(r);
|
|
432
|
+
const n = r.finish();
|
|
433
433
|
this.payload.writeBytes(n), this.valueWritten = !0;
|
|
434
434
|
}
|
|
435
|
-
writeValueDictionary(t,
|
|
435
|
+
writeValueDictionary(t, s, r) {
|
|
436
436
|
this.ensureValueType(
|
|
437
437
|
10
|
|
438
438
|
/* Dict */
|
|
439
439
|
);
|
|
440
|
-
const n = new ee(t,
|
|
441
|
-
|
|
440
|
+
const n = new ee(t, s);
|
|
441
|
+
r(n);
|
|
442
442
|
const i = n.finish();
|
|
443
443
|
this.payload.writeBytes(i), this.valueWritten = !0;
|
|
444
444
|
}
|
|
@@ -459,44 +459,44 @@ class It {
|
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
461
|
class O {
|
|
462
|
-
constructor(t,
|
|
463
|
-
this.buffer = t, this.version =
|
|
462
|
+
constructor(t, s, r) {
|
|
463
|
+
this.buffer = t, this.version = s, this.offset = r, this.end = t.length - 1;
|
|
464
464
|
}
|
|
465
465
|
offset;
|
|
466
466
|
end;
|
|
467
467
|
static create(t) {
|
|
468
|
-
const
|
|
469
|
-
if (
|
|
468
|
+
const s = x(t);
|
|
469
|
+
if (s.length < 2)
|
|
470
470
|
throw new Error("Teleport payload too short");
|
|
471
|
-
if (
|
|
471
|
+
if (s[0] !== ue || s[s.length - 1] !== ce)
|
|
472
472
|
throw new Error("Teleport object missing markers");
|
|
473
|
-
const
|
|
474
|
-
return new O(
|
|
473
|
+
const r = { offset: 1 }, n = w(s, r, "InvalidLength");
|
|
474
|
+
return new O(s, n, r.offset);
|
|
475
475
|
}
|
|
476
476
|
next() {
|
|
477
477
|
if (this.offset >= this.end)
|
|
478
478
|
return null;
|
|
479
479
|
if (this.offset + 5 > this.buffer.length)
|
|
480
480
|
throw new Error("Teleport object truncated");
|
|
481
|
-
const t =
|
|
481
|
+
const t = ft(this.buffer, this.offset);
|
|
482
482
|
this.offset += 4;
|
|
483
|
-
const
|
|
484
|
-
if ((
|
|
483
|
+
const s = this.buffer[this.offset++], r = s >> 4 & 15;
|
|
484
|
+
if ((s & 15) !== 0)
|
|
485
485
|
throw new Error("Teleport field flags must be zero");
|
|
486
|
-
const n = P(
|
|
486
|
+
const n = P(r);
|
|
487
487
|
let i;
|
|
488
488
|
if (n >= 0)
|
|
489
489
|
A(this.buffer, this.offset, n), i = this.buffer.subarray(this.offset, this.offset + n), this.offset += n;
|
|
490
490
|
else {
|
|
491
|
-
const o = { offset: this.offset }, a =
|
|
491
|
+
const o = { offset: this.offset }, a = w(this.buffer, o, "InvalidLength");
|
|
492
492
|
A(this.buffer, o.offset, a), i = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
|
|
493
493
|
}
|
|
494
|
-
return new
|
|
494
|
+
return new _t(t, r, i);
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
497
|
class m {
|
|
498
|
-
constructor(t,
|
|
499
|
-
this.type = t, this.payload =
|
|
498
|
+
constructor(t, s) {
|
|
499
|
+
this.type = t, this.payload = s;
|
|
500
500
|
}
|
|
501
501
|
asInt32() {
|
|
502
502
|
return this.ensureType(
|
|
@@ -556,7 +556,7 @@ class m {
|
|
|
556
556
|
return this.ensureType(
|
|
557
557
|
12
|
|
558
558
|
/* String */
|
|
559
|
-
),
|
|
559
|
+
), It.decode(this.payload);
|
|
560
560
|
}
|
|
561
561
|
asGuid() {
|
|
562
562
|
return this.ensureType(
|
|
@@ -580,16 +580,16 @@ class m {
|
|
|
580
580
|
return this.ensureType(
|
|
581
581
|
10
|
|
582
582
|
/* Dict */
|
|
583
|
-
),
|
|
583
|
+
), se.create(this.payload);
|
|
584
584
|
}
|
|
585
585
|
ensureType(t) {
|
|
586
586
|
if (this.type !== t)
|
|
587
587
|
throw new Error(`Teleport value has type ${U[this.type]}, expected ${U[t]}`);
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
|
-
class
|
|
591
|
-
constructor(t,
|
|
592
|
-
super(
|
|
590
|
+
class _t extends m {
|
|
591
|
+
constructor(t, s, r) {
|
|
592
|
+
super(s, r), this.fieldId = t;
|
|
593
593
|
}
|
|
594
594
|
get isNull() {
|
|
595
595
|
return this.type === 1;
|
|
@@ -604,11 +604,11 @@ class te {
|
|
|
604
604
|
constructor(t) {
|
|
605
605
|
if (this.payload = t, t.length === 0)
|
|
606
606
|
throw new Error("Array payload too short");
|
|
607
|
-
const
|
|
608
|
-
if (this.elementType =
|
|
607
|
+
const s = t[0];
|
|
608
|
+
if (this.elementType = s >> 4 & 15, (s & 15) !== 0)
|
|
609
609
|
throw new Error("Array flags must be zero");
|
|
610
|
-
const
|
|
611
|
-
this.count =
|
|
610
|
+
const r = { offset: 1 };
|
|
611
|
+
this.count = w(t, r, "ArrayMalformed"), this.offset = r.offset;
|
|
612
612
|
}
|
|
613
613
|
static create(t) {
|
|
614
614
|
return new te(x(t));
|
|
@@ -634,41 +634,41 @@ class te {
|
|
|
634
634
|
case 14: {
|
|
635
635
|
const t = P(this.elementType);
|
|
636
636
|
A(this.payload, this.offset, t);
|
|
637
|
-
const
|
|
638
|
-
return this.offset += t, new
|
|
637
|
+
const s = this.payload.subarray(this.offset, this.offset + t);
|
|
638
|
+
return this.offset += t, new M(this.elementType, s);
|
|
639
639
|
}
|
|
640
640
|
case 12:
|
|
641
641
|
case 13: {
|
|
642
|
-
const t = { offset: this.offset },
|
|
643
|
-
A(this.payload, t.offset,
|
|
644
|
-
const
|
|
645
|
-
return this.offset = t.offset +
|
|
642
|
+
const t = { offset: this.offset }, s = w(this.payload, t, "ArrayMalformed");
|
|
643
|
+
A(this.payload, t.offset, s);
|
|
644
|
+
const r = this.payload.subarray(t.offset, t.offset + s);
|
|
645
|
+
return this.offset = t.offset + s, new M(this.elementType, r);
|
|
646
646
|
}
|
|
647
647
|
case 11: {
|
|
648
|
-
const t = { offset: this.offset },
|
|
649
|
-
A(this.payload, t.offset,
|
|
650
|
-
const
|
|
651
|
-
return this.offset = t.offset +
|
|
648
|
+
const t = { offset: this.offset }, s = w(this.payload, t, "ArrayMalformed");
|
|
649
|
+
A(this.payload, t.offset, s);
|
|
650
|
+
const r = this.payload.subarray(t.offset, t.offset + s);
|
|
651
|
+
return this.offset = t.offset + s, new M(11, r);
|
|
652
652
|
}
|
|
653
653
|
case 9: {
|
|
654
|
-
const t = ne(this.payload, this.offset),
|
|
655
|
-
return this.offset += t, new
|
|
654
|
+
const t = ne(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + t);
|
|
655
|
+
return this.offset += t, new M(9, s);
|
|
656
656
|
}
|
|
657
657
|
case 10: {
|
|
658
|
-
const t = ie(this.payload, this.offset),
|
|
659
|
-
return this.offset += t, new
|
|
658
|
+
const t = ie(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + t);
|
|
659
|
+
return this.offset += t, new M(10, s);
|
|
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(t,
|
|
668
|
-
super(t,
|
|
666
|
+
class M extends m {
|
|
667
|
+
constructor(t, s) {
|
|
668
|
+
super(t, s);
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
|
-
class
|
|
671
|
+
class se {
|
|
672
672
|
payload;
|
|
673
673
|
keyType;
|
|
674
674
|
valueType;
|
|
@@ -680,12 +680,12 @@ class re {
|
|
|
680
680
|
throw new Error("Dictionary payload too short");
|
|
681
681
|
if (this.keyType = t[0] >> 4 & 15, this.valueType = t[1] >> 4 & 15, (t[0] & 15) !== 0 || (t[1] & 15) !== 0)
|
|
682
682
|
throw new Error("Dictionary key/value flags must be zero");
|
|
683
|
-
|
|
684
|
-
const
|
|
685
|
-
this.count =
|
|
683
|
+
re(this.keyType);
|
|
684
|
+
const s = { offset: 2 };
|
|
685
|
+
this.count = w(t, s, "DictMalformed"), this.offset = s.offset;
|
|
686
686
|
}
|
|
687
687
|
static create(t) {
|
|
688
|
-
return new
|
|
688
|
+
return new se(x(t));
|
|
689
689
|
}
|
|
690
690
|
next() {
|
|
691
691
|
if (this.index >= this.count) {
|
|
@@ -693,21 +693,21 @@ class re {
|
|
|
693
693
|
throw new Error("Dictionary payload contains trailing data");
|
|
694
694
|
return null;
|
|
695
695
|
}
|
|
696
|
-
const t = this.readKey(),
|
|
697
|
-
return this.index++, new
|
|
696
|
+
const t = this.readKey(), s = this.readValue();
|
|
697
|
+
return this.index++, new ht(t, s);
|
|
698
698
|
}
|
|
699
699
|
readKey() {
|
|
700
700
|
const t = P(this.keyType);
|
|
701
701
|
if (t >= 0) {
|
|
702
702
|
A(this.payload, this.offset, t);
|
|
703
|
-
const
|
|
704
|
-
return this.offset += t, new m(this.keyType,
|
|
703
|
+
const s = this.payload.subarray(this.offset, this.offset + t);
|
|
704
|
+
return this.offset += t, new m(this.keyType, s);
|
|
705
705
|
}
|
|
706
706
|
if (this.keyType === 12 || this.keyType === 13) {
|
|
707
|
-
const
|
|
708
|
-
A(this.payload,
|
|
709
|
-
const n = this.payload.subarray(
|
|
710
|
-
return this.offset =
|
|
707
|
+
const s = { offset: this.offset }, r = w(this.payload, s, "DictMalformed");
|
|
708
|
+
A(this.payload, s.offset, r);
|
|
709
|
+
const n = this.payload.subarray(s.offset, s.offset + r);
|
|
710
|
+
return this.offset = s.offset + r, new m(this.keyType, n);
|
|
711
711
|
}
|
|
712
712
|
throw new Error("Unsupported dictionary key type");
|
|
713
713
|
}
|
|
@@ -715,24 +715,24 @@ class re {
|
|
|
715
715
|
switch (this.valueType) {
|
|
716
716
|
case 12:
|
|
717
717
|
case 13: {
|
|
718
|
-
const t = { offset: this.offset },
|
|
719
|
-
A(this.payload, t.offset,
|
|
720
|
-
const
|
|
721
|
-
return this.offset = t.offset +
|
|
718
|
+
const t = { offset: this.offset }, s = w(this.payload, t, "DictMalformed");
|
|
719
|
+
A(this.payload, t.offset, s);
|
|
720
|
+
const r = this.payload.subarray(t.offset, t.offset + s);
|
|
721
|
+
return this.offset = t.offset + s, new m(this.valueType, r);
|
|
722
722
|
}
|
|
723
723
|
case 11: {
|
|
724
|
-
const t = { offset: this.offset },
|
|
725
|
-
A(this.payload, t.offset,
|
|
726
|
-
const
|
|
727
|
-
return this.offset = t.offset +
|
|
724
|
+
const t = { offset: this.offset }, s = w(this.payload, t, "DictMalformed");
|
|
725
|
+
A(this.payload, t.offset, s);
|
|
726
|
+
const r = this.payload.subarray(t.offset, t.offset + s);
|
|
727
|
+
return this.offset = t.offset + s, new m(11, r);
|
|
728
728
|
}
|
|
729
729
|
case 9: {
|
|
730
|
-
const t = ne(this.payload, this.offset),
|
|
731
|
-
return this.offset += t, new m(9,
|
|
730
|
+
const t = ne(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + t);
|
|
731
|
+
return this.offset += t, new m(9, s);
|
|
732
732
|
}
|
|
733
733
|
case 10: {
|
|
734
|
-
const t = ie(this.payload, this.offset),
|
|
735
|
-
return this.offset += t, new m(10,
|
|
734
|
+
const t = ie(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + t);
|
|
735
|
+
return this.offset += t, new m(10, s);
|
|
736
736
|
}
|
|
737
737
|
case 3:
|
|
738
738
|
case 5:
|
|
@@ -745,17 +745,17 @@ class re {
|
|
|
745
745
|
case 1: {
|
|
746
746
|
const t = P(this.valueType);
|
|
747
747
|
A(this.payload, this.offset, t);
|
|
748
|
-
const
|
|
749
|
-
return this.offset += t, new m(this.valueType,
|
|
748
|
+
const s = this.payload.subarray(this.offset, this.offset + t);
|
|
749
|
+
return this.offset += t, new m(this.valueType, s);
|
|
750
750
|
}
|
|
751
751
|
default:
|
|
752
752
|
throw new Error(`Unsupported dictionary value type ${U[this.valueType]}`);
|
|
753
753
|
}
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
|
-
class
|
|
757
|
-
constructor(t,
|
|
758
|
-
this.key = t, this.value =
|
|
756
|
+
class ht {
|
|
757
|
+
constructor(t, s) {
|
|
758
|
+
this.key = t, this.value = s;
|
|
759
759
|
}
|
|
760
760
|
}
|
|
761
761
|
class f {
|
|
@@ -765,14 +765,14 @@ class f {
|
|
|
765
765
|
static fromString(t) {
|
|
766
766
|
if (!t)
|
|
767
767
|
throw new Error("Guid string is empty");
|
|
768
|
-
const
|
|
769
|
-
if (
|
|
768
|
+
const s = t.replace(/-/g, "");
|
|
769
|
+
if (s.length !== 32)
|
|
770
770
|
throw new Error("Guid string must be 32 hex characters");
|
|
771
|
-
const
|
|
772
|
-
f.writeUInt32LE(
|
|
771
|
+
const r = new Uint8Array(16), n = f.parseHexSlice(s, 0, 8), i = f.parseHexSlice(s, 8, 4), o = f.parseHexSlice(s, 12, 4);
|
|
772
|
+
f.writeUInt32LE(r, 0, n), f.writeUInt16LE(r, 4, i), f.writeUInt16LE(r, 6, o);
|
|
773
773
|
for (let a = 0; a < 8; a++)
|
|
774
|
-
|
|
775
|
-
return new f(
|
|
774
|
+
r[8 + a] = f.parseHexSlice(s, 16 + a * 2, 2);
|
|
775
|
+
return new f(r);
|
|
776
776
|
}
|
|
777
777
|
static fromBytes(t) {
|
|
778
778
|
if (t.length !== 16)
|
|
@@ -783,12 +783,12 @@ class f {
|
|
|
783
783
|
return new f(new Uint8Array(16));
|
|
784
784
|
}
|
|
785
785
|
static createRandom() {
|
|
786
|
-
const t = new Uint8Array(16),
|
|
787
|
-
if (
|
|
788
|
-
|
|
786
|
+
const t = new Uint8Array(16), s = globalThis.crypto;
|
|
787
|
+
if (s?.getRandomValues)
|
|
788
|
+
s.getRandomValues(t);
|
|
789
789
|
else
|
|
790
|
-
for (let
|
|
791
|
-
t[
|
|
790
|
+
for (let r = 0; r < t.length; r++)
|
|
791
|
+
t[r] = Math.floor(Math.random() * 256);
|
|
792
792
|
return t[6] = t[6] & 15 | 64, t[8] = t[8] & 63 | 128, new f(t);
|
|
793
793
|
}
|
|
794
794
|
toString() {
|
|
@@ -804,28 +804,28 @@ class f {
|
|
|
804
804
|
asBytes() {
|
|
805
805
|
return this.bytes.slice();
|
|
806
806
|
}
|
|
807
|
-
static parseHexSlice(t,
|
|
808
|
-
const n = t.substr(
|
|
807
|
+
static parseHexSlice(t, s, r) {
|
|
808
|
+
const n = t.substr(s, r), i = Number.parseInt(n, 16);
|
|
809
809
|
if (Number.isNaN(i))
|
|
810
810
|
throw new Error("Guid string contains invalid characters");
|
|
811
811
|
return i >>> 0;
|
|
812
812
|
}
|
|
813
|
-
static writeUInt32LE(t,
|
|
814
|
-
const n =
|
|
815
|
-
t[
|
|
813
|
+
static writeUInt32LE(t, s, r) {
|
|
814
|
+
const n = r >>> 0;
|
|
815
|
+
t[s] = n & 255, t[s + 1] = n >>> 8 & 255, t[s + 2] = n >>> 16 & 255, t[s + 3] = n >>> 24 & 255;
|
|
816
816
|
}
|
|
817
|
-
static writeUInt16LE(t,
|
|
818
|
-
const n =
|
|
819
|
-
t[
|
|
817
|
+
static writeUInt16LE(t, s, r) {
|
|
818
|
+
const n = r & 65535;
|
|
819
|
+
t[s] = n & 255, t[s + 1] = n >>> 8 & 255;
|
|
820
820
|
}
|
|
821
|
-
static readUInt32LE(t,
|
|
822
|
-
return (t[
|
|
821
|
+
static readUInt32LE(t, s) {
|
|
822
|
+
return (t[s] | t[s + 1] << 8 | t[s + 2] << 16 | t[s + 3] << 24) >>> 0;
|
|
823
823
|
}
|
|
824
|
-
static readUInt16LE(t,
|
|
825
|
-
return (t[
|
|
824
|
+
static readUInt16LE(t, s) {
|
|
825
|
+
return (t[s] | t[s + 1] << 8) & 65535;
|
|
826
826
|
}
|
|
827
|
-
static toHex(t,
|
|
828
|
-
return (t >>> 0).toString(16).padStart(
|
|
827
|
+
static toHex(t, s) {
|
|
828
|
+
return (t >>> 0).toString(16).padStart(s, "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(t) {
|
|
840
|
-
const
|
|
841
|
-
if (
|
|
840
|
+
const s = this.length + t;
|
|
841
|
+
if (s <= this.buffer.length)
|
|
842
842
|
return;
|
|
843
|
-
let
|
|
844
|
-
for (;
|
|
845
|
-
|
|
846
|
-
const n = new Uint8Array(
|
|
843
|
+
let r = this.buffer.length;
|
|
844
|
+
for (; r < s; )
|
|
845
|
+
r *= 2;
|
|
846
|
+
const n = new Uint8Array(r);
|
|
847
847
|
n.set(this.buffer.subarray(0, this.length)), this.buffer = n, this.dataView = new DataView(this.buffer.buffer);
|
|
848
848
|
}
|
|
849
849
|
writeByte(t) {
|
|
@@ -871,32 +871,32 @@ class b {
|
|
|
871
871
|
this.ensureCapacity(8), this.dataView.setBigUint64(this.length, t, !0), this.length += 8;
|
|
872
872
|
}
|
|
873
873
|
writeVarUInt(t) {
|
|
874
|
-
let
|
|
875
|
-
for (;
|
|
876
|
-
this.ensureCapacity(1), this.buffer[this.length++] =
|
|
877
|
-
this.ensureCapacity(1), this.buffer[this.length++] =
|
|
874
|
+
let s = t >>> 0;
|
|
875
|
+
for (; s >= 128; )
|
|
876
|
+
this.ensureCapacity(1), this.buffer[this.length++] = s & 127 | 128, s >>>= 7;
|
|
877
|
+
this.ensureCapacity(1), this.buffer[this.length++] = s & 127;
|
|
878
878
|
}
|
|
879
879
|
toUint8Array() {
|
|
880
880
|
return this.buffer.slice(0, this.length);
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function w(e, t, s) {
|
|
884
884
|
if (t.offset >= e.length)
|
|
885
|
-
throw new Error(
|
|
886
|
-
let
|
|
885
|
+
throw new Error(s);
|
|
886
|
+
let r = 0, n = 0, i = 0;
|
|
887
887
|
for (; t.offset < e.length; ) {
|
|
888
888
|
const o = e[t.offset++];
|
|
889
|
-
if (i++,
|
|
890
|
-
if (i !==
|
|
889
|
+
if (i++, r |= (o & 127) << n, (o & 128) === 0) {
|
|
890
|
+
if (i !== ut(r))
|
|
891
891
|
throw new Error("Teleport VarUInt is not canonical");
|
|
892
|
-
return
|
|
892
|
+
return r >>> 0;
|
|
893
893
|
}
|
|
894
894
|
if (n += 7, n >= 35)
|
|
895
895
|
throw new Error("Teleport VarUInt exceeds 32-bit range");
|
|
896
896
|
}
|
|
897
|
-
throw new Error(
|
|
897
|
+
throw new Error(s);
|
|
898
898
|
}
|
|
899
|
-
function
|
|
899
|
+
function ut(e) {
|
|
900
900
|
return e < 128 ? 1 : e < 16384 ? 2 : e < 2097152 ? 3 : e < 268435456 ? 4 : 5;
|
|
901
901
|
}
|
|
902
902
|
function W(e, t = 0) {
|
|
@@ -904,7 +904,7 @@ function W(e, t = 0) {
|
|
|
904
904
|
throw new Error("Teleport flags must fit into 4 bits");
|
|
905
905
|
return (e & 15) << 4 | t & 15;
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function ct(e) {
|
|
908
908
|
return e === 12 || e === 13 || e === 9 || e === 11 || e === 10;
|
|
909
909
|
}
|
|
910
910
|
function P(e) {
|
|
@@ -927,64 +927,64 @@ function P(e) {
|
|
|
927
927
|
return -1;
|
|
928
928
|
}
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function re(e) {
|
|
931
931
|
if (e === 9 || e === 11 || e === 10 || e === 1)
|
|
932
932
|
throw new Error("Dictionary keys must be primitive Teleport types");
|
|
933
933
|
}
|
|
934
|
-
function A(e, t,
|
|
935
|
-
if (t < 0 ||
|
|
934
|
+
function A(e, t, s) {
|
|
935
|
+
if (t < 0 || s < 0 || t + s > e.length)
|
|
936
936
|
throw new Error("Teleport payload exceeds bounds");
|
|
937
937
|
}
|
|
938
|
-
function
|
|
938
|
+
function ft(e, t) {
|
|
939
939
|
return (e[t] | e[t + 1] << 8 | e[t + 2] << 16 | e[t + 3] << 24) >>> 0;
|
|
940
940
|
}
|
|
941
941
|
function ne(e, t) {
|
|
942
942
|
if (t >= e.length)
|
|
943
943
|
throw new Error("Array payload exceeds bounds");
|
|
944
|
-
const
|
|
945
|
-
if ((
|
|
944
|
+
const s = e[t], r = s >> 4 & 15;
|
|
945
|
+
if ((s & 15) !== 0)
|
|
946
946
|
throw new Error("Array flags must be zero");
|
|
947
|
-
const n = { offset: t + 1 }, i =
|
|
947
|
+
const n = { offset: t + 1 }, i = w(e, n, "ArrayMalformed"), o = P(r);
|
|
948
948
|
if (o >= 0) {
|
|
949
949
|
const I = o * i;
|
|
950
950
|
return A(e, n.offset, I), n.offset + I - t;
|
|
951
951
|
}
|
|
952
952
|
let a = n.offset;
|
|
953
953
|
for (let I = 0; I < i; I++)
|
|
954
|
-
a = q(
|
|
954
|
+
a = q(r, e, a, "ArrayMalformed");
|
|
955
955
|
return a - t;
|
|
956
956
|
}
|
|
957
957
|
function ie(e, t) {
|
|
958
958
|
if (t + 2 > e.length)
|
|
959
959
|
throw new Error("Dictionary payload too short");
|
|
960
|
-
const
|
|
960
|
+
const s = e[t] >> 4 & 15, r = e[t + 1] >> 4 & 15;
|
|
961
961
|
if ((e[t] & 15) !== 0 || (e[t + 1] & 15) !== 0)
|
|
962
962
|
throw new Error("Dictionary key/value flags must be zero");
|
|
963
|
-
|
|
964
|
-
const n = { offset: t + 2 }, i =
|
|
963
|
+
re(s);
|
|
964
|
+
const n = { offset: t + 2 }, i = w(e, n, "DictMalformed");
|
|
965
965
|
let o = n.offset;
|
|
966
966
|
for (let a = 0; a < i; a++)
|
|
967
|
-
o = q(
|
|
967
|
+
o = q(s, e, o, "DictMalformed"), o = q(r, e, o, "DictMalformed");
|
|
968
968
|
return o - t;
|
|
969
969
|
}
|
|
970
|
-
function q(e, t,
|
|
970
|
+
function q(e, t, s, r) {
|
|
971
971
|
const n = P(e);
|
|
972
972
|
if (n >= 0)
|
|
973
|
-
return A(t,
|
|
973
|
+
return A(t, s, n), s + n;
|
|
974
974
|
switch (e) {
|
|
975
975
|
case 12:
|
|
976
976
|
case 13: {
|
|
977
|
-
const i = { offset:
|
|
977
|
+
const i = { offset: s }, o = w(t, i, r);
|
|
978
978
|
return A(t, i.offset, o), i.offset + o;
|
|
979
979
|
}
|
|
980
980
|
case 11: {
|
|
981
|
-
const i = { offset:
|
|
981
|
+
const i = { offset: s }, o = w(t, i, r);
|
|
982
982
|
return A(t, i.offset, o), i.offset + o;
|
|
983
983
|
}
|
|
984
984
|
case 9:
|
|
985
|
-
return
|
|
985
|
+
return s + ne(t, s);
|
|
986
986
|
case 10:
|
|
987
|
-
return
|
|
987
|
+
return s + ie(t, s);
|
|
988
988
|
default:
|
|
989
989
|
throw new Error(`Unsupported Teleport type ${U[e]}`);
|
|
990
990
|
}
|
|
@@ -995,1197 +995,1209 @@ function le(e) {
|
|
|
995
995
|
function x(e) {
|
|
996
996
|
return e instanceof Uint8Array ? e : new Uint8Array(e);
|
|
997
997
|
}
|
|
998
|
-
var ce = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Opus = 1] = "Opus", e[e.Mp3 = 2] = "Mp3", e[e.RawPcm16 = 3] = "RawPcm16", e))(ce || {}), fe = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.MobileWeb = 1] = "MobileWeb", e[e.MobileApp = 2] = "MobileApp", e[e.DesktopWeb = 3] = "DesktopWeb", e[e.DesktopApp = 4] = "DesktopApp", e))(fe || {}), Te = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Backend = 2] = "Backend", e[e.Server = 4] = "Server", e[e.Plugin = 8] = "Plugin", e[e.Browser = 16] = "Browser", e[e.Native = 32] = "Native", e))(Te || {}), Se = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.MessagePack = 1] = "MessagePack", e[e.MemoryPack = 2] = "MemoryPack", e[e.Json = 4] = "Json", e[e.Teleport = 8] = "Teleport", e[e.All = 15] = "All", e))(Se || {}), de = /* @__PURE__ */ ((e) => (e[e.Face = 0] = "Face", e[e.Hands = 1] = "Hands", e[e.Pose = 2] = "Pose", e[e.All = 3] = "All", e))(de || {}), Ae = /* @__PURE__ */ ((e) => (e[e.Css = 0] = "Css", e[e.Flutter = 1] = "Flutter", e))(Ae || {}), Ne = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Machine = 1] = "Machine", e[e.Human = 2] = "Human", e))(Ne || {}), ye = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.H264 = 1] = "H264", e[e.Vp8 = 2] = "Vp8", e[e.Vp9 = 3] = "Vp9", e[e.Av1 = 4] = "Av1", e))(ye || {}), we = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.DotNet = 1] = "DotNet", e[e.TypeScript = 2] = "TypeScript", e[e.Cpp = 3] = "Cpp", e[e.Dart = 4] = "Dart", e[e.Rust = 5] = "Rust", e))(we || {}), Ce = /* @__PURE__ */ ((e) => (e[e.Local = 0] = "Local", e[e.Cloud = 1] = "Cloud", e))(Ce || {}), Ue = /* @__PURE__ */ ((e) => (e[e.Bundle = 0] = "Bundle", e[e.GitSource = 1] = "GitSource", e))(Ue || {}), L = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = "NONE", e[e.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", e[e.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", e[e.GROUP_CORE = 65536] = "GROUP_CORE", e[e.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", e[e.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", e[e.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", e[e.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", e[e.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", e[e.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", e[e.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", e[e.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", e[e.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", e[e.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", e[e.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", e[e.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", e[e.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", e[e.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", e[e.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", e[e.CORE_SERVER_START = 65552] = "CORE_SERVER_START", e[e.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", e[e.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", e[e.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", e[e.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", e[e.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", e[e.CORE_UPDATE_CLIENT_CONTEXT = 65558] = "CORE_UPDATE_CLIENT_CONTEXT", e[e.CORE_BACKGROUND_WORK_ACTIVE = 65559] = "CORE_BACKGROUND_WORK_ACTIVE", e[e.CORE_RESET_IDLE = 65560] = "CORE_RESET_IDLE", e[e.CORE_CLIENT_DISCONNECTING = 65561] = "CORE_CLIENT_DISCONNECTING", e[e.CORE_ON_APP_READY = 65562] = "CORE_ON_APP_READY", e[e.CORE_ON_FRONTEND_RELOADED = 65563] = "CORE_ON_FRONTEND_RELOADED", e[e.CORE_WEBRTC_OFFER = 65566] = "CORE_WEBRTC_OFFER", e[e.CORE_WEBRTC_ANSWER = 65567] = "CORE_WEBRTC_ANSWER", e[e.CORE_WEBRTC_ICE_CANDIDATE = 65568] = "CORE_WEBRTC_ICE_CANDIDATE", e[e.CORE_WEBRTC_READY = 65569] = "CORE_WEBRTC_READY", e[e.CORE_WEBRTC_AUDIO_SEGMENT = 65570] = "CORE_WEBRTC_AUDIO_SEGMENT", e[e.CORE_WEBRTC_TRACK_MAP = 65571] = "CORE_WEBRTC_TRACK_MAP", e[e.CORE_WEBRTC_VIDEO_CAPTURE = 65572] = "CORE_WEBRTC_VIDEO_CAPTURE", e[e.CORE_WEBRTC_ICE_SERVERS_REQUEST = 65573] = "CORE_WEBRTC_ICE_SERVERS_REQUEST", e[e.CORE_WEBRTC_ICE_SERVERS_RESPONSE = 65574] = "CORE_WEBRTC_ICE_SERVERS_RESPONSE", e[e.CORE_WEBRTC_CLOSE = 65575] = "CORE_WEBRTC_CLOSE", e[e.CORE_RELAY_AGENT_AUTH = 65576] = "CORE_RELAY_AGENT_AUTH", e[e.CORE_RELAY_AGENT_AUTH_RESULT = 65577] = "CORE_RELAY_AGENT_AUTH_RESULT", e[e.CORE_RELAY_HEARTBEAT = 65578] = "CORE_RELAY_HEARTBEAT", e[e.CORE_RELAY_TCP_CONNECTION_OPENED = 65579] = "CORE_RELAY_TCP_CONNECTION_OPENED", e[e.CORE_RELAY_TCP_CONNECTION_CLOSED = 65580] = "CORE_RELAY_TCP_CONNECTION_CLOSED", e[e.CORE_RELAY_TCP_DATA = 65581] = "CORE_RELAY_TCP_DATA", e[e.CORE_RELAY_UDP_DATA = 65582] = "CORE_RELAY_UDP_DATA", e[e.CORE_RELAY_ADD_TUNNEL = 65583] = "CORE_RELAY_ADD_TUNNEL", e[e.CORE_RELAY_TUNNEL_ADDED = 65584] = "CORE_RELAY_TUNNEL_ADDED", e[e.CORE_RELAY_REMOVE_TUNNEL = 65585] = "CORE_RELAY_REMOVE_TUNNEL", e[e.CORE_IKON_SERVER_ENDPOINT_HOST_INFO = 65586] = "CORE_IKON_SERVER_ENDPOINT_HOST_INFO", e[e.CORE_CLIENT_INITIALIZATION = 65587] = "CORE_CLIENT_INITIALIZATION", e[e.CORE_CLIENT_LIFECYCLE_BATCH = 65588] = "CORE_CLIENT_LIFECYCLE_BATCH", e[e.CORE_APP_CONFIG = 65589] = "CORE_APP_CONFIG", e[e.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", e[e.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", e[e.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", e[e.GROUP_EVENTS = 262144] = "GROUP_EVENTS", e[e.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", e[e.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", e[e.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", e[e.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", e[e.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", e[e.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", e[e.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", e[e.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", e[e.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", e[e.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", e[e.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", e[e.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", e[e.ANALYTICS_IKON_RELAY_SERVER_STATS = 524297] = "ANALYTICS_IKON_RELAY_SERVER_STATS", e[e.ANALYTICS_IKON_TURN_SERVER_STATS = 524298] = "ANALYTICS_IKON_TURN_SERVER_STATS", e[e.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", e[e.ACTION_CALL = 1048577] = "ACTION_CALL", e[e.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", e[e.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", e[e.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", e[e.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", e[e.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", e[e.ACTION_TAP = 1048583] = "ACTION_TAP", e[e.ACTION_PAN = 1048584] = "ACTION_PAN", e[e.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", e[e.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", e[e.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", e[e.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", e[e.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", e[e.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", e[e.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", e[e.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", e[e.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", e[e.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", e[e.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", e[e.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", e[e.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", e[e.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", e[e.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", e[e.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", e[e.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", e[e.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", e[e.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", e[e.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", e[e.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", e[e.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", e[e.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", e[e.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", e[e.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", e[e.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", e[e.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", e[e.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", e[e.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", e[e.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", e[e.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", e[e.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", e[e.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", e[e.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", e[e.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", e[e.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", e[e.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", e[e.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", e[e.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", e[e.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", e[e.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", e[e.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", e[e.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", e[e.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", e[e.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", e[e.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", e[e.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", e[e.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", e[e.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", e[e.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", e[e.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", e[e.ACTION_CALL2 = 1048637] = "ACTION_CALL2", e[e.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", e[e.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", e[e.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", e[e.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", e[e.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", e[e.ACTION_FILE_UPLOAD_PRE_START2 = 1048643] = "ACTION_FILE_UPLOAD_PRE_START2", e[e.ACTION_FILE_UPLOAD_PRE_START_RESPONSE2 = 1048644] = "ACTION_FILE_UPLOAD_PRE_START_RESPONSE2", e[e.ACTION_FILE_UPLOAD_START2 = 1048645] = "ACTION_FILE_UPLOAD_START2", e[e.ACTION_FILE_UPLOAD_START_RESPONSE2 = 1048646] = "ACTION_FILE_UPLOAD_START_RESPONSE2", e[e.ACTION_FILE_UPLOAD_DATA2 = 1048647] = "ACTION_FILE_UPLOAD_DATA2", e[e.ACTION_FILE_UPLOAD_ACK2 = 1048648] = "ACTION_FILE_UPLOAD_ACK2", e[e.ACTION_FILE_UPLOAD_END2 = 1048649] = "ACTION_FILE_UPLOAD_END2", e[e.ACTION_FILE_UPLOAD_COMPLETE2 = 1048650] = "ACTION_FILE_UPLOAD_COMPLETE2", e[e.ACTION_FUNCTION_ENUMERATION_ITEM_BATCH = 1048651] = "ACTION_FUNCTION_ENUMERATION_ITEM_BATCH", e[e.ACTION_CALL_ACK = 1048652] = "ACTION_CALL_ACK", e[e.ACTION_TRIGGER_CRON = 1048653] = "ACTION_TRIGGER_CRON", e[e.GROUP_UI = 2097152] = "GROUP_UI", e[e.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", e[e.UI_STREAM_END = 2097154] = "UI_STREAM_END", e[e.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", e[e.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", e[e.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", e[e.UI_SECTION_END = 2097158] = "UI_SECTION_END", e[e.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", e[e.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", e[e.UI_LIST_END = 2097161] = "UI_LIST_END", e[e.UI_TEXT = 2097162] = "UI_TEXT", e[e.UI_HEADER = 2097163] = "UI_HEADER", e[e.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", e[e.UI_BUTTON = 2097165] = "UI_BUTTON", e[e.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", e[e.UI_IMAGE = 2097167] = "UI_IMAGE", e[e.UI_FILE = 2097168] = "UI_FILE", e[e.UI_BADGE = 2097169] = "UI_BADGE", e[e.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", e[e.UI_MAP = 2097171] = "UI_MAP", e[e.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", e[e.UI_ICON = 2097173] = "UI_ICON", e[e.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", e[e.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", e[e.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", e[e.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", e[e.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", e[e.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", e[e.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", e[e.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", e[e.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", e[e.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", e[e.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", e[e.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", e[e.UI_QS = 2097186] = "UI_QS", e[e.UI_ELEMENT = 2097187] = "UI_ELEMENT", e[e.UI_STYLES = 2097188] = "UI_STYLES", e[e.UI_SVG = 2097189] = "UI_SVG", e[e.UI_UPDATE = 2097190] = "UI_UPDATE", e[e.UI_INIT = 2097191] = "UI_INIT", e[e.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", e[e.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", e[e.GROUP_COMMON = 4128768] = "GROUP_COMMON", e[e.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", e[e.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", e[e.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", e[e.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", e[e.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", e[e.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", e[e.AUDIO_SHAPE_FRAME = 4194310] = "AUDIO_SHAPE_FRAME", e[e.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", e[e.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", e[e.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", e[e.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", e[e.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", e[e.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", e[e.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", e[e.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", e[e.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", e[e.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", e[e.GROUP_SCENE = 33554432] = "GROUP_SCENE", e[e.SCENE_MESH = 33554433] = "SCENE_MESH", e[e.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", e[e.GROUP_ALL = 67043328] = "GROUP_ALL", e[e.GROUP_APP_LOCAL = 1073741824] = "GROUP_APP_LOCAL", e[e.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", e))(L || {});
|
|
999
|
-
const
|
|
1000
|
-
function Re(e) {
|
|
1001
|
-
const t = {};
|
|
1002
|
-
return De(t), t;
|
|
1003
|
-
}
|
|
998
|
+
var fe = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Opus = 1] = "Opus", e[e.Mp3 = 2] = "Mp3", e[e.RawPcm16 = 3] = "RawPcm16", e))(fe || {}), Te = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.MobileWeb = 1] = "MobileWeb", e[e.MobileApp = 2] = "MobileApp", e[e.DesktopWeb = 3] = "DesktopWeb", e[e.DesktopApp = 4] = "DesktopApp", e))(Te || {}), Se = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Backend = 2] = "Backend", e[e.Server = 4] = "Server", e[e.Plugin = 8] = "Plugin", e[e.Browser = 16] = "Browser", e[e.Native = 32] = "Native", e))(Se || {}), de = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.MessagePack = 1] = "MessagePack", e[e.MemoryPack = 2] = "MemoryPack", e[e.Json = 4] = "Json", e[e.Teleport = 8] = "Teleport", e[e.All = 15] = "All", e))(de || {}), Ae = /* @__PURE__ */ ((e) => (e[e.Face = 0] = "Face", e[e.Hands = 1] = "Hands", e[e.Pose = 2] = "Pose", e[e.All = 3] = "All", e))(Ae || {}), Ne = /* @__PURE__ */ ((e) => (e[e.Css = 0] = "Css", e[e.Flutter = 1] = "Flutter", e))(Ne || {}), ye = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Machine = 1] = "Machine", e[e.Human = 2] = "Human", e))(ye || {}), we = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.H264 = 1] = "H264", e[e.Vp8 = 2] = "Vp8", e[e.Vp9 = 3] = "Vp9", e[e.Av1 = 4] = "Av1", e))(we || {}), Ce = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.DotNet = 1] = "DotNet", e[e.TypeScript = 2] = "TypeScript", e[e.Cpp = 3] = "Cpp", e[e.Dart = 4] = "Dart", e[e.Rust = 5] = "Rust", e))(Ce || {}), Ue = /* @__PURE__ */ ((e) => (e[e.Local = 0] = "Local", e[e.Cloud = 1] = "Cloud", e))(Ue || {}), Re = /* @__PURE__ */ ((e) => (e[e.Bundle = 0] = "Bundle", e[e.GitSource = 1] = "GitSource", e))(Re || {}), L = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = "NONE", e[e.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", e[e.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", e[e.GROUP_CORE = 65536] = "GROUP_CORE", e[e.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", e[e.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", e[e.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", e[e.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", e[e.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", e[e.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", e[e.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", e[e.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", e[e.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", e[e.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", e[e.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", e[e.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", e[e.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", e[e.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", e[e.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", e[e.CORE_SERVER_START = 65552] = "CORE_SERVER_START", e[e.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", e[e.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", e[e.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", e[e.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", e[e.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", e[e.CORE_UPDATE_CLIENT_CONTEXT = 65558] = "CORE_UPDATE_CLIENT_CONTEXT", e[e.CORE_BACKGROUND_WORK_ACTIVE = 65559] = "CORE_BACKGROUND_WORK_ACTIVE", e[e.CORE_RESET_IDLE = 65560] = "CORE_RESET_IDLE", e[e.CORE_CLIENT_DISCONNECTING = 65561] = "CORE_CLIENT_DISCONNECTING", e[e.CORE_ON_APP_READY = 65562] = "CORE_ON_APP_READY", e[e.CORE_ON_FRONTEND_RELOADED = 65563] = "CORE_ON_FRONTEND_RELOADED", e[e.CORE_WEBRTC_OFFER = 65566] = "CORE_WEBRTC_OFFER", e[e.CORE_WEBRTC_ANSWER = 65567] = "CORE_WEBRTC_ANSWER", e[e.CORE_WEBRTC_ICE_CANDIDATE = 65568] = "CORE_WEBRTC_ICE_CANDIDATE", e[e.CORE_WEBRTC_READY = 65569] = "CORE_WEBRTC_READY", e[e.CORE_WEBRTC_AUDIO_SEGMENT = 65570] = "CORE_WEBRTC_AUDIO_SEGMENT", e[e.CORE_WEBRTC_TRACK_MAP = 65571] = "CORE_WEBRTC_TRACK_MAP", e[e.CORE_WEBRTC_VIDEO_CAPTURE = 65572] = "CORE_WEBRTC_VIDEO_CAPTURE", e[e.CORE_WEBRTC_ICE_SERVERS_REQUEST = 65573] = "CORE_WEBRTC_ICE_SERVERS_REQUEST", e[e.CORE_WEBRTC_ICE_SERVERS_RESPONSE = 65574] = "CORE_WEBRTC_ICE_SERVERS_RESPONSE", e[e.CORE_WEBRTC_CLOSE = 65575] = "CORE_WEBRTC_CLOSE", e[e.CORE_RELAY_AGENT_AUTH = 65576] = "CORE_RELAY_AGENT_AUTH", e[e.CORE_RELAY_AGENT_AUTH_RESULT = 65577] = "CORE_RELAY_AGENT_AUTH_RESULT", e[e.CORE_RELAY_HEARTBEAT = 65578] = "CORE_RELAY_HEARTBEAT", e[e.CORE_RELAY_TCP_CONNECTION_OPENED = 65579] = "CORE_RELAY_TCP_CONNECTION_OPENED", e[e.CORE_RELAY_TCP_CONNECTION_CLOSED = 65580] = "CORE_RELAY_TCP_CONNECTION_CLOSED", e[e.CORE_RELAY_TCP_DATA = 65581] = "CORE_RELAY_TCP_DATA", e[e.CORE_RELAY_UDP_DATA = 65582] = "CORE_RELAY_UDP_DATA", e[e.CORE_RELAY_ADD_TUNNEL = 65583] = "CORE_RELAY_ADD_TUNNEL", e[e.CORE_RELAY_TUNNEL_ADDED = 65584] = "CORE_RELAY_TUNNEL_ADDED", e[e.CORE_RELAY_REMOVE_TUNNEL = 65585] = "CORE_RELAY_REMOVE_TUNNEL", e[e.CORE_IKON_SERVER_ENDPOINT_HOST_INFO = 65586] = "CORE_IKON_SERVER_ENDPOINT_HOST_INFO", e[e.CORE_CLIENT_INITIALIZATION = 65587] = "CORE_CLIENT_INITIALIZATION", e[e.CORE_CLIENT_LIFECYCLE_BATCH = 65588] = "CORE_CLIENT_LIFECYCLE_BATCH", e[e.CORE_APP_CONFIG = 65589] = "CORE_APP_CONFIG", e[e.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", e[e.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", e[e.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", e[e.GROUP_EVENTS = 262144] = "GROUP_EVENTS", e[e.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", e[e.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", e[e.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", e[e.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", e[e.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", e[e.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", e[e.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", e[e.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", e[e.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", e[e.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", e[e.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", e[e.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", e[e.ANALYTICS_IKON_RELAY_SERVER_STATS = 524297] = "ANALYTICS_IKON_RELAY_SERVER_STATS", e[e.ANALYTICS_IKON_TURN_SERVER_STATS = 524298] = "ANALYTICS_IKON_TURN_SERVER_STATS", e[e.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", e[e.ACTION_CALL = 1048577] = "ACTION_CALL", e[e.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", e[e.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", e[e.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", e[e.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", e[e.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", e[e.ACTION_TAP = 1048583] = "ACTION_TAP", e[e.ACTION_PAN = 1048584] = "ACTION_PAN", e[e.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", e[e.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", e[e.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", e[e.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", e[e.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", e[e.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", e[e.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", e[e.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", e[e.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", e[e.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", e[e.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", e[e.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", e[e.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", e[e.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", e[e.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", e[e.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", e[e.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", e[e.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", e[e.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", e[e.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", e[e.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", e[e.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", e[e.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", e[e.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", e[e.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", e[e.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", e[e.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", e[e.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", e[e.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", e[e.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", e[e.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", e[e.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", e[e.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", e[e.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", e[e.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", e[e.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", e[e.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", e[e.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", e[e.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", e[e.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", e[e.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", e[e.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", e[e.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", e[e.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", e[e.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", e[e.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", e[e.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", e[e.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", e[e.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", e[e.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", e[e.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", e[e.ACTION_CALL2 = 1048637] = "ACTION_CALL2", e[e.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", e[e.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", e[e.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", e[e.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", e[e.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", e[e.ACTION_FILE_UPLOAD_PRE_START2 = 1048643] = "ACTION_FILE_UPLOAD_PRE_START2", e[e.ACTION_FILE_UPLOAD_PRE_START_RESPONSE2 = 1048644] = "ACTION_FILE_UPLOAD_PRE_START_RESPONSE2", e[e.ACTION_FILE_UPLOAD_START2 = 1048645] = "ACTION_FILE_UPLOAD_START2", e[e.ACTION_FILE_UPLOAD_START_RESPONSE2 = 1048646] = "ACTION_FILE_UPLOAD_START_RESPONSE2", e[e.ACTION_FILE_UPLOAD_DATA2 = 1048647] = "ACTION_FILE_UPLOAD_DATA2", e[e.ACTION_FILE_UPLOAD_ACK2 = 1048648] = "ACTION_FILE_UPLOAD_ACK2", e[e.ACTION_FILE_UPLOAD_END2 = 1048649] = "ACTION_FILE_UPLOAD_END2", e[e.ACTION_FILE_UPLOAD_COMPLETE2 = 1048650] = "ACTION_FILE_UPLOAD_COMPLETE2", e[e.ACTION_FUNCTION_ENUMERATION_ITEM_BATCH = 1048651] = "ACTION_FUNCTION_ENUMERATION_ITEM_BATCH", e[e.ACTION_CALL_ACK = 1048652] = "ACTION_CALL_ACK", e[e.ACTION_TRIGGER_CRON = 1048653] = "ACTION_TRIGGER_CRON", e[e.ACTION_RESULT = 1048654] = "ACTION_RESULT", e[e.UI_RESYNC_REQUEST = 1048655] = "UI_RESYNC_REQUEST", e[e.GROUP_UI = 2097152] = "GROUP_UI", e[e.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", e[e.UI_STREAM_END = 2097154] = "UI_STREAM_END", e[e.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", e[e.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", e[e.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", e[e.UI_SECTION_END = 2097158] = "UI_SECTION_END", e[e.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", e[e.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", e[e.UI_LIST_END = 2097161] = "UI_LIST_END", e[e.UI_TEXT = 2097162] = "UI_TEXT", e[e.UI_HEADER = 2097163] = "UI_HEADER", e[e.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", e[e.UI_BUTTON = 2097165] = "UI_BUTTON", e[e.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", e[e.UI_IMAGE = 2097167] = "UI_IMAGE", e[e.UI_FILE = 2097168] = "UI_FILE", e[e.UI_BADGE = 2097169] = "UI_BADGE", e[e.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", e[e.UI_MAP = 2097171] = "UI_MAP", e[e.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", e[e.UI_ICON = 2097173] = "UI_ICON", e[e.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", e[e.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", e[e.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", e[e.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", e[e.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", e[e.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", e[e.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", e[e.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", e[e.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", e[e.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", e[e.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", e[e.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", e[e.UI_QS = 2097186] = "UI_QS", e[e.UI_ELEMENT = 2097187] = "UI_ELEMENT", e[e.UI_STYLES = 2097188] = "UI_STYLES", e[e.UI_SVG = 2097189] = "UI_SVG", e[e.UI_UPDATE = 2097190] = "UI_UPDATE", e[e.UI_INIT = 2097191] = "UI_INIT", e[e.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", e[e.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", e[e.GROUP_COMMON = 4128768] = "GROUP_COMMON", e[e.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", e[e.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", e[e.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", e[e.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", e[e.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", e[e.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", e[e.AUDIO_SHAPE_FRAME = 4194310] = "AUDIO_SHAPE_FRAME", e[e.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", e[e.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", e[e.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", e[e.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", e[e.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", e[e.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", e[e.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", e[e.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", e[e.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", e[e.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", e[e.GROUP_SCENE = 33554432] = "GROUP_SCENE", e[e.SCENE_MESH = 33554433] = "SCENE_MESH", e[e.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", e[e.GROUP_ALL = 67043328] = "GROUP_ALL", e[e.GROUP_APP_LOCAL = 1073741824] = "GROUP_APP_LOCAL", e[e.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", e))(L || {});
|
|
999
|
+
const Tt = 161083277, St = 265814330, dt = 1368629611, At = 2431514951, Nt = 2514959030, yt = 2745379226, wt = 3282782683, Ct = 3284746250, Ut = 4101844078;
|
|
1004
1000
|
function De(e) {
|
|
1005
|
-
|
|
1001
|
+
const t = {};
|
|
1002
|
+
return Le(t), t;
|
|
1006
1003
|
}
|
|
1007
|
-
function
|
|
1008
|
-
|
|
1009
|
-
return De(r), Rt(e, r), r;
|
|
1004
|
+
function Le(e) {
|
|
1005
|
+
return e.StreamId = "", e.Description = "", e.SourceType = "", e.Codec = fe.Unknown, e.CodecDetails = "", e.SampleRate = 0, e.Channels = 0, e.ShapeSets = void 0, e.CorrelationId = void 0, e;
|
|
1010
1006
|
}
|
|
1011
1007
|
function Rt(e, t) {
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1008
|
+
const s = t ?? De();
|
|
1009
|
+
return Le(s), Dt(e, s), s;
|
|
1010
|
+
}
|
|
1011
|
+
function Dt(e, t) {
|
|
1012
|
+
let s;
|
|
1013
|
+
for (; (s = e.next()) !== null; )
|
|
1014
|
+
switch (s.fieldId) {
|
|
1015
|
+
case Tt: {
|
|
1016
|
+
if (s.isNull) throw new Error();
|
|
1017
|
+
t.StreamId = s.asString();
|
|
1018
1018
|
break;
|
|
1019
1019
|
}
|
|
1020
|
-
case
|
|
1021
|
-
if (
|
|
1020
|
+
case St: {
|
|
1021
|
+
if (s.isNull) {
|
|
1022
1022
|
t.ShapeSets = void 0;
|
|
1023
1023
|
break;
|
|
1024
1024
|
}
|
|
1025
|
-
t.ShapeSets =
|
|
1026
|
-
break;
|
|
1027
|
-
}
|
|
1028
|
-
case St: {
|
|
1029
|
-
if (r.isNull) throw new Error();
|
|
1030
|
-
t.Description = r.asString();
|
|
1025
|
+
t.ShapeSets = Lt(s.asArray());
|
|
1031
1026
|
break;
|
|
1032
1027
|
}
|
|
1033
1028
|
case dt: {
|
|
1034
|
-
if (
|
|
1035
|
-
t.
|
|
1029
|
+
if (s.isNull) throw new Error();
|
|
1030
|
+
t.Description = s.asString();
|
|
1036
1031
|
break;
|
|
1037
1032
|
}
|
|
1038
1033
|
case At: {
|
|
1039
|
-
if (
|
|
1040
|
-
|
|
1041
|
-
break;
|
|
1042
|
-
}
|
|
1043
|
-
t.CorrelationId = r.asString();
|
|
1034
|
+
if (s.isNull) throw new Error();
|
|
1035
|
+
t.Channels = s.asInt32();
|
|
1044
1036
|
break;
|
|
1045
1037
|
}
|
|
1046
1038
|
case Nt: {
|
|
1047
|
-
if (
|
|
1048
|
-
|
|
1039
|
+
if (s.isNull) {
|
|
1040
|
+
t.CorrelationId = void 0;
|
|
1041
|
+
break;
|
|
1042
|
+
}
|
|
1043
|
+
t.CorrelationId = s.asString();
|
|
1049
1044
|
break;
|
|
1050
1045
|
}
|
|
1051
1046
|
case yt: {
|
|
1052
|
-
if (
|
|
1053
|
-
t.
|
|
1047
|
+
if (s.isNull) throw new Error();
|
|
1048
|
+
t.CodecDetails = s.asString();
|
|
1054
1049
|
break;
|
|
1055
1050
|
}
|
|
1056
1051
|
case wt: {
|
|
1057
|
-
if (
|
|
1058
|
-
t.
|
|
1052
|
+
if (s.isNull) throw new Error();
|
|
1053
|
+
t.SourceType = s.asString();
|
|
1059
1054
|
break;
|
|
1060
1055
|
}
|
|
1061
1056
|
case Ct: {
|
|
1062
|
-
if (
|
|
1063
|
-
t.
|
|
1057
|
+
if (s.isNull) throw new Error();
|
|
1058
|
+
t.Codec = s.asInt32();
|
|
1059
|
+
break;
|
|
1060
|
+
}
|
|
1061
|
+
case Ut: {
|
|
1062
|
+
if (s.isNull) throw new Error();
|
|
1063
|
+
t.SampleRate = s.asInt32();
|
|
1064
1064
|
break;
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
1067
1067
|
}
|
|
1068
|
-
function
|
|
1068
|
+
function Lt(e) {
|
|
1069
1069
|
const t = [];
|
|
1070
|
-
let
|
|
1071
|
-
for (; (
|
|
1072
|
-
t.push(
|
|
1070
|
+
let s;
|
|
1071
|
+
for (; (s = e.next()) !== null; )
|
|
1072
|
+
t.push(Ft(s.asObject()));
|
|
1073
1073
|
return t;
|
|
1074
1074
|
}
|
|
1075
|
-
const
|
|
1076
|
-
function
|
|
1075
|
+
const mt = 1107713536, Ot = 1154362099, gt = 1185721362;
|
|
1076
|
+
function bt(e) {
|
|
1077
1077
|
const t = {};
|
|
1078
|
-
return
|
|
1078
|
+
return me(t), t;
|
|
1079
1079
|
}
|
|
1080
|
-
function
|
|
1080
|
+
function me(e) {
|
|
1081
1081
|
return e.SetId = 0, e.Name = "", e.ShapeNames = [], e;
|
|
1082
1082
|
}
|
|
1083
|
-
function bt(e, t) {
|
|
1084
|
-
const r = t ?? gt();
|
|
1085
|
-
return Le(r), Ft(e, r), r;
|
|
1086
|
-
}
|
|
1087
1083
|
function Ft(e, t) {
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
}
|
|
1084
|
+
const s = t ?? bt();
|
|
1085
|
+
return me(s), Pt(e, s), s;
|
|
1086
|
+
}
|
|
1087
|
+
function Pt(e, t) {
|
|
1088
|
+
let s;
|
|
1089
|
+
for (; (s = e.next()) !== null; )
|
|
1090
|
+
switch (s.fieldId) {
|
|
1096
1091
|
case mt: {
|
|
1097
|
-
if (
|
|
1098
|
-
t.
|
|
1092
|
+
if (s.isNull) throw new Error();
|
|
1093
|
+
t.Name = s.asString();
|
|
1099
1094
|
break;
|
|
1100
1095
|
}
|
|
1101
1096
|
case Ot: {
|
|
1102
|
-
if (
|
|
1103
|
-
t.
|
|
1097
|
+
if (s.isNull) throw new Error();
|
|
1098
|
+
t.SetId = s.asUInt32();
|
|
1099
|
+
break;
|
|
1100
|
+
}
|
|
1101
|
+
case gt: {
|
|
1102
|
+
if (s.isNull) throw new Error();
|
|
1103
|
+
t.ShapeNames = pt(s.asArray());
|
|
1104
1104
|
break;
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
1107
1107
|
}
|
|
1108
|
-
function
|
|
1108
|
+
function pt(e) {
|
|
1109
1109
|
const t = [];
|
|
1110
|
-
let
|
|
1111
|
-
for (; (
|
|
1112
|
-
t.push(
|
|
1110
|
+
let s;
|
|
1111
|
+
for (; (s = e.next()) !== null; )
|
|
1112
|
+
t.push(s.asString());
|
|
1113
1113
|
return t;
|
|
1114
1114
|
}
|
|
1115
|
-
const
|
|
1116
|
-
function
|
|
1115
|
+
const kt = 76337612, Mt = 185396121, vt = 250031587, Bt = 388632637, Vt = 417197284, Gt = 425972532, xt = 469070965, Ht = 470595159, Yt = 594855258, Wt = 617065367, Kt = 661691032, $t = 781727218, Xt = 834078886, jt = 1043273762, zt = 1236999138, Jt = 1286979607, qt = 1368629611, Qt = 1437068682, Zt = 1668375353, es = 1715899485, ts = 1942830531, ss = 1999510636, rs = 2033288346, ns = 2079864626, is = 2142346422, os = 2228539873, as = 2232517119, ls = 2598291686, Is = 2719718823, Es = 2810953526, _s = 2840065720, hs = 2885165957, us = 3542818975, cs = 3586157513, fs = 3717933110, Ts = 4062655306;
|
|
1116
|
+
function Ss(e) {
|
|
1117
1117
|
const t = {};
|
|
1118
|
-
return
|
|
1118
|
+
return Oe(t), t;
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1121
|
-
return e.ContextType =
|
|
1120
|
+
function Oe(e) {
|
|
1121
|
+
return e.ContextType = Se.Unknown, e.UserType = ye.Unknown, e.PayloadType = de.Unknown, e.Description = "", e.UserId = "", e.DeviceId = "", e.ProductId = "", e.VersionId = "", e.InstallId = "", e.Locale = "", e.SessionId = -1, e.IsInternal = !1, e.IsSnapshot = !1, e.IsReady = !1, e.HasInput = !1, e.ChannelLocale = "", e.EmbeddedSpaceId = "", e.AuthSessionId = "", e.ReceiveAllMessages = !1, e.PreciseJoinedAt = 0n, e.UserAgent = "", e.ClientType = Te.Unknown, e.UniqueSessionId = "", e.Parameters = /* @__PURE__ */ Object.create(null), e.SdkType = Ce.Unknown, e.SdkCapability = 0, e.ViewportWidth = 0, e.ViewportHeight = 0, e.Theme = "", e.Timezone = "", e.IsTouchDevice = !1, e.InitialPath = "", e.StyleFormat = Ne.Css, e.SupportsCompression = !0, e.IsSoftDisconnected = !1, e.SoftDisconnectAt = 0n, e;
|
|
1122
1122
|
}
|
|
1123
|
-
function
|
|
1124
|
-
const
|
|
1125
|
-
return
|
|
1123
|
+
function ds(e, t) {
|
|
1124
|
+
const s = t ?? Ss();
|
|
1125
|
+
return Oe(s), As(e, s), s;
|
|
1126
1126
|
}
|
|
1127
|
-
function
|
|
1128
|
-
let
|
|
1129
|
-
for (; (
|
|
1130
|
-
switch (
|
|
1131
|
-
case pt: {
|
|
1132
|
-
if (r.isNull) throw new Error();
|
|
1133
|
-
t.DeviceId = r.asString();
|
|
1134
|
-
break;
|
|
1135
|
-
}
|
|
1127
|
+
function As(e, t) {
|
|
1128
|
+
let s;
|
|
1129
|
+
for (; (s = e.next()) !== null; )
|
|
1130
|
+
switch (s.fieldId) {
|
|
1136
1131
|
case kt: {
|
|
1137
|
-
if (
|
|
1138
|
-
t.
|
|
1132
|
+
if (s.isNull) throw new Error();
|
|
1133
|
+
t.DeviceId = s.asString();
|
|
1139
1134
|
break;
|
|
1140
1135
|
}
|
|
1141
|
-
case
|
|
1142
|
-
if (
|
|
1143
|
-
t.
|
|
1136
|
+
case Mt: {
|
|
1137
|
+
if (s.isNull) throw new Error();
|
|
1138
|
+
t.InstallId = s.asString();
|
|
1144
1139
|
break;
|
|
1145
1140
|
}
|
|
1146
|
-
case
|
|
1147
|
-
if (
|
|
1148
|
-
t.
|
|
1141
|
+
case vt: {
|
|
1142
|
+
if (s.isNull) throw new Error();
|
|
1143
|
+
t.Theme = s.asString();
|
|
1149
1144
|
break;
|
|
1150
1145
|
}
|
|
1151
1146
|
case Bt: {
|
|
1152
|
-
if (
|
|
1153
|
-
t.
|
|
1147
|
+
if (s.isNull) throw new Error();
|
|
1148
|
+
t.UserAgent = s.asString();
|
|
1154
1149
|
break;
|
|
1155
1150
|
}
|
|
1156
1151
|
case Vt: {
|
|
1157
|
-
if (
|
|
1158
|
-
t.
|
|
1152
|
+
if (s.isNull) throw new Error();
|
|
1153
|
+
t.ContextType = s.asInt32();
|
|
1159
1154
|
break;
|
|
1160
1155
|
}
|
|
1161
1156
|
case Gt: {
|
|
1162
|
-
if (
|
|
1163
|
-
t.
|
|
1157
|
+
if (s.isNull) throw new Error();
|
|
1158
|
+
t.SoftDisconnectAt = s.asUInt64();
|
|
1164
1159
|
break;
|
|
1165
1160
|
}
|
|
1166
1161
|
case xt: {
|
|
1167
|
-
if (
|
|
1168
|
-
t.
|
|
1162
|
+
if (s.isNull) throw new Error();
|
|
1163
|
+
t.HasInput = s.asBool();
|
|
1169
1164
|
break;
|
|
1170
1165
|
}
|
|
1171
1166
|
case Ht: {
|
|
1172
|
-
if (
|
|
1173
|
-
t.
|
|
1167
|
+
if (s.isNull) throw new Error();
|
|
1168
|
+
t.UserType = s.asInt32();
|
|
1174
1169
|
break;
|
|
1175
1170
|
}
|
|
1176
1171
|
case Yt: {
|
|
1177
|
-
if (
|
|
1178
|
-
t.
|
|
1172
|
+
if (s.isNull) throw new Error();
|
|
1173
|
+
t.InitialPath = s.asString();
|
|
1179
1174
|
break;
|
|
1180
1175
|
}
|
|
1181
1176
|
case Wt: {
|
|
1182
|
-
if (
|
|
1183
|
-
t.
|
|
1177
|
+
if (s.isNull) throw new Error();
|
|
1178
|
+
t.IsSoftDisconnected = s.asBool();
|
|
1184
1179
|
break;
|
|
1185
1180
|
}
|
|
1186
1181
|
case Kt: {
|
|
1187
|
-
if (
|
|
1188
|
-
t.
|
|
1182
|
+
if (s.isNull) throw new Error();
|
|
1183
|
+
t.SupportsCompression = s.asBool();
|
|
1189
1184
|
break;
|
|
1190
1185
|
}
|
|
1191
1186
|
case $t: {
|
|
1192
|
-
if (
|
|
1193
|
-
t.
|
|
1187
|
+
if (s.isNull) throw new Error();
|
|
1188
|
+
t.UserId = s.asString();
|
|
1194
1189
|
break;
|
|
1195
1190
|
}
|
|
1196
1191
|
case Xt: {
|
|
1197
|
-
if (
|
|
1198
|
-
t.
|
|
1192
|
+
if (s.isNull) throw new Error();
|
|
1193
|
+
t.ProductId = s.asString();
|
|
1199
1194
|
break;
|
|
1200
1195
|
}
|
|
1201
1196
|
case jt: {
|
|
1202
|
-
if (
|
|
1203
|
-
t.
|
|
1197
|
+
if (s.isNull) throw new Error();
|
|
1198
|
+
t.AuthSessionId = s.asString();
|
|
1204
1199
|
break;
|
|
1205
1200
|
}
|
|
1206
1201
|
case zt: {
|
|
1207
|
-
if (
|
|
1208
|
-
t.
|
|
1202
|
+
if (s.isNull) throw new Error();
|
|
1203
|
+
t.ReceiveAllMessages = s.asBool();
|
|
1209
1204
|
break;
|
|
1210
1205
|
}
|
|
1211
1206
|
case Jt: {
|
|
1212
|
-
if (
|
|
1213
|
-
t.
|
|
1207
|
+
if (s.isNull) throw new Error();
|
|
1208
|
+
t.ViewportHeight = s.asInt32();
|
|
1214
1209
|
break;
|
|
1215
1210
|
}
|
|
1216
1211
|
case qt: {
|
|
1217
|
-
if (
|
|
1218
|
-
t.
|
|
1212
|
+
if (s.isNull) throw new Error();
|
|
1213
|
+
t.Description = s.asString();
|
|
1219
1214
|
break;
|
|
1220
1215
|
}
|
|
1221
1216
|
case Qt: {
|
|
1222
|
-
if (
|
|
1223
|
-
t.
|
|
1217
|
+
if (s.isNull) throw new Error();
|
|
1218
|
+
t.SdkCapability = s.asInt32();
|
|
1224
1219
|
break;
|
|
1225
1220
|
}
|
|
1226
1221
|
case Zt: {
|
|
1227
|
-
if (
|
|
1228
|
-
t.
|
|
1222
|
+
if (s.isNull) throw new Error();
|
|
1223
|
+
t.IsSnapshot = s.asBool();
|
|
1224
|
+
break;
|
|
1225
|
+
}
|
|
1226
|
+
case es: {
|
|
1227
|
+
if (s.isNull) throw new Error();
|
|
1228
|
+
t.Locale = s.asString();
|
|
1229
1229
|
break;
|
|
1230
1230
|
}
|
|
1231
|
-
case
|
|
1232
|
-
if (
|
|
1233
|
-
t.SdkType =
|
|
1231
|
+
case ts: {
|
|
1232
|
+
if (s.isNull) throw new Error();
|
|
1233
|
+
t.SdkType = s.asInt32();
|
|
1234
1234
|
break;
|
|
1235
1235
|
}
|
|
1236
|
-
case
|
|
1237
|
-
if (
|
|
1238
|
-
t.SessionId =
|
|
1236
|
+
case ss: {
|
|
1237
|
+
if (s.isNull) throw new Error();
|
|
1238
|
+
t.SessionId = s.asInt32();
|
|
1239
1239
|
break;
|
|
1240
1240
|
}
|
|
1241
|
-
case
|
|
1242
|
-
if (
|
|
1243
|
-
t.ViewportWidth =
|
|
1241
|
+
case rs: {
|
|
1242
|
+
if (s.isNull) throw new Error();
|
|
1243
|
+
t.ViewportWidth = s.asInt32();
|
|
1244
1244
|
break;
|
|
1245
1245
|
}
|
|
1246
|
-
case
|
|
1247
|
-
if (
|
|
1248
|
-
t.PreciseJoinedAt =
|
|
1246
|
+
case ns: {
|
|
1247
|
+
if (s.isNull) throw new Error();
|
|
1248
|
+
t.PreciseJoinedAt = s.asUInt64();
|
|
1249
1249
|
break;
|
|
1250
1250
|
}
|
|
1251
|
-
case
|
|
1252
|
-
if (
|
|
1253
|
-
t.PayloadType =
|
|
1251
|
+
case is: {
|
|
1252
|
+
if (s.isNull) throw new Error();
|
|
1253
|
+
t.PayloadType = s.asInt32();
|
|
1254
1254
|
break;
|
|
1255
1255
|
}
|
|
1256
|
-
case
|
|
1257
|
-
if (
|
|
1258
|
-
t.StyleFormat =
|
|
1256
|
+
case os: {
|
|
1257
|
+
if (s.isNull) throw new Error();
|
|
1258
|
+
t.StyleFormat = s.asInt32();
|
|
1259
1259
|
break;
|
|
1260
1260
|
}
|
|
1261
|
-
case
|
|
1262
|
-
if (
|
|
1263
|
-
t.IsTouchDevice =
|
|
1261
|
+
case as: {
|
|
1262
|
+
if (s.isNull) throw new Error();
|
|
1263
|
+
t.IsTouchDevice = s.asBool();
|
|
1264
1264
|
break;
|
|
1265
1265
|
}
|
|
1266
|
-
case
|
|
1267
|
-
if (
|
|
1268
|
-
t.VersionId =
|
|
1266
|
+
case ls: {
|
|
1267
|
+
if (s.isNull) throw new Error();
|
|
1268
|
+
t.VersionId = s.asString();
|
|
1269
1269
|
break;
|
|
1270
1270
|
}
|
|
1271
|
-
case
|
|
1272
|
-
if (
|
|
1273
|
-
t.UniqueSessionId =
|
|
1271
|
+
case Is: {
|
|
1272
|
+
if (s.isNull) throw new Error();
|
|
1273
|
+
t.UniqueSessionId = s.asString();
|
|
1274
1274
|
break;
|
|
1275
1275
|
}
|
|
1276
|
-
case
|
|
1277
|
-
if (
|
|
1278
|
-
t.ClientType =
|
|
1276
|
+
case Es: {
|
|
1277
|
+
if (s.isNull) throw new Error();
|
|
1278
|
+
t.ClientType = s.asInt32();
|
|
1279
1279
|
break;
|
|
1280
1280
|
}
|
|
1281
|
-
case
|
|
1282
|
-
if (
|
|
1283
|
-
t.IsReady =
|
|
1281
|
+
case _s: {
|
|
1282
|
+
if (s.isNull) throw new Error();
|
|
1283
|
+
t.IsReady = s.asBool();
|
|
1284
1284
|
break;
|
|
1285
1285
|
}
|
|
1286
|
-
case
|
|
1287
|
-
if (
|
|
1288
|
-
t.Parameters =
|
|
1286
|
+
case hs: {
|
|
1287
|
+
if (s.isNull) throw new Error();
|
|
1288
|
+
t.Parameters = Ns(s.asDictionary());
|
|
1289
1289
|
break;
|
|
1290
1290
|
}
|
|
1291
|
-
case
|
|
1292
|
-
if (
|
|
1293
|
-
t.Timezone =
|
|
1291
|
+
case us: {
|
|
1292
|
+
if (s.isNull) throw new Error();
|
|
1293
|
+
t.Timezone = s.asString();
|
|
1294
1294
|
break;
|
|
1295
1295
|
}
|
|
1296
|
-
case
|
|
1297
|
-
if (
|
|
1298
|
-
t.IsInternal =
|
|
1296
|
+
case cs: {
|
|
1297
|
+
if (s.isNull) throw new Error();
|
|
1298
|
+
t.IsInternal = s.asBool();
|
|
1299
1299
|
break;
|
|
1300
1300
|
}
|
|
1301
|
-
case
|
|
1302
|
-
if (
|
|
1303
|
-
t.ChannelLocale =
|
|
1301
|
+
case fs: {
|
|
1302
|
+
if (s.isNull) throw new Error();
|
|
1303
|
+
t.ChannelLocale = s.asString();
|
|
1304
1304
|
break;
|
|
1305
1305
|
}
|
|
1306
|
-
case
|
|
1307
|
-
if (
|
|
1308
|
-
t.EmbeddedSpaceId =
|
|
1306
|
+
case Ts: {
|
|
1307
|
+
if (s.isNull) throw new Error();
|
|
1308
|
+
t.EmbeddedSpaceId = s.asString();
|
|
1309
1309
|
break;
|
|
1310
1310
|
}
|
|
1311
1311
|
}
|
|
1312
1312
|
}
|
|
1313
|
-
function
|
|
1313
|
+
function Ns(e) {
|
|
1314
1314
|
const t = /* @__PURE__ */ Object.create(null);
|
|
1315
|
-
let
|
|
1316
|
-
for (; (
|
|
1317
|
-
const
|
|
1318
|
-
t[
|
|
1315
|
+
let s;
|
|
1316
|
+
for (; (s = e.next()) !== null; ) {
|
|
1317
|
+
const r = s.key.asString();
|
|
1318
|
+
t[r] = s.value.asString();
|
|
1319
1319
|
}
|
|
1320
1320
|
return t;
|
|
1321
1321
|
}
|
|
1322
|
-
const
|
|
1323
|
-
function
|
|
1322
|
+
const ys = 703025676, ws = 814454131, Cs = 972460562, Us = 976255570, Rs = 1368629611, Ds = 1479280922, Ls = 1533537016, ms = 1909301063, Os = 2274386296, gs = 2603556958, bs = 2885165957, Fs = 3568439632;
|
|
1323
|
+
function Ps(e) {
|
|
1324
1324
|
const t = {};
|
|
1325
|
-
return
|
|
1325
|
+
return ge(t), t;
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1327
|
+
function ge(e) {
|
|
1328
1328
|
return e.FunctionId = f.fromBytes(new Uint8Array(16)), e.FunctionName = "", e.Parameters = [], e.ResultTypeName = "", e.IsEnumerable = !1, e.EnumerableItemTypeName = "", e.IsCancellable = !1, e.Description = "", e.LlmInlineResult = !1, e.LlmCallOnlyOnce = !1, e.RequiresInstance = !1, e.Versions = [], e;
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1331
|
-
const
|
|
1332
|
-
return
|
|
1330
|
+
function ps(e, t) {
|
|
1331
|
+
const s = t ?? Ps();
|
|
1332
|
+
return ge(s), ks(e, s), s;
|
|
1333
1333
|
}
|
|
1334
|
-
function
|
|
1335
|
-
let
|
|
1336
|
-
for (; (
|
|
1337
|
-
switch (
|
|
1338
|
-
case
|
|
1339
|
-
if (
|
|
1340
|
-
t.ResultTypeName =
|
|
1334
|
+
function ks(e, t) {
|
|
1335
|
+
let s;
|
|
1336
|
+
for (; (s = e.next()) !== null; )
|
|
1337
|
+
switch (s.fieldId) {
|
|
1338
|
+
case ys: {
|
|
1339
|
+
if (s.isNull) throw new Error();
|
|
1340
|
+
t.ResultTypeName = s.asString();
|
|
1341
1341
|
break;
|
|
1342
1342
|
}
|
|
1343
|
-
case
|
|
1344
|
-
if (
|
|
1345
|
-
t.FunctionName =
|
|
1343
|
+
case ws: {
|
|
1344
|
+
if (s.isNull) throw new Error();
|
|
1345
|
+
t.FunctionName = s.asString();
|
|
1346
1346
|
break;
|
|
1347
1347
|
}
|
|
1348
|
-
case
|
|
1349
|
-
if (
|
|
1350
|
-
t.EnumerableItemTypeName =
|
|
1348
|
+
case Cs: {
|
|
1349
|
+
if (s.isNull) throw new Error();
|
|
1350
|
+
t.EnumerableItemTypeName = s.asString();
|
|
1351
1351
|
break;
|
|
1352
1352
|
}
|
|
1353
|
-
case
|
|
1354
|
-
if (
|
|
1355
|
-
t.FunctionId =
|
|
1353
|
+
case Us: {
|
|
1354
|
+
if (s.isNull) throw new Error();
|
|
1355
|
+
t.FunctionId = s.asGuid();
|
|
1356
1356
|
break;
|
|
1357
1357
|
}
|
|
1358
|
-
case
|
|
1359
|
-
if (
|
|
1360
|
-
t.Description =
|
|
1358
|
+
case Rs: {
|
|
1359
|
+
if (s.isNull) throw new Error();
|
|
1360
|
+
t.Description = s.asString();
|
|
1361
1361
|
break;
|
|
1362
1362
|
}
|
|
1363
|
-
case
|
|
1364
|
-
if (
|
|
1365
|
-
t.IsCancellable =
|
|
1363
|
+
case Ds: {
|
|
1364
|
+
if (s.isNull) throw new Error();
|
|
1365
|
+
t.IsCancellable = s.asBool();
|
|
1366
1366
|
break;
|
|
1367
1367
|
}
|
|
1368
|
-
case
|
|
1369
|
-
if (
|
|
1370
|
-
t.RequiresInstance =
|
|
1368
|
+
case Ls: {
|
|
1369
|
+
if (s.isNull) throw new Error();
|
|
1370
|
+
t.RequiresInstance = s.asBool();
|
|
1371
1371
|
break;
|
|
1372
1372
|
}
|
|
1373
|
-
case
|
|
1374
|
-
if (
|
|
1375
|
-
t.Versions =
|
|
1373
|
+
case ms: {
|
|
1374
|
+
if (s.isNull) throw new Error();
|
|
1375
|
+
t.Versions = Ms(s.asArray());
|
|
1376
1376
|
break;
|
|
1377
1377
|
}
|
|
1378
|
-
case
|
|
1379
|
-
if (
|
|
1380
|
-
t.LlmInlineResult =
|
|
1378
|
+
case Os: {
|
|
1379
|
+
if (s.isNull) throw new Error();
|
|
1380
|
+
t.LlmInlineResult = s.asBool();
|
|
1381
1381
|
break;
|
|
1382
1382
|
}
|
|
1383
|
-
case
|
|
1384
|
-
if (
|
|
1385
|
-
t.IsEnumerable =
|
|
1383
|
+
case gs: {
|
|
1384
|
+
if (s.isNull) throw new Error();
|
|
1385
|
+
t.IsEnumerable = s.asBool();
|
|
1386
1386
|
break;
|
|
1387
1387
|
}
|
|
1388
|
-
case
|
|
1389
|
-
if (
|
|
1390
|
-
t.Parameters =
|
|
1388
|
+
case bs: {
|
|
1389
|
+
if (s.isNull) throw new Error();
|
|
1390
|
+
t.Parameters = vs(s.asArray());
|
|
1391
1391
|
break;
|
|
1392
1392
|
}
|
|
1393
|
-
case
|
|
1394
|
-
if (
|
|
1395
|
-
t.LlmCallOnlyOnce =
|
|
1393
|
+
case Fs: {
|
|
1394
|
+
if (s.isNull) throw new Error();
|
|
1395
|
+
t.LlmCallOnlyOnce = s.asBool();
|
|
1396
1396
|
break;
|
|
1397
1397
|
}
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
|
-
function
|
|
1400
|
+
function Ms(e) {
|
|
1401
1401
|
const t = [];
|
|
1402
|
-
let
|
|
1403
|
-
for (; (
|
|
1404
|
-
t.push(
|
|
1402
|
+
let s;
|
|
1403
|
+
for (; (s = e.next()) !== null; )
|
|
1404
|
+
t.push(s.asString());
|
|
1405
1405
|
return t;
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1407
|
+
function vs(e) {
|
|
1408
1408
|
const t = [];
|
|
1409
|
-
let
|
|
1410
|
-
for (; (
|
|
1411
|
-
t.push(
|
|
1409
|
+
let s;
|
|
1410
|
+
for (; (s = e.next()) !== null; )
|
|
1411
|
+
t.push(js(s.asObject()));
|
|
1412
1412
|
return t;
|
|
1413
1413
|
}
|
|
1414
|
-
const
|
|
1415
|
-
function
|
|
1414
|
+
const Bs = 607861992, Vs = 894485888, Gs = 972460562, xs = 1368629611, Hs = 1883521406, Ys = 2603556958, Ws = 3609695522, Ks = 4075263697, $s = 4257460908;
|
|
1415
|
+
function Xs(e) {
|
|
1416
1416
|
const t = {};
|
|
1417
|
-
return
|
|
1417
|
+
return be(t), t;
|
|
1418
1418
|
}
|
|
1419
|
-
function
|
|
1419
|
+
function be(e) {
|
|
1420
1420
|
return e.ParameterIndex = 0, e.ParameterName = "", e.TypeName = "", e.HasDefaultValue = !1, e.DefaultValueJson = "", e.DefaultValueData = new Uint8Array(0), e.IsEnumerable = !1, e.EnumerableItemTypeName = "", e.Description = "", e;
|
|
1421
1421
|
}
|
|
1422
|
-
function
|
|
1423
|
-
const
|
|
1424
|
-
return
|
|
1422
|
+
function js(e, t) {
|
|
1423
|
+
const s = t ?? Xs();
|
|
1424
|
+
return be(s), zs(e, s), s;
|
|
1425
1425
|
}
|
|
1426
|
-
function
|
|
1427
|
-
let
|
|
1428
|
-
for (; (
|
|
1429
|
-
switch (
|
|
1430
|
-
case
|
|
1431
|
-
if (
|
|
1432
|
-
t.HasDefaultValue =
|
|
1426
|
+
function zs(e, t) {
|
|
1427
|
+
let s;
|
|
1428
|
+
for (; (s = e.next()) !== null; )
|
|
1429
|
+
switch (s.fieldId) {
|
|
1430
|
+
case Bs: {
|
|
1431
|
+
if (s.isNull) throw new Error();
|
|
1432
|
+
t.HasDefaultValue = s.asBool();
|
|
1433
1433
|
break;
|
|
1434
1434
|
}
|
|
1435
|
-
case
|
|
1436
|
-
if (
|
|
1437
|
-
t.DefaultValueJson =
|
|
1435
|
+
case Vs: {
|
|
1436
|
+
if (s.isNull) throw new Error();
|
|
1437
|
+
t.DefaultValueJson = s.asString();
|
|
1438
1438
|
break;
|
|
1439
1439
|
}
|
|
1440
|
-
case
|
|
1441
|
-
if (
|
|
1442
|
-
t.EnumerableItemTypeName =
|
|
1440
|
+
case Gs: {
|
|
1441
|
+
if (s.isNull) throw new Error();
|
|
1442
|
+
t.EnumerableItemTypeName = s.asString();
|
|
1443
1443
|
break;
|
|
1444
1444
|
}
|
|
1445
|
-
case
|
|
1446
|
-
if (
|
|
1447
|
-
t.Description =
|
|
1445
|
+
case xs: {
|
|
1446
|
+
if (s.isNull) throw new Error();
|
|
1447
|
+
t.Description = s.asString();
|
|
1448
1448
|
break;
|
|
1449
1449
|
}
|
|
1450
|
-
case
|
|
1451
|
-
if (
|
|
1452
|
-
t.DefaultValueData =
|
|
1450
|
+
case Hs: {
|
|
1451
|
+
if (s.isNull) throw new Error();
|
|
1452
|
+
t.DefaultValueData = s.asBinary();
|
|
1453
1453
|
break;
|
|
1454
1454
|
}
|
|
1455
|
-
case
|
|
1456
|
-
if (
|
|
1457
|
-
t.IsEnumerable =
|
|
1455
|
+
case Ys: {
|
|
1456
|
+
if (s.isNull) throw new Error();
|
|
1457
|
+
t.IsEnumerable = s.asBool();
|
|
1458
1458
|
break;
|
|
1459
1459
|
}
|
|
1460
|
-
case
|
|
1461
|
-
if (
|
|
1462
|
-
t.TypeName =
|
|
1460
|
+
case Ws: {
|
|
1461
|
+
if (s.isNull) throw new Error();
|
|
1462
|
+
t.TypeName = s.asString();
|
|
1463
1463
|
break;
|
|
1464
1464
|
}
|
|
1465
|
-
case
|
|
1466
|
-
if (
|
|
1467
|
-
t.ParameterName =
|
|
1465
|
+
case Ks: {
|
|
1466
|
+
if (s.isNull) throw new Error();
|
|
1467
|
+
t.ParameterName = s.asString();
|
|
1468
1468
|
break;
|
|
1469
1469
|
}
|
|
1470
|
-
case
|
|
1471
|
-
if (
|
|
1472
|
-
t.ParameterIndex =
|
|
1470
|
+
case $s: {
|
|
1471
|
+
if (s.isNull) throw new Error();
|
|
1472
|
+
t.ParameterIndex = s.asInt32();
|
|
1473
1473
|
break;
|
|
1474
1474
|
}
|
|
1475
1475
|
}
|
|
1476
1476
|
}
|
|
1477
|
-
const
|
|
1478
|
-
function
|
|
1477
|
+
const Js = 3167053791, qs = 3342364356, Qs = 3612929027;
|
|
1478
|
+
function Fe(e) {
|
|
1479
1479
|
const t = {};
|
|
1480
|
-
return
|
|
1480
|
+
return Pe(t), t;
|
|
1481
1481
|
}
|
|
1482
|
-
function
|
|
1483
|
-
return e.Category = "", e.Type =
|
|
1482
|
+
function Pe(e) {
|
|
1483
|
+
return e.Category = "", e.Type = Ae.Face, e.FaceBlendshapes = [], e;
|
|
1484
1484
|
}
|
|
1485
|
-
function
|
|
1486
|
-
const
|
|
1487
|
-
return
|
|
1485
|
+
function Zs(e, t) {
|
|
1486
|
+
const s = t ?? Fe();
|
|
1487
|
+
return Pe(s), er(e, s), s;
|
|
1488
1488
|
}
|
|
1489
|
-
function
|
|
1490
|
-
let
|
|
1491
|
-
for (; (
|
|
1492
|
-
switch (
|
|
1493
|
-
case
|
|
1494
|
-
if (
|
|
1495
|
-
t.Type =
|
|
1489
|
+
function er(e, t) {
|
|
1490
|
+
let s;
|
|
1491
|
+
for (; (s = e.next()) !== null; )
|
|
1492
|
+
switch (s.fieldId) {
|
|
1493
|
+
case Js: {
|
|
1494
|
+
if (s.isNull) throw new Error();
|
|
1495
|
+
t.Type = s.asInt32();
|
|
1496
1496
|
break;
|
|
1497
1497
|
}
|
|
1498
|
-
case
|
|
1499
|
-
if (
|
|
1500
|
-
t.FaceBlendshapes =
|
|
1498
|
+
case qs: {
|
|
1499
|
+
if (s.isNull) throw new Error();
|
|
1500
|
+
t.FaceBlendshapes = tr(s.asArray());
|
|
1501
1501
|
break;
|
|
1502
1502
|
}
|
|
1503
|
-
case
|
|
1504
|
-
if (
|
|
1505
|
-
t.Category =
|
|
1503
|
+
case Qs: {
|
|
1504
|
+
if (s.isNull) throw new Error();
|
|
1505
|
+
t.Category = s.asString();
|
|
1506
1506
|
break;
|
|
1507
1507
|
}
|
|
1508
1508
|
}
|
|
1509
1509
|
}
|
|
1510
|
-
function
|
|
1510
|
+
function tr(e) {
|
|
1511
1511
|
const t = [];
|
|
1512
|
-
let
|
|
1513
|
-
for (; (
|
|
1514
|
-
t.push(
|
|
1512
|
+
let s;
|
|
1513
|
+
for (; (s = e.next()) !== null; )
|
|
1514
|
+
t.push(s.asString());
|
|
1515
1515
|
return t;
|
|
1516
1516
|
}
|
|
1517
|
-
const
|
|
1518
|
-
function
|
|
1517
|
+
const sr = 1405462580, rr = 2968276160;
|
|
1518
|
+
function nr(e) {
|
|
1519
1519
|
const t = {};
|
|
1520
|
-
return
|
|
1520
|
+
return pe(t), t;
|
|
1521
1521
|
}
|
|
1522
|
-
function
|
|
1522
|
+
function pe(e) {
|
|
1523
1523
|
return e.MimeType = "", e.Value = new Uint8Array(0), e;
|
|
1524
1524
|
}
|
|
1525
|
-
function
|
|
1526
|
-
const
|
|
1527
|
-
return
|
|
1525
|
+
function ir(e, t) {
|
|
1526
|
+
const s = t ?? nr();
|
|
1527
|
+
return pe(s), or(e, s), s;
|
|
1528
1528
|
}
|
|
1529
|
-
function
|
|
1530
|
-
let
|
|
1531
|
-
for (; (
|
|
1532
|
-
switch (
|
|
1533
|
-
case
|
|
1534
|
-
if (
|
|
1535
|
-
t.Value =
|
|
1529
|
+
function or(e, t) {
|
|
1530
|
+
let s;
|
|
1531
|
+
for (; (s = e.next()) !== null; )
|
|
1532
|
+
switch (s.fieldId) {
|
|
1533
|
+
case sr: {
|
|
1534
|
+
if (s.isNull) throw new Error();
|
|
1535
|
+
t.Value = s.asBinary();
|
|
1536
1536
|
break;
|
|
1537
1537
|
}
|
|
1538
|
-
case
|
|
1539
|
-
if (
|
|
1540
|
-
t.MimeType =
|
|
1538
|
+
case rr: {
|
|
1539
|
+
if (s.isNull) throw new Error();
|
|
1540
|
+
t.MimeType = s.asString();
|
|
1541
1541
|
break;
|
|
1542
1542
|
}
|
|
1543
1543
|
}
|
|
1544
1544
|
}
|
|
1545
|
-
const
|
|
1546
|
-
function
|
|
1545
|
+
const ke = 1, ar = 1048655, lr = 3469892363;
|
|
1546
|
+
function Ir(e) {
|
|
1547
|
+
const t = new k(ke);
|
|
1548
|
+
return Er(e, t), t.finish();
|
|
1549
|
+
}
|
|
1550
|
+
function Er(e, t) {
|
|
1551
|
+
t.writeInt32Field(lr, e.TrackId | 0);
|
|
1552
|
+
}
|
|
1553
|
+
function _r(e, t, s) {
|
|
1554
|
+
const r = Ir(e);
|
|
1555
|
+
return he(ar, r, ke, t, s);
|
|
1556
|
+
}
|
|
1557
|
+
const hr = 3612929027;
|
|
1558
|
+
function Me(e) {
|
|
1547
1559
|
const t = {};
|
|
1548
|
-
return
|
|
1560
|
+
return ve(t), t;
|
|
1549
1561
|
}
|
|
1550
|
-
function
|
|
1562
|
+
function ve(e) {
|
|
1551
1563
|
return e.Category = "", e;
|
|
1552
1564
|
}
|
|
1553
|
-
function
|
|
1554
|
-
const
|
|
1555
|
-
return
|
|
1565
|
+
function ur(e, t) {
|
|
1566
|
+
const s = t ?? Me();
|
|
1567
|
+
return ve(s), cr(e, s), s;
|
|
1556
1568
|
}
|
|
1557
|
-
function
|
|
1558
|
-
let
|
|
1559
|
-
for (; (
|
|
1560
|
-
switch (
|
|
1561
|
-
case
|
|
1562
|
-
if (
|
|
1563
|
-
t.Category =
|
|
1569
|
+
function cr(e, t) {
|
|
1570
|
+
let s;
|
|
1571
|
+
for (; (s = e.next()) !== null; )
|
|
1572
|
+
switch (s.fieldId) {
|
|
1573
|
+
case hr: {
|
|
1574
|
+
if (s.isNull) throw new Error();
|
|
1575
|
+
t.Category = s.asString();
|
|
1564
1576
|
break;
|
|
1565
1577
|
}
|
|
1566
1578
|
}
|
|
1567
1579
|
}
|
|
1568
|
-
const
|
|
1569
|
-
function
|
|
1580
|
+
const fr = 2097188, Tr = 979822885, Sr = 2374537704;
|
|
1581
|
+
function dr(e) {
|
|
1570
1582
|
const t = {};
|
|
1571
|
-
return
|
|
1583
|
+
return Be(t), t;
|
|
1572
1584
|
}
|
|
1573
|
-
function
|
|
1585
|
+
function Be(e) {
|
|
1574
1586
|
return e.StyleId = "", e.Style = /* @__PURE__ */ Object.create(null), e;
|
|
1575
1587
|
}
|
|
1576
|
-
function
|
|
1577
|
-
const
|
|
1578
|
-
return
|
|
1588
|
+
function Ar(e, t) {
|
|
1589
|
+
const s = O.create(e);
|
|
1590
|
+
return Nr(s, t);
|
|
1579
1591
|
}
|
|
1580
|
-
function
|
|
1581
|
-
const
|
|
1582
|
-
return
|
|
1592
|
+
function Nr(e, t) {
|
|
1593
|
+
const s = t ?? dr();
|
|
1594
|
+
return Be(s), yr(e, s), s;
|
|
1583
1595
|
}
|
|
1584
|
-
function
|
|
1585
|
-
let
|
|
1586
|
-
for (; (
|
|
1587
|
-
switch (
|
|
1588
|
-
case
|
|
1589
|
-
if (
|
|
1590
|
-
t.StyleId =
|
|
1596
|
+
function yr(e, t) {
|
|
1597
|
+
let s;
|
|
1598
|
+
for (; (s = e.next()) !== null; )
|
|
1599
|
+
switch (s.fieldId) {
|
|
1600
|
+
case Tr: {
|
|
1601
|
+
if (s.isNull) throw new Error();
|
|
1602
|
+
t.StyleId = s.asString();
|
|
1591
1603
|
break;
|
|
1592
1604
|
}
|
|
1593
|
-
case
|
|
1594
|
-
if (
|
|
1595
|
-
t.Style =
|
|
1605
|
+
case Sr: {
|
|
1606
|
+
if (s.isNull) throw new Error();
|
|
1607
|
+
t.Style = Cr(s.asDictionary());
|
|
1596
1608
|
break;
|
|
1597
1609
|
}
|
|
1598
1610
|
}
|
|
1599
1611
|
}
|
|
1600
|
-
async function
|
|
1601
|
-
const
|
|
1602
|
-
return
|
|
1612
|
+
async function wr(e, t) {
|
|
1613
|
+
const s = await G(e, fr);
|
|
1614
|
+
return Ar(s, t);
|
|
1603
1615
|
}
|
|
1604
|
-
function
|
|
1616
|
+
function Cr(e) {
|
|
1605
1617
|
const t = /* @__PURE__ */ Object.create(null);
|
|
1606
|
-
let
|
|
1607
|
-
for (; (
|
|
1608
|
-
const
|
|
1609
|
-
t[
|
|
1618
|
+
let s;
|
|
1619
|
+
for (; (s = e.next()) !== null; ) {
|
|
1620
|
+
const r = s.key.asString();
|
|
1621
|
+
t[r] = s.value.asString();
|
|
1610
1622
|
}
|
|
1611
1623
|
return t;
|
|
1612
1624
|
}
|
|
1613
|
-
const
|
|
1614
|
-
function
|
|
1625
|
+
const Ur = 2097192, Rr = 2136687806;
|
|
1626
|
+
function Dr(e) {
|
|
1615
1627
|
const t = {};
|
|
1616
|
-
return
|
|
1628
|
+
return Ve(t), t;
|
|
1617
1629
|
}
|
|
1618
|
-
function
|
|
1630
|
+
function Ve(e) {
|
|
1619
1631
|
return e.Styles = [], e;
|
|
1620
1632
|
}
|
|
1621
|
-
function
|
|
1622
|
-
const
|
|
1623
|
-
return
|
|
1633
|
+
function Lr(e, t) {
|
|
1634
|
+
const s = O.create(e);
|
|
1635
|
+
return mr(s, t);
|
|
1624
1636
|
}
|
|
1625
|
-
function
|
|
1626
|
-
const
|
|
1627
|
-
return
|
|
1637
|
+
function mr(e, t) {
|
|
1638
|
+
const s = t ?? Dr();
|
|
1639
|
+
return Ve(s), Or(e, s), s;
|
|
1628
1640
|
}
|
|
1629
|
-
function
|
|
1630
|
-
let
|
|
1631
|
-
for (; (
|
|
1632
|
-
switch (
|
|
1633
|
-
case
|
|
1634
|
-
if (
|
|
1635
|
-
t.Styles =
|
|
1641
|
+
function Or(e, t) {
|
|
1642
|
+
let s;
|
|
1643
|
+
for (; (s = e.next()) !== null; )
|
|
1644
|
+
switch (s.fieldId) {
|
|
1645
|
+
case Rr: {
|
|
1646
|
+
if (s.isNull) throw new Error();
|
|
1647
|
+
t.Styles = br(s.asArray());
|
|
1636
1648
|
break;
|
|
1637
1649
|
}
|
|
1638
1650
|
}
|
|
1639
1651
|
}
|
|
1640
|
-
async function
|
|
1641
|
-
const
|
|
1642
|
-
return
|
|
1652
|
+
async function gr(e, t) {
|
|
1653
|
+
const s = await G(e, Ur);
|
|
1654
|
+
return Lr(s, t);
|
|
1643
1655
|
}
|
|
1644
|
-
function
|
|
1656
|
+
function br(e) {
|
|
1645
1657
|
const t = [];
|
|
1646
|
-
let
|
|
1647
|
-
for (; (
|
|
1648
|
-
t.push(
|
|
1658
|
+
let s;
|
|
1659
|
+
for (; (s = e.next()) !== null; )
|
|
1660
|
+
t.push(kr(s.asObject()));
|
|
1649
1661
|
return t;
|
|
1650
1662
|
}
|
|
1651
|
-
const
|
|
1652
|
-
function
|
|
1663
|
+
const Fr = 979822885, Pr = 2374537704;
|
|
1664
|
+
function pr(e) {
|
|
1653
1665
|
const t = {};
|
|
1654
|
-
return
|
|
1666
|
+
return Ge(t), t;
|
|
1655
1667
|
}
|
|
1656
|
-
function
|
|
1668
|
+
function Ge(e) {
|
|
1657
1669
|
return e.StyleId = "", e.Style = /* @__PURE__ */ Object.create(null), e;
|
|
1658
1670
|
}
|
|
1659
|
-
function
|
|
1660
|
-
const
|
|
1661
|
-
return
|
|
1671
|
+
function kr(e, t) {
|
|
1672
|
+
const s = t ?? pr();
|
|
1673
|
+
return Ge(s), Mr(e, s), s;
|
|
1662
1674
|
}
|
|
1663
|
-
function
|
|
1664
|
-
let
|
|
1665
|
-
for (; (
|
|
1666
|
-
switch (
|
|
1667
|
-
case
|
|
1668
|
-
if (
|
|
1669
|
-
t.StyleId =
|
|
1675
|
+
function Mr(e, t) {
|
|
1676
|
+
let s;
|
|
1677
|
+
for (; (s = e.next()) !== null; )
|
|
1678
|
+
switch (s.fieldId) {
|
|
1679
|
+
case Fr: {
|
|
1680
|
+
if (s.isNull) throw new Error();
|
|
1681
|
+
t.StyleId = s.asString();
|
|
1670
1682
|
break;
|
|
1671
1683
|
}
|
|
1672
|
-
case
|
|
1673
|
-
if (
|
|
1674
|
-
t.Style =
|
|
1684
|
+
case Pr: {
|
|
1685
|
+
if (s.isNull) throw new Error();
|
|
1686
|
+
t.Style = vr(s.asDictionary());
|
|
1675
1687
|
break;
|
|
1676
1688
|
}
|
|
1677
1689
|
}
|
|
1678
1690
|
}
|
|
1679
|
-
function
|
|
1691
|
+
function vr(e) {
|
|
1680
1692
|
const t = /* @__PURE__ */ Object.create(null);
|
|
1681
|
-
let
|
|
1682
|
-
for (; (
|
|
1683
|
-
const
|
|
1684
|
-
t[
|
|
1693
|
+
let s;
|
|
1694
|
+
for (; (s = e.next()) !== null; ) {
|
|
1695
|
+
const r = s.key.asString();
|
|
1696
|
+
t[r] = s.value.asString();
|
|
1685
1697
|
}
|
|
1686
1698
|
return t;
|
|
1687
1699
|
}
|
|
1688
|
-
const
|
|
1689
|
-
function
|
|
1700
|
+
const Br = 2097193, Vr = 1415642792;
|
|
1701
|
+
function Gr(e) {
|
|
1690
1702
|
const t = {};
|
|
1691
|
-
return
|
|
1703
|
+
return xe(t), t;
|
|
1692
1704
|
}
|
|
1693
|
-
function
|
|
1705
|
+
function xe(e) {
|
|
1694
1706
|
return e.StyleIds = [], e;
|
|
1695
1707
|
}
|
|
1696
|
-
function
|
|
1697
|
-
const
|
|
1698
|
-
return
|
|
1708
|
+
function xr(e, t) {
|
|
1709
|
+
const s = O.create(e);
|
|
1710
|
+
return Hr(s, t);
|
|
1699
1711
|
}
|
|
1700
|
-
function
|
|
1701
|
-
const
|
|
1702
|
-
return
|
|
1712
|
+
function Hr(e, t) {
|
|
1713
|
+
const s = t ?? Gr();
|
|
1714
|
+
return xe(s), Yr(e, s), s;
|
|
1703
1715
|
}
|
|
1704
|
-
function
|
|
1705
|
-
let
|
|
1706
|
-
for (; (
|
|
1707
|
-
switch (
|
|
1708
|
-
case
|
|
1709
|
-
if (
|
|
1710
|
-
t.StyleIds =
|
|
1716
|
+
function Yr(e, t) {
|
|
1717
|
+
let s;
|
|
1718
|
+
for (; (s = e.next()) !== null; )
|
|
1719
|
+
switch (s.fieldId) {
|
|
1720
|
+
case Vr: {
|
|
1721
|
+
if (s.isNull) throw new Error();
|
|
1722
|
+
t.StyleIds = Kr(s.asArray());
|
|
1711
1723
|
break;
|
|
1712
1724
|
}
|
|
1713
1725
|
}
|
|
1714
1726
|
}
|
|
1715
|
-
async function
|
|
1716
|
-
const
|
|
1717
|
-
return
|
|
1727
|
+
async function Wr(e, t) {
|
|
1728
|
+
const s = await G(e, Br);
|
|
1729
|
+
return xr(s, t);
|
|
1718
1730
|
}
|
|
1719
|
-
function
|
|
1731
|
+
function Kr(e) {
|
|
1720
1732
|
const t = [];
|
|
1721
|
-
let
|
|
1722
|
-
for (; (
|
|
1723
|
-
t.push(
|
|
1733
|
+
let s;
|
|
1734
|
+
for (; (s = e.next()) !== null; )
|
|
1735
|
+
t.push(s.asString());
|
|
1724
1736
|
return t;
|
|
1725
1737
|
}
|
|
1726
|
-
const
|
|
1727
|
-
function
|
|
1738
|
+
const $r = 2097190, Xr = 425183262, jr = 653781469;
|
|
1739
|
+
function zr(e) {
|
|
1728
1740
|
const t = {};
|
|
1729
|
-
return
|
|
1741
|
+
return He(t), t;
|
|
1730
1742
|
}
|
|
1731
|
-
function
|
|
1743
|
+
function He(e) {
|
|
1732
1744
|
return e.Json = "", e.Payloads = /* @__PURE__ */ Object.create(null), e;
|
|
1733
1745
|
}
|
|
1734
|
-
function
|
|
1735
|
-
const
|
|
1736
|
-
return
|
|
1746
|
+
function Jr(e, t) {
|
|
1747
|
+
const s = O.create(e);
|
|
1748
|
+
return qr(s, t);
|
|
1737
1749
|
}
|
|
1738
|
-
function
|
|
1739
|
-
const
|
|
1740
|
-
return
|
|
1750
|
+
function qr(e, t) {
|
|
1751
|
+
const s = t ?? zr();
|
|
1752
|
+
return He(s), Qr(e, s), s;
|
|
1741
1753
|
}
|
|
1742
|
-
function
|
|
1743
|
-
let
|
|
1744
|
-
for (; (
|
|
1745
|
-
switch (
|
|
1746
|
-
case
|
|
1747
|
-
if (
|
|
1748
|
-
t.Json =
|
|
1754
|
+
function Qr(e, t) {
|
|
1755
|
+
let s;
|
|
1756
|
+
for (; (s = e.next()) !== null; )
|
|
1757
|
+
switch (s.fieldId) {
|
|
1758
|
+
case Xr: {
|
|
1759
|
+
if (s.isNull) throw new Error();
|
|
1760
|
+
t.Json = s.asString();
|
|
1749
1761
|
break;
|
|
1750
1762
|
}
|
|
1751
|
-
case
|
|
1752
|
-
if (
|
|
1753
|
-
t.Payloads =
|
|
1763
|
+
case jr: {
|
|
1764
|
+
if (s.isNull) throw new Error();
|
|
1765
|
+
t.Payloads = en(s.asDictionary());
|
|
1754
1766
|
break;
|
|
1755
1767
|
}
|
|
1756
1768
|
}
|
|
1757
1769
|
}
|
|
1758
|
-
async function
|
|
1759
|
-
const
|
|
1760
|
-
return
|
|
1770
|
+
async function Zr(e, t) {
|
|
1771
|
+
const s = await G(e, $r);
|
|
1772
|
+
return Jr(s, t);
|
|
1761
1773
|
}
|
|
1762
|
-
function
|
|
1774
|
+
function en(e) {
|
|
1763
1775
|
const t = /* @__PURE__ */ Object.create(null);
|
|
1764
|
-
let
|
|
1765
|
-
for (; (
|
|
1766
|
-
const
|
|
1767
|
-
t[
|
|
1776
|
+
let s;
|
|
1777
|
+
for (; (s = e.next()) !== null; ) {
|
|
1778
|
+
const r = s.key.asString();
|
|
1779
|
+
t[r] = ir(s.value.asObject());
|
|
1768
1780
|
}
|
|
1769
1781
|
return t;
|
|
1770
1782
|
}
|
|
1771
|
-
const
|
|
1772
|
-
function
|
|
1773
|
-
const t = new
|
|
1774
|
-
return
|
|
1783
|
+
const Ye = 1, tn = 1048636, sn = 2610786289;
|
|
1784
|
+
function rn(e) {
|
|
1785
|
+
const t = new k(Ye);
|
|
1786
|
+
return nn(e, t), t.finish();
|
|
1775
1787
|
}
|
|
1776
|
-
function
|
|
1777
|
-
t.writeUInt32Field(
|
|
1788
|
+
function nn(e, t) {
|
|
1789
|
+
t.writeUInt32Field(sn, e.Version >>> 0);
|
|
1778
1790
|
}
|
|
1779
|
-
function
|
|
1780
|
-
const
|
|
1781
|
-
return
|
|
1791
|
+
function on(e, t, s) {
|
|
1792
|
+
const r = rn(e);
|
|
1793
|
+
return he(tn, r, Ye, t, s);
|
|
1782
1794
|
}
|
|
1783
|
-
const
|
|
1784
|
-
function
|
|
1795
|
+
const an = 161083277, ln = 164808083, In = 1368629611, En = 2514959030, _n = 2745379226, hn = 2950031986, un = 3282782683, cn = 3284746250, fn = 4065070594;
|
|
1796
|
+
function We(e) {
|
|
1785
1797
|
const t = {};
|
|
1786
|
-
return
|
|
1798
|
+
return Ke(t), t;
|
|
1787
1799
|
}
|
|
1788
|
-
function
|
|
1789
|
-
return e.StreamId = "", e.Description = "", e.SourceType = "", e.Codec =
|
|
1800
|
+
function Ke(e) {
|
|
1801
|
+
return e.StreamId = "", e.Description = "", e.SourceType = "", e.Codec = we.H264, e.CodecDetails = "", e.Width = 0, e.Height = 0, e.Framerate = 30, e.CorrelationId = void 0, e;
|
|
1790
1802
|
}
|
|
1791
|
-
function
|
|
1792
|
-
const
|
|
1793
|
-
return
|
|
1803
|
+
function Tn(e, t) {
|
|
1804
|
+
const s = t ?? We();
|
|
1805
|
+
return Ke(s), Sn(e, s), s;
|
|
1794
1806
|
}
|
|
1795
|
-
function
|
|
1796
|
-
let
|
|
1797
|
-
for (; (
|
|
1798
|
-
switch (
|
|
1799
|
-
case
|
|
1800
|
-
if (
|
|
1801
|
-
t.StreamId =
|
|
1807
|
+
function Sn(e, t) {
|
|
1808
|
+
let s;
|
|
1809
|
+
for (; (s = e.next()) !== null; )
|
|
1810
|
+
switch (s.fieldId) {
|
|
1811
|
+
case an: {
|
|
1812
|
+
if (s.isNull) throw new Error();
|
|
1813
|
+
t.StreamId = s.asString();
|
|
1802
1814
|
break;
|
|
1803
1815
|
}
|
|
1804
|
-
case
|
|
1805
|
-
if (
|
|
1806
|
-
t.Framerate =
|
|
1816
|
+
case ln: {
|
|
1817
|
+
if (s.isNull) throw new Error();
|
|
1818
|
+
t.Framerate = s.asFloat64();
|
|
1807
1819
|
break;
|
|
1808
1820
|
}
|
|
1809
|
-
case
|
|
1810
|
-
if (
|
|
1811
|
-
t.Description =
|
|
1821
|
+
case In: {
|
|
1822
|
+
if (s.isNull) throw new Error();
|
|
1823
|
+
t.Description = s.asString();
|
|
1812
1824
|
break;
|
|
1813
1825
|
}
|
|
1814
|
-
case
|
|
1815
|
-
if (
|
|
1826
|
+
case En: {
|
|
1827
|
+
if (s.isNull) {
|
|
1816
1828
|
t.CorrelationId = void 0;
|
|
1817
1829
|
break;
|
|
1818
1830
|
}
|
|
1819
|
-
t.CorrelationId =
|
|
1831
|
+
t.CorrelationId = s.asString();
|
|
1820
1832
|
break;
|
|
1821
1833
|
}
|
|
1822
|
-
case
|
|
1823
|
-
if (
|
|
1824
|
-
t.CodecDetails =
|
|
1834
|
+
case _n: {
|
|
1835
|
+
if (s.isNull) throw new Error();
|
|
1836
|
+
t.CodecDetails = s.asString();
|
|
1825
1837
|
break;
|
|
1826
1838
|
}
|
|
1827
|
-
case
|
|
1828
|
-
if (
|
|
1829
|
-
t.Height =
|
|
1839
|
+
case hn: {
|
|
1840
|
+
if (s.isNull) throw new Error();
|
|
1841
|
+
t.Height = s.asInt32();
|
|
1830
1842
|
break;
|
|
1831
1843
|
}
|
|
1832
|
-
case
|
|
1833
|
-
if (
|
|
1834
|
-
t.SourceType =
|
|
1844
|
+
case un: {
|
|
1845
|
+
if (s.isNull) throw new Error();
|
|
1846
|
+
t.SourceType = s.asString();
|
|
1835
1847
|
break;
|
|
1836
1848
|
}
|
|
1837
|
-
case
|
|
1838
|
-
if (
|
|
1839
|
-
t.Codec =
|
|
1849
|
+
case cn: {
|
|
1850
|
+
if (s.isNull) throw new Error();
|
|
1851
|
+
t.Codec = s.asInt32();
|
|
1840
1852
|
break;
|
|
1841
1853
|
}
|
|
1842
|
-
case
|
|
1843
|
-
if (
|
|
1844
|
-
t.Width =
|
|
1854
|
+
case fn: {
|
|
1855
|
+
if (s.isNull) throw new Error();
|
|
1856
|
+
t.Width = s.asInt32();
|
|
1845
1857
|
break;
|
|
1846
1858
|
}
|
|
1847
1859
|
}
|
|
1848
1860
|
}
|
|
1849
|
-
const
|
|
1850
|
-
function
|
|
1861
|
+
const dn = 65539, An = 693643444, Nn = 976837618, yn = 1144553441, wn = 1497620243, Cn = 1559330978, Un = 1976546434, Rn = 2271236852, Dn = 2277643855, Ln = 2469008121, mn = 3042922213, On = 3064612128, gn = 3219210453, bn = 3504054055, Fn = 3678477544, Pn = 3696445035, pn = 3707543140, kn = 3712281496, Mn = 3895362455, vn = 3897397815, Bn = 3914217035, Vn = 4225107827;
|
|
1862
|
+
function Gn(e) {
|
|
1851
1863
|
const t = {};
|
|
1852
|
-
return
|
|
1864
|
+
return $e(t), t;
|
|
1853
1865
|
}
|
|
1854
|
-
function
|
|
1855
|
-
return e.Clients = /* @__PURE__ */ Object.create(null), e.Functions = /* @__PURE__ */ Object.create(null), e.UIStreams = /* @__PURE__ */ Object.create(null), e.AudioStreams = /* @__PURE__ */ Object.create(null), e.VideoStreams = /* @__PURE__ */ Object.create(null), e.TrackingStreams = /* @__PURE__ */ Object.create(null), e.SpaceId = "", e.ChannelId = "", e.ServerSessionId = "", e.SessionHash = "", e.ChannelUrl = "", e.SessionChannelUrl = "", e.FirstUserId = "", e.PrimaryUserId = "", e.OrganisationName = "", e.SpaceName = "", e.ChannelName = "", e.ServerRunType =
|
|
1866
|
+
function $e(e) {
|
|
1867
|
+
return e.Clients = /* @__PURE__ */ Object.create(null), e.Functions = /* @__PURE__ */ Object.create(null), e.UIStreams = /* @__PURE__ */ Object.create(null), e.AudioStreams = /* @__PURE__ */ Object.create(null), e.VideoStreams = /* @__PURE__ */ Object.create(null), e.TrackingStreams = /* @__PURE__ */ Object.create(null), e.SpaceId = "", e.ChannelId = "", e.ServerSessionId = "", e.SessionHash = "", e.ChannelUrl = "", e.SessionChannelUrl = "", e.FirstUserId = "", e.PrimaryUserId = "", e.OrganisationName = "", e.SpaceName = "", e.ChannelName = "", e.ServerRunType = Ue.Local, e.AppSourceType = Re.Bundle, e.PublicAccess = !1, e.DebugMode = !1, e;
|
|
1856
1868
|
}
|
|
1857
|
-
function
|
|
1858
|
-
const
|
|
1859
|
-
return
|
|
1869
|
+
function xn(e, t) {
|
|
1870
|
+
const s = O.create(e);
|
|
1871
|
+
return Hn(s, t);
|
|
1860
1872
|
}
|
|
1861
|
-
function
|
|
1862
|
-
const
|
|
1863
|
-
return
|
|
1873
|
+
function Hn(e, t) {
|
|
1874
|
+
const s = t ?? Gn();
|
|
1875
|
+
return $e(s), Yn(e, s), s;
|
|
1864
1876
|
}
|
|
1865
|
-
function
|
|
1866
|
-
let
|
|
1867
|
-
for (; (
|
|
1868
|
-
switch (
|
|
1869
|
-
case un: {
|
|
1870
|
-
if (r.isNull) throw new Error();
|
|
1871
|
-
t.FirstUserId = r.asString();
|
|
1872
|
-
break;
|
|
1873
|
-
}
|
|
1874
|
-
case cn: {
|
|
1875
|
-
if (r.isNull) throw new Error();
|
|
1876
|
-
t.SessionHash = r.asString();
|
|
1877
|
-
break;
|
|
1878
|
-
}
|
|
1879
|
-
case fn: {
|
|
1880
|
-
if (r.isNull) throw new Error();
|
|
1881
|
-
t.Clients = Vn(r.asDictionary());
|
|
1882
|
-
break;
|
|
1883
|
-
}
|
|
1884
|
-
case Tn: {
|
|
1885
|
-
if (r.isNull) throw new Error();
|
|
1886
|
-
t.TrackingStreams = Gn(r.asDictionary());
|
|
1887
|
-
break;
|
|
1888
|
-
}
|
|
1889
|
-
case Sn: {
|
|
1890
|
-
if (r.isNull) throw new Error();
|
|
1891
|
-
t.ChannelId = r.asString();
|
|
1892
|
-
break;
|
|
1893
|
-
}
|
|
1894
|
-
case dn: {
|
|
1895
|
-
if (r.isNull) throw new Error();
|
|
1896
|
-
t.AppSourceType = r.asInt32();
|
|
1897
|
-
break;
|
|
1898
|
-
}
|
|
1877
|
+
function Yn(e, t) {
|
|
1878
|
+
let s;
|
|
1879
|
+
for (; (s = e.next()) !== null; )
|
|
1880
|
+
switch (s.fieldId) {
|
|
1899
1881
|
case An: {
|
|
1900
|
-
if (
|
|
1901
|
-
t.
|
|
1882
|
+
if (s.isNull) throw new Error();
|
|
1883
|
+
t.FirstUserId = s.asString();
|
|
1902
1884
|
break;
|
|
1903
1885
|
}
|
|
1904
1886
|
case Nn: {
|
|
1905
|
-
if (
|
|
1906
|
-
t.
|
|
1887
|
+
if (s.isNull) throw new Error();
|
|
1888
|
+
t.SessionHash = s.asString();
|
|
1907
1889
|
break;
|
|
1908
1890
|
}
|
|
1909
1891
|
case yn: {
|
|
1910
|
-
if (
|
|
1911
|
-
t.
|
|
1892
|
+
if (s.isNull) throw new Error();
|
|
1893
|
+
t.Clients = Kn(s.asDictionary());
|
|
1912
1894
|
break;
|
|
1913
1895
|
}
|
|
1914
1896
|
case wn: {
|
|
1915
|
-
if (
|
|
1916
|
-
t.
|
|
1897
|
+
if (s.isNull) throw new Error();
|
|
1898
|
+
t.TrackingStreams = $n(s.asDictionary());
|
|
1917
1899
|
break;
|
|
1918
1900
|
}
|
|
1919
1901
|
case Cn: {
|
|
1920
|
-
if (
|
|
1921
|
-
t.
|
|
1902
|
+
if (s.isNull) throw new Error();
|
|
1903
|
+
t.ChannelId = s.asString();
|
|
1922
1904
|
break;
|
|
1923
1905
|
}
|
|
1924
1906
|
case Un: {
|
|
1925
|
-
if (
|
|
1926
|
-
t.
|
|
1907
|
+
if (s.isNull) throw new Error();
|
|
1908
|
+
t.AppSourceType = s.asInt32();
|
|
1927
1909
|
break;
|
|
1928
1910
|
}
|
|
1929
1911
|
case Rn: {
|
|
1930
|
-
if (
|
|
1931
|
-
t.
|
|
1912
|
+
if (s.isNull) throw new Error();
|
|
1913
|
+
t.SessionChannelUrl = s.asString();
|
|
1932
1914
|
break;
|
|
1933
1915
|
}
|
|
1934
1916
|
case Dn: {
|
|
1935
|
-
if (
|
|
1936
|
-
t.
|
|
1917
|
+
if (s.isNull) throw new Error();
|
|
1918
|
+
t.ChannelUrl = s.asString();
|
|
1937
1919
|
break;
|
|
1938
1920
|
}
|
|
1939
1921
|
case Ln: {
|
|
1940
|
-
if (
|
|
1941
|
-
t.
|
|
1922
|
+
if (s.isNull) throw new Error();
|
|
1923
|
+
t.ChannelName = s.asString();
|
|
1942
1924
|
break;
|
|
1943
1925
|
}
|
|
1944
1926
|
case mn: {
|
|
1945
|
-
if (
|
|
1946
|
-
t.
|
|
1927
|
+
if (s.isNull) throw new Error();
|
|
1928
|
+
t.PublicAccess = s.asBool();
|
|
1947
1929
|
break;
|
|
1948
1930
|
}
|
|
1949
1931
|
case On: {
|
|
1950
|
-
if (
|
|
1951
|
-
t.
|
|
1932
|
+
if (s.isNull) throw new Error();
|
|
1933
|
+
t.ServerRunType = s.asInt32();
|
|
1952
1934
|
break;
|
|
1953
1935
|
}
|
|
1954
1936
|
case gn: {
|
|
1955
|
-
if (
|
|
1956
|
-
t.
|
|
1937
|
+
if (s.isNull) throw new Error();
|
|
1938
|
+
t.OrganisationName = s.asString();
|
|
1957
1939
|
break;
|
|
1958
1940
|
}
|
|
1959
1941
|
case bn: {
|
|
1960
|
-
if (
|
|
1961
|
-
t.
|
|
1942
|
+
if (s.isNull) throw new Error();
|
|
1943
|
+
t.DebugMode = s.asBool();
|
|
1962
1944
|
break;
|
|
1963
1945
|
}
|
|
1964
1946
|
case Fn: {
|
|
1965
|
-
if (
|
|
1966
|
-
t.
|
|
1947
|
+
if (s.isNull) throw new Error();
|
|
1948
|
+
t.Functions = Xn(s.asDictionary());
|
|
1967
1949
|
break;
|
|
1968
1950
|
}
|
|
1969
1951
|
case Pn: {
|
|
1970
|
-
if (
|
|
1971
|
-
t.
|
|
1952
|
+
if (s.isNull) throw new Error();
|
|
1953
|
+
t.UIStreams = jn(s.asDictionary());
|
|
1954
|
+
break;
|
|
1955
|
+
}
|
|
1956
|
+
case pn: {
|
|
1957
|
+
if (s.isNull) throw new Error();
|
|
1958
|
+
t.SpaceId = s.asString();
|
|
1959
|
+
break;
|
|
1960
|
+
}
|
|
1961
|
+
case kn: {
|
|
1962
|
+
if (s.isNull) throw new Error();
|
|
1963
|
+
t.PrimaryUserId = s.asString();
|
|
1964
|
+
break;
|
|
1965
|
+
}
|
|
1966
|
+
case Mn: {
|
|
1967
|
+
if (s.isNull) throw new Error();
|
|
1968
|
+
t.AudioStreams = zn(s.asDictionary());
|
|
1969
|
+
break;
|
|
1970
|
+
}
|
|
1971
|
+
case vn: {
|
|
1972
|
+
if (s.isNull) throw new Error();
|
|
1973
|
+
t.VideoStreams = Jn(s.asDictionary());
|
|
1974
|
+
break;
|
|
1975
|
+
}
|
|
1976
|
+
case Bn: {
|
|
1977
|
+
if (s.isNull) throw new Error();
|
|
1978
|
+
t.ServerSessionId = s.asString();
|
|
1979
|
+
break;
|
|
1980
|
+
}
|
|
1981
|
+
case Vn: {
|
|
1982
|
+
if (s.isNull) throw new Error();
|
|
1983
|
+
t.SpaceName = s.asString();
|
|
1972
1984
|
break;
|
|
1973
1985
|
}
|
|
1974
1986
|
}
|
|
1975
1987
|
}
|
|
1976
|
-
async function
|
|
1977
|
-
const
|
|
1978
|
-
return
|
|
1988
|
+
async function Wn(e, t) {
|
|
1989
|
+
const s = await G(e, dn);
|
|
1990
|
+
return xn(s, t);
|
|
1979
1991
|
}
|
|
1980
|
-
function
|
|
1992
|
+
function Kn(e) {
|
|
1981
1993
|
const t = /* @__PURE__ */ Object.create(null);
|
|
1982
|
-
let
|
|
1983
|
-
for (; (
|
|
1984
|
-
const
|
|
1985
|
-
t[
|
|
1994
|
+
let s;
|
|
1995
|
+
for (; (s = e.next()) !== null; ) {
|
|
1996
|
+
const r = s.key.asInt32();
|
|
1997
|
+
t[r] = ds(s.value.asObject());
|
|
1986
1998
|
}
|
|
1987
1999
|
return t;
|
|
1988
2000
|
}
|
|
1989
|
-
function
|
|
2001
|
+
function $n(e) {
|
|
1990
2002
|
const t = /* @__PURE__ */ Object.create(null);
|
|
1991
|
-
let
|
|
1992
|
-
for (; (
|
|
1993
|
-
const
|
|
1994
|
-
t[
|
|
2003
|
+
let s;
|
|
2004
|
+
for (; (s = e.next()) !== null; ) {
|
|
2005
|
+
const r = s.key.asString();
|
|
2006
|
+
t[r] = Ui(s.value.asObject());
|
|
1995
2007
|
}
|
|
1996
2008
|
return t;
|
|
1997
2009
|
}
|
|
1998
|
-
function
|
|
2010
|
+
function Xn(e) {
|
|
1999
2011
|
const t = /* @__PURE__ */ Object.create(null);
|
|
2000
|
-
let
|
|
2001
|
-
for (; (
|
|
2002
|
-
const
|
|
2003
|
-
t[
|
|
2012
|
+
let s;
|
|
2013
|
+
for (; (s = e.next()) !== null; ) {
|
|
2014
|
+
const r = s.key.asInt32();
|
|
2015
|
+
t[r] = qn(s.value.asArray());
|
|
2004
2016
|
}
|
|
2005
2017
|
return t;
|
|
2006
2018
|
}
|
|
2007
|
-
function
|
|
2019
|
+
function jn(e) {
|
|
2008
2020
|
const t = /* @__PURE__ */ Object.create(null);
|
|
2009
|
-
let
|
|
2010
|
-
for (; (
|
|
2011
|
-
const
|
|
2012
|
-
t[
|
|
2021
|
+
let s;
|
|
2022
|
+
for (; (s = e.next()) !== null; ) {
|
|
2023
|
+
const r = s.key.asString();
|
|
2024
|
+
t[r] = ri(s.value.asObject());
|
|
2013
2025
|
}
|
|
2014
2026
|
return t;
|
|
2015
2027
|
}
|
|
2016
|
-
function
|
|
2028
|
+
function zn(e) {
|
|
2017
2029
|
const t = /* @__PURE__ */ Object.create(null);
|
|
2018
|
-
let
|
|
2019
|
-
for (; (
|
|
2020
|
-
const
|
|
2021
|
-
t[
|
|
2030
|
+
let s;
|
|
2031
|
+
for (; (s = e.next()) !== null; ) {
|
|
2032
|
+
const r = s.key.asString();
|
|
2033
|
+
t[r] = Ei(s.value.asObject());
|
|
2022
2034
|
}
|
|
2023
2035
|
return t;
|
|
2024
2036
|
}
|
|
2025
|
-
function
|
|
2037
|
+
function Jn(e) {
|
|
2026
2038
|
const t = /* @__PURE__ */ Object.create(null);
|
|
2027
|
-
let
|
|
2028
|
-
for (; (
|
|
2029
|
-
const
|
|
2030
|
-
t[
|
|
2039
|
+
let s;
|
|
2040
|
+
for (; (s = e.next()) !== null; ) {
|
|
2041
|
+
const r = s.key.asString();
|
|
2042
|
+
t[r] = Si(s.value.asObject());
|
|
2031
2043
|
}
|
|
2032
2044
|
return t;
|
|
2033
2045
|
}
|
|
2034
|
-
function
|
|
2046
|
+
function qn(e) {
|
|
2035
2047
|
const t = [];
|
|
2036
|
-
let
|
|
2037
|
-
for (; (
|
|
2038
|
-
t.push(
|
|
2048
|
+
let s;
|
|
2049
|
+
for (; (s = e.next()) !== null; )
|
|
2050
|
+
t.push(ps(s.asObject()));
|
|
2039
2051
|
return t;
|
|
2040
2052
|
}
|
|
2041
|
-
const
|
|
2042
|
-
function
|
|
2053
|
+
const Qn = 161083277, Zn = 325678206, ei = 3469892363, ti = 3645544153;
|
|
2054
|
+
function si(e) {
|
|
2043
2055
|
const t = {};
|
|
2044
|
-
return
|
|
2056
|
+
return Xe(t), t;
|
|
2045
2057
|
}
|
|
2046
|
-
function
|
|
2047
|
-
return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info =
|
|
2058
|
+
function Xe(e) {
|
|
2059
|
+
return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = Me(), e;
|
|
2048
2060
|
}
|
|
2049
|
-
function
|
|
2050
|
-
const
|
|
2051
|
-
return
|
|
2061
|
+
function ri(e, t) {
|
|
2062
|
+
const s = t ?? si();
|
|
2063
|
+
return Xe(s), ni(e, s), s;
|
|
2052
2064
|
}
|
|
2053
|
-
function
|
|
2054
|
-
let
|
|
2055
|
-
for (; (
|
|
2056
|
-
switch (
|
|
2057
|
-
case
|
|
2058
|
-
if (
|
|
2059
|
-
t.StreamId =
|
|
2065
|
+
function ni(e, t) {
|
|
2066
|
+
let s;
|
|
2067
|
+
for (; (s = e.next()) !== null; )
|
|
2068
|
+
switch (s.fieldId) {
|
|
2069
|
+
case Qn: {
|
|
2070
|
+
if (s.isNull) throw new Error();
|
|
2071
|
+
t.StreamId = s.asString();
|
|
2060
2072
|
break;
|
|
2061
2073
|
}
|
|
2062
|
-
case
|
|
2063
|
-
if (
|
|
2064
|
-
t.ClientSessionId =
|
|
2074
|
+
case Zn: {
|
|
2075
|
+
if (s.isNull) throw new Error();
|
|
2076
|
+
t.ClientSessionId = s.asInt32();
|
|
2065
2077
|
break;
|
|
2066
2078
|
}
|
|
2067
|
-
case
|
|
2068
|
-
if (
|
|
2069
|
-
t.TrackId =
|
|
2079
|
+
case ei: {
|
|
2080
|
+
if (s.isNull) throw new Error();
|
|
2081
|
+
t.TrackId = s.asInt32();
|
|
2070
2082
|
break;
|
|
2071
2083
|
}
|
|
2072
|
-
case
|
|
2073
|
-
if (
|
|
2074
|
-
t.Info =
|
|
2084
|
+
case ti: {
|
|
2085
|
+
if (s.isNull) throw new Error();
|
|
2086
|
+
t.Info = ur(s.asObject());
|
|
2075
2087
|
break;
|
|
2076
2088
|
}
|
|
2077
2089
|
}
|
|
2078
2090
|
}
|
|
2079
|
-
const
|
|
2080
|
-
function
|
|
2091
|
+
const ii = 161083277, oi = 325678206, ai = 3469892363, li = 3645544153;
|
|
2092
|
+
function Ii(e) {
|
|
2081
2093
|
const t = {};
|
|
2082
|
-
return
|
|
2094
|
+
return je(t), t;
|
|
2083
2095
|
}
|
|
2084
|
-
function
|
|
2085
|
-
return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info =
|
|
2096
|
+
function je(e) {
|
|
2097
|
+
return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = De(), e;
|
|
2086
2098
|
}
|
|
2087
|
-
function
|
|
2088
|
-
const
|
|
2089
|
-
return
|
|
2099
|
+
function Ei(e, t) {
|
|
2100
|
+
const s = t ?? Ii();
|
|
2101
|
+
return je(s), _i(e, s), s;
|
|
2090
2102
|
}
|
|
2091
|
-
function
|
|
2092
|
-
let
|
|
2093
|
-
for (; (
|
|
2094
|
-
switch (
|
|
2095
|
-
case
|
|
2096
|
-
if (
|
|
2097
|
-
t.StreamId =
|
|
2103
|
+
function _i(e, t) {
|
|
2104
|
+
let s;
|
|
2105
|
+
for (; (s = e.next()) !== null; )
|
|
2106
|
+
switch (s.fieldId) {
|
|
2107
|
+
case ii: {
|
|
2108
|
+
if (s.isNull) throw new Error();
|
|
2109
|
+
t.StreamId = s.asString();
|
|
2098
2110
|
break;
|
|
2099
2111
|
}
|
|
2100
|
-
case
|
|
2101
|
-
if (
|
|
2102
|
-
t.ClientSessionId =
|
|
2112
|
+
case oi: {
|
|
2113
|
+
if (s.isNull) throw new Error();
|
|
2114
|
+
t.ClientSessionId = s.asInt32();
|
|
2103
2115
|
break;
|
|
2104
2116
|
}
|
|
2105
|
-
case
|
|
2106
|
-
if (
|
|
2107
|
-
t.TrackId =
|
|
2117
|
+
case ai: {
|
|
2118
|
+
if (s.isNull) throw new Error();
|
|
2119
|
+
t.TrackId = s.asInt32();
|
|
2108
2120
|
break;
|
|
2109
2121
|
}
|
|
2110
|
-
case
|
|
2111
|
-
if (
|
|
2112
|
-
t.Info =
|
|
2122
|
+
case li: {
|
|
2123
|
+
if (s.isNull) throw new Error();
|
|
2124
|
+
t.Info = Rt(s.asObject());
|
|
2113
2125
|
break;
|
|
2114
2126
|
}
|
|
2115
2127
|
}
|
|
2116
2128
|
}
|
|
2117
|
-
const
|
|
2118
|
-
function
|
|
2129
|
+
const hi = 161083277, ui = 325678206, ci = 3469892363, fi = 3645544153;
|
|
2130
|
+
function Ti(e) {
|
|
2119
2131
|
const t = {};
|
|
2120
|
-
return
|
|
2132
|
+
return ze(t), t;
|
|
2121
2133
|
}
|
|
2122
|
-
function
|
|
2123
|
-
return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info =
|
|
2134
|
+
function ze(e) {
|
|
2135
|
+
return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = We(), e;
|
|
2124
2136
|
}
|
|
2125
|
-
function
|
|
2126
|
-
const
|
|
2127
|
-
return
|
|
2137
|
+
function Si(e, t) {
|
|
2138
|
+
const s = t ?? Ti();
|
|
2139
|
+
return ze(s), di(e, s), s;
|
|
2128
2140
|
}
|
|
2129
|
-
function
|
|
2130
|
-
let
|
|
2131
|
-
for (; (
|
|
2132
|
-
switch (
|
|
2133
|
-
case
|
|
2134
|
-
if (
|
|
2135
|
-
t.StreamId =
|
|
2141
|
+
function di(e, t) {
|
|
2142
|
+
let s;
|
|
2143
|
+
for (; (s = e.next()) !== null; )
|
|
2144
|
+
switch (s.fieldId) {
|
|
2145
|
+
case hi: {
|
|
2146
|
+
if (s.isNull) throw new Error();
|
|
2147
|
+
t.StreamId = s.asString();
|
|
2136
2148
|
break;
|
|
2137
2149
|
}
|
|
2138
|
-
case
|
|
2139
|
-
if (
|
|
2140
|
-
t.ClientSessionId =
|
|
2150
|
+
case ui: {
|
|
2151
|
+
if (s.isNull) throw new Error();
|
|
2152
|
+
t.ClientSessionId = s.asInt32();
|
|
2141
2153
|
break;
|
|
2142
2154
|
}
|
|
2143
|
-
case
|
|
2144
|
-
if (
|
|
2145
|
-
t.TrackId =
|
|
2155
|
+
case ci: {
|
|
2156
|
+
if (s.isNull) throw new Error();
|
|
2157
|
+
t.TrackId = s.asInt32();
|
|
2146
2158
|
break;
|
|
2147
2159
|
}
|
|
2148
|
-
case
|
|
2149
|
-
if (
|
|
2150
|
-
t.Info =
|
|
2160
|
+
case fi: {
|
|
2161
|
+
if (s.isNull) throw new Error();
|
|
2162
|
+
t.Info = Tn(s.asObject());
|
|
2151
2163
|
break;
|
|
2152
2164
|
}
|
|
2153
2165
|
}
|
|
2154
2166
|
}
|
|
2155
|
-
const
|
|
2156
|
-
function
|
|
2167
|
+
const Ai = 161083277, Ni = 325678206, yi = 3469892363, wi = 3645544153;
|
|
2168
|
+
function Ci(e) {
|
|
2157
2169
|
const t = {};
|
|
2158
|
-
return
|
|
2170
|
+
return Je(t), t;
|
|
2159
2171
|
}
|
|
2160
|
-
function
|
|
2161
|
-
return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info =
|
|
2172
|
+
function Je(e) {
|
|
2173
|
+
return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = Fe(), e;
|
|
2162
2174
|
}
|
|
2163
|
-
function
|
|
2164
|
-
const
|
|
2165
|
-
return
|
|
2175
|
+
function Ui(e, t) {
|
|
2176
|
+
const s = t ?? Ci();
|
|
2177
|
+
return Je(s), Ri(e, s), s;
|
|
2166
2178
|
}
|
|
2167
|
-
function
|
|
2168
|
-
let
|
|
2169
|
-
for (; (
|
|
2170
|
-
switch (
|
|
2171
|
-
case
|
|
2172
|
-
if (
|
|
2173
|
-
t.StreamId =
|
|
2179
|
+
function Ri(e, t) {
|
|
2180
|
+
let s;
|
|
2181
|
+
for (; (s = e.next()) !== null; )
|
|
2182
|
+
switch (s.fieldId) {
|
|
2183
|
+
case Ai: {
|
|
2184
|
+
if (s.isNull) throw new Error();
|
|
2185
|
+
t.StreamId = s.asString();
|
|
2174
2186
|
break;
|
|
2175
2187
|
}
|
|
2176
|
-
case
|
|
2177
|
-
if (
|
|
2178
|
-
t.ClientSessionId =
|
|
2188
|
+
case Ni: {
|
|
2189
|
+
if (s.isNull) throw new Error();
|
|
2190
|
+
t.ClientSessionId = s.asInt32();
|
|
2179
2191
|
break;
|
|
2180
2192
|
}
|
|
2181
|
-
case
|
|
2182
|
-
if (
|
|
2183
|
-
t.TrackId =
|
|
2193
|
+
case yi: {
|
|
2194
|
+
if (s.isNull) throw new Error();
|
|
2195
|
+
t.TrackId = s.asInt32();
|
|
2184
2196
|
break;
|
|
2185
2197
|
}
|
|
2186
|
-
case
|
|
2187
|
-
if (
|
|
2188
|
-
t.Info =
|
|
2198
|
+
case wi: {
|
|
2199
|
+
if (s.isNull) throw new Error();
|
|
2200
|
+
t.Info = Zs(s.asObject());
|
|
2189
2201
|
break;
|
|
2190
2202
|
}
|
|
2191
2203
|
}
|
|
@@ -2193,67 +2205,67 @@ function Ai(e, t) {
|
|
|
2193
2205
|
function R(e) {
|
|
2194
2206
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
2195
2207
|
}
|
|
2196
|
-
function
|
|
2197
|
-
const t = {},
|
|
2198
|
-
for (let
|
|
2199
|
-
const n = r
|
|
2208
|
+
function qe(e) {
|
|
2209
|
+
const t = {}, s = Object.keys(e);
|
|
2210
|
+
for (let r = 0; r < s.length; r++) {
|
|
2211
|
+
const n = s[r];
|
|
2200
2212
|
t[n] = e[n];
|
|
2201
2213
|
}
|
|
2202
2214
|
return t;
|
|
2203
2215
|
}
|
|
2204
|
-
function
|
|
2205
|
-
if (!(e === void 0 &&
|
|
2216
|
+
function Qe(e, t, s, r) {
|
|
2217
|
+
if (!(e === void 0 && r)) {
|
|
2206
2218
|
if (Array.isArray(e)) {
|
|
2207
2219
|
const n = [];
|
|
2208
2220
|
for (let i = 0; i < e.length; i++) {
|
|
2209
2221
|
const o = e[i];
|
|
2210
2222
|
if (typeof o != "string")
|
|
2211
|
-
throw new Error(`Invalid styleIds entry at ${t}.styleIds[${i}] for element ${
|
|
2223
|
+
throw new Error(`Invalid styleIds entry at ${t}.styleIds[${i}] for element ${s}`);
|
|
2212
2224
|
const a = o.trim();
|
|
2213
2225
|
a.length !== 0 && n.push(a);
|
|
2214
2226
|
}
|
|
2215
2227
|
return n;
|
|
2216
2228
|
}
|
|
2217
2229
|
if (e != null)
|
|
2218
|
-
throw new Error(`Invalid styleIds for element ${
|
|
2230
|
+
throw new Error(`Invalid styleIds for element ${s}`);
|
|
2219
2231
|
return [];
|
|
2220
2232
|
}
|
|
2221
2233
|
}
|
|
2222
2234
|
function oe(e, t) {
|
|
2223
2235
|
if (!e || typeof e != "object")
|
|
2224
2236
|
throw new Error(`Invalid UI node at ${t}`);
|
|
2225
|
-
const
|
|
2226
|
-
if (typeof r != "string")
|
|
2227
|
-
throw new Error(`Invalid or missing node id at ${t}`);
|
|
2237
|
+
const s = e.Id, r = e.Type, n = e.Props, i = e.Children, o = e.StyleIds;
|
|
2228
2238
|
if (typeof s != "string")
|
|
2229
|
-
throw new Error(`Invalid or missing node
|
|
2239
|
+
throw new Error(`Invalid or missing node id at ${t}`);
|
|
2240
|
+
if (typeof r != "string")
|
|
2241
|
+
throw new Error(`Invalid or missing node type for ${s}`);
|
|
2230
2242
|
let a = {};
|
|
2231
2243
|
if (n != null) {
|
|
2232
2244
|
if (!R(n))
|
|
2233
|
-
throw new Error(`Invalid props for node ${
|
|
2234
|
-
a =
|
|
2245
|
+
throw new Error(`Invalid props for node ${s}`);
|
|
2246
|
+
a = qe(n);
|
|
2235
2247
|
}
|
|
2236
2248
|
let I = [];
|
|
2237
2249
|
Array.isArray(i) && (I = i.map(
|
|
2238
2250
|
(E, h) => oe(E ?? {}, `${t}.children[${h}]`)
|
|
2239
2251
|
));
|
|
2240
|
-
const _ =
|
|
2252
|
+
const _ = Qe(o, t, s, !1), l = typeof e.SourceMarker == "string" ? e.SourceMarker : void 0;
|
|
2241
2253
|
return {
|
|
2242
|
-
id:
|
|
2243
|
-
type:
|
|
2254
|
+
id: s,
|
|
2255
|
+
type: r,
|
|
2244
2256
|
props: a,
|
|
2245
2257
|
children: I,
|
|
2246
2258
|
styleIds: _ ?? [],
|
|
2247
2259
|
...l ? { sourceMarker: l } : {}
|
|
2248
2260
|
};
|
|
2249
2261
|
}
|
|
2250
|
-
function
|
|
2262
|
+
function Di(e, t) {
|
|
2251
2263
|
if (!R(e))
|
|
2252
2264
|
throw new Error(`Invalid text delta at ${t}`);
|
|
2253
|
-
const
|
|
2254
|
-
if (typeof r != "string" || r.length === 0)
|
|
2255
|
-
throw new Error(`Invalid text delta node id at ${t}`);
|
|
2265
|
+
const s = e.NodeId, r = e.PropertyName, n = e.Start, i = e.End, o = e.InsertedText;
|
|
2256
2266
|
if (typeof s != "string" || s.length === 0)
|
|
2267
|
+
throw new Error(`Invalid text delta node id at ${t}`);
|
|
2268
|
+
if (typeof r != "string" || r.length === 0)
|
|
2257
2269
|
throw new Error(`Invalid text delta property name at ${t}`);
|
|
2258
2270
|
if (typeof n != "number" || !Number.isFinite(n))
|
|
2259
2271
|
throw new Error(`Invalid text delta start at ${t}`);
|
|
@@ -2267,67 +2279,67 @@ function Ni(e, t) {
|
|
|
2267
2279
|
} else if (i != null)
|
|
2268
2280
|
throw new Error(`Invalid text delta end at ${t}`);
|
|
2269
2281
|
return {
|
|
2270
|
-
nodeId:
|
|
2271
|
-
propertyName:
|
|
2282
|
+
nodeId: s,
|
|
2283
|
+
propertyName: r,
|
|
2272
2284
|
start: n,
|
|
2273
2285
|
end: a,
|
|
2274
2286
|
insertedText: o
|
|
2275
2287
|
};
|
|
2276
2288
|
}
|
|
2277
|
-
function
|
|
2289
|
+
function Li(e, t) {
|
|
2278
2290
|
if (!R(e))
|
|
2279
2291
|
throw new Error(`Invalid child insert at ${t}`);
|
|
2280
|
-
const
|
|
2281
|
-
if (typeof
|
|
2292
|
+
const s = e.Index, r = e.Node;
|
|
2293
|
+
if (typeof s != "number" || !Number.isFinite(s))
|
|
2282
2294
|
throw new Error(`Invalid child insert index at ${t}`);
|
|
2283
|
-
if (!R(
|
|
2295
|
+
if (!R(r))
|
|
2284
2296
|
throw new Error(`Invalid child insert node at ${t}`);
|
|
2285
2297
|
return {
|
|
2286
|
-
index:
|
|
2287
|
-
node: oe(
|
|
2298
|
+
index: s,
|
|
2299
|
+
node: oe(r, `${t}.node`)
|
|
2288
2300
|
};
|
|
2289
2301
|
}
|
|
2290
|
-
function
|
|
2302
|
+
function mi(e, t) {
|
|
2291
2303
|
if (!R(e))
|
|
2292
2304
|
throw new Error(`Invalid child move at ${t}`);
|
|
2293
|
-
const
|
|
2294
|
-
if (typeof
|
|
2305
|
+
const s = e.NodeId, r = e.FromIndex, n = e.ToIndex;
|
|
2306
|
+
if (typeof s != "string" || s.length === 0)
|
|
2295
2307
|
throw new Error(`Invalid child move nodeId at ${t}`);
|
|
2296
|
-
if (typeof
|
|
2308
|
+
if (typeof r != "number" || !Number.isFinite(r))
|
|
2297
2309
|
throw new Error(`Invalid child move fromIndex at ${t}`);
|
|
2298
2310
|
if (typeof n != "number" || !Number.isFinite(n))
|
|
2299
2311
|
throw new Error(`Invalid child move toIndex at ${t}`);
|
|
2300
2312
|
return {
|
|
2301
|
-
nodeId:
|
|
2302
|
-
fromIndex:
|
|
2313
|
+
nodeId: s,
|
|
2314
|
+
fromIndex: r,
|
|
2303
2315
|
toIndex: n
|
|
2304
2316
|
};
|
|
2305
2317
|
}
|
|
2306
|
-
function
|
|
2318
|
+
function Oi(e, t) {
|
|
2307
2319
|
if (!R(e))
|
|
2308
2320
|
throw new Error(`Invalid child remove at ${t}`);
|
|
2309
|
-
const
|
|
2310
|
-
if (typeof
|
|
2321
|
+
const s = e.NodeId, r = e.Index;
|
|
2322
|
+
if (typeof s != "string" || s.length === 0)
|
|
2311
2323
|
throw new Error(`Invalid child remove nodeId at ${t}`);
|
|
2312
|
-
if (typeof
|
|
2324
|
+
if (typeof r != "number" || !Number.isFinite(r))
|
|
2313
2325
|
throw new Error(`Invalid child remove index at ${t}`);
|
|
2314
2326
|
return {
|
|
2315
|
-
nodeId:
|
|
2316
|
-
index:
|
|
2327
|
+
nodeId: s,
|
|
2328
|
+
index: r
|
|
2317
2329
|
};
|
|
2318
2330
|
}
|
|
2319
|
-
function
|
|
2331
|
+
function gi(e, t) {
|
|
2320
2332
|
if (!R(e))
|
|
2321
2333
|
throw new Error(`Invalid node change at ${t}`);
|
|
2322
|
-
const
|
|
2323
|
-
if (typeof
|
|
2334
|
+
const s = e.nodeId;
|
|
2335
|
+
if (typeof s != "string" || s.length === 0)
|
|
2324
2336
|
throw new Error(`Invalid node change nodeId at ${t}`);
|
|
2325
|
-
const
|
|
2326
|
-
(l, E) =>
|
|
2337
|
+
const r = Array.isArray(e.inserts) ? e.inserts.map(
|
|
2338
|
+
(l, E) => Li(l ?? {}, `${t}.inserts[${E}]`)
|
|
2327
2339
|
) : void 0, n = Array.isArray(e.moves) ? e.moves.map(
|
|
2328
|
-
(l, E) =>
|
|
2340
|
+
(l, E) => mi(l ?? {}, `${t}.moves[${E}]`)
|
|
2329
2341
|
) : void 0, i = Array.isArray(e.removals) ? e.removals.map(
|
|
2330
|
-
(l, E) =>
|
|
2342
|
+
(l, E) => Oi(l ?? {}, `${t}.removals[${E}]`)
|
|
2331
2343
|
) : void 0;
|
|
2332
2344
|
let o;
|
|
2333
2345
|
if (R(e.changedProps)) {
|
|
@@ -2336,15 +2348,15 @@ function Ui(e, t) {
|
|
|
2336
2348
|
if (!R(E))
|
|
2337
2349
|
continue;
|
|
2338
2350
|
const h = E.New;
|
|
2339
|
-
h === void 0 ? o.set(l, void 0) : R(h) ? o.set(l,
|
|
2351
|
+
h === void 0 ? o.set(l, void 0) : R(h) ? o.set(l, qe(h)) : o.set(l, h);
|
|
2340
2352
|
}
|
|
2341
2353
|
}
|
|
2342
2354
|
const a = Array.isArray(e.textUpdates) ? e.textUpdates.map(
|
|
2343
|
-
(l, E) =>
|
|
2344
|
-
) : void 0, I = e.styleIds, _ = I !== void 0 ?
|
|
2355
|
+
(l, E) => Di(l ?? {}, `${t}.textUpdates[${E}]`)
|
|
2356
|
+
) : void 0, I = e.styleIds, _ = I !== void 0 ? Qe(I, t, s, !0) : void 0;
|
|
2345
2357
|
return {
|
|
2346
|
-
nodeId:
|
|
2347
|
-
...
|
|
2358
|
+
nodeId: s,
|
|
2359
|
+
...r && r.length > 0 ? { inserts: r } : {},
|
|
2348
2360
|
...n && n.length > 0 ? { moves: n } : {},
|
|
2349
2361
|
...i && i.length > 0 ? { removals: i } : {},
|
|
2350
2362
|
...o && o.size > 0 ? { changedProps: o } : {},
|
|
@@ -2352,60 +2364,60 @@ function Ui(e, t) {
|
|
|
2352
2364
|
..._ !== void 0 ? { styleIds: _ } : {}
|
|
2353
2365
|
};
|
|
2354
2366
|
}
|
|
2355
|
-
function
|
|
2367
|
+
function bi(e) {
|
|
2356
2368
|
const t = /* @__PURE__ */ new Map();
|
|
2357
|
-
for (const [
|
|
2358
|
-
t.set(
|
|
2369
|
+
for (const [s, r] of Object.entries(e))
|
|
2370
|
+
t.set(s, r);
|
|
2359
2371
|
return t;
|
|
2360
2372
|
}
|
|
2361
|
-
function
|
|
2373
|
+
function Fi(e, t, s) {
|
|
2362
2374
|
if (!e || typeof e != "object")
|
|
2363
2375
|
throw new D("UI update graph is missing");
|
|
2364
|
-
const
|
|
2365
|
-
if (
|
|
2376
|
+
const r = oe(e, "graph");
|
|
2377
|
+
if (r.type !== "root")
|
|
2366
2378
|
throw new D('UI update root element must have type "root"');
|
|
2367
|
-
const n =
|
|
2379
|
+
const n = pi(r.props, t);
|
|
2368
2380
|
return {
|
|
2369
2381
|
type: "full",
|
|
2370
|
-
version:
|
|
2371
|
-
root:
|
|
2382
|
+
version: s,
|
|
2383
|
+
root: r,
|
|
2372
2384
|
metadata: n
|
|
2373
2385
|
};
|
|
2374
2386
|
}
|
|
2375
|
-
function
|
|
2387
|
+
function Pi(e, t, s) {
|
|
2376
2388
|
if (!Array.isArray(e))
|
|
2377
2389
|
throw new D("UI diff changes must be an array");
|
|
2378
2390
|
if (!R(t))
|
|
2379
2391
|
throw new D("UI diff metadata must be an object");
|
|
2380
|
-
const
|
|
2381
|
-
if (typeof
|
|
2392
|
+
const r = t.viewId;
|
|
2393
|
+
if (typeof r != "string" || r.length === 0)
|
|
2382
2394
|
throw new D("UI diff metadata is missing viewId");
|
|
2383
2395
|
const n = e.map(
|
|
2384
|
-
(a, I) =>
|
|
2396
|
+
(a, I) => gi(a ?? {}, `changes[${I}]`)
|
|
2385
2397
|
), i = typeof t.isUpdate == "boolean" ? t.isUpdate : void 0, o = {
|
|
2386
|
-
viewId:
|
|
2398
|
+
viewId: r,
|
|
2387
2399
|
...i !== void 0 ? { isUpdate: i } : {}
|
|
2388
2400
|
};
|
|
2389
2401
|
return {
|
|
2390
2402
|
type: "diff",
|
|
2391
|
-
version:
|
|
2403
|
+
version: s,
|
|
2392
2404
|
changes: n,
|
|
2393
2405
|
metadata: o
|
|
2394
2406
|
};
|
|
2395
2407
|
}
|
|
2396
|
-
function
|
|
2397
|
-
const
|
|
2398
|
-
if (typeof
|
|
2408
|
+
function pi(e, t) {
|
|
2409
|
+
const s = e.viewId;
|
|
2410
|
+
if (typeof s != "string" || s.length === 0)
|
|
2399
2411
|
throw new D("UI update root is missing viewId");
|
|
2400
|
-
let
|
|
2401
|
-
return R(t) && (typeof t.viewId == "string" && t.viewId.length > 0 && (
|
|
2402
|
-
viewId:
|
|
2412
|
+
let r = s, n = typeof e.isUpdate == "boolean" ? e.isUpdate : void 0;
|
|
2413
|
+
return R(t) && (typeof t.viewId == "string" && t.viewId.length > 0 && (r = t.viewId), typeof t.isUpdate == "boolean" && (n = t.isUpdate)), {
|
|
2414
|
+
viewId: r,
|
|
2403
2415
|
...n !== void 0 ? { isUpdate: n } : {}
|
|
2404
2416
|
};
|
|
2405
2417
|
}
|
|
2406
2418
|
class D extends Error {
|
|
2407
|
-
constructor(t,
|
|
2408
|
-
super(t), this.causeError =
|
|
2419
|
+
constructor(t, s) {
|
|
2420
|
+
super(t), this.causeError = s, this.name = "UiUpdateParseError", s instanceof Error && (this.stack = s.stack);
|
|
2409
2421
|
}
|
|
2410
2422
|
}
|
|
2411
2423
|
function Ie(e) {
|
|
@@ -2417,84 +2429,84 @@ function Ie(e) {
|
|
|
2417
2429
|
}
|
|
2418
2430
|
if (!t || typeof t != "object")
|
|
2419
2431
|
throw new D("UI update snapshot must be an object");
|
|
2420
|
-
const { type:
|
|
2421
|
-
if (
|
|
2422
|
-
throw new D(`Unknown UI update type: ${String(
|
|
2423
|
-
if (typeof
|
|
2432
|
+
const { type: s, version: r } = t;
|
|
2433
|
+
if (s !== "full" && s !== "diff")
|
|
2434
|
+
throw new D(`Unknown UI update type: ${String(s)}`);
|
|
2435
|
+
if (typeof r != "number")
|
|
2424
2436
|
throw new D("UI update version must be a number");
|
|
2425
|
-
const n =
|
|
2437
|
+
const n = s === "full" ? Fi(t.graph, t.metadata, r) : Pi(t.changes, t.metadata, r), i = e.Payloads ? bi(e.Payloads) : /* @__PURE__ */ new Map();
|
|
2426
2438
|
return {
|
|
2427
2439
|
snapshot: n,
|
|
2428
2440
|
payloads: i
|
|
2429
2441
|
};
|
|
2430
2442
|
}
|
|
2431
|
-
class
|
|
2443
|
+
class ki {
|
|
2432
2444
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2433
2445
|
cache = /* @__PURE__ */ new Map();
|
|
2434
2446
|
/**
|
|
2435
2447
|
* Get a cached void handler (no payload) for a node/action combination.
|
|
2436
2448
|
* Creates and caches the handler if it doesn't exist.
|
|
2437
2449
|
*/
|
|
2438
|
-
getHandler(t,
|
|
2439
|
-
const n = `${t}:${
|
|
2450
|
+
getHandler(t, s, r) {
|
|
2451
|
+
const n = `${t}:${s}`;
|
|
2440
2452
|
let i = this.cache.get(n);
|
|
2441
|
-
return i || (i = () => s
|
|
2453
|
+
return i || (i = () => r(s), this.cache.set(n, i)), i;
|
|
2442
2454
|
}
|
|
2443
2455
|
/**
|
|
2444
2456
|
* Get a cached handler that accepts a payload.
|
|
2445
2457
|
* Creates and caches the handler if it doesn't exist.
|
|
2446
2458
|
*/
|
|
2447
|
-
getHandlerWithPayload(t,
|
|
2448
|
-
const n = `${t}:${
|
|
2459
|
+
getHandlerWithPayload(t, s, r) {
|
|
2460
|
+
const n = `${t}:${s}:payload`;
|
|
2449
2461
|
let i = this.cache.get(n);
|
|
2450
|
-
return i || (i = (o) => s
|
|
2462
|
+
return i || (i = (o) => r(s, o), this.cache.set(n, i)), i;
|
|
2451
2463
|
}
|
|
2452
2464
|
/**
|
|
2453
2465
|
* Get a cached handler for boolean payloads.
|
|
2454
2466
|
*/
|
|
2455
|
-
getBooleanHandler(t,
|
|
2456
|
-
return this.getHandlerWithPayload(t,
|
|
2467
|
+
getBooleanHandler(t, s, r) {
|
|
2468
|
+
return this.getHandlerWithPayload(t, s, r);
|
|
2457
2469
|
}
|
|
2458
2470
|
/**
|
|
2459
2471
|
* Get a cached handler for string payloads.
|
|
2460
2472
|
*/
|
|
2461
|
-
getStringHandler(t,
|
|
2462
|
-
return this.getHandlerWithPayload(t,
|
|
2473
|
+
getStringHandler(t, s, r) {
|
|
2474
|
+
return this.getHandlerWithPayload(t, s, r);
|
|
2463
2475
|
}
|
|
2464
2476
|
/**
|
|
2465
2477
|
* Get a cached handler for number payloads.
|
|
2466
2478
|
*/
|
|
2467
|
-
getNumberHandler(t,
|
|
2468
|
-
return this.getHandlerWithPayload(t,
|
|
2479
|
+
getNumberHandler(t, s, r) {
|
|
2480
|
+
return this.getHandlerWithPayload(t, s, r);
|
|
2469
2481
|
}
|
|
2470
2482
|
/**
|
|
2471
2483
|
* Get a cached handler for number array payloads.
|
|
2472
2484
|
*/
|
|
2473
|
-
getNumberArrayHandler(t,
|
|
2474
|
-
return this.getHandlerWithPayload(t,
|
|
2485
|
+
getNumberArrayHandler(t, s, r) {
|
|
2486
|
+
return this.getHandlerWithPayload(t, s, r);
|
|
2475
2487
|
}
|
|
2476
2488
|
/**
|
|
2477
2489
|
* Get a cached handler for nullable boolean payloads.
|
|
2478
2490
|
*/
|
|
2479
|
-
getNullableBooleanHandler(t,
|
|
2480
|
-
const n = `${t}:${
|
|
2491
|
+
getNullableBooleanHandler(t, s, r) {
|
|
2492
|
+
const n = `${t}:${s}:nullable-bool`;
|
|
2481
2493
|
let i = this.cache.get(n);
|
|
2482
|
-
return i || (i = (o) => s
|
|
2494
|
+
return i || (i = (o) => r(s, o ?? null), this.cache.set(n, i)), i;
|
|
2483
2495
|
}
|
|
2484
2496
|
/**
|
|
2485
2497
|
* Invalidate all cached handlers for a specific node.
|
|
2486
2498
|
* Call this when a node is removed from the tree.
|
|
2487
2499
|
*/
|
|
2488
2500
|
invalidateNode(t) {
|
|
2489
|
-
const
|
|
2490
|
-
for (const
|
|
2491
|
-
|
|
2501
|
+
const s = `${t}:`;
|
|
2502
|
+
for (const r of this.cache.keys())
|
|
2503
|
+
r.startsWith(s) && this.cache.delete(r);
|
|
2492
2504
|
}
|
|
2493
2505
|
/**
|
|
2494
2506
|
* Invalidate a specific handler.
|
|
2495
2507
|
*/
|
|
2496
|
-
invalidateHandler(t,
|
|
2497
|
-
this.cache.delete(`${t}:${
|
|
2508
|
+
invalidateHandler(t, s) {
|
|
2509
|
+
this.cache.delete(`${t}:${s}`), this.cache.delete(`${t}:${s}:payload`), this.cache.delete(`${t}:${s}:nullable-bool`);
|
|
2498
2510
|
}
|
|
2499
2511
|
/**
|
|
2500
2512
|
* Clear all cached handlers.
|
|
@@ -2509,8 +2521,8 @@ class Oi {
|
|
|
2509
2521
|
return this.cache.size;
|
|
2510
2522
|
}
|
|
2511
2523
|
}
|
|
2512
|
-
const
|
|
2513
|
-
class
|
|
2524
|
+
const Mi = Z("UiStreamStore");
|
|
2525
|
+
class vi {
|
|
2514
2526
|
views = /* @__PURE__ */ new Map();
|
|
2515
2527
|
listeners = /* @__PURE__ */ new Set();
|
|
2516
2528
|
payloads = /* @__PURE__ */ new Map();
|
|
@@ -2526,11 +2538,23 @@ class bi {
|
|
|
2526
2538
|
changedNodeIds = /* @__PURE__ */ new Set();
|
|
2527
2539
|
nodeVersions = /* @__PURE__ */ new Map();
|
|
2528
2540
|
structureChanged = !1;
|
|
2541
|
+
// Set when a diff is dropped because it can no longer be reconciled against the local tree:
|
|
2542
|
+
// its version regressed, it jumped ahead of the local version (a missing intermediate diff),
|
|
2543
|
+
// or there is no base tree to apply it to. Consumed by the transport layer, which then asks the
|
|
2544
|
+
// server to resync this stream with a full snapshot.
|
|
2545
|
+
resyncNeeded = !1;
|
|
2529
2546
|
// Dirty flags for lazy snapshot rebuilding - start true to ensure first snapshot builds correctly
|
|
2530
2547
|
viewsDirty = !0;
|
|
2531
2548
|
payloadsDirty = !0;
|
|
2532
2549
|
// Handler cache for stable event handlers
|
|
2533
|
-
handlerCache = new
|
|
2550
|
+
handlerCache = new ki();
|
|
2551
|
+
// id -> node lookup index for O(1) getNode. Rebuilt lazily from the committed snapshot's view
|
|
2552
|
+
// trees. Node trees are immutable (a change replaces every node on the changed path with a new
|
|
2553
|
+
// object and yields a new views Map), so the index is valid exactly while it points at the same
|
|
2554
|
+
// views Map instance: comparing that reference is a correct, allocation-free dirty check that
|
|
2555
|
+
// covers every mutation path (apply, replaceSnapshot, patchFromOp, clear) without touching them.
|
|
2556
|
+
nodeIndex = /* @__PURE__ */ new Map();
|
|
2557
|
+
indexedViews;
|
|
2534
2558
|
apply(t) {
|
|
2535
2559
|
if (this.snapshotMode) {
|
|
2536
2560
|
if (t.snapshot.type !== "full")
|
|
@@ -2541,28 +2565,32 @@ class bi {
|
|
|
2541
2565
|
version: -1
|
|
2542
2566
|
};
|
|
2543
2567
|
}
|
|
2544
|
-
const { snapshot:
|
|
2568
|
+
const { snapshot: s, payloads: r } = t, { metadata: n } = s, { viewId: i } = n;
|
|
2545
2569
|
let o = this.views.get(i);
|
|
2546
2570
|
o || (o = {
|
|
2547
2571
|
version: 0
|
|
2548
2572
|
}, this.views.set(i, o));
|
|
2549
|
-
const a =
|
|
2550
|
-
if (
|
|
2573
|
+
const a = s.type === "diff" && n.isUpdate === !0;
|
|
2574
|
+
if (s.version < o.version)
|
|
2575
|
+
return this.resyncNeeded = !0, !1;
|
|
2576
|
+
if (s.type === "diff" && s.version > o.version + 1)
|
|
2577
|
+
return this.resyncNeeded = !0, !1;
|
|
2578
|
+
if (s.version === o.version && !a)
|
|
2551
2579
|
return !1;
|
|
2552
2580
|
let I = !1;
|
|
2553
2581
|
this.rootViewId || (this.rootViewId = i, I = !0, this.structureChanged = !0);
|
|
2554
2582
|
const _ = o.root;
|
|
2555
|
-
if (
|
|
2556
|
-
o.root =
|
|
2583
|
+
if (s.type === "full")
|
|
2584
|
+
o.root = s.root, o.version = s.version, I = !0, this.viewsDirty = !0, this.structureChanged = !0, s.root && V(s.root, this.changedNodeIds);
|
|
2557
2585
|
else {
|
|
2558
2586
|
if (!_)
|
|
2559
|
-
return !1;
|
|
2560
|
-
const l =
|
|
2561
|
-
l !== _ ? (o.root = l, I = !0, this.viewsDirty = !0, j(_, l, this.changedNodeIds)) : o.root = l, o.version =
|
|
2587
|
+
return this.resyncNeeded = !0, !1;
|
|
2588
|
+
const l = Vi(_, s.changes);
|
|
2589
|
+
l !== _ ? (o.root = l, I = !0, this.viewsDirty = !0, j(_, l, this.changedNodeIds)) : o.root = l, o.version = s.version;
|
|
2562
2590
|
}
|
|
2563
|
-
for (const [l, E] of
|
|
2591
|
+
for (const [l, E] of r)
|
|
2564
2592
|
this.payloads.get(l) !== E && (this.payloads.set(l, E), I = !0, this.payloadsDirty = !0);
|
|
2565
|
-
return I ? (this.commitSnapshot(), this.notify(), !0) : (o.version =
|
|
2593
|
+
return I ? (this.commitSnapshot(), this.notify(), !0) : (o.version = s.version, !1);
|
|
2566
2594
|
}
|
|
2567
2595
|
// Ignore further diffs (keeping the current tree visible) until the next full snapshot arrives,
|
|
2568
2596
|
// which then replaces the tree wholesale. Used on soft reconnect: the cached tree may be missing
|
|
@@ -2571,42 +2599,47 @@ class bi {
|
|
|
2571
2599
|
enterSnapshotMode() {
|
|
2572
2600
|
this.snapshotMode = !0;
|
|
2573
2601
|
}
|
|
2602
|
+
// Returns whether a diff was dropped as unrecoverable since the last call, clearing the flag.
|
|
2603
|
+
consumeResyncNeeded() {
|
|
2604
|
+
const t = this.resyncNeeded;
|
|
2605
|
+
return this.resyncNeeded = !1, t;
|
|
2606
|
+
}
|
|
2574
2607
|
replaceFromWire(t) {
|
|
2575
|
-
const
|
|
2608
|
+
const s = {
|
|
2576
2609
|
rootViewId: t.rootViewId,
|
|
2577
2610
|
views: new Map(t.views),
|
|
2578
2611
|
payloads: new Map(t.payloads),
|
|
2579
2612
|
version: t.version
|
|
2580
2613
|
};
|
|
2581
|
-
return this.replaceSnapshot(
|
|
2614
|
+
return this.replaceSnapshot(s);
|
|
2582
2615
|
}
|
|
2583
2616
|
patchFromOp(t) {
|
|
2584
2617
|
this.snapshotMode = !0;
|
|
2585
|
-
const
|
|
2586
|
-
if (
|
|
2618
|
+
const s = t.expectedBaseVersion;
|
|
2619
|
+
if (s !== void 0 && this.snapshot.version !== s)
|
|
2587
2620
|
return !1;
|
|
2588
|
-
let
|
|
2621
|
+
let r = !1, n = null, i = null;
|
|
2589
2622
|
const o = () => (n || (n = new Map(this.snapshot.views)), n), a = () => (i || (i = new Map(this.snapshot.payloads)), i);
|
|
2590
2623
|
if (t.deleteViews && t.deleteViews.length > 0)
|
|
2591
2624
|
for (const l of t.deleteViews)
|
|
2592
|
-
o().delete(l) && (
|
|
2625
|
+
o().delete(l) && (r = !0, this.structureChanged = !0);
|
|
2593
2626
|
if (t.upsertViews && t.upsertViews.length > 0)
|
|
2594
2627
|
for (const [l, E] of t.upsertViews) {
|
|
2595
2628
|
const h = o(), T = h.get(l);
|
|
2596
|
-
T !== E && (h.set(l, E),
|
|
2629
|
+
T !== E && (h.set(l, E), r = !0, T ? j(T, E, this.changedNodeIds) : (V(E, this.changedNodeIds), this.structureChanged = !0));
|
|
2597
2630
|
}
|
|
2598
2631
|
if (t.deletePayloads && t.deletePayloads.length > 0)
|
|
2599
2632
|
for (const l of t.deletePayloads)
|
|
2600
|
-
a().delete(l) && (
|
|
2633
|
+
a().delete(l) && (r = !0);
|
|
2601
2634
|
if (t.upsertPayloads && t.upsertPayloads.length > 0)
|
|
2602
2635
|
for (const [l, E] of t.upsertPayloads) {
|
|
2603
2636
|
const h = a();
|
|
2604
|
-
h.get(l) !== E && (h.set(l, E),
|
|
2637
|
+
h.get(l) !== E && (h.set(l, E), r = !0);
|
|
2605
2638
|
}
|
|
2606
2639
|
const I = t.rootViewId ?? this.snapshot.rootViewId;
|
|
2607
|
-
I !== this.snapshot.rootViewId && (
|
|
2640
|
+
I !== this.snapshot.rootViewId && (r = !0, this.structureChanged = !0);
|
|
2608
2641
|
const _ = t.nextVersion;
|
|
2609
|
-
if (_ !== this.snapshot.version && (
|
|
2642
|
+
if (_ !== this.snapshot.version && (r = !0), !r)
|
|
2610
2643
|
return this.snapshot = { ...this.snapshot, version: _ }, !1;
|
|
2611
2644
|
for (const l of this.changedNodeIds)
|
|
2612
2645
|
this.nodeVersions.set(l, (this.nodeVersions.get(l) ?? 0) + 1);
|
|
@@ -2619,15 +2652,15 @@ class bi {
|
|
|
2619
2652
|
}
|
|
2620
2653
|
replaceSnapshot(t) {
|
|
2621
2654
|
this.snapshotMode = !0;
|
|
2622
|
-
const
|
|
2623
|
-
(
|
|
2655
|
+
const s = this.snapshot, r = s.version !== t.version || s.rootViewId !== t.rootViewId || s.views.size !== t.views.size || s.payloads.size !== t.payloads.size;
|
|
2656
|
+
(s.rootViewId !== t.rootViewId || s.views.size !== t.views.size) && (this.structureChanged = !0);
|
|
2624
2657
|
for (const [n, i] of t.views) {
|
|
2625
|
-
const o =
|
|
2626
|
-
o ? j(o, i, this.changedNodeIds) : (
|
|
2658
|
+
const o = s.views.get(n);
|
|
2659
|
+
o ? j(o, i, this.changedNodeIds) : (V(i, this.changedNodeIds), this.structureChanged = !0);
|
|
2627
2660
|
}
|
|
2628
2661
|
for (const n of this.changedNodeIds)
|
|
2629
2662
|
this.nodeVersions.set(n, (this.nodeVersions.get(n) ?? 0) + 1);
|
|
2630
|
-
return this.snapshot = t,
|
|
2663
|
+
return this.snapshot = t, r && this.notify(), r;
|
|
2631
2664
|
}
|
|
2632
2665
|
clear() {
|
|
2633
2666
|
(this.snapshot.rootViewId === void 0 || this.snapshot.rootViewId.length === 0) && this.snapshot.views.size === 0 && this.snapshot.payloads.size === 0 || (this.snapshotMode = !0, this.views.clear(), this.payloads.clear(), this.rootViewId = void 0, this.viewsDirty = !0, this.payloadsDirty = !0, this.snapshot = {
|
|
@@ -2644,21 +2677,23 @@ class bi {
|
|
|
2644
2677
|
this.listeners.delete(t);
|
|
2645
2678
|
};
|
|
2646
2679
|
}
|
|
2647
|
-
subscribeNode(t,
|
|
2648
|
-
let
|
|
2649
|
-
return
|
|
2650
|
-
|
|
2680
|
+
subscribeNode(t, s) {
|
|
2681
|
+
let r = this.nodeListeners.get(t);
|
|
2682
|
+
return r || (r = /* @__PURE__ */ new Set(), this.nodeListeners.set(t, r)), r.add(s), () => {
|
|
2683
|
+
r && (r.delete(s), r.size === 0 && this.nodeListeners.delete(t));
|
|
2651
2684
|
};
|
|
2652
2685
|
}
|
|
2653
2686
|
getNode(t) {
|
|
2654
|
-
const
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2687
|
+
const s = this.snapshot.views;
|
|
2688
|
+
return this.indexedViews !== s && this.rebuildNodeIndex(s), this.nodeIndex.get(t);
|
|
2689
|
+
}
|
|
2690
|
+
rebuildNodeIndex(t) {
|
|
2691
|
+
this.nodeIndex.clear();
|
|
2692
|
+
for (const s of t.values())
|
|
2693
|
+
et(s, this.nodeIndex);
|
|
2694
|
+
for (const [s, r] of t)
|
|
2695
|
+
this.nodeIndex.set(s, r);
|
|
2696
|
+
this.indexedViews = t;
|
|
2662
2697
|
}
|
|
2663
2698
|
getNodeVersion(t) {
|
|
2664
2699
|
return this.nodeVersions.get(t) ?? 0;
|
|
@@ -2669,15 +2704,15 @@ class bi {
|
|
|
2669
2704
|
return;
|
|
2670
2705
|
}
|
|
2671
2706
|
for (const t of this.changedNodeIds) {
|
|
2672
|
-
const
|
|
2673
|
-
if (
|
|
2674
|
-
for (const
|
|
2675
|
-
|
|
2707
|
+
const s = this.nodeListeners.get(t);
|
|
2708
|
+
if (s)
|
|
2709
|
+
for (const r of s)
|
|
2710
|
+
r();
|
|
2676
2711
|
}
|
|
2677
2712
|
this.changedNodeIds.clear();
|
|
2678
2713
|
}
|
|
2679
2714
|
commitSnapshot() {
|
|
2680
|
-
let t,
|
|
2715
|
+
let t, s;
|
|
2681
2716
|
if (this.viewsDirty) {
|
|
2682
2717
|
const n = /* @__PURE__ */ new Map();
|
|
2683
2718
|
for (const [i, o] of this.views)
|
|
@@ -2685,16 +2720,16 @@ class bi {
|
|
|
2685
2720
|
t = n, this.viewsDirty = !1;
|
|
2686
2721
|
} else
|
|
2687
2722
|
t = this.snapshot.views;
|
|
2688
|
-
this.payloadsDirty ? (
|
|
2689
|
-
let
|
|
2690
|
-
if (
|
|
2723
|
+
this.payloadsDirty ? (s = new Map(this.payloads), this.payloadsDirty = !1) : s = this.snapshot.payloads;
|
|
2724
|
+
let r = this.rootViewId && this.views.has(this.rootViewId) ? this.views.get(this.rootViewId)?.version : void 0;
|
|
2725
|
+
if (r === void 0)
|
|
2691
2726
|
for (const n of this.views.values())
|
|
2692
|
-
|
|
2727
|
+
r = r === void 0 ? n.version : Math.max(r, n.version);
|
|
2693
2728
|
this.snapshot = {
|
|
2694
2729
|
rootViewId: this.rootViewId,
|
|
2695
2730
|
views: t,
|
|
2696
|
-
payloads:
|
|
2697
|
-
version:
|
|
2731
|
+
payloads: s,
|
|
2732
|
+
version: r
|
|
2698
2733
|
};
|
|
2699
2734
|
for (const n of this.changedNodeIds)
|
|
2700
2735
|
this.nodeVersions.set(n, (this.nodeVersions.get(n) ?? 0) + 1);
|
|
@@ -2707,35 +2742,40 @@ class bi {
|
|
|
2707
2742
|
}
|
|
2708
2743
|
}
|
|
2709
2744
|
}
|
|
2710
|
-
class
|
|
2745
|
+
class Bi {
|
|
2711
2746
|
streams = /* @__PURE__ */ new Map();
|
|
2712
2747
|
listeners = /* @__PURE__ */ new Set();
|
|
2713
|
-
apply(t,
|
|
2714
|
-
const n = this.getOrCreateStreamEntry(t).store.apply(
|
|
2748
|
+
apply(t, s) {
|
|
2749
|
+
const n = this.getOrCreateStreamEntry(t).store.apply(s);
|
|
2715
2750
|
return n && this.notify(t), n;
|
|
2716
2751
|
}
|
|
2752
|
+
// Whether the given stream dropped an unrecoverable diff since the last check (clears the flag).
|
|
2753
|
+
needsResync(t) {
|
|
2754
|
+
const s = this.streams.get(t);
|
|
2755
|
+
return s ? s.store.consumeResyncNeeded() : !1;
|
|
2756
|
+
}
|
|
2717
2757
|
applyStoreOp(t) {
|
|
2718
2758
|
if (t.type === "ReplaceStreamSnapshot") {
|
|
2719
|
-
const
|
|
2720
|
-
return
|
|
2759
|
+
const s = this.getOrCreateStreamEntry(t.snapshot.streamId), r = s.category !== t.snapshot.category;
|
|
2760
|
+
return s.category = t.snapshot.category, s.store.replaceFromWire(t.snapshot) || r ? (this.notify(t.snapshot.streamId), !0) : !1;
|
|
2721
2761
|
}
|
|
2722
2762
|
if (t.type === "PatchStreamSnapshot") {
|
|
2723
|
-
const
|
|
2724
|
-
return t.category !== void 0 && (
|
|
2763
|
+
const s = this.getOrCreateStreamEntry(t.streamId), r = t.category !== void 0 && s.category !== t.category;
|
|
2764
|
+
return t.category !== void 0 && (s.category = t.category), s.store.patchFromOp(t) || r ? (this.notify(t.streamId), !0) : !1;
|
|
2725
2765
|
}
|
|
2726
2766
|
if (t.type === "ClearStream") {
|
|
2727
|
-
const
|
|
2728
|
-
return
|
|
2767
|
+
const s = this.streams.get(t.streamId);
|
|
2768
|
+
return s ? (s.store.clear(), this.notify(t.streamId), !0) : !1;
|
|
2729
2769
|
}
|
|
2730
2770
|
return t.type === "RemoveStream" ? this.streams.delete(t.streamId) ? (this.notify(t.streamId), !0) : !1 : t.type === "SetStreamCategory" ? (this.setCategory(t.streamId, t.category), !0) : !1;
|
|
2731
2771
|
}
|
|
2732
2772
|
applyStoreOps(t) {
|
|
2733
|
-
for (const
|
|
2734
|
-
this.applyStoreOp(
|
|
2773
|
+
for (const s of t)
|
|
2774
|
+
this.applyStoreOp(s);
|
|
2735
2775
|
}
|
|
2736
2776
|
clear(t) {
|
|
2737
|
-
const
|
|
2738
|
-
|
|
2777
|
+
const s = this.streams.get(t);
|
|
2778
|
+
s && (s.store.clear(), this.notify(t));
|
|
2739
2779
|
}
|
|
2740
2780
|
remove(t) {
|
|
2741
2781
|
this.streams.delete(t) && this.notify(t);
|
|
@@ -2746,26 +2786,26 @@ class Fi {
|
|
|
2746
2786
|
for (const t of this.streams.values())
|
|
2747
2787
|
t.store.enterSnapshotMode();
|
|
2748
2788
|
}
|
|
2749
|
-
setCategory(t,
|
|
2750
|
-
const
|
|
2751
|
-
|
|
2789
|
+
setCategory(t, s) {
|
|
2790
|
+
const r = this.getOrCreateStreamEntry(t);
|
|
2791
|
+
r.category !== s && (r.category = s, this.notify(t));
|
|
2752
2792
|
}
|
|
2753
2793
|
getSnapshot(t) {
|
|
2754
|
-
const
|
|
2755
|
-
return
|
|
2756
|
-
...
|
|
2794
|
+
const s = this.streams.get(t);
|
|
2795
|
+
return s ? {
|
|
2796
|
+
...s.store.getSnapshot(),
|
|
2757
2797
|
streamId: t,
|
|
2758
|
-
category:
|
|
2798
|
+
category: s.category
|
|
2759
2799
|
} : void 0;
|
|
2760
2800
|
}
|
|
2761
2801
|
getSnapshots() {
|
|
2762
2802
|
const t = [];
|
|
2763
|
-
for (const [
|
|
2764
|
-
const n =
|
|
2803
|
+
for (const [s, r] of this.streams) {
|
|
2804
|
+
const n = r.store.getSnapshot();
|
|
2765
2805
|
t.push({
|
|
2766
2806
|
...n,
|
|
2767
|
-
streamId:
|
|
2768
|
-
category:
|
|
2807
|
+
streamId: s,
|
|
2808
|
+
category: r.category
|
|
2769
2809
|
});
|
|
2770
2810
|
}
|
|
2771
2811
|
return t;
|
|
@@ -2776,77 +2816,77 @@ class Fi {
|
|
|
2776
2816
|
};
|
|
2777
2817
|
}
|
|
2778
2818
|
getOrCreateStreamEntry(t) {
|
|
2779
|
-
let
|
|
2780
|
-
return
|
|
2819
|
+
let s = this.streams.get(t);
|
|
2820
|
+
return s || (s = { store: new vi() }, this.streams.set(t, s)), s;
|
|
2781
2821
|
}
|
|
2782
2822
|
notify(t) {
|
|
2783
|
-
for (const
|
|
2784
|
-
|
|
2823
|
+
for (const s of this.listeners)
|
|
2824
|
+
s(t);
|
|
2785
2825
|
}
|
|
2786
2826
|
}
|
|
2787
|
-
function
|
|
2827
|
+
function Vi(e, t, s) {
|
|
2788
2828
|
if (t.length === 0)
|
|
2789
2829
|
return e;
|
|
2790
|
-
const
|
|
2830
|
+
const r = /* @__PURE__ */ new Map();
|
|
2791
2831
|
for (const n of t)
|
|
2792
|
-
|
|
2793
|
-
return
|
|
2832
|
+
r.set(n.nodeId, n);
|
|
2833
|
+
return Ze(e, r);
|
|
2794
2834
|
}
|
|
2795
|
-
function
|
|
2796
|
-
const
|
|
2835
|
+
function Ze(e, t, s) {
|
|
2836
|
+
const r = t.get(e.id);
|
|
2797
2837
|
let n = e, i = !1;
|
|
2798
|
-
if (
|
|
2799
|
-
const u =
|
|
2838
|
+
if (r?.textUpdates && r.textUpdates.length > 0) {
|
|
2839
|
+
const u = Yi(e, r.textUpdates);
|
|
2800
2840
|
n = u.node, i = u.changed;
|
|
2801
2841
|
}
|
|
2802
2842
|
let o = !1, a = n.props;
|
|
2803
|
-
if (
|
|
2804
|
-
for (const [u, d] of
|
|
2843
|
+
if (r?.changedProps && r.changedProps.size > 0)
|
|
2844
|
+
for (const [u, d] of r.changedProps.entries()) {
|
|
2805
2845
|
const c = a[u];
|
|
2806
2846
|
if (d === void 0)
|
|
2807
|
-
(c !== void 0 || u in a) && (o || (a =
|
|
2847
|
+
(c !== void 0 || u in a) && (o || (a = B(a), o = !0), delete a[u]);
|
|
2808
2848
|
else if (Q(d)) {
|
|
2809
|
-
const S =
|
|
2810
|
-
p(S, c) || (o || (a =
|
|
2849
|
+
const S = B(d);
|
|
2850
|
+
p(S, c) || (o || (a = B(a), o = !0), a[u] = S);
|
|
2811
2851
|
} else
|
|
2812
|
-
p(d, c) || (o || (a =
|
|
2852
|
+
p(d, c) || (o || (a = B(a), o = !0), a[u] = d);
|
|
2813
2853
|
}
|
|
2814
2854
|
let I = !1, _ = n.styleIds;
|
|
2815
|
-
|
|
2855
|
+
r?.styleIds !== void 0 && (st(n.styleIds, r.styleIds) || (_ = r.styleIds, I = !0));
|
|
2816
2856
|
const l = n.children ?? [];
|
|
2817
2857
|
let E = l, h = !1;
|
|
2818
|
-
if (
|
|
2858
|
+
if (r?.removals && r.removals.length > 0 || r?.moves && r.moves.length > 0 || r?.inserts && r.inserts.length > 0) {
|
|
2819
2859
|
const u = E.slice();
|
|
2820
|
-
if (
|
|
2821
|
-
const d = [...
|
|
2860
|
+
if (r?.removals && r.removals.length > 0) {
|
|
2861
|
+
const d = [...r.removals].sort((c, S) => S.index - c.index);
|
|
2822
2862
|
for (const c of d)
|
|
2823
2863
|
if (c.index >= 0 && c.index < u.length && u[c.index].id === c.nodeId)
|
|
2824
2864
|
u.splice(c.index, 1);
|
|
2825
2865
|
else {
|
|
2826
|
-
const S = u.findIndex((
|
|
2866
|
+
const S = u.findIndex((C) => C.id === c.nodeId);
|
|
2827
2867
|
S >= 0 && u.splice(S, 1);
|
|
2828
2868
|
}
|
|
2829
2869
|
h = !0;
|
|
2830
2870
|
}
|
|
2831
|
-
if (
|
|
2832
|
-
const d = [...
|
|
2871
|
+
if (r?.moves && r.moves.length > 0) {
|
|
2872
|
+
const d = [...r.moves].sort((S, C) => S.toIndex - C.toIndex), c = /* @__PURE__ */ new Map();
|
|
2833
2873
|
for (const S of d) {
|
|
2834
|
-
const
|
|
2835
|
-
|
|
2874
|
+
const C = u.findIndex((X) => X.id === S.nodeId);
|
|
2875
|
+
C >= 0 && (c.set(S.nodeId, u[C]), u.splice(C, 1));
|
|
2836
2876
|
}
|
|
2837
2877
|
for (const S of d) {
|
|
2838
|
-
const
|
|
2839
|
-
if (
|
|
2878
|
+
const C = c.get(S.nodeId);
|
|
2879
|
+
if (C) {
|
|
2840
2880
|
const X = Math.min(S.toIndex, u.length);
|
|
2841
|
-
u.splice(X, 0,
|
|
2881
|
+
u.splice(X, 0, C);
|
|
2842
2882
|
}
|
|
2843
2883
|
}
|
|
2844
2884
|
h = !0;
|
|
2845
2885
|
}
|
|
2846
|
-
if (
|
|
2847
|
-
const d = [...
|
|
2886
|
+
if (r?.inserts && r.inserts.length > 0) {
|
|
2887
|
+
const d = [...r.inserts].sort((c, S) => c.index - S.index);
|
|
2848
2888
|
for (const c of d) {
|
|
2849
|
-
u.some((
|
|
2889
|
+
u.some((C) => C.id === c.node.id) && Mi.warn(`Duplicate node id '${c.node.id}' (type '${c.node.type}') inserted next to an existing sibling — UI tree diverged from the server`);
|
|
2850
2890
|
const S = Math.min(c.index, u.length);
|
|
2851
2891
|
u.splice(S, 0, c.node);
|
|
2852
2892
|
}
|
|
@@ -2856,7 +2896,7 @@ function qe(e, t, r) {
|
|
|
2856
2896
|
}
|
|
2857
2897
|
let N;
|
|
2858
2898
|
for (let u = 0; u < E.length; u++) {
|
|
2859
|
-
const d = E[u], c =
|
|
2899
|
+
const d = E[u], c = Ze(d, t);
|
|
2860
2900
|
c !== d && (N || (N = E.slice()), N[u] = c);
|
|
2861
2901
|
}
|
|
2862
2902
|
return N && (E = N, h = !0), i || o || I || h ? !o && !h && !I ? n : {
|
|
@@ -2868,92 +2908,87 @@ function qe(e, t, r) {
|
|
|
2868
2908
|
...e.sourceMarker ? { sourceMarker: e.sourceMarker } : {}
|
|
2869
2909
|
} : e;
|
|
2870
2910
|
}
|
|
2871
|
-
function
|
|
2911
|
+
function V(e, t) {
|
|
2872
2912
|
if (t.add(e.id), e.children)
|
|
2873
|
-
for (const
|
|
2874
|
-
|
|
2913
|
+
for (const s of e.children)
|
|
2914
|
+
V(s, t);
|
|
2915
|
+
}
|
|
2916
|
+
function et(e, t) {
|
|
2917
|
+
if (t.set(e.id, e), e.children)
|
|
2918
|
+
for (const s of e.children)
|
|
2919
|
+
et(s, t);
|
|
2875
2920
|
}
|
|
2876
2921
|
const H = [];
|
|
2877
|
-
function
|
|
2922
|
+
function Gi(e) {
|
|
2878
2923
|
for (; H.length <= e; )
|
|
2879
2924
|
H.push(/* @__PURE__ */ new Map());
|
|
2880
2925
|
return H[e].clear(), H[e];
|
|
2881
2926
|
}
|
|
2882
|
-
function j(e, t,
|
|
2883
|
-
|
|
2927
|
+
function j(e, t, s) {
|
|
2928
|
+
tt(e, t, s, 0);
|
|
2884
2929
|
}
|
|
2885
|
-
function
|
|
2930
|
+
function tt(e, t, s, r) {
|
|
2886
2931
|
if (e === t)
|
|
2887
2932
|
return;
|
|
2888
|
-
(e.type !== t.type || !
|
|
2933
|
+
(e.type !== t.type || !xi(e.props, t.props) || !st(e.styleIds, t.styleIds)) && s.add(t.id);
|
|
2889
2934
|
const i = e.children ?? [], o = t.children ?? [];
|
|
2890
2935
|
if (i !== o) {
|
|
2891
|
-
const a =
|
|
2936
|
+
const a = Gi(r);
|
|
2892
2937
|
for (const _ of i)
|
|
2893
2938
|
a.set(_.id, _);
|
|
2894
2939
|
let I = !1;
|
|
2895
2940
|
for (let _ = 0; _ < o.length; _++) {
|
|
2896
2941
|
const l = o[_], E = a.get(l.id);
|
|
2897
|
-
E ? (
|
|
2942
|
+
E ? (tt(E, l, s, r + 1), !I && _ < i.length && i[_].id !== l.id && (I = !0)) : (V(l, s), I = !0);
|
|
2898
2943
|
}
|
|
2899
|
-
(i.length !== o.length || I) &&
|
|
2944
|
+
(i.length !== o.length || I) && s.add(t.id);
|
|
2900
2945
|
}
|
|
2901
2946
|
}
|
|
2902
|
-
function
|
|
2947
|
+
function xi(e, t) {
|
|
2903
2948
|
return p(e, t);
|
|
2904
2949
|
}
|
|
2905
|
-
function
|
|
2906
|
-
if (e.id === t)
|
|
2907
|
-
return e;
|
|
2908
|
-
if (e.children)
|
|
2909
|
-
for (const r of e.children) {
|
|
2910
|
-
const s = Ze(r, t);
|
|
2911
|
-
if (s)
|
|
2912
|
-
return s;
|
|
2913
|
-
}
|
|
2914
|
-
}
|
|
2915
|
-
function et(e, t) {
|
|
2950
|
+
function st(e, t) {
|
|
2916
2951
|
return p(e, t);
|
|
2917
2952
|
}
|
|
2918
|
-
function
|
|
2953
|
+
function Hi(e, t) {
|
|
2919
2954
|
if (t.length === 0)
|
|
2920
2955
|
return e;
|
|
2921
|
-
const
|
|
2922
|
-
let
|
|
2923
|
-
for (const i of
|
|
2924
|
-
const o = Ee(i.start + n, 0,
|
|
2956
|
+
const s = [...t].sort((i, o) => i.start - o.start);
|
|
2957
|
+
let r = e, n = 0;
|
|
2958
|
+
for (const i of s) {
|
|
2959
|
+
const o = Ee(i.start + n, 0, r.length);
|
|
2925
2960
|
if (i.end == null) {
|
|
2926
|
-
const l =
|
|
2927
|
-
|
|
2961
|
+
const l = r.slice(o), E = Wi(l, i.insertedText);
|
|
2962
|
+
r = r.slice(0, o) + i.insertedText + l.slice(E), n += i.insertedText.length - E;
|
|
2928
2963
|
continue;
|
|
2929
2964
|
}
|
|
2930
|
-
const a = i.end + n, I = Ee(a, o,
|
|
2931
|
-
|
|
2965
|
+
const a = i.end + n, I = Ee(a, o, r.length), _ = I - o;
|
|
2966
|
+
r = r.slice(0, o) + i.insertedText + r.slice(I), n += i.insertedText.length - _;
|
|
2932
2967
|
}
|
|
2933
|
-
return
|
|
2968
|
+
return r;
|
|
2934
2969
|
}
|
|
2935
|
-
function
|
|
2970
|
+
function Yi(e, t, s) {
|
|
2936
2971
|
if (t.length === 0)
|
|
2937
2972
|
return { node: e, changed: !1 };
|
|
2938
|
-
const
|
|
2973
|
+
const r = /* @__PURE__ */ new Map();
|
|
2939
2974
|
for (const n of t) {
|
|
2940
|
-
const i =
|
|
2941
|
-
i ? i.push(n) :
|
|
2975
|
+
const i = r.get(n.nodeId);
|
|
2976
|
+
i ? i.push(n) : r.set(n.nodeId, [n]);
|
|
2942
2977
|
}
|
|
2943
|
-
return
|
|
2978
|
+
return rt(e, r);
|
|
2944
2979
|
}
|
|
2945
|
-
function
|
|
2946
|
-
const
|
|
2980
|
+
function rt(e, t, s) {
|
|
2981
|
+
const r = t.get(e.id) ?? [];
|
|
2947
2982
|
let n = !1, i = e.props;
|
|
2948
|
-
if (
|
|
2983
|
+
if (r.length > 0) {
|
|
2949
2984
|
const _ = /* @__PURE__ */ new Map();
|
|
2950
|
-
for (const l of
|
|
2985
|
+
for (const l of r) {
|
|
2951
2986
|
const E = _.get(l.propertyName);
|
|
2952
2987
|
E ? E.push(l) : _.set(l.propertyName, [l]);
|
|
2953
2988
|
}
|
|
2954
2989
|
for (const [l, E] of _.entries()) {
|
|
2955
|
-
const h = i[l], N =
|
|
2956
|
-
n || (i =
|
|
2990
|
+
const h = i[l], N = Hi(typeof h == "string" ? h : "", E);
|
|
2991
|
+
n || (i = B(i), n = !0), i[l] = N;
|
|
2957
2992
|
}
|
|
2958
2993
|
}
|
|
2959
2994
|
let o = !1;
|
|
@@ -2962,7 +2997,7 @@ function tt(e, t, r) {
|
|
|
2962
2997
|
if (a.length > 0) {
|
|
2963
2998
|
let _;
|
|
2964
2999
|
for (let l = 0; l < a.length; l++) {
|
|
2965
|
-
const E = a[l], h =
|
|
3000
|
+
const E = a[l], h = rt(E, t);
|
|
2966
3001
|
h.changed && (_ || (_ = [...a]), _[l] = h.node);
|
|
2967
3002
|
}
|
|
2968
3003
|
_ && (I = _, o = !0);
|
|
@@ -2979,20 +3014,20 @@ function tt(e, t, r) {
|
|
|
2979
3014
|
changed: !0
|
|
2980
3015
|
};
|
|
2981
3016
|
}
|
|
2982
|
-
function Ee(e, t,
|
|
2983
|
-
return Math.max(t, Math.min(
|
|
3017
|
+
function Ee(e, t, s) {
|
|
3018
|
+
return Math.max(t, Math.min(s, e));
|
|
2984
3019
|
}
|
|
2985
|
-
function
|
|
2986
|
-
const
|
|
2987
|
-
let
|
|
2988
|
-
for (;
|
|
2989
|
-
|
|
2990
|
-
return
|
|
3020
|
+
function Wi(e, t) {
|
|
3021
|
+
const s = Math.min(e.length, t.length);
|
|
3022
|
+
let r = 0;
|
|
3023
|
+
for (; r < s && e.charCodeAt(r) === t.charCodeAt(r); )
|
|
3024
|
+
r++;
|
|
3025
|
+
return r;
|
|
2991
3026
|
}
|
|
2992
|
-
function
|
|
2993
|
-
const t = {},
|
|
2994
|
-
for (let
|
|
2995
|
-
const n = r
|
|
3027
|
+
function B(e) {
|
|
3028
|
+
const t = {}, s = Object.keys(e);
|
|
3029
|
+
for (let r = 0; r < s.length; r++) {
|
|
3030
|
+
const n = s[r];
|
|
2996
3031
|
t[n] = e[n];
|
|
2997
3032
|
}
|
|
2998
3033
|
return t;
|
|
@@ -3006,23 +3041,23 @@ function p(e, t) {
|
|
|
3006
3041
|
if (Array.isArray(e) && Array.isArray(t)) {
|
|
3007
3042
|
if (e.length !== t.length)
|
|
3008
3043
|
return !1;
|
|
3009
|
-
for (let
|
|
3010
|
-
if (!p(e[
|
|
3044
|
+
for (let s = 0; s < e.length; s++)
|
|
3045
|
+
if (!p(e[s], t[s]))
|
|
3011
3046
|
return !1;
|
|
3012
3047
|
return !0;
|
|
3013
3048
|
}
|
|
3014
3049
|
if (Q(e) && Q(t)) {
|
|
3015
|
-
const
|
|
3016
|
-
if (
|
|
3050
|
+
const s = Object.keys(e), r = Object.keys(t);
|
|
3051
|
+
if (s.length !== r.length)
|
|
3017
3052
|
return !1;
|
|
3018
|
-
for (const n of
|
|
3053
|
+
for (const n of s)
|
|
3019
3054
|
if (!p(e[n], t[n]))
|
|
3020
3055
|
return !1;
|
|
3021
3056
|
return !0;
|
|
3022
3057
|
}
|
|
3023
3058
|
return !1;
|
|
3024
3059
|
}
|
|
3025
|
-
const z = Z("LiveSnapshot"), _e = 1, J = "ikon-live-snapshot",
|
|
3060
|
+
const z = Z("LiveSnapshot"), _e = 1, J = "ikon-live-snapshot", Ki = 300 * 1e3, $i = 5e6, Xi = 1e3;
|
|
3026
3061
|
function v() {
|
|
3027
3062
|
try {
|
|
3028
3063
|
return typeof localStorage > "u" ? null : localStorage;
|
|
@@ -3030,11 +3065,11 @@ function v() {
|
|
|
3030
3065
|
return null;
|
|
3031
3066
|
}
|
|
3032
3067
|
}
|
|
3033
|
-
function
|
|
3068
|
+
function ji(e) {
|
|
3034
3069
|
const t = typeof requestIdleCallback < "u" ? requestIdleCallback : null;
|
|
3035
3070
|
t ? t(() => e(), { timeout: 2e3 }) : setTimeout(e, 0);
|
|
3036
3071
|
}
|
|
3037
|
-
class
|
|
3072
|
+
class zi {
|
|
3038
3073
|
key;
|
|
3039
3074
|
appId;
|
|
3040
3075
|
userId;
|
|
@@ -3048,43 +3083,43 @@ class Yi {
|
|
|
3048
3083
|
static clearAll() {
|
|
3049
3084
|
const t = v();
|
|
3050
3085
|
if (!t) return;
|
|
3051
|
-
const
|
|
3086
|
+
const s = `${J}:`, r = [];
|
|
3052
3087
|
try {
|
|
3053
3088
|
for (let n = 0; n < t.length; n++) {
|
|
3054
3089
|
const i = t.key(n);
|
|
3055
|
-
i && i.startsWith(
|
|
3090
|
+
i && i.startsWith(s) && r.push(i);
|
|
3056
3091
|
}
|
|
3057
|
-
for (const n of
|
|
3092
|
+
for (const n of r)
|
|
3058
3093
|
t.removeItem(n);
|
|
3059
3094
|
} catch {
|
|
3060
3095
|
}
|
|
3061
3096
|
}
|
|
3062
3097
|
constructor(t) {
|
|
3063
|
-
this.appId = t.appId, this.userId = t.userId, this.disabled = !this.userId, this.maxAgeMs = t.maxAgeMs ??
|
|
3098
|
+
this.appId = t.appId, this.userId = t.userId, this.disabled = !this.userId, this.maxAgeMs = t.maxAgeMs ?? Ki, this.maxBytes = t.maxBytes ?? $i, this.debounceMs = t.debounceMs ?? Xi, this.key = `${J}:${this.appId}:${this.userId}`, this.disabled || this.pruneOtherUsers();
|
|
3064
3099
|
}
|
|
3065
3100
|
load() {
|
|
3066
3101
|
if (this.disabled) return null;
|
|
3067
3102
|
const t = v();
|
|
3068
3103
|
if (!t) return null;
|
|
3069
|
-
let
|
|
3104
|
+
let s;
|
|
3070
3105
|
try {
|
|
3071
|
-
|
|
3106
|
+
s = t.getItem(this.key);
|
|
3072
3107
|
} catch {
|
|
3073
3108
|
return null;
|
|
3074
3109
|
}
|
|
3075
|
-
if (!
|
|
3076
|
-
let
|
|
3110
|
+
if (!s) return null;
|
|
3111
|
+
let r;
|
|
3077
3112
|
try {
|
|
3078
|
-
|
|
3113
|
+
r = JSON.parse(s);
|
|
3079
3114
|
} catch {
|
|
3080
3115
|
return this.remove(), null;
|
|
3081
3116
|
}
|
|
3082
|
-
if (
|
|
3117
|
+
if (r.schemaVersion !== _e || r.appId !== this.appId || r.userId !== this.userId)
|
|
3083
3118
|
return this.remove(), null;
|
|
3084
|
-
if (!Number.isFinite(
|
|
3119
|
+
if (!Number.isFinite(r.savedAtMs) || Date.now() - r.savedAtMs > this.maxAgeMs)
|
|
3085
3120
|
return this.remove(), null;
|
|
3086
3121
|
try {
|
|
3087
|
-
return { streams:
|
|
3122
|
+
return { streams: r.streams.map(qi), styles: r.styles ?? [] };
|
|
3088
3123
|
} catch (n) {
|
|
3089
3124
|
return z.warn("Failed to deserialize stored live snapshot, dropping it", n), this.remove(), null;
|
|
3090
3125
|
}
|
|
@@ -3093,9 +3128,9 @@ class Yi {
|
|
|
3093
3128
|
* Schedule a throttled write of the current UI state (at most one write per window, captured at
|
|
3094
3129
|
* the trailing edge). Streams with no root are skipped. The actual write runs at idle time.
|
|
3095
3130
|
*/
|
|
3096
|
-
save(t,
|
|
3097
|
-
this.disabled || (this.pending = { streams: t, styles:
|
|
3098
|
-
this.writeTimer = null,
|
|
3131
|
+
save(t, s) {
|
|
3132
|
+
this.disabled || (this.pending = { streams: t, styles: s }, this.writeTimer === null && (this.writeTimer = setTimeout(() => {
|
|
3133
|
+
this.writeTimer = null, ji(() => this.writePending());
|
|
3099
3134
|
}, this.debounceMs)));
|
|
3100
3135
|
}
|
|
3101
3136
|
/** Write any pending state immediately and synchronously (used on dispose / unmount). */
|
|
@@ -3109,12 +3144,12 @@ class Yi {
|
|
|
3109
3144
|
const t = this.pending;
|
|
3110
3145
|
this.pending = null, t && this.writeNow(t.streams, t.styles);
|
|
3111
3146
|
}
|
|
3112
|
-
writeNow(t,
|
|
3113
|
-
const
|
|
3114
|
-
if (!
|
|
3147
|
+
writeNow(t, s) {
|
|
3148
|
+
const r = v();
|
|
3149
|
+
if (!r) return;
|
|
3115
3150
|
const n = [];
|
|
3116
3151
|
for (const a of t)
|
|
3117
|
-
!a.rootViewId || !a.views.has(a.rootViewId) || n.push(
|
|
3152
|
+
!a.rootViewId || !a.views.has(a.rootViewId) || n.push(Ji(a));
|
|
3118
3153
|
if (n.length === 0) return;
|
|
3119
3154
|
const i = {
|
|
3120
3155
|
schemaVersion: _e,
|
|
@@ -3122,7 +3157,7 @@ class Yi {
|
|
|
3122
3157
|
appId: this.appId,
|
|
3123
3158
|
userId: this.userId,
|
|
3124
3159
|
streams: n,
|
|
3125
|
-
styles: [...
|
|
3160
|
+
styles: [...s]
|
|
3126
3161
|
};
|
|
3127
3162
|
let o;
|
|
3128
3163
|
try {
|
|
@@ -3136,7 +3171,7 @@ class Yi {
|
|
|
3136
3171
|
return;
|
|
3137
3172
|
}
|
|
3138
3173
|
try {
|
|
3139
|
-
|
|
3174
|
+
r.setItem(this.key, o);
|
|
3140
3175
|
} catch {
|
|
3141
3176
|
}
|
|
3142
3177
|
}
|
|
@@ -3151,19 +3186,19 @@ class Yi {
|
|
|
3151
3186
|
pruneOtherUsers() {
|
|
3152
3187
|
const t = v();
|
|
3153
3188
|
if (!t) return;
|
|
3154
|
-
const
|
|
3189
|
+
const s = `${J}:${this.appId}:`, r = [];
|
|
3155
3190
|
try {
|
|
3156
3191
|
for (let n = 0; n < t.length; n++) {
|
|
3157
3192
|
const i = t.key(n);
|
|
3158
|
-
i && i.startsWith(
|
|
3193
|
+
i && i.startsWith(s) && i !== this.key && r.push(i);
|
|
3159
3194
|
}
|
|
3160
|
-
for (const n of
|
|
3195
|
+
for (const n of r)
|
|
3161
3196
|
t.removeItem(n);
|
|
3162
3197
|
} catch {
|
|
3163
3198
|
}
|
|
3164
3199
|
}
|
|
3165
3200
|
}
|
|
3166
|
-
function
|
|
3201
|
+
function Ji(e) {
|
|
3167
3202
|
return {
|
|
3168
3203
|
streamId: e.streamId,
|
|
3169
3204
|
category: e.category,
|
|
@@ -3172,7 +3207,7 @@ function Wi(e) {
|
|
|
3172
3207
|
views: [...e.views.entries()]
|
|
3173
3208
|
};
|
|
3174
3209
|
}
|
|
3175
|
-
function
|
|
3210
|
+
function qi(e) {
|
|
3176
3211
|
return {
|
|
3177
3212
|
streamId: e.streamId,
|
|
3178
3213
|
category: e.category,
|
|
@@ -3183,32 +3218,32 @@ function Ki(e) {
|
|
|
3183
3218
|
payloads: []
|
|
3184
3219
|
};
|
|
3185
3220
|
}
|
|
3186
|
-
function
|
|
3221
|
+
function Qi(e) {
|
|
3187
3222
|
return new Worker(
|
|
3188
|
-
"" + new URL("assets/ui-worker-
|
|
3223
|
+
"" + new URL("assets/ui-worker-Di0peIgz.js", import.meta.url).href,
|
|
3189
3224
|
{
|
|
3190
3225
|
type: "module",
|
|
3191
3226
|
name: e?.name
|
|
3192
3227
|
}
|
|
3193
3228
|
);
|
|
3194
3229
|
}
|
|
3195
|
-
const
|
|
3196
|
-
function
|
|
3230
|
+
const y = Z("IkonUiCore"), Zi = 250;
|
|
3231
|
+
function nt() {
|
|
3197
3232
|
if (!(typeof window > "u"))
|
|
3198
3233
|
return window.__IKON_BOOT_SNAPSHOT_FILE__ || void 0;
|
|
3199
3234
|
}
|
|
3200
3235
|
let K = null;
|
|
3201
|
-
function
|
|
3236
|
+
function so() {
|
|
3202
3237
|
if (K) return;
|
|
3203
|
-
const e =
|
|
3238
|
+
const e = nt();
|
|
3204
3239
|
e && (K = fetch(`/${e}`).then((t) => t, () => null));
|
|
3205
3240
|
}
|
|
3206
|
-
class
|
|
3241
|
+
class ro {
|
|
3207
3242
|
unsubscribeProtocolMessages;
|
|
3208
3243
|
unsubscribeState;
|
|
3209
3244
|
client = null;
|
|
3210
3245
|
lastConnectedSessionId = void 0;
|
|
3211
|
-
uiStore = new
|
|
3246
|
+
uiStore = new Bi();
|
|
3212
3247
|
uiWorker = null;
|
|
3213
3248
|
uiStyles = /* @__PURE__ */ new Map();
|
|
3214
3249
|
uiUpdateListeners = /* @__PURE__ */ new Set();
|
|
@@ -3225,12 +3260,18 @@ class Ji {
|
|
|
3225
3260
|
// modes. The React layer reads this to render the first live update into the seed's existing surface
|
|
3226
3261
|
// (in-place skeleton→live reconcile) instead of unmounting the seed and mounting the live (white flash).
|
|
3227
3262
|
seededStreamIds = /* @__PURE__ */ new Set();
|
|
3263
|
+
// Debounce timers keyed by stream (senderId_trackId): a burst of unrecoverable diffs collapses
|
|
3264
|
+
// into a single resync request per stream instead of one per dropped diff.
|
|
3265
|
+
resyncDebounceTimers = /* @__PURE__ */ new Map();
|
|
3228
3266
|
constructor(t) {
|
|
3229
|
-
const
|
|
3230
|
-
this.useUiWorker =
|
|
3267
|
+
const s = t?.threading?.uiWorker ?? "auto";
|
|
3268
|
+
this.useUiWorker = s !== "disabled" && typeof Worker < "u", t?.liveSnapshot?.enabled && (this.liveSnapshot = new zi(t.liveSnapshot)), t?.client && this.initialize(t.client, t);
|
|
3231
3269
|
}
|
|
3232
3270
|
dispose() {
|
|
3233
|
-
this.unsubscribeProtocolMessages?.(), this.unsubscribeState?.(), this.unsubscribeLiveSnapshotCapture?.(), this.liveSnapshot?.dispose(), this.liveSnapshot = null, this.uiWorker?.terminate(), this.uiWorker = null
|
|
3271
|
+
this.unsubscribeProtocolMessages?.(), this.unsubscribeState?.(), this.unsubscribeLiveSnapshotCapture?.(), this.liveSnapshot?.dispose(), this.liveSnapshot = null, this.uiWorker?.terminate(), this.uiWorker = null;
|
|
3272
|
+
for (const t of this.resyncDebounceTimers.values())
|
|
3273
|
+
clearTimeout(t);
|
|
3274
|
+
this.resyncDebounceTimers.clear(), this.client = null, this.uiStyleListeners.clear(), this.uiStyleDeleteListeners.clear(), this.uiStyles.clear();
|
|
3234
3275
|
}
|
|
3235
3276
|
clearAllState() {
|
|
3236
3277
|
this.uiWorker && this.uiWorker.postMessage({ type: "clear" });
|
|
@@ -3270,8 +3311,8 @@ class Ji {
|
|
|
3270
3311
|
isSeedStream(t) {
|
|
3271
3312
|
return this.seededStreamIds.has(t);
|
|
3272
3313
|
}
|
|
3273
|
-
initialize(t,
|
|
3274
|
-
this.client = t, this.useUiWorker && this.startUiWorker(
|
|
3314
|
+
initialize(t, s) {
|
|
3315
|
+
this.client = t, this.useUiWorker && this.startUiWorker(s), !this.seedFromLiveSnapshot() && s?.bootSnapshot !== !1 && this.seedFromBootSnapshot(), this.subscribeLiveSnapshotCapture();
|
|
3275
3316
|
const n = {
|
|
3276
3317
|
opcodeGroupsMask: L.GROUP_CORE | L.GROUP_UI | L.GROUP_ACTIONS
|
|
3277
3318
|
};
|
|
@@ -3288,7 +3329,7 @@ class Ji {
|
|
|
3288
3329
|
}
|
|
3289
3330
|
if (i === "connected") {
|
|
3290
3331
|
const o = this.client?.sessionId;
|
|
3291
|
-
this.lastConnectedSessionId !== void 0 && (o !== this.lastConnectedSessionId ? (
|
|
3332
|
+
this.lastConnectedSessionId !== void 0 && (o !== this.lastConnectedSessionId ? (y.info(`SessionId changed (${this.lastConnectedSessionId} → ${o}), clearing UI cache so the server can resend a fresh snapshot under the new SessionId`), this.clearAllState()) : (y.info("Soft reconnect (same SessionId), gating UI store on the server resync snapshot"), this.enterSnapshotMode())), this.lastConnectedSessionId = o;
|
|
3292
3333
|
}
|
|
3293
3334
|
});
|
|
3294
3335
|
}
|
|
@@ -3298,10 +3339,10 @@ class Ji {
|
|
|
3298
3339
|
if (!t || t.streams.length === 0) return !1;
|
|
3299
3340
|
if (this.uiWorker)
|
|
3300
3341
|
return this.uiWorker.postMessage({ type: "seed", liveStreams: t.streams, styles: t.styles }), !0;
|
|
3301
|
-
for (const
|
|
3302
|
-
this.uiStyles.set(
|
|
3303
|
-
for (const
|
|
3304
|
-
this.uiStore.applyStoreOp({ type: "ReplaceStreamSnapshot", snapshot:
|
|
3342
|
+
for (const s of t.styles)
|
|
3343
|
+
this.uiStyles.set(s.styleId, s), this.notifyUiStyle(s);
|
|
3344
|
+
for (const s of t.streams)
|
|
3345
|
+
this.uiStore.applyStoreOp({ type: "ReplaceStreamSnapshot", snapshot: s });
|
|
3305
3346
|
return !0;
|
|
3306
3347
|
}
|
|
3307
3348
|
// Build-time FTU boot snapshot: when this build was bundled with `--snapshot`, the app's env wiring
|
|
@@ -3310,25 +3351,25 @@ class Ji {
|
|
|
3310
3351
|
// a live update, gated into snapshot mode so the first live full snapshot atomically replaces it. The
|
|
3311
3352
|
// hashed filename is the cache-buster — a redeploy with a different UI fetches a different URL.
|
|
3312
3353
|
seedFromBootSnapshot() {
|
|
3313
|
-
const t =
|
|
3354
|
+
const t = nt();
|
|
3314
3355
|
t && this.loadBootSnapshotAsync(t);
|
|
3315
3356
|
}
|
|
3316
3357
|
async loadBootSnapshotAsync(t) {
|
|
3317
3358
|
try {
|
|
3318
|
-
const
|
|
3319
|
-
if (!
|
|
3320
|
-
const
|
|
3321
|
-
if (!
|
|
3359
|
+
const s = (K ? await K : null) ?? await fetch(`/${t}`);
|
|
3360
|
+
if (!s.ok) return;
|
|
3361
|
+
const r = await s.json();
|
|
3362
|
+
if (!r?.json) return;
|
|
3322
3363
|
if (this.uiWorker) {
|
|
3323
|
-
this.uiWorker.postMessage({ type: "seed", bootStreamId:
|
|
3364
|
+
this.uiWorker.postMessage({ type: "seed", bootStreamId: r.streamId ?? "boot", bootJson: r.json, styles: r.styles ?? [] });
|
|
3324
3365
|
return;
|
|
3325
3366
|
}
|
|
3326
3367
|
if (this.uiStore.getSnapshots().some((o) => o.rootViewId)) return;
|
|
3327
|
-
for (const o of
|
|
3368
|
+
for (const o of r.styles ?? []) {
|
|
3328
3369
|
const a = { styleId: o.styleId, css: o.css, common: o.common };
|
|
3329
3370
|
this.uiStyles.set(a.styleId, a), this.notifyUiStyle(a);
|
|
3330
3371
|
}
|
|
3331
|
-
const n = Ie({ Json:
|
|
3372
|
+
const n = Ie({ Json: r.json }), i = r.streamId ?? "boot";
|
|
3332
3373
|
this.uiStore.apply(i, n), this.seedStreamIds.add(i), this.seededStreamIds.add(i), this.uiStore.enterSnapshotModeAll();
|
|
3333
3374
|
} catch {
|
|
3334
3375
|
}
|
|
@@ -3341,53 +3382,56 @@ class Ji {
|
|
|
3341
3382
|
}
|
|
3342
3383
|
startUiWorker(t) {
|
|
3343
3384
|
try {
|
|
3344
|
-
this.uiWorker = new
|
|
3385
|
+
this.uiWorker = new Qi();
|
|
3345
3386
|
} catch (n) {
|
|
3346
|
-
|
|
3387
|
+
y.warn("Failed to create UI worker, falling back to main thread", n), this.uiWorker = null;
|
|
3347
3388
|
return;
|
|
3348
3389
|
}
|
|
3349
|
-
const
|
|
3350
|
-
this.uiWorker.postMessage({ type: "configure", flushIntervalMs:
|
|
3390
|
+
const s = t?.threading?.flushIntervalMs, r = t?.threading?.maxLatencyMs;
|
|
3391
|
+
this.uiWorker.postMessage({ type: "configure", flushIntervalMs: s, maxLatencyMs: r }), this.uiWorker.addEventListener("message", (n) => {
|
|
3351
3392
|
this.handleUiStoreOpBatch(n.data);
|
|
3352
3393
|
}), this.uiWorker.addEventListener("error", (n) => {
|
|
3353
3394
|
const i = [n.message, n.filename, n.lineno, n.colno].filter((o) => o != null && String(o).length > 0);
|
|
3354
|
-
|
|
3395
|
+
y.warn(`UI worker failed, falling back to main thread: ${i.join(" ")}`.trim()), this.uiWorker?.terminate(), this.uiWorker = null, this.rehydrateStoresForMainThread();
|
|
3355
3396
|
});
|
|
3356
3397
|
}
|
|
3357
3398
|
rehydrateStoresForMainThread() {
|
|
3358
3399
|
for (const t of this.uiStore.getSnapshots()) {
|
|
3359
3400
|
if (!t.rootViewId)
|
|
3360
3401
|
continue;
|
|
3361
|
-
const
|
|
3362
|
-
if (!
|
|
3402
|
+
const s = t.views.get(t.rootViewId);
|
|
3403
|
+
if (!s)
|
|
3363
3404
|
continue;
|
|
3364
|
-
const
|
|
3405
|
+
const r = {
|
|
3365
3406
|
snapshot: {
|
|
3366
3407
|
type: "full",
|
|
3367
3408
|
version: t.version ?? 0,
|
|
3368
3409
|
metadata: { viewId: t.rootViewId },
|
|
3369
|
-
root:
|
|
3410
|
+
root: s
|
|
3370
3411
|
},
|
|
3371
3412
|
payloads: t.payloads
|
|
3372
3413
|
};
|
|
3373
|
-
this.uiStore.apply(t.streamId,
|
|
3414
|
+
this.uiStore.apply(t.streamId, r);
|
|
3374
3415
|
}
|
|
3375
3416
|
}
|
|
3376
3417
|
forwardMessageToWorker(t) {
|
|
3377
3418
|
if (this.uiWorker)
|
|
3378
3419
|
try {
|
|
3379
|
-
const
|
|
3380
|
-
this.uiWorker.postMessage({ type: "protocol", message:
|
|
3381
|
-
} catch (
|
|
3382
|
-
|
|
3420
|
+
const s = t.slice().buffer;
|
|
3421
|
+
this.uiWorker.postMessage({ type: "protocol", message: s }, [s]);
|
|
3422
|
+
} catch (s) {
|
|
3423
|
+
y.warn("Failed to forward message to UI worker", s);
|
|
3383
3424
|
}
|
|
3384
3425
|
}
|
|
3385
3426
|
handleUiStoreOpBatch(t) {
|
|
3386
|
-
for (const
|
|
3387
|
-
this.applyUiStoreOp(
|
|
3427
|
+
for (const s of t.ops)
|
|
3428
|
+
this.applyUiStoreOp(s);
|
|
3388
3429
|
if (t.acks && t.acks.length > 0)
|
|
3389
|
-
for (const
|
|
3390
|
-
this.sendUiUpdateAck(
|
|
3430
|
+
for (const s of t.acks)
|
|
3431
|
+
this.sendUiUpdateAck(s.trackId, s.version, s.senderId);
|
|
3432
|
+
if (t.resyncs && t.resyncs.length > 0)
|
|
3433
|
+
for (const s of t.resyncs)
|
|
3434
|
+
this.requestResync(s.trackId, s.senderId);
|
|
3391
3435
|
}
|
|
3392
3436
|
applyUiStoreOp(t) {
|
|
3393
3437
|
if (t.type === "UpsertUiStyle") {
|
|
@@ -3417,9 +3461,9 @@ class Ji {
|
|
|
3417
3461
|
this.seededStreamIds.add(t.snapshot.streamId);
|
|
3418
3462
|
return;
|
|
3419
3463
|
}
|
|
3420
|
-
const
|
|
3421
|
-
this.seededStreamIds.delete(
|
|
3422
|
-
const n = this.uiStore.getSnapshot(
|
|
3464
|
+
const r = t.type === "ReplaceStreamSnapshot" ? t.snapshot.streamId : t.streamId;
|
|
3465
|
+
this.seededStreamIds.delete(r);
|
|
3466
|
+
const n = this.uiStore.getSnapshot(r);
|
|
3423
3467
|
if (!n?.rootViewId)
|
|
3424
3468
|
return;
|
|
3425
3469
|
const i = n.views.get(n.rootViewId);
|
|
@@ -3434,12 +3478,12 @@ class Ji {
|
|
|
3434
3478
|
},
|
|
3435
3479
|
payloads: n.payloads
|
|
3436
3480
|
};
|
|
3437
|
-
this.notifyUiUpdate(
|
|
3481
|
+
this.notifyUiUpdate(r, o);
|
|
3438
3482
|
return;
|
|
3439
3483
|
}
|
|
3440
3484
|
}
|
|
3441
3485
|
handleProtocolMessage(t) {
|
|
3442
|
-
switch (
|
|
3486
|
+
switch (it(t)) {
|
|
3443
3487
|
case L.CORE_GLOBAL_STATE:
|
|
3444
3488
|
this.handleGlobalState(t);
|
|
3445
3489
|
return;
|
|
@@ -3463,111 +3507,129 @@ class Ji {
|
|
|
3463
3507
|
}
|
|
3464
3508
|
}
|
|
3465
3509
|
handleGlobalState(t) {
|
|
3466
|
-
|
|
3467
|
-
const
|
|
3468
|
-
for (const n of Object.values(
|
|
3469
|
-
|
|
3510
|
+
Wn(t).then((s) => {
|
|
3511
|
+
const r = /* @__PURE__ */ new Set();
|
|
3512
|
+
for (const n of Object.values(s.UIStreams ?? {}))
|
|
3513
|
+
r.add(n.StreamId), this.uiStore.setCategory(n.StreamId, n.Info?.Category);
|
|
3470
3514
|
for (const n of this.uiStore.getSnapshots())
|
|
3471
|
-
this.seedStreamIds.has(n.streamId) ||
|
|
3472
|
-
}).catch((
|
|
3473
|
-
|
|
3515
|
+
this.seedStreamIds.has(n.streamId) || r.has(n.streamId) || (this.uiStore.remove(n.streamId), this.notifyUiStreamCleared(n.streamId));
|
|
3516
|
+
}).catch((s) => {
|
|
3517
|
+
y.error("Failed to handle global state", s);
|
|
3474
3518
|
});
|
|
3475
3519
|
}
|
|
3476
3520
|
// Retire orphan boot seeds once a live update has rendered (main-thread twin of the worker's
|
|
3477
3521
|
// evictSeedStreamsExcept). A seed sharing the live id is replaced in place, not removed.
|
|
3478
3522
|
evictSeedStreams(t) {
|
|
3479
3523
|
if (this.seedStreamIds.size !== 0) {
|
|
3480
|
-
for (const
|
|
3481
|
-
|
|
3524
|
+
for (const s of this.seedStreamIds)
|
|
3525
|
+
s !== t && (this.uiStore.remove(s), this.notifyUiStreamCleared(s));
|
|
3482
3526
|
this.seedStreamIds.clear();
|
|
3483
3527
|
}
|
|
3484
3528
|
}
|
|
3485
3529
|
handleUiUpdate(t) {
|
|
3486
|
-
const
|
|
3487
|
-
|
|
3530
|
+
const s = ae(t), r = `${s.senderId}_${s.trackId}`;
|
|
3531
|
+
Zr(t).then((n) => {
|
|
3488
3532
|
const i = Ie(n);
|
|
3489
|
-
this.notifyUiUpdate(
|
|
3533
|
+
this.notifyUiUpdate(r, i), this.uiStore.apply(r, i) && this.evictSeedStreams(r), this.uiStore.needsResync(r) && this.requestResync(s.trackId, s.senderId), this.sendUiUpdateAck(s.trackId, i.snapshot.version, s.senderId);
|
|
3490
3534
|
}).catch((n) => {
|
|
3491
|
-
n instanceof D ?
|
|
3535
|
+
n instanceof D ? y.warn("Failed to parse UI update", n.causeError ?? n) : y.error("Failed to apply UI update", n);
|
|
3492
3536
|
});
|
|
3493
3537
|
}
|
|
3494
3538
|
handleUiStyles(t) {
|
|
3495
|
-
|
|
3496
|
-
if (!
|
|
3497
|
-
const
|
|
3498
|
-
styleId:
|
|
3499
|
-
css:
|
|
3500
|
-
common:
|
|
3539
|
+
wr(t).then((s) => {
|
|
3540
|
+
if (!s.StyleId) return;
|
|
3541
|
+
const r = {
|
|
3542
|
+
styleId: s.StyleId,
|
|
3543
|
+
css: s.Style?.css,
|
|
3544
|
+
common: s.Style?.common
|
|
3501
3545
|
};
|
|
3502
|
-
this.uiStyles.set(
|
|
3503
|
-
}).catch((
|
|
3504
|
-
|
|
3546
|
+
this.uiStyles.set(r.styleId, r), this.notifyUiStyle(r);
|
|
3547
|
+
}).catch((s) => {
|
|
3548
|
+
y.error("Failed to handle UI styles", s);
|
|
3505
3549
|
});
|
|
3506
3550
|
}
|
|
3507
3551
|
handleUiStylesBatch(t) {
|
|
3508
|
-
|
|
3509
|
-
if (
|
|
3510
|
-
for (const
|
|
3511
|
-
if (!
|
|
3552
|
+
gr(t).then((s) => {
|
|
3553
|
+
if (s.Styles)
|
|
3554
|
+
for (const r of s.Styles) {
|
|
3555
|
+
if (!r.StyleId) continue;
|
|
3512
3556
|
const n = {
|
|
3513
|
-
styleId:
|
|
3514
|
-
css:
|
|
3515
|
-
common:
|
|
3557
|
+
styleId: r.StyleId,
|
|
3558
|
+
css: r.Style?.css,
|
|
3559
|
+
common: r.Style?.common
|
|
3516
3560
|
};
|
|
3517
3561
|
this.uiStyles.set(n.styleId, n), this.notifyUiStyle(n);
|
|
3518
3562
|
}
|
|
3519
|
-
}).catch((
|
|
3520
|
-
|
|
3563
|
+
}).catch((s) => {
|
|
3564
|
+
y.error("Failed to handle UI styles batch", s);
|
|
3521
3565
|
});
|
|
3522
3566
|
}
|
|
3523
3567
|
handleUiStylesDelete(t) {
|
|
3524
|
-
|
|
3525
|
-
if (!(!
|
|
3526
|
-
for (const
|
|
3527
|
-
this.uiStyles.delete(
|
|
3528
|
-
this.notifyUiStyleDelete(
|
|
3529
|
-
}
|
|
3530
|
-
}).catch((
|
|
3531
|
-
|
|
3568
|
+
Wr(t).then((s) => {
|
|
3569
|
+
if (!(!s.StyleIds || s.StyleIds.length === 0)) {
|
|
3570
|
+
for (const r of s.StyleIds)
|
|
3571
|
+
this.uiStyles.delete(r);
|
|
3572
|
+
this.notifyUiStyleDelete(s.StyleIds);
|
|
3573
|
+
}
|
|
3574
|
+
}).catch((s) => {
|
|
3575
|
+
y.error("Failed to handle UI styles delete", s);
|
|
3532
3576
|
});
|
|
3533
3577
|
}
|
|
3534
3578
|
handleClearStream(t) {
|
|
3535
|
-
const
|
|
3536
|
-
this.uiStore.clear(
|
|
3579
|
+
const s = ae(t), r = `${s.senderId}_${s.trackId}`;
|
|
3580
|
+
this.uiStore.clear(r), this.notifyUiStreamCleared(r);
|
|
3537
3581
|
}
|
|
3538
|
-
notifyUiUpdate(t,
|
|
3539
|
-
for (const
|
|
3540
|
-
|
|
3582
|
+
notifyUiUpdate(t, s) {
|
|
3583
|
+
for (const r of this.uiUpdateListeners)
|
|
3584
|
+
r(t, s);
|
|
3541
3585
|
}
|
|
3542
3586
|
notifyUiStyle(t) {
|
|
3543
|
-
for (const
|
|
3544
|
-
|
|
3587
|
+
for (const s of this.uiStyleListeners)
|
|
3588
|
+
s(t);
|
|
3545
3589
|
}
|
|
3546
3590
|
notifyUiStyleDelete(t) {
|
|
3547
|
-
for (const
|
|
3548
|
-
|
|
3591
|
+
for (const s of this.uiStyleDeleteListeners)
|
|
3592
|
+
s(t);
|
|
3549
3593
|
}
|
|
3550
3594
|
notifyUiStreamCleared(t) {
|
|
3551
|
-
for (const
|
|
3552
|
-
|
|
3595
|
+
for (const s of this.uiStreamClearedListeners)
|
|
3596
|
+
s(t);
|
|
3553
3597
|
}
|
|
3554
|
-
sendUiUpdateAck(t,
|
|
3555
|
-
if (this.client && !(!Number.isFinite(
|
|
3598
|
+
sendUiUpdateAck(t, s, r) {
|
|
3599
|
+
if (this.client && !(!Number.isFinite(s) || s < 0))
|
|
3556
3600
|
try {
|
|
3557
|
-
const n =
|
|
3601
|
+
const n = r !== void 0 ? { trackId: t, targetIds: [r] } : { trackId: t }, i = on({ Version: s }, this.client.sessionId ?? 0, n);
|
|
3558
3602
|
this.client.sendProtocolMessage(i);
|
|
3559
3603
|
} catch (n) {
|
|
3560
|
-
|
|
3604
|
+
y.warn("Failed to send UI update ack", n);
|
|
3605
|
+
}
|
|
3606
|
+
}
|
|
3607
|
+
requestResync(t, s) {
|
|
3608
|
+
const r = `${s}_${t}`;
|
|
3609
|
+
if (this.resyncDebounceTimers.has(r))
|
|
3610
|
+
return;
|
|
3611
|
+
const n = setTimeout(() => {
|
|
3612
|
+
this.resyncDebounceTimers.delete(r), this.sendResyncRequest(t, s);
|
|
3613
|
+
}, Zi);
|
|
3614
|
+
this.resyncDebounceTimers.set(r, n);
|
|
3615
|
+
}
|
|
3616
|
+
sendResyncRequest(t, s) {
|
|
3617
|
+
if (this.client)
|
|
3618
|
+
try {
|
|
3619
|
+
const r = _r({ TrackId: t }, this.client.sessionId ?? 0, { trackId: t, targetIds: [s] });
|
|
3620
|
+
this.client.sendProtocolMessage(r);
|
|
3621
|
+
} catch (r) {
|
|
3622
|
+
y.warn("Failed to send UI resync request", r);
|
|
3561
3623
|
}
|
|
3562
3624
|
}
|
|
3563
3625
|
}
|
|
3564
3626
|
export {
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3627
|
+
ki as HandlerCache,
|
|
3628
|
+
ro as IkonUiCore,
|
|
3629
|
+
zi as LiveSnapshotCache,
|
|
3630
|
+
Bi as UiStore,
|
|
3631
|
+
vi as UiStreamStore,
|
|
3570
3632
|
D as UiUpdateParseError,
|
|
3571
3633
|
Ie as parseUiUpdate,
|
|
3572
|
-
|
|
3634
|
+
so as prefetchBootSnapshot
|
|
3573
3635
|
};
|