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