@ikonai/sdk 1.0.59 → 1.0.60

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.
@@ -10,39 +10,39 @@ function Y(t) {
10
10
  const e = ut(t), s = new DataView(e.buffer, e.byteOffset, e.byteLength);
11
11
  if (e.length < 27)
12
12
  throw new Error("Protocol payload too short");
13
- const r = s.getUint32(0, !0), n = s.getUint32(4, !0), i = s.getUint32(8, !0), l = s.getUint32(12, !0), a = s.getUint32(16, !0), o = s.getUint32(20, !0), I = s.getUint8(24), E = s.getUint8(25), h = s.getUint8(26);
13
+ const r = s.getUint32(0, !0), n = s.getUint32(4, !0), i = s.getUint32(8, !0), E = s.getUint32(12, !0), a = s.getUint32(16, !0), o = s.getUint32(20, !0), c = s.getUint8(24), l = s.getUint8(25), _ = s.getUint8(26);
14
14
  if (27 + o * 4 > e.length)
15
15
  throw new Error("Protocol header exceeds payload length");
16
- const c = [];
16
+ const I = [];
17
17
  let w = 27;
18
18
  for (let D = 0; D < o; D++)
19
- c.push(s.getUint32(w, !0)), w += 4;
19
+ I.push(s.getUint32(w, !0)), w += 4;
20
20
  return {
21
21
  length: r,
22
22
  opcode: n,
23
23
  senderId: i,
24
- trackId: l,
24
+ trackId: E,
25
25
  sequenceId: a,
26
- targetIds: c,
27
- payloadVersion: I,
28
- payloadType: E,
29
- flags: h
26
+ targetIds: I,
27
+ payloadVersion: c,
28
+ payloadType: l,
29
+ flags: _
30
30
  };
31
31
  }
32
- function ht(t, e, s, r, n) {
33
- const o = [], E = 27 + o.length * 4, h = E + e.length, T = new Uint8Array(h), c = new DataView(T.buffer);
34
- c.setUint32(0, h, !0), c.setUint32(4, t >>> 0, !0), c.setUint32(8, r >>> 0, !0), c.setUint32(12, 0, !0), c.setUint32(16, 0, !0), c.setUint32(20, o.length >>> 0, !0), c.setUint8(24, s & 255), c.setUint8(25, 8), c.setUint8(26, 0);
32
+ function _t(t, e, s, r, n) {
33
+ const o = [], l = 27 + o.length * 4, _ = l + e.length, T = new Uint8Array(_), I = new DataView(T.buffer);
34
+ I.setUint32(0, _, !0), I.setUint32(4, t >>> 0, !0), I.setUint32(8, r >>> 0, !0), I.setUint32(12, 0, !0), I.setUint32(16, 0, !0), I.setUint32(20, o.length >>> 0, !0), I.setUint8(24, s & 255), I.setUint8(25, 8), I.setUint8(26, 0);
35
35
  let w = 27;
36
36
  for (let D = 0; D < o.length; D++)
37
- c.setUint32(w, o[D] >>> 0, !0), w += 4;
38
- return T.set(e, E), T;
37
+ I.setUint32(w, o[D] >>> 0, !0), w += 4;
38
+ return T.set(e, l), T;
39
39
  }
40
40
  var m = /* @__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))(m || {});
41
- const _t = 161, Tt = 162, K = new TextEncoder();
41
+ const ht = 161, Tt = 162, K = new TextEncoder();
42
42
  new TextDecoder("utf-8", { fatal: !0 });
43
43
  class V {
44
44
  constructor(e = 1) {
45
- this.version = e, this.buffer.writeByte(_t), this.buffer.writeVarUInt(e >>> 0);
45
+ this.version = e, this.buffer.writeByte(ht), this.buffer.writeVarUInt(e >>> 0);
46
46
  }
47
47
  buffer = new O();
48
48
  closed = !1;
@@ -69,7 +69,7 @@ class V {
69
69
  this.writeFixedField(e, 2, () => this.buffer.writeByte(s ? 1 : 0));
70
70
  }
71
71
  writeGuidField(e, s) {
72
- const r = s instanceof _ ? s.asBytes() : s;
72
+ const r = s instanceof h ? s.asBytes() : s;
73
73
  if (r.length !== 16)
74
74
  throw new Error("Guid payload must be 16 bytes");
75
75
  this.writeFixedField(e, 14, () => this.buffer.writeBytes(r));
@@ -94,10 +94,10 @@ class V {
94
94
  this.writeVariableField(e, 9, i);
95
95
  }
96
96
  writeDictionaryField(e, s, r, n) {
97
- const i = new q(s, r);
97
+ const i = new Z(s, r);
98
98
  n(i);
99
- const l = i.finish();
100
- this.writeVariableField(e, 10, l);
99
+ const E = i.finish();
100
+ this.writeVariableField(e, 10, E);
101
101
  }
102
102
  finish() {
103
103
  return this.closed || (this.buffer.writeByte(Tt), this.closed = !0, this.cached = this.buffer.toUint8Array()), this.cached;
@@ -109,7 +109,7 @@ class V {
109
109
  this.writeFieldHeader(e, s, r.length), this.buffer.writeBytes(r);
110
110
  }
111
111
  writeFieldHeader(e, s, r) {
112
- this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(H(s)), It(s) && this.buffer.writeVarUInt(r >>> 0);
112
+ this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(H(s)), ct(s) && this.buffer.writeVarUInt(r >>> 0);
113
113
  }
114
114
  }
115
115
  class x {
@@ -165,7 +165,7 @@ class x {
165
165
  14
166
166
  /* Guid */
167
167
  ), this.count++;
168
- const s = e instanceof _ ? e.asBytes() : e;
168
+ const s = e instanceof h ? e.asBytes() : e;
169
169
  if (s.length !== 16)
170
170
  throw new Error("Guid payload must be 16 bytes");
171
171
  this.payload.writeBytes(s);
@@ -209,7 +209,7 @@ class x {
209
209
  10
210
210
  /* Dict */
211
211
  ), this.count++;
212
- const n = new q(e, s);
212
+ const n = new Z(e, s);
213
213
  r(n);
214
214
  const i = n.finish();
215
215
  this.payload.writeBytes(i);
@@ -223,7 +223,7 @@ class x {
223
223
  throw new Error(`Array element type is ${m[this.elementType]}, expected ${m[e]}`);
224
224
  }
225
225
  }
226
- class q {
226
+ class Z {
227
227
  constructor(e, s) {
228
228
  this.keyType = e, this.valueType = s, At(e);
229
229
  }
@@ -233,7 +233,7 @@ class q {
233
233
  beginEntry() {
234
234
  if (this.entryOpen)
235
235
  throw new Error("Previous dictionary entry not completed");
236
- return this.count++, this.entryOpen = !0, new ct(this.keyType, this.valueType, this.payload, () => {
236
+ return this.count++, this.entryOpen = !0, new It(this.keyType, this.valueType, this.payload, () => {
237
237
  this.entryOpen = !1;
238
238
  });
239
239
  }
@@ -244,7 +244,7 @@ class q {
244
244
  return e.writeByte(H(this.keyType)), e.writeByte(H(this.valueType)), e.writeVarUInt(this.count), e.writeBytes(this.payload.toUint8Array()), e.toUint8Array();
245
245
  }
246
246
  }
247
- class ct {
247
+ class It {
248
248
  constructor(e, s, r, n) {
249
249
  this.keyType = e, this.valueType = s, this.payload = r, this.onComplete = n;
250
250
  }
@@ -298,7 +298,7 @@ class ct {
298
298
  14
299
299
  /* Guid */
300
300
  );
301
- const s = e instanceof _ ? e.asBytes() : e;
301
+ const s = e instanceof h ? e.asBytes() : e;
302
302
  if (s.length !== 16)
303
303
  throw new Error("Guid payload must be 16 bytes");
304
304
  this.payload.writeBytes(s), this.keyWritten = !0;
@@ -364,7 +364,7 @@ class ct {
364
364
  14
365
365
  /* Guid */
366
366
  );
367
- const s = e instanceof _ ? e.asBytes() : e;
367
+ const s = e instanceof h ? e.asBytes() : e;
368
368
  if (s.length !== 16)
369
369
  throw new Error("Guid payload must be 16 bytes");
370
370
  this.payload.writeBytes(s), this.valueWritten = !0;
@@ -414,7 +414,7 @@ class ct {
414
414
  10
415
415
  /* Dict */
416
416
  );
417
- const n = new q(e, s);
417
+ const n = new Z(e, s);
418
418
  r(n);
419
419
  const i = n.finish();
420
420
  this.payload.writeBytes(i), this.valueWritten = !0;
@@ -435,7 +435,7 @@ class ct {
435
435
  throw new Error(`Dictionary value type is ${m[this.valueType]}, expected ${m[e]}`);
436
436
  }
437
437
  }
438
- class _ {
438
+ class h {
439
439
  constructor(e) {
440
440
  this.bytes = e;
441
441
  }
@@ -445,19 +445,19 @@ class _ {
445
445
  const s = e.replace(/-/g, "");
446
446
  if (s.length !== 32)
447
447
  throw new Error("Guid string must be 32 hex characters");
448
- const r = new Uint8Array(16), n = _.parseHexSlice(s, 0, 8), i = _.parseHexSlice(s, 8, 4), l = _.parseHexSlice(s, 12, 4);
449
- _.writeUInt32LE(r, 0, n), _.writeUInt16LE(r, 4, i), _.writeUInt16LE(r, 6, l);
448
+ const r = new Uint8Array(16), n = h.parseHexSlice(s, 0, 8), i = h.parseHexSlice(s, 8, 4), E = h.parseHexSlice(s, 12, 4);
449
+ h.writeUInt32LE(r, 0, n), h.writeUInt16LE(r, 4, i), h.writeUInt16LE(r, 6, E);
450
450
  for (let a = 0; a < 8; a++)
451
- r[8 + a] = _.parseHexSlice(s, 16 + a * 2, 2);
452
- return new _(r);
451
+ r[8 + a] = h.parseHexSlice(s, 16 + a * 2, 2);
452
+ return new h(r);
453
453
  }
454
454
  static fromBytes(e) {
455
455
  if (e.length !== 16)
456
456
  throw new Error("Guid byte array must be 16 bytes");
457
- return new _(Uint8Array.from(e));
457
+ return new h(Uint8Array.from(e));
458
458
  }
459
459
  static createZero() {
460
- return new _(new Uint8Array(16));
460
+ return new h(new Uint8Array(16));
461
461
  }
462
462
  static createRandom() {
463
463
  const e = new Uint8Array(16), s = globalThis.crypto;
@@ -466,16 +466,16 @@ class _ {
466
466
  else
467
467
  for (let r = 0; r < e.length; r++)
468
468
  e[r] = Math.floor(Math.random() * 256);
469
- return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, new _(e);
469
+ return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, new h(e);
470
470
  }
471
471
  toString() {
472
472
  const e = this.bytes;
473
473
  return [
474
- _.toHex(_.readUInt32LE(e, 0), 8),
475
- _.toHex(_.readUInt16LE(e, 4), 4),
476
- _.toHex(_.readUInt16LE(e, 6), 4),
477
- Z(e.subarray(8, 10)),
478
- Z(e.subarray(10, 16))
474
+ h.toHex(h.readUInt32LE(e, 0), 8),
475
+ h.toHex(h.readUInt16LE(e, 4), 4),
476
+ h.toHex(h.readUInt16LE(e, 6), 4),
477
+ J(e.subarray(8, 10)),
478
+ J(e.subarray(10, 16))
479
479
  ].join("-");
480
480
  }
481
481
  asBytes() {
@@ -562,30 +562,30 @@ function H(t, e = 0) {
562
562
  throw new Error("Teleport flags must fit into 4 bits");
563
563
  return (t & 15) << 4 | e & 15;
564
564
  }
565
- function It(t) {
565
+ function ct(t) {
566
566
  return t === 12 || t === 13 || t === 9 || t === 11 || t === 10;
567
567
  }
568
568
  function At(t) {
569
569
  if (t === 9 || t === 11 || t === 10 || t === 1)
570
570
  throw new Error("Dictionary keys must be primitive Teleport types");
571
571
  }
572
- function Z(t) {
572
+ function J(t) {
573
573
  return Array.from(t).map((e) => e.toString(16).padStart(2, "0")).join("");
574
574
  }
575
575
  function ut(t) {
576
576
  return t instanceof Uint8Array ? t : new Uint8Array(t);
577
577
  }
578
- var N = /* @__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[t.WebRTC = 128] = "WebRTC", t[t.TcpTls = 256] = "TcpTls", t[t.Udp = 512] = "Udp", t[t.UdpDtls = 1024] = "UdpDtls", t))(N || {}), k = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", t[t.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", t[t.GROUP_CORE = 65536] = "GROUP_CORE", t[t.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", t[t.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", t[t.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", t[t.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", t[t.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", t[t.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", t[t.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", t[t.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", t[t.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", t[t.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", t[t.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", t[t.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", t[t.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", t[t.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", t[t.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", t[t.CORE_SERVER_START = 65552] = "CORE_SERVER_START", t[t.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", t[t.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", t[t.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", t[t.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", t[t.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", t[t.CORE_UPDATE_CLIENT_CONTEXT = 65558] = "CORE_UPDATE_CLIENT_CONTEXT", t[t.CORE_BACKGROUND_WORK_ACTIVE = 65559] = "CORE_BACKGROUND_WORK_ACTIVE", t[t.CORE_ON_CLIENT_LEFT_AFTER_GRACE_PERIOD = 65560] = "CORE_ON_CLIENT_LEFT_AFTER_GRACE_PERIOD", t[t.CORE_WEBRTC_OFFER = 65566] = "CORE_WEBRTC_OFFER", t[t.CORE_WEBRTC_ANSWER = 65567] = "CORE_WEBRTC_ANSWER", t[t.CORE_WEBRTC_ICE_CANDIDATE = 65568] = "CORE_WEBRTC_ICE_CANDIDATE", t[t.CORE_WEBRTC_READY = 65569] = "CORE_WEBRTC_READY", t[t.CORE_WEBRTC_AUDIO_SEGMENT = 65570] = "CORE_WEBRTC_AUDIO_SEGMENT", t[t.CORE_WEBRTC_TRACK_MAP = 65571] = "CORE_WEBRTC_TRACK_MAP", t[t.CORE_WEBRTC_VIDEO_CAPTURE = 65572] = "CORE_WEBRTC_VIDEO_CAPTURE", t[t.CORE_RELAY_AGENT_AUTH = 65576] = "CORE_RELAY_AGENT_AUTH", t[t.CORE_RELAY_AGENT_AUTH_RESULT = 65577] = "CORE_RELAY_AGENT_AUTH_RESULT", t[t.CORE_RELAY_HEARTBEAT = 65578] = "CORE_RELAY_HEARTBEAT", t[t.CORE_RELAY_TCP_CONNECTION_OPENED = 65579] = "CORE_RELAY_TCP_CONNECTION_OPENED", t[t.CORE_RELAY_TCP_CONNECTION_CLOSED = 65580] = "CORE_RELAY_TCP_CONNECTION_CLOSED", t[t.CORE_RELAY_TCP_DATA = 65581] = "CORE_RELAY_TCP_DATA", t[t.CORE_RELAY_UDP_DATA = 65582] = "CORE_RELAY_UDP_DATA", t[t.CORE_RELAY_ADD_TUNNEL = 65583] = "CORE_RELAY_ADD_TUNNEL", t[t.CORE_RELAY_TUNNEL_ADDED = 65584] = "CORE_RELAY_TUNNEL_ADDED", t[t.CORE_RELAY_REMOVE_TUNNEL = 65585] = "CORE_RELAY_REMOVE_TUNNEL", t[t.CORE_IKON_SERVER_ENDPOINT_HOST_INFO = 65586] = "CORE_IKON_SERVER_ENDPOINT_HOST_INFO", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.ANALYTICS_IKON_RELAY_SERVER_STATS = 524297] = "ANALYTICS_IKON_RELAY_SERVER_STATS", t[t.ANALYTICS_IKON_TURN_SERVER_STATS = 524298] = "ANALYTICS_IKON_TURN_SERVER_STATS", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_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_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", t[t.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", t[t.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", t[t.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", t[t.ACTION_FILE_UPLOAD_PRE_START2 = 1048643] = "ACTION_FILE_UPLOAD_PRE_START2", t[t.ACTION_FILE_UPLOAD_PRE_START_RESPONSE2 = 1048644] = "ACTION_FILE_UPLOAD_PRE_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_START2 = 1048645] = "ACTION_FILE_UPLOAD_START2", t[t.ACTION_FILE_UPLOAD_START_RESPONSE2 = 1048646] = "ACTION_FILE_UPLOAD_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_DATA2 = 1048647] = "ACTION_FILE_UPLOAD_DATA2", t[t.ACTION_FILE_UPLOAD_ACK2 = 1048648] = "ACTION_FILE_UPLOAD_ACK2", t[t.ACTION_FILE_UPLOAD_END2 = 1048649] = "ACTION_FILE_UPLOAD_END2", t[t.ACTION_FILE_UPLOAD_COMPLETE2 = 1048650] = "ACTION_FILE_UPLOAD_COMPLETE2", t[t.ACTION_FUNCTION_ENUMERATION_ITEM_BATCH = 1048651] = "ACTION_FUNCTION_ENUMERATION_ITEM_BATCH", t[t.ACTION_CALL_ACK = 1048652] = "ACTION_CALL_ACK", t[t.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.AUDIO_SHAPE_FRAME = 4194310] = "AUDIO_SHAPE_FRAME", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.GROUP_APP_LOCAL = 1073741824] = "GROUP_APP_LOCAL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(k || {});
579
- const st = 1, ft = 131074;
578
+ var f = /* @__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[t.WebRTC = 128] = "WebRTC", t[t.TcpTls = 256] = "TcpTls", t[t.Udp = 512] = "Udp", t[t.UdpDtls = 1024] = "UdpDtls", t))(f || {}), k = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", t[t.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", t[t.GROUP_CORE = 65536] = "GROUP_CORE", t[t.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", t[t.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", t[t.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", t[t.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", t[t.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", t[t.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", t[t.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", t[t.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", t[t.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", t[t.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", t[t.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", t[t.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", t[t.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", t[t.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", t[t.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", t[t.CORE_SERVER_START = 65552] = "CORE_SERVER_START", t[t.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", t[t.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", t[t.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", t[t.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", t[t.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", t[t.CORE_UPDATE_CLIENT_CONTEXT = 65558] = "CORE_UPDATE_CLIENT_CONTEXT", t[t.CORE_BACKGROUND_WORK_ACTIVE = 65559] = "CORE_BACKGROUND_WORK_ACTIVE", t[t.CORE_RESET_IDLE = 65560] = "CORE_RESET_IDLE", t[t.CORE_CLIENT_DISCONNECTING = 65561] = "CORE_CLIENT_DISCONNECTING", t[t.CORE_WEBRTC_OFFER = 65566] = "CORE_WEBRTC_OFFER", t[t.CORE_WEBRTC_ANSWER = 65567] = "CORE_WEBRTC_ANSWER", t[t.CORE_WEBRTC_ICE_CANDIDATE = 65568] = "CORE_WEBRTC_ICE_CANDIDATE", t[t.CORE_WEBRTC_READY = 65569] = "CORE_WEBRTC_READY", t[t.CORE_WEBRTC_AUDIO_SEGMENT = 65570] = "CORE_WEBRTC_AUDIO_SEGMENT", t[t.CORE_WEBRTC_TRACK_MAP = 65571] = "CORE_WEBRTC_TRACK_MAP", t[t.CORE_WEBRTC_VIDEO_CAPTURE = 65572] = "CORE_WEBRTC_VIDEO_CAPTURE", t[t.CORE_RELAY_AGENT_AUTH = 65576] = "CORE_RELAY_AGENT_AUTH", t[t.CORE_RELAY_AGENT_AUTH_RESULT = 65577] = "CORE_RELAY_AGENT_AUTH_RESULT", t[t.CORE_RELAY_HEARTBEAT = 65578] = "CORE_RELAY_HEARTBEAT", t[t.CORE_RELAY_TCP_CONNECTION_OPENED = 65579] = "CORE_RELAY_TCP_CONNECTION_OPENED", t[t.CORE_RELAY_TCP_CONNECTION_CLOSED = 65580] = "CORE_RELAY_TCP_CONNECTION_CLOSED", t[t.CORE_RELAY_TCP_DATA = 65581] = "CORE_RELAY_TCP_DATA", t[t.CORE_RELAY_UDP_DATA = 65582] = "CORE_RELAY_UDP_DATA", t[t.CORE_RELAY_ADD_TUNNEL = 65583] = "CORE_RELAY_ADD_TUNNEL", t[t.CORE_RELAY_TUNNEL_ADDED = 65584] = "CORE_RELAY_TUNNEL_ADDED", t[t.CORE_RELAY_REMOVE_TUNNEL = 65585] = "CORE_RELAY_REMOVE_TUNNEL", t[t.CORE_IKON_SERVER_ENDPOINT_HOST_INFO = 65586] = "CORE_IKON_SERVER_ENDPOINT_HOST_INFO", t[t.CORE_CLIENT_INITIALIZATION = 65587] = "CORE_CLIENT_INITIALIZATION", t[t.CORE_CLIENT_LIFECYCLE_BATCH = 65588] = "CORE_CLIENT_LIFECYCLE_BATCH", t[t.CORE_APP_CONFIG = 65589] = "CORE_APP_CONFIG", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.ANALYTICS_IKON_RELAY_SERVER_STATS = 524297] = "ANALYTICS_IKON_RELAY_SERVER_STATS", t[t.ANALYTICS_IKON_TURN_SERVER_STATS = 524298] = "ANALYTICS_IKON_TURN_SERVER_STATS", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_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_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", t[t.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", t[t.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", t[t.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", t[t.ACTION_FILE_UPLOAD_PRE_START2 = 1048643] = "ACTION_FILE_UPLOAD_PRE_START2", t[t.ACTION_FILE_UPLOAD_PRE_START_RESPONSE2 = 1048644] = "ACTION_FILE_UPLOAD_PRE_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_START2 = 1048645] = "ACTION_FILE_UPLOAD_START2", t[t.ACTION_FILE_UPLOAD_START_RESPONSE2 = 1048646] = "ACTION_FILE_UPLOAD_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_DATA2 = 1048647] = "ACTION_FILE_UPLOAD_DATA2", t[t.ACTION_FILE_UPLOAD_ACK2 = 1048648] = "ACTION_FILE_UPLOAD_ACK2", t[t.ACTION_FILE_UPLOAD_END2 = 1048649] = "ACTION_FILE_UPLOAD_END2", t[t.ACTION_FILE_UPLOAD_COMPLETE2 = 1048650] = "ACTION_FILE_UPLOAD_COMPLETE2", t[t.ACTION_FUNCTION_ENUMERATION_ITEM_BATCH = 1048651] = "ACTION_FUNCTION_ENUMERATION_ITEM_BATCH", t[t.ACTION_CALL_ACK = 1048652] = "ACTION_CALL_ACK", t[t.ACTION_TRIGGER_CRON = 1048653] = "ACTION_TRIGGER_CRON", t[t.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.AUDIO_SHAPE_FRAME = 4194310] = "AUDIO_SHAPE_FRAME", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.GROUP_APP_LOCAL = 1073741824] = "GROUP_APP_LOCAL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(k || {});
579
+ const st = 1, Ct = 131074;
580
580
  function rt(t) {
581
581
  return {};
582
582
  }
583
- function Ct(t) {
583
+ function Nt(t) {
584
584
  return new V(st).finish();
585
585
  }
586
586
  function nt(t, e, s) {
587
- const r = Ct();
588
- return ht(ft, r, st, e);
587
+ const r = Nt();
588
+ return _t(Ct, r, st, e);
589
589
  }
590
590
  class it extends Error {
591
591
  constructor(e, s) {
@@ -597,7 +597,7 @@ class y extends it {
597
597
  super(e, s), this.name = "TransportError";
598
598
  }
599
599
  }
600
- class J extends y {
600
+ class q extends y {
601
601
  constructor(e) {
602
602
  super(`No keepalive received within ${e}ms`), this.name = "KeepaliveTimeoutError";
603
603
  }
@@ -612,7 +612,7 @@ class tt extends it {
612
612
  super(`Maximum reconnection attempts (${e}) exceeded`), this.name = "MaxRetriesExceededError";
613
613
  }
614
614
  }
615
- function Nt(t, e) {
615
+ function ft(t, e) {
616
616
  return new Promise((s, r) => {
617
617
  const n = () => {
618
618
  clearTimeout(i), r(new DOMException("Aborted", "AbortError"));
@@ -642,7 +642,7 @@ function St(t, e) {
642
642
  return `[${t}] ${e}`;
643
643
  }
644
644
  function W(t, e, s, r) {
645
- const n = (/* @__PURE__ */ new Date()).toISOString(), i = yt[t], l = {
645
+ const n = (/* @__PURE__ */ new Date()).toISOString(), i = yt[t], E = {
646
646
  timestamp: n,
647
647
  level: t,
648
648
  levelName: i,
@@ -651,10 +651,10 @@ function W(t, e, s, r) {
651
651
  args: r
652
652
  };
653
653
  for (const [a, o] of Rt) {
654
- const I = o?.minLevel ?? 2;
655
- if (t >= I)
654
+ const c = o?.minLevel ?? 2;
655
+ if (t >= c)
656
656
  try {
657
- a(l);
657
+ a(E);
658
658
  } catch {
659
659
  }
660
660
  }
@@ -739,31 +739,31 @@ class Ot {
739
739
  i(new y(`Failed to create WebSocket: ${T}`, T instanceof Error ? T : void 0));
740
740
  return;
741
741
  }
742
- let l = !1, a = !1;
742
+ let E = !1, a = !1;
743
743
  const o = () => {
744
- clearTimeout(h), this.ws && (this.ws.onopen = null, this.ws.onerror = null, this.ws.onclose = null, this.ws.onmessage = null);
745
- }, I = () => {
746
- a || (a = !0, clearTimeout(h), this.firstMessageResolver = null, M.debug(`WebSocket connected in ${Date.now() - r}ms`), n());
747
- }, E = (T) => {
744
+ clearTimeout(_), this.ws && (this.ws.onopen = null, this.ws.onerror = null, this.ws.onclose = null, this.ws.onmessage = null);
745
+ }, c = () => {
746
+ a || (a = !0, clearTimeout(_), this.firstMessageResolver = null, M.debug(`WebSocket connected in ${Date.now() - r}ms`), n());
747
+ }, l = (T) => {
748
748
  a || (a = !0, this.firstMessageResolver = null, o(), i(T));
749
749
  };
750
- this.firstMessageResolver = I;
751
- const h = setTimeout(() => {
752
- this.ws?.close(), M.warn(`WebSocket connection timeout after ${this.connectionTimeoutMs}ms`), E(new y("WebSocket connection timeout"));
750
+ this.firstMessageResolver = c;
751
+ const _ = setTimeout(() => {
752
+ this.ws?.close(), M.warn(`WebSocket connection timeout after ${this.connectionTimeoutMs}ms`), l(new y("WebSocket connection timeout"));
753
753
  }, this.connectionTimeoutMs);
754
754
  this.ws.onopen = () => {
755
- l = !0, this.ws.send(s), this.resetKeepaliveTimeout();
755
+ E = !0, this.ws.send(s), this.resetKeepaliveTimeout();
756
756
  }, this.ws.onerror = () => {
757
- M.debug(`WebSocket connection failed after ${Date.now() - r}ms`), E(new y("WebSocket connection failed"));
757
+ M.debug(`WebSocket connection failed after ${Date.now() - r}ms`), l(new y("WebSocket connection failed"));
758
758
  }, this.ws.onclose = (T) => {
759
759
  if (this.clearKeepaliveTimeout(), !a) {
760
- E(l ? new b("WebSocket closed before first server message") : new y("WebSocket connection closed before opening"));
760
+ l(E ? new b("WebSocket closed before first server message") : new y("WebSocket connection closed before opening"));
761
761
  return;
762
762
  }
763
763
  if (this.isClosed)
764
764
  return;
765
- const c = T.wasClean && (T.code === 1e3 || T.code === 1001), w = T.reason || `code=${T.code}`;
766
- this.callbacks.onClose(w, c);
765
+ const I = T.wasClean && (T.code === 1e3 || T.code === 1001), w = T.reason || `code=${T.code}`;
766
+ this.callbacks.onClose(w, I);
767
767
  }, this.ws.onmessage = (T) => {
768
768
  this.handleProtocolMessage(new Uint8Array(T.data));
769
769
  };
@@ -794,9 +794,9 @@ class Ot {
794
794
  }
795
795
  }
796
796
  resetKeepaliveTimeout() {
797
- this.clearKeepaliveTimeout(), this.keepaliveTimeout = setTimeout(() => {
798
- M.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new J(this.keepaliveTimeoutMs)), this.close();
799
- }, this.keepaliveTimeoutMs);
797
+ this.clearKeepaliveTimeout(), !(this.keepaliveTimeoutMs <= 0) && (this.keepaliveTimeout = setTimeout(() => {
798
+ M.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new q(this.keepaliveTimeoutMs)), this.close();
799
+ }, this.keepaliveTimeoutMs));
800
800
  }
801
801
  clearKeepaliveTimeout() {
802
802
  this.keepaliveTimeout && (clearTimeout(this.keepaliveTimeout), this.keepaliveTimeout = null);
@@ -841,48 +841,48 @@ class bt {
841
841
  if (!ot())
842
842
  throw new y("WebTransport is not supported in this browser");
843
843
  this.isClosed = !1;
844
- const r = Date.now(), n = new Promise((i, l) => {
845
- this.firstMessageResolver = i, this.firstMessageRejecter = l;
844
+ const r = Date.now(), n = new Promise((i, E) => {
845
+ this.firstMessageResolver = i, this.firstMessageRejecter = E;
846
846
  });
847
847
  try {
848
848
  this.transport = new WebTransport(e);
849
849
  let i;
850
- const l = new Promise((E, h) => {
850
+ const E = new Promise((l, _) => {
851
851
  i = setTimeout(
852
- () => h(new y("WebTransport connection timeout")),
852
+ () => _(new y("WebTransport connection timeout")),
853
853
  this.connectionTimeoutMs
854
854
  );
855
855
  });
856
856
  try {
857
- await Promise.race([this.transport.ready, l]);
858
- } catch (E) {
859
- throw E instanceof y && S.warn(`WebTransport connection timeout after ${this.connectionTimeoutMs}ms`), E;
857
+ await Promise.race([this.transport.ready, E]);
858
+ } catch (l) {
859
+ throw l instanceof y && S.warn(`WebTransport connection timeout after ${this.connectionTimeoutMs}ms`), l;
860
860
  } finally {
861
861
  clearTimeout(i);
862
862
  }
863
863
  this.transport.closed.then(() => {
864
864
  this.handleClose("Connection closed", !0);
865
- }).catch((E) => {
866
- S.error("WebTransport connection closed with error:", E), this.handleClose(E.message || "Connection error", !1);
865
+ }).catch((l) => {
866
+ S.error("WebTransport connection closed with error:", l), this.handleClose(l.message || "Connection error", !1);
867
867
  }), this.stream = await this.transport.createBidirectionalStream(), this.reader = this.stream.readable.getReader(), this.writer = this.stream.writable.getWriter(), await this.writer.write(s), this.resetKeepaliveTimeout(), this.startReadLoop();
868
868
  const a = Math.max(this.connectionTimeoutMs - (Date.now() - r), 1);
869
869
  let o;
870
- const I = new Promise((E, h) => {
870
+ const c = new Promise((l, _) => {
871
871
  o = setTimeout(
872
- () => h(new y("WebTransport closed before first server message")),
872
+ () => _(new y("WebTransport closed before first server message")),
873
873
  a
874
874
  );
875
875
  });
876
876
  try {
877
- await Promise.race([n, I]);
877
+ await Promise.race([n, c]);
878
878
  } finally {
879
879
  clearTimeout(o);
880
880
  }
881
881
  this.firstMessageResolver = null, this.firstMessageRejecter = null, S.info(`WebTransport connected in ${Date.now() - r}ms`);
882
882
  } catch (i) {
883
883
  this.firstMessageResolver = null, this.firstMessageRejecter = null, this.isClosed = !0, this.cleanup();
884
- const l = Date.now() - r;
885
- throw S.warn(`WebTransport connection failed after ${l}ms: ${i}`), new y(`Failed to connect WebTransport: ${i}`, i instanceof Error ? i : void 0);
884
+ const E = Date.now() - r;
885
+ throw S.warn(`WebTransport connection failed after ${E}ms: ${i}`), new y(`Failed to connect WebTransport: ${i}`, i instanceof Error ? i : void 0);
886
886
  }
887
887
  }
888
888
  send(e) {
@@ -994,9 +994,9 @@ class bt {
994
994
  * Reset the keepalive timeout.
995
995
  */
996
996
  resetKeepaliveTimeout() {
997
- this.clearKeepaliveTimeout(), this.keepaliveTimeout = setTimeout(() => {
998
- S.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new J(this.keepaliveTimeoutMs)), this.close();
999
- }, this.keepaliveTimeoutMs);
997
+ this.clearKeepaliveTimeout(), !(this.keepaliveTimeoutMs <= 0) && (this.keepaliveTimeout = setTimeout(() => {
998
+ S.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new q(this.keepaliveTimeoutMs)), this.close();
999
+ }, this.keepaliveTimeoutMs));
1000
1000
  }
1001
1001
  /**
1002
1002
  * Clear the keepalive timeout.
@@ -1110,18 +1110,18 @@ class vt {
1110
1110
  }
1111
1111
  };
1112
1112
  switch (e.Type) {
1113
- case N.WebSocket:
1114
- case N.WebSocketProxy:
1113
+ case f.WebSocket:
1114
+ case f.WebSocketProxy:
1115
1115
  this.transport = new Ot(s);
1116
1116
  break;
1117
- case N.WebTransport:
1118
- case N.WebTransportProxy:
1117
+ case f.WebTransport:
1118
+ case f.WebTransportProxy:
1119
1119
  if (!ot())
1120
1120
  throw new Error("WebTransport is not supported in this browser");
1121
1121
  this.transport = new bt(s);
1122
1122
  break;
1123
1123
  default:
1124
- throw new Error(`Unsupported entrypoint type: ${N[e.Type]}`);
1124
+ throw new Error(`Unsupported entrypoint type: ${f[e.Type]}`);
1125
1125
  }
1126
1126
  await this.transport.connect(e.Uri, e.AuthTicket);
1127
1127
  }
@@ -1150,7 +1150,7 @@ class vt {
1150
1150
  * Handle transport error.
1151
1151
  */
1152
1152
  handleError(e) {
1153
- this.config.onError?.(e), e instanceof J && this.handleClose("Keepalive timeout", !1);
1153
+ this.config.onError?.(e), e instanceof q && this.handleClose("Keepalive timeout", !1);
1154
1154
  }
1155
1155
  /**
1156
1156
  * Update and notify state change.
@@ -1160,7 +1160,7 @@ class vt {
1160
1160
  }
1161
1161
  }
1162
1162
  const A = p("ChannelManager"), Bt = 5e3;
1163
- class dt {
1163
+ class Ft {
1164
1164
  channels = /* @__PURE__ */ new Map();
1165
1165
  // keyed by opcode group
1166
1166
  activeType = null;
@@ -1255,38 +1255,38 @@ class dt {
1255
1255
  */
1256
1256
  async connectInternal(e = !1) {
1257
1257
  this.setState("connecting");
1258
- const s = this.entrypoints.filter((i) => i.Type !== N.WebRTC), r = this.groupByType(s);
1258
+ const s = this.entrypoints.filter((i) => i.Type !== f.WebRTC), r = this.groupByType(s);
1259
1259
  if (r.size === 0)
1260
1260
  throw this.setState("offline"), new Error("No entrypoints available");
1261
1261
  let n;
1262
1262
  if (this.config.orderedEndpointTypes && this.config.orderedEndpointTypes.length > 0) {
1263
1263
  const i = new Set(r.keys());
1264
- n = this.config.orderedEndpointTypes.filter((l) => i.has(l));
1264
+ n = this.config.orderedEndpointTypes.filter((E) => i.has(E));
1265
1265
  } else this.config.endpointSelector ? n = this.config.endpointSelector.getOrderedTypes(r) : n = Array.from(r.keys());
1266
- this.connectionTimeoutMs = n.length > 1 ? 5e3 : 1e4, A.debug(`Endpoint types to try: [${n.map((i) => N[i]).join(", ")}], transport timeout: ${this.connectionTimeoutMs}ms`);
1266
+ this.connectionTimeoutMs = n.length > 1 ? 5e3 : 1e4, A.debug(`Endpoint types to try: [${n.map((i) => f[i]).join(", ")}], transport timeout: ${this.connectionTimeoutMs}ms`);
1267
1267
  for (const i of n) {
1268
1268
  if (!this.shouldReconnect)
1269
1269
  return;
1270
- const l = r.get(i), a = Date.now();
1271
- A.debug(`Trying ${N[i]} (${l.length} channel(s))`);
1270
+ const E = r.get(i), a = Date.now();
1271
+ A.debug(`Trying ${f[i]} (${E.length} channel(s))`);
1272
1272
  try {
1273
- await this.connectAllChannels(l), this.config.endpointSelector?.rememberWorkingType(i), this.config.onRememberWorkingType?.(i), this.activeType = i, A.debug(`Connected via ${N[i]} in ${Date.now() - a}ms`), this.setState("connected"), this.startStabilityTimer();
1273
+ await this.connectAllChannels(E), this.config.endpointSelector?.rememberWorkingType(i), this.config.onRememberWorkingType?.(i), this.activeType = i, A.debug(`Connected via ${f[i]} in ${Date.now() - a}ms`), this.setState("connected"), this.startStabilityTimer();
1274
1274
  return;
1275
1275
  } catch (o) {
1276
- A.warn(`Failed to connect using ${N[i]} after ${Date.now() - a}ms: ${o instanceof Error ? o.message : o}`);
1277
- const I = this.channels.size > 0;
1276
+ A.warn(`Failed to connect using ${f[i]} after ${Date.now() - a}ms: ${o instanceof Error ? o.message : o}`);
1277
+ const c = this.channels.size > 0;
1278
1278
  if (this.disconnectAll(), o instanceof b)
1279
1279
  throw o;
1280
- if (I && this.config.onRefreshEntrypoints)
1280
+ if (c && this.config.onRefreshEntrypoints)
1281
1281
  try {
1282
1282
  A.info("Partial connection detected, refreshing entrypoints");
1283
- const E = await this.config.onRefreshEntrypoints();
1284
- this.entrypoints = E.entrypoints, this.config.sessionId = E.sessionId;
1285
- const h = E.entrypoints.filter((c) => c.Type !== N.WebRTC), T = this.groupByType(h);
1286
- for (const [c, w] of T)
1287
- r.set(c, w);
1288
- } catch (E) {
1289
- A.warn(`Failed to refresh entrypoints: ${E}`);
1283
+ const l = await this.config.onRefreshEntrypoints();
1284
+ this.entrypoints = l.entrypoints, this.config.sessionId = l.sessionId;
1285
+ const _ = l.entrypoints.filter((I) => I.Type !== f.WebRTC), T = this.groupByType(_);
1286
+ for (const [I, w] of T)
1287
+ r.set(I, w);
1288
+ } catch (l) {
1289
+ A.warn(`Failed to refresh entrypoints: ${l}`);
1290
1290
  }
1291
1291
  }
1292
1292
  }
@@ -1370,7 +1370,7 @@ class dt {
1370
1370
  A.warn(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new tt(this.config.maxReconnectAttempts));
1371
1371
  return;
1372
1372
  }
1373
- if (this.setState("reconnecting"), this.reconnectAttempts++, this.reconnectAttempts > 1 ? (A.info(`Reconnecting in ${this.config.reconnectBackoffMs}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), await Nt(this.config.reconnectBackoffMs, this.abortController?.signal)) : A.info(`Reconnecting immediately (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), !!this.shouldReconnect)
1373
+ if (this.setState("reconnecting"), this.reconnectAttempts++, this.reconnectAttempts > 1 ? (A.info(`Reconnecting in ${this.config.reconnectBackoffMs}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), await ft(this.config.reconnectBackoffMs, this.abortController?.signal)) : A.info(`Reconnecting immediately (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), !!this.shouldReconnect)
1374
1374
  try {
1375
1375
  await this.connectInternal(!0);
1376
1376
  } catch (e) {
@@ -1405,16 +1405,16 @@ class dt {
1405
1405
  this.stabilityTimer && (clearTimeout(this.stabilityTimer), this.stabilityTimer = null);
1406
1406
  }
1407
1407
  }
1408
- const lt = p("ProtocolWorker"), g = (t, e) => {
1408
+ const Et = p("ProtocolWorker"), g = (t, e) => {
1409
1409
  self.postMessage(t, e ?? []);
1410
1410
  };
1411
- let u = null, B = null, d = null, j, C = null;
1412
- const P = [], R = [], F = /* @__PURE__ */ new Map(), U = [], f = [], L = /* @__PURE__ */ new Map(), X = [];
1411
+ let u = null, B = null, F = null, j, N = null;
1412
+ const P = [], R = [], d = /* @__PURE__ */ new Map(), U = [], C = [], L = /* @__PURE__ */ new Map(), X = [];
1413
1413
  function Q() {
1414
1414
  try {
1415
1415
  u?.disconnect();
1416
1416
  } catch (t) {
1417
- lt.warn(`Failed to disconnect channel manager: ${t}`);
1417
+ Et.warn(`Failed to disconnect channel manager: ${t}`);
1418
1418
  }
1419
1419
  u = null;
1420
1420
  for (let t = 0; t < R.length; t++)
@@ -1422,19 +1422,19 @@ function Q() {
1422
1422
  R[t].port.close();
1423
1423
  } catch {
1424
1424
  }
1425
- P.length = 0, R.length = 0, F.clear();
1426
- for (let t = 0; t < f.length; t++)
1425
+ P.length = 0, R.length = 0, d.clear();
1426
+ for (let t = 0; t < C.length; t++)
1427
1427
  try {
1428
- f[t].port.close();
1428
+ C[t].port.close();
1429
1429
  } catch {
1430
1430
  }
1431
- U.length = 0, f.length = 0, L.clear();
1431
+ U.length = 0, C.length = 0, L.clear();
1432
1432
  }
1433
1433
  function v(t) {
1434
1434
  const e = t instanceof Error ? t : new Error(String(t));
1435
1435
  g({ type: "error", error: { name: e.name, message: e.message, stack: e.stack } });
1436
1436
  }
1437
- function Ft() {
1437
+ function dt() {
1438
1438
  let t = 0;
1439
1439
  for (let e = 0; e < R.length; e++)
1440
1440
  t |= R[e].opcodeGroupsMask;
@@ -1446,10 +1446,10 @@ function Gt(t) {
1446
1446
  const e = G(t);
1447
1447
  if ((e & j) !== 0)
1448
1448
  return !0;
1449
- const s = Ft();
1449
+ const s = dt();
1450
1450
  return (e & s) !== 0;
1451
1451
  }
1452
- function Et(t) {
1452
+ function lt(t) {
1453
1453
  X.length = 0;
1454
1454
  for (let e = 0; e < R.length; e++) {
1455
1455
  const s = R[e];
@@ -1469,13 +1469,13 @@ function kt(t, e) {
1469
1469
  const r = new Uint8Array(s.message);
1470
1470
  if (!Vt(r, t))
1471
1471
  return;
1472
- u.sendProtocolMessage(r), C && C.postMessage({ direction: "sent", message: Array.from(r) });
1472
+ u.sendProtocolMessage(r), N && N.postMessage({ direction: "sent", message: Array.from(r) });
1473
1473
  } catch (r) {
1474
1474
  v(r);
1475
1475
  }
1476
1476
  }
1477
1477
  async function pt(t) {
1478
- Q(), u = new dt({
1478
+ Q(), u = new Ft({
1479
1479
  sessionId: t.sessionId,
1480
1480
  keepaliveTimeoutMs: t.keepaliveTimeoutMs,
1481
1481
  reconnectBackoffMs: t.reconnectBackoffMs,
@@ -1492,39 +1492,39 @@ async function pt(t) {
1492
1492
  v(e);
1493
1493
  },
1494
1494
  onRefreshEntrypoints: () => new Promise((e, s) => {
1495
- B = e, d = s, g({ type: "refreshEntrypoints" });
1495
+ B = e, F = s, g({ type: "refreshEntrypoints" });
1496
1496
  }),
1497
1497
  onProtocolMessage: (e) => {
1498
- C && (C.postMessage({ direction: "received", message: Array.from(e) }), z(e) === k.ANALYTICS_LOGS && C.postMessage({ type: "serverLogs", message: Array.from(e) }));
1499
- const s = G(e), r = Gt(e), n = Et(s);
1498
+ N && (N.postMessage({ direction: "received", message: Array.from(e) }), z(e) === k.ANALYTICS_LOGS && N.postMessage({ type: "serverLogs", message: Array.from(e) }));
1499
+ const s = G(e), r = Gt(e), n = lt(s);
1500
1500
  if (!(!r && n.length === 0))
1501
1501
  try {
1502
- const i = Y(e), l = e.buffer instanceof ArrayBuffer && e.byteOffset === 0 && e.byteLength === e.buffer.byteLength, a = n.length > 0;
1503
- if (a && !r && n.length === 1 && l) {
1502
+ const i = Y(e), E = e.buffer instanceof ArrayBuffer && e.byteOffset === 0 && e.byteLength === e.buffer.byteLength, a = n.length > 0;
1503
+ if (a && !r && n.length === 1 && E) {
1504
1504
  const o = e.buffer;
1505
1505
  n[0].postMessage({ type: "protocol", message: o, headers: i }, [o]);
1506
1506
  return;
1507
1507
  }
1508
- if (!a && r && l) {
1508
+ if (!a && r && E) {
1509
1509
  const o = e.buffer;
1510
1510
  g({ type: "protocol", message: o, headers: i }, [o]);
1511
1511
  return;
1512
1512
  }
1513
- if (a && l) {
1513
+ if (a && E) {
1514
1514
  const o = [];
1515
- for (let h = 1; h < n.length; h++)
1515
+ for (let _ = 1; _ < n.length; _++)
1516
1516
  o.push(e.slice().buffer);
1517
- const I = r ? e.slice().buffer : null, E = e.buffer;
1518
- n[0].postMessage({ type: "protocol", message: E, headers: i }, [E]);
1519
- for (let h = 1; h < n.length; h++)
1520
- n[h].postMessage({ type: "protocol", message: o[h - 1], headers: i }, [o[h - 1]]);
1521
- I && g({ type: "protocol", message: I, headers: i }, [I]);
1517
+ const c = r ? e.slice().buffer : null, l = e.buffer;
1518
+ n[0].postMessage({ type: "protocol", message: l, headers: i }, [l]);
1519
+ for (let _ = 1; _ < n.length; _++)
1520
+ n[_].postMessage({ type: "protocol", message: o[_ - 1], headers: i }, [o[_ - 1]]);
1521
+ c && g({ type: "protocol", message: c, headers: i }, [c]);
1522
1522
  return;
1523
1523
  }
1524
1524
  if (a)
1525
1525
  for (const o of n) {
1526
- const I = e.slice().buffer;
1527
- o.postMessage({ type: "protocol", message: I, headers: i }, [I]);
1526
+ const c = e.slice().buffer;
1527
+ o.postMessage({ type: "protocol", message: c, headers: i }, [c]);
1528
1528
  }
1529
1529
  if (r) {
1530
1530
  const o = e.slice().buffer;
@@ -1540,7 +1540,7 @@ self.addEventListener("message", (t) => {
1540
1540
  const e = t.data;
1541
1541
  if (e.type === "connect") {
1542
1542
  pt(e).catch((s) => {
1543
- lt.error(`Failed to connect: ${s}`), v(s), Q();
1543
+ Et.error(`Failed to connect: ${s}`), v(s), Q();
1544
1544
  });
1545
1545
  return;
1546
1546
  }
@@ -1553,7 +1553,7 @@ self.addEventListener("message", (t) => {
1553
1553
  return;
1554
1554
  try {
1555
1555
  const s = new Uint8Array(e.message);
1556
- u.sendProtocolMessage(s), C && C.postMessage({ direction: "sent", message: Array.from(s) });
1556
+ u.sendProtocolMessage(s), N && N.postMessage({ direction: "sent", message: Array.from(s) });
1557
1557
  } catch (s) {
1558
1558
  v(s);
1559
1559
  }
@@ -1564,7 +1564,7 @@ self.addEventListener("message", (t) => {
1564
1564
  return;
1565
1565
  }
1566
1566
  if (e.type === "enableDevtools") {
1567
- e.enabled && !C ? C = new BroadcastChannel("ikon:devtools") : !e.enabled && C && (C.close(), C = null);
1567
+ e.enabled && !N ? N = new BroadcastChannel("ikon:devtools") : !e.enabled && N && (N.close(), N = null);
1568
1568
  return;
1569
1569
  }
1570
1570
  if (e.type === "setLogLevel") {
@@ -1580,21 +1580,21 @@ self.addEventListener("message", (t) => {
1580
1580
  return;
1581
1581
  }
1582
1582
  if (e.type === "refreshedEntrypoints") {
1583
- B && (B({ entrypoints: e.entrypoints, sessionId: e.sessionId }), B = null, d = null);
1583
+ B && (B({ entrypoints: e.entrypoints, sessionId: e.sessionId }), B = null, F = null);
1584
1584
  return;
1585
1585
  }
1586
1586
  if (e.type === "refreshEntrypointsFailed") {
1587
- d && (d(new Error("Failed to refresh entrypoints")), B = null, d = null);
1587
+ F && (F(new Error("Failed to refresh entrypoints")), B = null, F = null);
1588
1588
  return;
1589
1589
  }
1590
1590
  if (e.type === "forwardToPorts") {
1591
1591
  try {
1592
- const s = new Uint8Array(e.message), r = G(s), n = Et(r);
1592
+ const s = new Uint8Array(e.message), r = G(s), n = lt(r);
1593
1593
  if (n.length > 0) {
1594
1594
  const i = Y(s);
1595
- for (const l of n) {
1595
+ for (const E of n) {
1596
1596
  const a = s.slice().buffer;
1597
- l.postMessage({ type: "protocol", message: a, headers: i }, [a]);
1597
+ E.postMessage({ type: "protocol", message: a, headers: i }, [a]);
1598
1598
  }
1599
1599
  }
1600
1600
  } catch (s) {
@@ -1608,11 +1608,11 @@ self.addEventListener("message", (t) => {
1608
1608
  } catch {
1609
1609
  }
1610
1610
  const s = P.length;
1611
- P.push(e.portId), R.push({ port: e.port, opcodeGroupsMask: e.opcodeGroupsMask }), F.set(e.portId, s);
1611
+ P.push(e.portId), R.push({ port: e.port, opcodeGroupsMask: e.opcodeGroupsMask }), d.set(e.portId, s);
1612
1612
  return;
1613
1613
  }
1614
1614
  if (e.type === "detachPort") {
1615
- const s = F.get(e.portId);
1615
+ const s = d.get(e.portId);
1616
1616
  if (s !== void 0) {
1617
1617
  const r = R[s];
1618
1618
  try {
@@ -1622,29 +1622,29 @@ self.addEventListener("message", (t) => {
1622
1622
  const n = P.length - 1;
1623
1623
  if (s !== n) {
1624
1624
  const i = P[n];
1625
- P[s] = i, R[s] = R[n], F.set(i, s);
1625
+ P[s] = i, R[s] = R[n], d.set(i, s);
1626
1626
  }
1627
- P.length--, R.length--, F.delete(e.portId);
1627
+ P.length--, R.length--, d.delete(e.portId);
1628
1628
  }
1629
1629
  return;
1630
1630
  }
1631
1631
  if (e.type === "attachSendPort") {
1632
1632
  const s = L.get(e.portId);
1633
1633
  if (s !== void 0) {
1634
- const i = f[s];
1634
+ const i = C[s];
1635
1635
  try {
1636
1636
  i.port.close();
1637
1637
  } catch {
1638
1638
  }
1639
- const l = U.length - 1;
1640
- if (s !== l) {
1641
- const a = U[l];
1642
- U[s] = a, f[s] = f[l], L.set(a, s);
1639
+ const E = U.length - 1;
1640
+ if (s !== E) {
1641
+ const a = U[E];
1642
+ U[s] = a, C[s] = C[E], L.set(a, s);
1643
1643
  }
1644
- U.length--, f.length--, L.delete(e.portId);
1644
+ U.length--, C.length--, L.delete(e.portId);
1645
1645
  }
1646
1646
  const r = { port: e.port, opcodeGroupsMask: e.opcodeGroupsMask }, n = U.length;
1647
- U.push(e.portId), f.push(r), L.set(e.portId, n);
1647
+ U.push(e.portId), C.push(r), L.set(e.portId, n);
1648
1648
  try {
1649
1649
  r.port.start?.();
1650
1650
  } catch {
@@ -1657,7 +1657,7 @@ self.addEventListener("message", (t) => {
1657
1657
  if (e.type === "detachSendPort") {
1658
1658
  const s = L.get(e.portId);
1659
1659
  if (s !== void 0) {
1660
- const r = f[s];
1660
+ const r = C[s];
1661
1661
  try {
1662
1662
  r.port.close();
1663
1663
  } catch {
@@ -1665,9 +1665,9 @@ self.addEventListener("message", (t) => {
1665
1665
  const n = U.length - 1;
1666
1666
  if (s !== n) {
1667
1667
  const i = U[n];
1668
- U[s] = i, f[s] = f[n], L.set(i, s);
1668
+ U[s] = i, C[s] = C[n], L.set(i, s);
1669
1669
  }
1670
- U.length--, f.length--, L.delete(e.portId);
1670
+ U.length--, C.length--, L.delete(e.portId);
1671
1671
  }
1672
1672
  return;
1673
1673
  }