@ikonai/sdk-ui 1.0.79 → 1.0.80

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