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