@ikonai/sdk-ui 0.0.42 → 1.0.0

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.
@@ -7,26 +7,26 @@ function et(t) {
7
7
  const e = K(t), s = new DataView(e.buffer, e.byteOffset, e.byteLength);
8
8
  if (e.length < 27)
9
9
  throw new Error("Protocol payload too short");
10
- const r = s.getUint32(0, !0), n = s.getUint32(4, !0), i = s.getUint32(8, !0), o = s.getUint32(12, !0), a = s.getUint32(16, !0), l = s.getUint32(20, !0), I = s.getUint8(24), c = s.getUint8(25), E = s.getUint8(26);
11
- if (27 + l * 4 > e.length)
10
+ const r = s.getUint32(0, !0), n = s.getUint32(4, !0), i = s.getUint32(8, !0), o = s.getUint32(12, !0), a = s.getUint32(16, !0), I = s.getUint32(20, !0), l = s.getUint8(24), c = s.getUint8(25), E = s.getUint8(26);
11
+ if (27 + I * 4 > e.length)
12
12
  throw new Error("Protocol header exceeds payload length");
13
- const h = [];
14
- let N = 27;
15
- for (let f = 0; f < l; f++)
16
- h.push(s.getUint32(N, !0)), N += 4;
13
+ const N = [];
14
+ let h = 27;
15
+ for (let w = 0; w < I; w++)
16
+ N.push(s.getUint32(h, !0)), h += 4;
17
17
  return {
18
18
  length: r,
19
19
  opcode: n,
20
20
  senderId: i,
21
21
  trackId: o,
22
22
  sequenceId: a,
23
- targetIds: h,
24
- payloadVersion: I,
23
+ targetIds: N,
24
+ payloadVersion: l,
25
25
  payloadType: c,
26
26
  flags: E
27
27
  };
28
28
  }
29
- function J(t, e, s) {
29
+ function $(t, e, s) {
30
30
  const r = K(t), n = et(r);
31
31
  if (e !== void 0 && n.opcode !== e)
32
32
  throw new Error(`Unexpected opcode ${n.opcode}`);
@@ -37,11 +37,11 @@ function J(t, e, s) {
37
37
  const i = 27 + n.targetIds.length * 4;
38
38
  return r.subarray(i, n.length);
39
39
  }
40
- var p = /* @__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))(p || {});
40
+ var F = /* @__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))(F || {});
41
41
  const te = 161, ee = 162;
42
42
  new TextEncoder();
43
43
  const se = new TextDecoder("utf-8", { fatal: !0 });
44
- class O {
44
+ class L {
45
45
  constructor(e, s, r) {
46
46
  this.buffer = e, this.version = s, this.offset = r, this.end = e.length - 1;
47
47
  }
@@ -53,8 +53,8 @@ class O {
53
53
  throw new Error("Teleport payload too short");
54
54
  if (s[0] !== te || s[s.length - 1] !== ee)
55
55
  throw new Error("Teleport object missing markers");
56
- const r = { offset: 1 }, n = S(s, r, "InvalidLength");
57
- return new O(s, n, r.offset);
56
+ const r = { offset: 1 }, n = C(s, r, "InvalidLength");
57
+ return new L(s, n, r.offset);
58
58
  }
59
59
  next() {
60
60
  if (this.offset >= this.end)
@@ -66,13 +66,13 @@ class O {
66
66
  const s = this.buffer[this.offset++], r = s >> 4 & 15;
67
67
  if ((s & 15) !== 0)
68
68
  throw new Error("Teleport field flags must be zero");
69
- const n = F(r);
69
+ const n = p(r);
70
70
  let i;
71
71
  if (n >= 0)
72
- A(this.buffer, this.offset, n), i = this.buffer.subarray(this.offset, this.offset + n), this.offset += n;
72
+ S(this.buffer, this.offset, n), i = this.buffer.subarray(this.offset, this.offset + n), this.offset += n;
73
73
  else {
74
- const o = { offset: this.offset }, a = S(this.buffer, o, "InvalidLength");
75
- A(this.buffer, o.offset, a), i = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
74
+ const o = { offset: this.offset }, a = C(this.buffer, o, "InvalidLength");
75
+ S(this.buffer, o.offset, a), i = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
76
76
  }
77
77
  return new re(e, r, i);
78
78
  }
@@ -151,7 +151,7 @@ class U {
151
151
  return this.ensureType(
152
152
  11
153
153
  /* Object */
154
- ), O.create(this.payload);
154
+ ), L.create(this.payload);
155
155
  }
156
156
  asArray() {
157
157
  return this.ensureType(
@@ -167,7 +167,7 @@ class U {
167
167
  }
168
168
  ensureType(e) {
169
169
  if (this.type !== e)
170
- throw new Error(`Teleport value has type ${p[this.type]}, expected ${p[e]}`);
170
+ throw new Error(`Teleport value has type ${F[this.type]}, expected ${F[e]}`);
171
171
  }
172
172
  }
173
173
  class re extends U {
@@ -191,7 +191,7 @@ class st {
191
191
  if (this.elementType = s >> 4 & 15, (s & 15) !== 0)
192
192
  throw new Error("Array flags must be zero");
193
193
  const r = { offset: 1 };
194
- this.count = S(e, r, "ArrayMalformed"), this.offset = r.offset;
194
+ this.count = C(e, r, "ArrayMalformed"), this.offset = r.offset;
195
195
  }
196
196
  static create(e) {
197
197
  return new st(K(e));
@@ -215,38 +215,38 @@ class st {
215
215
  case 4:
216
216
  case 6:
217
217
  case 14: {
218
- const e = F(this.elementType);
219
- A(this.payload, this.offset, e);
218
+ const e = p(this.elementType);
219
+ S(this.payload, this.offset, e);
220
220
  const s = this.payload.subarray(this.offset, this.offset + e);
221
- return this.offset += e, new V(this.elementType, s);
221
+ return this.offset += e, new M(this.elementType, s);
222
222
  }
223
223
  case 12:
224
224
  case 13: {
225
- const e = { offset: this.offset }, s = S(this.payload, e, "ArrayMalformed");
226
- A(this.payload, e.offset, s);
225
+ const e = { offset: this.offset }, s = C(this.payload, e, "ArrayMalformed");
226
+ S(this.payload, e.offset, s);
227
227
  const r = this.payload.subarray(e.offset, e.offset + s);
228
- return this.offset = e.offset + s, new V(this.elementType, r);
228
+ return this.offset = e.offset + s, new M(this.elementType, r);
229
229
  }
230
230
  case 11: {
231
- const e = { offset: this.offset }, s = S(this.payload, e, "ArrayMalformed");
232
- A(this.payload, e.offset, s);
231
+ const e = { offset: this.offset }, s = C(this.payload, e, "ArrayMalformed");
232
+ S(this.payload, e.offset, s);
233
233
  const r = this.payload.subarray(e.offset, e.offset + s);
234
- return this.offset = e.offset + s, new V(11, r);
234
+ return this.offset = e.offset + s, new M(11, r);
235
235
  }
236
236
  case 9: {
237
237
  const e = nt(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + e);
238
- return this.offset += e, new V(9, s);
238
+ return this.offset += e, new M(9, s);
239
239
  }
240
240
  case 10: {
241
241
  const e = it(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + e);
242
- return this.offset += e, new V(10, s);
242
+ return this.offset += e, new M(10, s);
243
243
  }
244
244
  default:
245
- throw new Error(`Unsupported array element type ${p[this.elementType]}`);
245
+ throw new Error(`Unsupported array element type ${F[this.elementType]}`);
246
246
  }
247
247
  }
248
248
  }
249
- class V extends U {
249
+ class M extends U {
250
250
  constructor(e, s) {
251
251
  super(e, s);
252
252
  }
@@ -263,9 +263,9 @@ class rt {
263
263
  throw new Error("Dictionary payload too short");
264
264
  if (this.keyType = e[0] >> 4 & 15, this.valueType = e[1] >> 4 & 15, (e[0] & 15) !== 0 || (e[1] & 15) !== 0)
265
265
  throw new Error("Dictionary key/value flags must be zero");
266
- _t(this.keyType);
266
+ ct(this.keyType);
267
267
  const s = { offset: 2 };
268
- this.count = S(e, s, "DictMalformed"), this.offset = s.offset;
268
+ this.count = C(e, s, "DictMalformed"), this.offset = s.offset;
269
269
  }
270
270
  static create(e) {
271
271
  return new rt(K(e));
@@ -280,15 +280,15 @@ class rt {
280
280
  return this.index++, new ne(e, s);
281
281
  }
282
282
  readKey() {
283
- const e = F(this.keyType);
283
+ const e = p(this.keyType);
284
284
  if (e >= 0) {
285
- A(this.payload, this.offset, e);
285
+ S(this.payload, this.offset, e);
286
286
  const s = this.payload.subarray(this.offset, this.offset + e);
287
287
  return this.offset += e, new U(this.keyType, s);
288
288
  }
289
289
  if (this.keyType === 12 || this.keyType === 13) {
290
- const s = { offset: this.offset }, r = S(this.payload, s, "DictMalformed");
291
- A(this.payload, s.offset, r);
290
+ const s = { offset: this.offset }, r = C(this.payload, s, "DictMalformed");
291
+ S(this.payload, s.offset, r);
292
292
  const n = this.payload.subarray(s.offset, s.offset + r);
293
293
  return this.offset = s.offset + r, new U(this.keyType, n);
294
294
  }
@@ -298,14 +298,14 @@ class rt {
298
298
  switch (this.valueType) {
299
299
  case 12:
300
300
  case 13: {
301
- const e = { offset: this.offset }, s = S(this.payload, e, "DictMalformed");
302
- A(this.payload, e.offset, s);
301
+ const e = { offset: this.offset }, s = C(this.payload, e, "DictMalformed");
302
+ S(this.payload, e.offset, s);
303
303
  const r = this.payload.subarray(e.offset, e.offset + s);
304
304
  return this.offset = e.offset + s, new U(this.valueType, r);
305
305
  }
306
306
  case 11: {
307
- const e = { offset: this.offset }, s = S(this.payload, e, "DictMalformed");
308
- A(this.payload, e.offset, s);
307
+ const e = { offset: this.offset }, s = C(this.payload, e, "DictMalformed");
308
+ S(this.payload, e.offset, s);
309
309
  const r = this.payload.subarray(e.offset, e.offset + s);
310
310
  return this.offset = e.offset + s, new U(11, r);
311
311
  }
@@ -326,13 +326,13 @@ class rt {
326
326
  case 6:
327
327
  case 14:
328
328
  case 1: {
329
- const e = F(this.valueType);
330
- A(this.payload, this.offset, e);
329
+ const e = p(this.valueType);
330
+ S(this.payload, this.offset, e);
331
331
  const s = this.payload.subarray(this.offset, this.offset + e);
332
332
  return this.offset += e, new U(this.valueType, s);
333
333
  }
334
334
  default:
335
- throw new Error(`Unsupported dictionary value type ${p[this.valueType]}`);
335
+ throw new Error(`Unsupported dictionary value type ${F[this.valueType]}`);
336
336
  }
337
337
  }
338
338
  }
@@ -380,8 +380,8 @@ class T {
380
380
  T.toHex(T.readUInt32LE(e, 0), 8),
381
381
  T.toHex(T.readUInt16LE(e, 4), 4),
382
382
  T.toHex(T.readUInt16LE(e, 6), 4),
383
- It(e.subarray(8, 10)),
384
- It(e.subarray(10, 16))
383
+ at(e.subarray(8, 10)),
384
+ at(e.subarray(10, 16))
385
385
  ].join("-");
386
386
  }
387
387
  asBytes() {
@@ -411,7 +411,7 @@ class T {
411
411
  return (e >>> 0).toString(16).padStart(s, "0");
412
412
  }
413
413
  }
414
- function S(t, e, s) {
414
+ function C(t, e, s) {
415
415
  if (e.offset >= t.length)
416
416
  throw new Error(s);
417
417
  let r = 0, n = 0, i = 0;
@@ -430,7 +430,7 @@ function S(t, e, s) {
430
430
  function ie(t) {
431
431
  return t < 128 ? 1 : t < 16384 ? 2 : t < 2097152 ? 3 : t < 268435456 ? 4 : 5;
432
432
  }
433
- function F(t) {
433
+ function p(t) {
434
434
  switch (t) {
435
435
  case 3:
436
436
  case 5:
@@ -450,11 +450,11 @@ function F(t) {
450
450
  return -1;
451
451
  }
452
452
  }
453
- function _t(t) {
453
+ function ct(t) {
454
454
  if (t === 9 || t === 11 || t === 10 || t === 1)
455
455
  throw new Error("Dictionary keys must be primitive Teleport types");
456
456
  }
457
- function A(t, e, s) {
457
+ function S(t, e, s) {
458
458
  if (e < 0 || s < 0 || e + s > t.length)
459
459
  throw new Error("Teleport payload exceeds bounds");
460
460
  }
@@ -467,13 +467,13 @@ function nt(t, e) {
467
467
  const s = t[e], r = s >> 4 & 15;
468
468
  if ((s & 15) !== 0)
469
469
  throw new Error("Array flags must be zero");
470
- const n = { offset: e + 1 }, i = S(t, n, "ArrayMalformed"), o = F(r);
470
+ const n = { offset: e + 1 }, i = C(t, n, "ArrayMalformed"), o = p(r);
471
471
  if (o >= 0) {
472
- const l = o * i;
473
- return A(t, n.offset, l), n.offset + l - e;
472
+ const I = o * i;
473
+ return S(t, n.offset, I), n.offset + I - e;
474
474
  }
475
475
  let a = n.offset;
476
- for (let l = 0; l < i; l++)
476
+ for (let I = 0; I < i; I++)
477
477
  a = q(r, t, a, "ArrayMalformed");
478
478
  return a - e;
479
479
  }
@@ -483,224 +483,279 @@ function it(t, e) {
483
483
  const s = t[e] >> 4 & 15, r = t[e + 1] >> 4 & 15;
484
484
  if ((t[e] & 15) !== 0 || (t[e + 1] & 15) !== 0)
485
485
  throw new Error("Dictionary key/value flags must be zero");
486
- _t(s);
487
- const n = { offset: e + 2 }, i = S(t, n, "DictMalformed");
486
+ ct(s);
487
+ const n = { offset: e + 2 }, i = C(t, n, "DictMalformed");
488
488
  let o = n.offset;
489
489
  for (let a = 0; a < i; a++)
490
490
  o = q(s, t, o, "DictMalformed"), o = q(r, t, o, "DictMalformed");
491
491
  return o - e;
492
492
  }
493
493
  function q(t, e, s, r) {
494
- const n = F(t);
494
+ const n = p(t);
495
495
  if (n >= 0)
496
- return A(e, s, n), s + n;
496
+ return S(e, s, n), s + n;
497
497
  switch (t) {
498
498
  case 12:
499
499
  case 13: {
500
- const i = { offset: s }, o = S(e, i, r);
501
- return A(e, i.offset, o), i.offset + o;
500
+ const i = { offset: s }, o = C(e, i, r);
501
+ return S(e, i.offset, o), i.offset + o;
502
502
  }
503
503
  case 11: {
504
- const i = { offset: s }, o = S(e, i, r);
505
- return A(e, i.offset, o), i.offset + o;
504
+ const i = { offset: s }, o = C(e, i, r);
505
+ return S(e, i.offset, o), i.offset + o;
506
506
  }
507
507
  case 9:
508
508
  return s + nt(e, s);
509
509
  case 10:
510
510
  return s + it(e, s);
511
511
  default:
512
- throw new Error(`Unsupported Teleport type ${p[t]}`);
512
+ throw new Error(`Unsupported Teleport type ${F[t]}`);
513
513
  }
514
514
  }
515
- function It(t) {
515
+ function at(t) {
516
516
  return Array.from(t).map((e) => e.toString(16).padStart(2, "0")).join("");
517
517
  }
518
518
  function K(t) {
519
519
  return t instanceof Uint8Array ? t : new Uint8Array(t);
520
520
  }
521
- var ft = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(ft || {}), ht = /* @__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))(ht || {}), ut = /* @__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))(ut || {}), Tt = /* @__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))(Tt || {}), Nt = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(Nt || {}), At = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(At || {}), St = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.H264 = 1] = "H264", t[t.Hevc = 2] = "Hevc", t[t.Vp8 = 3] = "Vp8", t))(St || {}), 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 || {}), P = /* @__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.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.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.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))(P || {});
522
- const ae = 1368629611, le = 2431514951, Ie = 2914494629, ce = 3284746250, Ee = 4101844078;
523
- function yt(t) {
521
+ var Et = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(Et || {}), _t = /* @__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))(_t || {}), ft = /* @__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))(ft || {}), ht = /* @__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))(ht || {}), 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 || {}), Tt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(Tt || {}), Nt = /* @__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))(Nt || {}), At = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(At || {}), O = /* @__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.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.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))(O || {});
522
+ const ae = 265814330, le = 1368629611, Ie = 2431514951, ce = 2914494629, Ee = 3284746250, _e = 4101844078;
523
+ function dt(t) {
524
524
  const e = {};
525
- return Ct(e), e;
525
+ return St(e), e;
526
526
  }
527
- function Ct(t) {
528
- return t.Description = "", t.Codec = ft.Unknown, t.SampleRate = 0, t.Channels = 0, t.BitDepth = 0, t;
529
- }
530
- function _e(t, e) {
531
- const s = e ?? yt();
532
- return Ct(s), fe(t, s), s;
527
+ function St(t) {
528
+ return t.Description = "", t.Codec = Et.Unknown, t.SampleRate = 0, t.Channels = 0, t.BitDepth = 0, t.ShapeSets = void 0, t;
533
529
  }
534
530
  function fe(t, e) {
531
+ const s = e ?? dt();
532
+ return St(s), he(t, s), s;
533
+ }
534
+ function he(t, e) {
535
535
  let s;
536
536
  for (; (s = t.next()) !== null; )
537
537
  switch (s.fieldId) {
538
538
  case ae: {
539
+ if (s.isNull) {
540
+ e.ShapeSets = void 0;
541
+ break;
542
+ }
543
+ e.ShapeSets = ue(s.asArray());
544
+ break;
545
+ }
546
+ case le: {
539
547
  if (s.isNull) throw new Error();
540
548
  e.Description = s.asString();
541
549
  break;
542
550
  }
543
- case le: {
551
+ case Ie: {
544
552
  if (s.isNull) throw new Error();
545
553
  e.Channels = s.asInt32();
546
554
  break;
547
555
  }
548
- case Ie: {
556
+ case ce: {
549
557
  if (s.isNull) throw new Error();
550
558
  e.BitDepth = s.asInt32();
551
559
  break;
552
560
  }
553
- case ce: {
561
+ case Ee: {
554
562
  if (s.isNull) throw new Error();
555
563
  e.Codec = s.asInt32();
556
564
  break;
557
565
  }
558
- case Ee: {
566
+ case _e: {
559
567
  if (s.isNull) throw new Error();
560
568
  e.SampleRate = s.asInt32();
561
569
  break;
562
570
  }
563
571
  }
564
572
  }
565
- const he = 76337612, ue = 185396121, Te = 388632637, Ne = 417197284, Ae = 469070965, Se = 470595159, de = 781727218, ye = 834078886, Ce = 1043273762, we = 1236999138, Ue = 1368629611, De = 1715899485, Re = 1942830531, Le = 1999510636, me = 2079864626, Oe = 2142346422, ge = 2598291686, Pe = 2719718823, be = 2810953526, pe = 2840065720, Fe = 2885165957, ve = 3586157513, Me = 3717933110, Ve = 4062655306;
566
- function ke(t) {
573
+ function ue(t) {
574
+ const e = [];
575
+ let s;
576
+ for (; (s = t.next()) !== null; )
577
+ e.push(Se(s.asObject()));
578
+ return e;
579
+ }
580
+ const Te = 1107713536, Ne = 1154362099, Ae = 1185721362;
581
+ function de(t) {
582
+ const e = {};
583
+ return yt(e), e;
584
+ }
585
+ function yt(t) {
586
+ return t.SetId = 0, t.Name = "", t.ShapeNames = [], t;
587
+ }
588
+ function Se(t, e) {
589
+ const s = e ?? de();
590
+ return yt(s), ye(t, s), s;
591
+ }
592
+ function ye(t, e) {
593
+ let s;
594
+ for (; (s = t.next()) !== null; )
595
+ switch (s.fieldId) {
596
+ case Te: {
597
+ if (s.isNull) throw new Error();
598
+ e.Name = s.asString();
599
+ break;
600
+ }
601
+ case Ne: {
602
+ if (s.isNull) throw new Error();
603
+ e.SetId = s.asUInt32();
604
+ break;
605
+ }
606
+ case Ae: {
607
+ if (s.isNull) throw new Error();
608
+ e.ShapeNames = we(s.asArray());
609
+ break;
610
+ }
611
+ }
612
+ }
613
+ function we(t) {
614
+ const e = [];
615
+ let s;
616
+ for (; (s = t.next()) !== null; )
617
+ e.push(s.asString());
618
+ return e;
619
+ }
620
+ const Ce = 76337612, De = 185396121, Ue = 388632637, Re = 417197284, me = 469070965, Le = 470595159, Oe = 781727218, ge = 834078886, Pe = 1043273762, be = 1236999138, Fe = 1368629611, pe = 1715899485, ve = 1942830531, Me = 1999510636, ke = 2079864626, Ve = 2142346422, Ge = 2598291686, Be = 2719718823, xe = 2810953526, He = 2840065720, Ye = 2885165957, $e = 3586157513, Ke = 3717933110, je = 4062655306;
621
+ function Xe(t) {
567
622
  const e = {};
568
623
  return wt(e), e;
569
624
  }
570
625
  function wt(t) {
571
- return t.ContextType = ut.Unknown, t.UserType = At.Unknown, t.PayloadType = Tt.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 = ht.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = dt.Unknown, t;
626
+ return t.ContextType = ft.Unknown, t.UserType = Tt.Unknown, t.PayloadType = ht.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 = _t.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = At.Unknown, t;
572
627
  }
573
- function Ge(t, e) {
574
- const s = e ?? ke();
575
- return wt(s), Be(t, s), s;
628
+ function ze(t, e) {
629
+ const s = e ?? Xe();
630
+ return wt(s), We(t, s), s;
576
631
  }
577
- function Be(t, e) {
632
+ function We(t, e) {
578
633
  let s;
579
634
  for (; (s = t.next()) !== null; )
580
635
  switch (s.fieldId) {
581
- case he: {
636
+ case Ce: {
582
637
  if (s.isNull) throw new Error();
583
638
  e.DeviceId = s.asString();
584
639
  break;
585
640
  }
586
- case ue: {
641
+ case De: {
587
642
  if (s.isNull) throw new Error();
588
643
  e.InstallId = s.asString();
589
644
  break;
590
645
  }
591
- case Te: {
646
+ case Ue: {
592
647
  if (s.isNull) throw new Error();
593
648
  e.UserAgent = s.asString();
594
649
  break;
595
650
  }
596
- case Ne: {
651
+ case Re: {
597
652
  if (s.isNull) throw new Error();
598
653
  e.ContextType = s.asInt32();
599
654
  break;
600
655
  }
601
- case Ae: {
656
+ case me: {
602
657
  if (s.isNull) throw new Error();
603
658
  e.HasInput = s.asBool();
604
659
  break;
605
660
  }
606
- case Se: {
661
+ case Le: {
607
662
  if (s.isNull) throw new Error();
608
663
  e.UserType = s.asInt32();
609
664
  break;
610
665
  }
611
- case de: {
666
+ case Oe: {
612
667
  if (s.isNull) throw new Error();
613
668
  e.UserId = s.asString();
614
669
  break;
615
670
  }
616
- case ye: {
671
+ case ge: {
617
672
  if (s.isNull) throw new Error();
618
673
  e.ProductId = s.asString();
619
674
  break;
620
675
  }
621
- case Ce: {
676
+ case Pe: {
622
677
  if (s.isNull) throw new Error();
623
678
  e.AuthSessionId = s.asString();
624
679
  break;
625
680
  }
626
- case we: {
681
+ case be: {
627
682
  if (s.isNull) throw new Error();
628
683
  e.ReceiveAllMessages = s.asBool();
629
684
  break;
630
685
  }
631
- case Ue: {
686
+ case Fe: {
632
687
  if (s.isNull) throw new Error();
633
688
  e.Description = s.asString();
634
689
  break;
635
690
  }
636
- case De: {
691
+ case pe: {
637
692
  if (s.isNull) throw new Error();
638
693
  e.Locale = s.asString();
639
694
  break;
640
695
  }
641
- case Re: {
696
+ case ve: {
642
697
  if (s.isNull) throw new Error();
643
698
  e.SdkType = s.asInt32();
644
699
  break;
645
700
  }
646
- case Le: {
701
+ case Me: {
647
702
  if (s.isNull) throw new Error();
648
703
  e.SessionId = s.asInt32();
649
704
  break;
650
705
  }
651
- case me: {
706
+ case ke: {
652
707
  if (s.isNull) throw new Error();
653
708
  e.PreciseJoinedAt = s.asUInt64();
654
709
  break;
655
710
  }
656
- case Oe: {
711
+ case Ve: {
657
712
  if (s.isNull) throw new Error();
658
713
  e.PayloadType = s.asInt32();
659
714
  break;
660
715
  }
661
- case ge: {
716
+ case Ge: {
662
717
  if (s.isNull) throw new Error();
663
718
  e.VersionId = s.asString();
664
719
  break;
665
720
  }
666
- case Pe: {
721
+ case Be: {
667
722
  if (s.isNull) throw new Error();
668
723
  e.UniqueSessionId = s.asString();
669
724
  break;
670
725
  }
671
- case be: {
726
+ case xe: {
672
727
  if (s.isNull) throw new Error();
673
728
  e.ClientType = s.asInt32();
674
729
  break;
675
730
  }
676
- case pe: {
731
+ case He: {
677
732
  if (s.isNull) throw new Error();
678
733
  e.IsReady = s.asBool();
679
734
  break;
680
735
  }
681
- case Fe: {
736
+ case Ye: {
682
737
  if (s.isNull) throw new Error();
683
- e.Parameters = xe(s.asDictionary());
738
+ e.Parameters = Je(s.asDictionary());
684
739
  break;
685
740
  }
686
- case ve: {
741
+ case $e: {
687
742
  if (s.isNull) throw new Error();
688
743
  e.IsInternal = s.asBool();
689
744
  break;
690
745
  }
691
- case Me: {
746
+ case Ke: {
692
747
  if (s.isNull) throw new Error();
693
748
  e.ChannelLocale = s.asString();
694
749
  break;
695
750
  }
696
- case Ve: {
751
+ case je: {
697
752
  if (s.isNull) throw new Error();
698
753
  e.EmbeddedSpaceId = s.asString();
699
754
  break;
700
755
  }
701
756
  }
702
757
  }
703
- function xe(t) {
758
+ function Je(t) {
704
759
  const e = /* @__PURE__ */ Object.create(null);
705
760
  let s;
706
761
  for (; (s = t.next()) !== null; ) {
@@ -709,634 +764,654 @@ function xe(t) {
709
764
  }
710
765
  return e;
711
766
  }
712
- const He = 703025676, Ye = 814454131, Ke = 972460562, $e = 976255570, je = 1368629611, Xe = 1479280922, ze = 1533537016, We = 2274386296, Je = 2603556958, qe = 2885165957, Qe = 3568439632;
713
- function Ze(t) {
767
+ const qe = 703025676, Qe = 814454131, Ze = 972460562, ts = 976255570, es = 1368629611, ss = 1479280922, rs = 1533537016, ns = 2274386296, is = 2603556958, os = 2885165957, as = 3568439632;
768
+ function ls(t) {
714
769
  const e = {};
715
- return Ut(e), e;
770
+ return Ct(e), e;
716
771
  }
717
- function Ut(t) {
772
+ function Ct(t) {
718
773
  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;
719
774
  }
720
- function ts(t, e) {
721
- const s = e ?? Ze();
722
- return Ut(s), es(t, s), s;
775
+ function Is(t, e) {
776
+ const s = e ?? ls();
777
+ return Ct(s), cs(t, s), s;
723
778
  }
724
- function es(t, e) {
779
+ function cs(t, e) {
725
780
  let s;
726
781
  for (; (s = t.next()) !== null; )
727
782
  switch (s.fieldId) {
728
- case He: {
783
+ case qe: {
729
784
  if (s.isNull) throw new Error();
730
785
  e.ResultTypeName = s.asString();
731
786
  break;
732
787
  }
733
- case Ye: {
788
+ case Qe: {
734
789
  if (s.isNull) throw new Error();
735
790
  e.FunctionName = s.asString();
736
791
  break;
737
792
  }
738
- case Ke: {
793
+ case Ze: {
739
794
  if (s.isNull) throw new Error();
740
795
  e.EnumerableItemTypeName = s.asString();
741
796
  break;
742
797
  }
743
- case $e: {
798
+ case ts: {
744
799
  if (s.isNull) throw new Error();
745
800
  e.FunctionId = s.asGuid();
746
801
  break;
747
802
  }
748
- case je: {
803
+ case es: {
749
804
  if (s.isNull) throw new Error();
750
805
  e.Description = s.asString();
751
806
  break;
752
807
  }
753
- case Xe: {
808
+ case ss: {
754
809
  if (s.isNull) throw new Error();
755
810
  e.IsCancellable = s.asBool();
756
811
  break;
757
812
  }
758
- case ze: {
813
+ case rs: {
759
814
  if (s.isNull) throw new Error();
760
815
  e.RequiresInstance = s.asBool();
761
816
  break;
762
817
  }
763
- case We: {
818
+ case ns: {
764
819
  if (s.isNull) throw new Error();
765
820
  e.LlmInlineResult = s.asBool();
766
821
  break;
767
822
  }
768
- case Je: {
823
+ case is: {
769
824
  if (s.isNull) throw new Error();
770
825
  e.IsEnumerable = s.asBool();
771
826
  break;
772
827
  }
773
- case qe: {
828
+ case os: {
774
829
  if (s.isNull) throw new Error();
775
- e.Parameters = ss(s.asArray());
830
+ e.Parameters = Es(s.asArray());
776
831
  break;
777
832
  }
778
- case Qe: {
833
+ case as: {
779
834
  if (s.isNull) throw new Error();
780
835
  e.LlmCallOnlyOnce = s.asBool();
781
836
  break;
782
837
  }
783
838
  }
784
839
  }
785
- function ss(t) {
840
+ function Es(t) {
786
841
  const e = [];
787
842
  let s;
788
843
  for (; (s = t.next()) !== null; )
789
- e.push(fs(s.asObject()));
844
+ e.push(ws(s.asObject()));
790
845
  return e;
791
846
  }
792
- const rs = 607861992, ns = 894485888, is = 972460562, os = 1368629611, as = 1883521406, ls = 2603556958, Is = 3609695522, cs = 4075263697, Es = 4257460908;
793
- function _s(t) {
847
+ const _s = 607861992, fs = 894485888, hs = 972460562, us = 1368629611, Ts = 1883521406, Ns = 2603556958, As = 3609695522, ds = 4075263697, Ss = 4257460908;
848
+ function ys(t) {
794
849
  const e = {};
795
850
  return Dt(e), e;
796
851
  }
797
852
  function Dt(t) {
798
853
  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;
799
854
  }
800
- function fs(t, e) {
801
- const s = e ?? _s();
802
- return Dt(s), hs(t, s), s;
855
+ function ws(t, e) {
856
+ const s = e ?? ys();
857
+ return Dt(s), Cs(t, s), s;
803
858
  }
804
- function hs(t, e) {
859
+ function Cs(t, e) {
805
860
  let s;
806
861
  for (; (s = t.next()) !== null; )
807
862
  switch (s.fieldId) {
808
- case rs: {
863
+ case _s: {
809
864
  if (s.isNull) throw new Error();
810
865
  e.HasDefaultValue = s.asBool();
811
866
  break;
812
867
  }
813
- case ns: {
868
+ case fs: {
814
869
  if (s.isNull) throw new Error();
815
870
  e.DefaultValueJson = s.asString();
816
871
  break;
817
872
  }
818
- case is: {
873
+ case hs: {
819
874
  if (s.isNull) throw new Error();
820
875
  e.EnumerableItemTypeName = s.asString();
821
876
  break;
822
877
  }
823
- case os: {
878
+ case us: {
824
879
  if (s.isNull) throw new Error();
825
880
  e.Description = s.asString();
826
881
  break;
827
882
  }
828
- case as: {
883
+ case Ts: {
829
884
  if (s.isNull) throw new Error();
830
885
  e.DefaultValueData = s.asBinary();
831
886
  break;
832
887
  }
833
- case ls: {
888
+ case Ns: {
834
889
  if (s.isNull) throw new Error();
835
890
  e.IsEnumerable = s.asBool();
836
891
  break;
837
892
  }
838
- case Is: {
893
+ case As: {
839
894
  if (s.isNull) throw new Error();
840
895
  e.TypeName = s.asString();
841
896
  break;
842
897
  }
843
- case cs: {
898
+ case ds: {
844
899
  if (s.isNull) throw new Error();
845
900
  e.ParameterName = s.asString();
846
901
  break;
847
902
  }
848
- case Es: {
903
+ case Ss: {
849
904
  if (s.isNull) throw new Error();
850
905
  e.ParameterIndex = s.asInt32();
851
906
  break;
852
907
  }
853
908
  }
854
909
  }
855
- const us = 3167053791, Ts = 3342364356, Ns = 3612929027;
856
- function Rt(t) {
910
+ const Ds = 3167053791, Us = 3342364356, Rs = 3612929027;
911
+ function Ut(t) {
857
912
  const e = {};
858
- return Lt(e), e;
913
+ return Rt(e), e;
859
914
  }
860
- function Lt(t) {
861
- return t.Category = "", t.Type = Nt.Face, t.FaceBlendshapes = [], t;
915
+ function Rt(t) {
916
+ return t.Category = "", t.Type = ut.Face, t.FaceBlendshapes = [], t;
862
917
  }
863
- function As(t, e) {
864
- const s = e ?? Rt();
865
- return Lt(s), Ss(t, s), s;
918
+ function ms(t, e) {
919
+ const s = e ?? Ut();
920
+ return Rt(s), Ls(t, s), s;
866
921
  }
867
- function Ss(t, e) {
922
+ function Ls(t, e) {
868
923
  let s;
869
924
  for (; (s = t.next()) !== null; )
870
925
  switch (s.fieldId) {
871
- case us: {
926
+ case Ds: {
872
927
  if (s.isNull) throw new Error();
873
928
  e.Type = s.asInt32();
874
929
  break;
875
930
  }
876
- case Ts: {
931
+ case Us: {
877
932
  if (s.isNull) throw new Error();
878
- e.FaceBlendshapes = ds(s.asArray());
933
+ e.FaceBlendshapes = Os(s.asArray());
879
934
  break;
880
935
  }
881
- case Ns: {
936
+ case Rs: {
882
937
  if (s.isNull) throw new Error();
883
938
  e.Category = s.asString();
884
939
  break;
885
940
  }
886
941
  }
887
942
  }
888
- function ds(t) {
943
+ function Os(t) {
889
944
  const e = [];
890
945
  let s;
891
946
  for (; (s = t.next()) !== null; )
892
947
  e.push(s.asString());
893
948
  return e;
894
949
  }
895
- const ys = 3612929027;
950
+ const gs = 3612929027;
896
951
  function mt(t) {
897
952
  const e = {};
898
- return Ot(e), e;
953
+ return Lt(e), e;
899
954
  }
900
- function Ot(t) {
955
+ function Lt(t) {
901
956
  return t.Category = "", t;
902
957
  }
903
- function Cs(t, e) {
958
+ function Ps(t, e) {
904
959
  const s = e ?? mt();
905
- return Ot(s), ws(t, s), s;
960
+ return Lt(s), bs(t, s), s;
906
961
  }
907
- function ws(t, e) {
962
+ function bs(t, e) {
908
963
  let s;
909
964
  for (; (s = t.next()) !== null; )
910
965
  switch (s.fieldId) {
911
- case ys: {
966
+ case gs: {
912
967
  if (s.isNull) throw new Error();
913
968
  e.Category = s.asString();
914
969
  break;
915
970
  }
916
971
  }
917
972
  }
918
- const Us = 1368629611, Ds = 2950031986, Rs = 3284746250, Ls = 4065070594;
919
- function gt(t) {
973
+ const Fs = 164808083, ps = 1368629611, vs = 2739413426, Ms = 2768375929, ks = 2950031986, Vs = 3284746250, Gs = 4065070594;
974
+ function Ot(t) {
920
975
  const e = {};
921
- return Pt(e), e;
976
+ return gt(e), e;
922
977
  }
923
- function Pt(t) {
924
- return t.Description = "", t.Codec = St.H264, t.Width = 0, t.Height = 0, t;
978
+ function gt(t) {
979
+ return t.Description = "", t.Codec = Nt.H264, t.Width = 0, t.Height = 0, t.Framerate = 30, t.Bitrate = 0, t.IsHardwareAccelerated = !1, t;
925
980
  }
926
- function ms(t, e) {
927
- const s = e ?? gt();
928
- return Pt(s), Os(t, s), s;
981
+ function Bs(t, e) {
982
+ const s = e ?? Ot();
983
+ return gt(s), xs(t, s), s;
929
984
  }
930
- function Os(t, e) {
985
+ function xs(t, e) {
931
986
  let s;
932
987
  for (; (s = t.next()) !== null; )
933
988
  switch (s.fieldId) {
934
- case Us: {
989
+ case Fs: {
990
+ if (s.isNull) throw new Error();
991
+ e.Framerate = s.asInt32();
992
+ break;
993
+ }
994
+ case ps: {
935
995
  if (s.isNull) throw new Error();
936
996
  e.Description = s.asString();
937
997
  break;
938
998
  }
939
- case Ds: {
999
+ case vs: {
1000
+ if (s.isNull) throw new Error();
1001
+ e.IsHardwareAccelerated = s.asBool();
1002
+ break;
1003
+ }
1004
+ case Ms: {
1005
+ if (s.isNull) throw new Error();
1006
+ e.Bitrate = s.asInt32();
1007
+ break;
1008
+ }
1009
+ case ks: {
940
1010
  if (s.isNull) throw new Error();
941
1011
  e.Height = s.asInt32();
942
1012
  break;
943
1013
  }
944
- case Rs: {
1014
+ case Vs: {
945
1015
  if (s.isNull) throw new Error();
946
1016
  e.Codec = s.asInt32();
947
1017
  break;
948
1018
  }
949
- case Ls: {
1019
+ case Gs: {
950
1020
  if (s.isNull) throw new Error();
951
1021
  e.Width = s.asInt32();
952
1022
  break;
953
1023
  }
954
1024
  }
955
1025
  }
956
- const gs = 3, Ps = 65539, bs = 693643444, ps = 1144553441, Fs = 1497620243, vs = 1559330978, Ms = 1999510636, Vs = 2277643855, ks = 2469008121, Gs = 3219210453, Bs = 3678477544, xs = 3696445035, Hs = 3707543140, Ys = 3712281496, Ks = 3823842552, $s = 3895362455, js = 3897397815, Xs = 4225107827;
957
- function zs(t) {
1026
+ const Hs = 3, Ys = 65539, $s = 693643444, Ks = 1144553441, js = 1497620243, Xs = 1559330978, zs = 1999510636, Ws = 2277643855, Js = 2469008121, qs = 2589786682, Qs = 3219210453, Zs = 3678477544, tr = 3696445035, er = 3707543140, sr = 3712281496, rr = 3823842552, nr = 3895362455, ir = 3897397815, or = 4225107827;
1027
+ function ar(t) {
958
1028
  const e = {};
959
- return bt(e), e;
1029
+ return Pt(e), e;
960
1030
  }
961
- function bt(t) {
962
- return t.Clients = /* @__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.ChannelInstanceId = "", t.FirstUserId = "", t.ChannelUrl = "", t.ChannelId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.SessionId = "", t.Functions = /* @__PURE__ */ Object.create(null), t;
1031
+ function Pt(t) {
1032
+ return t.Clients = /* @__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.ChannelInstanceId = "", t.FirstUserId = "", t.ChannelUrl = "", t.ChannelId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.SessionId = "", t.IsGitSourceMode = !1, t.Functions = /* @__PURE__ */ Object.create(null), t;
963
1033
  }
964
- function Ws(t, e) {
965
- const s = O.create(t);
966
- return Js(s, e);
1034
+ function lr(t, e) {
1035
+ const s = L.create(t);
1036
+ return Ir(s, e);
967
1037
  }
968
- function Js(t, e) {
969
- const s = e ?? zs();
970
- return bt(s), qs(t, s), s;
1038
+ function Ir(t, e) {
1039
+ const s = e ?? ar();
1040
+ return Pt(s), cr(t, s), s;
971
1041
  }
972
- function qs(t, e) {
1042
+ function cr(t, e) {
973
1043
  let s;
974
1044
  for (; (s = t.next()) !== null; )
975
1045
  switch (s.fieldId) {
976
- case bs: {
1046
+ case $s: {
977
1047
  if (s.isNull) throw new Error();
978
1048
  e.FirstUserId = s.asString();
979
1049
  break;
980
1050
  }
981
- case ps: {
1051
+ case Ks: {
982
1052
  if (s.isNull) throw new Error();
983
- e.Clients = Zs(s.asDictionary());
1053
+ e.Clients = _r(s.asDictionary());
984
1054
  break;
985
1055
  }
986
- case Fs: {
1056
+ case js: {
987
1057
  if (s.isNull) throw new Error();
988
- e.TrackingStreams = tr(s.asDictionary());
1058
+ e.TrackingStreams = fr(s.asDictionary());
989
1059
  break;
990
1060
  }
991
- case vs: {
1061
+ case Xs: {
992
1062
  if (s.isNull) throw new Error();
993
1063
  e.ChannelId = s.asString();
994
1064
  break;
995
1065
  }
996
- case Ms: {
1066
+ case zs: {
997
1067
  if (s.isNull) throw new Error();
998
1068
  e.SessionId = s.asString();
999
1069
  break;
1000
1070
  }
1001
- case Vs: {
1071
+ case Ws: {
1002
1072
  if (s.isNull) throw new Error();
1003
1073
  e.ChannelUrl = s.asString();
1004
1074
  break;
1005
1075
  }
1006
- case ks: {
1076
+ case Js: {
1007
1077
  if (s.isNull) throw new Error();
1008
1078
  e.ChannelName = s.asString();
1009
1079
  break;
1010
1080
  }
1011
- case Gs: {
1081
+ case qs: {
1082
+ if (s.isNull) throw new Error();
1083
+ e.IsGitSourceMode = s.asBool();
1084
+ break;
1085
+ }
1086
+ case Qs: {
1012
1087
  if (s.isNull) throw new Error();
1013
1088
  e.OrganisationName = s.asString();
1014
1089
  break;
1015
1090
  }
1016
- case Bs: {
1091
+ case Zs: {
1017
1092
  if (s.isNull) throw new Error();
1018
- e.Functions = er(s.asDictionary());
1093
+ e.Functions = hr(s.asDictionary());
1019
1094
  break;
1020
1095
  }
1021
- case xs: {
1096
+ case tr: {
1022
1097
  if (s.isNull) throw new Error();
1023
- e.UIStreams = sr(s.asDictionary());
1098
+ e.UIStreams = ur(s.asDictionary());
1024
1099
  break;
1025
1100
  }
1026
- case Hs: {
1101
+ case er: {
1027
1102
  if (s.isNull) throw new Error();
1028
1103
  e.SpaceId = s.asString();
1029
1104
  break;
1030
1105
  }
1031
- case Ys: {
1106
+ case sr: {
1032
1107
  if (s.isNull) throw new Error();
1033
1108
  e.PrimaryUserId = s.asString();
1034
1109
  break;
1035
1110
  }
1036
- case Ks: {
1111
+ case rr: {
1037
1112
  if (s.isNull) throw new Error();
1038
1113
  e.ChannelInstanceId = s.asString();
1039
1114
  break;
1040
1115
  }
1041
- case $s: {
1116
+ case nr: {
1042
1117
  if (s.isNull) throw new Error();
1043
- e.AudioStreams = rr(s.asDictionary());
1118
+ e.AudioStreams = Tr(s.asDictionary());
1044
1119
  break;
1045
1120
  }
1046
- case js: {
1121
+ case ir: {
1047
1122
  if (s.isNull) throw new Error();
1048
- e.VideoStreams = nr(s.asDictionary());
1123
+ e.VideoStreams = Nr(s.asDictionary());
1049
1124
  break;
1050
1125
  }
1051
- case Xs: {
1126
+ case or: {
1052
1127
  if (s.isNull) throw new Error();
1053
1128
  e.SpaceName = s.asString();
1054
1129
  break;
1055
1130
  }
1056
1131
  }
1057
1132
  }
1058
- function Qs(t, e) {
1059
- const s = J(t, Ps, gs);
1060
- return Ws(s, e);
1133
+ function Er(t, e) {
1134
+ const s = $(t, Ys, Hs);
1135
+ return lr(s, e);
1061
1136
  }
1062
- function Zs(t) {
1137
+ function _r(t) {
1063
1138
  const e = /* @__PURE__ */ Object.create(null);
1064
1139
  let s;
1065
1140
  for (; (s = t.next()) !== null; ) {
1066
1141
  const r = s.key.asInt32();
1067
- e[r] = Ge(s.value.asObject());
1142
+ e[r] = ze(s.value.asObject());
1068
1143
  }
1069
1144
  return e;
1070
1145
  }
1071
- function tr(t) {
1146
+ function fr(t) {
1072
1147
  const e = /* @__PURE__ */ Object.create(null);
1073
1148
  let s;
1074
1149
  for (; (s = t.next()) !== null; ) {
1075
1150
  const r = s.key.asString();
1076
- e[r] = br(s.value.asObject());
1151
+ e[r] = Kr(s.value.asObject());
1077
1152
  }
1078
1153
  return e;
1079
1154
  }
1080
- function er(t) {
1155
+ function hr(t) {
1081
1156
  const e = /* @__PURE__ */ Object.create(null);
1082
1157
  let s;
1083
1158
  for (; (s = t.next()) !== null; ) {
1084
1159
  const r = s.key.asInt32();
1085
- e[r] = ir(s.value.asArray());
1160
+ e[r] = Ar(s.value.asArray());
1086
1161
  }
1087
1162
  return e;
1088
1163
  }
1089
- function sr(t) {
1164
+ function ur(t) {
1090
1165
  const e = /* @__PURE__ */ Object.create(null);
1091
1166
  let s;
1092
1167
  for (; (s = t.next()) !== null; ) {
1093
1168
  const r = s.key.asString();
1094
- e[r] = Er(s.value.asObject());
1169
+ e[r] = Dr(s.value.asObject());
1095
1170
  }
1096
1171
  return e;
1097
1172
  }
1098
- function rr(t) {
1173
+ function Tr(t) {
1099
1174
  const e = /* @__PURE__ */ Object.create(null);
1100
1175
  let s;
1101
1176
  for (; (s = t.next()) !== null; ) {
1102
1177
  const r = s.key.asString();
1103
- e[r] = Ar(s.value.asObject());
1178
+ e[r] = Pr(s.value.asObject());
1104
1179
  }
1105
1180
  return e;
1106
1181
  }
1107
- function nr(t) {
1182
+ function Nr(t) {
1108
1183
  const e = /* @__PURE__ */ Object.create(null);
1109
1184
  let s;
1110
1185
  for (; (s = t.next()) !== null; ) {
1111
1186
  const r = s.key.asString();
1112
- e[r] = Dr(s.value.asObject());
1187
+ e[r] = Vr(s.value.asObject());
1113
1188
  }
1114
1189
  return e;
1115
1190
  }
1116
- function ir(t) {
1191
+ function Ar(t) {
1117
1192
  const e = [];
1118
1193
  let s;
1119
1194
  for (; (s = t.next()) !== null; )
1120
- e.push(ts(s.asObject()));
1195
+ e.push(Is(s.asObject()));
1121
1196
  return e;
1122
1197
  }
1123
- const or = 161083277, ar = 325678206, lr = 3469892363, Ir = 3645544153;
1124
- function cr(t) {
1198
+ const dr = 161083277, Sr = 325678206, yr = 3469892363, wr = 3645544153;
1199
+ function Cr(t) {
1125
1200
  const e = {};
1126
- return pt(e), e;
1201
+ return bt(e), e;
1127
1202
  }
1128
- function pt(t) {
1203
+ function bt(t) {
1129
1204
  return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = mt(), t;
1130
1205
  }
1131
- function Er(t, e) {
1132
- const s = e ?? cr();
1133
- return pt(s), _r(t, s), s;
1206
+ function Dr(t, e) {
1207
+ const s = e ?? Cr();
1208
+ return bt(s), Ur(t, s), s;
1134
1209
  }
1135
- function _r(t, e) {
1210
+ function Ur(t, e) {
1136
1211
  let s;
1137
1212
  for (; (s = t.next()) !== null; )
1138
1213
  switch (s.fieldId) {
1139
- case or: {
1214
+ case dr: {
1140
1215
  if (s.isNull) throw new Error();
1141
1216
  e.StreamId = s.asString();
1142
1217
  break;
1143
1218
  }
1144
- case ar: {
1219
+ case Sr: {
1145
1220
  if (s.isNull) throw new Error();
1146
1221
  e.ClientSessionId = s.asInt32();
1147
1222
  break;
1148
1223
  }
1149
- case lr: {
1224
+ case yr: {
1150
1225
  if (s.isNull) throw new Error();
1151
1226
  e.TrackId = s.asInt32();
1152
1227
  break;
1153
1228
  }
1154
- case Ir: {
1229
+ case wr: {
1155
1230
  if (s.isNull) throw new Error();
1156
- e.Info = Cs(s.asObject());
1231
+ e.Info = Ps(s.asObject());
1157
1232
  break;
1158
1233
  }
1159
1234
  }
1160
1235
  }
1161
- const fr = 161083277, hr = 325678206, ur = 3469892363, Tr = 3645544153;
1162
- function Nr(t) {
1236
+ const Rr = 161083277, mr = 325678206, Lr = 3469892363, Or = 3645544153;
1237
+ function gr(t) {
1163
1238
  const e = {};
1164
1239
  return Ft(e), e;
1165
1240
  }
1166
1241
  function Ft(t) {
1167
- return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = yt(), t;
1242
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = dt(), t;
1168
1243
  }
1169
- function Ar(t, e) {
1170
- const s = e ?? Nr();
1171
- return Ft(s), Sr(t, s), s;
1244
+ function Pr(t, e) {
1245
+ const s = e ?? gr();
1246
+ return Ft(s), br(t, s), s;
1172
1247
  }
1173
- function Sr(t, e) {
1248
+ function br(t, e) {
1174
1249
  let s;
1175
1250
  for (; (s = t.next()) !== null; )
1176
1251
  switch (s.fieldId) {
1177
- case fr: {
1252
+ case Rr: {
1178
1253
  if (s.isNull) throw new Error();
1179
1254
  e.StreamId = s.asString();
1180
1255
  break;
1181
1256
  }
1182
- case hr: {
1257
+ case mr: {
1183
1258
  if (s.isNull) throw new Error();
1184
1259
  e.ClientSessionId = s.asInt32();
1185
1260
  break;
1186
1261
  }
1187
- case ur: {
1262
+ case Lr: {
1188
1263
  if (s.isNull) throw new Error();
1189
1264
  e.TrackId = s.asInt32();
1190
1265
  break;
1191
1266
  }
1192
- case Tr: {
1267
+ case Or: {
1193
1268
  if (s.isNull) throw new Error();
1194
- e.Info = _e(s.asObject());
1269
+ e.Info = fe(s.asObject());
1195
1270
  break;
1196
1271
  }
1197
1272
  }
1198
1273
  }
1199
- const dr = 161083277, yr = 325678206, Cr = 3469892363, wr = 3645544153;
1200
- function Ur(t) {
1274
+ const Fr = 161083277, pr = 325678206, vr = 3469892363, Mr = 3645544153;
1275
+ function kr(t) {
1201
1276
  const e = {};
1202
- return vt(e), e;
1277
+ return pt(e), e;
1203
1278
  }
1204
- function vt(t) {
1205
- return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = gt(), t;
1279
+ function pt(t) {
1280
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Ot(), t;
1206
1281
  }
1207
- function Dr(t, e) {
1208
- const s = e ?? Ur();
1209
- return vt(s), Rr(t, s), s;
1282
+ function Vr(t, e) {
1283
+ const s = e ?? kr();
1284
+ return pt(s), Gr(t, s), s;
1210
1285
  }
1211
- function Rr(t, e) {
1286
+ function Gr(t, e) {
1212
1287
  let s;
1213
1288
  for (; (s = t.next()) !== null; )
1214
1289
  switch (s.fieldId) {
1215
- case dr: {
1290
+ case Fr: {
1216
1291
  if (s.isNull) throw new Error();
1217
1292
  e.StreamId = s.asString();
1218
1293
  break;
1219
1294
  }
1220
- case yr: {
1295
+ case pr: {
1221
1296
  if (s.isNull) throw new Error();
1222
1297
  e.ClientSessionId = s.asInt32();
1223
1298
  break;
1224
1299
  }
1225
- case Cr: {
1300
+ case vr: {
1226
1301
  if (s.isNull) throw new Error();
1227
1302
  e.TrackId = s.asInt32();
1228
1303
  break;
1229
1304
  }
1230
- case wr: {
1305
+ case Mr: {
1231
1306
  if (s.isNull) throw new Error();
1232
- e.Info = ms(s.asObject());
1307
+ e.Info = Bs(s.asObject());
1233
1308
  break;
1234
1309
  }
1235
1310
  }
1236
1311
  }
1237
- const Lr = 161083277, mr = 325678206, Or = 3469892363, gr = 3645544153;
1238
- function Pr(t) {
1312
+ const Br = 161083277, xr = 325678206, Hr = 3469892363, Yr = 3645544153;
1313
+ function $r(t) {
1239
1314
  const e = {};
1240
- return Mt(e), e;
1315
+ return vt(e), e;
1241
1316
  }
1242
- function Mt(t) {
1243
- return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Rt(), t;
1317
+ function vt(t) {
1318
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Ut(), t;
1244
1319
  }
1245
- function br(t, e) {
1246
- const s = e ?? Pr();
1247
- return Mt(s), pr(t, s), s;
1320
+ function Kr(t, e) {
1321
+ const s = e ?? $r();
1322
+ return vt(s), jr(t, s), s;
1248
1323
  }
1249
- function pr(t, e) {
1324
+ function jr(t, e) {
1250
1325
  let s;
1251
1326
  for (; (s = t.next()) !== null; )
1252
1327
  switch (s.fieldId) {
1253
- case Lr: {
1328
+ case Br: {
1254
1329
  if (s.isNull) throw new Error();
1255
1330
  e.StreamId = s.asString();
1256
1331
  break;
1257
1332
  }
1258
- case mr: {
1333
+ case xr: {
1259
1334
  if (s.isNull) throw new Error();
1260
1335
  e.ClientSessionId = s.asInt32();
1261
1336
  break;
1262
1337
  }
1263
- case Or: {
1338
+ case Hr: {
1264
1339
  if (s.isNull) throw new Error();
1265
1340
  e.TrackId = s.asInt32();
1266
1341
  break;
1267
1342
  }
1268
- case gr: {
1343
+ case Yr: {
1269
1344
  if (s.isNull) throw new Error();
1270
- e.Info = As(s.asObject());
1345
+ e.Info = ms(s.asObject());
1271
1346
  break;
1272
1347
  }
1273
1348
  }
1274
1349
  }
1275
- const Fr = 1405462580, vr = 2968276160;
1276
- function Mr(t) {
1350
+ const Xr = 1405462580, zr = 2968276160;
1351
+ function Wr(t) {
1277
1352
  const e = {};
1278
- return Vt(e), e;
1353
+ return Mt(e), e;
1279
1354
  }
1280
- function Vt(t) {
1355
+ function Mt(t) {
1281
1356
  return t.MimeType = "", t.Value = new Uint8Array(0), t;
1282
1357
  }
1283
- function Vr(t, e) {
1284
- const s = e ?? Mr();
1285
- return Vt(s), kr(t, s), s;
1358
+ function Jr(t, e) {
1359
+ const s = e ?? Wr();
1360
+ return Mt(s), qr(t, s), s;
1286
1361
  }
1287
- function kr(t, e) {
1362
+ function qr(t, e) {
1288
1363
  let s;
1289
1364
  for (; (s = t.next()) !== null; )
1290
1365
  switch (s.fieldId) {
1291
- case Fr: {
1366
+ case Xr: {
1292
1367
  if (s.isNull) throw new Error();
1293
1368
  e.Value = s.asBinary();
1294
1369
  break;
1295
1370
  }
1296
- case vr: {
1371
+ case zr: {
1297
1372
  if (s.isNull) throw new Error();
1298
1373
  e.MimeType = s.asString();
1299
1374
  break;
1300
1375
  }
1301
1376
  }
1302
1377
  }
1303
- const Gr = 1, Br = 2097188, xr = 979822885, Hr = 2374537704;
1304
- function Yr(t) {
1378
+ const Qr = 1, Zr = 2097188, tn = 979822885, en = 2374537704;
1379
+ function sn(t) {
1305
1380
  const e = {};
1306
1381
  return kt(e), e;
1307
1382
  }
1308
1383
  function kt(t) {
1309
1384
  return t.StyleId = "", t.Style = /* @__PURE__ */ Object.create(null), t;
1310
1385
  }
1311
- function Kr(t, e) {
1312
- const s = O.create(t);
1313
- return $r(s, e);
1386
+ function rn(t, e) {
1387
+ const s = L.create(t);
1388
+ return nn(s, e);
1314
1389
  }
1315
- function $r(t, e) {
1316
- const s = e ?? Yr();
1317
- return kt(s), jr(t, s), s;
1390
+ function nn(t, e) {
1391
+ const s = e ?? sn();
1392
+ return kt(s), on(t, s), s;
1318
1393
  }
1319
- function jr(t, e) {
1394
+ function on(t, e) {
1320
1395
  let s;
1321
1396
  for (; (s = t.next()) !== null; )
1322
1397
  switch (s.fieldId) {
1323
- case xr: {
1398
+ case tn: {
1324
1399
  if (s.isNull) throw new Error();
1325
1400
  e.StyleId = s.asString();
1326
1401
  break;
1327
1402
  }
1328
- case Hr: {
1403
+ case en: {
1329
1404
  if (s.isNull) throw new Error();
1330
- e.Style = zr(s.asDictionary());
1405
+ e.Style = ln(s.asDictionary());
1331
1406
  break;
1332
1407
  }
1333
1408
  }
1334
1409
  }
1335
- function Xr(t, e) {
1336
- const s = J(t, Br, Gr);
1337
- return Kr(s, e);
1410
+ function an(t, e) {
1411
+ const s = $(t, Zr, Qr);
1412
+ return rn(s, e);
1338
1413
  }
1339
- function zr(t) {
1414
+ function ln(t) {
1340
1415
  const e = /* @__PURE__ */ Object.create(null);
1341
1416
  let s;
1342
1417
  for (; (s = t.next()) !== null; ) {
@@ -1345,73 +1420,73 @@ function zr(t) {
1345
1420
  }
1346
1421
  return e;
1347
1422
  }
1348
- const Wr = 1, Jr = 2097192, qr = 2136687806;
1349
- function Qr(t) {
1423
+ const In = 1, cn = 2097192, En = 2136687806;
1424
+ function _n(t) {
1350
1425
  const e = {};
1351
- return Gt(e), e;
1426
+ return Vt(e), e;
1352
1427
  }
1353
- function Gt(t) {
1428
+ function Vt(t) {
1354
1429
  return t.Styles = [], t;
1355
1430
  }
1356
- function Zr(t, e) {
1357
- const s = O.create(t);
1358
- return tn(s, e);
1431
+ function fn(t, e) {
1432
+ const s = L.create(t);
1433
+ return hn(s, e);
1359
1434
  }
1360
- function tn(t, e) {
1361
- const s = e ?? Qr();
1362
- return Gt(s), en(t, s), s;
1435
+ function hn(t, e) {
1436
+ const s = e ?? _n();
1437
+ return Vt(s), un(t, s), s;
1363
1438
  }
1364
- function en(t, e) {
1439
+ function un(t, e) {
1365
1440
  let s;
1366
1441
  for (; (s = t.next()) !== null; )
1367
1442
  switch (s.fieldId) {
1368
- case qr: {
1443
+ case En: {
1369
1444
  if (s.isNull) throw new Error();
1370
- e.Styles = rn(s.asArray());
1445
+ e.Styles = Nn(s.asArray());
1371
1446
  break;
1372
1447
  }
1373
1448
  }
1374
1449
  }
1375
- function sn(t, e) {
1376
- const s = J(t, Jr, Wr);
1377
- return Zr(s, e);
1450
+ function Tn(t, e) {
1451
+ const s = $(t, cn, In);
1452
+ return fn(s, e);
1378
1453
  }
1379
- function rn(t) {
1454
+ function Nn(t) {
1380
1455
  const e = [];
1381
1456
  let s;
1382
1457
  for (; (s = t.next()) !== null; )
1383
- e.push(ln(s.asObject()));
1458
+ e.push(yn(s.asObject()));
1384
1459
  return e;
1385
1460
  }
1386
- const nn = 979822885, on = 2374537704;
1387
- function an(t) {
1461
+ const An = 979822885, dn = 2374537704;
1462
+ function Sn(t) {
1388
1463
  const e = {};
1389
- return Bt(e), e;
1464
+ return Gt(e), e;
1390
1465
  }
1391
- function Bt(t) {
1466
+ function Gt(t) {
1392
1467
  return t.StyleId = "", t.Style = /* @__PURE__ */ Object.create(null), t;
1393
1468
  }
1394
- function ln(t, e) {
1395
- const s = e ?? an();
1396
- return Bt(s), In(t, s), s;
1469
+ function yn(t, e) {
1470
+ const s = e ?? Sn();
1471
+ return Gt(s), wn(t, s), s;
1397
1472
  }
1398
- function In(t, e) {
1473
+ function wn(t, e) {
1399
1474
  let s;
1400
1475
  for (; (s = t.next()) !== null; )
1401
1476
  switch (s.fieldId) {
1402
- case nn: {
1477
+ case An: {
1403
1478
  if (s.isNull) throw new Error();
1404
1479
  e.StyleId = s.asString();
1405
1480
  break;
1406
1481
  }
1407
- case on: {
1482
+ case dn: {
1408
1483
  if (s.isNull) throw new Error();
1409
- e.Style = cn(s.asDictionary());
1484
+ e.Style = Cn(s.asDictionary());
1410
1485
  break;
1411
1486
  }
1412
1487
  }
1413
1488
  }
1414
- function cn(t) {
1489
+ function Cn(t) {
1415
1490
  const e = /* @__PURE__ */ Object.create(null);
1416
1491
  let s;
1417
1492
  for (; (s = t.next()) !== null; ) {
@@ -1420,52 +1495,90 @@ function cn(t) {
1420
1495
  }
1421
1496
  return e;
1422
1497
  }
1423
- const En = 1, _n = 2097190, fn = 425183262, hn = 653781469;
1424
- function un(t) {
1498
+ const Dn = 1, Un = 2097193, Rn = 1415642792;
1499
+ function mn(t) {
1500
+ const e = {};
1501
+ return Bt(e), e;
1502
+ }
1503
+ function Bt(t) {
1504
+ return t.StyleIds = [], t;
1505
+ }
1506
+ function Ln(t, e) {
1507
+ const s = L.create(t);
1508
+ return On(s, e);
1509
+ }
1510
+ function On(t, e) {
1511
+ const s = e ?? mn();
1512
+ return Bt(s), gn(t, s), s;
1513
+ }
1514
+ function gn(t, e) {
1515
+ let s;
1516
+ for (; (s = t.next()) !== null; )
1517
+ switch (s.fieldId) {
1518
+ case Rn: {
1519
+ if (s.isNull) throw new Error();
1520
+ e.StyleIds = bn(s.asArray());
1521
+ break;
1522
+ }
1523
+ }
1524
+ }
1525
+ function Pn(t, e) {
1526
+ const s = $(t, Un, Dn);
1527
+ return Ln(s, e);
1528
+ }
1529
+ function bn(t) {
1530
+ const e = [];
1531
+ let s;
1532
+ for (; (s = t.next()) !== null; )
1533
+ e.push(s.asString());
1534
+ return e;
1535
+ }
1536
+ const Fn = 1, pn = 2097190, vn = 425183262, Mn = 653781469;
1537
+ function kn(t) {
1425
1538
  const e = {};
1426
1539
  return xt(e), e;
1427
1540
  }
1428
1541
  function xt(t) {
1429
1542
  return t.Json = "", t.Payloads = /* @__PURE__ */ Object.create(null), t;
1430
1543
  }
1431
- function Tn(t, e) {
1432
- const s = O.create(t);
1433
- return Nn(s, e);
1544
+ function Vn(t, e) {
1545
+ const s = L.create(t);
1546
+ return Gn(s, e);
1434
1547
  }
1435
- function Nn(t, e) {
1436
- const s = e ?? un();
1437
- return xt(s), An(t, s), s;
1548
+ function Gn(t, e) {
1549
+ const s = e ?? kn();
1550
+ return xt(s), Bn(t, s), s;
1438
1551
  }
1439
- function An(t, e) {
1552
+ function Bn(t, e) {
1440
1553
  let s;
1441
1554
  for (; (s = t.next()) !== null; )
1442
1555
  switch (s.fieldId) {
1443
- case fn: {
1556
+ case vn: {
1444
1557
  if (s.isNull) throw new Error();
1445
1558
  e.Json = s.asString();
1446
1559
  break;
1447
1560
  }
1448
- case hn: {
1561
+ case Mn: {
1449
1562
  if (s.isNull) throw new Error();
1450
- e.Payloads = dn(s.asDictionary());
1563
+ e.Payloads = Hn(s.asDictionary());
1451
1564
  break;
1452
1565
  }
1453
1566
  }
1454
1567
  }
1455
- function Sn(t, e) {
1456
- const s = J(t, _n, En);
1457
- return Tn(s, e);
1568
+ function xn(t, e) {
1569
+ const s = $(t, pn, Fn);
1570
+ return Vn(s, e);
1458
1571
  }
1459
- function dn(t) {
1572
+ function Hn(t) {
1460
1573
  const e = /* @__PURE__ */ Object.create(null);
1461
1574
  let s;
1462
1575
  for (; (s = t.next()) !== null; ) {
1463
1576
  const r = s.key.asString();
1464
- e[r] = Vr(s.value.asObject());
1577
+ e[r] = Jr(s.value.asObject());
1465
1578
  }
1466
1579
  return e;
1467
1580
  }
1468
- function C(t) {
1581
+ function y(t) {
1469
1582
  return typeof t == "object" && t !== null && !Array.isArray(t);
1470
1583
  }
1471
1584
  function Ht(t) {
@@ -1504,25 +1617,25 @@ function ot(t, e) {
1504
1617
  throw new Error(`Invalid or missing node type for ${s}`);
1505
1618
  let a = {};
1506
1619
  if (n != null) {
1507
- if (!C(n))
1620
+ if (!y(n))
1508
1621
  throw new Error(`Invalid props for node ${s}`);
1509
1622
  a = Ht(n);
1510
1623
  }
1511
- let l = [];
1512
- Array.isArray(i) && (l = i.map(
1624
+ let I = [];
1625
+ Array.isArray(i) && (I = i.map(
1513
1626
  (c, E) => ot(c ?? {}, `${e}.children[${E}]`)
1514
1627
  ));
1515
- const I = Yt(o, e, s, !1);
1628
+ const l = Yt(o, e, s, !1);
1516
1629
  return {
1517
1630
  id: s,
1518
1631
  type: r,
1519
1632
  props: a,
1520
- children: l,
1521
- styleIds: I ?? []
1633
+ children: I,
1634
+ styleIds: l ?? []
1522
1635
  };
1523
1636
  }
1524
- function yn(t, e) {
1525
- if (!C(t))
1637
+ function Yn(t, e) {
1638
+ if (!y(t))
1526
1639
  throw new Error(`Invalid text delta at ${e}`);
1527
1640
  const s = t.NodeId, r = t.PropertyName, n = t.Start, i = t.End, o = t.InsertedText;
1528
1641
  if (typeof s != "string" || s.length === 0)
@@ -1548,65 +1661,97 @@ function yn(t, e) {
1548
1661
  insertedText: o
1549
1662
  };
1550
1663
  }
1551
- function Kt(t, e) {
1552
- if (!C(t))
1553
- throw new Error(`Invalid UI diff node at ${e}`);
1554
- const s = t.Id, r = t.Type, n = t.StyleIds;
1664
+ function $n(t, e) {
1665
+ if (!y(t))
1666
+ throw new Error(`Invalid child insert at ${e}`);
1667
+ const s = t.Index, r = t.Node;
1668
+ if (typeof s != "number" || !Number.isFinite(s))
1669
+ throw new Error(`Invalid child insert index at ${e}`);
1670
+ if (!y(r))
1671
+ throw new Error(`Invalid child insert node at ${e}`);
1672
+ return {
1673
+ index: s,
1674
+ node: ot(r, `${e}.node`)
1675
+ };
1676
+ }
1677
+ function Kn(t, e) {
1678
+ if (!y(t))
1679
+ throw new Error(`Invalid child move at ${e}`);
1680
+ const s = t.NodeId, r = t.FromIndex, n = t.ToIndex;
1555
1681
  if (typeof s != "string" || s.length === 0)
1556
- throw new Error(`Invalid diff id at ${e}`);
1557
- if (typeof r != "string" || r.length === 0)
1558
- throw new Error(`Invalid diff type for ${s}`);
1559
- const i = Array.isArray(t.Added) ? t.Added.map(
1560
- (E, _) => ot(E ?? {}, `${e}.added[${_}]`)
1561
- ) : [], o = [];
1562
- Array.isArray(t.Removed) && t.Removed.forEach((E, _) => {
1563
- if (typeof E == "string") {
1564
- o.push(E);
1565
- return;
1566
- }
1567
- if (C(E) && typeof E.Id == "string") {
1568
- o.push(E.Id);
1569
- return;
1570
- }
1571
- throw new Error(`Invalid removed node at ${e}.removed[${_}]`);
1572
- });
1573
- const a = Array.isArray(t.Updated) ? t.Updated.map(
1574
- (E, _) => Kt(E ?? {}, `${e}.updated[${_}]`)
1575
- ) : [], l = /* @__PURE__ */ new Map();
1576
- if (C(t.ChangedProps))
1577
- for (const [E, _] of Object.entries(t.ChangedProps)) {
1578
- if (!C(_))
1682
+ throw new Error(`Invalid child move nodeId at ${e}`);
1683
+ if (typeof r != "number" || !Number.isFinite(r))
1684
+ throw new Error(`Invalid child move fromIndex at ${e}`);
1685
+ if (typeof n != "number" || !Number.isFinite(n))
1686
+ throw new Error(`Invalid child move toIndex at ${e}`);
1687
+ return {
1688
+ nodeId: s,
1689
+ fromIndex: r,
1690
+ toIndex: n
1691
+ };
1692
+ }
1693
+ function jn(t, e) {
1694
+ if (!y(t))
1695
+ throw new Error(`Invalid child remove at ${e}`);
1696
+ const s = t.NodeId, r = t.Index;
1697
+ if (typeof s != "string" || s.length === 0)
1698
+ throw new Error(`Invalid child remove nodeId at ${e}`);
1699
+ if (typeof r != "number" || !Number.isFinite(r))
1700
+ throw new Error(`Invalid child remove index at ${e}`);
1701
+ return {
1702
+ nodeId: s,
1703
+ index: r
1704
+ };
1705
+ }
1706
+ function Xn(t, e) {
1707
+ if (!y(t))
1708
+ throw new Error(`Invalid node change at ${e}`);
1709
+ const s = t.nodeId;
1710
+ if (typeof s != "string" || s.length === 0)
1711
+ throw new Error(`Invalid node change nodeId at ${e}`);
1712
+ const r = Array.isArray(t.inserts) ? t.inserts.map(
1713
+ (c, E) => $n(c ?? {}, `${e}.inserts[${E}]`)
1714
+ ) : void 0, n = Array.isArray(t.moves) ? t.moves.map(
1715
+ (c, E) => Kn(c ?? {}, `${e}.moves[${E}]`)
1716
+ ) : void 0, i = Array.isArray(t.removals) ? t.removals.map(
1717
+ (c, E) => jn(c ?? {}, `${e}.removals[${E}]`)
1718
+ ) : void 0;
1719
+ let o;
1720
+ if (y(t.changedProps)) {
1721
+ o = /* @__PURE__ */ new Map();
1722
+ for (const [c, E] of Object.entries(t.changedProps)) {
1723
+ if (!y(E))
1579
1724
  continue;
1580
- const h = _.New;
1581
- h === void 0 ? l.set(E, void 0) : C(h) ? l.set(E, Ht(h)) : l.set(E, h);
1725
+ const _ = E.New;
1726
+ _ === void 0 ? o.set(c, void 0) : y(_) ? o.set(c, Ht(_)) : o.set(c, _);
1582
1727
  }
1583
- const I = Array.isArray(t.TextUpdates) ? t.TextUpdates.map(
1584
- (E, _) => yn(E ?? {}, `${e}.textUpdates[${_}]`)
1585
- ) : [], c = Yt(n, e, s, !0);
1728
+ }
1729
+ const a = Array.isArray(t.textUpdates) ? t.textUpdates.map(
1730
+ (c, E) => Yn(c ?? {}, `${e}.textUpdates[${E}]`)
1731
+ ) : void 0, I = t.styleIds, l = I !== void 0 ? Yt(I, e, s, !0) : void 0;
1586
1732
  return {
1587
- id: s,
1588
- type: r,
1589
- added: i,
1590
- removed: o,
1591
- updated: a,
1592
- changedProps: l,
1593
- textUpdates: I,
1594
- ...c !== void 0 ? { styleIds: c } : {}
1733
+ nodeId: s,
1734
+ ...r && r.length > 0 ? { inserts: r } : {},
1735
+ ...n && n.length > 0 ? { moves: n } : {},
1736
+ ...i && i.length > 0 ? { removals: i } : {},
1737
+ ...o && o.size > 0 ? { changedProps: o } : {},
1738
+ ...a && a.length > 0 ? { textUpdates: a } : {},
1739
+ ...l !== void 0 ? { styleIds: l } : {}
1595
1740
  };
1596
1741
  }
1597
- function Cn(t) {
1742
+ function zn(t) {
1598
1743
  const e = /* @__PURE__ */ new Map();
1599
1744
  for (const [s, r] of Object.entries(t))
1600
1745
  e.set(s, r);
1601
1746
  return e;
1602
1747
  }
1603
- function wn(t, e, s) {
1748
+ function Wn(t, e, s) {
1604
1749
  if (!t || typeof t != "object")
1605
- throw new w("UI update graph is missing");
1750
+ throw new D("UI update graph is missing");
1606
1751
  const r = ot(t, "graph");
1607
1752
  if (r.type !== "root")
1608
- throw new w('UI update root element must have type "root"');
1609
- const n = Dn(r.props, e);
1753
+ throw new D('UI update root element must have type "root"');
1754
+ const n = qn(r.props, e);
1610
1755
  return {
1611
1756
  type: "full",
1612
1757
  version: s,
@@ -1614,55 +1759,57 @@ function wn(t, e, s) {
1614
1759
  metadata: n
1615
1760
  };
1616
1761
  }
1617
- function Un(t, e, s) {
1618
- if (!t || typeof t != "object")
1619
- throw new w("UI diff payload is missing");
1620
- if (!C(e))
1621
- throw new w("UI diff metadata must be an object");
1762
+ function Jn(t, e, s) {
1763
+ if (!Array.isArray(t))
1764
+ throw new D("UI diff changes must be an array");
1765
+ if (!y(e))
1766
+ throw new D("UI diff metadata must be an object");
1622
1767
  const r = e.viewId;
1623
1768
  if (typeof r != "string" || r.length === 0)
1624
- throw new w("UI diff metadata is missing viewId");
1625
- const n = Kt(t, "diff"), i = 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, l = Q(e.optimisticPatch), I = Z(e.optimisticReconcile), c = {
1769
+ throw new D("UI diff metadata is missing viewId");
1770
+ const n = t.map(
1771
+ (E, _) => Xn(E ?? {}, `changes[${_}]`)
1772
+ ), i = 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 = Q(e.optimisticPatch), l = Z(e.optimisticReconcile), c = {
1626
1773
  viewId: r,
1627
1774
  ...i !== void 0 ? { optimisticActionId: i } : {},
1628
1775
  ...o !== void 0 ? { isOptimistic: o } : {},
1629
1776
  ...a !== void 0 ? { isUpdate: a } : {},
1630
- ...l ? { optimisticPatch: l } : {},
1631
- ...I ? { optimisticReconcile: I } : {}
1777
+ ...I ? { optimisticPatch: I } : {},
1778
+ ...l ? { optimisticReconcile: l } : {}
1632
1779
  };
1633
1780
  return {
1634
1781
  type: "diff",
1635
1782
  version: s,
1636
- diff: n,
1783
+ changes: n,
1637
1784
  metadata: c
1638
1785
  };
1639
1786
  }
1640
- function Dn(t, e) {
1787
+ function qn(t, e) {
1641
1788
  const s = t.viewId;
1642
1789
  if (typeof s != "string" || s.length === 0)
1643
- throw new w("UI update root is missing viewId");
1644
- let r = s, n = t.optimisticActionId === null || typeof t.optimisticActionId == "string" ? t.optimisticActionId : void 0, i = typeof t.isOptimistic == "boolean" ? t.isOptimistic : void 0, o = typeof t.isUpdate == "boolean" ? t.isUpdate : void 0, a = Q(t.optimisticPatch), l = Z(t.optimisticReconcile);
1645
- return C(e) && (typeof e.viewId == "string" && e.viewId.length > 0 && (r = e.viewId), (e.optimisticActionId === null || typeof e.optimisticActionId == "string") && (n = e.optimisticActionId), typeof e.isOptimistic == "boolean" && (i = e.isOptimistic), typeof e.isUpdate == "boolean" && (o = e.isUpdate), e.optimisticPatch !== void 0 && (a = Q(e.optimisticPatch)), e.optimisticReconcile !== void 0 && (l = Z(e.optimisticReconcile))), {
1790
+ throw new D("UI update root is missing viewId");
1791
+ let r = s, n = t.optimisticActionId === null || typeof t.optimisticActionId == "string" ? t.optimisticActionId : void 0, i = typeof t.isOptimistic == "boolean" ? t.isOptimistic : void 0, o = typeof t.isUpdate == "boolean" ? t.isUpdate : void 0, a = Q(t.optimisticPatch), I = Z(t.optimisticReconcile);
1792
+ return y(e) && (typeof e.viewId == "string" && e.viewId.length > 0 && (r = e.viewId), (e.optimisticActionId === null || typeof e.optimisticActionId == "string") && (n = e.optimisticActionId), typeof e.isOptimistic == "boolean" && (i = e.isOptimistic), typeof e.isUpdate == "boolean" && (o = e.isUpdate), e.optimisticPatch !== void 0 && (a = Q(e.optimisticPatch)), e.optimisticReconcile !== void 0 && (I = Z(e.optimisticReconcile))), {
1646
1793
  viewId: r,
1647
1794
  ...n !== void 0 ? { optimisticActionId: n } : {},
1648
1795
  ...i !== void 0 ? { isOptimistic: i } : {},
1649
1796
  ...o !== void 0 ? { isUpdate: o } : {},
1650
1797
  ...a ? { optimisticPatch: a } : {},
1651
- ...l ? { optimisticReconcile: l } : {}
1798
+ ...I ? { optimisticReconcile: I } : {}
1652
1799
  };
1653
1800
  }
1654
1801
  function Q(t) {
1655
- if (!C(t))
1802
+ if (!y(t))
1656
1803
  return;
1657
1804
  const e = t, s = e.id, r = e.actionId, n = e.ordinal, i = e.baseVersion, o = e.supersedes;
1658
1805
  if (typeof s != "string" || s.length === 0 || typeof r != "string" || r.length === 0 || typeof n != "number" || !Number.isFinite(n) || typeof i != "number" || !Number.isFinite(i))
1659
1806
  return;
1660
1807
  let a;
1661
1808
  if (Array.isArray(o)) {
1662
- const l = [];
1663
- for (const I of o)
1664
- typeof I == "string" && I.length > 0 && l.push(I);
1665
- a = l;
1809
+ const I = [];
1810
+ for (const l of o)
1811
+ typeof l == "string" && l.length > 0 && I.push(l);
1812
+ a = I;
1666
1813
  }
1667
1814
  return {
1668
1815
  id: s,
@@ -1673,7 +1820,7 @@ function Q(t) {
1673
1820
  };
1674
1821
  }
1675
1822
  function Z(t) {
1676
- if (!C(t))
1823
+ if (!y(t))
1677
1824
  return;
1678
1825
  const e = t, s = e.baseVersion, r = e.drop;
1679
1826
  if (typeof s != "number" || !Number.isFinite(s))
@@ -1690,32 +1837,32 @@ function Z(t) {
1690
1837
  ...n && n.length > 0 ? { drop: n } : {}
1691
1838
  };
1692
1839
  }
1693
- class w extends Error {
1840
+ class D extends Error {
1694
1841
  constructor(e, s) {
1695
1842
  super(e), this.causeError = s, this.name = "UiUpdateParseError", s instanceof Error && (this.stack = s.stack);
1696
1843
  }
1697
1844
  }
1698
- function Rn(t) {
1845
+ function Qn(t) {
1699
1846
  let e;
1700
1847
  try {
1701
1848
  e = JSON.parse(t.Json);
1702
1849
  } catch (o) {
1703
- throw new w("Failed to parse UIUpdate.Json payload", o);
1850
+ throw new D("Failed to parse UIUpdate.Json payload", o);
1704
1851
  }
1705
1852
  if (!e || typeof e != "object")
1706
- throw new w("UI update snapshot must be an object");
1853
+ throw new D("UI update snapshot must be an object");
1707
1854
  const { type: s, version: r } = e;
1708
1855
  if (s !== "full" && s !== "diff")
1709
- throw new w(`Unknown UI update type: ${String(s)}`);
1856
+ throw new D(`Unknown UI update type: ${String(s)}`);
1710
1857
  if (typeof r != "number")
1711
- throw new w("UI update version must be a number");
1712
- const n = s === "full" ? wn(e.graph, e.metadata, r) : Un(e.diff, e.metadata, r), i = t.Payloads ? Cn(t.Payloads) : /* @__PURE__ */ new Map();
1858
+ throw new D("UI update version must be a number");
1859
+ const n = s === "full" ? Wn(e.graph, e.metadata, r) : Jn(e.changes, e.metadata, r), i = t.Payloads ? zn(t.Payloads) : /* @__PURE__ */ new Map();
1713
1860
  return {
1714
1861
  snapshot: n,
1715
1862
  payloads: i
1716
1863
  };
1717
1864
  }
1718
- class Ln {
1865
+ class Zn {
1719
1866
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1720
1867
  cache = /* @__PURE__ */ new Map();
1721
1868
  /**
@@ -1796,7 +1943,7 @@ class Ln {
1796
1943
  return this.cache.size;
1797
1944
  }
1798
1945
  }
1799
- class mn {
1946
+ class ti {
1800
1947
  views = /* @__PURE__ */ new Map();
1801
1948
  listeners = /* @__PURE__ */ new Set();
1802
1949
  payloads = /* @__PURE__ */ new Map();
@@ -1818,7 +1965,7 @@ class mn {
1818
1965
  patchesDirty = !0;
1819
1966
  payloadsDirty = !0;
1820
1967
  // Handler cache for stable event handlers
1821
- handlerCache = new Ln();
1968
+ handlerCache = new Zn();
1822
1969
  getSortedPatches(e) {
1823
1970
  const s = this.buildPatchCacheKey(e.patches);
1824
1971
  if (e.sortedPatchesCacheKey === s && e.sortedPatchesCache)
@@ -1857,46 +2004,46 @@ class mn {
1857
2004
  const a = s.type === "diff" && n.isUpdate === !0;
1858
2005
  if (s.version < o.version || s.version === o.version && !a)
1859
2006
  return !1;
1860
- let l = !1;
1861
- if (this.rootViewId || (this.rootViewId = i, l = !0, this.structureChanged = !0), n.optimisticReconcile?.drop)
2007
+ let I = !1;
2008
+ if (this.rootViewId || (this.rootViewId = i, I = !0, this.structureChanged = !0), n.optimisticReconcile?.drop)
1862
2009
  for (const c of n.optimisticReconcile.drop)
1863
- o.patches.delete(c) && (l = !0, this.patchesDirty = !0, this.invalidatePatchCache(o));
2010
+ o.patches.delete(c) && (I = !0, this.patchesDirty = !0, this.invalidatePatchCache(o));
1864
2011
  if (n.optimisticPatch?.supersedes)
1865
2012
  for (const c of n.optimisticPatch.supersedes)
1866
- o.patches.delete(c) && (l = !0, this.patchesDirty = !0, this.invalidatePatchCache(o));
1867
- const I = o.composite ?? o.baseline;
2013
+ o.patches.delete(c) && (I = !0, this.patchesDirty = !0, this.invalidatePatchCache(o));
2014
+ const l = o.composite ?? o.baseline;
1868
2015
  if (s.type === "full")
1869
- o.baseline = s.root, o.composite = s.root, o.baselineVersion = n.optimisticReconcile?.baseVersion ?? s.version, o.patches.clear(), this.invalidatePatchCache(o), o.version = s.version, l = !0, this.viewsDirty = !0, this.patchesDirty = !0, this.structureChanged = !0, s.root && b(s.root, this.changedNodeIds);
2016
+ o.baseline = s.root, o.composite = s.root, o.baselineVersion = n.optimisticReconcile?.baseVersion ?? s.version, o.patches.clear(), this.invalidatePatchCache(o), o.version = s.version, I = !0, this.viewsDirty = !0, this.patchesDirty = !0, this.structureChanged = !0, s.root && b(s.root, this.changedNodeIds);
1870
2017
  else if (n.optimisticPatch) {
1871
- if (!I)
2018
+ if (!l)
1872
2019
  return !1;
1873
- const c = X(I, s.diff);
1874
- c !== I && (o.composite = c, l = !0, this.viewsDirty = !0, j(I, c, this.changedNodeIds));
2020
+ const c = J(l, s.changes);
2021
+ c !== l && (o.composite = c, I = !0, this.viewsDirty = !0, X(l, c, this.changedNodeIds));
1875
2022
  const E = n.optimisticPatch, _ = {
1876
2023
  id: E.id,
1877
2024
  actionId: E.actionId,
1878
2025
  ordinal: E.ordinal,
1879
2026
  baseVersion: E.baseVersion,
1880
- diff: s.diff
2027
+ changes: s.changes
1881
2028
  };
1882
- o.patches.set(_.id, _), this.invalidatePatchCache(o), l = !0, this.patchesDirty = !0, o.version = s.version;
2029
+ o.patches.set(_.id, _), this.invalidatePatchCache(o), I = !0, this.patchesDirty = !0, o.version = s.version;
1883
2030
  } else {
1884
- const c = o.baseline ?? I;
2031
+ const c = o.baseline ?? l;
1885
2032
  if (!c)
1886
2033
  return !1;
1887
- const E = X(c, s.diff);
1888
- E !== c ? (o.baseline = E, l = !0, this.viewsDirty = !0) : o.baseline = E, o.baselineVersion = n.optimisticReconcile?.baseVersion ?? s.version;
2034
+ const E = J(c, s.changes);
2035
+ E !== c ? (o.baseline = E, I = !0, this.viewsDirty = !0) : o.baseline = E, o.baselineVersion = n.optimisticReconcile?.baseVersion ?? s.version;
1889
2036
  let _ = o.baseline ?? E;
1890
- const h = this.getSortedPatches(o);
1891
- for (const N of h) {
1892
- const f = X(_, N.diff);
1893
- f !== _ && (l = !0, this.viewsDirty = !0), _ = f, N.baseVersion = o.baselineVersion;
2037
+ const N = this.getSortedPatches(o);
2038
+ for (const h of N) {
2039
+ const w = J(_, h.changes);
2040
+ w !== _ && (I = !0, this.viewsDirty = !0), _ = w, h.baseVersion = o.baselineVersion;
1894
2041
  }
1895
- o.composite !== _ && (o.composite = _, l = !0, this.viewsDirty = !0), I && _ ? j(I, _, this.changedNodeIds) : _ && b(_, this.changedNodeIds), o.version = s.version;
2042
+ o.composite !== _ && (o.composite = _, I = !0, this.viewsDirty = !0), l && _ ? X(l, _, this.changedNodeIds) : _ && b(_, this.changedNodeIds), o.version = s.version;
1896
2043
  }
1897
2044
  for (const [c, E] of r)
1898
- this.payloads.get(c) !== E && (this.payloads.set(c, E), l = !0, this.payloadsDirty = !0);
1899
- return l ? (this.commitSnapshot(), this.notify(), !0) : (o.version = s.version, !1);
2045
+ this.payloads.get(c) !== E && (this.payloads.set(c, E), I = !0, this.payloadsDirty = !0);
2046
+ return I ? (this.commitSnapshot(), this.notify(), !0) : (o.version = s.version, !1);
1900
2047
  }
1901
2048
  replaceFromWire(e) {
1902
2049
  const s = {
@@ -1914,30 +2061,30 @@ class mn {
1914
2061
  if (s !== void 0 && this.snapshot.version !== s)
1915
2062
  return !1;
1916
2063
  let r = !1, n = null, i = null, o = null;
1917
- const a = () => (n || (n = new Map(this.snapshot.views)), n), l = () => (i || (i = new Map(this.snapshot.payloads)), i), I = () => (o || (o = new Map(this.snapshot.optimisticPatches)), o);
2064
+ const a = () => (n || (n = new Map(this.snapshot.views)), n), I = () => (i || (i = new Map(this.snapshot.payloads)), i), l = () => (o || (o = new Map(this.snapshot.optimisticPatches)), o);
1918
2065
  if (e.deleteViews && e.deleteViews.length > 0)
1919
2066
  for (const _ of e.deleteViews)
1920
2067
  a().delete(_) && (r = !0, this.structureChanged = !0);
1921
2068
  if (e.upsertViews && e.upsertViews.length > 0)
1922
- for (const [_, h] of e.upsertViews) {
1923
- const N = a(), f = N.get(_);
1924
- f !== h && (N.set(_, h), r = !0, f ? j(f, h, this.changedNodeIds) : (b(h, this.changedNodeIds), this.structureChanged = !0));
2069
+ for (const [_, N] of e.upsertViews) {
2070
+ const h = a(), w = h.get(_);
2071
+ w !== N && (h.set(_, N), r = !0, w ? X(w, N, this.changedNodeIds) : (b(N, this.changedNodeIds), this.structureChanged = !0));
1925
2072
  }
1926
2073
  if (e.deletePayloads && e.deletePayloads.length > 0)
1927
2074
  for (const _ of e.deletePayloads)
1928
- l().delete(_) && (r = !0);
2075
+ I().delete(_) && (r = !0);
1929
2076
  if (e.upsertPayloads && e.upsertPayloads.length > 0)
1930
- for (const [_, h] of e.upsertPayloads) {
1931
- const N = l();
1932
- N.get(_) !== h && (N.set(_, h), r = !0);
2077
+ for (const [_, N] of e.upsertPayloads) {
2078
+ const h = I();
2079
+ h.get(_) !== N && (h.set(_, N), r = !0);
1933
2080
  }
1934
2081
  if (e.deleteOptimisticPatchesForViews && e.deleteOptimisticPatchesForViews.length > 0)
1935
2082
  for (const _ of e.deleteOptimisticPatchesForViews)
1936
- I().delete(_) && (r = !0);
2083
+ l().delete(_) && (r = !0);
1937
2084
  if (e.upsertOptimisticPatches && e.upsertOptimisticPatches.length > 0)
1938
- for (const [_, h] of e.upsertOptimisticPatches) {
1939
- const N = I(), f = N.get(_);
1940
- bn(f, h) || (N.set(_, h), r = !0);
2085
+ for (const [_, N] of e.upsertOptimisticPatches) {
2086
+ const h = l(), w = h.get(_);
2087
+ ni(w, N) || (h.set(_, N), r = !0);
1941
2088
  }
1942
2089
  const c = e.rootViewId ?? this.snapshot.rootViewId;
1943
2090
  c !== this.snapshot.rootViewId && (r = !0, this.structureChanged = !0);
@@ -1960,7 +2107,7 @@ class mn {
1960
2107
  (s.rootViewId !== e.rootViewId || s.views.size !== e.views.size) && (this.structureChanged = !0);
1961
2108
  for (const [n, i] of e.views) {
1962
2109
  const o = s.views.get(n);
1963
- o ? j(o, i, this.changedNodeIds) : (b(i, this.changedNodeIds), this.structureChanged = !0);
2110
+ o ? X(o, i, this.changedNodeIds) : (b(i, this.changedNodeIds), this.structureChanged = !0);
1964
2111
  }
1965
2112
  for (const n of this.changedNodeIds)
1966
2113
  this.nodeVersions.set(n, (this.nodeVersions.get(n) ?? 0) + 1);
@@ -2027,14 +2174,14 @@ class mn {
2027
2174
  const i = /* @__PURE__ */ new Map();
2028
2175
  for (const [o, a] of this.views)
2029
2176
  if (a.patches.size > 0) {
2030
- const l = this.getSortedPatches(a);
2177
+ const I = this.getSortedPatches(a);
2031
2178
  i.set(
2032
2179
  o,
2033
- l.map((I) => ({
2034
- id: I.id,
2035
- actionId: I.actionId,
2036
- ordinal: I.ordinal,
2037
- baseVersion: I.baseVersion
2180
+ I.map((l) => ({
2181
+ id: l.id,
2182
+ actionId: l.actionId,
2183
+ ordinal: l.ordinal,
2184
+ baseVersion: l.baseVersion
2038
2185
  }))
2039
2186
  );
2040
2187
  }
@@ -2064,7 +2211,7 @@ class mn {
2064
2211
  }
2065
2212
  }
2066
2213
  }
2067
- class On {
2214
+ class ei {
2068
2215
  streams = /* @__PURE__ */ new Map();
2069
2216
  listeners = /* @__PURE__ */ new Set();
2070
2217
  apply(e, s) {
@@ -2128,66 +2275,88 @@ class On {
2128
2275
  }
2129
2276
  getOrCreateStreamEntry(e) {
2130
2277
  let s = this.streams.get(e);
2131
- return s || (s = { store: new mn() }, this.streams.set(e, s)), s;
2278
+ return s || (s = { store: new ti() }, this.streams.set(e, s)), s;
2132
2279
  }
2133
2280
  notify(e) {
2134
2281
  for (const s of this.listeners)
2135
2282
  s(e);
2136
2283
  }
2137
2284
  }
2138
- function X(t, e, s) {
2139
- if (t.id !== e.id)
2285
+ function J(t, e, s) {
2286
+ if (e.length === 0)
2140
2287
  return t;
2141
- let r = t, n = !1;
2142
- if (e.textUpdates.length > 0) {
2143
- const f = Fn(t, e.textUpdates);
2144
- r = f.node, n = f.changed;
2145
- }
2146
- let i = !1, o = r.props;
2147
- if (e.changedProps.size > 0)
2148
- for (const [f, y] of e.changedProps.entries()) {
2149
- const L = o[f];
2150
- if (y === void 0)
2151
- (L !== void 0 || f in o) && (i || (o = k(o), i = !0), delete o[f]);
2152
- else if (tt(y)) {
2153
- const g = k(y);
2154
- v(g, L) || (i || (o = k(o), i = !0), o[f] = g);
2288
+ const r = /* @__PURE__ */ new Map();
2289
+ for (const n of e)
2290
+ r.set(n.nodeId, n);
2291
+ return $t(t, r);
2292
+ }
2293
+ function $t(t, e, s) {
2294
+ const r = e.get(t.id);
2295
+ let n = t, i = !1;
2296
+ if (r?.textUpdates && r.textUpdates.length > 0) {
2297
+ const f = oi(t, r.textUpdates);
2298
+ n = f.node, i = f.changed;
2299
+ }
2300
+ let o = !1, a = n.props;
2301
+ if (r?.changedProps && r.changedProps.size > 0)
2302
+ for (const [f, d] of r.changedProps.entries()) {
2303
+ const u = a[f];
2304
+ if (d === void 0)
2305
+ (u !== void 0 || f in a) && (o || (a = k(a), o = !0), delete a[f]);
2306
+ else if (tt(d)) {
2307
+ const A = k(d);
2308
+ v(A, u) || (o || (a = k(a), o = !0), a[f] = A);
2155
2309
  } else
2156
- v(y, L) || (i || (o = k(o), i = !0), o[f] = y);
2310
+ v(d, u) || (o || (a = k(a), o = !0), a[f] = d);
2157
2311
  }
2158
- let a = !1, l = r.styleIds;
2159
- e.styleIds !== void 0 && (Xt(r.styleIds, e.styleIds) || (l = e.styleIds, a = !0));
2160
- const I = r.children ?? [];
2161
- let c = I, E = !1;
2162
- if (e.removed.length > 0) {
2163
- const f = e.removed, y = f.length > 8, L = y ? new Set(f) : void 0, g = y ? (u) => L.has(u) : (u) => f.includes(u);
2164
- let d;
2165
- for (let u = 0; u < c.length; u++) {
2166
- const D = c[u];
2167
- g(D.id) ? d || (d = c.slice(0, u)) : d && d.push(D);
2312
+ let I = !1, l = n.styleIds;
2313
+ r?.styleIds !== void 0 && (Xt(n.styleIds, r.styleIds) || (l = r.styleIds, I = !0));
2314
+ const c = n.children ?? [];
2315
+ let E = c, _ = !1;
2316
+ if (r?.removals && r.removals.length > 0 || r?.moves && r.moves.length > 0 || r?.inserts && r.inserts.length > 0) {
2317
+ const f = E.slice();
2318
+ if (r?.removals && r.removals.length > 0) {
2319
+ const d = [...r.removals].sort((u, A) => A.index - u.index);
2320
+ for (const u of d)
2321
+ u.index >= 0 && u.index < f.length && f.splice(u.index, 1);
2322
+ _ = !0;
2168
2323
  }
2169
- d && (c = d, E = !0);
2170
- }
2171
- if (e.updated.length > 0) {
2172
- const f = e.updated, y = f.length > 8, L = y ? new Map(f.map((u) => [u.id, u])) : void 0, g = y ? (u) => L.get(u) : (u) => f.find((D) => D.id === u);
2173
- let d;
2174
- for (let u = 0; u < c.length; u++) {
2175
- const D = c[u], at = g(D.id);
2176
- if (!at)
2177
- continue;
2178
- const lt = X(D, at);
2179
- lt !== D && (d || (d = c.slice()), d[u] = lt);
2324
+ if (r?.moves && r.moves.length > 0) {
2325
+ const d = [...r.moves].sort((A, m) => A.toIndex - m.toIndex), u = /* @__PURE__ */ new Map();
2326
+ for (const A of d) {
2327
+ const m = f.findIndex((W) => W.id === A.nodeId);
2328
+ m >= 0 && (u.set(A.nodeId, f[m]), f.splice(m, 1));
2329
+ }
2330
+ for (const A of d) {
2331
+ const m = u.get(A.nodeId);
2332
+ if (m) {
2333
+ const W = Math.min(A.toIndex, f.length);
2334
+ f.splice(W, 0, m);
2335
+ }
2336
+ }
2337
+ _ = !0;
2180
2338
  }
2181
- d && (c = d, E = !0);
2182
- }
2183
- e.added.length > 0 && (c = c.concat(e.added), E = !0);
2184
- const _ = r.type !== e.type;
2185
- return n || i || _ || a || E ? !i && !E && !_ && !a ? r : {
2186
- id: e.id,
2187
- type: e.type,
2188
- props: i ? o : r.props,
2189
- children: E ? c : I,
2190
- styleIds: a ? l : r.styleIds
2339
+ if (r?.inserts && r.inserts.length > 0) {
2340
+ const d = [...r.inserts].sort((u, A) => u.index - A.index);
2341
+ for (const u of d) {
2342
+ const A = Math.min(u.index, f.length);
2343
+ f.splice(A, 0, u.node);
2344
+ }
2345
+ _ = !0;
2346
+ }
2347
+ E = f;
2348
+ }
2349
+ let h;
2350
+ for (let f = 0; f < E.length; f++) {
2351
+ const d = E[f], u = $t(d, e);
2352
+ u !== d && (h || (h = E.slice()), h[f] = u);
2353
+ }
2354
+ return h && (E = h, _ = !0), i || o || I || _ ? !o && !_ && !I ? n : {
2355
+ id: t.id,
2356
+ type: t.type,
2357
+ props: o ? a : n.props,
2358
+ children: _ ? E : c,
2359
+ styleIds: I ? l : n.styleIds
2191
2360
  } : t;
2192
2361
  }
2193
2362
  function b(t, e) {
@@ -2195,32 +2364,32 @@ function b(t, e) {
2195
2364
  for (const s of t.children)
2196
2365
  b(s, e);
2197
2366
  }
2198
- const $ = [];
2199
- function gn(t) {
2200
- for (; $.length <= t; )
2201
- $.push(/* @__PURE__ */ new Map());
2202
- return $[t].clear(), $[t];
2367
+ const j = [];
2368
+ function si(t) {
2369
+ for (; j.length <= t; )
2370
+ j.push(/* @__PURE__ */ new Map());
2371
+ return j[t].clear(), j[t];
2203
2372
  }
2204
- function j(t, e, s) {
2205
- $t(t, e, s, 0);
2373
+ function X(t, e, s) {
2374
+ Kt(t, e, s, 0);
2206
2375
  }
2207
- function $t(t, e, s, r) {
2376
+ function Kt(t, e, s, r) {
2208
2377
  if (t === e)
2209
2378
  return;
2210
- (t.type !== e.type || !Pn(t.props, e.props) || !Xt(t.styleIds, e.styleIds)) && s.add(e.id);
2379
+ (t.type !== e.type || !ri(t.props, e.props) || !Xt(t.styleIds, e.styleIds)) && s.add(e.id);
2211
2380
  const i = t.children ?? [], o = e.children ?? [];
2212
2381
  if (i !== o) {
2213
- const a = gn(r);
2214
- for (const l of i)
2215
- a.set(l.id, l);
2216
- for (const l of o) {
2217
- const I = a.get(l.id);
2218
- I ? $t(I, l, s, r + 1) : b(l, s);
2382
+ const a = si(r);
2383
+ for (const I of i)
2384
+ a.set(I.id, I);
2385
+ for (const I of o) {
2386
+ const l = a.get(I.id);
2387
+ l ? Kt(l, I, s, r + 1) : b(I, s);
2219
2388
  }
2220
2389
  i.length !== o.length && s.add(e.id);
2221
2390
  }
2222
2391
  }
2223
- function Pn(t, e) {
2392
+ function ri(t, e) {
2224
2393
  return v(t, e);
2225
2394
  }
2226
2395
  function jt(t, e) {
@@ -2236,7 +2405,7 @@ function jt(t, e) {
2236
2405
  function Xt(t, e) {
2237
2406
  return v(t, e);
2238
2407
  }
2239
- function bn(t, e) {
2408
+ function ni(t, e) {
2240
2409
  if (t === e) return !0;
2241
2410
  if (!t || !e || t.length !== e.length) return !1;
2242
2411
  for (let s = 0; s < t.length; s++) {
@@ -2246,24 +2415,24 @@ function bn(t, e) {
2246
2415
  }
2247
2416
  return !0;
2248
2417
  }
2249
- function pn(t, e) {
2418
+ function ii(t, e) {
2250
2419
  if (e.length === 0)
2251
2420
  return t;
2252
2421
  const s = [...e].sort((i, o) => i.start - o.start);
2253
2422
  let r = t, n = 0;
2254
2423
  for (const i of s) {
2255
- const o = ct(i.start + n, 0, r.length);
2424
+ const o = lt(i.start + n, 0, r.length);
2256
2425
  if (i.end == null) {
2257
- const c = r.slice(o), E = vn(c, i.insertedText);
2426
+ const c = r.slice(o), E = ai(c, i.insertedText);
2258
2427
  r = r.slice(0, o) + i.insertedText + c.slice(E), n += i.insertedText.length - E;
2259
2428
  continue;
2260
2429
  }
2261
- const a = i.end + n, l = ct(a, o, r.length), I = l - o;
2262
- r = r.slice(0, o) + i.insertedText + r.slice(l), n += i.insertedText.length - I;
2430
+ const a = i.end + n, I = lt(a, o, r.length), l = I - o;
2431
+ r = r.slice(0, o) + i.insertedText + r.slice(I), n += i.insertedText.length - l;
2263
2432
  }
2264
2433
  return r;
2265
2434
  }
2266
- function Fn(t, e, s) {
2435
+ function oi(t, e, s) {
2267
2436
  if (e.length === 0)
2268
2437
  return { node: t, changed: !1 };
2269
2438
  const r = /* @__PURE__ */ new Map();
@@ -2277,42 +2446,42 @@ function zt(t, e, s) {
2277
2446
  const r = e.get(t.id) ?? [];
2278
2447
  let n = !1, i = t.props;
2279
2448
  if (r.length > 0) {
2280
- const I = /* @__PURE__ */ new Map();
2449
+ const l = /* @__PURE__ */ new Map();
2281
2450
  for (const c of r) {
2282
- const E = I.get(c.propertyName);
2283
- E ? E.push(c) : I.set(c.propertyName, [c]);
2451
+ const E = l.get(c.propertyName);
2452
+ E ? E.push(c) : l.set(c.propertyName, [c]);
2284
2453
  }
2285
- for (const [c, E] of I.entries()) {
2286
- const _ = i[c], N = pn(typeof _ == "string" ? _ : "", E);
2287
- n || (i = k(i), n = !0), i[c] = N;
2454
+ for (const [c, E] of l.entries()) {
2455
+ const _ = i[c], h = ii(typeof _ == "string" ? _ : "", E);
2456
+ n || (i = k(i), n = !0), i[c] = h;
2288
2457
  }
2289
2458
  }
2290
2459
  let o = !1;
2291
2460
  const a = t.children ?? [];
2292
- let l = a;
2461
+ let I = a;
2293
2462
  if (a.length > 0) {
2294
- let I;
2463
+ let l;
2295
2464
  for (let c = 0; c < a.length; c++) {
2296
2465
  const E = a[c], _ = zt(E, e);
2297
- _.changed && (I || (I = [...a]), I[c] = _.node);
2466
+ _.changed && (l || (l = [...a]), l[c] = _.node);
2298
2467
  }
2299
- I && (l = I, o = !0);
2468
+ l && (I = l, o = !0);
2300
2469
  }
2301
2470
  return !n && !o ? { node: t, changed: !1 } : {
2302
2471
  node: {
2303
2472
  id: t.id,
2304
2473
  type: t.type,
2305
2474
  props: n ? i : t.props,
2306
- children: o ? l : a,
2475
+ children: o ? I : a,
2307
2476
  styleIds: t.styleIds
2308
2477
  },
2309
2478
  changed: !0
2310
2479
  };
2311
2480
  }
2312
- function ct(t, e, s) {
2481
+ function lt(t, e, s) {
2313
2482
  return Math.max(e, Math.min(s, t));
2314
2483
  }
2315
- function vn(t, e) {
2484
+ function ai(t, e) {
2316
2485
  const s = Math.min(t.length, e.length);
2317
2486
  let r = 0;
2318
2487
  for (; r < s && t.charCodeAt(r) === e.charCodeAt(r); )
@@ -2352,20 +2521,20 @@ function v(t, e) {
2352
2521
  }
2353
2522
  return !1;
2354
2523
  }
2355
- const Mn = 16, Vn = 50, m = new On(), W = /* @__PURE__ */ new Map(), Y = /* @__PURE__ */ new Map();
2356
- let Wt = Mn, Jt = Vn, G = [], B = null, x = null, R = 0, z = 0;
2357
- const H = /* @__PURE__ */ new Map();
2358
- function kn() {
2524
+ const li = 16, Ii = 50, g = new ei(), H = /* @__PURE__ */ new Map(), Y = /* @__PURE__ */ new Map();
2525
+ let Wt = li, Jt = Ii, V = [], G = null, B = null, R = 0, z = 0;
2526
+ const x = /* @__PURE__ */ new Map();
2527
+ function ci() {
2359
2528
  return typeof performance < "u" ? performance.now() : Date.now();
2360
2529
  }
2361
- function Gn() {
2530
+ function Ei() {
2362
2531
  try {
2363
2532
  return crypto.randomUUID();
2364
2533
  } catch {
2365
2534
  return `${Date.now()}_${Math.random().toString(16).slice(2)}`;
2366
2535
  }
2367
2536
  }
2368
- function Bn(t) {
2537
+ function _i(t) {
2369
2538
  const e = [];
2370
2539
  for (const n of t.views)
2371
2540
  e.push(n);
@@ -2385,7 +2554,7 @@ function Bn(t) {
2385
2554
  optimisticPatches: r
2386
2555
  };
2387
2556
  }
2388
- function xn(t, e) {
2557
+ function fi(t, e) {
2389
2558
  if (t === e) return !0;
2390
2559
  if (!t || !e || t.length !== e.length) return !1;
2391
2560
  for (let s = 0; s < t.length; s++) {
@@ -2395,26 +2564,26 @@ function xn(t, e) {
2395
2564
  }
2396
2565
  return !0;
2397
2566
  }
2398
- function Hn(t, e, s) {
2567
+ function hi(t, e, s) {
2399
2568
  if (!s || s.version === -1)
2400
- return { type: "ReplaceStreamSnapshot", snapshot: Bn(e) };
2569
+ return { type: "ReplaceStreamSnapshot", snapshot: _i(e) };
2401
2570
  let r, n;
2402
- for (const [I, c] of e.views)
2403
- s.views.get(I) !== c && (r ??= []).push([I, c]);
2404
- for (const I of s.views.keys())
2405
- e.views.has(I) || (n ??= []).push(I);
2571
+ for (const [l, c] of e.views)
2572
+ s.views.get(l) !== c && (r ??= []).push([l, c]);
2573
+ for (const l of s.views.keys())
2574
+ e.views.has(l) || (n ??= []).push(l);
2406
2575
  let i, o;
2407
- for (const [I, c] of e.payloads)
2408
- s.payloads.get(I) !== c && (i ??= []).push([I, c]);
2409
- for (const I of s.payloads.keys())
2410
- e.payloads.has(I) || (o ??= []).push(I);
2411
- let a, l;
2412
- for (const [I, c] of e.optimisticPatches) {
2413
- const E = s.optimisticPatches.get(I);
2414
- xn(E, c) || (a ??= []).push([I, c.slice()]);
2415
- }
2416
- for (const I of s.optimisticPatches.keys())
2417
- e.optimisticPatches.has(I) || (l ??= []).push(I);
2576
+ for (const [l, c] of e.payloads)
2577
+ s.payloads.get(l) !== c && (i ??= []).push([l, c]);
2578
+ for (const l of s.payloads.keys())
2579
+ e.payloads.has(l) || (o ??= []).push(l);
2580
+ let a, I;
2581
+ for (const [l, c] of e.optimisticPatches) {
2582
+ const E = s.optimisticPatches.get(l);
2583
+ fi(E, c) || (a ??= []).push([l, c.slice()]);
2584
+ }
2585
+ for (const l of s.optimisticPatches.keys())
2586
+ e.optimisticPatches.has(l) || (I ??= []).push(l);
2418
2587
  return {
2419
2588
  type: "PatchStreamSnapshot",
2420
2589
  streamId: t,
@@ -2427,69 +2596,69 @@ function Hn(t, e, s) {
2427
2596
  upsertPayloads: i,
2428
2597
  deletePayloads: o,
2429
2598
  upsertOptimisticPatches: a,
2430
- deleteOptimisticPatchesForViews: l
2599
+ deleteOptimisticPatchesForViews: I
2431
2600
  };
2432
2601
  }
2433
2602
  function qt() {
2434
- B || (B = setTimeout(Et, Wt)), x || (x = setTimeout(Et, Jt));
2603
+ G || (G = setTimeout(It, Wt)), B || (B = setTimeout(It, Jt));
2435
2604
  }
2436
- function M(t) {
2437
- G.push(t), qt();
2605
+ function P(t) {
2606
+ V.push(t), qt();
2438
2607
  }
2439
- function Et() {
2440
- if (B && (clearTimeout(B), B = null), x && (clearTimeout(x), x = null), G.length === 0 && H.size === 0) {
2608
+ function It() {
2609
+ if (G && (clearTimeout(G), G = null), B && (clearTimeout(B), B = null), V.length === 0 && x.size === 0) {
2441
2610
  R = 0, z = 0;
2442
2611
  return;
2443
2612
  }
2444
2613
  const t = [];
2445
- for (const [s, r] of H)
2614
+ for (const [s, r] of x)
2446
2615
  t.push({ trackId: s, version: r });
2447
2616
  const e = {
2448
- batchId: Gn(),
2449
- createdAtMs: kn(),
2450
- ops: G,
2617
+ batchId: Ei(),
2618
+ createdAtMs: ci(),
2619
+ ops: V,
2451
2620
  ...t.length > 0 ? { acks: t } : {},
2452
2621
  stats: { uiMessagesConsumed: R, bytesConsumed: z }
2453
2622
  };
2454
- G = [], R = 0, z = 0, H.clear(), self.postMessage(e);
2623
+ V = [], R = 0, z = 0, x.clear(), self.postMessage(e);
2455
2624
  }
2456
2625
  function Qt(t) {
2457
2626
  return `${t.senderId}_${t.trackId}`;
2458
2627
  }
2459
- function Yn(t) {
2460
- const e = Qs(t), s = /* @__PURE__ */ new Set();
2628
+ function ui(t) {
2629
+ const e = Er(t), s = /* @__PURE__ */ new Set();
2461
2630
  for (const r of Object.values(e.UIStreams ?? {})) {
2462
2631
  const n = r.StreamId;
2463
2632
  s.add(n);
2464
2633
  const i = r.Info?.Category;
2465
- m.getSnapshot(n)?.category !== i && (m.setCategory(n, i), M({ type: "SetStreamCategory", streamId: n, category: i }));
2634
+ g.getSnapshot(n)?.category !== i && (g.setCategory(n, i), P({ type: "SetStreamCategory", streamId: n, category: i }));
2466
2635
  }
2467
- for (const r of m.getSnapshots())
2468
- s.has(r.streamId) || (m.remove(r.streamId), Y.delete(r.streamId), M({ type: "RemoveStream", streamId: r.streamId }));
2636
+ for (const r of g.getSnapshots())
2637
+ s.has(r.streamId) || (g.remove(r.streamId), Y.delete(r.streamId), P({ type: "RemoveStream", streamId: r.streamId }));
2469
2638
  }
2470
- function Kn(t) {
2471
- const e = et(t), s = Qt(e), r = Sn(t), n = Rn(r), i = H.get(e.trackId);
2472
- if ((i === void 0 || n.snapshot.version > i) && (H.set(e.trackId, n.snapshot.version), qt()), !m.apply(s, n))
2639
+ function Ti(t) {
2640
+ const e = et(t), s = Qt(e), r = xn(t), n = Qn(r), i = x.get(e.trackId);
2641
+ if ((i === void 0 || n.snapshot.version > i) && (x.set(e.trackId, n.snapshot.version), qt()), !g.apply(s, n))
2473
2642
  return;
2474
- const a = m.getSnapshot(s);
2643
+ const a = g.getSnapshot(s);
2475
2644
  if (!a)
2476
2645
  return;
2477
- const l = Y.get(s);
2478
- Y.set(s, a), M(Hn(s, a, l));
2646
+ const I = Y.get(s);
2647
+ Y.set(s, a), P(hi(s, a, I));
2479
2648
  }
2480
- function $n(t) {
2481
- const e = Xr(t);
2649
+ function Ni(t) {
2650
+ const e = an(t);
2482
2651
  if (!e.StyleId)
2483
2652
  return;
2484
2653
  const s = {
2485
2654
  styleId: e.StyleId,
2486
2655
  css: e.Style?.css,
2487
2656
  common: e.Style?.common
2488
- }, r = W.get(s.styleId);
2489
- r && r.css === s.css && r.common === s.common || (W.set(s.styleId, s), M({ type: "UpsertUiStyle", style: s }));
2657
+ }, r = H.get(s.styleId);
2658
+ r && r.css === s.css && r.common === s.common || (H.set(s.styleId, s), P({ type: "UpsertUiStyle", style: s }));
2490
2659
  }
2491
- function jn(t) {
2492
- const e = sn(t);
2660
+ function Ai(t) {
2661
+ const e = Tn(t);
2493
2662
  if (e.Styles)
2494
2663
  for (const s of e.Styles) {
2495
2664
  if (!s.StyleId)
@@ -2498,39 +2667,48 @@ function jn(t) {
2498
2667
  styleId: s.StyleId,
2499
2668
  css: s.Style?.css,
2500
2669
  common: s.Style?.common
2501
- }, n = W.get(r.styleId);
2502
- n && n.css === r.css && n.common === r.common || (W.set(r.styleId, r), M({ type: "UpsertUiStyle", style: r }));
2670
+ }, n = H.get(r.styleId);
2671
+ n && n.css === r.css && n.common === r.common || (H.set(r.styleId, r), P({ type: "UpsertUiStyle", style: r }));
2503
2672
  }
2504
2673
  }
2505
- function Xn(t) {
2674
+ function di(t) {
2506
2675
  const e = et(t), s = Qt(e);
2507
- m.clear(s), Y.delete(s), M({ type: "ClearStream", streamId: s });
2676
+ g.clear(s), Y.delete(s), P({ type: "ClearStream", streamId: s });
2508
2677
  }
2509
- function zn(t) {
2678
+ function Si(t) {
2679
+ const e = Pn(t);
2680
+ if (!(!e.StyleIds || e.StyleIds.length === 0))
2681
+ for (const s of e.StyleIds)
2682
+ H.delete(s) && P({ type: "RemoveUiStyle", styleId: s });
2683
+ }
2684
+ function yi(t) {
2510
2685
  const e = new Uint8Array(t);
2511
2686
  z += e.byteLength;
2512
2687
  const s = e;
2513
2688
  switch (Zt(s)) {
2514
- case P.CORE_GLOBAL_STATE:
2515
- Yn(s), R++;
2689
+ case O.CORE_GLOBAL_STATE:
2690
+ ui(s), R++;
2516
2691
  return;
2517
- case P.UI_UPDATE:
2692
+ case O.UI_UPDATE:
2518
2693
  try {
2519
- Kn(s);
2694
+ Ti(s);
2520
2695
  } catch (n) {
2521
- return n instanceof w, void 0;
2696
+ return n instanceof D, void 0;
2522
2697
  } finally {
2523
2698
  R++;
2524
2699
  }
2525
2700
  return;
2526
- case P.UI_STYLES:
2527
- $n(s), R++;
2701
+ case O.UI_STYLES:
2702
+ Ni(s), R++;
2703
+ return;
2704
+ case O.UI_STYLES_BATCH:
2705
+ Ai(s), R++;
2528
2706
  return;
2529
- case P.UI_STYLES_BATCH:
2530
- jn(s), R++;
2707
+ case O.UI_STYLES_DELETE:
2708
+ Si(s), R++;
2531
2709
  return;
2532
- case P.ACTION_UI_CLEAR_STREAM:
2533
- Xn(s), R++;
2710
+ case O.ACTION_UI_CLEAR_STREAM:
2711
+ di(s), R++;
2534
2712
  return;
2535
2713
  default:
2536
2714
  return;
@@ -2543,8 +2721,8 @@ self.addEventListener("message", (t) => {
2543
2721
  return;
2544
2722
  }
2545
2723
  if (e.type === "clear") {
2546
- G = [], Y.clear();
2724
+ V = [], Y.clear();
2547
2725
  return;
2548
2726
  }
2549
- e.type === "protocol" && zn(e.message);
2727
+ e.type === "protocol" && yi(e.message);
2550
2728
  });