@ikonai/sdk 1.0.11 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  const zr = {
2
2
  Compressed: 8
3
3
  };
4
- function bl(t) {
4
+ function Dl(t) {
5
5
  return t;
6
6
  }
7
7
  function fe(t) {
@@ -20,9 +20,9 @@ function ie(t) {
20
20
  if (27 + c * 4 > e.length)
21
21
  throw new Error("Protocol header exceeds payload length");
22
22
  const f = [];
23
- let p = 27;
24
- for (let I = 0; I < c; I++)
25
- f.push(r.getUint32(p, !0)), p += 4;
23
+ let m = 27;
24
+ for (let p = 0; p < c; p++)
25
+ f.push(r.getUint32(m, !0)), m += 4;
26
26
  return {
27
27
  length: n,
28
28
  opcode: s,
@@ -35,7 +35,7 @@ function ie(t) {
35
35
  flags: d
36
36
  };
37
37
  }
38
- async function Be(t, e, r) {
38
+ async function Ve(t, e, r) {
39
39
  const n = oe(t), s = ie(n);
40
40
  if (e !== void 0 && s.opcode !== e)
41
41
  throw new Error(`Unexpected opcode ${s.opcode}`);
@@ -48,9 +48,9 @@ async function Be(t, e, r) {
48
48
  function P(t, e, r, n, s) {
49
49
  const i = s?.trackId ?? 0, o = s?.sequenceId ?? 0, a = s?.flags ?? 0, c = s?.targetIds ?? [], l = s?.payloadType ?? 8, E = 27 + c.length * 4, d = E + e.length, h = new Uint8Array(d), f = new DataView(h.buffer);
50
50
  f.setUint32(0, d, !0), f.setUint32(4, t >>> 0, !0), f.setUint32(8, n >>> 0, !0), f.setUint32(12, i >>> 0, !0), f.setUint32(16, o >>> 0, !0), f.setUint32(20, c.length >>> 0, !0), f.setUint8(24, r & 255), f.setUint8(25, l & 255), f.setUint8(26, a & 255);
51
- let p = 27;
52
- for (let I = 0; I < c.length; I++)
53
- f.setUint32(p, c[I] >>> 0, !0), p += 4;
51
+ let m = 27;
52
+ for (let p = 0; p < c.length; p++)
53
+ f.setUint32(m, c[p] >>> 0, !0), m += 4;
54
54
  return h.set(e, E), h;
55
55
  }
56
56
  async function Xr(t) {
@@ -72,12 +72,12 @@ async function Xr(t) {
72
72
  return a;
73
73
  }
74
74
  var R = /* @__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))(R || {});
75
- const It = 161, mt = 162, Ee = new TextEncoder(), Jr = new TextDecoder("utf-8", { fatal: !0 });
76
- class D {
75
+ const Tt = 161, St = 162, Ee = new TextEncoder(), Jr = new TextDecoder("utf-8", { fatal: !0 });
76
+ class M {
77
77
  constructor(e = 1) {
78
- this.version = e, this.buffer.writeByte(It), this.buffer.writeVarUInt(e >>> 0);
78
+ this.version = e, this.buffer.writeByte(Tt), this.buffer.writeVarUInt(e >>> 0);
79
79
  }
80
- buffer = new $();
80
+ buffer = new K();
81
81
  closed = !1;
82
82
  cached;
83
83
  writeInt32Field(e, r) {
@@ -102,7 +102,7 @@ class D {
102
102
  this.writeFixedField(e, 2, () => this.buffer.writeByte(r ? 1 : 0));
103
103
  }
104
104
  writeGuidField(e, r) {
105
- const n = r instanceof m ? r.asBytes() : r;
105
+ const n = r instanceof I ? r.asBytes() : r;
106
106
  if (n.length !== 16)
107
107
  throw new Error("Guid payload must be 16 bytes");
108
108
  this.writeFixedField(e, 14, () => this.buffer.writeBytes(n));
@@ -115,25 +115,25 @@ class D {
115
115
  this.writeVariableField(e, 13, r);
116
116
  }
117
117
  writeObjectField(e, r, n) {
118
- const s = new D(r);
118
+ const s = new M(r);
119
119
  n(s);
120
120
  const i = s.finish();
121
121
  this.writeVariableField(e, 11, i);
122
122
  }
123
123
  writeArrayField(e, r, n) {
124
- const s = new we(r);
124
+ const s = new ye(r);
125
125
  n(s);
126
126
  const i = s.finish();
127
127
  this.writeVariableField(e, 9, i);
128
128
  }
129
129
  writeDictionaryField(e, r, n, s) {
130
- const i = new xe(r, n);
130
+ const i = new We(r, n);
131
131
  s(i);
132
132
  const o = i.finish();
133
133
  this.writeVariableField(e, 10, o);
134
134
  }
135
135
  finish() {
136
- return this.closed || (this.buffer.writeByte(mt), this.closed = !0, this.cached = this.buffer.toUint8Array()), this.cached;
136
+ return this.closed || (this.buffer.writeByte(St), this.closed = !0, this.cached = this.buffer.toUint8Array()), this.cached;
137
137
  }
138
138
  writeFixedField(e, r, n) {
139
139
  this.writeFieldHeader(e, r, 0), n();
@@ -145,11 +145,11 @@ class D {
145
145
  this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(pe(r)), tn(r) && this.buffer.writeVarUInt(n >>> 0);
146
146
  }
147
147
  }
148
- class we {
148
+ class ye {
149
149
  constructor(e) {
150
150
  this.elementType = e;
151
151
  }
152
- payload = new $();
152
+ payload = new K();
153
153
  count = 0;
154
154
  writeInt32(e) {
155
155
  this.ensureElementType(
@@ -198,7 +198,7 @@ class we {
198
198
  14
199
199
  /* Guid */
200
200
  ), this.count++;
201
- const r = e instanceof m ? e.asBytes() : e;
201
+ const r = e instanceof I ? e.asBytes() : e;
202
202
  if (r.length !== 16)
203
203
  throw new Error("Guid payload must be 16 bytes");
204
204
  this.payload.writeBytes(r);
@@ -222,7 +222,7 @@ class we {
222
222
  11
223
223
  /* Object */
224
224
  ), this.count++;
225
- const n = new D(e);
225
+ const n = new M(e);
226
226
  r(n);
227
227
  const s = n.finish();
228
228
  this.payload.writeVarUInt(s.length), this.payload.writeBytes(s);
@@ -232,7 +232,7 @@ class we {
232
232
  9
233
233
  /* Array */
234
234
  ), this.count++;
235
- const n = new we(e);
235
+ const n = new ye(e);
236
236
  r(n);
237
237
  const s = n.finish();
238
238
  this.payload.writeBytes(s);
@@ -242,13 +242,13 @@ class we {
242
242
  10
243
243
  /* Dict */
244
244
  ), this.count++;
245
- const s = new xe(e, r);
245
+ const s = new We(e, r);
246
246
  n(s);
247
247
  const i = s.finish();
248
248
  this.payload.writeBytes(i);
249
249
  }
250
250
  finish() {
251
- const e = new $();
251
+ const e = new K();
252
252
  return e.writeByte(pe(this.elementType)), e.writeVarUInt(this.count), e.writeBytes(this.payload.toUint8Array()), e.toUint8Array();
253
253
  }
254
254
  ensureElementType(e) {
@@ -256,11 +256,11 @@ class we {
256
256
  throw new Error(`Array element type is ${R[this.elementType]}, expected ${R[e]}`);
257
257
  }
258
258
  }
259
- class xe {
259
+ class We {
260
260
  constructor(e, r) {
261
- this.keyType = e, this.valueType = r, We(e);
261
+ this.keyType = e, this.valueType = r, Ke(e);
262
262
  }
263
- payload = new $();
263
+ payload = new K();
264
264
  count = 0;
265
265
  entryOpen = !1;
266
266
  beginEntry() {
@@ -273,7 +273,7 @@ class xe {
273
273
  finish() {
274
274
  if (this.entryOpen)
275
275
  throw new Error("Dictionary entry not completed");
276
- const e = new $();
276
+ const e = new K();
277
277
  return e.writeByte(pe(this.keyType)), e.writeByte(pe(this.valueType)), e.writeVarUInt(this.count), e.writeBytes(this.payload.toUint8Array()), e.toUint8Array();
278
278
  }
279
279
  }
@@ -331,7 +331,7 @@ class Qr {
331
331
  14
332
332
  /* Guid */
333
333
  );
334
- const r = e instanceof m ? e.asBytes() : e;
334
+ const r = e instanceof I ? e.asBytes() : e;
335
335
  if (r.length !== 16)
336
336
  throw new Error("Guid payload must be 16 bytes");
337
337
  this.payload.writeBytes(r), this.keyWritten = !0;
@@ -397,7 +397,7 @@ class Qr {
397
397
  14
398
398
  /* Guid */
399
399
  );
400
- const r = e instanceof m ? e.asBytes() : e;
400
+ const r = e instanceof I ? e.asBytes() : e;
401
401
  if (r.length !== 16)
402
402
  throw new Error("Guid payload must be 16 bytes");
403
403
  this.payload.writeBytes(r), this.valueWritten = !0;
@@ -427,7 +427,7 @@ class Qr {
427
427
  11
428
428
  /* Object */
429
429
  );
430
- const n = new D(e);
430
+ const n = new M(e);
431
431
  r(n);
432
432
  const s = n.finish();
433
433
  this.payload.writeVarUInt(s.length), this.payload.writeBytes(s), this.valueWritten = !0;
@@ -437,7 +437,7 @@ class Qr {
437
437
  9
438
438
  /* Array */
439
439
  );
440
- const n = new we(e);
440
+ const n = new ye(e);
441
441
  r(n);
442
442
  const s = n.finish();
443
443
  this.payload.writeBytes(s), this.valueWritten = !0;
@@ -447,7 +447,7 @@ class Qr {
447
447
  10
448
448
  /* Dict */
449
449
  );
450
- const s = new xe(e, r);
450
+ const s = new We(e, r);
451
451
  n(s);
452
452
  const i = s.finish();
453
453
  this.payload.writeBytes(i), this.valueWritten = !0;
@@ -478,9 +478,9 @@ class X {
478
478
  const r = oe(e);
479
479
  if (r.length < 2)
480
480
  throw new Error("Teleport payload too short");
481
- if (r[0] !== It || r[r.length - 1] !== mt)
481
+ if (r[0] !== Tt || r[r.length - 1] !== St)
482
482
  throw new Error("Teleport object missing markers");
483
- const n = { offset: 1 }, s = U(r, n, "InvalidLength");
483
+ const n = { offset: 1 }, s = D(r, n, "InvalidLength");
484
484
  return new X(r, s, n.offset);
485
485
  }
486
486
  next() {
@@ -498,7 +498,7 @@ class X {
498
498
  if (s >= 0)
499
499
  C(this.buffer, this.offset, s), i = this.buffer.subarray(this.offset, this.offset + s), this.offset += s;
500
500
  else {
501
- const o = { offset: this.offset }, a = U(this.buffer, o, "InvalidLength");
501
+ const o = { offset: this.offset }, a = D(this.buffer, o, "InvalidLength");
502
502
  C(this.buffer, o.offset, a), i = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
503
503
  }
504
504
  return new Zr(e, n, i);
@@ -572,7 +572,7 @@ class F {
572
572
  return this.ensureType(
573
573
  14
574
574
  /* Guid */
575
- ), m.fromBytes(this.payload);
575
+ ), I.fromBytes(this.payload);
576
576
  }
577
577
  asObject() {
578
578
  return this.ensureType(
@@ -584,13 +584,13 @@ class F {
584
584
  return this.ensureType(
585
585
  9
586
586
  /* Array */
587
- ), Ge.create(this.payload);
587
+ ), He.create(this.payload);
588
588
  }
589
589
  asDictionary() {
590
590
  return this.ensureType(
591
591
  10
592
592
  /* Dict */
593
- ), Ve.create(this.payload);
593
+ ), $e.create(this.payload);
594
594
  }
595
595
  ensureType(e) {
596
596
  if (this.type !== e)
@@ -605,7 +605,7 @@ class Zr extends F {
605
605
  return this.type === 1;
606
606
  }
607
607
  }
608
- class Ge {
608
+ class He {
609
609
  payload;
610
610
  elementType;
611
611
  count;
@@ -618,10 +618,10 @@ class Ge {
618
618
  if (this.elementType = r >> 4 & 15, (r & 15) !== 0)
619
619
  throw new Error("Array flags must be zero");
620
620
  const n = { offset: 1 };
621
- this.count = U(e, n, "ArrayMalformed"), this.offset = n.offset;
621
+ this.count = D(e, n, "ArrayMalformed"), this.offset = n.offset;
622
622
  }
623
623
  static create(e) {
624
- return new Ge(oe(e));
624
+ return new He(oe(e));
625
625
  }
626
626
  next() {
627
627
  if (this.index >= this.count) {
@@ -649,23 +649,23 @@ class Ge {
649
649
  }
650
650
  case 12:
651
651
  case 13: {
652
- const e = { offset: this.offset }, r = U(this.payload, e, "ArrayMalformed");
652
+ const e = { offset: this.offset }, r = D(this.payload, e, "ArrayMalformed");
653
653
  C(this.payload, e.offset, r);
654
654
  const n = this.payload.subarray(e.offset, e.offset + r);
655
655
  return this.offset = e.offset + r, new ee(this.elementType, n);
656
656
  }
657
657
  case 11: {
658
- const e = { offset: this.offset }, r = U(this.payload, e, "ArrayMalformed");
658
+ const e = { offset: this.offset }, r = D(this.payload, e, "ArrayMalformed");
659
659
  C(this.payload, e.offset, r);
660
660
  const n = this.payload.subarray(e.offset, e.offset + r);
661
661
  return this.offset = e.offset + r, new ee(11, n);
662
662
  }
663
663
  case 9: {
664
- const e = He(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
664
+ const e = Ye(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
665
665
  return this.offset += e, new ee(9, r);
666
666
  }
667
667
  case 10: {
668
- const e = $e(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
668
+ const e = je(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
669
669
  return this.offset += e, new ee(10, r);
670
670
  }
671
671
  default:
@@ -678,7 +678,7 @@ class ee extends F {
678
678
  super(e, r);
679
679
  }
680
680
  }
681
- class Ve {
681
+ class $e {
682
682
  payload;
683
683
  keyType;
684
684
  valueType;
@@ -690,12 +690,12 @@ class Ve {
690
690
  throw new Error("Dictionary payload too short");
691
691
  if (this.keyType = e[0] >> 4 & 15, this.valueType = e[1] >> 4 & 15, (e[0] & 15) !== 0 || (e[1] & 15) !== 0)
692
692
  throw new Error("Dictionary key/value flags must be zero");
693
- We(this.keyType);
693
+ Ke(this.keyType);
694
694
  const r = { offset: 2 };
695
- this.count = U(e, r, "DictMalformed"), this.offset = r.offset;
695
+ this.count = D(e, r, "DictMalformed"), this.offset = r.offset;
696
696
  }
697
697
  static create(e) {
698
- return new Ve(oe(e));
698
+ return new $e(oe(e));
699
699
  }
700
700
  next() {
701
701
  if (this.index >= this.count) {
@@ -714,7 +714,7 @@ class Ve {
714
714
  return this.offset += e, new F(this.keyType, r);
715
715
  }
716
716
  if (this.keyType === 12 || this.keyType === 13) {
717
- const r = { offset: this.offset }, n = U(this.payload, r, "DictMalformed");
717
+ const r = { offset: this.offset }, n = D(this.payload, r, "DictMalformed");
718
718
  C(this.payload, r.offset, n);
719
719
  const s = this.payload.subarray(r.offset, r.offset + n);
720
720
  return this.offset = r.offset + n, new F(this.keyType, s);
@@ -725,23 +725,23 @@ class Ve {
725
725
  switch (this.valueType) {
726
726
  case 12:
727
727
  case 13: {
728
- const e = { offset: this.offset }, r = U(this.payload, e, "DictMalformed");
728
+ const e = { offset: this.offset }, r = D(this.payload, e, "DictMalformed");
729
729
  C(this.payload, e.offset, r);
730
730
  const n = this.payload.subarray(e.offset, e.offset + r);
731
731
  return this.offset = e.offset + r, new F(this.valueType, n);
732
732
  }
733
733
  case 11: {
734
- const e = { offset: this.offset }, r = U(this.payload, e, "DictMalformed");
734
+ const e = { offset: this.offset }, r = D(this.payload, e, "DictMalformed");
735
735
  C(this.payload, e.offset, r);
736
736
  const n = this.payload.subarray(e.offset, e.offset + r);
737
737
  return this.offset = e.offset + r, new F(11, n);
738
738
  }
739
739
  case 9: {
740
- const e = He(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
740
+ const e = Ye(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
741
741
  return this.offset += e, new F(9, r);
742
742
  }
743
743
  case 10: {
744
- const e = $e(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
744
+ const e = je(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
745
745
  return this.offset += e, new F(10, r);
746
746
  }
747
747
  case 3:
@@ -768,7 +768,7 @@ class qr {
768
768
  this.key = e, this.value = r;
769
769
  }
770
770
  }
771
- class m {
771
+ class I {
772
772
  constructor(e) {
773
773
  this.bytes = e;
774
774
  }
@@ -778,19 +778,19 @@ class m {
778
778
  const r = e.replace(/-/g, "");
779
779
  if (r.length !== 32)
780
780
  throw new Error("Guid string must be 32 hex characters");
781
- const n = new Uint8Array(16), s = m.parseHexSlice(r, 0, 8), i = m.parseHexSlice(r, 8, 4), o = m.parseHexSlice(r, 12, 4);
782
- m.writeUInt32LE(n, 0, s), m.writeUInt16LE(n, 4, i), m.writeUInt16LE(n, 6, o);
781
+ const n = new Uint8Array(16), s = I.parseHexSlice(r, 0, 8), i = I.parseHexSlice(r, 8, 4), o = I.parseHexSlice(r, 12, 4);
782
+ I.writeUInt32LE(n, 0, s), I.writeUInt16LE(n, 4, i), I.writeUInt16LE(n, 6, o);
783
783
  for (let a = 0; a < 8; a++)
784
- n[8 + a] = m.parseHexSlice(r, 16 + a * 2, 2);
785
- return new m(n);
784
+ n[8 + a] = I.parseHexSlice(r, 16 + a * 2, 2);
785
+ return new I(n);
786
786
  }
787
787
  static fromBytes(e) {
788
788
  if (e.length !== 16)
789
789
  throw new Error("Guid byte array must be 16 bytes");
790
- return new m(Uint8Array.from(e));
790
+ return new I(Uint8Array.from(e));
791
791
  }
792
792
  static createZero() {
793
- return new m(new Uint8Array(16));
793
+ return new I(new Uint8Array(16));
794
794
  }
795
795
  static createRandom() {
796
796
  const e = new Uint8Array(16), r = globalThis.crypto;
@@ -799,16 +799,16 @@ class m {
799
799
  else
800
800
  for (let n = 0; n < e.length; n++)
801
801
  e[n] = Math.floor(Math.random() * 256);
802
- return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, new m(e);
802
+ return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, new I(e);
803
803
  }
804
804
  toString() {
805
805
  const e = this.bytes;
806
806
  return [
807
- m.toHex(m.readUInt32LE(e, 0), 8),
808
- m.toHex(m.readUInt16LE(e, 4), 4),
809
- m.toHex(m.readUInt16LE(e, 6), 4),
810
- qe(e.subarray(8, 10)),
811
- qe(e.subarray(10, 16))
807
+ I.toHex(I.readUInt32LE(e, 0), 8),
808
+ I.toHex(I.readUInt16LE(e, 4), 4),
809
+ I.toHex(I.readUInt16LE(e, 6), 4),
810
+ rt(e.subarray(8, 10)),
811
+ rt(e.subarray(10, 16))
812
812
  ].join("-");
813
813
  }
814
814
  asBytes() {
@@ -838,13 +838,13 @@ class m {
838
838
  return (e >>> 0).toString(16).padStart(r, "0");
839
839
  }
840
840
  }
841
- class $ {
841
+ class K {
842
842
  static INITIAL_CAPACITY = 256;
843
843
  buffer;
844
844
  dataView;
845
845
  length = 0;
846
846
  constructor() {
847
- this.buffer = new Uint8Array($.INITIAL_CAPACITY), this.dataView = new DataView(this.buffer.buffer);
847
+ this.buffer = new Uint8Array(K.INITIAL_CAPACITY), this.dataView = new DataView(this.buffer.buffer);
848
848
  }
849
849
  ensureCapacity(e) {
850
850
  const r = this.length + e;
@@ -890,7 +890,7 @@ class $ {
890
890
  return this.buffer.slice(0, this.length);
891
891
  }
892
892
  }
893
- function U(t, e, r) {
893
+ function D(t, e, r) {
894
894
  if (e.offset >= t.length)
895
895
  throw new Error(r);
896
896
  let n = 0, s = 0, i = 0;
@@ -937,7 +937,7 @@ function j(t) {
937
937
  return -1;
938
938
  }
939
939
  }
940
- function We(t) {
940
+ function Ke(t) {
941
941
  if (t === 9 || t === 11 || t === 10 || t === 1)
942
942
  throw new Error("Dictionary keys must be primitive Teleport types");
943
943
  }
@@ -948,67 +948,67 @@ function C(t, e, r) {
948
948
  function rn(t, e) {
949
949
  return (t[e] | t[e + 1] << 8 | t[e + 2] << 16 | t[e + 3] << 24) >>> 0;
950
950
  }
951
- function He(t, e) {
951
+ function Ye(t, e) {
952
952
  if (e >= t.length)
953
953
  throw new Error("Array payload exceeds bounds");
954
954
  const r = t[e], n = r >> 4 & 15;
955
955
  if ((r & 15) !== 0)
956
956
  throw new Error("Array flags must be zero");
957
- const s = { offset: e + 1 }, i = U(t, s, "ArrayMalformed"), o = j(n);
957
+ const s = { offset: e + 1 }, i = D(t, s, "ArrayMalformed"), o = j(n);
958
958
  if (o >= 0) {
959
959
  const c = o * i;
960
960
  return C(t, s.offset, c), s.offset + c - e;
961
961
  }
962
962
  let a = s.offset;
963
963
  for (let c = 0; c < i; c++)
964
- a = be(n, t, a, "ArrayMalformed");
964
+ a = De(n, t, a, "ArrayMalformed");
965
965
  return a - e;
966
966
  }
967
- function $e(t, e) {
967
+ function je(t, e) {
968
968
  if (e + 2 > t.length)
969
969
  throw new Error("Dictionary payload too short");
970
970
  const r = t[e] >> 4 & 15, n = t[e + 1] >> 4 & 15;
971
971
  if ((t[e] & 15) !== 0 || (t[e + 1] & 15) !== 0)
972
972
  throw new Error("Dictionary key/value flags must be zero");
973
- We(r);
974
- const s = { offset: e + 2 }, i = U(t, s, "DictMalformed");
973
+ Ke(r);
974
+ const s = { offset: e + 2 }, i = D(t, s, "DictMalformed");
975
975
  let o = s.offset;
976
976
  for (let a = 0; a < i; a++)
977
- o = be(r, t, o, "DictMalformed"), o = be(n, t, o, "DictMalformed");
977
+ o = De(r, t, o, "DictMalformed"), o = De(n, t, o, "DictMalformed");
978
978
  return o - e;
979
979
  }
980
- function be(t, e, r, n) {
980
+ function De(t, e, r, n) {
981
981
  const s = j(t);
982
982
  if (s >= 0)
983
983
  return C(e, r, s), r + s;
984
984
  switch (t) {
985
985
  case 12:
986
986
  case 13: {
987
- const i = { offset: r }, o = U(e, i, n);
987
+ const i = { offset: r }, o = D(e, i, n);
988
988
  return C(e, i.offset, o), i.offset + o;
989
989
  }
990
990
  case 11: {
991
- const i = { offset: r }, o = U(e, i, n);
991
+ const i = { offset: r }, o = D(e, i, n);
992
992
  return C(e, i.offset, o), i.offset + o;
993
993
  }
994
994
  case 9:
995
- return r + He(e, r);
995
+ return r + Ye(e, r);
996
996
  case 10:
997
- return r + $e(e, r);
997
+ return r + je(e, r);
998
998
  default:
999
999
  throw new Error(`Unsupported Teleport type ${R[t]}`);
1000
1000
  }
1001
1001
  }
1002
- function qe(t) {
1002
+ function rt(t) {
1003
1003
  return Array.from(t).map((e) => e.toString(16).padStart(2, "0")).join("");
1004
1004
  }
1005
1005
  function oe(t) {
1006
1006
  return t instanceof Uint8Array ? t : new Uint8Array(t);
1007
1007
  }
1008
- var _t = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(_t || {}), J = /* @__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))(J || {}), Q = /* @__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))(Q || {}), k = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.WebSocket = 1] = "WebSocket", t[t.WebSocketProxy = 2] = "WebSocketProxy", t[t.WebTransport = 4] = "WebTransport", t[t.WebTransportProxy = 8] = "WebTransportProxy", t[t.Tcp = 16] = "Tcp", t[t.TcpProxy = 32] = "TcpProxy", t[t.Https = 64] = "Https", t))(k || {}), Z = /* @__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))(Z || {}), Tt = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(Tt || {}), q = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(q || {}), St = /* @__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))(St || {}), Ke = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(Ke || {}), wt = /* @__PURE__ */ ((t) => (t[t.Local = 0] = "Local", t[t.Cloud = 1] = "Cloud", t))(wt || {}), At = /* @__PURE__ */ ((t) => (t[t.Bundle = 0] = "Bundle", t[t.GitSource = 1] = "GitSource", t))(At || {}), S = /* @__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.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", t[t.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", 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))(S || {});
1009
- const yt = 1, nn = 1048637, sn = 727023925, on = 3395085689;
1008
+ var wt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(wt || {}), J = /* @__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))(J || {}), Q = /* @__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))(Q || {}), U = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.WebSocket = 1] = "WebSocket", t[t.WebSocketProxy = 2] = "WebSocketProxy", t[t.WebTransport = 4] = "WebTransport", t[t.WebTransportProxy = 8] = "WebTransportProxy", t[t.Tcp = 16] = "Tcp", t[t.TcpProxy = 32] = "TcpProxy", t[t.Https = 64] = "Https", t))(U || {}), Z = /* @__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))(Z || {}), At = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(At || {}), q = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(q || {}), yt = /* @__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))(yt || {}), ze = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(ze || {}), gt = /* @__PURE__ */ ((t) => (t[t.Local = 0] = "Local", t[t.Cloud = 1] = "Cloud", t))(gt || {}), Nt = /* @__PURE__ */ ((t) => (t[t.Bundle = 0] = "Bundle", t[t.GitSource = 1] = "GitSource", t))(Nt || {}), S = /* @__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.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", t[t.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", 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))(S || {});
1009
+ const Ct = 1, nn = 1048637, sn = 727023925, on = 3395085689;
1010
1010
  function an(t) {
1011
- const e = new D(yt);
1011
+ const e = new M(Ct);
1012
1012
  return cn(t, e), e.finish();
1013
1013
  }
1014
1014
  function cn(t, e) {
@@ -1016,19 +1016,19 @@ function cn(t, e) {
1016
1016
  }
1017
1017
  function ln(t, e, r) {
1018
1018
  const n = an(t);
1019
- return P(nn, n, yt, e, r);
1019
+ return P(nn, n, Ct, e, r);
1020
1020
  }
1021
1021
  const un = 467348717, hn = 972460562, dn = 1911490601, fn = 2603556958, En = 3609695522, pn = 4094837378, In = 4257460908;
1022
1022
  function mn(t) {
1023
1023
  const e = {};
1024
- return gt(e), e;
1024
+ return Rt(e), e;
1025
1025
  }
1026
- function gt(t) {
1027
- return t.ParameterIndex = 0, t.TypeName = "", t.ValueJson = "", t.ValueData = new Uint8Array(0), t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.EnumerationId = m.fromBytes(new Uint8Array(16)), t;
1026
+ function Rt(t) {
1027
+ return t.ParameterIndex = 0, t.TypeName = "", t.ValueJson = "", t.ValueData = new Uint8Array(0), t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.EnumerationId = I.fromBytes(new Uint8Array(16)), t;
1028
1028
  }
1029
1029
  function _n(t, e) {
1030
1030
  const r = e ?? mn();
1031
- return gt(r), Tn(t, r), r;
1031
+ return Rt(r), Tn(t, r), r;
1032
1032
  }
1033
1033
  function Tn(t, e) {
1034
1034
  let r;
@@ -1071,243 +1071,253 @@ function Tn(t, e) {
1071
1071
  }
1072
1072
  }
1073
1073
  }
1074
- const Sn = 265814330, wn = 1368629611, An = 2431514951, yn = 2914494629, gn = 3284746250, Nn = 4101844078;
1075
- function Nt(t) {
1074
+ const Sn = 161083277, wn = 265814330, An = 1368629611, yn = 2431514951, gn = 2745379226, Nn = 3282782683, Cn = 3284746250, Rn = 4101844078;
1075
+ function bt(t) {
1076
1076
  const e = {};
1077
- return Ct(e), e;
1077
+ return kt(e), e;
1078
1078
  }
1079
- function Ct(t) {
1080
- return t.Description = "", t.Codec = _t.Unknown, t.SampleRate = 0, t.Channels = 0, t.BitDepth = 0, t.ShapeSets = void 0, t;
1079
+ function kt(t) {
1080
+ return t.StreamId = "", t.Description = "", t.SourceType = "", t.Codec = wt.Unknown, t.CodecDetails = "", t.SampleRate = 0, t.Channels = 0, t.ShapeSets = void 0, t;
1081
1081
  }
1082
- function Cn(t, e) {
1083
- const r = e ?? Nt();
1084
- return Ct(r), Rn(t, r), r;
1082
+ function bn(t, e) {
1083
+ const r = e ?? bt();
1084
+ return kt(r), kn(t, r), r;
1085
1085
  }
1086
- function Rn(t, e) {
1086
+ function kn(t, e) {
1087
1087
  let r;
1088
1088
  for (; (r = t.next()) !== null; )
1089
1089
  switch (r.fieldId) {
1090
1090
  case Sn: {
1091
+ if (r.isNull) throw new Error();
1092
+ e.StreamId = r.asString();
1093
+ break;
1094
+ }
1095
+ case wn: {
1091
1096
  if (r.isNull) {
1092
1097
  e.ShapeSets = void 0;
1093
1098
  break;
1094
1099
  }
1095
- e.ShapeSets = bn(r.asArray());
1100
+ e.ShapeSets = Un(r.asArray());
1096
1101
  break;
1097
1102
  }
1098
- case wn: {
1103
+ case An: {
1099
1104
  if (r.isNull) throw new Error();
1100
1105
  e.Description = r.asString();
1101
1106
  break;
1102
1107
  }
1103
- case An: {
1108
+ case yn: {
1104
1109
  if (r.isNull) throw new Error();
1105
1110
  e.Channels = r.asInt32();
1106
1111
  break;
1107
1112
  }
1108
- case yn: {
1113
+ case gn: {
1109
1114
  if (r.isNull) throw new Error();
1110
- e.BitDepth = r.asInt32();
1115
+ e.CodecDetails = r.asString();
1111
1116
  break;
1112
1117
  }
1113
- case gn: {
1118
+ case Nn: {
1119
+ if (r.isNull) throw new Error();
1120
+ e.SourceType = r.asString();
1121
+ break;
1122
+ }
1123
+ case Cn: {
1114
1124
  if (r.isNull) throw new Error();
1115
1125
  e.Codec = r.asInt32();
1116
1126
  break;
1117
1127
  }
1118
- case Nn: {
1128
+ case Rn: {
1119
1129
  if (r.isNull) throw new Error();
1120
1130
  e.SampleRate = r.asInt32();
1121
1131
  break;
1122
1132
  }
1123
1133
  }
1124
1134
  }
1125
- function bn(t) {
1135
+ function Un(t) {
1126
1136
  const e = [];
1127
1137
  let r;
1128
1138
  for (; (r = t.next()) !== null; )
1129
- e.push(On(r.asObject()));
1139
+ e.push(vn(r.asObject()));
1130
1140
  return e;
1131
1141
  }
1132
- const kn = 1107713536, Un = 1154362099, Dn = 1185721362;
1133
- function Mn(t) {
1142
+ const Dn = 1107713536, Mn = 1154362099, On = 1185721362;
1143
+ function Ln(t) {
1134
1144
  const e = {};
1135
- return Rt(e), e;
1145
+ return Ut(e), e;
1136
1146
  }
1137
- function Rt(t) {
1147
+ function Ut(t) {
1138
1148
  return t.SetId = 0, t.Name = "", t.ShapeNames = [], t;
1139
1149
  }
1140
- function On(t, e) {
1141
- const r = e ?? Mn();
1142
- return Rt(r), Ln(t, r), r;
1150
+ function vn(t, e) {
1151
+ const r = e ?? Ln();
1152
+ return Ut(r), Fn(t, r), r;
1143
1153
  }
1144
- function Ln(t, e) {
1154
+ function Fn(t, e) {
1145
1155
  let r;
1146
1156
  for (; (r = t.next()) !== null; )
1147
1157
  switch (r.fieldId) {
1148
- case kn: {
1158
+ case Dn: {
1149
1159
  if (r.isNull) throw new Error();
1150
1160
  e.Name = r.asString();
1151
1161
  break;
1152
1162
  }
1153
- case Un: {
1163
+ case Mn: {
1154
1164
  if (r.isNull) throw new Error();
1155
1165
  e.SetId = r.asUInt32();
1156
1166
  break;
1157
1167
  }
1158
- case Dn: {
1168
+ case On: {
1159
1169
  if (r.isNull) throw new Error();
1160
- e.ShapeNames = vn(r.asArray());
1170
+ e.ShapeNames = Pn(r.asArray());
1161
1171
  break;
1162
1172
  }
1163
1173
  }
1164
1174
  }
1165
- function vn(t) {
1175
+ function Pn(t) {
1166
1176
  const e = [];
1167
1177
  let r;
1168
1178
  for (; (r = t.next()) !== null; )
1169
1179
  e.push(r.asString());
1170
1180
  return e;
1171
1181
  }
1172
- const Fn = 76337612, Pn = 185396121, Bn = 388632637, xn = 417197284, Gn = 469070965, Vn = 470595159, Wn = 781727218, Hn = 834078886, $n = 1043273762, Kn = 1236999138, Yn = 1368629611, jn = 1715899485, zn = 1942830531, Xn = 1999510636, Jn = 2079864626, Qn = 2142346422, Zn = 2598291686, qn = 2719718823, es = 2810953526, ts = 2840065720, rs = 2885165957, ns = 3586157513, ss = 3717933110, is = 4062655306;
1173
- function ke(t) {
1182
+ const Bn = 76337612, xn = 185396121, Gn = 388632637, Vn = 417197284, Wn = 469070965, Hn = 470595159, $n = 781727218, Kn = 834078886, Yn = 1043273762, jn = 1236999138, zn = 1368629611, Xn = 1715899485, Jn = 1942830531, Qn = 1999510636, Zn = 2079864626, qn = 2142346422, es = 2598291686, ts = 2719718823, rs = 2810953526, ns = 2840065720, ss = 2885165957, is = 3586157513, os = 3717933110, as = 4062655306;
1183
+ function Me(t) {
1174
1184
  const e = {};
1175
- return bt(e), e;
1185
+ return Dt(e), e;
1176
1186
  }
1177
- function bt(t) {
1178
- return t.ContextType = Q.Unknown, t.UserType = q.Unknown, t.PayloadType = Z.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 = J.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = Ke.Unknown, t;
1187
+ function Dt(t) {
1188
+ return t.ContextType = Q.Unknown, t.UserType = q.Unknown, t.PayloadType = Z.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 = J.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = ze.Unknown, t;
1179
1189
  }
1180
- function Ue(t, e) {
1181
- const r = e ?? ke();
1182
- return bt(r), os(t, r), r;
1190
+ function Oe(t, e) {
1191
+ const r = e ?? Me();
1192
+ return Dt(r), cs(t, r), r;
1183
1193
  }
1184
- function os(t, e) {
1194
+ function cs(t, e) {
1185
1195
  let r;
1186
1196
  for (; (r = t.next()) !== null; )
1187
1197
  switch (r.fieldId) {
1188
- case Fn: {
1198
+ case Bn: {
1189
1199
  if (r.isNull) throw new Error();
1190
1200
  e.DeviceId = r.asString();
1191
1201
  break;
1192
1202
  }
1193
- case Pn: {
1203
+ case xn: {
1194
1204
  if (r.isNull) throw new Error();
1195
1205
  e.InstallId = r.asString();
1196
1206
  break;
1197
1207
  }
1198
- case Bn: {
1208
+ case Gn: {
1199
1209
  if (r.isNull) throw new Error();
1200
1210
  e.UserAgent = r.asString();
1201
1211
  break;
1202
1212
  }
1203
- case xn: {
1213
+ case Vn: {
1204
1214
  if (r.isNull) throw new Error();
1205
1215
  e.ContextType = r.asInt32();
1206
1216
  break;
1207
1217
  }
1208
- case Gn: {
1218
+ case Wn: {
1209
1219
  if (r.isNull) throw new Error();
1210
1220
  e.HasInput = r.asBool();
1211
1221
  break;
1212
1222
  }
1213
- case Vn: {
1223
+ case Hn: {
1214
1224
  if (r.isNull) throw new Error();
1215
1225
  e.UserType = r.asInt32();
1216
1226
  break;
1217
1227
  }
1218
- case Wn: {
1228
+ case $n: {
1219
1229
  if (r.isNull) throw new Error();
1220
1230
  e.UserId = r.asString();
1221
1231
  break;
1222
1232
  }
1223
- case Hn: {
1233
+ case Kn: {
1224
1234
  if (r.isNull) throw new Error();
1225
1235
  e.ProductId = r.asString();
1226
1236
  break;
1227
1237
  }
1228
- case $n: {
1238
+ case Yn: {
1229
1239
  if (r.isNull) throw new Error();
1230
1240
  e.AuthSessionId = r.asString();
1231
1241
  break;
1232
1242
  }
1233
- case Kn: {
1243
+ case jn: {
1234
1244
  if (r.isNull) throw new Error();
1235
1245
  e.ReceiveAllMessages = r.asBool();
1236
1246
  break;
1237
1247
  }
1238
- case Yn: {
1248
+ case zn: {
1239
1249
  if (r.isNull) throw new Error();
1240
1250
  e.Description = r.asString();
1241
1251
  break;
1242
1252
  }
1243
- case jn: {
1253
+ case Xn: {
1244
1254
  if (r.isNull) throw new Error();
1245
1255
  e.Locale = r.asString();
1246
1256
  break;
1247
1257
  }
1248
- case zn: {
1258
+ case Jn: {
1249
1259
  if (r.isNull) throw new Error();
1250
1260
  e.SdkType = r.asInt32();
1251
1261
  break;
1252
1262
  }
1253
- case Xn: {
1263
+ case Qn: {
1254
1264
  if (r.isNull) throw new Error();
1255
1265
  e.SessionId = r.asInt32();
1256
1266
  break;
1257
1267
  }
1258
- case Jn: {
1268
+ case Zn: {
1259
1269
  if (r.isNull) throw new Error();
1260
1270
  e.PreciseJoinedAt = r.asUInt64();
1261
1271
  break;
1262
1272
  }
1263
- case Qn: {
1273
+ case qn: {
1264
1274
  if (r.isNull) throw new Error();
1265
1275
  e.PayloadType = r.asInt32();
1266
1276
  break;
1267
1277
  }
1268
- case Zn: {
1278
+ case es: {
1269
1279
  if (r.isNull) throw new Error();
1270
1280
  e.VersionId = r.asString();
1271
1281
  break;
1272
1282
  }
1273
- case qn: {
1283
+ case ts: {
1274
1284
  if (r.isNull) throw new Error();
1275
1285
  e.UniqueSessionId = r.asString();
1276
1286
  break;
1277
1287
  }
1278
- case es: {
1288
+ case rs: {
1279
1289
  if (r.isNull) throw new Error();
1280
1290
  e.ClientType = r.asInt32();
1281
1291
  break;
1282
1292
  }
1283
- case ts: {
1293
+ case ns: {
1284
1294
  if (r.isNull) throw new Error();
1285
1295
  e.IsReady = r.asBool();
1286
1296
  break;
1287
1297
  }
1288
- case rs: {
1298
+ case ss: {
1289
1299
  if (r.isNull) throw new Error();
1290
- e.Parameters = as(r.asDictionary());
1300
+ e.Parameters = ls(r.asDictionary());
1291
1301
  break;
1292
1302
  }
1293
- case ns: {
1303
+ case is: {
1294
1304
  if (r.isNull) throw new Error();
1295
1305
  e.IsInternal = r.asBool();
1296
1306
  break;
1297
1307
  }
1298
- case ss: {
1308
+ case os: {
1299
1309
  if (r.isNull) throw new Error();
1300
1310
  e.ChannelLocale = r.asString();
1301
1311
  break;
1302
1312
  }
1303
- case is: {
1313
+ case as: {
1304
1314
  if (r.isNull) throw new Error();
1305
1315
  e.EmbeddedSpaceId = r.asString();
1306
1316
  break;
1307
1317
  }
1308
1318
  }
1309
1319
  }
1310
- function as(t) {
1320
+ function ls(t) {
1311
1321
  const e = /* @__PURE__ */ Object.create(null);
1312
1322
  let r;
1313
1323
  for (; (r = t.next()) !== null; ) {
@@ -1316,138 +1326,138 @@ function as(t) {
1316
1326
  }
1317
1327
  return e;
1318
1328
  }
1319
- const cs = 746516514, ls = 877841741, us = 1175184220, hs = 1368629611, ds = 2341021724, fs = 3167053791, Es = 3686066300;
1320
- function ps(t) {
1329
+ const us = 746516514, hs = 877841741, ds = 1175184220, fs = 1368629611, Es = 2341021724, ps = 3167053791, Is = 3686066300;
1330
+ function ms(t) {
1321
1331
  const e = {};
1322
- return kt(e), e;
1332
+ return Mt(e), e;
1323
1333
  }
1324
- function kt(t) {
1325
- return t.Type = k.None, t.Uri = "", t.OpcodeGroupsFromServer = S.NONE, t.OpcodeGroupsToServer = S.NONE, t.Priority = 0, t.Description = "", t.AuthTicket = new Uint8Array(0), t;
1334
+ function Mt(t) {
1335
+ return t.Type = U.None, t.Uri = "", t.OpcodeGroupsFromServer = S.NONE, t.OpcodeGroupsToServer = S.NONE, t.Priority = 0, t.Description = "", t.AuthTicket = new Uint8Array(0), t;
1326
1336
  }
1327
- function Is(t, e) {
1328
- const r = e ?? ps();
1329
- return kt(r), ms(t, r), r;
1337
+ function _s(t, e) {
1338
+ const r = e ?? ms();
1339
+ return Mt(r), Ts(t, r), r;
1330
1340
  }
1331
- function ms(t, e) {
1341
+ function Ts(t, e) {
1332
1342
  let r;
1333
1343
  for (; (r = t.next()) !== null; )
1334
1344
  switch (r.fieldId) {
1335
- case cs: {
1345
+ case us: {
1336
1346
  if (r.isNull) throw new Error();
1337
1347
  e.AuthTicket = r.asBinary();
1338
1348
  break;
1339
1349
  }
1340
- case ls: {
1350
+ case hs: {
1341
1351
  if (r.isNull) throw new Error();
1342
1352
  e.Priority = r.asInt32();
1343
1353
  break;
1344
1354
  }
1345
- case us: {
1355
+ case ds: {
1346
1356
  if (r.isNull) throw new Error();
1347
1357
  e.OpcodeGroupsFromServer = r.asInt32();
1348
1358
  break;
1349
1359
  }
1350
- case hs: {
1360
+ case fs: {
1351
1361
  if (r.isNull) throw new Error();
1352
1362
  e.Description = r.asString();
1353
1363
  break;
1354
1364
  }
1355
- case ds: {
1365
+ case Es: {
1356
1366
  if (r.isNull) throw new Error();
1357
1367
  e.Uri = r.asString();
1358
1368
  break;
1359
1369
  }
1360
- case fs: {
1370
+ case ps: {
1361
1371
  if (r.isNull) throw new Error();
1362
1372
  e.Type = r.asInt32();
1363
1373
  break;
1364
1374
  }
1365
- case Es: {
1375
+ case Is: {
1366
1376
  if (r.isNull) throw new Error();
1367
1377
  e.OpcodeGroupsToServer = r.asInt32();
1368
1378
  break;
1369
1379
  }
1370
1380
  }
1371
1381
  }
1372
- const _s = 65537, Ts = 166277978, Ss = 1482635149, ws = 1559330978, As = 2802434353, ys = 3085883711, gs = 3669484338, Ns = 3707543140, Cs = 3712281496, Rs = 3823842552;
1373
- function bs(t) {
1382
+ const Ss = 65537, ws = 166277978, As = 1482635149, ys = 1559330978, gs = 2802434353, Ns = 3085883711, Cs = 3669484338, Rs = 3707543140, bs = 3712281496, ks = 3823842552;
1383
+ function Us(t) {
1374
1384
  const e = {};
1375
- return Ut(e), e;
1385
+ return Ot(e), e;
1376
1386
  }
1377
- function Ut(t) {
1378
- return t.ClientContext = ke(), t.ServerContext = ke(), t.CertHash = "", t.Entrypoints = [], t.FeatureFlags = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.ChannelInstanceId = "", t.PrimaryUserId = "", t;
1387
+ function Ot(t) {
1388
+ return t.ClientContext = Me(), t.ServerContext = Me(), t.CertHash = "", t.Entrypoints = [], t.FeatureFlags = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.ChannelInstanceId = "", t.PrimaryUserId = "", t;
1379
1389
  }
1380
- function ks(t, e) {
1390
+ function Ds(t, e) {
1381
1391
  const r = X.create(t);
1382
- return Us(r, e);
1392
+ return Ms(r, e);
1383
1393
  }
1384
- function Us(t, e) {
1385
- const r = e ?? bs();
1386
- return Ut(r), Ds(t, r), r;
1394
+ function Ms(t, e) {
1395
+ const r = e ?? Us();
1396
+ return Ot(r), Os(t, r), r;
1387
1397
  }
1388
- function Ds(t, e) {
1398
+ function Os(t, e) {
1389
1399
  let r;
1390
1400
  for (; (r = t.next()) !== null; )
1391
1401
  switch (r.fieldId) {
1392
- case Ts: {
1402
+ case ws: {
1393
1403
  if (r.isNull) throw new Error();
1394
1404
  e.CertHash = r.asString();
1395
1405
  break;
1396
1406
  }
1397
- case Ss: {
1407
+ case As: {
1398
1408
  if (r.isNull) throw new Error();
1399
- e.Entrypoints = Os(r.asArray());
1409
+ e.Entrypoints = vs(r.asArray());
1400
1410
  break;
1401
1411
  }
1402
- case ws: {
1412
+ case ys: {
1403
1413
  if (r.isNull) throw new Error();
1404
1414
  e.ChannelId = r.asString();
1405
1415
  break;
1406
1416
  }
1407
- case As: {
1417
+ case gs: {
1408
1418
  if (r.isNull) throw new Error();
1409
- e.ClientContext = Ue(r.asObject());
1419
+ e.ClientContext = Oe(r.asObject());
1410
1420
  break;
1411
1421
  }
1412
- case ys: {
1422
+ case Ns: {
1413
1423
  if (r.isNull) throw new Error();
1414
- e.ServerContext = Ue(r.asObject());
1424
+ e.ServerContext = Oe(r.asObject());
1415
1425
  break;
1416
1426
  }
1417
- case gs: {
1427
+ case Cs: {
1418
1428
  if (r.isNull) throw new Error();
1419
- e.FeatureFlags = Ls(r.asDictionary());
1429
+ e.FeatureFlags = Fs(r.asDictionary());
1420
1430
  break;
1421
1431
  }
1422
- case Ns: {
1432
+ case Rs: {
1423
1433
  if (r.isNull) throw new Error();
1424
1434
  e.SpaceId = r.asString();
1425
1435
  break;
1426
1436
  }
1427
- case Cs: {
1437
+ case bs: {
1428
1438
  if (r.isNull) throw new Error();
1429
1439
  e.PrimaryUserId = r.asString();
1430
1440
  break;
1431
1441
  }
1432
- case Rs: {
1442
+ case ks: {
1433
1443
  if (r.isNull) throw new Error();
1434
1444
  e.ChannelInstanceId = r.asString();
1435
1445
  break;
1436
1446
  }
1437
1447
  }
1438
1448
  }
1439
- async function Ms(t, e) {
1440
- const r = await Be(t, _s);
1441
- return ks(r, e);
1449
+ async function Ls(t, e) {
1450
+ const r = await Ve(t, Ss);
1451
+ return Ds(r, e);
1442
1452
  }
1443
- function Os(t) {
1453
+ function vs(t) {
1444
1454
  const e = [];
1445
1455
  let r;
1446
1456
  for (; (r = t.next()) !== null; )
1447
- e.push(Is(r.asObject()));
1457
+ e.push(_s(r.asObject()));
1448
1458
  return e;
1449
1459
  }
1450
- function Ls(t) {
1460
+ function Fs(t) {
1451
1461
  const e = /* @__PURE__ */ Object.create(null);
1452
1462
  let r;
1453
1463
  for (; (r = t.next()) !== null; ) {
@@ -1456,883 +1466,888 @@ function Ls(t) {
1456
1466
  }
1457
1467
  return e;
1458
1468
  }
1459
- function vs(t) {
1469
+ function Ps(t) {
1460
1470
  const e = {};
1461
- return Fs(e), t && Object.assign(e, t), e;
1471
+ return Bs(e), t && Object.assign(e, t), e;
1462
1472
  }
1463
- function Fs(t) {
1464
- return t.ServerSessionId = "", t.ContextType = Q.Unknown, t.UserType = q.Unknown, t.PayloadType = Z.Unknown, t.IsInternal = !1, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.OpcodeGroupsFromServer = S.NONE, t.OpcodeGroupsToServer = S.NONE, t.ProtocolVersion = 0, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.UserAgent = "", t.ClientType = J.Unknown, t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = Ke.Unknown, t;
1473
+ function Bs(t) {
1474
+ return t.ServerSessionId = "", t.ContextType = Q.Unknown, t.UserType = q.Unknown, t.PayloadType = Z.Unknown, t.IsInternal = !1, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.OpcodeGroupsFromServer = S.NONE, t.OpcodeGroupsToServer = S.NONE, t.ProtocolVersion = 0, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.UserAgent = "", t.ClientType = J.Unknown, t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = ze.Unknown, t;
1465
1475
  }
1466
- const Dt = 1, Ps = 1048632, Bs = 3748161056, xs = 4289118421;
1467
- function Gs(t) {
1476
+ const Lt = 1, xs = 1048632, Gs = 3748161056, Vs = 4289118421;
1477
+ function Ws(t) {
1468
1478
  const e = {};
1469
- return Vs(e), t && Object.assign(e, t), e;
1479
+ return Hs(e), t && Object.assign(e, t), e;
1470
1480
  }
1471
- function Vs(t) {
1472
- return t.CallId = m.fromBytes(new Uint8Array(16)), t.InstanceId = m.fromBytes(new Uint8Array(16)), t;
1481
+ function Hs(t) {
1482
+ return t.CallId = I.fromBytes(new Uint8Array(16)), t.InstanceId = I.fromBytes(new Uint8Array(16)), t;
1473
1483
  }
1474
- function Ws(t) {
1475
- const e = new D(Dt);
1476
- return Hs(t, e), e.finish();
1484
+ function $s(t) {
1485
+ const e = new M(Lt);
1486
+ return Ks(t, e), e.finish();
1477
1487
  }
1478
- function Hs(t, e) {
1479
- e.writeGuidField(Bs, t.CallId), e.writeGuidField(xs, t.InstanceId);
1488
+ function Ks(t, e) {
1489
+ e.writeGuidField(Gs, t.CallId), e.writeGuidField(Vs, t.InstanceId);
1480
1490
  }
1481
- function $s(t, e, r) {
1482
- const n = Ws(t);
1483
- return P(Ps, n, Dt, e, r);
1491
+ function Ys(t, e, r) {
1492
+ const n = $s(t);
1493
+ return P(xs, n, Lt, e, r);
1484
1494
  }
1485
- const Ks = 1048601, Ys = 112005851, js = 814454131, zs = 976255570, Xs = 2885165957, Js = 3748161056, Qs = 4289118421;
1486
- function Zs(t) {
1495
+ const js = 1048601, zs = 112005851, Xs = 814454131, Js = 976255570, Qs = 2885165957, Zs = 3748161056, qs = 4289118421;
1496
+ function ei(t) {
1487
1497
  const e = {};
1488
- return Mt(e), e;
1498
+ return vt(e), e;
1489
1499
  }
1490
- function Mt(t) {
1491
- return t.FunctionId = m.fromBytes(new Uint8Array(16)), t.CallId = m.fromBytes(new Uint8Array(16)), t.InstanceId = m.fromBytes(new Uint8Array(16)), t.FunctionName = "", t.Parameters = [], t.Scopes = [], t;
1500
+ function vt(t) {
1501
+ return t.FunctionId = I.fromBytes(new Uint8Array(16)), t.CallId = I.fromBytes(new Uint8Array(16)), t.InstanceId = I.fromBytes(new Uint8Array(16)), t.FunctionName = "", t.Parameters = [], t.Scopes = [], t;
1492
1502
  }
1493
- function qs(t, e) {
1503
+ function ti(t, e) {
1494
1504
  const r = X.create(t);
1495
- return ei(r, e);
1505
+ return ri(r, e);
1496
1506
  }
1497
- function ei(t, e) {
1498
- const r = e ?? Zs();
1499
- return Mt(r), ti(t, r), r;
1507
+ function ri(t, e) {
1508
+ const r = e ?? ei();
1509
+ return vt(r), ni(t, r), r;
1500
1510
  }
1501
- function ti(t, e) {
1511
+ function ni(t, e) {
1502
1512
  let r;
1503
1513
  for (; (r = t.next()) !== null; )
1504
1514
  switch (r.fieldId) {
1505
- case Ys: {
1515
+ case zs: {
1506
1516
  if (r.isNull) throw new Error();
1507
- e.Scopes = ni(r.asArray());
1517
+ e.Scopes = ii(r.asArray());
1508
1518
  break;
1509
1519
  }
1510
- case js: {
1520
+ case Xs: {
1511
1521
  if (r.isNull) throw new Error();
1512
1522
  e.FunctionName = r.asString();
1513
1523
  break;
1514
1524
  }
1515
- case zs: {
1525
+ case Js: {
1516
1526
  if (r.isNull) throw new Error();
1517
1527
  e.FunctionId = r.asGuid();
1518
1528
  break;
1519
1529
  }
1520
- case Xs: {
1530
+ case Qs: {
1521
1531
  if (r.isNull) throw new Error();
1522
- e.Parameters = si(r.asArray());
1532
+ e.Parameters = oi(r.asArray());
1523
1533
  break;
1524
1534
  }
1525
- case Js: {
1535
+ case Zs: {
1526
1536
  if (r.isNull) throw new Error();
1527
1537
  e.CallId = r.asGuid();
1528
1538
  break;
1529
1539
  }
1530
- case Qs: {
1540
+ case qs: {
1531
1541
  if (r.isNull) throw new Error();
1532
1542
  e.InstanceId = r.asGuid();
1533
1543
  break;
1534
1544
  }
1535
1545
  }
1536
1546
  }
1537
- async function ri(t, e) {
1538
- const r = await Be(t, Ks);
1539
- return qs(r, e);
1547
+ async function si(t, e) {
1548
+ const r = await Ve(t, js);
1549
+ return ti(r, e);
1540
1550
  }
1541
- function ni(t) {
1551
+ function ii(t) {
1542
1552
  const e = [];
1543
1553
  let r;
1544
1554
  for (; (r = t.next()) !== null; )
1545
- e.push(ci(r.asObject()));
1555
+ e.push(ui(r.asObject()));
1546
1556
  return e;
1547
1557
  }
1548
- function si(t) {
1558
+ function oi(t) {
1549
1559
  const e = [];
1550
1560
  let r;
1551
1561
  for (; (r = t.next()) !== null; )
1552
1562
  e.push(_n(r.asObject()));
1553
1563
  return e;
1554
1564
  }
1555
- const ii = 2994044322, oi = 3167053791;
1556
- function ai(t) {
1565
+ const ai = 2994044322, ci = 3167053791;
1566
+ function li(t) {
1557
1567
  const e = {};
1558
- return Ot(e), e;
1568
+ return Ft(e), e;
1559
1569
  }
1560
- function Ot(t) {
1570
+ function Ft(t) {
1561
1571
  return t.Type = "", t.Id = "", t;
1562
1572
  }
1563
- function ci(t, e) {
1564
- const r = e ?? ai();
1565
- return Ot(r), li(t, r), r;
1573
+ function ui(t, e) {
1574
+ const r = e ?? li();
1575
+ return Ft(r), hi(t, r), r;
1566
1576
  }
1567
- function li(t, e) {
1577
+ function hi(t, e) {
1568
1578
  let r;
1569
1579
  for (; (r = t.next()) !== null; )
1570
1580
  switch (r.fieldId) {
1571
- case ii: {
1581
+ case ai: {
1572
1582
  if (r.isNull) throw new Error();
1573
1583
  e.Id = r.asString();
1574
1584
  break;
1575
1585
  }
1576
- case oi: {
1586
+ case ci: {
1577
1587
  if (r.isNull) throw new Error();
1578
1588
  e.Type = r.asString();
1579
1589
  break;
1580
1590
  }
1581
1591
  }
1582
1592
  }
1583
- const Lt = 1, ui = 1048631, hi = 2205234621, di = 2838554230, fi = 3748161056, Ei = 4194102057, pi = 4289118421;
1584
- function Ii(t) {
1593
+ const Pt = 1, di = 1048631, fi = 2205234621, Ei = 2838554230, pi = 3748161056, Ii = 4194102057, mi = 4289118421;
1594
+ function _i(t) {
1585
1595
  const e = {};
1586
- return mi(e), t && Object.assign(e, t), e;
1596
+ return Ti(e), t && Object.assign(e, t), e;
1587
1597
  }
1588
- function mi(t) {
1589
- return t.CallId = m.fromBytes(new Uint8Array(16)), t.InstanceId = m.fromBytes(new Uint8Array(16)), t.ErrorMessage = "", t.ErrorTypeName = "", t.StackTrace = "", t;
1598
+ function Ti(t) {
1599
+ return t.CallId = I.fromBytes(new Uint8Array(16)), t.InstanceId = I.fromBytes(new Uint8Array(16)), t.ErrorMessage = "", t.ErrorTypeName = "", t.StackTrace = "", t;
1590
1600
  }
1591
- function _i(t) {
1592
- const e = new D(Lt);
1593
- return Ti(t, e), e.finish();
1601
+ function Si(t) {
1602
+ const e = new M(Pt);
1603
+ return wi(t, e), e.finish();
1594
1604
  }
1595
- function Ti(t, e) {
1596
- e.writeStringField(hi, t.ErrorTypeName), e.writeStringField(di, t.ErrorMessage), e.writeGuidField(fi, t.CallId), e.writeStringField(Ei, t.StackTrace), e.writeGuidField(pi, t.InstanceId);
1605
+ function wi(t, e) {
1606
+ e.writeStringField(fi, t.ErrorTypeName), e.writeStringField(Ei, t.ErrorMessage), e.writeGuidField(pi, t.CallId), e.writeStringField(Ii, t.StackTrace), e.writeGuidField(mi, t.InstanceId);
1597
1607
  }
1598
- function Si(t, e, r) {
1599
- const n = _i(t);
1600
- return P(ui, n, Lt, e, r);
1608
+ function Ai(t, e, r) {
1609
+ const n = Si(t);
1610
+ return P(di, n, Pt, e, r);
1601
1611
  }
1602
- const Ye = 1, wi = 1048600, vt = 703025676, Ft = 814454131, Pt = 972460562, Bt = 976255570, xt = 1368629611, Gt = 1479280922, Vt = 1533537016, Wt = 2274386296, Ht = 2603556958, $t = 2885165957, Kt = 3568439632;
1603
- function Ai(t) {
1612
+ const Xe = 1, yi = 1048600, Bt = 703025676, xt = 814454131, Gt = 972460562, Vt = 976255570, Wt = 1368629611, Ht = 1479280922, $t = 1533537016, Kt = 2274386296, Yt = 2603556958, jt = 2885165957, zt = 3568439632;
1613
+ function gi(t) {
1604
1614
  const e = {};
1605
- return Yt(e), e;
1615
+ return Xt(e), e;
1606
1616
  }
1607
- function Yt(t) {
1608
- return t.FunctionId = m.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;
1617
+ function Xt(t) {
1618
+ return t.FunctionId = I.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;
1609
1619
  }
1610
- function yi(t) {
1611
- const e = new D(Ye);
1612
- return jt(t, e), e.finish();
1620
+ function Ni(t) {
1621
+ const e = new M(Xe);
1622
+ return Jt(t, e), e.finish();
1613
1623
  }
1614
- function jt(t, e) {
1615
- e.writeStringField(vt, t.ResultTypeName), e.writeStringField(Ft, t.FunctionName), e.writeStringField(Pt, t.EnumerableItemTypeName), e.writeGuidField(Bt, t.FunctionId), e.writeStringField(xt, t.Description), e.writeBoolField(Gt, t.IsCancellable), e.writeBoolField(Vt, t.RequiresInstance), e.writeBoolField(Wt, t.LlmInlineResult), e.writeBoolField(Ht, t.IsEnumerable), e.writeArrayField($t, R.Object, (r) => {
1624
+ function Jt(t, e) {
1625
+ e.writeStringField(Bt, t.ResultTypeName), e.writeStringField(xt, t.FunctionName), e.writeStringField(Gt, t.EnumerableItemTypeName), e.writeGuidField(Vt, t.FunctionId), e.writeStringField(Wt, t.Description), e.writeBoolField(Ht, t.IsCancellable), e.writeBoolField($t, t.RequiresInstance), e.writeBoolField(Kt, t.LlmInlineResult), e.writeBoolField(Yt, t.IsEnumerable), e.writeArrayField(jt, R.Object, (r) => {
1616
1626
  for (const n of t.Parameters)
1617
- r.writeObject(bi, (s) => {
1618
- Ui(n, s);
1627
+ r.writeObject(Ui, (s) => {
1628
+ Mi(n, s);
1619
1629
  });
1620
- }), e.writeBoolField(Kt, t.LlmCallOnlyOnce);
1630
+ }), e.writeBoolField(zt, t.LlmCallOnlyOnce);
1621
1631
  }
1622
- function gi(t, e) {
1623
- const r = e ?? Ai();
1624
- return Yt(r), Ni(t, r), r;
1632
+ function Ci(t, e) {
1633
+ const r = e ?? gi();
1634
+ return Xt(r), Ri(t, r), r;
1625
1635
  }
1626
- function Ni(t, e) {
1636
+ function Ri(t, e) {
1627
1637
  let r;
1628
1638
  for (; (r = t.next()) !== null; )
1629
1639
  switch (r.fieldId) {
1630
- case vt: {
1640
+ case Bt: {
1631
1641
  if (r.isNull) throw new Error();
1632
1642
  e.ResultTypeName = r.asString();
1633
1643
  break;
1634
1644
  }
1635
- case Ft: {
1645
+ case xt: {
1636
1646
  if (r.isNull) throw new Error();
1637
1647
  e.FunctionName = r.asString();
1638
1648
  break;
1639
1649
  }
1640
- case Pt: {
1650
+ case Gt: {
1641
1651
  if (r.isNull) throw new Error();
1642
1652
  e.EnumerableItemTypeName = r.asString();
1643
1653
  break;
1644
1654
  }
1645
- case Bt: {
1655
+ case Vt: {
1646
1656
  if (r.isNull) throw new Error();
1647
1657
  e.FunctionId = r.asGuid();
1648
1658
  break;
1649
1659
  }
1650
- case xt: {
1660
+ case Wt: {
1651
1661
  if (r.isNull) throw new Error();
1652
1662
  e.Description = r.asString();
1653
1663
  break;
1654
1664
  }
1655
- case Gt: {
1665
+ case Ht: {
1656
1666
  if (r.isNull) throw new Error();
1657
1667
  e.IsCancellable = r.asBool();
1658
1668
  break;
1659
1669
  }
1660
- case Vt: {
1670
+ case $t: {
1661
1671
  if (r.isNull) throw new Error();
1662
1672
  e.RequiresInstance = r.asBool();
1663
1673
  break;
1664
1674
  }
1665
- case Wt: {
1675
+ case Kt: {
1666
1676
  if (r.isNull) throw new Error();
1667
1677
  e.LlmInlineResult = r.asBool();
1668
1678
  break;
1669
1679
  }
1670
- case Ht: {
1680
+ case Yt: {
1671
1681
  if (r.isNull) throw new Error();
1672
1682
  e.IsEnumerable = r.asBool();
1673
1683
  break;
1674
1684
  }
1675
- case $t: {
1685
+ case jt: {
1676
1686
  if (r.isNull) throw new Error();
1677
- e.Parameters = Ri(r.asArray());
1687
+ e.Parameters = ki(r.asArray());
1678
1688
  break;
1679
1689
  }
1680
- case Kt: {
1690
+ case zt: {
1681
1691
  if (r.isNull) throw new Error();
1682
1692
  e.LlmCallOnlyOnce = r.asBool();
1683
1693
  break;
1684
1694
  }
1685
1695
  }
1686
1696
  }
1687
- function Ci(t, e, r) {
1688
- const n = yi(t);
1689
- return P(wi, n, Ye, e, r);
1697
+ function bi(t, e, r) {
1698
+ const n = Ni(t);
1699
+ return P(yi, n, Xe, e, r);
1690
1700
  }
1691
- function Ri(t) {
1701
+ function ki(t) {
1692
1702
  const e = [];
1693
1703
  let r;
1694
1704
  for (; (r = t.next()) !== null; )
1695
- e.push(Di(r.asObject()));
1705
+ e.push(Oi(r.asObject()));
1696
1706
  return e;
1697
1707
  }
1698
- const bi = 1, zt = 607861992, Xt = 894485888, Jt = 972460562, Qt = 1368629611, Zt = 1883521406, qt = 2603556958, er = 3609695522, tr = 4075263697, rr = 4257460908;
1699
- function ki(t) {
1708
+ const Ui = 1, Qt = 607861992, Zt = 894485888, qt = 972460562, er = 1368629611, tr = 1883521406, rr = 2603556958, nr = 3609695522, sr = 4075263697, ir = 4257460908;
1709
+ function Di(t) {
1700
1710
  const e = {};
1701
- return nr(e), e;
1711
+ return or(e), e;
1702
1712
  }
1703
- function nr(t) {
1713
+ function or(t) {
1704
1714
  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;
1705
1715
  }
1706
- function Ui(t, e) {
1707
- e.writeBoolField(zt, t.HasDefaultValue), e.writeStringField(Xt, t.DefaultValueJson), e.writeStringField(Jt, t.EnumerableItemTypeName), e.writeStringField(Qt, t.Description), e.writeBinaryField(Zt, t.DefaultValueData), e.writeBoolField(qt, t.IsEnumerable), e.writeStringField(er, t.TypeName), e.writeStringField(tr, t.ParameterName), e.writeInt32Field(rr, t.ParameterIndex | 0);
1716
+ function Mi(t, e) {
1717
+ e.writeBoolField(Qt, t.HasDefaultValue), e.writeStringField(Zt, t.DefaultValueJson), e.writeStringField(qt, t.EnumerableItemTypeName), e.writeStringField(er, t.Description), e.writeBinaryField(tr, t.DefaultValueData), e.writeBoolField(rr, t.IsEnumerable), e.writeStringField(nr, t.TypeName), e.writeStringField(sr, t.ParameterName), e.writeInt32Field(ir, t.ParameterIndex | 0);
1708
1718
  }
1709
- function Di(t, e) {
1710
- const r = e ?? ki();
1711
- return nr(r), Mi(t, r), r;
1719
+ function Oi(t, e) {
1720
+ const r = e ?? Di();
1721
+ return or(r), Li(t, r), r;
1712
1722
  }
1713
- function Mi(t, e) {
1723
+ function Li(t, e) {
1714
1724
  let r;
1715
1725
  for (; (r = t.next()) !== null; )
1716
1726
  switch (r.fieldId) {
1717
- case zt: {
1727
+ case Qt: {
1718
1728
  if (r.isNull) throw new Error();
1719
1729
  e.HasDefaultValue = r.asBool();
1720
1730
  break;
1721
1731
  }
1722
- case Xt: {
1732
+ case Zt: {
1723
1733
  if (r.isNull) throw new Error();
1724
1734
  e.DefaultValueJson = r.asString();
1725
1735
  break;
1726
1736
  }
1727
- case Jt: {
1737
+ case qt: {
1728
1738
  if (r.isNull) throw new Error();
1729
1739
  e.EnumerableItemTypeName = r.asString();
1730
1740
  break;
1731
1741
  }
1732
- case Qt: {
1742
+ case er: {
1733
1743
  if (r.isNull) throw new Error();
1734
1744
  e.Description = r.asString();
1735
1745
  break;
1736
1746
  }
1737
- case Zt: {
1747
+ case tr: {
1738
1748
  if (r.isNull) throw new Error();
1739
1749
  e.DefaultValueData = r.asBinary();
1740
1750
  break;
1741
1751
  }
1742
- case qt: {
1752
+ case rr: {
1743
1753
  if (r.isNull) throw new Error();
1744
1754
  e.IsEnumerable = r.asBool();
1745
1755
  break;
1746
1756
  }
1747
- case er: {
1757
+ case nr: {
1748
1758
  if (r.isNull) throw new Error();
1749
1759
  e.TypeName = r.asString();
1750
1760
  break;
1751
1761
  }
1752
- case tr: {
1762
+ case sr: {
1753
1763
  if (r.isNull) throw new Error();
1754
1764
  e.ParameterName = r.asString();
1755
1765
  break;
1756
1766
  }
1757
- case rr: {
1767
+ case ir: {
1758
1768
  if (r.isNull) throw new Error();
1759
1769
  e.ParameterIndex = r.asInt32();
1760
1770
  break;
1761
1771
  }
1762
1772
  }
1763
1773
  }
1764
- const sr = 1, Oi = 1048638, Li = 3678477544;
1765
- function vi(t) {
1774
+ const ar = 1, vi = 1048638, Fi = 3678477544;
1775
+ function Pi(t) {
1766
1776
  const e = {};
1767
- return Fi(e), t && Object.assign(e, t), e;
1777
+ return Bi(e), t && Object.assign(e, t), e;
1768
1778
  }
1769
- function Fi(t) {
1779
+ function Bi(t) {
1770
1780
  return t.Functions = [], t;
1771
1781
  }
1772
- function Pi(t) {
1773
- const e = new D(sr);
1774
- return Bi(t, e), e.finish();
1782
+ function xi(t) {
1783
+ const e = new M(ar);
1784
+ return Gi(t, e), e.finish();
1775
1785
  }
1776
- function Bi(t, e) {
1777
- e.writeArrayField(Li, R.Object, (r) => {
1786
+ function Gi(t, e) {
1787
+ e.writeArrayField(Fi, R.Object, (r) => {
1778
1788
  for (const n of t.Functions)
1779
- r.writeObject(Ye, (s) => {
1780
- jt(n, s);
1789
+ r.writeObject(Xe, (s) => {
1790
+ Jt(n, s);
1781
1791
  });
1782
1792
  });
1783
1793
  }
1784
- function xi(t, e, r) {
1785
- const n = Pi(t);
1786
- return P(Oi, n, sr, e, r);
1794
+ function Vi(t, e, r) {
1795
+ const n = xi(t);
1796
+ return P(vi, n, ar, e, r);
1787
1797
  }
1788
- const ir = 1, Gi = 1048602, Vi = 349453957, Wi = 703025676, Hi = 3403385840, $i = 3748161056, Ki = 4289118421;
1789
- function Yi(t) {
1798
+ const cr = 1, Wi = 1048602, Hi = 349453957, $i = 703025676, Ki = 3403385840, Yi = 3748161056, ji = 4289118421;
1799
+ function zi(t) {
1790
1800
  const e = {};
1791
- return ji(e), t && Object.assign(e, t), e;
1801
+ return Xi(e), t && Object.assign(e, t), e;
1792
1802
  }
1793
- function ji(t) {
1794
- return t.CallId = m.fromBytes(new Uint8Array(16)), t.InstanceId = m.fromBytes(new Uint8Array(16)), t.ResultTypeName = "", t.ResultJson = "", t.ResultData = new Uint8Array(0), t;
1803
+ function Xi(t) {
1804
+ return t.CallId = I.fromBytes(new Uint8Array(16)), t.InstanceId = I.fromBytes(new Uint8Array(16)), t.ResultTypeName = "", t.ResultJson = "", t.ResultData = new Uint8Array(0), t;
1795
1805
  }
1796
- function zi(t) {
1797
- const e = new D(ir);
1798
- return Xi(t, e), e.finish();
1806
+ function Ji(t) {
1807
+ const e = new M(cr);
1808
+ return Qi(t, e), e.finish();
1799
1809
  }
1800
- function Xi(t, e) {
1801
- e.writeBinaryField(Vi, t.ResultData), e.writeStringField(Wi, t.ResultTypeName), e.writeStringField(Hi, t.ResultJson), e.writeGuidField($i, t.CallId), e.writeGuidField(Ki, t.InstanceId);
1810
+ function Qi(t, e) {
1811
+ e.writeBinaryField(Hi, t.ResultData), e.writeStringField($i, t.ResultTypeName), e.writeStringField(Ki, t.ResultJson), e.writeGuidField(Yi, t.CallId), e.writeGuidField(ji, t.InstanceId);
1802
1812
  }
1803
- function Ji(t, e, r) {
1804
- const n = zi(t);
1805
- return P(Gi, n, ir, e, r);
1813
+ function Zi(t, e, r) {
1814
+ const n = Ji(t);
1815
+ return P(Wi, n, cr, e, r);
1806
1816
  }
1807
- const or = 1, Qi = 65549;
1808
- function et(t) {
1817
+ const lr = 1, qi = 65549;
1818
+ function nt(t) {
1809
1819
  return {};
1810
1820
  }
1811
- function Zi(t) {
1812
- return new D(or).finish();
1821
+ function eo(t) {
1822
+ return new M(lr).finish();
1813
1823
  }
1814
- function tt(t, e, r) {
1815
- const n = Zi();
1816
- return P(Qi, n, or, e, r);
1824
+ function st(t, e, r) {
1825
+ const n = eo();
1826
+ return P(qi, n, lr, e, r);
1817
1827
  }
1818
- const qi = 3167053791, eo = 3342364356, to = 3612929027;
1819
- function ar(t) {
1828
+ const to = 3167053791, ro = 3342364356, no = 3612929027;
1829
+ function ur(t) {
1820
1830
  const e = {};
1821
- return cr(e), e;
1831
+ return hr(e), e;
1822
1832
  }
1823
- function cr(t) {
1824
- return t.Category = "", t.Type = Tt.Face, t.FaceBlendshapes = [], t;
1833
+ function hr(t) {
1834
+ return t.Category = "", t.Type = At.Face, t.FaceBlendshapes = [], t;
1825
1835
  }
1826
- function ro(t, e) {
1827
- const r = e ?? ar();
1828
- return cr(r), no(t, r), r;
1836
+ function so(t, e) {
1837
+ const r = e ?? ur();
1838
+ return hr(r), io(t, r), r;
1829
1839
  }
1830
- function no(t, e) {
1840
+ function io(t, e) {
1831
1841
  let r;
1832
1842
  for (; (r = t.next()) !== null; )
1833
1843
  switch (r.fieldId) {
1834
- case qi: {
1844
+ case to: {
1835
1845
  if (r.isNull) throw new Error();
1836
1846
  e.Type = r.asInt32();
1837
1847
  break;
1838
1848
  }
1839
- case eo: {
1849
+ case ro: {
1840
1850
  if (r.isNull) throw new Error();
1841
- e.FaceBlendshapes = so(r.asArray());
1851
+ e.FaceBlendshapes = oo(r.asArray());
1842
1852
  break;
1843
1853
  }
1844
- case to: {
1854
+ case no: {
1845
1855
  if (r.isNull) throw new Error();
1846
1856
  e.Category = r.asString();
1847
1857
  break;
1848
1858
  }
1849
1859
  }
1850
1860
  }
1851
- function so(t) {
1861
+ function oo(t) {
1852
1862
  const e = [];
1853
1863
  let r;
1854
1864
  for (; (r = t.next()) !== null; )
1855
1865
  e.push(r.asString());
1856
1866
  return e;
1857
1867
  }
1858
- const io = 3612929027;
1859
- function lr(t) {
1868
+ const ao = 3612929027;
1869
+ function dr(t) {
1860
1870
  const e = {};
1861
- return ur(e), e;
1871
+ return fr(e), e;
1862
1872
  }
1863
- function ur(t) {
1873
+ function fr(t) {
1864
1874
  return t.Category = "", t;
1865
1875
  }
1866
- function oo(t, e) {
1867
- const r = e ?? lr();
1868
- return ur(r), ao(t, r), r;
1876
+ function co(t, e) {
1877
+ const r = e ?? dr();
1878
+ return fr(r), lo(t, r), r;
1869
1879
  }
1870
- function ao(t, e) {
1880
+ function lo(t, e) {
1871
1881
  let r;
1872
1882
  for (; (r = t.next()) !== null; )
1873
1883
  switch (r.fieldId) {
1874
- case io: {
1884
+ case ao: {
1875
1885
  if (r.isNull) throw new Error();
1876
1886
  e.Category = r.asString();
1877
1887
  break;
1878
1888
  }
1879
1889
  }
1880
1890
  }
1881
- const co = 164808083, lo = 1368629611, uo = 2739413426, ho = 2768375929, fo = 2950031986, Eo = 3284746250, po = 4065070594;
1882
- function hr(t) {
1891
+ const uo = 161083277, ho = 164808083, fo = 1368629611, Eo = 2745379226, po = 2950031986, Io = 3282782683, mo = 3284746250, _o = 4065070594;
1892
+ function Er(t) {
1883
1893
  const e = {};
1884
- return dr(e), e;
1894
+ return pr(e), e;
1885
1895
  }
1886
- function dr(t) {
1887
- return t.Description = "", t.Codec = St.H264, t.Width = 0, t.Height = 0, t.Framerate = 30, t.Bitrate = 0, t.IsHardwareAccelerated = !1, t;
1896
+ function pr(t) {
1897
+ return t.StreamId = "", t.Description = "", t.SourceType = "", t.Codec = yt.H264, t.CodecDetails = "", t.Width = 0, t.Height = 0, t.Framerate = 30, t;
1888
1898
  }
1889
- function Io(t, e) {
1890
- const r = e ?? hr();
1891
- return dr(r), mo(t, r), r;
1899
+ function To(t, e) {
1900
+ const r = e ?? Er();
1901
+ return pr(r), So(t, r), r;
1892
1902
  }
1893
- function mo(t, e) {
1903
+ function So(t, e) {
1894
1904
  let r;
1895
1905
  for (; (r = t.next()) !== null; )
1896
1906
  switch (r.fieldId) {
1897
- case co: {
1907
+ case uo: {
1898
1908
  if (r.isNull) throw new Error();
1899
- e.Framerate = r.asInt32();
1909
+ e.StreamId = r.asString();
1900
1910
  break;
1901
1911
  }
1902
- case lo: {
1912
+ case ho: {
1903
1913
  if (r.isNull) throw new Error();
1904
- e.Description = r.asString();
1914
+ e.Framerate = r.asFloat64();
1905
1915
  break;
1906
1916
  }
1907
- case uo: {
1917
+ case fo: {
1908
1918
  if (r.isNull) throw new Error();
1909
- e.IsHardwareAccelerated = r.asBool();
1919
+ e.Description = r.asString();
1910
1920
  break;
1911
1921
  }
1912
- case ho: {
1922
+ case Eo: {
1913
1923
  if (r.isNull) throw new Error();
1914
- e.Bitrate = r.asInt32();
1924
+ e.CodecDetails = r.asString();
1915
1925
  break;
1916
1926
  }
1917
- case fo: {
1927
+ case po: {
1918
1928
  if (r.isNull) throw new Error();
1919
1929
  e.Height = r.asInt32();
1920
1930
  break;
1921
1931
  }
1922
- case Eo: {
1932
+ case Io: {
1933
+ if (r.isNull) throw new Error();
1934
+ e.SourceType = r.asString();
1935
+ break;
1936
+ }
1937
+ case mo: {
1923
1938
  if (r.isNull) throw new Error();
1924
1939
  e.Codec = r.asInt32();
1925
1940
  break;
1926
1941
  }
1927
- case po: {
1942
+ case _o: {
1928
1943
  if (r.isNull) throw new Error();
1929
1944
  e.Width = r.asInt32();
1930
1945
  break;
1931
1946
  }
1932
1947
  }
1933
1948
  }
1934
- const _o = 65539, To = 693643444, So = 1144553441, wo = 1497620243, Ao = 1559330978, yo = 1976546434, go = 1999510636, No = 2277643855, Co = 2469008121, Ro = 3042922213, bo = 3064612128, ko = 3219210453, Uo = 3504054055, Do = 3678477544, Mo = 3696445035, Oo = 3707543140, Lo = 3712281496, vo = 3895362455, Fo = 3897397815, Po = 4225107827;
1935
- function Bo(t) {
1949
+ const wo = 65539, Ao = 693643444, yo = 1144553441, go = 1497620243, No = 1559330978, Co = 1976546434, Ro = 1999510636, bo = 2277643855, ko = 2469008121, Uo = 3042922213, Do = 3064612128, Mo = 3219210453, Oo = 3504054055, Lo = 3678477544, vo = 3696445035, Fo = 3707543140, Po = 3712281496, Bo = 3895362455, xo = 3897397815, Go = 4225107827;
1950
+ function Vo(t) {
1936
1951
  const e = {};
1937
- return fr(e), e;
1952
+ return Ir(e), e;
1938
1953
  }
1939
- function fr(t) {
1940
- return t.Clients = /* @__PURE__ */ Object.create(null), t.Functions = /* @__PURE__ */ Object.create(null), t.UIStreams = /* @__PURE__ */ Object.create(null), t.AudioStreams = /* @__PURE__ */ Object.create(null), t.VideoStreams = /* @__PURE__ */ Object.create(null), t.TrackingStreams = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.SessionId = "", t.ChannelUrl = "", t.FirstUserId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.ServerRunType = wt.Local, t.AppSourceType = At.Bundle, t.PublicAccess = !1, t.DebugMode = !1, t;
1954
+ function Ir(t) {
1955
+ return t.Clients = /* @__PURE__ */ Object.create(null), t.Functions = /* @__PURE__ */ Object.create(null), t.UIStreams = /* @__PURE__ */ Object.create(null), t.AudioStreams = /* @__PURE__ */ Object.create(null), t.VideoStreams = /* @__PURE__ */ Object.create(null), t.TrackingStreams = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.SessionId = "", t.ChannelUrl = "", t.FirstUserId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.ServerRunType = gt.Local, t.AppSourceType = Nt.Bundle, t.PublicAccess = !1, t.DebugMode = !1, t;
1941
1956
  }
1942
- function xo(t, e) {
1957
+ function Wo(t, e) {
1943
1958
  const r = X.create(t);
1944
- return Go(r, e);
1959
+ return Ho(r, e);
1945
1960
  }
1946
- function Go(t, e) {
1947
- const r = e ?? Bo();
1948
- return fr(r), Vo(t, r), r;
1961
+ function Ho(t, e) {
1962
+ const r = e ?? Vo();
1963
+ return Ir(r), $o(t, r), r;
1949
1964
  }
1950
- function Vo(t, e) {
1965
+ function $o(t, e) {
1951
1966
  let r;
1952
1967
  for (; (r = t.next()) !== null; )
1953
1968
  switch (r.fieldId) {
1954
- case To: {
1969
+ case Ao: {
1955
1970
  if (r.isNull) throw new Error();
1956
1971
  e.FirstUserId = r.asString();
1957
1972
  break;
1958
1973
  }
1959
- case So: {
1974
+ case yo: {
1960
1975
  if (r.isNull) throw new Error();
1961
- e.Clients = Ho(r.asDictionary());
1976
+ e.Clients = Yo(r.asDictionary());
1962
1977
  break;
1963
1978
  }
1964
- case wo: {
1979
+ case go: {
1965
1980
  if (r.isNull) throw new Error();
1966
- e.TrackingStreams = $o(r.asDictionary());
1981
+ e.TrackingStreams = jo(r.asDictionary());
1967
1982
  break;
1968
1983
  }
1969
- case Ao: {
1984
+ case No: {
1970
1985
  if (r.isNull) throw new Error();
1971
1986
  e.ChannelId = r.asString();
1972
1987
  break;
1973
1988
  }
1974
- case yo: {
1989
+ case Co: {
1975
1990
  if (r.isNull) throw new Error();
1976
1991
  e.AppSourceType = r.asInt32();
1977
1992
  break;
1978
1993
  }
1979
- case go: {
1994
+ case Ro: {
1980
1995
  if (r.isNull) throw new Error();
1981
1996
  e.SessionId = r.asString();
1982
1997
  break;
1983
1998
  }
1984
- case No: {
1999
+ case bo: {
1985
2000
  if (r.isNull) throw new Error();
1986
2001
  e.ChannelUrl = r.asString();
1987
2002
  break;
1988
2003
  }
1989
- case Co: {
2004
+ case ko: {
1990
2005
  if (r.isNull) throw new Error();
1991
2006
  e.ChannelName = r.asString();
1992
2007
  break;
1993
2008
  }
1994
- case Ro: {
2009
+ case Uo: {
1995
2010
  if (r.isNull) throw new Error();
1996
2011
  e.PublicAccess = r.asBool();
1997
2012
  break;
1998
2013
  }
1999
- case bo: {
2014
+ case Do: {
2000
2015
  if (r.isNull) throw new Error();
2001
2016
  e.ServerRunType = r.asInt32();
2002
2017
  break;
2003
2018
  }
2004
- case ko: {
2019
+ case Mo: {
2005
2020
  if (r.isNull) throw new Error();
2006
2021
  e.OrganisationName = r.asString();
2007
2022
  break;
2008
2023
  }
2009
- case Uo: {
2024
+ case Oo: {
2010
2025
  if (r.isNull) throw new Error();
2011
2026
  e.DebugMode = r.asBool();
2012
2027
  break;
2013
2028
  }
2014
- case Do: {
2029
+ case Lo: {
2015
2030
  if (r.isNull) throw new Error();
2016
- e.Functions = Ko(r.asDictionary());
2031
+ e.Functions = zo(r.asDictionary());
2017
2032
  break;
2018
2033
  }
2019
- case Mo: {
2034
+ case vo: {
2020
2035
  if (r.isNull) throw new Error();
2021
- e.UIStreams = Yo(r.asDictionary());
2036
+ e.UIStreams = Xo(r.asDictionary());
2022
2037
  break;
2023
2038
  }
2024
- case Oo: {
2039
+ case Fo: {
2025
2040
  if (r.isNull) throw new Error();
2026
2041
  e.SpaceId = r.asString();
2027
2042
  break;
2028
2043
  }
2029
- case Lo: {
2044
+ case Po: {
2030
2045
  if (r.isNull) throw new Error();
2031
2046
  e.PrimaryUserId = r.asString();
2032
2047
  break;
2033
2048
  }
2034
- case vo: {
2049
+ case Bo: {
2035
2050
  if (r.isNull) throw new Error();
2036
- e.AudioStreams = jo(r.asDictionary());
2051
+ e.AudioStreams = Jo(r.asDictionary());
2037
2052
  break;
2038
2053
  }
2039
- case Fo: {
2054
+ case xo: {
2040
2055
  if (r.isNull) throw new Error();
2041
- e.VideoStreams = zo(r.asDictionary());
2056
+ e.VideoStreams = Qo(r.asDictionary());
2042
2057
  break;
2043
2058
  }
2044
- case Po: {
2059
+ case Go: {
2045
2060
  if (r.isNull) throw new Error();
2046
2061
  e.SpaceName = r.asString();
2047
2062
  break;
2048
2063
  }
2049
2064
  }
2050
2065
  }
2051
- async function Wo(t, e) {
2052
- const r = await Be(t, _o);
2053
- return xo(r, e);
2066
+ async function Ko(t, e) {
2067
+ const r = await Ve(t, wo);
2068
+ return Wo(r, e);
2054
2069
  }
2055
- function Ho(t) {
2070
+ function Yo(t) {
2056
2071
  const e = /* @__PURE__ */ Object.create(null);
2057
2072
  let r;
2058
2073
  for (; (r = t.next()) !== null; ) {
2059
2074
  const n = r.key.asInt32();
2060
- e[n] = Ue(r.value.asObject());
2075
+ e[n] = Oe(r.value.asObject());
2061
2076
  }
2062
2077
  return e;
2063
2078
  }
2064
- function $o(t) {
2079
+ function jo(t) {
2065
2080
  const e = /* @__PURE__ */ Object.create(null);
2066
2081
  let r;
2067
2082
  for (; (r = t.next()) !== null; ) {
2068
2083
  const n = r.key.asString();
2069
- e[n] = Aa(r.value.asObject());
2084
+ e[n] = Na(r.value.asObject());
2070
2085
  }
2071
2086
  return e;
2072
2087
  }
2073
- function Ko(t) {
2088
+ function zo(t) {
2074
2089
  const e = /* @__PURE__ */ Object.create(null);
2075
2090
  let r;
2076
2091
  for (; (r = t.next()) !== null; ) {
2077
2092
  const n = r.key.asInt32();
2078
- e[n] = Xo(r.value.asArray());
2093
+ e[n] = Zo(r.value.asArray());
2079
2094
  }
2080
2095
  return e;
2081
2096
  }
2082
- function Yo(t) {
2097
+ function Xo(t) {
2083
2098
  const e = /* @__PURE__ */ Object.create(null);
2084
2099
  let r;
2085
2100
  for (; (r = t.next()) !== null; ) {
2086
2101
  const n = r.key.asString();
2087
- e[n] = ta(r.value.asObject());
2102
+ e[n] = sa(r.value.asObject());
2088
2103
  }
2089
2104
  return e;
2090
2105
  }
2091
- function jo(t) {
2106
+ function Jo(t) {
2092
2107
  const e = /* @__PURE__ */ Object.create(null);
2093
2108
  let r;
2094
2109
  for (; (r = t.next()) !== null; ) {
2095
2110
  const n = r.key.asString();
2096
- e[n] = ca(r.value.asObject());
2111
+ e[n] = ha(r.value.asObject());
2097
2112
  }
2098
2113
  return e;
2099
2114
  }
2100
- function zo(t) {
2115
+ function Qo(t) {
2101
2116
  const e = /* @__PURE__ */ Object.create(null);
2102
2117
  let r;
2103
2118
  for (; (r = t.next()) !== null; ) {
2104
2119
  const n = r.key.asString();
2105
- e[n] = pa(r.value.asObject());
2120
+ e[n] = _a(r.value.asObject());
2106
2121
  }
2107
2122
  return e;
2108
2123
  }
2109
- function Xo(t) {
2124
+ function Zo(t) {
2110
2125
  const e = [];
2111
2126
  let r;
2112
2127
  for (; (r = t.next()) !== null; )
2113
- e.push(gi(r.asObject()));
2128
+ e.push(Ci(r.asObject()));
2114
2129
  return e;
2115
2130
  }
2116
- const Jo = 161083277, Qo = 325678206, Zo = 3469892363, qo = 3645544153;
2117
- function ea(t) {
2131
+ const qo = 161083277, ea = 325678206, ta = 3469892363, ra = 3645544153;
2132
+ function na(t) {
2118
2133
  const e = {};
2119
- return Er(e), e;
2134
+ return mr(e), e;
2120
2135
  }
2121
- function Er(t) {
2122
- return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = lr(), t;
2136
+ function mr(t) {
2137
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = dr(), t;
2123
2138
  }
2124
- function ta(t, e) {
2125
- const r = e ?? ea();
2126
- return Er(r), ra(t, r), r;
2139
+ function sa(t, e) {
2140
+ const r = e ?? na();
2141
+ return mr(r), ia(t, r), r;
2127
2142
  }
2128
- function ra(t, e) {
2143
+ function ia(t, e) {
2129
2144
  let r;
2130
2145
  for (; (r = t.next()) !== null; )
2131
2146
  switch (r.fieldId) {
2132
- case Jo: {
2147
+ case qo: {
2133
2148
  if (r.isNull) throw new Error();
2134
2149
  e.StreamId = r.asString();
2135
2150
  break;
2136
2151
  }
2137
- case Qo: {
2152
+ case ea: {
2138
2153
  if (r.isNull) throw new Error();
2139
2154
  e.ClientSessionId = r.asInt32();
2140
2155
  break;
2141
2156
  }
2142
- case Zo: {
2157
+ case ta: {
2143
2158
  if (r.isNull) throw new Error();
2144
2159
  e.TrackId = r.asInt32();
2145
2160
  break;
2146
2161
  }
2147
- case qo: {
2162
+ case ra: {
2148
2163
  if (r.isNull) throw new Error();
2149
- e.Info = oo(r.asObject());
2164
+ e.Info = co(r.asObject());
2150
2165
  break;
2151
2166
  }
2152
2167
  }
2153
2168
  }
2154
- const na = 161083277, sa = 325678206, ia = 3469892363, oa = 3645544153;
2155
- function aa(t) {
2169
+ const oa = 161083277, aa = 325678206, ca = 3469892363, la = 3645544153;
2170
+ function ua(t) {
2156
2171
  const e = {};
2157
- return pr(e), e;
2172
+ return _r(e), e;
2158
2173
  }
2159
- function pr(t) {
2160
- return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Nt(), t;
2174
+ function _r(t) {
2175
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = bt(), t;
2161
2176
  }
2162
- function ca(t, e) {
2163
- const r = e ?? aa();
2164
- return pr(r), la(t, r), r;
2177
+ function ha(t, e) {
2178
+ const r = e ?? ua();
2179
+ return _r(r), da(t, r), r;
2165
2180
  }
2166
- function la(t, e) {
2181
+ function da(t, e) {
2167
2182
  let r;
2168
2183
  for (; (r = t.next()) !== null; )
2169
2184
  switch (r.fieldId) {
2170
- case na: {
2185
+ case oa: {
2171
2186
  if (r.isNull) throw new Error();
2172
2187
  e.StreamId = r.asString();
2173
2188
  break;
2174
2189
  }
2175
- case sa: {
2190
+ case aa: {
2176
2191
  if (r.isNull) throw new Error();
2177
2192
  e.ClientSessionId = r.asInt32();
2178
2193
  break;
2179
2194
  }
2180
- case ia: {
2195
+ case ca: {
2181
2196
  if (r.isNull) throw new Error();
2182
2197
  e.TrackId = r.asInt32();
2183
2198
  break;
2184
2199
  }
2185
- case oa: {
2200
+ case la: {
2186
2201
  if (r.isNull) throw new Error();
2187
- e.Info = Cn(r.asObject());
2202
+ e.Info = bn(r.asObject());
2188
2203
  break;
2189
2204
  }
2190
2205
  }
2191
2206
  }
2192
- const ua = 161083277, ha = 325678206, da = 3469892363, fa = 3645544153;
2193
- function Ea(t) {
2207
+ const fa = 161083277, Ea = 325678206, pa = 3469892363, Ia = 3645544153;
2208
+ function ma(t) {
2194
2209
  const e = {};
2195
- return Ir(e), e;
2210
+ return Tr(e), e;
2196
2211
  }
2197
- function Ir(t) {
2198
- return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = hr(), t;
2212
+ function Tr(t) {
2213
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Er(), t;
2199
2214
  }
2200
- function pa(t, e) {
2201
- const r = e ?? Ea();
2202
- return Ir(r), Ia(t, r), r;
2215
+ function _a(t, e) {
2216
+ const r = e ?? ma();
2217
+ return Tr(r), Ta(t, r), r;
2203
2218
  }
2204
- function Ia(t, e) {
2219
+ function Ta(t, e) {
2205
2220
  let r;
2206
2221
  for (; (r = t.next()) !== null; )
2207
2222
  switch (r.fieldId) {
2208
- case ua: {
2223
+ case fa: {
2209
2224
  if (r.isNull) throw new Error();
2210
2225
  e.StreamId = r.asString();
2211
2226
  break;
2212
2227
  }
2213
- case ha: {
2228
+ case Ea: {
2214
2229
  if (r.isNull) throw new Error();
2215
2230
  e.ClientSessionId = r.asInt32();
2216
2231
  break;
2217
2232
  }
2218
- case da: {
2233
+ case pa: {
2219
2234
  if (r.isNull) throw new Error();
2220
2235
  e.TrackId = r.asInt32();
2221
2236
  break;
2222
2237
  }
2223
- case fa: {
2238
+ case Ia: {
2224
2239
  if (r.isNull) throw new Error();
2225
- e.Info = Io(r.asObject());
2240
+ e.Info = To(r.asObject());
2226
2241
  break;
2227
2242
  }
2228
2243
  }
2229
2244
  }
2230
- const ma = 161083277, _a = 325678206, Ta = 3469892363, Sa = 3645544153;
2231
- function wa(t) {
2245
+ const Sa = 161083277, wa = 325678206, Aa = 3469892363, ya = 3645544153;
2246
+ function ga(t) {
2232
2247
  const e = {};
2233
- return mr(e), e;
2248
+ return Sr(e), e;
2234
2249
  }
2235
- function mr(t) {
2236
- return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = ar(), t;
2250
+ function Sr(t) {
2251
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = ur(), t;
2237
2252
  }
2238
- function Aa(t, e) {
2239
- const r = e ?? wa();
2240
- return mr(r), ya(t, r), r;
2253
+ function Na(t, e) {
2254
+ const r = e ?? ga();
2255
+ return Sr(r), Ca(t, r), r;
2241
2256
  }
2242
- function ya(t, e) {
2257
+ function Ca(t, e) {
2243
2258
  let r;
2244
2259
  for (; (r = t.next()) !== null; )
2245
2260
  switch (r.fieldId) {
2246
- case ma: {
2261
+ case Sa: {
2247
2262
  if (r.isNull) throw new Error();
2248
2263
  e.StreamId = r.asString();
2249
2264
  break;
2250
2265
  }
2251
- case _a: {
2266
+ case wa: {
2252
2267
  if (r.isNull) throw new Error();
2253
2268
  e.ClientSessionId = r.asInt32();
2254
2269
  break;
2255
2270
  }
2256
- case Ta: {
2271
+ case Aa: {
2257
2272
  if (r.isNull) throw new Error();
2258
2273
  e.TrackId = r.asInt32();
2259
2274
  break;
2260
2275
  }
2261
- case Sa: {
2276
+ case ya: {
2262
2277
  if (r.isNull) throw new Error();
2263
- e.Info = ro(r.asObject());
2278
+ e.Info = so(r.asObject());
2264
2279
  break;
2265
2280
  }
2266
2281
  }
2267
2282
  }
2268
- const _r = 1, ga = 131074;
2269
- function Tr(t) {
2283
+ const wr = 1, Ra = 131074;
2284
+ function Ar(t) {
2270
2285
  return {};
2271
2286
  }
2272
- function Na(t) {
2273
- return new D(_r).finish();
2287
+ function ba(t) {
2288
+ return new M(wr).finish();
2274
2289
  }
2275
- function Sr(t, e, r) {
2276
- const n = Na();
2277
- return P(ga, n, _r, e, r);
2290
+ function yr(t, e, r) {
2291
+ const n = ba();
2292
+ return P(Ra, n, wr, e, r);
2278
2293
  }
2279
- const wr = 1, Ca = 8388612;
2280
- function Ra(t) {
2294
+ const gr = 1, ka = 8388612;
2295
+ function Ua(t) {
2281
2296
  return {};
2282
2297
  }
2283
- function ba(t) {
2284
- return new D(wr).finish();
2298
+ function Da(t) {
2299
+ return new M(gr).finish();
2285
2300
  }
2286
- function ka(t, e, r) {
2287
- const n = ba();
2288
- return P(Ca, n, wr, e, r);
2301
+ function Ma(t, e, r) {
2302
+ const n = Da();
2303
+ return P(ka, n, gr, e, r);
2289
2304
  }
2290
- class je extends Error {
2305
+ class Je extends Error {
2291
2306
  constructor(e, r) {
2292
2307
  super(e), this.cause = r, this.name = "ConnectionError";
2293
2308
  }
2294
2309
  }
2295
- class g extends je {
2310
+ class g extends Je {
2296
2311
  constructor(e, r) {
2297
2312
  super(e, r), this.name = "AuthenticationError";
2298
2313
  }
2299
2314
  }
2300
- class H extends je {
2315
+ class $ extends Je {
2301
2316
  constructor(e, r) {
2302
2317
  super(e, r), this.name = "TransportError";
2303
2318
  }
2304
2319
  }
2305
- class ze extends H {
2320
+ class Qe extends $ {
2306
2321
  constructor(e) {
2307
2322
  super(`No keepalive received within ${e}ms`), this.name = "KeepaliveTimeoutError";
2308
2323
  }
2309
2324
  }
2310
- class Ua extends je {
2325
+ class Oa extends Je {
2311
2326
  constructor(e) {
2312
2327
  super(`Maximum reconnection attempts (${e}) exceeded`), this.name = "MaxRetriesExceededError";
2313
2328
  }
2314
2329
  }
2315
- class Da extends g {
2330
+ class La extends g {
2316
2331
  constructor(e) {
2317
2332
  super(`Channel provisioning timeout after ${e}ms`), this.name = "ProvisioningTimeoutError";
2318
2333
  }
2319
2334
  }
2320
- class kl extends g {
2335
+ class Ml extends g {
2321
2336
  constructor(e) {
2322
2337
  super(`Channel not found: ${e}`), this.name = "ChannelNotFoundError";
2323
2338
  }
2324
2339
  }
2325
- class Ul extends g {
2340
+ class Ol extends g {
2326
2341
  constructor(e) {
2327
2342
  super(`Space not found for domain: ${e}`), this.name = "SpaceNotFoundError";
2328
2343
  }
2329
2344
  }
2330
- class Dl extends g {
2345
+ class Ll extends g {
2331
2346
  constructor() {
2332
2347
  super("No channels available in this space"), this.name = "NoChannelsError";
2333
2348
  }
2334
2349
  }
2335
- function Ar(t, e) {
2350
+ function Nr(t, e) {
2336
2351
  return new Promise((r, n) => {
2337
2352
  const s = () => {
2338
2353
  clearTimeout(i), n(new Error("Aborted"));
@@ -2346,41 +2361,41 @@ function Ar(t, e) {
2346
2361
  e?.addEventListener("abort", s, { once: !0 });
2347
2362
  });
2348
2363
  }
2349
- var Ae = /* @__PURE__ */ ((t) => (t[t.DEBUG = 0] = "DEBUG", t[t.INFO = 1] = "INFO", t[t.WARN = 2] = "WARN", t[t.ERROR = 3] = "ERROR", t[t.NONE = 4] = "NONE", t))(Ae || {});
2350
- let Xe = 1, Ie = null;
2351
- const De = /* @__PURE__ */ new Map();
2352
- function yr(t) {
2353
- Xe = t;
2364
+ var ge = /* @__PURE__ */ ((t) => (t[t.DEBUG = 0] = "DEBUG", t[t.INFO = 1] = "INFO", t[t.WARN = 2] = "WARN", t[t.ERROR = 3] = "ERROR", t[t.NONE = 4] = "NONE", t))(ge || {});
2365
+ let Ze = 1, Ie = null;
2366
+ const Le = /* @__PURE__ */ new Map();
2367
+ function Cr(t) {
2368
+ Ze = t;
2354
2369
  }
2355
- function Ml() {
2356
- return Xe;
2370
+ function vl() {
2371
+ return Ze;
2357
2372
  }
2358
- function Ma(t) {
2373
+ function va(t) {
2359
2374
  Ie = t;
2360
2375
  }
2361
- function Ol() {
2376
+ function Fl() {
2362
2377
  return Ie;
2363
2378
  }
2364
- function Ll(t, e) {
2365
- return De.set(t, e ?? {
2379
+ function Pl(t, e) {
2380
+ return Le.set(t, e ?? {
2366
2381
  minLevel: 2
2367
2382
  /* WARN */
2368
2383
  }), () => {
2369
- De.delete(t);
2384
+ Le.delete(t);
2370
2385
  };
2371
2386
  }
2372
- const Oa = {
2387
+ const Fa = {
2373
2388
  0: "DEBUG",
2374
2389
  1: "INFO",
2375
2390
  2: "WARN",
2376
2391
  3: "ERROR",
2377
2392
  4: "NONE"
2378
2393
  };
2379
- function La(t, e) {
2394
+ function Pa(t, e) {
2380
2395
  return `[${t}] ${e}`;
2381
2396
  }
2382
2397
  function ae(t, e, r, n) {
2383
- const s = (/* @__PURE__ */ new Date()).toISOString(), i = Oa[t], o = {
2398
+ const s = (/* @__PURE__ */ new Date()).toISOString(), i = Fa[t], o = {
2384
2399
  timestamp: s,
2385
2400
  level: t,
2386
2401
  levelName: i,
@@ -2389,7 +2404,7 @@ function ae(t, e, r, n) {
2389
2404
  args: n
2390
2405
  };
2391
2406
  Ie && Ie(o);
2392
- for (const [a, c] of De) {
2407
+ for (const [a, c] of Le) {
2393
2408
  const l = c?.minLevel ?? 2;
2394
2409
  if (t >= l)
2395
2410
  try {
@@ -2397,8 +2412,8 @@ function ae(t, e, r, n) {
2397
2412
  } catch {
2398
2413
  }
2399
2414
  }
2400
- if (Xe <= t) {
2401
- const a = La(e, r);
2415
+ if (Ze <= t) {
2416
+ const a = Pa(e, r);
2402
2417
  switch (t) {
2403
2418
  case 0:
2404
2419
  console.debug(a, ...n);
@@ -2415,7 +2430,7 @@ function ae(t, e, r, n) {
2415
2430
  }
2416
2431
  }
2417
2432
  }
2418
- function M(t) {
2433
+ function O(t) {
2419
2434
  return {
2420
2435
  debug(e, ...r) {
2421
2436
  ae(0, t, e, r);
@@ -2431,8 +2446,8 @@ function M(t) {
2431
2446
  }
2432
2447
  };
2433
2448
  }
2434
- const ce = M("WebSocketTransport"), va = 1e4;
2435
- class Fa {
2449
+ const ce = O("WebSocketTransport"), Ba = 1e4;
2450
+ class xa {
2436
2451
  ws = null;
2437
2452
  keepaliveTimeout = null;
2438
2453
  // Pre-allocated keepalive response message to avoid allocation per keepalive
@@ -2451,22 +2466,22 @@ class Fa {
2451
2466
  try {
2452
2467
  this.ws = new WebSocket(e), this.ws.binaryType = "arraybuffer";
2453
2468
  } catch (l) {
2454
- s(new H(`Failed to create WebSocket: ${l}`, l instanceof Error ? l : void 0));
2469
+ s(new $(`Failed to create WebSocket: ${l}`, l instanceof Error ? l : void 0));
2455
2470
  return;
2456
2471
  }
2457
2472
  let i = !1, o = !1;
2458
2473
  const a = () => {
2459
2474
  clearTimeout(c), this.ws && (this.ws.onopen = null, this.ws.onerror = null, this.ws.onclose = null, this.ws.onmessage = null);
2460
2475
  }, c = setTimeout(() => {
2461
- o || (o = !0, a(), this.ws?.close(), s(new H("WebSocket connection timeout")));
2462
- }, va);
2476
+ o || (o = !0, a(), this.ws?.close(), s(new $("WebSocket connection timeout")));
2477
+ }, Ba);
2463
2478
  this.ws.onopen = () => {
2464
2479
  i = !0, clearTimeout(c), this.ws.send(r), this.resetKeepaliveTimeout(), o || (o = !0, n());
2465
2480
  }, this.ws.onerror = () => {
2466
- clearTimeout(c), ce.error("WebSocket error"), o || (o = !0, a(), s(new H("WebSocket connection failed")));
2481
+ clearTimeout(c), ce.error("WebSocket error"), o || (o = !0, a(), s(new $("WebSocket connection failed")));
2467
2482
  }, this.ws.onclose = (l) => {
2468
2483
  if (this.clearKeepaliveTimeout(), !i && !o) {
2469
- o = !0, a(), s(new H("WebSocket connection closed before opening"));
2484
+ o = !0, a(), s(new $("WebSocket connection closed before opening"));
2470
2485
  return;
2471
2486
  }
2472
2487
  const E = l.wasClean && (l.code === 1e3 || l.code === 1001), d = l.code === 1e3 || l.code === 1001, h = l.reason || `code=${l.code}`;
@@ -2486,7 +2501,7 @@ class Fa {
2486
2501
  * Get or create a cached keepalive response message.
2487
2502
  */
2488
2503
  getKeepaliveResponse() {
2489
- return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = Sr(Tr(), this.sessionId)), this.keepaliveResponseMessage;
2504
+ return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = yr(Ar(), this.sessionId)), this.keepaliveResponseMessage;
2490
2505
  }
2491
2506
  handleProtocolMessage(e) {
2492
2507
  try {
@@ -2501,18 +2516,18 @@ class Fa {
2501
2516
  }
2502
2517
  resetKeepaliveTimeout() {
2503
2518
  this.clearKeepaliveTimeout(), this.keepaliveTimeout = setTimeout(() => {
2504
- ce.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new ze(this.keepaliveTimeoutMs)), this.close();
2519
+ ce.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new Qe(this.keepaliveTimeoutMs)), this.close();
2505
2520
  }, this.keepaliveTimeoutMs);
2506
2521
  }
2507
2522
  clearKeepaliveTimeout() {
2508
2523
  this.keepaliveTimeout && (clearTimeout(this.keepaliveTimeout), this.keepaliveTimeout = null);
2509
2524
  }
2510
2525
  }
2511
- const B = M("WebTransportTransport"), rt = 4, Pa = 65536;
2512
- function gr() {
2526
+ const B = O("WebTransportTransport"), it = 4, Ga = 65536;
2527
+ function Rr() {
2513
2528
  return typeof WebTransport < "u";
2514
2529
  }
2515
- class Ba {
2530
+ class Va {
2516
2531
  transport = null;
2517
2532
  stream = null;
2518
2533
  reader = null;
@@ -2520,7 +2535,7 @@ class Ba {
2520
2535
  keepaliveTimeout = null;
2521
2536
  readLoopActive = !1;
2522
2537
  // Grow-only receive buffer with offset/length tracking to minimize allocations
2523
- receiveBuffer = new Uint8Array(Pa);
2538
+ receiveBuffer = new Uint8Array(Ga);
2524
2539
  receiveBufferOffset = 0;
2525
2540
  receiveBufferLength = 0;
2526
2541
  // Cached DataView to avoid allocation per message
@@ -2538,8 +2553,8 @@ class Ba {
2538
2553
  return this.transport !== null && this.writer !== null;
2539
2554
  }
2540
2555
  async connect(e, r) {
2541
- if (!gr())
2542
- throw new H("WebTransport is not supported in this browser");
2556
+ if (!Rr())
2557
+ throw new $("WebTransport is not supported in this browser");
2543
2558
  try {
2544
2559
  this.transport = new WebTransport(e), await this.transport.ready, B.debug(`Connected to WebTransport entrypoint: ${e}`), this.transport.closed.then(() => {
2545
2560
  this.handleClose("Connection closed", !0);
@@ -2547,7 +2562,7 @@ class Ba {
2547
2562
  B.error("WebTransport connection closed with error:", n), this.handleClose(n.message || "Connection error", !1);
2548
2563
  }), this.stream = await this.transport.createBidirectionalStream(), this.reader = this.stream.readable.getReader(), this.writer = this.stream.writable.getWriter(), await this.writer.write(r), this.resetKeepaliveTimeout(), this.startReadLoop();
2549
2564
  } catch (n) {
2550
- throw this.cleanup(), new H(`Failed to connect WebTransport: ${n}`, n instanceof Error ? n : void 0);
2565
+ throw this.cleanup(), new $(`Failed to connect WebTransport: ${n}`, n instanceof Error ? n : void 0);
2551
2566
  }
2552
2567
  }
2553
2568
  send(e) {
@@ -2605,7 +2620,7 @@ class Ba {
2605
2620
  * Get or create a cached keepalive response message.
2606
2621
  */
2607
2622
  getKeepaliveResponse() {
2608
- return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = Sr(Tr(), this.sessionId)), this.keepaliveResponseMessage;
2623
+ return this.keepaliveResponseMessage || (this.keepaliveResponseMessage = yr(Ar(), this.sessionId)), this.keepaliveResponseMessage;
2609
2624
  }
2610
2625
  /**
2611
2626
  * Process complete messages from the receive buffer.
@@ -2614,9 +2629,9 @@ class Ba {
2614
2629
  */
2615
2630
  processBufferedMessages() {
2616
2631
  const e = this.getReceiveDataView();
2617
- for (; this.receiveBufferLength >= rt; ) {
2632
+ for (; this.receiveBufferLength >= it; ) {
2618
2633
  const r = e.getUint32(this.receiveBufferOffset, !0);
2619
- if (r < rt) {
2634
+ if (r < it) {
2620
2635
  B.error(`Invalid message length: ${r}`), this.callbacks.onError(new Error(`Invalid protocol message length: ${r}`)), this.receiveBufferOffset = 0, this.receiveBufferLength = 0;
2621
2636
  return;
2622
2637
  }
@@ -2652,7 +2667,7 @@ class Ba {
2652
2667
  */
2653
2668
  resetKeepaliveTimeout() {
2654
2669
  this.clearKeepaliveTimeout(), this.keepaliveTimeout = setTimeout(() => {
2655
- B.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new ze(this.keepaliveTimeoutMs)), this.close();
2670
+ B.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new Qe(this.keepaliveTimeoutMs)), this.close();
2656
2671
  }, this.keepaliveTimeoutMs);
2657
2672
  }
2658
2673
  /**
@@ -2674,8 +2689,8 @@ class Ba {
2674
2689
  }
2675
2690
  }
2676
2691
  }
2677
- const te = M("Channel");
2678
- class xa {
2692
+ const te = O("Channel");
2693
+ class Wa {
2679
2694
  state = "disconnected";
2680
2695
  transport = null;
2681
2696
  config;
@@ -2750,18 +2765,18 @@ class xa {
2750
2765
  }
2751
2766
  };
2752
2767
  switch (e.Type) {
2753
- case k.WebSocket:
2754
- case k.WebSocketProxy:
2755
- this.transport = new Fa(r);
2768
+ case U.WebSocket:
2769
+ case U.WebSocketProxy:
2770
+ this.transport = new xa(r);
2756
2771
  break;
2757
- case k.WebTransport:
2758
- case k.WebTransportProxy:
2759
- if (!gr())
2772
+ case U.WebTransport:
2773
+ case U.WebTransportProxy:
2774
+ if (!Rr())
2760
2775
  throw new Error("WebTransport is not supported in this browser");
2761
- this.transport = new Ba(r);
2776
+ this.transport = new Va(r);
2762
2777
  break;
2763
2778
  default:
2764
- throw new Error(`Unsupported entrypoint type: ${k[e.Type]}`);
2779
+ throw new Error(`Unsupported entrypoint type: ${U[e.Type]}`);
2765
2780
  }
2766
2781
  await this.transport.connect(e.Uri, e.AuthTicket);
2767
2782
  }
@@ -2790,7 +2805,7 @@ class xa {
2790
2805
  * Handle transport error.
2791
2806
  */
2792
2807
  handleError(e) {
2793
- te.error("Channel error:", e), this.config.onError?.(e), e instanceof ze && this.handleClose("Keepalive timeout", !1);
2808
+ te.error("Channel error:", e), this.config.onError?.(e), e instanceof Qe && this.handleClose("Keepalive timeout", !1);
2794
2809
  }
2795
2810
  /**
2796
2811
  * Update and notify state change.
@@ -2799,8 +2814,8 @@ class xa {
2799
2814
  this.state !== e && (this.state = e, this.config.onStateChange?.(e));
2800
2815
  }
2801
2816
  }
2802
- const x = M("ChannelManager");
2803
- class Ga {
2817
+ const x = O("ChannelManager");
2818
+ class Ha {
2804
2819
  channels = /* @__PURE__ */ new Map();
2805
2820
  // keyed by opcode group
2806
2821
  activeType = null;
@@ -2881,7 +2896,7 @@ class Ga {
2881
2896
  await this.connectAllChannels(i), this.config.endpointSelector?.rememberWorkingType(s), this.config.onRememberWorkingType?.(s), this.activeType = s, this.reconnectAttempts = 0, this.setState("connected");
2882
2897
  return;
2883
2898
  } catch (o) {
2884
- x.warn(`Failed to connect using ${k[s]}: ${o}`), this.disconnectAll();
2899
+ x.warn(`Failed to connect using ${U[s]}: ${o}`), this.disconnectAll();
2885
2900
  }
2886
2901
  }
2887
2902
  throw x.error("All endpoint types failed"), e || this.setState("offline"), new Error("Failed to connect using any endpoint type");
@@ -2902,7 +2917,7 @@ class Ga {
2902
2917
  * Connect a single channel.
2903
2918
  */
2904
2919
  async connectChannel(e) {
2905
- const r = new xa({
2920
+ const r = new Wa({
2906
2921
  entrypoint: e,
2907
2922
  sessionId: this.config.sessionId,
2908
2923
  keepaliveTimeoutMs: this.config.keepaliveTimeoutMs,
@@ -2957,12 +2972,12 @@ class Ga {
2957
2972
  if (!this.shouldReconnect)
2958
2973
  return;
2959
2974
  if (this.reconnectAttempts >= this.config.maxReconnectAttempts) {
2960
- x.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new Ua(this.config.maxReconnectAttempts));
2975
+ x.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new Oa(this.config.maxReconnectAttempts));
2961
2976
  return;
2962
2977
  }
2963
2978
  this.setState("reconnecting"), this.reconnectAttempts++;
2964
2979
  const e = this.config.reconnectBackoffMs * Math.pow(2, this.reconnectAttempts - 1);
2965
- if (x.info(`Reconnecting in ${e}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), await Ar(e, this.abortController?.signal), !!this.shouldReconnect)
2980
+ if (x.info(`Reconnecting in ${e}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), await Nr(e, this.abortController?.signal), !!this.shouldReconnect)
2966
2981
  try {
2967
2982
  await this.connectInternal(!0);
2968
2983
  } catch (r) {
@@ -2984,25 +2999,25 @@ class Ga {
2984
2999
  this.state !== e && (this.state = e, this.config.onStateChange?.(e));
2985
3000
  }
2986
3001
  }
2987
- const Va = 5e3, Wa = 3e4, nt = 35e3, st = 500, it = 6, Nr = 6e4, Me = "ikon_device_id";
2988
- function Je() {
3002
+ const $a = 5e3, Ka = 3e4, ot = 35e3, at = 500, ct = 6, br = 6e4, ve = "ikon_device_id";
3003
+ function qe() {
2989
3004
  if (typeof window > "u" || typeof localStorage > "u")
2990
3005
  return crypto.randomUUID();
2991
3006
  try {
2992
- let t = localStorage.getItem(Me);
2993
- return t || (t = crypto.randomUUID(), localStorage.setItem(Me, t)), t;
3007
+ let t = localStorage.getItem(ve);
3008
+ return t || (t = crypto.randomUUID(), localStorage.setItem(ve, t)), t;
2994
3009
  } catch {
2995
3010
  return crypto.randomUUID();
2996
3011
  }
2997
3012
  }
2998
- function vl() {
3013
+ function Bl() {
2999
3014
  if (!(typeof localStorage > "u"))
3000
3015
  try {
3001
- localStorage.removeItem(Me);
3016
+ localStorage.removeItem(ve);
3002
3017
  } catch {
3003
3018
  }
3004
3019
  }
3005
- function Fl(t) {
3020
+ function xl(t) {
3006
3021
  try {
3007
3022
  const e = t.split(".");
3008
3023
  return e.length !== 3 ? null : JSON.parse(atob(e[1])).id ?? null;
@@ -3010,26 +3025,26 @@ function Fl(t) {
3010
3025
  return null;
3011
3026
  }
3012
3027
  }
3013
- const me = {}, Oe = "https://api.prod.ikon.live", _e = "https://api.dev.ikon.live", ot = "https://auth.ikonai.com", at = "https://auth.dev.ikonai.com", Pl = "https://auth.ikonai.com";
3014
- function Cr(t) {
3015
- return t === "development" ? _e : Oe;
3028
+ const me = {}, Fe = "https://api.prod.ikon.live", _e = "https://api.dev.ikon.live", lt = "https://auth.ikonai.com", ut = "https://auth.dev.ikonai.com", Gl = "https://auth.ikonai.com";
3029
+ function kr(t) {
3030
+ return t === "development" ? _e : Fe;
3016
3031
  }
3017
- function Bl() {
3032
+ function Vl() {
3018
3033
  const t = typeof import.meta < "u" ? me?.VITE_IKON_BACKEND_URL : void 0;
3019
- return t || (typeof window > "u" ? Oe : !Qe() || window.location.hostname.includes(".dev.") ? _e : Oe);
3034
+ return t || (typeof window > "u" ? Fe : !et() || window.location.hostname.includes(".dev.") ? _e : Fe);
3020
3035
  }
3021
- function xl() {
3036
+ function Wl() {
3022
3037
  const t = typeof import.meta < "u" ? me?.VITE_IKON_BACKEND_TYPE : void 0;
3023
3038
  if (t === "development" || t === "production")
3024
3039
  return t;
3025
3040
  const e = typeof import.meta < "u" ? me?.VITE_IKON_BACKEND_URL : void 0;
3026
- return e ? e.includes(".dev.") ? "development" : "production" : typeof window > "u" ? "production" : Qe() ? window.location.hostname.includes(".dev.") ? "development" : "production" : "development";
3041
+ return e ? e.includes(".dev.") ? "development" : "production" : typeof window > "u" ? "production" : et() ? window.location.hostname.includes(".dev.") ? "development" : "production" : "development";
3027
3042
  }
3028
- function Gl() {
3043
+ function Hl() {
3029
3044
  const t = typeof import.meta < "u" ? me?.VITE_IKON_AUTH_URL : void 0;
3030
- return t || (typeof window > "u" ? ot : !Qe() || window.location.hostname.includes(".dev.") ? at : ot);
3045
+ return t || (typeof window > "u" ? lt : !et() || window.location.hostname.includes(".dev.") ? ut : lt);
3031
3046
  }
3032
- function Rr() {
3047
+ function Ur() {
3033
3048
  if (typeof window > "u")
3034
3049
  return {};
3035
3050
  const t = new URLSearchParams(window.location.search), e = {};
@@ -3037,11 +3052,11 @@ function Rr() {
3037
3052
  e[r] = n;
3038
3053
  return e;
3039
3054
  }
3040
- const Ha = ["ikon_token", "ikon_provider", "error"], $a = "ikon_server_url";
3041
- function Ka() {
3042
- return typeof window > "u" ? void 0 : new URLSearchParams(window.location.search).get($a) ?? void 0;
3055
+ const Ya = ["ikon_token", "ikon_provider", "error"], ja = "ikon_server_url";
3056
+ function za() {
3057
+ return typeof window > "u" ? void 0 : new URLSearchParams(window.location.search).get(ja) ?? void 0;
3043
3058
  }
3044
- function Vl() {
3059
+ function $l() {
3045
3060
  if (typeof window > "u")
3046
3061
  return { parameters: {} };
3047
3062
  const t = window.location.pathname;
@@ -3051,12 +3066,12 @@ function Vl() {
3051
3066
  const s = t.match(/^\/c\/([^/]+)/);
3052
3067
  if (s && (r = decodeURIComponent(s[1])), e && r)
3053
3068
  throw new Error("URL cannot contain both /s/[sessionId] and /c/[channelKey]");
3054
- const i = Rr(), o = {};
3069
+ const i = Ur(), o = {};
3055
3070
  for (const [a, c] of Object.entries(i))
3056
- Ha.includes(a) || (o[a] = c);
3071
+ Ya.includes(a) || (o[a] = c);
3057
3072
  return { sessionId: e, channelKey: r, parameters: o };
3058
3073
  }
3059
- function Qe() {
3074
+ function et() {
3060
3075
  if (typeof window > "u") return !1;
3061
3076
  const t = window.location.hostname;
3062
3077
  if (t === "localhost" || t === "127.0.0.1" || t === "::1" || t.startsWith("10.") || t.startsWith("192.168."))
@@ -3068,8 +3083,8 @@ function Qe() {
3068
3083
  }
3069
3084
  return !0;
3070
3085
  }
3071
- const Te = M("Authenticator"), z = S.GROUP_CORE | S.GROUP_KEEPALIVE | S.GROUP_EVENTS | S.GROUP_ACTIONS | S.GROUP_UI | S.GROUP_AUDIO | S.GROUP_VIDEO | S.GROUP_ANALYTICS, Ya = 1e3, ja = 5e3;
3072
- async function za(t) {
3086
+ const Te = O("Authenticator"), z = S.GROUP_CORE | S.GROUP_KEEPALIVE | S.GROUP_EVENTS | S.GROUP_ACTIONS | S.GROUP_UI | S.GROUP_AUDIO | S.GROUP_VIDEO | S.GROUP_ANALYTICS, Xa = 1e3, Ja = 5e3;
3087
+ async function Qa(t) {
3073
3088
  try {
3074
3089
  const e = await fetch(`${_e}/users/me`, {
3075
3090
  credentials: "include",
@@ -3080,7 +3095,7 @@ async function za(t) {
3080
3095
  return;
3081
3096
  }
3082
3097
  }
3083
- function br(t, e, r) {
3098
+ function Dr(t, e, r) {
3084
3099
  const n = {
3085
3100
  method: "POST",
3086
3101
  headers: {
@@ -3092,40 +3107,40 @@ function br(t, e, r) {
3092
3107
  };
3093
3108
  return e || (n.credentials = "include"), n;
3094
3109
  }
3095
- async function kr(t, e, r, n, s, i, o) {
3110
+ async function Mr(t, e, r, n, s, i, o) {
3096
3111
  const a = `${t}/rooms`, c = {
3097
3112
  space: e,
3098
3113
  ...r ? { key: r } : {},
3099
3114
  ...n && Object.keys(n).length > 0 ? { params: n } : {},
3100
3115
  ...s ? { hash: s } : {}
3101
- }, l = await fetch(a, br(c, i, o));
3116
+ }, l = await fetch(a, Dr(c, i, o));
3102
3117
  if (!l.ok) {
3103
3118
  const d = await l.text().catch(() => "Unknown error");
3104
3119
  throw new g(`Failed to request channel: ${l.status} ${d}`);
3105
3120
  }
3106
3121
  return await l.json();
3107
3122
  }
3108
- async function Xa(t, e, r, n) {
3109
- const s = `${t}/rooms/connect`, i = await fetch(s, br(e, r, n));
3123
+ async function Za(t, e, r, n) {
3124
+ const s = `${t}/rooms/connect`, i = await fetch(s, Dr(e, r, n));
3110
3125
  if (!i.ok) {
3111
3126
  const o = await i.text().catch(() => "Unknown error");
3112
3127
  throw new g(`Backend connect failed: ${i.status} ${o}`);
3113
3128
  }
3114
3129
  return i.json();
3115
3130
  }
3116
- async function Ur(t, e, r, n, s) {
3131
+ async function Or(t, e, r, n, s) {
3117
3132
  const i = Date.now();
3118
- let o = Ya;
3133
+ let o = Xa;
3119
3134
  for (; ; ) {
3120
3135
  if (s?.aborted)
3121
3136
  throw new g("Connection aborted");
3122
3137
  if (Date.now() - i >= r)
3123
- throw new Da(r);
3124
- const c = await Xa(t, e, n, s), l = c.state?.toLowerCase();
3138
+ throw new La(r);
3139
+ const c = await Za(t, e, n, s), l = c.state?.toLowerCase();
3125
3140
  if (l === "running")
3126
3141
  return c;
3127
3142
  if (l === "provisioning") {
3128
- await Ar(o, s), o = Math.min(o * 1.5, ja);
3143
+ await Nr(o, s), o = Math.min(o * 1.5, Ja);
3129
3144
  continue;
3130
3145
  }
3131
3146
  throw new g(`Unexpected channel state: ${c.state}`);
@@ -3138,10 +3153,10 @@ async function ne(t, e) {
3138
3153
  throw new g(`Failed to connect: ${r.status} ${o}`);
3139
3154
  }
3140
3155
  const n = await r.arrayBuffer(), s = new Uint8Array(n);
3141
- return { authResponse: await Ms(s) };
3156
+ return { authResponse: await Ls(s) };
3142
3157
  }
3143
- function Ja(t, e) {
3144
- return vs({
3158
+ function qa(t, e) {
3159
+ return Ps({
3145
3160
  ServerSessionId: "",
3146
3161
  // Server will fill this in
3147
3162
  ContextType: Q.Browser,
@@ -3150,7 +3165,7 @@ function Ja(t, e) {
3150
3165
  IsInternal: !1,
3151
3166
  Description: t.description ?? "Ikon SDK TypeScript",
3152
3167
  UserId: e,
3153
- DeviceId: t.deviceId ?? Je(),
3168
+ DeviceId: t.deviceId ?? qe(),
3154
3169
  ProductId: t.productId ?? "ikon-sdk",
3155
3170
  VersionId: t.versionId ?? "1.0.0",
3156
3171
  InstallId: t.installId ?? "",
@@ -3168,7 +3183,7 @@ function Ja(t, e) {
3168
3183
  Parameters: t.parameters ?? {}
3169
3184
  });
3170
3185
  }
3171
- function Qa(t) {
3186
+ function ec(t) {
3172
3187
  return {
3173
3188
  ServerSessionId: t.ServerSessionId,
3174
3189
  ContextType: t.ContextType,
@@ -3195,13 +3210,13 @@ function Qa(t) {
3195
3210
  Parameters: t.Parameters
3196
3211
  };
3197
3212
  }
3198
- async function Za(t, e) {
3213
+ async function tc(t, e) {
3199
3214
  const r = `https://${t.host}:${t.httpsPort}`;
3200
3215
  Te.debug(`Authenticating with local server: ${r}`);
3201
- const s = { ...Rr(), ...t.parameters };
3216
+ const s = { ...Ur(), ...t.parameters };
3202
3217
  let i = t.userId;
3203
- i || (i = await za(e), i || (i = "local", Te.warn('Could not determine user ID. Using fallback "local". To fix: either provide userId in config, or log in to the Ikon portal at https://portal.dev.ikon.live')));
3204
- const o = Ja({ ...t, parameters: s }, i), a = Qa(o), c = await fetch(`${r}/connect-token`, {
3218
+ i || (i = await Qa(e), i || (i = "local", Te.warn('Could not determine user ID. Using fallback "local". To fix: either provide userId in config, or log in to the Ikon portal at https://portal.dev.ikon.live')));
3219
+ const o = qa({ ...t, parameters: s }, i), a = ec(o), c = await fetch(`${r}/connect-token`, {
3205
3220
  method: "POST",
3206
3221
  headers: {
3207
3222
  "Content-Type": "application/json"
@@ -3219,10 +3234,10 @@ async function Za(t, e) {
3219
3234
  const d = `${r}/connect?token=${encodeURIComponent(E)}`;
3220
3235
  return ne(d, e);
3221
3236
  }
3222
- async function qa(t, e) {
3237
+ async function rc(t, e) {
3223
3238
  if (t.sessionId && t.channelKey)
3224
3239
  throw new g("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
3225
- const r = Cr(t.backendType);
3240
+ const r = kr(t.backendType);
3226
3241
  Te.debug(`Authenticating with cloud server: ${r}, space ID: ${t.spaceId}`);
3227
3242
  const n = await fetch(`${r}/auth/api-key`, {
3228
3243
  method: "POST",
@@ -3255,13 +3270,13 @@ async function qa(t, e) {
3255
3270
  throw new g(`Failed to get or create profile: ${o.status} ${h}`);
3256
3271
  }
3257
3272
  const c = {
3258
- code: (await kr(r, t.spaceId, t.channelKey, t.parameters, t.sessionId, i, e)).code,
3273
+ code: (await Mr(r, t.spaceId, t.channelKey, t.parameters, t.sessionId, i, e)).code,
3259
3274
  contextType: Q.Plugin,
3260
3275
  userType: t.userType ?? q.Human,
3261
3276
  clientType: t.clientType ?? J.DesktopWeb,
3262
3277
  payloadType: Z.Teleport,
3263
3278
  description: t.description ?? "Ikon SDK TypeScript",
3264
- deviceId: t.deviceId ?? Je(),
3279
+ deviceId: t.deviceId ?? qe(),
3265
3280
  productId: t.productId ?? "",
3266
3281
  versionId: t.versionId ?? "",
3267
3282
  installId: t.installId ?? "",
@@ -3273,16 +3288,16 @@ async function qa(t, e) {
3273
3288
  launchParams: t.parameters,
3274
3289
  hash: t.sessionId,
3275
3290
  waitForRunning: !0
3276
- }, l = t.provisioningTimeoutMs ?? Nr, E = await Ur(r, c, l, i, e);
3291
+ }, l = t.provisioningTimeoutMs ?? br, E = await Or(r, c, l, i, e);
3277
3292
  if (!E.configuration?.url)
3278
3293
  throw new g("Backend did not return a connect URL");
3279
3294
  const d = E.configuration.url;
3280
3295
  return ne(d, e);
3281
3296
  }
3282
- async function ec(t, e) {
3297
+ async function nc(t, e) {
3283
3298
  if (t.sessionId && t.channelKey)
3284
3299
  throw new g("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
3285
- const r = Cr(t.backendType), n = t.token;
3300
+ const r = kr(t.backendType), n = t.token;
3286
3301
  Te.debug(`Authenticating with session token to: ${r}, space ID: ${t.spaceId}`);
3287
3302
  const s = await fetch(`${r}/profiles/me?space=${encodeURIComponent(t.spaceId)}`, {
3288
3303
  method: "GET",
@@ -3296,13 +3311,13 @@ async function ec(t, e) {
3296
3311
  throw new g(`Failed to get or create profile: ${s.status} ${E}`);
3297
3312
  }
3298
3313
  const o = {
3299
- code: (await kr(r, t.spaceId, t.channelKey, t.parameters, t.sessionId, n, e)).code,
3314
+ code: (await Mr(r, t.spaceId, t.channelKey, t.parameters, t.sessionId, n, e)).code,
3300
3315
  contextType: Q.Browser,
3301
3316
  userType: q.Human,
3302
3317
  clientType: J.DesktopWeb,
3303
3318
  payloadType: Z.Teleport,
3304
3319
  description: t.description ?? "Ikon SDK TypeScript",
3305
- deviceId: t.deviceId ?? Je(),
3320
+ deviceId: t.deviceId ?? qe(),
3306
3321
  productId: t.productId ?? "",
3307
3322
  versionId: t.versionId ?? "",
3308
3323
  installId: t.installId ?? "",
@@ -3314,28 +3329,28 @@ async function ec(t, e) {
3314
3329
  launchParams: t.parameters,
3315
3330
  hash: t.sessionId,
3316
3331
  waitForRunning: !0
3317
- }, a = t.provisioningTimeoutMs ?? Nr, c = await Ur(r, o, a, n, e);
3332
+ }, a = t.provisioningTimeoutMs ?? br, c = await Or(r, o, a, n, e);
3318
3333
  if (!c.configuration?.url)
3319
3334
  throw new g("Backend did not return a connect URL");
3320
3335
  const l = c.configuration.url;
3321
3336
  return ne(l, e);
3322
3337
  }
3323
- const Dr = "ikon.theme", Le = "ikon.theme-user", tc = "ikon.theme-change";
3324
- function Mr(t) {
3338
+ const Lr = "ikon.theme", Pe = "ikon.theme-user", sc = "ikon.theme-change";
3339
+ function vr(t) {
3325
3340
  typeof document < "u" && document.documentElement && document.documentElement.setAttribute("data-theme", t);
3326
3341
  }
3327
- const rc = {
3342
+ const ic = {
3328
3343
  name: "ikon.client.getTheme",
3329
3344
  description: "Get the currently selected client theme",
3330
3345
  returnType: { kind: "string", nullable: !0 }
3331
3346
  };
3332
- function nc() {
3347
+ function oc() {
3333
3348
  if (typeof window > "u" || !window.localStorage)
3334
3349
  return null;
3335
- const t = window.localStorage.getItem(Le) ?? window.localStorage.getItem(Dr) ?? "light";
3336
- return Mr(t), t;
3350
+ const t = window.localStorage.getItem(Pe) ?? window.localStorage.getItem(Lr) ?? "light";
3351
+ return vr(t), t;
3337
3352
  }
3338
- const sc = {
3353
+ const ac = {
3339
3354
  name: "ikon.client.setTheme",
3340
3355
  description: "Update the client UI theme",
3341
3356
  returnType: { kind: "boolean" },
@@ -3344,49 +3359,49 @@ const sc = {
3344
3359
  { name: "persist", type: { kind: "boolean", nullable: !0 }, description: "Whether to persist as user preference" }
3345
3360
  ]
3346
3361
  };
3347
- function ic(t, e) {
3362
+ function cc(t, e) {
3348
3363
  if (typeof window > "u" || !window.localStorage || typeof t != "string")
3349
3364
  return !1;
3350
3365
  const r = t.trim().toLowerCase();
3351
3366
  if (!r)
3352
3367
  return !1;
3353
3368
  const n = e === void 0 ? !0 : !!e, s = window.localStorage;
3354
- n ? s.setItem(Le, r) : s.removeItem(Le), s.setItem(Dr, r);
3369
+ n ? s.setItem(Pe, r) : s.removeItem(Pe), s.setItem(Lr, r);
3355
3370
  try {
3356
- window.dispatchEvent(new CustomEvent(tc, { detail: { mode: r } }));
3371
+ window.dispatchEvent(new CustomEvent(sc, { detail: { mode: r } }));
3357
3372
  } catch {
3358
3373
  }
3359
- return Mr(r), !0;
3374
+ return vr(r), !0;
3360
3375
  }
3361
- const oc = {
3376
+ const lc = {
3362
3377
  name: "ikon.client.getLanguage",
3363
3378
  description: "Get the browser language preference",
3364
3379
  returnType: { kind: "string" }
3365
3380
  };
3366
- function ac() {
3381
+ function uc() {
3367
3382
  return typeof navigator > "u" ? "en-US" : navigator.language || "en-US";
3368
3383
  }
3369
- const cc = {
3384
+ const hc = {
3370
3385
  name: "ikon.client.getTimezone",
3371
3386
  description: "Get the browser timezone (IANA format)",
3372
3387
  returnType: { kind: "string" }
3373
3388
  };
3374
- function lc() {
3389
+ function dc() {
3375
3390
  try {
3376
3391
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
3377
3392
  } catch {
3378
3393
  return "UTC";
3379
3394
  }
3380
3395
  }
3381
- const uc = {
3396
+ const fc = {
3382
3397
  name: "ikon.client.getUrl",
3383
3398
  description: "Get the current browser URL path and query string",
3384
3399
  returnType: { kind: "string", nullable: !0 }
3385
3400
  };
3386
- function hc() {
3401
+ function Ec() {
3387
3402
  return typeof window > "u" ? null : window.location.pathname + window.location.search;
3388
3403
  }
3389
- const dc = {
3404
+ const pc = {
3390
3405
  name: "ikon.client.setUrl",
3391
3406
  description: "Update the browser URL without triggering a page reload",
3392
3407
  returnType: { kind: "boolean" },
@@ -3395,7 +3410,7 @@ const dc = {
3395
3410
  { name: "replace", type: { kind: "boolean", nullable: !0 }, description: "If true, replaces current history entry instead of adding new one" }
3396
3411
  ]
3397
3412
  };
3398
- function fc(t, e) {
3413
+ function Ic(t, e) {
3399
3414
  if (typeof window > "u" || !window.history || typeof t != "string")
3400
3415
  return !1;
3401
3416
  const r = t.trim();
@@ -3407,13 +3422,13 @@ function fc(t, e) {
3407
3422
  return !1;
3408
3423
  }
3409
3424
  }
3410
- const Ec = {
3425
+ const mc = {
3411
3426
  name: "ikon.client.vibrate",
3412
3427
  description: "Trigger haptic feedback on supported devices",
3413
3428
  returnType: { kind: "boolean" },
3414
3429
  parameters: [{ name: "pattern", type: { kind: "string" }, description: 'Duration in ms, or comma-separated pattern (e.g., "200" or "100,50,100")' }]
3415
3430
  };
3416
- function pc(t) {
3431
+ function _c(t) {
3417
3432
  if (typeof navigator > "u" || !navigator.vibrate || typeof t != "string")
3418
3433
  return !1;
3419
3434
  try {
@@ -3424,13 +3439,13 @@ function pc(t) {
3424
3439
  }
3425
3440
  }
3426
3441
  let re = null;
3427
- const Ic = {
3442
+ const Tc = {
3428
3443
  name: "ikon.client.keepScreenAwake",
3429
3444
  description: "Prevent or allow the screen to sleep",
3430
3445
  returnType: { kind: "boolean" },
3431
3446
  parameters: [{ name: "enabled", type: { kind: "boolean" }, description: "Whether to keep the screen awake" }]
3432
3447
  };
3433
- async function mc(t) {
3448
+ async function Sc(t) {
3434
3449
  if (typeof navigator > "u" || !("wakeLock" in navigator))
3435
3450
  return !1;
3436
3451
  try {
@@ -3439,15 +3454,15 @@ async function mc(t) {
3439
3454
  return !1;
3440
3455
  }
3441
3456
  }
3442
- const _c = {
3457
+ const wc = {
3443
3458
  name: "ikon.client.getVisibility",
3444
3459
  description: "Get the current page visibility state",
3445
3460
  returnType: { kind: "string", nullable: !0 }
3446
3461
  };
3447
- function Tc() {
3462
+ function Ac() {
3448
3463
  return typeof document > "u" ? null : document.visibilityState || null;
3449
3464
  }
3450
- const Sc = {
3465
+ const yc = {
3451
3466
  name: "ikon.client.scrollTo",
3452
3467
  description: "Scroll the page to a specific position",
3453
3468
  returnType: { kind: "boolean" },
@@ -3457,7 +3472,7 @@ const Sc = {
3457
3472
  { name: "smooth", type: { kind: "boolean", nullable: !0 }, description: "Whether to animate the scroll" }
3458
3473
  ]
3459
3474
  };
3460
- function wc(t, e, r) {
3475
+ function gc(t, e, r) {
3461
3476
  if (typeof window > "u" || typeof t != "number" || typeof e != "number")
3462
3477
  return !1;
3463
3478
  try {
@@ -3470,12 +3485,12 @@ function wc(t, e, r) {
3470
3485
  return !1;
3471
3486
  }
3472
3487
  }
3473
- const Ac = {
3488
+ const Nc = {
3474
3489
  name: "ikon.client.getBatteryLevel",
3475
3490
  description: "Get the current battery level (0-100)",
3476
3491
  returnType: { kind: "number", nullable: !0 }
3477
3492
  };
3478
- async function yc() {
3493
+ async function Cc() {
3479
3494
  if (typeof navigator > "u" || !("getBattery" in navigator))
3480
3495
  return null;
3481
3496
  try {
@@ -3485,39 +3500,39 @@ async function yc() {
3485
3500
  return null;
3486
3501
  }
3487
3502
  }
3488
- const gc = {
3503
+ const Rc = {
3489
3504
  name: "ikon.client.getNetworkType",
3490
3505
  description: "Get the current network connection type",
3491
3506
  returnType: { kind: "string", nullable: !0 }
3492
3507
  };
3493
- function Nc() {
3508
+ function bc() {
3494
3509
  if (typeof navigator > "u")
3495
3510
  return null;
3496
3511
  const t = navigator.connection;
3497
3512
  return t && (t.effectiveType || t.type) || null;
3498
3513
  }
3499
- const Cc = [
3500
- { definition: rc, handler: nc },
3501
- { definition: sc, handler: ic },
3502
- { definition: oc, handler: ac },
3503
- { definition: cc, handler: lc },
3504
- { definition: uc, handler: hc },
3505
- { definition: dc, handler: fc },
3506
- { definition: Ec, handler: pc },
3507
- { definition: Ic, handler: mc },
3508
- { definition: _c, handler: Tc },
3509
- { definition: Sc, handler: wc },
3510
- { definition: Ac, handler: yc },
3511
- { definition: gc, handler: Nc }
3514
+ const kc = [
3515
+ { definition: ic, handler: oc },
3516
+ { definition: ac, handler: cc },
3517
+ { definition: lc, handler: uc },
3518
+ { definition: hc, handler: dc },
3519
+ { definition: fc, handler: Ec },
3520
+ { definition: pc, handler: Ic },
3521
+ { definition: mc, handler: _c },
3522
+ { definition: Tc, handler: Sc },
3523
+ { definition: wc, handler: Ac },
3524
+ { definition: yc, handler: gc },
3525
+ { definition: Nc, handler: Cc },
3526
+ { definition: Rc, handler: bc }
3512
3527
  ];
3513
- function Rc(t) {
3514
- const e = Cc.map(({ definition: r, handler: n }) => t.register(r, n));
3528
+ function Uc(t) {
3529
+ const e = kc.map(({ definition: r, handler: n }) => t.register(r, n));
3515
3530
  return () => e.forEach((r) => r());
3516
3531
  }
3517
- function ct() {
3532
+ function ht() {
3518
3533
  return typeof window < "u" && typeof navigator < "u";
3519
3534
  }
3520
- const bc = new Uint8Array(0);
3535
+ const Dc = new Uint8Array(0);
3521
3536
  function Se(t) {
3522
3537
  switch (t.kind) {
3523
3538
  case "array":
@@ -3556,7 +3571,7 @@ function se(t) {
3556
3571
  return t;
3557
3572
  }
3558
3573
  }
3559
- function lt(t, e) {
3574
+ function dt(t, e) {
3560
3575
  if (t === void 0 || t === "")
3561
3576
  return;
3562
3577
  const r = JSON.parse(t);
@@ -3567,7 +3582,7 @@ function lt(t, e) {
3567
3582
  }
3568
3583
  return r;
3569
3584
  }
3570
- function Or(t, e) {
3585
+ function Fr(t, e) {
3571
3586
  if (t === void 0)
3572
3587
  return "null";
3573
3588
  if (t === null) {
@@ -3577,9 +3592,9 @@ function Or(t, e) {
3577
3592
  }
3578
3593
  return JSON.stringify(t);
3579
3594
  }
3580
- function kc(t, e) {
3595
+ function Mc(t, e) {
3581
3596
  const r = (t.parameters ?? []).map((i) => {
3582
- const o = Se(i.type), a = Object.prototype.hasOwnProperty.call(i, "defaultValue"), c = a ? Or(i.defaultValue, o) : "";
3597
+ const o = Se(i.type), a = Object.prototype.hasOwnProperty.call(i, "defaultValue"), c = a ? Fr(i.defaultValue, o) : "";
3583
3598
  return {
3584
3599
  name: i.name,
3585
3600
  descriptor: o,
@@ -3588,7 +3603,7 @@ function kc(t, e) {
3588
3603
  description: i.description
3589
3604
  };
3590
3605
  }), n = Se(t.returnType), s = {
3591
- FunctionId: m.createRandom(),
3606
+ FunctionId: I.createRandom(),
3592
3607
  FunctionName: t.name,
3593
3608
  Description: t.description ?? "",
3594
3609
  LlmInlineResult: t.llmInlineResult ?? !1,
@@ -3604,7 +3619,7 @@ function kc(t, e) {
3604
3619
  TypeName: se(i.descriptor),
3605
3620
  HasDefaultValue: i.hasDefaultValue,
3606
3621
  DefaultValueJson: i.defaultValueJson,
3607
- DefaultValueData: bc,
3622
+ DefaultValueData: Dc,
3608
3623
  IsEnumerable: !1,
3609
3624
  EnumerableItemTypeName: "",
3610
3625
  Description: i.description ?? ""
@@ -3618,11 +3633,11 @@ function kc(t, e) {
3618
3633
  returnType: n
3619
3634
  };
3620
3635
  }
3621
- const ge = M("FunctionRegistry"), Uc = new Uint8Array(0);
3622
- function Dc(t) {
3636
+ const Re = O("FunctionRegistry"), Oc = new Uint8Array(0);
3637
+ function Lc(t) {
3623
3638
  return !t || typeof t != "object" ? !1 : t.data instanceof Uint8Array;
3624
3639
  }
3625
- class Mc {
3640
+ class vc {
3626
3641
  functions = /* @__PURE__ */ new Map();
3627
3642
  remoteFunctions = /* @__PURE__ */ new Map();
3628
3643
  config = null;
@@ -3645,7 +3660,7 @@ class Mc {
3645
3660
  * If already connected, sends registration to server immediately.
3646
3661
  */
3647
3662
  register(e, r) {
3648
- const n = kc(e, r);
3663
+ const n = Mc(e, r);
3649
3664
  return this.functions.set(e.name, n), this.isConnected && this.config && this.sendRegistration(n), () => this.unregister(e.name);
3650
3665
  }
3651
3666
  /**
@@ -3737,7 +3752,7 @@ class Mc {
3737
3752
  if (r === S.ACTION_FUNCTION_CALL) {
3738
3753
  const n = ie(e);
3739
3754
  return this.handleFunctionCall(e, n.senderId).catch((s) => {
3740
- ge.error("Failed to handle function call:", s);
3755
+ Re.error("Failed to handle function call:", s);
3741
3756
  }), !0;
3742
3757
  }
3743
3758
  return !1;
@@ -3749,7 +3764,7 @@ class Mc {
3749
3764
  sendAllRegistrations() {
3750
3765
  if (!this.config || this.functions.size === 0)
3751
3766
  return;
3752
- const e = Array.from(this.functions.values()).map((s) => s.registerPayload), r = vi({ Functions: e }), n = xi(r, this.config.sessionId);
3767
+ const e = Array.from(this.functions.values()).map((s) => s.registerPayload), r = Pi({ Functions: e }), n = Vi(r, this.config.sessionId);
3753
3768
  this.config.sendProtocolMessage(n);
3754
3769
  }
3755
3770
  /**
@@ -3758,16 +3773,16 @@ class Mc {
3758
3773
  sendRegistration(e) {
3759
3774
  if (!this.config)
3760
3775
  return;
3761
- const r = Ci(e.registerPayload, this.config.sessionId);
3776
+ const r = bi(e.registerPayload, this.config.sessionId);
3762
3777
  this.config.sendProtocolMessage(r);
3763
3778
  }
3764
3779
  /**
3765
3780
  * Handle an incoming function call.
3766
3781
  */
3767
3782
  async handleFunctionCall(e, r) {
3768
- const n = await ri(e), s = this.functions.get(n.FunctionName);
3783
+ const n = await si(e), s = this.functions.get(n.FunctionName);
3769
3784
  if (!s) {
3770
- ge.warn(`Received call for unknown function: ${n.FunctionName}`), this.sendError(n.CallId, n.InstanceId, r, new Error(`Unknown function: ${n.FunctionName}`));
3785
+ Re.warn(`Received call for unknown function: ${n.FunctionName}`), this.sendError(n.CallId, n.InstanceId, r, new Error(`Unknown function: ${n.FunctionName}`));
3771
3786
  return;
3772
3787
  }
3773
3788
  this.sendAck(n.CallId, n.InstanceId, r), this.executeFunction(s, n, r);
@@ -3780,15 +3795,15 @@ class Mc {
3780
3795
  const s = [];
3781
3796
  for (let l = 0; l < e.parameters.length; l++) {
3782
3797
  const E = e.parameters[l], h = r.Parameters?.[l]?.ValueJson;
3783
- h === void 0 || h === "" ? E.hasDefaultValue ? s.push(lt(E.defaultValueJson, E.descriptor)) : s.push(void 0) : s.push(lt(h, E.descriptor));
3798
+ h === void 0 || h === "" ? E.hasDefaultValue ? s.push(dt(E.defaultValueJson, E.descriptor)) : s.push(void 0) : s.push(dt(h, E.descriptor));
3784
3799
  }
3785
3800
  const i = await e.handler(...s);
3786
- let o = i, a = Uc;
3787
- Dc(i) && (o = i.value, a = new Uint8Array(i.data));
3788
- const c = Or(o, e.returnType);
3801
+ let o = i, a = Oc;
3802
+ Lc(i) && (o = i.value, a = new Uint8Array(i.data));
3803
+ const c = Fr(o, e.returnType);
3789
3804
  this.sendResult(r.CallId, r.InstanceId, n, e, c, a);
3790
3805
  } catch (s) {
3791
- ge.error(`Function ${r.FunctionName} execution failed:`, s), this.sendError(r.CallId, r.InstanceId, n, s instanceof Error ? s : new Error(String(s)));
3806
+ Re.error(`Function ${r.FunctionName} execution failed:`, s), this.sendError(r.CallId, r.InstanceId, n, s instanceof Error ? s : new Error(String(s)));
3792
3807
  }
3793
3808
  }
3794
3809
  /**
@@ -3797,7 +3812,7 @@ class Mc {
3797
3812
  sendAck(e, r, n) {
3798
3813
  if (!this.config)
3799
3814
  return;
3800
- const s = $s(Gs({ CallId: e, InstanceId: r }), this.config.sessionId, { targetIds: [n] });
3815
+ const s = Ys(Ws({ CallId: e, InstanceId: r }), this.config.sessionId, { targetIds: [n] });
3801
3816
  this.config.sendProtocolMessage(s);
3802
3817
  }
3803
3818
  /**
@@ -3806,8 +3821,8 @@ class Mc {
3806
3821
  sendResult(e, r, n, s, i, o) {
3807
3822
  if (!this.config)
3808
3823
  return;
3809
- const a = Ji(
3810
- Yi({
3824
+ const a = Zi(
3825
+ zi({
3811
3826
  CallId: e,
3812
3827
  InstanceId: r,
3813
3828
  ResultTypeName: se(s.returnType),
@@ -3825,8 +3840,8 @@ class Mc {
3825
3840
  sendError(e, r, n, s) {
3826
3841
  if (!this.config)
3827
3842
  return;
3828
- const i = Si(
3829
- Ii({
3843
+ const i = Ai(
3844
+ _i({
3830
3845
  CallId: e,
3831
3846
  InstanceId: r,
3832
3847
  ErrorMessage: s.message,
@@ -3839,10 +3854,10 @@ class Mc {
3839
3854
  this.config.sendProtocolMessage(i);
3840
3855
  }
3841
3856
  }
3842
- function Oc(t, e) {
3857
+ function Fc(t, e) {
3843
3858
  return { value: t, data: e };
3844
3859
  }
3845
- function Ne(t) {
3860
+ function be(t) {
3846
3861
  if (!(typeof t != "string" || !t.trim()))
3847
3862
  try {
3848
3863
  return JSON.parse(t);
@@ -3850,55 +3865,55 @@ function Ne(t) {
3850
3865
  return;
3851
3866
  }
3852
3867
  }
3853
- const ye = {
3868
+ const Ne = {
3854
3869
  StartVideoCapture: "ikon.client.startVideoCapture",
3855
3870
  StartAudioCapture: "ikon.client.startAudioCapture",
3856
3871
  StopCapture: "ikon.client.stopCapture",
3857
3872
  CaptureImage: "ikon.client.captureImage"
3858
- }, Lc = {
3859
- name: ye.StartVideoCapture,
3873
+ }, Pc = {
3874
+ name: Ne.StartVideoCapture,
3860
3875
  description: "Start camera or screen capture and stream video frames to the server",
3861
3876
  returnType: { kind: "string" },
3862
3877
  parameters: [
3863
3878
  { name: "source", type: { kind: "string", nullable: !0 }, description: "camera or screen" },
3864
3879
  { name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }
3865
3880
  ]
3866
- }, vc = {
3867
- name: ye.StartAudioCapture,
3881
+ }, Bc = {
3882
+ name: Ne.StartAudioCapture,
3868
3883
  description: "Start microphone capture and stream audio frames to the server",
3869
3884
  returnType: { kind: "string" },
3870
3885
  parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
3871
- }, Fc = {
3872
- name: ye.StopCapture,
3873
- description: "Stop a previously started capture by captureId",
3886
+ }, xc = {
3887
+ name: Ne.StopCapture,
3888
+ description: "Stop a previously started capture by streamId",
3874
3889
  returnType: { kind: "boolean" },
3875
- parameters: [{ name: "captureId", type: { kind: "string" }, description: "Capture ID to stop" }]
3876
- }, Pc = {
3877
- name: ye.CaptureImage,
3890
+ parameters: [{ name: "streamId", type: { kind: "string" }, description: "Stream ID to stop" }]
3891
+ }, Gc = {
3892
+ name: Ne.CaptureImage,
3878
3893
  description: "Capture a single image from the camera and return metadata (JSON) plus binary image data",
3879
3894
  returnType: { kind: "string" },
3880
3895
  parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
3881
3896
  };
3882
- function Bc(t, e) {
3897
+ function Vc(t, e) {
3883
3898
  const r = [];
3884
3899
  return r.push(
3885
- t.register(Lc, async (n, s) => {
3900
+ t.register(Pc, async (n, s) => {
3886
3901
  const i = e.mediaCapture;
3887
3902
  if (!i)
3888
3903
  throw new Error("Media capture is not available in this environment");
3889
- const o = Ne(s);
3890
- return ((typeof n == "string" && n.trim().toLowerCase() === "screen" ? "screen" : "camera") === "screen" ? await i.video.startScreen({ userGesture: !1, options: o, constraints: o?.constraints }) : await i.video.startCamera({ userGesture: !1, options: o, constraints: o?.constraints })).captureId;
3904
+ const o = be(s);
3905
+ return ((typeof n == "string" && n.trim().toLowerCase() === "screen" ? "screen" : "camera") === "screen" ? await i.video.startScreen({ userGesture: !1, options: o, constraints: o?.constraints }) : await i.video.startCamera({ userGesture: !1, options: o, constraints: o?.constraints })).streamId;
3891
3906
  })
3892
3907
  ), r.push(
3893
- t.register(vc, async (n) => {
3908
+ t.register(Bc, async (n) => {
3894
3909
  const s = e.mediaCapture;
3895
3910
  if (!s)
3896
3911
  throw new Error("Media capture is not available in this environment");
3897
- const i = Ne(n);
3898
- return (await s.audio.startMic({ userGesture: !1, options: i, constraints: i?.constraints })).captureId;
3912
+ const i = be(n);
3913
+ return (await s.audio.startMic({ userGesture: !1, options: i, constraints: i?.constraints })).streamId;
3899
3914
  })
3900
3915
  ), r.push(
3901
- t.register(Fc, async (n) => {
3916
+ t.register(xc, async (n) => {
3902
3917
  const s = e.mediaCapture;
3903
3918
  if (!s || typeof n != "string" || !n.trim())
3904
3919
  return !1;
@@ -3906,11 +3921,11 @@ function Bc(t, e) {
3906
3921
  return i || o;
3907
3922
  })
3908
3923
  ), r.push(
3909
- t.register(Pc, async (n) => {
3924
+ t.register(Gc, async (n) => {
3910
3925
  const s = e.mediaCapture;
3911
3926
  if (!s)
3912
3927
  throw new Error("Media capture is not available in this environment");
3913
- const i = Ne(n) ?? {}, o = await s.image.captureFromCamera({
3928
+ const i = be(n) ?? {}, o = await s.image.captureFromCamera({
3914
3929
  userGesture: !1,
3915
3930
  constraints: i.constraints,
3916
3931
  mime: i.mime,
@@ -3918,25 +3933,25 @@ function Bc(t, e) {
3918
3933
  width: i.width,
3919
3934
  height: i.height
3920
3935
  }), a = JSON.stringify({ mime: o.mime, width: o.width, height: o.height });
3921
- return Oc(a, o.data);
3936
+ return Fc(a, o.data);
3922
3937
  })
3923
3938
  ), () => {
3924
3939
  for (const n of r)
3925
3940
  n();
3926
3941
  };
3927
3942
  }
3928
- const Lr = () => {
3943
+ const Pr = () => {
3929
3944
  if (typeof navigator > "u")
3930
3945
  return !1;
3931
3946
  const t = navigator.userAgent, e = /iPad|iPhone|iPod/.test(t), r = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
3932
3947
  return e || r;
3933
- }, le = M("Capabilities"), xc = globalThis;
3948
+ }, le = O("Capabilities"), Wc = globalThis;
3934
3949
  function de() {
3935
3950
  if (typeof SharedArrayBuffer > "u")
3936
3951
  return le.debug("SharedArrayBuffer not supported: SharedArrayBuffer is undefined"), !1;
3937
3952
  if (typeof Atomics > "u")
3938
3953
  return le.debug("SharedArrayBuffer not supported: Atomics is undefined"), !1;
3939
- if (xc.crossOriginIsolated === !1)
3954
+ if (Wc.crossOriginIsolated === !1)
3940
3955
  return le.debug("SharedArrayBuffer not supported: crossOriginIsolated is false (missing COOP/COEP headers)"), !1;
3941
3956
  try {
3942
3957
  new SharedArrayBuffer(1);
@@ -3945,43 +3960,43 @@ function de() {
3945
3960
  }
3946
3961
  return !0;
3947
3962
  }
3948
- function vr(t) {
3963
+ function Br(t) {
3949
3964
  return typeof AudioWorkletNode != "function" ? !1 : typeof t.audioWorklet?.addModule == "function";
3950
3965
  }
3951
- function Gc(t) {
3966
+ function Hc(t) {
3952
3967
  return new Worker(
3953
- "" + new URL("assets/audio-playback-worker-CM2aCt54.js", import.meta.url).href,
3968
+ "" + new URL("assets/audio-playback-worker-D0LDYB5W.js", import.meta.url).href,
3954
3969
  {
3955
3970
  type: "module",
3956
3971
  name: t?.name
3957
3972
  }
3958
3973
  );
3959
3974
  }
3960
- const ue = 48e3, b = 2, Fr = 1500, ut = 512, ht = "playback", Vc = 120, Wc = 300, Hc = 4, $c = 200, Kc = 100, Yc = 8e3, jc = 10, Pr = 100, ve = 50, Br = 128, zc = 20, Xc = !0, G = 1500, Jc = -20, Qc = -100, Zc = 200, A = M("IkonAudioPlayback"), qc = () => {
3975
+ const ue = 48e3, k = 2, xr = 1500, ft = 512, Et = "playback", $c = 120, Kc = 300, Yc = 4, jc = 200, zc = 100, Xc = 8e3, Jc = 10, Gr = 100, Be = 50, Vr = 128, Qc = 20, Zc = !0, V = 1500, qc = -20, el = -100, tl = 200, y = O("IkonAudioPlayback"), rl = () => {
3961
3976
  if (typeof navigator > "u" || typeof window > "u")
3962
3977
  return !1;
3963
3978
  const t = navigator.userAgent, e = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t), r = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
3964
3979
  return e || r;
3965
- }, dt = {
3980
+ }, pt = {
3966
3981
  enabled: !1,
3967
3982
  statusIntervalMs: 1e3
3968
3983
  };
3969
- function V(t) {
3984
+ function W(t) {
3970
3985
  return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
3971
3986
  }
3972
- function el(t) {
3987
+ function nl(t) {
3973
3988
  return `
3974
3989
  // Audio buffer constants
3975
3990
  const OUTPUT_SAMPLE_RATE_HZ = ${t.outputSampleRateHz};
3976
3991
  const DEFAULT_FRAME_SAMPLES_PER_CHANNEL = Math.max(1, Math.round(OUTPUT_SAMPLE_RATE_HZ * 0.02));
3977
- const BUFFER_TARGET_MIN_MS = ${Vc};
3978
- const BUFFER_TARGET_MAX_MS = ${Wc};
3979
- const JITTER_MULTIPLIER = ${Hc};
3980
- const LOCAL_BUFFER_MAX_MS = ${Fr};
3981
- const CONTROL_PERIOD_MS = ${$c};
3982
- const UNDERRUN_JUMP_MS = ${Kc};
3983
- const STABLE_TIME_TO_DECREASE_MS = ${Yc};
3984
- const DECREASE_STEP_MS = ${jc};
3992
+ const BUFFER_TARGET_MIN_MS = ${$c};
3993
+ const BUFFER_TARGET_MAX_MS = ${Kc};
3994
+ const JITTER_MULTIPLIER = ${Yc};
3995
+ const LOCAL_BUFFER_MAX_MS = ${xr};
3996
+ const CONTROL_PERIOD_MS = ${jc};
3997
+ const UNDERRUN_JUMP_MS = ${zc};
3998
+ const STABLE_TIME_TO_DECREASE_MS = ${Xc};
3999
+ const DECREASE_STEP_MS = ${Jc};
3985
4000
  const DEFAULT_STATS_INTERVAL_SAMPLES = OUTPUT_SAMPLE_RATE_HZ;
3986
4001
 
3987
4002
  // Pre-computed reciprocals for division-free calculations
@@ -3989,18 +4004,18 @@ const INV_OUTPUT_SAMPLE_RATE_HZ = 1 / OUTPUT_SAMPLE_RATE_HZ;
3989
4004
  const MS_PER_SAMPLE = 1000 * INV_OUTPUT_SAMPLE_RATE_HZ;
3990
4005
 
3991
4006
  // Fade envelope constants
3992
- const FADE_IN_DURATION_MS = ${Pr};
3993
- const FADE_OUT_DURATION_MS = ${ve};
4007
+ const FADE_IN_DURATION_MS = ${Gr};
4008
+ const FADE_OUT_DURATION_MS = ${Be};
3994
4009
  const FADE_IN_DURATION_SAMPLES = Math.round(OUTPUT_SAMPLE_RATE_HZ * FADE_IN_DURATION_MS / 1000);
3995
4010
  const FADE_OUT_DURATION_SAMPLES = Math.round(OUTPUT_SAMPLE_RATE_HZ * FADE_OUT_DURATION_MS / 1000);
3996
4011
  const FADE_IN_INCREMENT = 1.0 / FADE_IN_DURATION_SAMPLES;
3997
4012
  const FADE_OUT_INCREMENT = 1.0 / FADE_OUT_DURATION_SAMPLES;
3998
4013
 
3999
4014
  // Render quantum size (standard Web Audio API value)
4000
- const RENDER_QUANTUM_SIZE = ${Br};
4015
+ const RENDER_QUANTUM_SIZE = ${Vr};
4001
4016
 
4002
4017
  // Buffer reduction crossfade constants (align to quantum boundary to avoid partial quanta)
4003
- const BUFFER_REDUCTION_CROSSFADE_MS = ${zc};
4018
+ const BUFFER_REDUCTION_CROSSFADE_MS = ${Qc};
4004
4019
  const BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW = Math.round(OUTPUT_SAMPLE_RATE_HZ * BUFFER_REDUCTION_CROSSFADE_MS / 1000);
4005
4020
  const BUFFER_REDUCTION_CROSSFADE_SAMPLES = Math.ceil(BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW / RENDER_QUANTUM_SIZE) * RENDER_QUANTUM_SIZE;
4006
4021
 
@@ -4211,7 +4226,7 @@ class IkonAudioPlayerProcessor extends AudioWorkletProcessor {
4211
4226
  this.statsIntervalSamples = Math.max(1, Math.round((OUTPUT_SAMPLE_RATE_HZ * statusIntervalMs) / 1000));
4212
4227
 
4213
4228
  // Normalization config (hardcoded)
4214
- this.normalizationEnabled = ${Xc};
4229
+ this.normalizationEnabled = ${Zc};
4215
4230
 
4216
4231
  // Stream states for audio buffer
4217
4232
  this.streams = new Map();
@@ -4889,12 +4904,12 @@ class IkonAudioPlayerProcessor extends AudioWorkletProcessor {
4889
4904
  registerProcessor('ikon-audio-player', IkonAudioPlayerProcessor);
4890
4905
  `;
4891
4906
  }
4892
- class Ze {
4907
+ class tt {
4893
4908
  client;
4894
4909
  config;
4895
4910
  enabled = !1;
4896
4911
  stateUnsubscribe = null;
4897
- isMobile = qc();
4912
+ isMobile = rl();
4898
4913
  boundVisibilityChange = null;
4899
4914
  boundPageHide = null;
4900
4915
  unlockHandler = null;
@@ -4926,7 +4941,7 @@ class Ze {
4926
4941
  // Pre-allocated result object for getCurrentVisemeValues to avoid hot-path allocations
4927
4942
  _visemeResult = { mouthOpenY: 0, mouthForm: 0 };
4928
4943
  constructor(e, r) {
4929
- this.client = e, this.config = r ?? {}, A.debug(`Audio playback initialized, isMobile=${this.isMobile}`);
4944
+ this.client = e, this.config = r ?? {}, y.debug(`Audio playback initialized, isMobile=${this.isMobile}`);
4930
4945
  }
4931
4946
  /**
4932
4947
  * Set Media Session metadata for OS-level media controls (lock screen, notifications).
@@ -5005,16 +5020,16 @@ class Ze {
5005
5020
  * (e.g., button click/release) to ensure the AudioContext can be recreated.
5006
5021
  */
5007
5022
  requestRecovery() {
5008
- if (this.enabled && Lr() && this.audioContext) {
5023
+ if (this.enabled && Pr() && this.audioContext) {
5009
5024
  this.stopAudioGraph();
5010
5025
  try {
5011
5026
  const e = new AudioContext({
5012
5027
  sampleRate: ue,
5013
- latencyHint: ht
5028
+ latencyHint: Et
5014
5029
  });
5015
5030
  this.audioContext = e, this.outputSampleRateHz = e.sampleRate, e.resume(), this.setupAudioGraphAfterRecreate();
5016
5031
  } catch (e) {
5017
- A.error(`iOS audio recovery failed: ${V(e)}`), this.addUnlockHandler();
5032
+ y.error(`iOS audio recovery failed: ${W(e)}`), this.addUnlockHandler();
5018
5033
  }
5019
5034
  return;
5020
5035
  }
@@ -5099,30 +5114,30 @@ class Ze {
5099
5114
  const e = this.audioContext;
5100
5115
  if (!e)
5101
5116
  return null;
5102
- const r = e.currentTime, n = e.sampleRate, s = b;
5117
+ const r = e.currentTime, n = e.sampleRate, s = k;
5103
5118
  for (const i of this.visemeBuffers.values()) {
5104
5119
  if (!i.timingEstablished || i.count === 0)
5105
5120
  continue;
5106
5121
  const o = r - i.playbackStartContextTime;
5107
5122
  if (o < 0)
5108
5123
  continue;
5109
- const a = o * n * s, c = i.frames, l = i.count, d = (i.head - l + G) % G;
5124
+ const a = o * n * s, c = i.frames, l = i.count, d = (i.head - l + V) % V;
5110
5125
  let h = null, f = null;
5111
5126
  for (let u = 0; u < l; u++) {
5112
- const N = (d + u) % G, w = c[N], v = w.samplePosition + Math.max(w.frameSamples, 1);
5113
- if (w.samplePosition <= a && (h = w), v > a && !f && (f = w, w.samplePosition <= a))
5127
+ const A = (d + u) % V, w = c[A], b = w.samplePosition + Math.max(w.frameSamples, 1);
5128
+ if (w.samplePosition <= a && (h = w), b > a && !f && (f = w, w.samplePosition <= a))
5114
5129
  break;
5115
5130
  }
5116
5131
  if (!h)
5117
5132
  continue;
5118
- const p = h.samplePosition + Math.max(h.frameSamples, 1);
5119
- if (a > p && !f)
5133
+ const m = h.samplePosition + Math.max(h.frameSamples, 1);
5134
+ if (a > m && !f)
5120
5135
  continue;
5121
5136
  if (!f)
5122
5137
  return this._visemeResult.mouthOpenY = h.mouthOpenY, this._visemeResult.mouthForm = h.mouthForm, this._visemeResult;
5123
- const I = h.samplePosition, y = Math.max(h.frameSamples, 1), _ = I + y;
5124
- if (h !== f && f.samplePosition > h.samplePosition && _ > I) {
5125
- const u = Math.min(1, Math.max(0, (a - I) / (_ - I)));
5138
+ const p = h.samplePosition, N = Math.max(h.frameSamples, 1), _ = p + N;
5139
+ if (h !== f && f.samplePosition > h.samplePosition && _ > p) {
5140
+ const u = Math.min(1, Math.max(0, (a - p) / (_ - p)));
5126
5141
  this._visemeResult.mouthOpenY = h.mouthOpenY + u * (f.mouthOpenY - h.mouthOpenY), this._visemeResult.mouthForm = h.mouthForm + u * (f.mouthForm - h.mouthForm);
5127
5142
  } else
5128
5143
  this._visemeResult.mouthOpenY = h.mouthOpenY, this._visemeResult.mouthForm = h.mouthForm;
@@ -5133,8 +5148,8 @@ class Ze {
5133
5148
  resolveDiagnosticsConfig() {
5134
5149
  const e = this.config.diagnostics ?? {};
5135
5150
  return {
5136
- enabled: e.enabled ?? dt.enabled,
5137
- statusIntervalMs: e.statusIntervalMs ?? dt.statusIntervalMs
5151
+ enabled: e.enabled ?? pt.enabled,
5152
+ statusIntervalMs: e.statusIntervalMs ?? pt.statusIntervalMs
5138
5153
  };
5139
5154
  }
5140
5155
  resolveBackgroundConfig() {
@@ -5148,7 +5163,7 @@ class Ze {
5148
5163
  if (typeof window > "u")
5149
5164
  return;
5150
5165
  if (!this.audioContext) {
5151
- const a = ue, c = ht;
5166
+ const a = ue, c = Et;
5152
5167
  try {
5153
5168
  this.audioContext = new AudioContext({ sampleRate: a, latencyHint: c });
5154
5169
  } catch (l) {
@@ -5158,17 +5173,17 @@ class Ze {
5158
5173
  try {
5159
5174
  this.audioContext = new AudioContext();
5160
5175
  } catch (d) {
5161
- A.warn(`Failed to create AudioContext: ${V(d)}`), this.audioContext = null;
5176
+ y.warn(`Failed to create AudioContext: ${W(d)}`), this.audioContext = null;
5162
5177
  return;
5163
5178
  }
5164
- A.debug(`AudioContext latencyHint unsupported: ${V(E)}`);
5179
+ y.debug(`AudioContext latencyHint unsupported: ${W(E)}`);
5165
5180
  }
5166
- A.debug(`AudioContext sample rate request unsupported: ${V(l)}`);
5181
+ y.debug(`AudioContext sample rate request unsupported: ${W(l)}`);
5167
5182
  }
5168
- this.outputSampleRateHz = this.audioContext.sampleRate || ue, this.outputSampleRateHz !== a && A.debug(`AudioContext running at ${this.outputSampleRateHz}Hz (requested ${a}Hz)`), this.attachAudioContextHealthHandlers(this.audioContext);
5183
+ this.outputSampleRateHz = this.audioContext.sampleRate || ue, this.outputSampleRateHz !== a && y.debug(`AudioContext running at ${this.outputSampleRateHz}Hz (requested ${a}Hz)`), this.attachAudioContextHealthHandlers(this.audioContext);
5169
5184
  }
5170
5185
  const n = this.audioContext, s = this.resolveDiagnosticsConfig();
5171
- if ((this.config.performance?.preferAudioWorklet ?? !0) && vr(n)) {
5186
+ if ((this.config.performance?.preferAudioWorklet ?? !0) && Br(n)) {
5172
5187
  await this.ensureAudioWorklet(n, s, e, r);
5173
5188
  return;
5174
5189
  }
@@ -5177,7 +5192,7 @@ class Ze {
5177
5192
  attachAudioContextHealthHandlers(e) {
5178
5193
  e.__ikonAudioHealthAttached !== !0 && (Object.defineProperty(e, "__ikonAudioHealthAttached", { value: !0, enumerable: !1 }), e.onstatechange = () => {
5179
5194
  const r = this.getContextState(e), n = r === "running";
5180
- this.notifyPlaybackActive(n), this.enabled && !n && (A.warn(`AudioContext state changed to '${r}', attempting recovery`), this.recoverAudioContext({ reason: "statechange" }));
5195
+ this.notifyPlaybackActive(n), this.enabled && !n && (y.warn(`AudioContext state changed to '${r}', attempting recovery`), this.recoverAudioContext({ reason: "statechange" }));
5181
5196
  }, this.attachVisibilityHandler());
5182
5197
  }
5183
5198
  attachVisibilityHandler() {
@@ -5206,7 +5221,7 @@ class Ze {
5206
5221
  if (!this.enabled)
5207
5222
  return;
5208
5223
  if (document.visibilityState === "visible") {
5209
- s(), this.audioContext && this.getContextState(this.audioContext) !== "running" && (A.warn(`AudioContext not running after visibility change, state='${this.getContextState(this.audioContext)}'`), this.recoverAudioContext({ reason: "visibilityVisible" }));
5224
+ s(), this.audioContext && this.getContextState(this.audioContext) !== "running" && (y.warn(`AudioContext not running after visibility change, state='${this.getContextState(this.audioContext)}'`), this.recoverAudioContext({ reason: "visibilityVisible" }));
5210
5225
  return;
5211
5226
  }
5212
5227
  n();
@@ -5307,7 +5322,7 @@ class Ze {
5307
5322
  */
5308
5323
  async resumeWithTimeout(e) {
5309
5324
  const r = e.resume(), n = new Promise((s, i) => {
5310
- setTimeout(() => i(new Error("AudioContext.resume() timed out")), Ze.RESUME_TIMEOUT_MS);
5325
+ setTimeout(() => i(new Error("AudioContext.resume() timed out")), tt.RESUME_TIMEOUT_MS);
5311
5326
  });
5312
5327
  await Promise.race([r, n]);
5313
5328
  }
@@ -5321,17 +5336,17 @@ class Ze {
5321
5336
  await this.resumeWithTimeout(e), this.getContextState(e) === "running" && this.removeUnlockHandler();
5322
5337
  } catch {
5323
5338
  }
5324
- const i = `${this.outputSampleRateHz}_${b}`;
5339
+ const i = `${this.outputSampleRateHz}_${k}`;
5325
5340
  if (!this.workletModuleUrl || this.workletModuleKey !== i) {
5326
5341
  if (this.workletModuleUrl)
5327
5342
  try {
5328
5343
  URL.revokeObjectURL(this.workletModuleUrl);
5329
5344
  } catch {
5330
5345
  }
5331
- this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([el({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: b })], { type: "text/javascript" }));
5346
+ this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([nl({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: k })], { type: "text/javascript" }));
5332
5347
  }
5333
5348
  this.workletReady || (this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl).catch((E) => {
5334
- throw A.warn(`Failed to load AudioWorklet module, falling back: ${V(E)}`), E;
5349
+ throw y.warn(`Failed to load AudioWorklet module, falling back: ${W(E)}`), E;
5335
5350
  }));
5336
5351
  try {
5337
5352
  await this.workletReady;
@@ -5344,25 +5359,25 @@ class Ze {
5344
5359
  this.audioWorkletNode = new AudioWorkletNode(e, "ikon-audio-player", {
5345
5360
  numberOfInputs: 0,
5346
5361
  numberOfOutputs: 1,
5347
- outputChannelCount: [b],
5362
+ outputChannelCount: [k],
5348
5363
  processorOptions: {
5349
5364
  outputAudioConfig: { diagnostics: r },
5350
5365
  useSharedArrayBuffer: a,
5351
- outputChannels: b
5366
+ outputChannels: k
5352
5367
  }
5353
5368
  }), this.audioWorkletNode.port.onmessage = (E) => {
5354
5369
  const d = E.data;
5355
5370
  if (!(!d || typeof d != "object")) {
5356
5371
  if (d.type === "log") {
5357
5372
  const h = d, f = h.streamId ? ` [stream=${h.streamId.substring(0, 8)}]` : "";
5358
- h.level === "error" ? A.error(`[Worklet]${f} ${h.message}`) : A.warn(`[Worklet]${f} ${h.message}`);
5373
+ h.level === "error" ? y.error(`[Worklet]${f} ${h.message}`) : y.warn(`[Worklet]${f} ${h.message}`);
5359
5374
  return;
5360
5375
  }
5361
5376
  if (d.type === "stats") {
5362
5377
  if (!r.enabled)
5363
5378
  return;
5364
5379
  const h = d;
5365
- A.debug(`[Audio] stream=${h.streamId.substring(0, 8)} state=${h.state} buffer=${h.bufferMs.toFixed(0)}ms target=${h.targetMs.toFixed(0)}ms jitter=${h.jitterMs.toFixed(1)}ms underrun=${h.underrunCount} drop=${h.dropCount}`);
5380
+ y.debug(`[Audio] stream=${h.streamId.substring(0, 8)} state=${h.state} buffer=${h.bufferMs.toFixed(0)}ms target=${h.targetMs.toFixed(0)}ms jitter=${h.jitterMs.toFixed(1)}ms underrun=${h.underrunCount} drop=${h.dropCount}`);
5366
5381
  return;
5367
5382
  }
5368
5383
  if (d.type === "streamDrained" && "streamId" in d && typeof d.streamId == "string") {
@@ -5382,42 +5397,42 @@ class Ze {
5382
5397
  if (this.scriptProcessorNode)
5383
5398
  return;
5384
5399
  this.stopAudioWorklet(), this.pendingWorkletMessages = [];
5385
- const n = 1024, s = new Float32Array(n * b), i = Math.round(this.outputSampleRateHz * Pr / 1e3), o = Math.round(this.outputSampleRateHz * ve / 1e3), a = 1 / i, c = 1 / o, l = new Array(b), E = [], d = e.createScriptProcessor(n, 0, b);
5400
+ const n = 1024, s = new Float32Array(n * k), i = Math.round(this.outputSampleRateHz * Gr / 1e3), o = Math.round(this.outputSampleRateHz * Be / 1e3), a = 1 / i, c = 1 / o, l = new Array(k), E = [], d = e.createScriptProcessor(n, 0, k);
5386
5401
  d.onaudioprocess = (h) => {
5387
- const f = h.outputBuffer, p = f.numberOfChannels, I = f.length;
5388
- for (let _ = 0; _ < p; _++) {
5402
+ const f = h.outputBuffer, m = f.numberOfChannels, p = f.length;
5403
+ for (let _ = 0; _ < m; _++) {
5389
5404
  const u = f.getChannelData(_);
5390
5405
  u.fill(0), l[_] = u;
5391
5406
  }
5392
- let y = 0;
5407
+ let N = 0;
5393
5408
  E.length = 0;
5394
5409
  for (const [_, u] of this.fallbackQueues.entries()) {
5395
- u.totalSamples > 0 && (y += 1), (u.ending || u.inputDrained) && u.fadeDirection !== "out" && u.totalSamples / p * 1e3 / this.outputSampleRateHz <= ve * 2 && (u.fadeDirection = "out"), this.readFromFallbackQueue(u, s), (u.totalSamples > 0 || !u.hasLastOut) && ((!u.lastOut || u.lastOut.length !== s.length) && (u.lastOut = new Float32Array(s.length)), u.lastOut.set(s), u.hasLastOut = !0);
5396
- for (let w = 0; w < I; w++) {
5410
+ u.totalSamples > 0 && (N += 1), (u.ending || u.inputDrained) && u.fadeDirection !== "out" && u.totalSamples / m * 1e3 / this.outputSampleRateHz <= Be * 2 && (u.fadeDirection = "out"), this.readFromFallbackQueue(u, s), (u.totalSamples > 0 || !u.hasLastOut) && ((!u.lastOut || u.lastOut.length !== s.length) && (u.lastOut = new Float32Array(s.length)), u.lastOut.set(s), u.hasLastOut = !0);
5411
+ for (let w = 0; w < p; w++) {
5397
5412
  u.fadeDirection === "in" ? (u.fadeGain = Math.min(1, u.fadeGain + a), u.fadeGain >= 1 && (u.fadeDirection = "none")) : u.fadeDirection === "out" && (u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 0 && (u.fadeDirection = "none"));
5398
- for (let v = 0; v < p; v++) {
5399
- const O = s[w * p + v];
5400
- l[v][w] += O * u.fadeGain;
5413
+ for (let b = 0; b < m; b++) {
5414
+ const G = s[w * m + b];
5415
+ l[b][w] += G * u.fadeGain;
5401
5416
  }
5402
5417
  }
5403
- const N = u.ending || u.inputDrained;
5404
- if (N && u.totalSamples <= 0) {
5418
+ const A = u.ending || u.inputDrained;
5419
+ if (A && u.totalSamples <= 0) {
5405
5420
  if (u.fadeDirection === "out" && u.fadeGain > 1e-3) {
5406
- for (let w = 0; w < I; w++)
5421
+ for (let w = 0; w < p; w++)
5407
5422
  if (u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 1e-3) {
5408
5423
  u.fadeGain = 0, u.fadeDirection = "none";
5409
5424
  break;
5410
5425
  }
5411
5426
  }
5412
5427
  u.fadeGain <= 1e-3 && u.ending && E.push(_);
5413
- } else if (!N && u.totalSamples <= 0 && u.hasLastOut && u.lastOut && u.fadeGain > 1e-3) {
5428
+ } else if (!A && u.totalSamples <= 0 && u.hasLastOut && u.lastOut && u.fadeGain > 1e-3) {
5414
5429
  u.fadeDirection = "out", u.underrunPending = !0;
5415
- const w = u.lastOut, v = I - 1;
5416
- for (let O = 0; O < I; O++) {
5430
+ const w = u.lastOut, b = p - 1;
5431
+ for (let G = 0; G < p; G++) {
5417
5432
  u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 0 && (u.fadeDirection = "none");
5418
- for (let K = 0; K < p; K++) {
5419
- const jr = w[v * p + K];
5420
- l[K][O] += jr * u.fadeGain;
5433
+ for (let v = 0; v < m; v++) {
5434
+ const Ce = w[b * m + v];
5435
+ l[v][G] += Ce * u.fadeGain;
5421
5436
  }
5422
5437
  }
5423
5438
  }
@@ -5427,16 +5442,16 @@ class Ze {
5427
5442
  this.fallbackQueues.delete(_), this.activeStreams.delete(_);
5428
5443
  this.activeStreams.size === 0 && this.removeUnlockHandler();
5429
5444
  }
5430
- if (y > 1) {
5431
- const _ = 1 / Math.sqrt(y);
5432
- for (let u = 0; u < I; u++)
5433
- for (let N = 0; N < p; N++)
5434
- l[N][u] *= _;
5445
+ if (N > 1) {
5446
+ const _ = 1 / Math.sqrt(N);
5447
+ for (let u = 0; u < p; u++)
5448
+ for (let A = 0; A < m; A++)
5449
+ l[A][u] *= _;
5435
5450
  }
5436
- for (let _ = 0; _ < I; _++)
5437
- for (let u = 0; u < p; u++) {
5438
- const N = l[u][_];
5439
- l[u][_] = N > 1 ? 1 : N < -1 ? -1 : N;
5451
+ for (let _ = 0; _ < p; _++)
5452
+ for (let u = 0; u < m; u++) {
5453
+ const A = l[u][_];
5454
+ l[u][_] = A > 1 ? 1 : A < -1 ? -1 : A;
5440
5455
  }
5441
5456
  }, d.connect(e.destination), this.scriptProcessorNode = d, this.ensureScriptProcessorDiagnostics(r);
5442
5457
  }
@@ -5458,7 +5473,7 @@ class Ze {
5458
5473
  e.totalSamples < 0 && (e.totalSamples = 0), this.compactFallbackQueue(e);
5459
5474
  }
5460
5475
  trimFallbackQueue(e) {
5461
- const r = Math.floor(this.outputSampleRateHz * b * Fr / 1e3), n = e.totalSamples - r;
5476
+ const r = Math.floor(this.outputSampleRateHz * k * xr / 1e3), n = e.totalSamples - r;
5462
5477
  n <= 0 || this.skipFromFallbackQueue(e, n);
5463
5478
  }
5464
5479
  stopScriptProcessorDiagnostics() {
@@ -5477,8 +5492,8 @@ class Ze {
5477
5492
  for (const [n, s] of this.fallbackQueues.entries()) {
5478
5493
  if (s.totalSamples <= 0)
5479
5494
  continue;
5480
- const o = s.totalSamples / b * 1e3 / this.outputSampleRateHz;
5481
- A.debug(`[Audio] stream=${n.substring(0, 8)} buffer=${o.toFixed(0)}ms renderer=ScriptProcessor`);
5495
+ const o = s.totalSamples / k * 1e3 / this.outputSampleRateHz;
5496
+ y.debug(`[Audio] stream=${n.substring(0, 8)} buffer=${o.toFixed(0)}ms renderer=ScriptProcessor`);
5482
5497
  }
5483
5498
  }, r);
5484
5499
  }
@@ -5505,7 +5520,7 @@ class Ze {
5505
5520
  try {
5506
5521
  await this.resumeWithTimeout(e), this.removeUnlockHandler();
5507
5522
  } catch (o) {
5508
- A.warn(`Failed to resume AudioContext: ${V(o)}`), this.addUnlockHandler();
5523
+ y.warn(`Failed to resume AudioContext: ${W(o)}`), this.addUnlockHandler();
5509
5524
  }
5510
5525
  }
5511
5526
  async recoverAudioContext(e) {
@@ -5546,7 +5561,7 @@ class Ze {
5546
5561
  return;
5547
5562
  }
5548
5563
  } catch (i) {
5549
- A.debug(`AudioContext resume failed or timed out (${e.reason}): ${i}`);
5564
+ y.debug(`AudioContext resume failed or timed out (${e.reason}): ${i}`);
5550
5565
  }
5551
5566
  this.addUnlockHandler();
5552
5567
  }
@@ -5560,7 +5575,7 @@ class Ze {
5560
5575
  type: "rebind",
5561
5576
  transport: s,
5562
5577
  outputSampleRate: this.outputSampleRateHz,
5563
- outputChannels: b
5578
+ outputChannels: k
5564
5579
  });
5565
5580
  } catch {
5566
5581
  }
@@ -5569,42 +5584,42 @@ class Ze {
5569
5584
  if (this.audioWorker)
5570
5585
  return;
5571
5586
  if (typeof Worker > "u") {
5572
- A.warn("Audio decode worker unavailable (Workers not supported)");
5587
+ y.warn("Audio decode worker unavailable (Workers not supported)");
5573
5588
  return;
5574
5589
  }
5575
5590
  const e = this.client.createProtocolMessagePort({ opcodeGroupsMask: S.GROUP_AUDIO });
5576
5591
  if (!e) {
5577
- this.enabled && A.debug("Audio pipeline waiting for client connection");
5592
+ this.enabled && y.debug("Audio pipeline waiting for client connection");
5578
5593
  return;
5579
5594
  }
5580
5595
  this.protocolPort = e;
5581
5596
  try {
5582
- this.audioWorker = new Gc();
5597
+ this.audioWorker = new Hc();
5583
5598
  } catch (d) {
5584
- A.warn(`Failed to create audio worker: ${V(d)}`), this.protocolPort.close(), this.protocolPort = null;
5599
+ y.warn(`Failed to create audio worker: ${W(d)}`), this.protocolPort.close(), this.protocolPort = null;
5585
5600
  return;
5586
5601
  }
5587
5602
  const r = this.audioWorker;
5588
5603
  r.addEventListener("message", (d) => this.onAudioWorkerMessage(d.data)), r.addEventListener("error", (d) => {
5589
5604
  const h = [d.message, d.filename, d.lineno, d.colno].filter((f) => f != null && String(f).length > 0);
5590
- A.error(`Audio worker failed: ${h.join(" ")}`.trim());
5605
+ y.error(`Audio worker failed: ${h.join(" ")}`.trim());
5591
5606
  });
5592
5607
  const s = (this.config.performance?.preferSharedArrayBuffer ?? !0) && !!this.audioWorkletNode && de(), i = this.config.performance?.preferWebCodecs ?? !0, o = {
5593
5608
  type: "configure",
5594
5609
  transport: s ? "sab" : "pcm",
5595
5610
  outputSampleRate: this.outputSampleRateHz,
5596
- outputChannels: b,
5611
+ outputChannels: k,
5597
5612
  preferWebCodecs: i
5598
5613
  };
5599
5614
  r.postMessage(o), r.postMessage({ type: "attachProtocolPort", port: e.port }, [e.port]);
5600
5615
  const a = this.audioWorkletNode ? "AudioWorklet" : "ScriptProcessor", c = s ? "SharedArrayBuffer" : "MessagePort", E = i && typeof AudioDecoder < "u" ? "WebCodecs" : "WASM Opus";
5601
- A.debug(`Audio initialized: renderer=${a}, transport=${c}, decoder=${E}, output=${this.outputSampleRateHz}Hz/${b}ch`);
5616
+ y.debug(`Audio initialized: renderer=${a}, transport=${c}, decoder=${E}, output=${this.outputSampleRateHz}Hz/${k}ch`);
5602
5617
  }
5603
5618
  onAudioWorkerMessage(e) {
5604
5619
  if (e.type === "streamBegin") {
5605
5620
  if (this.activeStreams.add(e.streamId), e.shapeSets && e.shapeSets.length > 0 && (this.streamShapeSets.set(e.streamId, e.shapeSets), this.currentShapeSetValues.set(e.streamId, /* @__PURE__ */ new Map()), e.shapeSets.some((s) => s.Name === "Viseme"))) {
5606
- const s = new Array(G);
5607
- for (let i = 0; i < G; i++)
5621
+ const s = new Array(V);
5622
+ for (let i = 0; i < V; i++)
5608
5623
  s[i] = { samplePosition: 0, frameSamples: 0, mouthOpenY: 0, mouthForm: 0 };
5609
5624
  this.visemeBuffers.set(e.streamId, {
5610
5625
  frames: s,
@@ -5663,14 +5678,14 @@ class Ze {
5663
5678
  s.epochTimestampSamples = e.timestampInterleavedSamples;
5664
5679
  const c = this.audioContext;
5665
5680
  if (c) {
5666
- const l = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), E = Jc + l * 1e3, d = Math.min(Zc, Math.max(Qc, E));
5681
+ const l = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), E = qc + l * 1e3, d = Math.min(tl, Math.max(el, E));
5667
5682
  s.playbackStartContextTime = c.currentTime + d / 1e3;
5668
5683
  }
5669
5684
  s.timingEstablished = !0;
5670
5685
  }
5671
5686
  if (e.frameSizeInterleavedSamples > 0) {
5672
5687
  const c = s.frames[s.head];
5673
- c.samplePosition = e.timestampInterleavedSamples - s.epochTimestampSamples, c.frameSamples = e.frameSizeInterleavedSamples, c.mouthOpenY = a.Values[0], c.mouthForm = a.Values[1], s.head = (s.head + 1) % G, s.count < G && s.count++;
5688
+ c.samplePosition = e.timestampInterleavedSamples - s.epochTimestampSamples, c.frameSamples = e.frameSizeInterleavedSamples, c.mouthOpenY = a.Values[0], c.mouthForm = a.Values[1], s.head = (s.head + 1) % V, s.count < V && s.count++;
5674
5689
  }
5675
5690
  }
5676
5691
  }
@@ -5689,7 +5704,7 @@ class Ze {
5689
5704
  });
5690
5705
  return;
5691
5706
  }
5692
- e.type === "error" && A.warn(`Audio worker error${e.streamId ? ` (stream ${e.streamId})` : ""}: ${e.error.message}`);
5707
+ e.type === "error" && y.warn(`Audio worker error${e.streamId ? ` (stream ${e.streamId})` : ""}: ${e.error.message}`);
5693
5708
  }
5694
5709
  postToWorklet(e, r) {
5695
5710
  if (!this.audioWorkletNode) {
@@ -5712,8 +5727,8 @@ class Ze {
5712
5727
  const r = this.pendingWorkletMessages.findIndex((n) => n.type === "streamBegin" && n.streamId === e.streamId);
5713
5728
  r >= 0 && this.pendingWorkletMessages.splice(r, 1);
5714
5729
  }
5715
- if (this.pendingWorkletMessages.push(e), !(this.pendingWorkletMessages.length <= ut))
5716
- for (; !(this.pendingWorkletMessages.length <= ut); ) {
5730
+ if (this.pendingWorkletMessages.push(e), !(this.pendingWorkletMessages.length <= ft))
5731
+ for (; !(this.pendingWorkletMessages.length <= ft); ) {
5717
5732
  const r = this.pendingWorkletMessages.findIndex((n) => n.type !== "streamBegin");
5718
5733
  if (r < 0)
5719
5734
  break;
@@ -5786,20 +5801,20 @@ class Ze {
5786
5801
  }));
5787
5802
  }
5788
5803
  }
5789
- function tl(t) {
5804
+ function sl(t) {
5790
5805
  return new Worker(
5791
- "" + new URL("assets/video-playback-worker-C7sQMgD-.js", import.meta.url).href,
5806
+ "" + new URL("assets/video-playback-worker-OwSrJCnC.js", import.meta.url).href,
5792
5807
  {
5793
5808
  type: "module",
5794
5809
  name: t?.name
5795
5810
  }
5796
5811
  );
5797
5812
  }
5798
- const W = M("IkonVideoPlayback");
5799
- function Ce(t) {
5813
+ const H = O("IkonVideoPlayback");
5814
+ function ke(t) {
5800
5815
  return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
5801
5816
  }
5802
- class rl {
5817
+ class il {
5803
5818
  client;
5804
5819
  config;
5805
5820
  enabled = !0;
@@ -5869,19 +5884,19 @@ class rl {
5869
5884
  if (!this.enabled || this.worker)
5870
5885
  return;
5871
5886
  if (typeof Worker > "u") {
5872
- W.warn("Video decode worker unavailable (Workers not supported)");
5887
+ H.warn("Video decode worker unavailable (Workers not supported)");
5873
5888
  return;
5874
5889
  }
5875
5890
  let e;
5876
5891
  try {
5877
- e = new tl();
5892
+ e = new sl();
5878
5893
  } catch (r) {
5879
- W.warn(`Failed to create video worker: ${Ce(r)}`);
5894
+ H.warn(`Failed to create video worker: ${ke(r)}`);
5880
5895
  return;
5881
5896
  }
5882
5897
  this.worker = e, e.addEventListener("message", (r) => this.onWorkerMessage(r.data)), e.addEventListener("error", (r) => {
5883
5898
  const n = [r.message, r.filename, r.lineno, r.colno].filter((s) => s != null && String(s).length > 0);
5884
- W.error(`Video worker failed: ${n.join(" ")}`.trim());
5899
+ H.error(`Video worker failed: ${n.join(" ")}`.trim());
5885
5900
  }), e.postMessage({ type: "configure" }), e.postMessage({ type: "setEnabled", enabled: this.enabled }), this.syncAllStreamsToWorker();
5886
5901
  }
5887
5902
  onWorkerMessage(e) {
@@ -5921,14 +5936,14 @@ class rl {
5921
5936
  return;
5922
5937
  }
5923
5938
  if (e.type === "requestIdr") {
5924
- this.requestIdrForStream(e.streamId);
5939
+ this.requestIdrForStream(e.senderId, e.trackId);
5925
5940
  return;
5926
5941
  }
5927
5942
  if (e.type === "error") {
5928
- W.warn(`Video worker error: ${e.error.message}`);
5943
+ H.warn(`Video worker error: ${e.error.message}`);
5929
5944
  return;
5930
5945
  }
5931
- e.type === "log" && W.info(e.message);
5946
+ e.type === "log" && H.info(e.message);
5932
5947
  }
5933
5948
  }
5934
5949
  syncAllStreamsToWorker() {
@@ -5945,7 +5960,7 @@ class rl {
5945
5960
  const n = r.canvas.transferControlToOffscreen();
5946
5961
  this.worker.postMessage({ type: "attachSurface", streamId: e, canvas: n }, [n]), r.attachedToWorker = !0;
5947
5962
  } catch (n) {
5948
- W.warn(`Failed to attach offscreen canvas for stream ${e}: ${Ce(n)}`), r.mode = "bitmap", r.ctxBitmap = r.canvas.getContext("bitmaprenderer", { alpha: !1 }), r.ctxBitmap || (r.ctx2d = r.canvas.getContext("2d", { alpha: !1, desynchronized: !0 }));
5963
+ H.warn(`Failed to attach offscreen canvas for stream ${e}: ${ke(n)}`), r.mode = "bitmap", r.ctxBitmap = r.canvas.getContext("bitmaprenderer", { alpha: !1 }), r.ctxBitmap || (r.ctx2d = r.canvas.getContext("2d", { alpha: !1, desynchronized: !0 }));
5949
5964
  try {
5950
5965
  this.worker.postMessage({ type: "watchStream", streamId: e }), r.attachedToWorker = !0;
5951
5966
  } catch {
@@ -5959,23 +5974,13 @@ class rl {
5959
5974
  }
5960
5975
  }
5961
5976
  }
5962
- requestIdrForStream(e) {
5963
- const r = this.parseStreamId(e);
5964
- if (!r)
5965
- return;
5966
- const n = ka(Ra(), this.client.sessionId ?? 0, {
5967
- trackId: r.trackId,
5968
- targetIds: [r.senderId]
5977
+ requestIdrForStream(e, r) {
5978
+ const n = Ma(Ua(), this.client.sessionId ?? 0, {
5979
+ trackId: r,
5980
+ targetIds: [e]
5969
5981
  });
5970
5982
  this.client.sendProtocolMessage(n);
5971
5983
  }
5972
- parseStreamId(e) {
5973
- const r = e.split("_");
5974
- if (r.length !== 2)
5975
- return null;
5976
- const n = Number(r[0]), s = Number(r[1]);
5977
- return !Number.isInteger(n) || !Number.isInteger(s) || n < 0 || s < 0 ? null : { senderId: n, trackId: s };
5978
- }
5979
5984
  detachProtocolPort() {
5980
5985
  if (this.protocolPort) {
5981
5986
  try {
@@ -5994,7 +5999,7 @@ class rl {
5994
5999
  try {
5995
6000
  this.worker.postMessage({ type: "attachProtocolPort", port: e.port }, [e.port]);
5996
6001
  } catch (r) {
5997
- W.warn(`Failed to attach video protocol port: ${Ce(r)}`), this.protocolPort.close(), this.protocolPort = null;
6002
+ H.warn(`Failed to attach video protocol port: ${ke(r)}`), this.protocolPort.close(), this.protocolPort = null;
5998
6003
  }
5999
6004
  }
6000
6005
  }
@@ -6023,11 +6028,11 @@ class rl {
6023
6028
  }));
6024
6029
  }
6025
6030
  }
6026
- class nl {
6031
+ class ol {
6027
6032
  audio;
6028
6033
  video;
6029
6034
  constructor(e, r) {
6030
- this.audio = new Ze(e, r?.audio), this.video = new rl(e, r?.video), r?.mediaSession && this.audio.setMediaSession(r.mediaSession);
6035
+ this.audio = new tt(e, r?.audio), this.video = new il(e, r?.video), r?.mediaSession && this.audio.setMediaSession(r.mediaSession);
6031
6036
  }
6032
6037
  /**
6033
6038
  * Releases media resources (workers, audio graph, decoders).
@@ -6038,7 +6043,7 @@ class nl {
6038
6043
  this.audio.dispose(), this.video.dispose();
6039
6044
  }
6040
6045
  }
6041
- class sl {
6046
+ class al {
6042
6047
  static getStorageForCapacity(e, r) {
6043
6048
  const n = Int32Array.BYTES_PER_ELEMENT * 2, s = r.BYTES_PER_ELEMENT * e;
6044
6049
  return new SharedArrayBuffer(n + s);
@@ -6092,21 +6097,21 @@ class sl {
6092
6097
  return n = (n + r) % this.capacity, Atomics.store(this.readWrite, 0, n), r;
6093
6098
  }
6094
6099
  }
6095
- function il(t) {
6100
+ function cl(t) {
6096
6101
  return new Worker(
6097
- "" + new URL("assets/audio-capture-worker-D0tD-mzj.js", import.meta.url).href,
6102
+ "" + new URL("assets/audio-capture-worker-Ca53cEkv.js", import.meta.url).href,
6098
6103
  {
6099
6104
  type: "module",
6100
6105
  name: t?.name
6101
6106
  }
6102
6107
  );
6103
6108
  }
6104
- const ft = M("IkonAudioCapture");
6105
- function ol() {
6109
+ const It = O("IkonAudioCapture");
6110
+ function ll() {
6106
6111
  const t = globalThis.crypto;
6107
6112
  return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
6108
6113
  }
6109
- function al() {
6114
+ function ul() {
6110
6115
  return `
6111
6116
  class RingBuffer {
6112
6117
  static getStorageForCapacity(capacity, type) {
@@ -6163,7 +6168,7 @@ class RingBuffer {
6163
6168
  }
6164
6169
  }
6165
6170
 
6166
- const RENDER_QUANTUM_SIZE = ${Br};
6171
+ const RENDER_QUANTUM_SIZE = ${Vr};
6167
6172
 
6168
6173
  class IkonAudioCaptureProcessor extends AudioWorkletProcessor {
6169
6174
  constructor(options) {
@@ -6235,7 +6240,7 @@ class IkonAudioCaptureProcessor extends AudioWorkletProcessor {
6235
6240
  registerProcessor('ikon-audio-capture', IkonAudioCaptureProcessor);
6236
6241
  `;
6237
6242
  }
6238
- class cl {
6243
+ class hl {
6239
6244
  constructor(e, r) {
6240
6245
  this.client = e, this.config = r ?? {};
6241
6246
  }
@@ -6255,12 +6260,12 @@ class cl {
6255
6260
  ensureWorker() {
6256
6261
  if (this.worker)
6257
6262
  return this.worker;
6258
- const e = new il();
6263
+ const e = new cl();
6259
6264
  return this.worker = e, e.addEventListener("message", (r) => {
6260
6265
  const n = r.data;
6261
6266
  if (n?.type === "error") {
6262
6267
  const s = n.error;
6263
- ft.warn(`Audio capture worker error: ${s?.name ?? "Error"} ${s?.message ?? ""}`);
6268
+ It.warn(`Audio capture worker error: ${s?.name ?? "Error"} ${s?.message ?? ""}`);
6264
6269
  }
6265
6270
  }), e;
6266
6271
  }
@@ -6296,9 +6301,9 @@ class cl {
6296
6301
  return await navigator.mediaDevices.getUserMedia({ audio: n });
6297
6302
  }
6298
6303
  async ensureWorklet(e) {
6299
- if (!vr(e))
6304
+ if (!Br(e))
6300
6305
  throw new Error("AudioWorklet is not supported in this browser");
6301
- this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([al()], { type: "text/javascript" }))), (!this.workletReady || this.workletContext !== e) && (this.workletContext = e, this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl));
6306
+ this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([ul()], { type: "text/javascript" }))), (!this.workletReady || this.workletContext !== e) && (this.workletContext = e, this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl));
6302
6307
  try {
6303
6308
  await this.workletReady;
6304
6309
  } catch (r) {
@@ -6312,20 +6317,22 @@ class cl {
6312
6317
  this.ensureSendPort();
6313
6318
  const n = await this.ensureAudioContext(), s = await this.acquireMicrophoneStream(e), i = s.getAudioTracks()[0];
6314
6319
  if (!i)
6315
- throw s.getTracks().forEach((_) => _.stop()), new Error("No audio track available");
6320
+ throw s.getTracks().forEach((u) => u.stop()), new Error("No audio track available");
6316
6321
  await this.ensureWorklet(n);
6317
- const o = ol(), a = this.allocateTrackId(), c = n.createMediaStreamSource(s), l = n.createGain();
6322
+ const o = ll(), a = this.allocateTrackId(), c = n.createMediaStreamSource(s), l = n.createGain();
6318
6323
  l.gain.value = 0, l.connect(n.destination);
6319
6324
  const h = de() ? "sab" : "pcm";
6320
6325
  let f;
6321
6326
  if (h === "sab") {
6322
- const _ = Math.floor(n.sampleRate * 2);
6323
- f = sl.getStorageForCapacity(_, Float32Array);
6327
+ const u = Math.floor(n.sampleRate * 2);
6328
+ f = al.getStorageForCapacity(u, Float32Array);
6324
6329
  }
6325
- const p = this.ensureWorker();
6330
+ const m = "microphone", p = this.ensureWorker();
6326
6331
  p.postMessage({
6327
6332
  type: "start",
6328
6333
  captureId: o,
6334
+ streamId: o,
6335
+ sourceType: m,
6329
6336
  senderId: r,
6330
6337
  trackId: a,
6331
6338
  sampleRate: n.sampleRate,
@@ -6336,22 +6343,22 @@ class cl {
6336
6343
  },
6337
6344
  transport: h,
6338
6345
  sharedArrayBuffer: f
6339
- }), await new Promise((_, u) => {
6340
- const N = setTimeout(() => {
6341
- p.removeEventListener("message", w), u(new Error("Audio capture worker start timeout"));
6342
- }, 1e4), w = (v) => {
6343
- const O = v.data;
6344
- if (O?.type === "started" && O.captureId === o)
6345
- clearTimeout(N), p.removeEventListener("message", w), _();
6346
- else if (O?.type === "error" && O.captureId === o) {
6347
- clearTimeout(N), p.removeEventListener("message", w);
6348
- const K = O.error;
6349
- u(new Error(K?.message ?? "Audio capture failed to start"));
6346
+ }), await new Promise((u, A) => {
6347
+ const w = setTimeout(() => {
6348
+ p.removeEventListener("message", b), A(new Error("Audio capture worker start timeout"));
6349
+ }, 1e4), b = (G) => {
6350
+ const v = G.data;
6351
+ if (v?.type === "started" && v.captureId === o)
6352
+ clearTimeout(w), p.removeEventListener("message", b), u();
6353
+ else if (v?.type === "error" && v.captureId === o) {
6354
+ clearTimeout(w), p.removeEventListener("message", b);
6355
+ const Ce = v.error;
6356
+ A(new Error(Ce?.message ?? "Audio capture failed to start"));
6350
6357
  }
6351
6358
  };
6352
- p.addEventListener("message", w);
6359
+ p.addEventListener("message", b);
6353
6360
  });
6354
- const I = new AudioWorkletNode(n, "ikon-audio-capture", {
6361
+ const N = new AudioWorkletNode(n, "ikon-audio-capture", {
6355
6362
  numberOfInputs: 1,
6356
6363
  numberOfOutputs: 1,
6357
6364
  outputChannelCount: [1],
@@ -6361,38 +6368,38 @@ class cl {
6361
6368
  sharedArrayBuffer: f
6362
6369
  }
6363
6370
  });
6364
- c.connect(I), I.connect(l), h === "pcm" && (I.port.onmessage = (_) => {
6365
- const u = _.data;
6366
- if (!(!u || typeof u != "object") && u.type === "pcm" && u.pcm instanceof Float32Array) {
6367
- const N = u.pcm;
6368
- p.postMessage({ type: "pcm", captureId: o, pcm: N }, [N.buffer]);
6371
+ c.connect(N), N.connect(l), h === "pcm" && (N.port.onmessage = (u) => {
6372
+ const A = u.data;
6373
+ if (!(!A || typeof A != "object") && A.type === "pcm" && A.pcm instanceof Float32Array) {
6374
+ const w = A.pcm;
6375
+ p.postMessage({ type: "pcm", captureId: o, pcm: w }, [w.buffer]);
6369
6376
  }
6370
6377
  });
6371
- const y = {
6378
+ const _ = {
6372
6379
  captureId: o,
6373
6380
  trackId: a,
6374
6381
  stream: s,
6375
6382
  track: i,
6376
6383
  ctx: n,
6377
6384
  source: c,
6378
- worklet: I,
6385
+ worklet: N,
6379
6386
  gain: l,
6380
6387
  stopped: !1,
6381
6388
  startSegment: () => {
6382
- y.stopped || p.postMessage({ type: "startSegment", captureId: o });
6389
+ _.stopped || p.postMessage({ type: "startSegment", captureId: o });
6383
6390
  },
6384
6391
  endSegment: () => {
6385
- y.stopped || (p.postMessage({ type: "endSegment", captureId: o }), Lr() && y.stop());
6392
+ _.stopped || (p.postMessage({ type: "endSegment", captureId: o }), Pr() && _.stop());
6386
6393
  },
6387
6394
  stop: async () => {
6388
- if (!y.stopped) {
6389
- y.stopped = !0, this.captures.delete(o);
6395
+ if (!_.stopped) {
6396
+ _.stopped = !0, this.captures.delete(o);
6390
6397
  try {
6391
6398
  c.disconnect();
6392
6399
  } catch {
6393
6400
  }
6394
6401
  try {
6395
- I.disconnect();
6402
+ N.disconnect();
6396
6403
  } catch {
6397
6404
  }
6398
6405
  try {
@@ -6400,7 +6407,7 @@ class cl {
6400
6407
  } catch {
6401
6408
  }
6402
6409
  try {
6403
- s.getTracks().forEach((_) => _.stop());
6410
+ s.getTracks().forEach((u) => u.stop());
6404
6411
  } catch {
6405
6412
  }
6406
6413
  p.postMessage({ type: "stop", captureId: o });
@@ -6408,15 +6415,16 @@ class cl {
6408
6415
  }
6409
6416
  };
6410
6417
  return i.addEventListener("ended", () => {
6411
- ft.warn(`Microphone track ended unexpectedly, captureId=${o.substring(0, 8)}`), y.stop();
6412
- }), this.captures.set(o, y), {
6418
+ It.warn(`Microphone track ended unexpectedly, captureId=${o.substring(0, 8)}`), _.stop();
6419
+ }), this.captures.set(o, _), {
6413
6420
  captureId: o,
6421
+ streamId: o,
6414
6422
  get isActive() {
6415
- return !y.stopped;
6423
+ return !_.stopped;
6416
6424
  },
6417
- startSegment: y.startSegment,
6418
- endSegment: y.endSegment,
6419
- stop: y.stop
6425
+ startSegment: _.startSegment,
6426
+ endSegment: _.endSegment,
6427
+ stop: _.stop
6420
6428
  };
6421
6429
  }
6422
6430
  async stop(e) {
@@ -6461,9 +6469,9 @@ class cl {
6461
6469
  }
6462
6470
  }
6463
6471
  }
6464
- const xr = 1280, Gr = 720, ll = 30, Vr = "image/jpeg", ul = 0.92;
6465
- async function hl(t, e) {
6466
- const r = e.mime ?? Vr, n = e.quality ?? ul;
6472
+ const we = 1280, Ae = 720, dl = 30, Wr = "image/jpeg", fl = 0.92;
6473
+ async function El(t, e) {
6474
+ const r = e.mime ?? Wr, n = e.quality ?? fl;
6467
6475
  if (typeof OffscreenCanvas < "u" && t instanceof OffscreenCanvas)
6468
6476
  try {
6469
6477
  return await t.convertToBlob({ type: r, quality: n });
@@ -6480,11 +6488,16 @@ async function hl(t, e) {
6480
6488
  );
6481
6489
  });
6482
6490
  }
6483
- class dl {
6491
+ class pl {
6484
6492
  async acquireCameraStream(e) {
6485
6493
  if (!navigator.mediaDevices)
6486
6494
  throw new Error("Media devices are not available in this environment");
6487
- return await navigator.mediaDevices.getUserMedia({ video: e.constraints ?? !0, audio: !1 });
6495
+ const r = e.constraints ?? {}, n = e.width ?? we, s = e.height ?? Ae, i = {
6496
+ ...r,
6497
+ width: r.width ?? { ideal: n },
6498
+ height: r.height ?? { ideal: s }
6499
+ };
6500
+ return await navigator.mediaDevices.getUserMedia({ video: i, audio: !1 });
6488
6501
  }
6489
6502
  async captureFromCamera(e = {}) {
6490
6503
  const r = await this.acquireCameraStream(e), n = r.getVideoTracks()[0];
@@ -6497,15 +6510,15 @@ class dl {
6497
6510
  } catch {
6498
6511
  }
6499
6512
  try {
6500
- await new Promise((f, p) => {
6501
- const I = () => f(), y = () => p(new Error("Failed to load video element"));
6502
- s.addEventListener("loadedmetadata", I, { once: !0 }), s.addEventListener("error", y, { once: !0 });
6513
+ await new Promise((f, m) => {
6514
+ const p = () => f(), N = () => m(new Error("Failed to load video element"));
6515
+ s.addEventListener("loadedmetadata", p, { once: !0 }), s.addEventListener("error", N, { once: !0 });
6503
6516
  });
6504
6517
  try {
6505
6518
  await s.play();
6506
6519
  } catch {
6507
6520
  }
6508
- const i = s.videoWidth || (n.getSettings().width ?? xr), o = s.videoHeight || (n.getSettings().height ?? Gr), a = e.width ? Math.max(1, Math.floor(e.width)) : i, c = e.height ? Math.max(1, Math.floor(e.height)) : o;
6521
+ const i = s.videoWidth || (n.getSettings().width ?? we), o = s.videoHeight || (n.getSettings().height ?? Ae), a = e.width ? Math.max(1, Math.floor(e.width)) : i, c = e.height ? Math.max(1, Math.floor(e.height)) : o;
6509
6522
  let l;
6510
6523
  if (typeof OffscreenCanvas < "u")
6511
6524
  l = new OffscreenCanvas(a, c);
@@ -6517,9 +6530,9 @@ class dl {
6517
6530
  if (!E)
6518
6531
  throw new Error("2D canvas context unavailable");
6519
6532
  E.drawImage(s, 0, 0, a, c);
6520
- const d = await hl(l, e), h = await d.arrayBuffer();
6533
+ const d = await El(l, e), h = await d.arrayBuffer();
6521
6534
  return {
6522
- mime: d.type || e.mime || Vr,
6535
+ mime: d.type || e.mime || Wr,
6523
6536
  width: a,
6524
6537
  height: c,
6525
6538
  data: new Uint8Array(h)
@@ -6544,27 +6557,27 @@ class dl {
6544
6557
  }
6545
6558
  }
6546
6559
  }
6547
- function fl(t) {
6560
+ function Il(t) {
6548
6561
  return new Worker(
6549
- "" + new URL("assets/video-capture-worker-DZZ0ggvo.js", import.meta.url).href,
6562
+ "" + new URL("assets/video-capture-worker-Odc_mLEl.js", import.meta.url).href,
6550
6563
  {
6551
6564
  type: "module",
6552
6565
  name: t?.name
6553
6566
  }
6554
6567
  );
6555
6568
  }
6556
- const Et = M("IkonVideoCapture");
6557
- function El() {
6569
+ const mt = O("IkonVideoCapture");
6570
+ function ml() {
6558
6571
  const t = globalThis.crypto;
6559
6572
  return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
6560
6573
  }
6561
- function pl() {
6574
+ function _l() {
6562
6575
  const t = globalThis.MediaStreamTrackProcessor;
6563
6576
  if (!t)
6564
6577
  throw new Error("MediaStreamTrackProcessor is not available in this browser");
6565
6578
  return t;
6566
6579
  }
6567
- class Il {
6580
+ class Tl {
6568
6581
  constructor(e) {
6569
6582
  this.client = e;
6570
6583
  }
@@ -6580,13 +6593,13 @@ class Il {
6580
6593
  ensureWorker() {
6581
6594
  if (this.worker)
6582
6595
  return this.worker;
6583
- const e = new fl();
6596
+ const e = new Il();
6584
6597
  return this.worker = e, e.addEventListener("message", (r) => {
6585
6598
  const n = r.data;
6586
6599
  if (n?.type === "error") {
6587
6600
  const s = n.error;
6588
- Et.warn(`Video capture worker error: ${s?.name ?? "Error"} ${s?.message ?? ""}`);
6589
- } else n?.type === "log" && Et.info(n.message);
6601
+ mt.warn(`Video capture worker error: ${s?.name ?? "Error"} ${s?.message ?? ""}`);
6602
+ } else n?.type === "log" && mt.info(n.message);
6590
6603
  }), e;
6591
6604
  }
6592
6605
  ensurePorts() {
@@ -6607,26 +6620,30 @@ class Il {
6607
6620
  async getMediaStream(e) {
6608
6621
  if (!navigator.mediaDevices)
6609
6622
  throw new Error("Media devices are not available in this environment");
6610
- const r = e.constraints ?? {}, n = e.options?.framerate ?? ll, s = {
6623
+ const r = e.constraints ?? {}, n = e.options?.framerate ?? dl, s = e.options?.width ?? we, i = e.options?.height ?? Ae, o = {
6611
6624
  ...r,
6612
- frameRate: r.frameRate ?? { ideal: n }
6625
+ frameRate: r.frameRate ?? { ideal: n },
6626
+ width: r.width ?? { ideal: s },
6627
+ height: r.height ?? { ideal: i }
6613
6628
  };
6614
- return e.source === "camera" ? navigator.mediaDevices.getUserMedia({ video: s }) : navigator.mediaDevices.getDisplayMedia({ video: s, audio: !1 });
6629
+ return e.sourceType === "camera" ? navigator.mediaDevices.getUserMedia({ video: o }) : navigator.mediaDevices.getDisplayMedia({ video: o, audio: !1 });
6615
6630
  }
6616
6631
  async start(e) {
6617
6632
  const r = this.client.sessionId;
6618
6633
  if (!r)
6619
6634
  throw new Error("Cannot start video capture before client is connected");
6620
6635
  this.ensurePorts();
6621
- const n = El(), s = await this.getMediaStream(e), i = s.getVideoTracks()[0];
6636
+ const n = ml(), s = await this.getMediaStream(e), i = s.getVideoTracks()[0];
6622
6637
  if (!i)
6623
- throw s.getTracks().forEach((I) => I.stop()), new Error("No video track available");
6624
- const o = i.getSettings(), a = e.options?.width ?? o.width ?? xr, c = e.options?.height ?? o.height ?? Gr, l = pl(), d = new l({ track: i }).readable, h = this.allocateTrackId(), f = this.ensureWorker();
6638
+ throw s.getTracks().forEach((N) => N.stop()), new Error("No video track available");
6639
+ const o = i.getSettings(), a = e.options?.width ?? o.width ?? we, c = e.options?.height ?? o.height ?? Ae, l = _l(), d = new l({ track: i }).readable, h = this.allocateTrackId(), f = this.ensureWorker(), m = e.sourceType;
6625
6640
  f.postMessage(
6626
6641
  {
6627
6642
  type: "start",
6628
6643
  captureId: n,
6629
- kind: e.source,
6644
+ streamId: n,
6645
+ sourceType: m,
6646
+ kind: e.sourceType,
6630
6647
  senderId: r,
6631
6648
  trackId: h,
6632
6649
  width: a,
@@ -6651,7 +6668,7 @@ class Il {
6651
6668
  if (!p.stopped) {
6652
6669
  p.stopped = !0, this.captures.delete(n);
6653
6670
  try {
6654
- s.getTracks().forEach((I) => I.stop());
6671
+ s.getTracks().forEach((N) => N.stop());
6655
6672
  } catch {
6656
6673
  }
6657
6674
  f.postMessage({ type: "stop", captureId: n });
@@ -6660,13 +6677,13 @@ class Il {
6660
6677
  };
6661
6678
  return i.addEventListener("ended", () => {
6662
6679
  p.stop();
6663
- }), this.captures.set(n, p), { captureId: n, stop: p.stop };
6680
+ }), this.captures.set(n, p), { captureId: n, streamId: n, stop: p.stop };
6664
6681
  }
6665
6682
  async startCamera(e) {
6666
- return this.start({ source: "camera", ...e });
6683
+ return this.start({ sourceType: "camera", ...e });
6667
6684
  }
6668
6685
  async startScreen(e) {
6669
- return this.start({ source: "screen", ...e });
6686
+ return this.start({ sourceType: "screen", ...e });
6670
6687
  }
6671
6688
  async stop(e) {
6672
6689
  const r = this.captures.get(e);
@@ -6689,32 +6706,32 @@ class Il {
6689
6706
  this.protocolPort?.close(), this.protocolPort = null, this.sendPort?.close(), this.sendPort = null;
6690
6707
  }
6691
6708
  }
6692
- class ml {
6709
+ class Sl {
6693
6710
  audio;
6694
6711
  video;
6695
6712
  image;
6696
6713
  constructor(e, r) {
6697
- this.audio = new cl(e, r?.audio), this.video = new Il(e), this.image = new dl();
6714
+ this.audio = new hl(e, r?.audio), this.video = new Tl(e), this.image = new pl();
6698
6715
  }
6699
6716
  dispose() {
6700
6717
  this.audio.dispose(), this.video.dispose();
6701
6718
  }
6702
6719
  }
6703
- const Wr = M("DebugMode");
6720
+ const Hr = O("DebugMode");
6704
6721
  let Y = !1;
6705
- function _l() {
6722
+ function wl() {
6706
6723
  return typeof window > "u" ? !1 : new URLSearchParams(window.location.search).get("debug") === "true";
6707
6724
  }
6708
- function Tl() {
6709
- return Y = _l(), Y && (yr(Ae.DEBUG), Wr.warn("Debug mode enabled")), Y;
6725
+ function Al() {
6726
+ return Y = wl(), Y && (Cr(ge.DEBUG), Hr.warn("Debug mode enabled")), Y;
6710
6727
  }
6711
- function Sl() {
6728
+ function yl() {
6712
6729
  return Y;
6713
6730
  }
6714
- function wl() {
6715
- Y || (Y = !0, yr(Ae.DEBUG), Wr.warn("Debug mode enabled"));
6731
+ function gl() {
6732
+ Y || (Y = !0, Cr(ge.DEBUG), Hr.warn("Debug mode enabled"));
6716
6733
  }
6717
- function Al(t) {
6734
+ function Nl(t) {
6718
6735
  return new Worker(
6719
6736
  "" + new URL("assets/protocol-worker-CH5R2dxZ.js", import.meta.url).href,
6720
6737
  {
@@ -6723,13 +6740,13 @@ function Al(t) {
6723
6740
  }
6724
6741
  );
6725
6742
  }
6726
- const pt = {
6727
- [k.WebTransport]: 0,
6728
- [k.WebSocket]: 1,
6729
- [k.WebTransportProxy]: 2,
6730
- [k.WebSocketProxy]: 3
6731
- }, Re = "ikon_endpoint_type";
6732
- class yl {
6743
+ const _t = {
6744
+ [U.WebTransport]: 0,
6745
+ [U.WebSocket]: 1,
6746
+ [U.WebTransportProxy]: 2,
6747
+ [U.WebSocketProxy]: 3
6748
+ }, Ue = "ikon_endpoint_type";
6749
+ class Cl {
6733
6750
  isLocal;
6734
6751
  workingEndpointType = null;
6735
6752
  constructor(e) {
@@ -6744,7 +6761,7 @@ class yl {
6744
6761
  if (this.isLocal)
6745
6762
  return r;
6746
6763
  const n = [...r].sort((s, i) => {
6747
- const o = pt[s] ?? 999, a = pt[i] ?? 999;
6764
+ const o = _t[s] ?? 999, a = _t[i] ?? 999;
6748
6765
  return o - a;
6749
6766
  });
6750
6767
  if (this.workingEndpointType !== null && e.has(this.workingEndpointType)) {
@@ -6761,7 +6778,7 @@ class yl {
6761
6778
  if (!this.isLocal) {
6762
6779
  this.workingEndpointType = e;
6763
6780
  try {
6764
- localStorage.setItem(Re, String(e));
6781
+ localStorage.setItem(Ue, String(e));
6765
6782
  } catch {
6766
6783
  }
6767
6784
  }
@@ -6772,7 +6789,7 @@ class yl {
6772
6789
  clearRememberedType() {
6773
6790
  this.workingEndpointType = null;
6774
6791
  try {
6775
- localStorage.removeItem(Re);
6792
+ localStorage.removeItem(Ue);
6776
6793
  } catch {
6777
6794
  }
6778
6795
  }
@@ -6781,20 +6798,20 @@ class yl {
6781
6798
  */
6782
6799
  loadRememberedType() {
6783
6800
  try {
6784
- const e = localStorage.getItem(Re);
6801
+ const e = localStorage.getItem(Ue);
6785
6802
  if (e !== null) {
6786
6803
  const r = Number(e);
6787
- k[r] !== void 0 && (this.workingEndpointType = r);
6804
+ U[r] !== void 0 && (this.workingEndpointType = r);
6788
6805
  }
6789
6806
  } catch {
6790
6807
  }
6791
6808
  }
6792
6809
  }
6793
- const T = M("IkonClient");
6794
- function gl() {
6810
+ const T = O("IkonClient");
6811
+ function Rl() {
6795
6812
  return typeof __IKON_WAIT_FOR_EXTERNAL_CONNECT_URL__ < "u" && __IKON_WAIT_FOR_EXTERNAL_CONNECT_URL__;
6796
6813
  }
6797
- class Wl {
6814
+ class Kl {
6798
6815
  channelManager = null;
6799
6816
  protocolWorker = null;
6800
6817
  workerManagerState = null;
@@ -6832,7 +6849,7 @@ class Wl {
6832
6849
  _media;
6833
6850
  _mediaCapture = null;
6834
6851
  // External connect URL mode
6835
- _waitForExternalConnectUrl = gl();
6852
+ _waitForExternalConnectUrl = Rl();
6836
6853
  _externalConnectUrlCleanup = null;
6837
6854
  /**
6838
6855
  * SDK-provided media pipelines (audio/video).
@@ -6852,27 +6869,27 @@ class Wl {
6852
6869
  return this._mediaCapture;
6853
6870
  }
6854
6871
  constructor(e) {
6855
- this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ?? Va, this.connectionTimeoutMs = e.timeouts?.connectionTimeoutMs ?? Wa;
6872
+ this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ?? $a, this.connectionTimeoutMs = e.timeouts?.connectionTimeoutMs ?? Ka;
6856
6873
  const r = [e.local, e.apiKey, e.sessionToken].filter(Boolean).length;
6857
6874
  if (r === 0)
6858
6875
  throw new Error('IkonClient requires one of: "local", "apiKey", or "sessionToken" configuration');
6859
6876
  if (r > 1)
6860
6877
  throw new Error('IkonClient accepts only one of: "local", "apiKey", or "sessionToken" configuration');
6861
- this.endpointSelector = new yl({
6878
+ this.endpointSelector = new Cl({
6862
6879
  local: e.local
6863
- }), this._functionRegistry = new Mc(), ct() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = Rc(this._functionRegistry));
6880
+ }), this._functionRegistry = new vc(), ht() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = Uc(this._functionRegistry));
6864
6881
  const n = e.audio ? {
6865
6882
  performance: e.audio.performance,
6866
6883
  background: e.audio.background,
6867
6884
  diagnostics: e.audio.diagnostics
6868
6885
  } : void 0, s = e.video ? { performance: e.video.performance } : void 0;
6869
- this._media = new nl(this, { audio: n, video: s, mediaSession: e.mediaSession }), this._media.audio.setEnabled(!0), this._media.video.setEnabled(!0), ct() && (this._mediaCapture = new ml(this, {
6886
+ this._media = new ol(this, { audio: n, video: s, mediaSession: e.mediaSession }), this._media.audio.setEnabled(!0), this._media.video.setEnabled(!0), ht() && (this._mediaCapture = new Sl(this, {
6870
6887
  audio: {
6871
6888
  performance: {
6872
6889
  preferWebCodecs: e.audio?.performance?.preferWebCodecs
6873
6890
  }
6874
6891
  }
6875
- }), this.unregisterMediaCaptureFunctions = Bc(this._functionRegistry, this));
6892
+ }), this.unregisterMediaCaptureFunctions = Vc(this._functionRegistry, this));
6876
6893
  }
6877
6894
  _lastError = void 0;
6878
6895
  /**
@@ -6917,7 +6934,7 @@ class Wl {
6917
6934
  if (this.currentState !== "idle")
6918
6935
  throw new Error(`Cannot connect: already in state ${this.currentState}`);
6919
6936
  this.setupLifecycleHandlers();
6920
- const e = Ka();
6937
+ const e = za();
6921
6938
  if (e) {
6922
6939
  T.info("Found external connect URL in query parameter"), await this.executeConnection(() => ne(e, this.abortController.signal));
6923
6940
  return;
@@ -6955,7 +6972,7 @@ class Wl {
6955
6972
  sendActionCall(e, r) {
6956
6973
  const n = ln(
6957
6974
  {
6958
- ActionId: m.fromString(e),
6975
+ ActionId: I.fromString(e),
6959
6976
  PayloadJson: r ?? "{}"
6960
6977
  },
6961
6978
  this._sessionId ?? 0
@@ -7129,11 +7146,11 @@ class Wl {
7129
7146
  async authenticate() {
7130
7147
  const e = this.abortController?.signal;
7131
7148
  if (this.config.local)
7132
- return Za(this.config.local, e);
7149
+ return tc(this.config.local, e);
7133
7150
  if (this.config.apiKey)
7134
- return qa(this.config.apiKey, e);
7151
+ return rc(this.config.apiKey, e);
7135
7152
  if (this.config.sessionToken)
7136
- return ec(this.config.sessionToken, e);
7153
+ return nc(this.config.sessionToken, e);
7137
7154
  throw new Error("No connection configuration provided (need local, apiKey, or sessionToken)");
7138
7155
  }
7139
7156
  /**
@@ -7145,8 +7162,8 @@ class Wl {
7145
7162
  this.notifyMessageSubscribers(e, r, n);
7146
7163
  return;
7147
7164
  }
7148
- r === S.CORE_GLOBAL_STATE && Wo(e).then((s) => {
7149
- this._globalState = s, this._sessionId !== void 0 && this._functionRegistry.syncFromGlobalState(s, this._sessionId), this._globalState.DebugMode && wl(), Sl() && this.protocolWorker && this.protocolWorker.postMessage({ type: "enableDevtools", enabled: !0 }), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
7165
+ r === S.CORE_GLOBAL_STATE && Ko(e).then((s) => {
7166
+ this._globalState = s, this._sessionId !== void 0 && this._functionRegistry.syncFromGlobalState(s, this._sessionId), this._globalState.DebugMode && gl(), yl() && this.protocolWorker && this.protocolWorker.postMessage({ type: "enableDevtools", enabled: !0 }), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
7150
7167
  }).catch((s) => {
7151
7168
  T.error("Failed to parse GlobalState:", s);
7152
7169
  }), this.notifyMessageSubscribers(e, r, n);
@@ -7233,7 +7250,7 @@ class Wl {
7233
7250
  }
7234
7251
  let r;
7235
7252
  try {
7236
- r = new Al();
7253
+ r = new Nl();
7237
7254
  } catch (l) {
7238
7255
  T.warn(`Failed to create protocol worker, falling back to main thread: ${l}`), await this.connectProtocolOnMainThread(e);
7239
7256
  return;
@@ -7243,28 +7260,28 @@ class Wl {
7243
7260
  const d = (h) => {
7244
7261
  const f = h.data;
7245
7262
  if (f?.type === "protocol" && f.message instanceof ArrayBuffer) {
7246
- const p = new Uint8Array(f.message);
7247
- this.handleProtocolMessage(p);
7263
+ const m = new Uint8Array(f.message);
7264
+ this.handleProtocolMessage(m);
7248
7265
  return;
7249
7266
  }
7250
7267
  if (f?.type === "state") {
7251
- const p = f.state;
7252
- this.workerManagerState = p;
7253
- const I = f.activeType;
7254
- I !== void 0 && this.endpointSelector.rememberWorkingType(I), this.handleChannelManagerStateChange(p), p === "connected" && l();
7268
+ const m = f.state;
7269
+ this.workerManagerState = m;
7270
+ const p = f.activeType;
7271
+ p !== void 0 && this.endpointSelector.rememberWorkingType(p), this.handleChannelManagerStateChange(m), m === "connected" && l();
7255
7272
  return;
7256
7273
  }
7257
7274
  if (f?.type === "error") {
7258
- const p = f.error, I = new Error(String(p?.message ?? "Worker error"));
7259
- I.name = String(p?.name ?? "Error"), E(I);
7275
+ const m = f.error, p = new Error(String(m?.message ?? "Worker error"));
7276
+ p.name = String(m?.name ?? "Error"), E(p);
7260
7277
  }
7261
7278
  };
7262
7279
  r.addEventListener("message", d), r.addEventListener("error", (h) => {
7263
- const f = [h.message, h.filename, h.lineno, h.colno].filter((p) => p != null && String(p).length > 0);
7280
+ const f = [h.message, h.filename, h.lineno, h.colno].filter((m) => m != null && String(m).length > 0);
7264
7281
  E(new Error(`Protocol worker failed: ${f.join(" ")}`.trim()));
7265
7282
  });
7266
- }), s = this.computeOrderedEndpointTypes(e), i = this.config.timeouts?.keepaliveTimeoutMs ?? nt, o = this.config.timeouts?.reconnectBackoffMs ?? st, a = this.config.timeouts?.maxReconnectAttempts ?? it;
7267
- this.updateWorkerInterestMask(), Tl() && r.postMessage({ type: "enableDevtools", enabled: !0 }), r.postMessage({
7283
+ }), s = this.computeOrderedEndpointTypes(e), i = this.config.timeouts?.keepaliveTimeoutMs ?? ot, o = this.config.timeouts?.reconnectBackoffMs ?? at, a = this.config.timeouts?.maxReconnectAttempts ?? ct;
7284
+ this.updateWorkerInterestMask(), Al() && r.postMessage({ type: "enableDevtools", enabled: !0 }), r.postMessage({
7268
7285
  type: "connect",
7269
7286
  sessionId: this._sessionId,
7270
7287
  entrypoints: e,
@@ -7280,11 +7297,11 @@ class Wl {
7280
7297
  }
7281
7298
  }
7282
7299
  async connectProtocolOnMainThread(e) {
7283
- this.workerManagerState = null, this.protocolWorker = null, this.channelManager = new Ga({
7300
+ this.workerManagerState = null, this.protocolWorker = null, this.channelManager = new Ha({
7284
7301
  sessionId: this._sessionId,
7285
- keepaliveTimeoutMs: this.config.timeouts?.keepaliveTimeoutMs ?? nt,
7286
- reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ?? st,
7287
- maxReconnectAttempts: this.config.timeouts?.maxReconnectAttempts ?? it,
7302
+ keepaliveTimeoutMs: this.config.timeouts?.keepaliveTimeoutMs ?? ot,
7303
+ reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ?? at,
7304
+ maxReconnectAttempts: this.config.timeouts?.maxReconnectAttempts ?? ct,
7288
7305
  endpointSelector: this.endpointSelector,
7289
7306
  onProtocolMessage: (r) => {
7290
7307
  this.handleProtocolMessage(r);
@@ -7402,11 +7419,11 @@ class Wl {
7402
7419
  sendProtocolMessage: (r) => this.sendProtocolMessage(r),
7403
7420
  sessionId: this._sessionId
7404
7421
  }), await this.config.onJoined?.();
7405
- const e = tt(et(), this._sessionId ?? 0);
7422
+ const e = st(nt(), this._sessionId ?? 0);
7406
7423
  this.sendProtocolMessage(e);
7407
7424
  } catch (e) {
7408
7425
  T.error("onJoined callback error:", e);
7409
- const r = tt(et(), this._sessionId ?? 0);
7426
+ const r = st(nt(), this._sessionId ?? 0);
7410
7427
  this.sendProtocolMessage(r);
7411
7428
  }
7412
7429
  }
@@ -7443,124 +7460,124 @@ class Wl {
7443
7460
  }
7444
7461
  }
7445
7462
  }
7446
- function Hl(t) {
7463
+ function Yl(t) {
7447
7464
  return t === "waitingForExternalConnectUrl" || t === "connecting" || t === "connectingSlow" || t === "reconnecting";
7448
7465
  }
7449
- function $l(t) {
7466
+ function jl(t) {
7450
7467
  return t === "connected";
7451
7468
  }
7452
- function Kl(t) {
7469
+ function zl(t) {
7453
7470
  return t === "offline" || t === "offlineError" || t === "idle";
7454
7471
  }
7455
- function Yl(t) {
7472
+ function Xl(t) {
7456
7473
  return t === "offlineError";
7457
7474
  }
7458
- const Hr = /* @__PURE__ */ new Map();
7475
+ const $r = /* @__PURE__ */ new Map();
7459
7476
  for (const [t, e] of Object.entries(S))
7460
- typeof e == "number" && Hr.set(e, t);
7461
- function jl(t) {
7462
- return Hr.get(t) ?? `UNKNOWN_${t}`;
7477
+ typeof e == "number" && $r.set(e, t);
7478
+ function Jl(t) {
7479
+ return $r.get(t) ?? `UNKNOWN_${t}`;
7463
7480
  }
7464
- const $r = 1e3, Kr = Ae.INFO;
7465
- let L = [], Fe = $r, Yr = Kr, Pe = null;
7466
- function Nl(t) {
7467
- t.level < Yr || (L.push(t), L.length > Fe && (L = L.slice(-Fe)));
7481
+ const Kr = 1e3, Yr = ge.INFO;
7482
+ let L = [], xe = Kr, jr = Yr, Ge = null;
7483
+ function bl(t) {
7484
+ t.level < jr || (L.push(t), L.length > xe && (L = L.slice(-xe)));
7468
7485
  }
7469
- function Cl(t) {
7470
- Fe = t?.maxBufferSize ?? $r, Yr = t?.minLevel ?? Kr, L = [], Ma(Nl);
7486
+ function kl(t) {
7487
+ xe = t?.maxBufferSize ?? Kr, jr = t?.minLevel ?? Yr, L = [], va(bl);
7471
7488
  }
7472
- function zl(t) {
7473
- Pe = t;
7489
+ function Ql(t) {
7490
+ Ge = t;
7474
7491
  }
7475
- function Xl() {
7492
+ function Zl() {
7476
7493
  return L;
7477
7494
  }
7478
- function Rl() {
7495
+ function Ul() {
7479
7496
  const t = L;
7480
7497
  return L = [], t;
7481
7498
  }
7482
- function Jl() {
7483
- if (!Pe || L.length === 0)
7499
+ function ql() {
7500
+ if (!Ge || L.length === 0)
7484
7501
  return 0;
7485
- const t = Rl();
7486
- return Pe(t), t.length;
7502
+ const t = Ul();
7503
+ return Ge(t), t.length;
7487
7504
  }
7488
- function Ql() {
7505
+ function eu() {
7489
7506
  L = [];
7490
7507
  }
7491
- function Zl() {
7508
+ function tu() {
7492
7509
  return L.length;
7493
7510
  }
7494
- Cl();
7511
+ kl();
7495
7512
  export {
7496
7513
  g as AuthenticationError,
7497
- xa as Channel,
7498
- Ga as ChannelManager,
7499
- kl as ChannelNotFoundError,
7514
+ Wa as Channel,
7515
+ Ha as ChannelManager,
7516
+ Ml as ChannelNotFoundError,
7500
7517
  J as ClientType,
7501
- je as ConnectionError,
7518
+ Je as ConnectionError,
7502
7519
  Q as ContextType,
7503
- yl as EndpointSelector,
7504
- k as EntrypointType,
7505
- Mc as FunctionRegistry,
7506
- Pl as IKON_AUTH_BASE_URL,
7507
- at as IKON_AUTH_URL_DEV,
7508
- ot as IKON_AUTH_URL_PROD,
7520
+ Cl as EndpointSelector,
7521
+ U as EntrypointType,
7522
+ vc as FunctionRegistry,
7523
+ Gl as IKON_AUTH_BASE_URL,
7524
+ ut as IKON_AUTH_URL_DEV,
7525
+ lt as IKON_AUTH_URL_PROD,
7509
7526
  _e as IKON_BACKEND_URL_DEV,
7510
- Oe as IKON_BACKEND_URL_PROD,
7511
- cl as IkonAudioCapture,
7512
- Ze as IkonAudioPlayback,
7513
- Wl as IkonClient,
7514
- dl as IkonImageCapture,
7515
- nl as IkonMedia,
7516
- ml as IkonMediaCapture,
7517
- Il as IkonVideoCapture,
7518
- rl as IkonVideoPlayback,
7519
- ze as KeepaliveTimeoutError,
7520
- Ae as LogLevel,
7521
- Ua as MaxRetriesExceededError,
7522
- Dl as NoChannelsError,
7527
+ Fe as IKON_BACKEND_URL_PROD,
7528
+ hl as IkonAudioCapture,
7529
+ tt as IkonAudioPlayback,
7530
+ Kl as IkonClient,
7531
+ pl as IkonImageCapture,
7532
+ ol as IkonMedia,
7533
+ Sl as IkonMediaCapture,
7534
+ Tl as IkonVideoCapture,
7535
+ il as IkonVideoPlayback,
7536
+ Qe as KeepaliveTimeoutError,
7537
+ ge as LogLevel,
7538
+ Oa as MaxRetriesExceededError,
7539
+ Ll as NoChannelsError,
7523
7540
  S as Opcode,
7524
- Da as ProvisioningTimeoutError,
7525
- Ul as SpaceNotFoundError,
7526
- H as TransportError,
7541
+ La as ProvisioningTimeoutError,
7542
+ Ol as SpaceNotFoundError,
7543
+ $ as TransportError,
7527
7544
  q as UserType,
7528
- bl as asProtocolMessage,
7529
- vl as clearDeviceId,
7530
- Ql as clearLogBuffer,
7531
- M as createLogger,
7532
- Gl as deriveAuthUrl,
7533
- xl as deriveBackendType,
7534
- Bl as deriveBackendUrl,
7535
- Fl as extractUserIdFromToken,
7536
- Jl as flushLogs,
7537
- Xl as getBufferedLogs,
7538
- Zl as getLogBufferSize,
7539
- Ml as getLogLevel,
7540
- Ol as getLogSink,
7541
- jl as getOpcodeName,
7542
- Je as getOrCreateDeviceId,
7543
- Tl as initializeDebugMode,
7544
- Cl as initializeLogSink,
7545
- vr as isAudioWorkletSupported,
7546
- ct as isBrowserEnvironment,
7547
- Qe as isCloudEnvironment,
7548
- $l as isConnected,
7549
- Hl as isConnecting,
7550
- Sl as isDebugModeEnabled,
7551
- Yl as isError,
7552
- Kl as isOffline,
7545
+ Dl as asProtocolMessage,
7546
+ Bl as clearDeviceId,
7547
+ eu as clearLogBuffer,
7548
+ O as createLogger,
7549
+ Hl as deriveAuthUrl,
7550
+ Wl as deriveBackendType,
7551
+ Vl as deriveBackendUrl,
7552
+ xl as extractUserIdFromToken,
7553
+ ql as flushLogs,
7554
+ Zl as getBufferedLogs,
7555
+ tu as getLogBufferSize,
7556
+ vl as getLogLevel,
7557
+ Fl as getLogSink,
7558
+ Jl as getOpcodeName,
7559
+ qe as getOrCreateDeviceId,
7560
+ Al as initializeDebugMode,
7561
+ kl as initializeLogSink,
7562
+ Br as isAudioWorkletSupported,
7563
+ ht as isBrowserEnvironment,
7564
+ et as isCloudEnvironment,
7565
+ jl as isConnected,
7566
+ Yl as isConnecting,
7567
+ yl as isDebugModeEnabled,
7568
+ Xl as isError,
7569
+ zl as isOffline,
7553
7570
  de as isSharedArrayBufferSupported,
7554
- gr as isWebTransportSupported,
7555
- Vl as parseUrlParams,
7571
+ Rr as isWebTransportSupported,
7572
+ $l as parseUrlParams,
7556
7573
  fe as readOpcode,
7557
7574
  he as readOpcodeGroup,
7558
7575
  ie as readProtocolMessageHeaders,
7559
- Rc as registerBrowserFunctions,
7560
- yr as setLogLevel,
7561
- Ma as setLogSink,
7562
- zl as setSendLogsCallback,
7563
- Ll as subscribeToLogEvents,
7564
- Rl as takeBufferedLogs,
7565
- Oc as withResultData
7576
+ Uc as registerBrowserFunctions,
7577
+ Cr as setLogLevel,
7578
+ va as setLogSink,
7579
+ Ql as setSendLogsCallback,
7580
+ Pl as subscribeToLogEvents,
7581
+ Ul as takeBufferedLogs,
7582
+ Fc as withResultData
7566
7583
  };