@ikonai/sdk-ui 1.0.40 → 1.0.42

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