@zoralabs/protocol-deployments 0.5.4-doppler.0 → 0.5.5-PRE.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ import {
3
3
  __export,
4
4
  __require,
5
5
  __toESM
6
- } from "./chunk-3EJPJMEH.js";
6
+ } from "./chunk-PR4QN5HX.js";
7
7
 
8
8
  // ../../node_modules/.pnpm/ws@8.18.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/stream.js
9
9
  var require_stream = __commonJS({
@@ -36,18 +36,15 @@ var require_stream = __commonJS({
36
36
  });
37
37
  ws.on("message", function message(msg, isBinary) {
38
38
  const data = !isBinary && duplex._readableState.objectMode ? msg.toString() : msg;
39
- if (!duplex.push(data))
40
- ws.pause();
39
+ if (!duplex.push(data)) ws.pause();
41
40
  });
42
41
  ws.once("error", function error(err) {
43
- if (duplex.destroyed)
44
- return;
42
+ if (duplex.destroyed) return;
45
43
  terminateOnDestroy = false;
46
44
  duplex.destroy(err);
47
45
  });
48
46
  ws.once("close", function close() {
49
- if (duplex.destroyed)
50
- return;
47
+ if (duplex.destroyed) return;
51
48
  duplex.push(null);
52
49
  });
53
50
  duplex._destroy = function(err, callback) {
@@ -62,12 +59,10 @@ var require_stream = __commonJS({
62
59
  callback(err2);
63
60
  });
64
61
  ws.once("close", function close() {
65
- if (!called)
66
- callback(err);
62
+ if (!called) callback(err);
67
63
  process.nextTick(emitClose, duplex);
68
64
  });
69
- if (terminateOnDestroy)
70
- ws.terminate();
65
+ if (terminateOnDestroy) ws.terminate();
71
66
  };
72
67
  duplex._final = function(callback) {
73
68
  if (ws.readyState === ws.CONNECTING) {
@@ -76,12 +71,10 @@ var require_stream = __commonJS({
76
71
  });
77
72
  return;
78
73
  }
79
- if (ws._socket === null)
80
- return;
74
+ if (ws._socket === null) return;
81
75
  if (ws._socket._writableState.finished) {
82
76
  callback();
83
- if (duplex._readableState.endEmitted)
84
- duplex.destroy();
77
+ if (duplex._readableState.endEmitted) duplex.destroy();
85
78
  } else {
86
79
  ws._socket.once("finish", function finish() {
87
80
  callback();
@@ -90,8 +83,7 @@ var require_stream = __commonJS({
90
83
  }
91
84
  };
92
85
  duplex._read = function() {
93
- if (ws.isPaused)
94
- ws.resume();
86
+ if (ws.isPaused) ws.resume();
95
87
  };
96
88
  duplex._write = function(chunk, encoding, callback) {
97
89
  if (ws.readyState === ws.CONNECTING) {
@@ -116,8 +108,7 @@ var require_constants = __commonJS({
116
108
  "use strict";
117
109
  var BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
118
110
  var hasBlob = typeof Blob !== "undefined";
119
- if (hasBlob)
120
- BINARY_TYPES.push("blob");
111
+ if (hasBlob) BINARY_TYPES.push("blob");
121
112
  module.exports = {
122
113
  BINARY_TYPES,
123
114
  EMPTY_BUFFER: Buffer.alloc(0),
@@ -158,24 +149,19 @@ var require_node_gyp_build = __commonJS({
158
149
  dir = path.resolve(dir || ".");
159
150
  try {
160
151
  var name = runtimeRequire(path.join(dir, "package.json")).name.toUpperCase().replace(/-/g, "_");
161
- if (process.env[name + "_PREBUILD"])
162
- dir = process.env[name + "_PREBUILD"];
152
+ if (process.env[name + "_PREBUILD"]) dir = process.env[name + "_PREBUILD"];
163
153
  } catch (err) {
164
154
  }
165
155
  if (!prebuildsOnly) {
166
156
  var release = getFirst(path.join(dir, "build/Release"), matchBuild);
167
- if (release)
168
- return release;
157
+ if (release) return release;
169
158
  var debug = getFirst(path.join(dir, "build/Debug"), matchBuild);
170
- if (debug)
171
- return debug;
159
+ if (debug) return debug;
172
160
  }
173
161
  var prebuild = resolve(dir);
174
- if (prebuild)
175
- return prebuild;
162
+ if (prebuild) return prebuild;
176
163
  var nearby = resolve(path.dirname(process.execPath));
177
- if (nearby)
178
- return nearby;
164
+ if (nearby) return nearby;
179
165
  var target = [
180
166
  "platform=" + platform,
181
167
  "arch=" + arch,
@@ -193,14 +179,12 @@ var require_node_gyp_build = __commonJS({
193
179
  function resolve(dir2) {
194
180
  var tuples = readdirSync(path.join(dir2, "prebuilds")).map(parseTuple);
195
181
  var tuple = tuples.filter(matchTuple(platform, arch)).sort(compareTuples)[0];
196
- if (!tuple)
197
- return;
182
+ if (!tuple) return;
198
183
  var prebuilds = path.join(dir2, "prebuilds", tuple.name);
199
184
  var parsed = readdirSync(prebuilds).map(parseTags);
200
185
  var candidates = parsed.filter(matchTags(runtime, abi));
201
186
  var winner = candidates.sort(compareTags(runtime))[0];
202
- if (winner)
203
- return path.join(prebuilds, winner.file);
187
+ if (winner) return path.join(prebuilds, winner.file);
204
188
  }
205
189
  };
206
190
  function readdirSync(dir) {
@@ -219,24 +203,18 @@ var require_node_gyp_build = __commonJS({
219
203
  }
220
204
  function parseTuple(name) {
221
205
  var arr = name.split("-");
222
- if (arr.length !== 2)
223
- return;
206
+ if (arr.length !== 2) return;
224
207
  var platform2 = arr[0];
225
208
  var architectures = arr[1].split("+");
226
- if (!platform2)
227
- return;
228
- if (!architectures.length)
229
- return;
230
- if (!architectures.every(Boolean))
231
- return;
209
+ if (!platform2) return;
210
+ if (!architectures.length) return;
211
+ if (!architectures.every(Boolean)) return;
232
212
  return { name, platform: platform2, architectures };
233
213
  }
234
214
  function matchTuple(platform2, arch2) {
235
215
  return function(tuple) {
236
- if (tuple == null)
237
- return false;
238
- if (tuple.platform !== platform2)
239
- return false;
216
+ if (tuple == null) return false;
217
+ if (tuple.platform !== platform2) return false;
240
218
  return tuple.architectures.includes(arch2);
241
219
  };
242
220
  }
@@ -247,8 +225,7 @@ var require_node_gyp_build = __commonJS({
247
225
  var arr = file.split(".");
248
226
  var extension = arr.pop();
249
227
  var tags = { file, specificity: 0 };
250
- if (extension !== "node")
251
- return;
228
+ if (extension !== "node") return;
252
229
  for (var i = 0; i < arr.length; i++) {
253
230
  var tag = arr[i];
254
231
  if (tag === "node" || tag === "electron" || tag === "node-webkit") {
@@ -272,18 +249,12 @@ var require_node_gyp_build = __commonJS({
272
249
  }
273
250
  function matchTags(runtime2, abi2) {
274
251
  return function(tags) {
275
- if (tags == null)
276
- return false;
277
- if (tags.runtime && tags.runtime !== runtime2 && !runtimeAgnostic(tags))
278
- return false;
279
- if (tags.abi && tags.abi !== abi2 && !tags.napi)
280
- return false;
281
- if (tags.uv && tags.uv !== uv)
282
- return false;
283
- if (tags.armv && tags.armv !== armv)
284
- return false;
285
- if (tags.libc && tags.libc !== libc)
286
- return false;
252
+ if (tags == null) return false;
253
+ if (tags.runtime && tags.runtime !== runtime2 && !runtimeAgnostic(tags)) return false;
254
+ if (tags.abi && tags.abi !== abi2 && !tags.napi) return false;
255
+ if (tags.uv && tags.uv !== uv) return false;
256
+ if (tags.armv && tags.armv !== armv) return false;
257
+ if (tags.libc && tags.libc !== libc) return false;
287
258
  return true;
288
259
  };
289
260
  }
@@ -307,10 +278,8 @@ var require_node_gyp_build = __commonJS({
307
278
  return !!(process.versions && process.versions.nw);
308
279
  }
309
280
  function isElectron() {
310
- if (process.versions && process.versions.electron)
311
- return true;
312
- if (process.env.ELECTRON_RUN_AS_NODE)
313
- return true;
281
+ if (process.versions && process.versions.electron) return true;
282
+ if (process.env.ELECTRON_RUN_AS_NODE) return true;
314
283
  return typeof window !== "undefined" && window.process && window.process.type === "renderer";
315
284
  }
316
285
  function isAlpine(platform2) {
@@ -376,10 +345,8 @@ var require_buffer_util = __commonJS({
376
345
  var { EMPTY_BUFFER } = require_constants();
377
346
  var FastBuffer = Buffer[Symbol.species];
378
347
  function concat(list, totalLength) {
379
- if (list.length === 0)
380
- return EMPTY_BUFFER;
381
- if (list.length === 1)
382
- return list[0];
348
+ if (list.length === 0) return EMPTY_BUFFER;
349
+ if (list.length === 1) return list[0];
383
350
  const target = Buffer.allocUnsafe(totalLength);
384
351
  let offset = 0;
385
352
  for (let i = 0; i < list.length; i++) {
@@ -410,8 +377,7 @@ var require_buffer_util = __commonJS({
410
377
  }
411
378
  function toBuffer(data) {
412
379
  toBuffer.readOnly = true;
413
- if (Buffer.isBuffer(data))
414
- return data;
380
+ if (Buffer.isBuffer(data)) return data;
415
381
  let buf;
416
382
  if (data instanceof ArrayBuffer) {
417
383
  buf = new FastBuffer(data);
@@ -434,16 +400,12 @@ var require_buffer_util = __commonJS({
434
400
  try {
435
401
  const bufferUtil = require_bufferutil();
436
402
  module.exports.mask = function(source, mask, output, offset, length) {
437
- if (length < 48)
438
- _mask(source, mask, output, offset, length);
439
- else
440
- bufferUtil.mask(source, mask, output, offset, length);
403
+ if (length < 48) _mask(source, mask, output, offset, length);
404
+ else bufferUtil.mask(source, mask, output, offset, length);
441
405
  };
442
406
  module.exports.unmask = function(buffer, mask) {
443
- if (buffer.length < 32)
444
- _unmask(buffer, mask);
445
- else
446
- bufferUtil.unmask(buffer, mask);
407
+ if (buffer.length < 32) _unmask(buffer, mask);
408
+ else bufferUtil.unmask(buffer, mask);
447
409
  };
448
410
  } catch (e) {
449
411
  }
@@ -489,8 +451,7 @@ var require_limiter = __commonJS({
489
451
  * @private
490
452
  */
491
453
  [kRun]() {
492
- if (this.pending === this.concurrency)
493
- return;
454
+ if (this.pending === this.concurrency) return;
494
455
  if (this.jobs.length) {
495
456
  const job = this.jobs.shift();
496
457
  this.pending++;
@@ -786,8 +747,7 @@ var require_permessage_deflate = __commonJS({
786
747
  }
787
748
  this._inflate[kCallback] = callback;
788
749
  this._inflate.write(data);
789
- if (fin)
790
- this._inflate.write(TRAILER);
750
+ if (fin) this._inflate.write(TRAILER);
791
751
  this._inflate.flush(() => {
792
752
  const err = this._inflate[kError];
793
753
  if (err) {
@@ -1205,8 +1165,7 @@ var require_receiver = __commonJS({
1205
1165
  * @private
1206
1166
  */
1207
1167
  _write(chunk, encoding, cb) {
1208
- if (this._opcode === 8 && this._state == GET_INFO)
1209
- return cb();
1168
+ if (this._opcode === 8 && this._state == GET_INFO) return cb();
1210
1169
  this._bufferedBytes += chunk.length;
1211
1170
  this._buffers.push(chunk);
1212
1171
  this.startLoop(cb);
@@ -1220,8 +1179,7 @@ var require_receiver = __commonJS({
1220
1179
  */
1221
1180
  consume(n) {
1222
1181
  this._bufferedBytes -= n;
1223
- if (n === this._buffers[0].length)
1224
- return this._buffers.shift();
1182
+ if (n === this._buffers[0].length) return this._buffers.shift();
1225
1183
  if (n < this._buffers[0].length) {
1226
1184
  const buf = this._buffers[0];
1227
1185
  this._buffers[0] = new FastBuffer(
@@ -1280,8 +1238,7 @@ var require_receiver = __commonJS({
1280
1238
  return;
1281
1239
  }
1282
1240
  } while (this._loop);
1283
- if (!this._errored)
1284
- cb();
1241
+ if (!this._errored) cb();
1285
1242
  }
1286
1243
  /**
1287
1244
  * Reads the first two bytes of a frame.
@@ -1403,8 +1360,7 @@ var require_receiver = __commonJS({
1403
1360
  cb(error);
1404
1361
  return;
1405
1362
  }
1406
- if (!this._fin && !this._fragmented)
1407
- this._fragmented = this._opcode;
1363
+ if (!this._fin && !this._fragmented) this._fragmented = this._opcode;
1408
1364
  this._masked = (buf[1] & 128) === 128;
1409
1365
  if (this._isServer) {
1410
1366
  if (!this._masked) {
@@ -1429,12 +1385,9 @@ var require_receiver = __commonJS({
1429
1385
  cb(error);
1430
1386
  return;
1431
1387
  }
1432
- if (this._payloadLength === 126)
1433
- this._state = GET_PAYLOAD_LENGTH_16;
1434
- else if (this._payloadLength === 127)
1435
- this._state = GET_PAYLOAD_LENGTH_64;
1436
- else
1437
- this.haveLength(cb);
1388
+ if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16;
1389
+ else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64;
1390
+ else this.haveLength(cb);
1438
1391
  }
1439
1392
  /**
1440
1393
  * Gets extended payload length (7+16).
@@ -1498,10 +1451,8 @@ var require_receiver = __commonJS({
1498
1451
  return;
1499
1452
  }
1500
1453
  }
1501
- if (this._masked)
1502
- this._state = GET_MASK;
1503
- else
1504
- this._state = GET_DATA;
1454
+ if (this._masked) this._state = GET_MASK;
1455
+ else this._state = GET_DATA;
1505
1456
  }
1506
1457
  /**
1507
1458
  * Reads mask bytes.
@@ -1559,8 +1510,7 @@ var require_receiver = __commonJS({
1559
1510
  decompress(data, cb) {
1560
1511
  const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
1561
1512
  perMessageDeflate.decompress(data, this._fin, (err, buf) => {
1562
- if (err)
1563
- return cb(err);
1513
+ if (err) return cb(err);
1564
1514
  if (buf.length) {
1565
1515
  this._messageLength += buf.length;
1566
1516
  if (this._messageLength > this._maxPayload && this._maxPayload > 0) {
@@ -1577,8 +1527,7 @@ var require_receiver = __commonJS({
1577
1527
  this._fragments.push(buf);
1578
1528
  }
1579
1529
  this.dataMessage(cb);
1580
- if (this._state === GET_INFO)
1581
- this.startLoop(cb);
1530
+ if (this._state === GET_INFO) this.startLoop(cb);
1582
1531
  });
1583
1532
  }
1584
1533
  /**
@@ -1845,8 +1794,7 @@ var require_sender = __commonJS({
1845
1794
  }
1846
1795
  const target = Buffer.allocUnsafe(merge ? dataLength + offset : offset);
1847
1796
  target[0] = options.fin ? options.opcode | 128 : options.opcode;
1848
- if (options.rsv1)
1849
- target[0] |= 64;
1797
+ if (options.rsv1) target[0] |= 64;
1850
1798
  target[1] = payloadLength;
1851
1799
  if (payloadLength === 126) {
1852
1800
  target.writeUInt16BE(dataLength, 2);
@@ -1854,15 +1802,13 @@ var require_sender = __commonJS({
1854
1802
  target[2] = target[3] = 0;
1855
1803
  target.writeUIntBE(dataLength, 4, 6);
1856
1804
  }
1857
- if (!options.mask)
1858
- return [target, data];
1805
+ if (!options.mask) return [target, data];
1859
1806
  target[1] |= 128;
1860
1807
  target[offset - 4] = mask[0];
1861
1808
  target[offset - 3] = mask[1];
1862
1809
  target[offset - 2] = mask[2];
1863
1810
  target[offset - 1] = mask[3];
1864
- if (skipMasking)
1865
- return [target, data];
1811
+ if (skipMasking) return [target, data];
1866
1812
  if (merge) {
1867
1813
  applyMask(data, mask, target, offset, dataLength);
1868
1814
  return [target];
@@ -2054,8 +2000,7 @@ var require_sender = __commonJS({
2054
2000
  rsv1 = false;
2055
2001
  opcode = 0;
2056
2002
  }
2057
- if (options.fin)
2058
- this._firstFragment = true;
2003
+ if (options.fin) this._firstFragment = true;
2059
2004
  const opts = {
2060
2005
  [kByteLength]: byteLength,
2061
2006
  fin: options.fin,
@@ -2213,13 +2158,11 @@ var require_sender = __commonJS({
2213
2158
  };
2214
2159
  module.exports = Sender2;
2215
2160
  function callCallbacks(sender, err, cb) {
2216
- if (typeof cb === "function")
2217
- cb(err);
2161
+ if (typeof cb === "function") cb(err);
2218
2162
  for (let i = 0; i < sender._queue.length; i++) {
2219
2163
  const params = sender._queue[i];
2220
2164
  const callback = params[params.length - 1];
2221
- if (typeof callback === "function")
2222
- callback(err);
2165
+ if (typeof callback === "function") callback(err);
2223
2166
  }
2224
2167
  }
2225
2168
  function onError(sender, err, cb) {
@@ -2464,10 +2407,8 @@ var require_extension = __commonJS({
2464
2407
  "use strict";
2465
2408
  var { tokenChars } = require_validation();
2466
2409
  function push(dest, name, elem) {
2467
- if (dest[name] === void 0)
2468
- dest[name] = [elem];
2469
- else
2470
- dest[name].push(elem);
2410
+ if (dest[name] === void 0) dest[name] = [elem];
2411
+ else dest[name].push(elem);
2471
2412
  }
2472
2413
  function parse(header) {
2473
2414
  const offers = /* @__PURE__ */ Object.create(null);
@@ -2485,17 +2426,14 @@ var require_extension = __commonJS({
2485
2426
  code = header.charCodeAt(i);
2486
2427
  if (extensionName === void 0) {
2487
2428
  if (end === -1 && tokenChars[code] === 1) {
2488
- if (start === -1)
2489
- start = i;
2429
+ if (start === -1) start = i;
2490
2430
  } else if (i !== 0 && (code === 32 || code === 9)) {
2491
- if (end === -1 && start !== -1)
2492
- end = i;
2431
+ if (end === -1 && start !== -1) end = i;
2493
2432
  } else if (code === 59 || code === 44) {
2494
2433
  if (start === -1) {
2495
2434
  throw new SyntaxError(`Unexpected character at index ${i}`);
2496
2435
  }
2497
- if (end === -1)
2498
- end = i;
2436
+ if (end === -1) end = i;
2499
2437
  const name = header.slice(start, end);
2500
2438
  if (code === 44) {
2501
2439
  push(offers, name, params);
@@ -2509,17 +2447,14 @@ var require_extension = __commonJS({
2509
2447
  }
2510
2448
  } else if (paramName === void 0) {
2511
2449
  if (end === -1 && tokenChars[code] === 1) {
2512
- if (start === -1)
2513
- start = i;
2450
+ if (start === -1) start = i;
2514
2451
  } else if (code === 32 || code === 9) {
2515
- if (end === -1 && start !== -1)
2516
- end = i;
2452
+ if (end === -1 && start !== -1) end = i;
2517
2453
  } else if (code === 59 || code === 44) {
2518
2454
  if (start === -1) {
2519
2455
  throw new SyntaxError(`Unexpected character at index ${i}`);
2520
2456
  }
2521
- if (end === -1)
2522
- end = i;
2457
+ if (end === -1) end = i;
2523
2458
  push(params, header.slice(start, end), true);
2524
2459
  if (code === 44) {
2525
2460
  push(offers, extensionName, params);
@@ -2538,15 +2473,12 @@ var require_extension = __commonJS({
2538
2473
  if (tokenChars[code] !== 1) {
2539
2474
  throw new SyntaxError(`Unexpected character at index ${i}`);
2540
2475
  }
2541
- if (start === -1)
2542
- start = i;
2543
- else if (!mustUnescape)
2544
- mustUnescape = true;
2476
+ if (start === -1) start = i;
2477
+ else if (!mustUnescape) mustUnescape = true;
2545
2478
  isEscaping = false;
2546
2479
  } else if (inQuotes) {
2547
2480
  if (tokenChars[code] === 1) {
2548
- if (start === -1)
2549
- start = i;
2481
+ if (start === -1) start = i;
2550
2482
  } else if (code === 34 && start !== -1) {
2551
2483
  inQuotes = false;
2552
2484
  end = i;
@@ -2558,17 +2490,14 @@ var require_extension = __commonJS({
2558
2490
  } else if (code === 34 && header.charCodeAt(i - 1) === 61) {
2559
2491
  inQuotes = true;
2560
2492
  } else if (end === -1 && tokenChars[code] === 1) {
2561
- if (start === -1)
2562
- start = i;
2493
+ if (start === -1) start = i;
2563
2494
  } else if (start !== -1 && (code === 32 || code === 9)) {
2564
- if (end === -1)
2565
- end = i;
2495
+ if (end === -1) end = i;
2566
2496
  } else if (code === 59 || code === 44) {
2567
2497
  if (start === -1) {
2568
2498
  throw new SyntaxError(`Unexpected character at index ${i}`);
2569
2499
  }
2570
- if (end === -1)
2571
- end = i;
2500
+ if (end === -1) end = i;
2572
2501
  let value = header.slice(start, end);
2573
2502
  if (mustUnescape) {
2574
2503
  value = value.replace(/\\/g, "");
@@ -2590,8 +2519,7 @@ var require_extension = __commonJS({
2590
2519
  if (start === -1 || inQuotes || code === 32 || code === 9) {
2591
2520
  throw new SyntaxError("Unexpected end of input");
2592
2521
  }
2593
- if (end === -1)
2594
- end = i;
2522
+ if (end === -1) end = i;
2595
2523
  const token = header.slice(start, end);
2596
2524
  if (extensionName === void 0) {
2597
2525
  push(offers, token, params);
@@ -2610,14 +2538,12 @@ var require_extension = __commonJS({
2610
2538
  function format(extensions) {
2611
2539
  return Object.keys(extensions).map((extension) => {
2612
2540
  let configurations = extensions[extension];
2613
- if (!Array.isArray(configurations))
2614
- configurations = [configurations];
2541
+ if (!Array.isArray(configurations)) configurations = [configurations];
2615
2542
  return configurations.map((params) => {
2616
2543
  return [extension].concat(
2617
2544
  Object.keys(params).map((k) => {
2618
2545
  let values = params[k];
2619
- if (!Array.isArray(values))
2620
- values = [values];
2546
+ if (!Array.isArray(values)) values = [values];
2621
2547
  return values.map((v) => v === true ? k : `${k}=${v}`).join("; ");
2622
2548
  })
2623
2549
  ).join("; ");
@@ -2718,18 +2644,15 @@ var require_websocket = __commonJS({
2718
2644
  return this._binaryType;
2719
2645
  }
2720
2646
  set binaryType(type) {
2721
- if (!BINARY_TYPES.includes(type))
2722
- return;
2647
+ if (!BINARY_TYPES.includes(type)) return;
2723
2648
  this._binaryType = type;
2724
- if (this._receiver)
2725
- this._receiver._binaryType = type;
2649
+ if (this._receiver) this._receiver._binaryType = type;
2726
2650
  }
2727
2651
  /**
2728
2652
  * @type {Number}
2729
2653
  */
2730
2654
  get bufferedAmount() {
2731
- if (!this._socket)
2732
- return this._bufferedAmount;
2655
+ if (!this._socket) return this._bufferedAmount;
2733
2656
  return this._socket._writableState.length + this._sender._bufferedBytes;
2734
2657
  }
2735
2658
  /**
@@ -2829,12 +2752,9 @@ var require_websocket = __commonJS({
2829
2752
  receiver.on("ping", receiverOnPing);
2830
2753
  receiver.on("pong", receiverOnPong);
2831
2754
  sender.onerror = senderOnError;
2832
- if (socket.setTimeout)
2833
- socket.setTimeout(0);
2834
- if (socket.setNoDelay)
2835
- socket.setNoDelay();
2836
- if (head.length > 0)
2837
- socket.unshift(head);
2755
+ if (socket.setTimeout) socket.setTimeout(0);
2756
+ if (socket.setNoDelay) socket.setNoDelay();
2757
+ if (head.length > 0) socket.unshift(head);
2838
2758
  socket.on("close", socketOnClose);
2839
2759
  socket.on("data", socketOnData);
2840
2760
  socket.on("end", socketOnEnd);
@@ -2881,8 +2801,7 @@ var require_websocket = __commonJS({
2881
2801
  * @public
2882
2802
  */
2883
2803
  close(code, data) {
2884
- if (this.readyState === _WebSocket.CLOSED)
2885
- return;
2804
+ if (this.readyState === _WebSocket.CLOSED) return;
2886
2805
  if (this.readyState === _WebSocket.CONNECTING) {
2887
2806
  const msg = "WebSocket was closed before the connection was established";
2888
2807
  abortHandshake(this, this._req, msg);
@@ -2896,8 +2815,7 @@ var require_websocket = __commonJS({
2896
2815
  }
2897
2816
  this._readyState = _WebSocket.CLOSING;
2898
2817
  this._sender.close(code, data, !this._isServer, (err) => {
2899
- if (err)
2900
- return;
2818
+ if (err) return;
2901
2819
  this._closeFrameSent = true;
2902
2820
  if (this._closeFrameReceived || this._receiver._writableState.errorEmitted) {
2903
2821
  this._socket.end();
@@ -2936,14 +2854,12 @@ var require_websocket = __commonJS({
2936
2854
  cb = mask;
2937
2855
  mask = void 0;
2938
2856
  }
2939
- if (typeof data === "number")
2940
- data = data.toString();
2857
+ if (typeof data === "number") data = data.toString();
2941
2858
  if (this.readyState !== _WebSocket.OPEN) {
2942
2859
  sendAfterClose(this, data, cb);
2943
2860
  return;
2944
2861
  }
2945
- if (mask === void 0)
2946
- mask = !this._isServer;
2862
+ if (mask === void 0) mask = !this._isServer;
2947
2863
  this._sender.ping(data || EMPTY_BUFFER, mask, cb);
2948
2864
  }
2949
2865
  /**
@@ -2965,14 +2881,12 @@ var require_websocket = __commonJS({
2965
2881
  cb = mask;
2966
2882
  mask = void 0;
2967
2883
  }
2968
- if (typeof data === "number")
2969
- data = data.toString();
2884
+ if (typeof data === "number") data = data.toString();
2970
2885
  if (this.readyState !== _WebSocket.OPEN) {
2971
2886
  sendAfterClose(this, data, cb);
2972
2887
  return;
2973
2888
  }
2974
- if (mask === void 0)
2975
- mask = !this._isServer;
2889
+ if (mask === void 0) mask = !this._isServer;
2976
2890
  this._sender.pong(data || EMPTY_BUFFER, mask, cb);
2977
2891
  }
2978
2892
  /**
@@ -2985,8 +2899,7 @@ var require_websocket = __commonJS({
2985
2899
  return;
2986
2900
  }
2987
2901
  this._paused = false;
2988
- if (!this._receiver._writableState.needDrain)
2989
- this._socket.resume();
2902
+ if (!this._receiver._writableState.needDrain) this._socket.resume();
2990
2903
  }
2991
2904
  /**
2992
2905
  * Send a data message.
@@ -3011,8 +2924,7 @@ var require_websocket = __commonJS({
3011
2924
  cb = options;
3012
2925
  options = {};
3013
2926
  }
3014
- if (typeof data === "number")
3015
- data = data.toString();
2927
+ if (typeof data === "number") data = data.toString();
3016
2928
  if (this.readyState !== _WebSocket.OPEN) {
3017
2929
  sendAfterClose(this, data, cb);
3018
2930
  return;
@@ -3035,8 +2947,7 @@ var require_websocket = __commonJS({
3035
2947
  * @public
3036
2948
  */
3037
2949
  terminate() {
3038
- if (this.readyState === _WebSocket.CLOSED)
3039
- return;
2950
+ if (this.readyState === _WebSocket.CLOSED) return;
3040
2951
  if (this.readyState === _WebSocket.CONNECTING) {
3041
2952
  const msg = "WebSocket was closed before the connection was established";
3042
2953
  abortHandshake(this, this._req, msg);
@@ -3096,8 +3007,7 @@ var require_websocket = __commonJS({
3096
3007
  enumerable: true,
3097
3008
  get() {
3098
3009
  for (const listener of this.listeners(method)) {
3099
- if (listener[kForOnEventAttribute])
3100
- return listener[kListener];
3010
+ if (listener[kForOnEventAttribute]) return listener[kListener];
3101
3011
  }
3102
3012
  return null;
3103
3013
  },
@@ -3108,8 +3018,7 @@ var require_websocket = __commonJS({
3108
3018
  break;
3109
3019
  }
3110
3020
  }
3111
- if (typeof handler !== "function")
3112
- return;
3021
+ if (typeof handler !== "function") return;
3113
3022
  this.addEventListener(method, handler, {
3114
3023
  [kForOnEventAttribute]: true
3115
3024
  });
@@ -3252,8 +3161,7 @@ var require_websocket = __commonJS({
3252
3161
  if (!isSameHost || websocket._originalSecure && !isSecure) {
3253
3162
  delete opts.headers.authorization;
3254
3163
  delete opts.headers.cookie;
3255
- if (!isSameHost)
3256
- delete opts.headers.host;
3164
+ if (!isSameHost) delete opts.headers.host;
3257
3165
  opts.auth = void 0;
3258
3166
  }
3259
3167
  }
@@ -3273,8 +3181,7 @@ var require_websocket = __commonJS({
3273
3181
  });
3274
3182
  }
3275
3183
  req.on("error", (err) => {
3276
- if (req === null || req[kAborted])
3277
- return;
3184
+ if (req === null || req[kAborted]) return;
3278
3185
  req = websocket._req = null;
3279
3186
  emitErrorAndClose(websocket, err);
3280
3187
  });
@@ -3306,8 +3213,7 @@ var require_websocket = __commonJS({
3306
3213
  });
3307
3214
  req.on("upgrade", (res, socket, head) => {
3308
3215
  websocket.emit("upgrade", res);
3309
- if (websocket.readyState !== WebSocket4.CONNECTING)
3310
- return;
3216
+ if (websocket.readyState !== WebSocket4.CONNECTING) return;
3311
3217
  req = websocket._req = null;
3312
3218
  const upgrade = res.headers.upgrade;
3313
3219
  if (upgrade === void 0 || upgrade.toLowerCase() !== "websocket") {
@@ -3334,8 +3240,7 @@ var require_websocket = __commonJS({
3334
3240
  abortHandshake(websocket, socket, protError);
3335
3241
  return;
3336
3242
  }
3337
- if (serverProt)
3338
- websocket._protocol = serverProt;
3243
+ if (serverProt) websocket._protocol = serverProt;
3339
3244
  const secWebSocketExtensions = res.headers["sec-websocket-extensions"];
3340
3245
  if (secWebSocketExtensions !== void 0) {
3341
3246
  if (!perMessageDeflate) {
@@ -3416,10 +3321,8 @@ var require_websocket = __commonJS({
3416
3321
  function sendAfterClose(websocket, data, cb) {
3417
3322
  if (data) {
3418
3323
  const length = isBlob(data) ? data.size : toBuffer(data).length;
3419
- if (websocket._socket)
3420
- websocket._sender._bufferedBytes += length;
3421
- else
3422
- websocket._bufferedAmount += length;
3324
+ if (websocket._socket) websocket._sender._bufferedBytes += length;
3325
+ else websocket._bufferedAmount += length;
3423
3326
  }
3424
3327
  if (cb) {
3425
3328
  const err = new Error(
@@ -3433,19 +3336,15 @@ var require_websocket = __commonJS({
3433
3336
  websocket._closeFrameReceived = true;
3434
3337
  websocket._closeMessage = reason;
3435
3338
  websocket._closeCode = code;
3436
- if (websocket._socket[kWebSocket] === void 0)
3437
- return;
3339
+ if (websocket._socket[kWebSocket] === void 0) return;
3438
3340
  websocket._socket.removeListener("data", socketOnData);
3439
3341
  process.nextTick(resume, websocket._socket);
3440
- if (code === 1005)
3441
- websocket.close();
3442
- else
3443
- websocket.close(code, reason);
3342
+ if (code === 1005) websocket.close();
3343
+ else websocket.close(code, reason);
3444
3344
  }
3445
3345
  function receiverOnDrain() {
3446
3346
  const websocket = this[kWebSocket];
3447
- if (!websocket.isPaused)
3448
- websocket._socket.resume();
3347
+ if (!websocket.isPaused) websocket._socket.resume();
3449
3348
  }
3450
3349
  function receiverOnError(err) {
3451
3350
  const websocket = this[kWebSocket];
@@ -3467,8 +3366,7 @@ var require_websocket = __commonJS({
3467
3366
  }
3468
3367
  function receiverOnPing(data) {
3469
3368
  const websocket = this[kWebSocket];
3470
- if (websocket._autoPong)
3471
- websocket.pong(data, !this._isServer, NOOP);
3369
+ if (websocket._autoPong) websocket.pong(data, !this._isServer, NOOP);
3472
3370
  websocket.emit("ping", data);
3473
3371
  }
3474
3372
  function receiverOnPong(data) {
@@ -3479,8 +3377,7 @@ var require_websocket = __commonJS({
3479
3377
  }
3480
3378
  function senderOnError(err) {
3481
3379
  const websocket = this[kWebSocket];
3482
- if (websocket.readyState === WebSocket4.CLOSED)
3483
- return;
3380
+ if (websocket.readyState === WebSocket4.CLOSED) return;
3484
3381
  if (websocket.readyState === WebSocket4.OPEN) {
3485
3382
  websocket._readyState = WebSocket4.CLOSING;
3486
3383
  setCloseTimer(websocket);
@@ -3553,17 +3450,14 @@ var require_subprotocol = __commonJS({
3553
3450
  for (i; i < header.length; i++) {
3554
3451
  const code = header.charCodeAt(i);
3555
3452
  if (end === -1 && tokenChars[code] === 1) {
3556
- if (start === -1)
3557
- start = i;
3453
+ if (start === -1) start = i;
3558
3454
  } else if (i !== 0 && (code === 32 || code === 9)) {
3559
- if (end === -1 && start !== -1)
3560
- end = i;
3455
+ if (end === -1 && start !== -1) end = i;
3561
3456
  } else if (code === 44) {
3562
3457
  if (start === -1) {
3563
3458
  throw new SyntaxError(`Unexpected character at index ${i}`);
3564
3459
  }
3565
- if (end === -1)
3566
- end = i;
3460
+ if (end === -1) end = i;
3567
3461
  const protocol2 = header.slice(start, end);
3568
3462
  if (protocols.has(protocol2)) {
3569
3463
  throw new SyntaxError(`The "${protocol2}" subprotocol is duplicated`);
@@ -3691,8 +3585,7 @@ var require_websocket_server = __commonJS({
3691
3585
  }
3692
3586
  });
3693
3587
  }
3694
- if (options.perMessageDeflate === true)
3695
- options.perMessageDeflate = {};
3588
+ if (options.perMessageDeflate === true) options.perMessageDeflate = {};
3696
3589
  if (options.clientTracking) {
3697
3590
  this.clients = /* @__PURE__ */ new Set();
3698
3591
  this._shouldEmitClose = false;
@@ -3713,8 +3606,7 @@ var require_websocket_server = __commonJS({
3713
3606
  if (this.options.noServer) {
3714
3607
  throw new Error('The server is operating in "noServer" mode');
3715
3608
  }
3716
- if (!this._server)
3717
- return null;
3609
+ if (!this._server) return null;
3718
3610
  return this._server.address();
3719
3611
  }
3720
3612
  /**
@@ -3734,10 +3626,8 @@ var require_websocket_server = __commonJS({
3734
3626
  process.nextTick(emitClose, this);
3735
3627
  return;
3736
3628
  }
3737
- if (cb)
3738
- this.once("close", cb);
3739
- if (this._state === CLOSING)
3740
- return;
3629
+ if (cb) this.once("close", cb);
3630
+ if (this._state === CLOSING) return;
3741
3631
  this._state = CLOSING;
3742
3632
  if (this.options.noServer || this.options.server) {
3743
3633
  if (this._server) {
@@ -3773,8 +3663,7 @@ var require_websocket_server = __commonJS({
3773
3663
  if (this.options.path) {
3774
3664
  const index = req.url.indexOf("?");
3775
3665
  const pathname = index !== -1 ? req.url.slice(0, index) : req.url;
3776
- if (pathname !== this.options.path)
3777
- return false;
3666
+ if (pathname !== this.options.path) return false;
3778
3667
  }
3779
3668
  return true;
3780
3669
  }
@@ -3870,8 +3759,7 @@ var require_websocket_server = __commonJS({
3870
3759
  });
3871
3760
  return;
3872
3761
  }
3873
- if (!this.options.verifyClient(info))
3874
- return abortHandshake(socket, 401);
3762
+ if (!this.options.verifyClient(info)) return abortHandshake(socket, 401);
3875
3763
  }
3876
3764
  this.completeUpgrade(extensions, key, protocols, req, socket, head, cb);
3877
3765
  }
@@ -3889,15 +3777,13 @@ var require_websocket_server = __commonJS({
3889
3777
  * @private
3890
3778
  */
3891
3779
  completeUpgrade(extensions, key, protocols, req, socket, head, cb) {
3892
- if (!socket.readable || !socket.writable)
3893
- return socket.destroy();
3780
+ if (!socket.readable || !socket.writable) return socket.destroy();
3894
3781
  if (socket[kWebSocket]) {
3895
3782
  throw new Error(
3896
3783
  "server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration"
3897
3784
  );
3898
3785
  }
3899
- if (this._state > RUNNING)
3900
- return abortHandshake(socket, 503);
3786
+ if (this._state > RUNNING) return abortHandshake(socket, 503);
3901
3787
  const digest = createHash("sha1").update(key + GUID).digest("base64");
3902
3788
  const headers = [
3903
3789
  "HTTP/1.1 101 Switching Protocols",
@@ -3943,8 +3829,7 @@ var require_websocket_server = __commonJS({
3943
3829
  };
3944
3830
  module.exports = WebSocketServer2;
3945
3831
  function addListeners(server, map) {
3946
- for (const event of Object.keys(map))
3947
- server.on(event, map[event]);
3832
+ for (const event of Object.keys(map)) server.on(event, map[event]);
3948
3833
  return function removeListeners() {
3949
3834
  for (const event of Object.keys(map)) {
3950
3835
  server.removeListener(event, map[event]);
@@ -4001,7 +3886,7 @@ var import_websocket = __toESM(require_websocket(), 1);
4001
3886
  var import_websocket_server = __toESM(require_websocket_server(), 1);
4002
3887
  var wrapper_default = import_websocket.default;
4003
3888
 
4004
- // ../../node_modules/.pnpm/isows@1.0.6_ws@8.18.0_bufferutil@4.0.9_utf-8-validate@5.0.10_/node_modules/isows/_esm/utils.js
3889
+ // ../../node_modules/.pnpm/isows@1.0.6_ws@8.18.0/node_modules/isows/_esm/utils.js
4005
3890
  function getNativeWebSocket() {
4006
3891
  if (typeof WebSocket !== "undefined")
4007
3892
  return WebSocket;
@@ -4014,7 +3899,7 @@ function getNativeWebSocket() {
4014
3899
  throw new Error("`WebSocket` is not supported in this environment");
4015
3900
  }
4016
3901
 
4017
- // ../../node_modules/.pnpm/isows@1.0.6_ws@8.18.0_bufferutil@4.0.9_utf-8-validate@5.0.10_/node_modules/isows/_esm/index.js
3902
+ // ../../node_modules/.pnpm/isows@1.0.6_ws@8.18.0/node_modules/isows/_esm/index.js
4018
3903
  var WebSocket3 = (() => {
4019
3904
  try {
4020
3905
  return getNativeWebSocket();
@@ -4027,4 +3912,4 @@ var WebSocket3 = (() => {
4027
3912
  export {
4028
3913
  WebSocket3 as WebSocket
4029
3914
  };
4030
- //# sourceMappingURL=_esm-RA774I7E.js.map
3915
+ //# sourceMappingURL=_esm-AN6HMJZC.js.map