@vindral/web-sdk 4.1.1-6-g237cdbd9 → 4.1.1-8-g682454b9

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.
@@ -152,7 +152,7 @@ class vd {
152
152
  }
153
153
  const L = () => {
154
154
  };
155
- class W {
155
+ class z {
156
156
  constructor() {
157
157
  /**
158
158
  * A promise that resolves when the deferred value is resolved
@@ -183,11 +183,11 @@ class W {
183
183
  }), this.promise.catch(L);
184
184
  }
185
185
  static resolved(e) {
186
- const t = new W();
186
+ const t = new z();
187
187
  return t.resolve(e), t;
188
188
  }
189
189
  static fromPromise(e) {
190
- const t = new W();
190
+ const t = new z();
191
191
  return t.promise = e, e.then(
192
192
  (i) => {
193
193
  t.pending = !1, t.resolved = i;
@@ -229,7 +229,7 @@ class Oc {
229
229
  /// The internal queue
230
230
  u(this, Ut);
231
231
  /// Slows down push when the queue is full
232
- u(this, Ws, new W());
232
+ u(this, Ws, new z());
233
233
  /// Slows down pop when the queue is empty
234
234
  u(this, Ye);
235
235
  /// The channel is closed
@@ -250,7 +250,7 @@ class Oc {
250
250
  push(e) {
251
251
  return m(this, null, function* () {
252
252
  var t;
253
- a(this, Ut).isFull() && (yield a(this, Ws).promise), a(this, Ut).push(e), (t = a(this, Ye)) == null || t.resolve(), l(this, Ye, new W());
253
+ a(this, Ut).isFull() && (yield a(this, Ws).promise), a(this, Ut).push(e), (t = a(this, Ye)) == null || t.resolve(), l(this, Ye, new z());
254
254
  });
255
255
  }
256
256
  pop() {
@@ -259,8 +259,8 @@ class Oc {
259
259
  for (; !(a(this, xr) && a(this, Ut).isEmpty()); ) {
260
260
  const t = a(this, Ut).pop();
261
261
  if (t)
262
- return a(this, Ws).resolve(), l(this, Ws, new W()), t;
263
- a(this, Ye) || l(this, Ye, new W()), yield (e = a(this, Ye)) == null ? void 0 : e.promise;
262
+ return a(this, Ws).resolve(), l(this, Ws, new z()), t;
263
+ a(this, Ye) || l(this, Ye, new z()), yield (e = a(this, Ye)) == null ? void 0 : e.promise;
264
264
  }
265
265
  });
266
266
  }
@@ -368,7 +368,7 @@ const mm = new RegExp(
368
368
  }, Am = () => Ie.indexOf("CrKey") !== -1, vu = () => navigator.platform === "MacIntel" && navigator.maxTouchPoints === 0, Mc = () => navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1, wm = () => Ie.indexOf("iphone") >= 0 && Ie.indexOf("like iphone") < 0 || Ie.indexOf("ipad") >= 0 && Ie.indexOf("like ipad") < 0 || Ie.indexOf("ipod") >= 0 && Ie.indexOf("like ipod") < 0 || Mc(), bm = () => {
369
369
  var s, e;
370
370
  return Mc() ? !1 : (e = (s = Br()) == null ? void 0 : s.isTypeSupported('audio/mp4; codecs="opus"')) != null ? e : !1;
371
- }, tw = () => "ontouchstart" in window || navigator.maxTouchPoints > 0, ym = () => /^(?!.*chrome).*safari/i.test(Ie);
371
+ }, nw = () => "ontouchstart" in window || navigator.maxTouchPoints > 0, ym = () => /^(?!.*chrome).*safari/i.test(Ie);
372
372
  function vm() {
373
373
  var s, e;
374
374
  if (/(iPhone|iPod|iPad)/i.test(Ie))
@@ -494,6 +494,10 @@ class Em {
494
494
  writeUint32(e) {
495
495
  this.writeAndMove(e, 4);
496
496
  }
497
+ writeUint64(e) {
498
+ const t = Math.floor(e / 4294967296), i = (e & 4294967295) >>> 0;
499
+ this.writeUint32(t), this.writeUint32(i);
500
+ }
497
501
  writeUint32At(e, t) {
498
502
  this.view.setUint32(e, t);
499
503
  }
@@ -710,7 +714,7 @@ var Di, Oi;
710
714
  class Bm {
711
715
  constructor(e) {
712
716
  u(this, Di);
713
- u(this, Oi, new W());
717
+ u(this, Oi, new z());
714
718
  l(this, Di, e), a(this, Oi).resolve(e);
715
719
  }
716
720
  unsafeValue() {
@@ -721,7 +725,7 @@ class Bm {
721
725
  }
722
726
  lock() {
723
727
  return m(this, null, function* () {
724
- const e = new W();
728
+ const e = new z();
725
729
  e.promise.then((i) => {
726
730
  l(this, Di, i);
727
731
  }).catch(L);
@@ -736,7 +740,7 @@ class ke {
736
740
  constructor(e) {
737
741
  u(this, Ge);
738
742
  u(this, Ke);
739
- l(this, Ge, e), l(this, Ke, new W());
743
+ l(this, Ge, e), l(this, Ke, new z());
740
744
  }
741
745
  isClosed() {
742
746
  var e;
@@ -759,7 +763,7 @@ class ke {
759
763
  var t;
760
764
  if (!((t = a(this, Ke)) != null && t.pending))
761
765
  throw new Error("ObservableValue is closed");
762
- l(this, Ge, e instanceof Function ? e(a(this, Ge)) : e), a(this, Ke).resolve(a(this, Ge)), l(this, Ke, new W());
766
+ l(this, Ge, e instanceof Function ? e(a(this, Ge)) : e), a(this, Ke).resolve(a(this, Ge)), l(this, Ke, new z());
763
767
  }
764
768
  close() {
765
769
  var e;
@@ -1236,7 +1240,7 @@ class xd {
1236
1240
  u(this, V);
1237
1241
  u(this, _i);
1238
1242
  u(this, xt);
1239
- u(this, et, new W());
1243
+ u(this, et, new z());
1240
1244
  u(this, Xs, {});
1241
1245
  u(this, Qs, {});
1242
1246
  u(this, de);
@@ -1328,7 +1332,7 @@ class xd {
1328
1332
  isFatal: !0
1329
1333
  }), window.clearTimeout(a(this, Zs));
1330
1334
  const e = a(this, et).resolved;
1331
- l(this, et, new W()), l(this, Zs, window.setTimeout(() => {
1335
+ l(this, et, new z()), l(this, Zs, window.setTimeout(() => {
1332
1336
  a(this, et).resolve(e);
1333
1337
  }, bf));
1334
1338
  }
@@ -2092,6 +2096,10 @@ const Os = class Os {
2092
2096
  r(this, "mediaTime");
2093
2097
  this.ntpTimestamp = e, this.mediaTime = t;
2094
2098
  }
2099
+ date() {
2100
+ const [e, t] = this.ntpTimestamp, i = e * 1e3 + t / 2 ** 32 * 1e3, n = new Date(Date.UTC(1900, 0, 1, 0, 0, 0));
2101
+ return new Date(n.getTime() + i);
2102
+ }
2095
2103
  static decodeData(e) {
2096
2104
  const { version: t } = vi(e);
2097
2105
  e.readUint32();
@@ -2238,10 +2246,8 @@ const cd = class cd {
2238
2246
  t.setUint32(a(this, X).moof.traf.tfdt.byteOffset - a(this, Ee).byteOffset, e);
2239
2247
  }
2240
2248
  producerReferenceTime() {
2241
- if (!a(this, X).prft)
2242
- return;
2243
- const [e, t] = a(this, X).prft.ntpTimestamp, i = e * 1e3 + t / 2 ** 32 * 1e3, n = new Date(Date.UTC(1900, 0, 1, 0, 0, 0));
2244
- return new Date(n.getTime() + i);
2249
+ if (a(this, X).prft)
2250
+ return a(this, X).prft.date();
2245
2251
  }
2246
2252
  duration() {
2247
2253
  var e;
@@ -2346,7 +2352,7 @@ function C(s) {
2346
2352
  t[i] = s.charCodeAt(i);
2347
2353
  return new Uint8Array(e);
2348
2354
  }
2349
- const z = {
2355
+ const G = {
2350
2356
  ftyp: C("ftyp"),
2351
2357
  mvhd: C("mvhd"),
2352
2358
  moov: C("moov"),
@@ -2422,16 +2428,20 @@ class Vu {
2422
2428
  }
2423
2429
  const se = (s, e, t) => {
2424
2430
  s.writer.writeUint32(t + 8), s.writer.writeBytes(e);
2425
- }, oe = (s, e, t, i, n) => {
2431
+ }, re = (s, e, t, i, n) => {
2426
2432
  se(s, e, t + 4), s.writer.writeUint8(i), s.writer.writeUint24(n);
2427
2433
  }, Xc = (s, e) => {
2428
2434
  se(
2429
2435
  s,
2430
- z.ftyp,
2436
+ G.ftyp,
2431
2437
  Ur.byteLength + Od.byteLength + e.reduce((t, i) => t + i.byteLength, 0)
2432
2438
  ), s.writer.writeBytes(Ur), s.writer.writeBytes(Od), e.forEach((t) => s.writer.writeBytes(t));
2433
- }, zf = (s, e, t) => {
2434
- oe(s, z.mvhd, 96, 0, 0), s.writer.writeUint32(0), s.writer.writeUint32(0), s.writer.writeUint32(t), s.writer.writeUint32(e), s.writer.writeUint32(65536), s.writer.writeUint16(256), s.writer.writeBytes(new Uint8Array([
2439
+ }, zf = Math.pow(2, 32), Hf = 2208988800, Xf = (s, e, t, i) => {
2440
+ re(s, G.prft, 20, 1, 0);
2441
+ const o = t / 1e3, c = Math.floor(o), d = (o - c) * 1e3 * 1e3 * zf / 1e6;
2442
+ s.writer.writeUint32(e), s.writer.writeUint32(c + Hf), s.writer.writeUint32(d), s.writer.writeUint64(i);
2443
+ }, Qf = (s, e, t) => {
2444
+ re(s, G.mvhd, 96, 0, 0), s.writer.writeUint32(0), s.writer.writeUint32(0), s.writer.writeUint32(t), s.writer.writeUint32(e), s.writer.writeUint32(65536), s.writer.writeUint16(256), s.writer.writeBytes(new Uint8Array([
2435
2445
  // reserved and unused junk
2436
2446
  0,
2437
2447
  0,
@@ -2504,9 +2514,9 @@ const se = (s, e, t) => {
2504
2514
  0,
2505
2515
  0
2506
2516
  ])), s.writer.writeUint32(2);
2507
- }, Gu = (s) => "sequenceParameterSets" in s, mh = (s) => "sequenceHeader" in s, ws = (s) => s.type == "video", or = (s) => s.type == "audio", Hf = (s, e, t) => {
2517
+ }, Gu = (s) => "sequenceParameterSets" in s, mh = (s) => "sequenceHeader" in s, ws = (s) => s.type == "video", or = (s) => s.type == "audio", Zf = (s, e, t) => {
2508
2518
  const i = s.writer.position();
2509
- oe(s, z.tkhd, 0, 0, 3), s.writer.writeUint32(0), s.writer.writeUint32(0), s.writer.writeUint32(e.trackId), s.writer.writeUint32(0), s.writer.writeUint32(e.duration * t / e.timescale), s.writer.writeUint32(0), s.writer.writeUint32(0), s.writer.writeUint16(0), s.writer.writeUint16(or(e) ? 1 : 0), s.writer.writeUint16(or(e) ? 256 : 0), s.writer.writeUint16(0), s.writer.writeBytes(new Uint8Array(
2519
+ re(s, G.tkhd, 0, 0, 3), s.writer.writeUint32(0), s.writer.writeUint32(0), s.writer.writeUint32(e.trackId), s.writer.writeUint32(0), s.writer.writeUint32(e.duration * t / e.timescale), s.writer.writeUint32(0), s.writer.writeUint32(0), s.writer.writeUint16(0), s.writer.writeUint16(or(e) ? 1 : 0), s.writer.writeUint16(or(e) ? 256 : 0), s.writer.writeUint16(0), s.writer.writeBytes(new Uint8Array(
2510
2520
  [
2511
2521
  0,
2512
2522
  1,
@@ -2546,45 +2556,45 @@ const se = (s, e, t) => {
2546
2556
  0
2547
2557
  ]
2548
2558
  )), ws(e) ? (s.writer.writeUint32(e.width * 65536), s.writer.writeUint32(e.height * 65536)) : or(e) && (s.writer.writeUint32(0), s.writer.writeUint32(0)), s.writer.writeUint32At(i, s.writer.position() - i);
2549
- }, Xf = (s, e) => {
2550
- oe(s, z.mdhd, 20, 0, 0), s.writer.writeUint32(0), s.writer.writeUint32(0), s.writer.writeUint32(e.timescale), s.writer.writeUint32(e.duration);
2559
+ }, qf = (s, e) => {
2560
+ re(s, G.mdhd, 20, 0, 0), s.writer.writeUint32(0), s.writer.writeUint32(0), s.writer.writeUint32(e.timescale), s.writer.writeUint32(e.duration);
2551
2561
  const t = e.lang || "und", i = (t.charCodeAt(0) & 31) << 10 | (t.charCodeAt(1) & 31) << 5 | t.charCodeAt(2) & 31;
2552
2562
  s.writer.writeUint16(i), s.writer.writeUint16(0);
2553
- }, Qf = (s, e) => {
2563
+ }, $f = (s, e) => {
2554
2564
  const t = s.writer.position();
2555
- oe(s, z.hdlr, 0, 0, 0), s.writer.writeUint32(0), s.writer.writeBytes(C(ws(e) ? "vide" : "soun")), s.writer.writeUint32(0), s.writer.writeUint32(0), s.writer.writeUint32(0), s.writer.writeBytes(C(ws(e) ? "VideoHandler\0" : "SoundHandler\0")), s.writer.writeUint32At(t, s.writer.position() - t);
2556
- }, Zf = (s) => {
2565
+ re(s, G.hdlr, 0, 0, 0), s.writer.writeUint32(0), s.writer.writeBytes(C(ws(e) ? "vide" : "soun")), s.writer.writeUint32(0), s.writer.writeUint32(0), s.writer.writeUint32(0), s.writer.writeBytes(C(ws(e) ? "VideoHandler\0" : "SoundHandler\0")), s.writer.writeUint32At(t, s.writer.position() - t);
2566
+ }, Yf = (s) => {
2557
2567
  const e = s.writer.position();
2558
- se(s, z.dinf, 0), oe(s, z.dref, 16, 0, 0), s.writer.writeUint32(1), oe(s, C("url "), 0, 0, 1), s.writer.writeUint32At(e, s.writer.position() - e);
2559
- }, qf = (s, e) => {
2568
+ se(s, G.dinf, 0), re(s, G.dref, 16, 0, 0), s.writer.writeUint32(1), re(s, C("url "), 0, 0, 1), s.writer.writeUint32At(e, s.writer.position() - e);
2569
+ }, Jf = (s, e) => {
2560
2570
  const t = s.writer.position();
2561
- se(s, z.avcC, 0), s.writer.writeUint8(1), s.writer.writeUint8(e.sequenceParameterSets[0][1]), s.writer.writeUint8(e.sequenceParameterSets[0][2]), s.writer.writeUint8(e.sequenceParameterSets[0][3]), s.writer.writeUint8(255), s.writer.writeUint8(224 | e.sequenceParameterSets.length), e.sequenceParameterSets.forEach((i) => {
2571
+ se(s, G.avcC, 0), s.writer.writeUint8(1), s.writer.writeUint8(e.sequenceParameterSets[0][1]), s.writer.writeUint8(e.sequenceParameterSets[0][2]), s.writer.writeUint8(e.sequenceParameterSets[0][3]), s.writer.writeUint8(255), s.writer.writeUint8(224 | e.sequenceParameterSets.length), e.sequenceParameterSets.forEach((i) => {
2562
2572
  s.writer.writeUint16(i.byteLength), s.writer.writeBytes(i);
2563
2573
  }), s.writer.writeUint8(e.pictureParameterSets.length), e.pictureParameterSets.forEach((i) => {
2564
2574
  s.writer.writeUint16(i.byteLength), s.writer.writeBytes(i);
2565
2575
  }), s.writer.writeUint32At(t, s.writer.position() - t);
2566
- }, $f = (s, e) => {
2576
+ }, Kf = (s, e) => {
2567
2577
  var h, d;
2568
2578
  const t = s.writer.position();
2569
- se(s, z.av1C, 0);
2579
+ se(s, G.av1C, 0);
2570
2580
  const { seqProfile: i, operatingPoints: n, colorConfig: o } = e.parsedSequenceHeader, c = n[0];
2571
2581
  s.writer.writeUint8(129), s.writer.writeUint8(i << 5 | ((h = c == null ? void 0 : c.seqLevelIdx) != null ? h : 0)), s.writer.writeUint8(
2572
2582
  ((d = c == null ? void 0 : c.tier) != null ? d : 0) | (o.highBitDepth ? 1 : 0) | (o.bitDepth === 12 ? 1 : 0) << 5 | (o.monoChrome ? 1 : 0) << 4 | o.subsamplingX << 3 | o.subsamplingY << 2 | o.chromaSamplePosition & 65535
2573
2583
  ), s.writer.writeUint8(0), s.writer.writeBytes(e.sequenceHeader), s.writer.writeUint32At(t, s.writer.position() - t);
2574
- }, Yf = (s, e) => {
2575
- const t = s.writer.position(), i = mh(e) ? z.av01 : z.avc1;
2576
- se(s, i, 0), s.writer.writeUint32(0), s.writer.writeUint16(0), s.writer.writeUint16(1), s.writer.writeUint16(0), s.writer.writeUint16(0), s.writer.writeUint32(0), s.writer.writeUint32(0), s.writer.writeUint32(0), s.writer.writeUint16(e.width), s.writer.writeUint16(e.height), s.writer.writeUint32(4718592), s.writer.writeUint32(4718592), s.writer.writeUint32(0), s.writer.writeUint16(1), s.writer.writeUint8(0), s.writer.writeBytes(new Uint8Array(31)), s.writer.writeUint16(24), s.writer.writeUint16(-1), Gu(e) ? qf(s, e) : mh(e) && ($f(s, e), e.parsedSequenceHeader.colorConfig && (se(s, C("colr"), 11), s.writer.writeBytes(z.nclx), s.writer.writeUint16(e.parsedSequenceHeader.colorConfig.colorPrimaries), s.writer.writeUint16(e.parsedSequenceHeader.colorConfig.transferCharacteristics), s.writer.writeUint16(e.parsedSequenceHeader.colorConfig.matrixCoefficients), s.writer.writeUint8(e.parsedSequenceHeader.colorConfig.colorRange ? 1 : 0))), e.pixelAspectRatio && (se(s, C("pasp"), 8), s.writer.writeUint32(e.pixelAspectRatio.numerator), s.writer.writeUint32(e.pixelAspectRatio.denumerator)), e.bitrate && (se(s, C("btrt"), 12), s.writer.writeUint32(0), s.writer.writeUint32(e.bitrate), s.writer.writeUint32(e.bitrate)), s.writer.writeUint32At(t, s.writer.position() - t);
2584
+ }, ep = (s, e) => {
2585
+ const t = s.writer.position(), i = mh(e) ? G.av01 : G.avc1;
2586
+ se(s, i, 0), s.writer.writeUint32(0), s.writer.writeUint16(0), s.writer.writeUint16(1), s.writer.writeUint16(0), s.writer.writeUint16(0), s.writer.writeUint32(0), s.writer.writeUint32(0), s.writer.writeUint32(0), s.writer.writeUint16(e.width), s.writer.writeUint16(e.height), s.writer.writeUint32(4718592), s.writer.writeUint32(4718592), s.writer.writeUint32(0), s.writer.writeUint16(1), s.writer.writeUint8(0), s.writer.writeBytes(new Uint8Array(31)), s.writer.writeUint16(24), s.writer.writeUint16(-1), Gu(e) ? Jf(s, e) : mh(e) && (Kf(s, e), e.parsedSequenceHeader.colorConfig && (se(s, C("colr"), 11), s.writer.writeBytes(G.nclx), s.writer.writeUint16(e.parsedSequenceHeader.colorConfig.colorPrimaries), s.writer.writeUint16(e.parsedSequenceHeader.colorConfig.transferCharacteristics), s.writer.writeUint16(e.parsedSequenceHeader.colorConfig.matrixCoefficients), s.writer.writeUint8(e.parsedSequenceHeader.colorConfig.colorRange ? 1 : 0))), e.pixelAspectRatio && (se(s, C("pasp"), 8), s.writer.writeUint32(e.pixelAspectRatio.numerator), s.writer.writeUint32(e.pixelAspectRatio.denumerator)), e.bitrate && (se(s, C("btrt"), 12), s.writer.writeUint32(0), s.writer.writeUint32(e.bitrate), s.writer.writeUint32(e.bitrate)), s.writer.writeUint32At(t, s.writer.position() - t);
2577
2587
  }, Ja = (s, e, t) => {
2578
2588
  let i = 3;
2579
2589
  for (s.writer.writeUint8(e); i > 0; i--)
2580
2590
  s.writer.writeUint8(t >> 7 * i | 128);
2581
2591
  s.writer.writeUint8(t & 127);
2582
- }, Jf = (s, e) => {
2592
+ }, tp = (s, e) => {
2583
2593
  const t = e.decoderConfig.byteLength > 0 ? e.decoderConfig.byteLength + 5 : 0, i = s.writer.position();
2584
- oe(s, z.esds, 0, 0, 0), Ja(s, 3, 21 + t + 5 + 1), s.writer.writeUint16(e.trackId), s.writer.writeUint8(0), Ja(s, 4, 13 + t);
2594
+ re(s, G.esds, 0, 0, 0), Ja(s, 3, 21 + t + 5 + 1), s.writer.writeUint16(e.trackId), s.writer.writeUint8(0), Ja(s, 4, 13 + t);
2585
2595
  const n = e.codec === "mp3" && e.sampleRate > 24e3 ? 107 : 64;
2586
2596
  s.writer.writeUint8(n), s.writer.writeUint8(21), s.writer.writeUint24(0), s.writer.writeUint32(e.bitrate || 0), s.writer.writeUint32(e.bitrate || 0), e.decoderConfig.byteLength > 0 && (Ja(s, 5, e.decoderConfig.byteLength), s.writer.writeBytes(e.decoderConfig)), Ja(s, 6, 1), s.writer.writeUint8(2), s.writer.writeUint32At(i, s.writer.position() - i);
2587
- }, Kf = (s) => {
2597
+ }, ip = (s) => {
2588
2598
  switch (s) {
2589
2599
  case "aac":
2590
2600
  case "mp3":
@@ -2592,84 +2602,85 @@ const se = (s, e, t) => {
2592
2602
  case "opus":
2593
2603
  return "Opus";
2594
2604
  }
2595
- }, ep = (s, e) => {
2605
+ }, sp = (s, e) => {
2596
2606
  const t = s.writer.position();
2597
2607
  se(s, C("dOps"), 0), s.writer.writeUint8(0);
2598
2608
  const i = e.decoderConfig, n = new DataView(i.buffer, i.byteOffset, i.byteLength);
2599
2609
  s.writer.writeUint8(n.getUint8(9)), s.writer.writeUint16(n.getUint16(10, !0)), s.writer.writeUint32(n.getUint32(12, !0)), s.writer.writeUint16(n.getUint16(16, !0)), s.writer.writeBytes(e.decoderConfig.slice(18)), s.writer.writeUint32At(t, s.writer.position() - t);
2600
- }, tp = (s, e) => {
2610
+ }, np = (s, e) => {
2601
2611
  const t = s.writer.position();
2602
- switch (se(s, C(Kf(e.codec)), 0), s.writer.writeUint32(0), s.writer.writeUint16(0), s.writer.writeUint16(1), s.writer.writeUint16(0), s.writer.writeUint16(0), s.writer.writeUint32(0), s.writer.writeUint16(e.channelCount), s.writer.writeUint16(16), s.writer.writeUint32(0), s.writer.writeUint16(e.sampleRate), s.writer.writeUint16(0), e.codec) {
2612
+ switch (se(s, C(ip(e.codec)), 0), s.writer.writeUint32(0), s.writer.writeUint16(0), s.writer.writeUint16(1), s.writer.writeUint16(0), s.writer.writeUint16(0), s.writer.writeUint32(0), s.writer.writeUint16(e.channelCount), s.writer.writeUint16(16), s.writer.writeUint32(0), s.writer.writeUint16(e.sampleRate), s.writer.writeUint16(0), e.codec) {
2603
2613
  case "aac":
2604
2614
  case "mp3":
2605
- Jf(s, e);
2615
+ tp(s, e);
2606
2616
  break;
2607
2617
  case "opus":
2608
- ep(s, e);
2618
+ sp(s, e);
2609
2619
  break;
2610
2620
  }
2611
2621
  e.bitrate && (se(s, C("btrt"), 12), s.writer.writeUint32(0), s.writer.writeUint32(e.bitrate), s.writer.writeUint32(e.bitrate)), s.writer.writeUint32At(t, s.writer.position() - t);
2612
- }, ip = (s, e) => {
2622
+ }, rp = (s, e) => {
2613
2623
  const t = s.writer.position();
2614
- se(s, z.stbl, 0);
2624
+ se(s, G.stbl, 0);
2615
2625
  const i = s.writer.position();
2616
- oe(s, z.stsd, 0, 0, 0), s.writer.writeUint32(1), ws(e) ? Yf(s, e) : or(e) && tp(s, e), s.writer.writeUint32At(i, s.writer.position() - i), oe(s, C("stts"), 4, 0, 0), s.writer.writeUint32(0), oe(s, C("stsc"), 4, 0, 0), s.writer.writeUint32(0), oe(s, C("stsz"), 8, 0, 0), s.writer.writeUint32(0), s.writer.writeUint32(0), oe(s, C("stco"), 4, 0, 0), s.writer.writeUint32(0), s.writer.writeUint32At(t, s.writer.position() - t);
2617
- }, sp = (s, e) => {
2626
+ re(s, G.stsd, 0, 0, 0), s.writer.writeUint32(1), ws(e) ? ep(s, e) : or(e) && np(s, e), s.writer.writeUint32At(i, s.writer.position() - i), re(s, C("stts"), 4, 0, 0), s.writer.writeUint32(0), re(s, C("stsc"), 4, 0, 0), s.writer.writeUint32(0), re(s, C("stsz"), 8, 0, 0), s.writer.writeUint32(0), s.writer.writeUint32(0), re(s, C("stco"), 4, 0, 0), s.writer.writeUint32(0), s.writer.writeUint32At(t, s.writer.position() - t);
2627
+ }, ap = (s, e) => {
2618
2628
  const t = s.writer.position();
2619
- se(s, z.minf, 0), ws(e) ? (oe(s, z.vmhd, 8, 0, 1), s.writer.writeUint32(0), s.writer.writeUint32(0)) : or(e) && (oe(s, z.smhd, 4, 0, 0), s.writer.writeUint16(0), s.writer.writeUint16(0)), Zf(s), ip(s, e), s.writer.writeUint32At(t, s.writer.position() - t);
2620
- }, np = (s, e) => {
2629
+ se(s, G.minf, 0), ws(e) ? (re(s, G.vmhd, 8, 0, 1), s.writer.writeUint32(0), s.writer.writeUint32(0)) : or(e) && (re(s, G.smhd, 4, 0, 0), s.writer.writeUint16(0), s.writer.writeUint16(0)), Yf(s), rp(s, e), s.writer.writeUint32At(t, s.writer.position() - t);
2630
+ }, op = (s, e) => {
2621
2631
  const t = s.writer.position();
2622
- se(s, z.mdia, 0), Xf(s, e), Qf(s, e), sp(s, e), s.writer.writeUint32At(t, s.writer.position() - t);
2623
- }, rp = (s, e, t) => {
2632
+ se(s, G.mdia, 0), qf(s, e), $f(s, e), ap(s, e), s.writer.writeUint32At(t, s.writer.position() - t);
2633
+ }, cp = (s, e, t) => {
2624
2634
  const i = s.writer.position();
2625
- se(s, z.trak, 0), Hf(s, e, t), np(s, e), s.writer.writeUint32At(i, s.writer.position() - i);
2626
- }, ap = (s, e) => {
2627
- oe(s, z.trex, 20, 0, 0), s.writer.writeUint32(e.trackId), s.writer.writeUint32(1), s.writer.writeUint32(0), s.writer.writeUint32(0), s.writer.writeUint32(0);
2628
- }, op = (s, e) => {
2635
+ se(s, G.trak, 0), Zf(s, e, t), op(s, e), s.writer.writeUint32At(i, s.writer.position() - i);
2636
+ }, hp = (s, e) => {
2637
+ re(s, G.trex, 20, 0, 0), s.writer.writeUint32(e.trackId), s.writer.writeUint32(1), s.writer.writeUint32(0), s.writer.writeUint32(0), s.writer.writeUint32(0);
2638
+ }, dp = (s, e) => {
2629
2639
  const t = s.writer.position();
2630
- se(s, z.mvex, 0), e.forEach((i) => ap(s, i)), s.writer.writeUint32At(t, s.writer.position() - t);
2631
- }, cp = (s, e, t, i) => {
2640
+ se(s, G.mvex, 0), e.forEach((i) => hp(s, i)), s.writer.writeUint32At(t, s.writer.position() - t);
2641
+ }, up = (s, e, t, i) => {
2632
2642
  const n = s.writer.position();
2633
- se(s, z.moov, 0), zf(s, 0, t), e.forEach((o) => rp(s, o, t)), op(s, e), s.writer.writeUint32At(n, s.writer.position() - n);
2634
- }, hp = (s, e) => {
2643
+ se(s, G.moov, 0), Qf(s, 0, t), e.forEach((o) => cp(s, o, t)), dp(s, e), s.writer.writeUint32At(n, s.writer.position() - n);
2644
+ }, lp = (s, e) => {
2635
2645
  const t = s.writer.position();
2636
- oe(s, z.tfhd, 16, 0, 56), s.writer.writeUint32(e.trackId), s.writer.writeUint32(e.defaultDuration || 0), s.writer.writeUint32(e.defaultSize || 0), s.writer.writeUint32(e.defaultFlags || 0), s.writer.writeUint32At(t, s.writer.position() - t);
2637
- }, dp = (s, e) => {
2646
+ re(s, G.tfhd, 16, 0, 56), s.writer.writeUint32(e.trackId), s.writer.writeUint32(e.defaultDuration || 0), s.writer.writeUint32(e.defaultSize || 0), s.writer.writeUint32(e.defaultFlags || 0), s.writer.writeUint32At(t, s.writer.position() - t);
2647
+ }, mp = (s, e) => {
2638
2648
  const t = s.writer.position();
2639
- oe(s, z.tfdt, 8, 1, 0);
2649
+ re(s, G.tfdt, 8, 1, 0);
2640
2650
  const i = Math.floor(e.timestamp / 4294967296), n = (e.timestamp & 4294967295) >>> 0;
2641
2651
  s.writer.writeUint32(i), s.writer.writeUint32(n), s.writer.writeUint32At(t, s.writer.position() - t);
2642
- }, up = (s, e) => {
2652
+ }, fp = (s, e) => {
2643
2653
  if (!e.samples[0])
2644
2654
  throw new Error("At least one sample must be provided");
2645
2655
  const t = e.samples.some((d) => !!d.compositionTimeOffset), i = Qc(e.samples[0]) !== e.defaultFlags, n = e.samples.length > 1;
2646
2656
  let o = 1;
2647
2657
  i && (o |= 4), t && (o |= 2048), n && (o |= 512, o |= 256, o |= 1024);
2648
2658
  const c = s.writer.position();
2649
- oe(s, z.trun, 16, 1, o), s.writer.writeUint32(e.samples.length);
2659
+ re(s, G.trun, 16, 1, o), s.writer.writeUint32(e.samples.length);
2650
2660
  const h = s.writer.position();
2651
2661
  s.writer.writeUint32(0), i && s.writer.writeUint32(Qc(e.samples[0]));
2652
2662
  for (const d of e.samples)
2653
2663
  n && (s.writer.writeUint32(d.duration), s.writer.writeUint32(d.data.byteLength), s.writer.writeUint32(Qc(d))), t && s.writer.writeUint32(d.compositionTimeOffset || 0);
2654
2664
  s.writer.writeUint32At(h, s.writer.position() + 8), s.writer.writeUint32At(c, s.writer.position() - c);
2655
- }, Qc = (s) => s.isSync ? 33554432 : 16842752, lp = (s, e) => {
2665
+ }, Qc = (s) => s.isSync ? 33554432 : 16842752, pp = (s, e) => {
2656
2666
  const t = s.writer.position();
2657
- se(s, z.traf, 0), hp(s, e), dp(s, e), up(s, e), s.writer.writeUint32At(t, s.writer.position() - t);
2658
- }, mp = (s, e) => {
2659
- oe(s, z.mfhd, 4, 0, 0), s.writer.writeUint32(e);
2660
- }, fp = (s, e) => {
2667
+ se(s, G.traf, 0), lp(s, e), mp(s, e), fp(s, e), s.writer.writeUint32At(t, s.writer.position() - t);
2668
+ }, gp = (s, e) => {
2669
+ re(s, G.mfhd, 4, 0, 0), s.writer.writeUint32(e);
2670
+ }, Ap = (s, e) => {
2661
2671
  const t = s.writer.position();
2662
- se(s, z.moof, 0), mp(s, e.sequenceNumber), lp(s, e), s.writer.writeUint32At(t, s.writer.position() - t);
2663
- }, pp = (s, e) => {
2672
+ se(s, G.moof, 0), gp(s, e.sequenceNumber), pp(s, e), s.writer.writeUint32At(t, s.writer.position() - t);
2673
+ }, wp = (s, e) => {
2664
2674
  const t = e.samples.reduce((i, n) => i + n.data.byteLength, 0);
2665
- se(s, z.mdat, t), e.samples.forEach((i) => s.writer.writeBytes(i.data));
2675
+ se(s, G.mdat, t), e.samples.forEach((i) => s.writer.writeBytes(i.data));
2666
2676
  }, _c = (s, e) => {
2667
2677
  const t = new Vu(), i = s.filter((o) => ws(o) && Gu(o)).length > 0;
2668
- return s.filter((o) => ws(o) && mh(o)).length > 0 ? Xc(t, jf) : i ? Xc(t, Gf) : Xc(t, Wf), cp(t, s, Vf), t.writer.buffer();
2678
+ return s.filter((o) => ws(o) && mh(o)).length > 0 ? Xc(t, jf) : i ? Xc(t, Gf) : Xc(t, Wf), up(t, s, Vf), t.writer.buffer();
2669
2679
  }, Nc = (s) => {
2680
+ var t;
2670
2681
  const e = new Vu();
2671
- return fp(e, s), pp(e, s), e.writer.buffer();
2672
- }, gp = (s, e) => {
2682
+ return ((t = s.samples[0]) == null ? void 0 : t.producerReferenceTime) !== void 0 && Xf(e, s.trackId, s.samples[0].producerReferenceTime, s.timestamp), Ap(e, s), wp(e, s), e.writer.buffer();
2683
+ }, bp = (s, e) => {
2673
2684
  const t = s.map((c) => F(v({}, c), {
2674
2685
  data: new Uint8Array(c.data)
2675
2686
  }));
@@ -2685,7 +2696,7 @@ const se = (s, e, t) => {
2685
2696
  defaultDuration: o,
2686
2697
  samples: t
2687
2698
  });
2688
- }, Ap = (s, e, t, i) => _c([
2699
+ }, yp = (s, e, t, i) => _c([
2689
2700
  {
2690
2701
  type: "audio",
2691
2702
  codec: "aac",
@@ -2701,7 +2712,7 @@ const se = (s, e, t) => {
2701
2712
  if (!i || !n)
2702
2713
  throw new Error("No sps or pps provided");
2703
2714
  return Cf(i);
2704
- }, wp = (s, e) => {
2715
+ }, vp = (s, e) => {
2705
2716
  const t = s.map((h) => F(v({}, h), {
2706
2717
  data: new Uint8Array(h.data)
2707
2718
  }));
@@ -2717,7 +2728,7 @@ const se = (s, e, t) => {
2717
2728
  defaultDuration: c,
2718
2729
  samples: t
2719
2730
  });
2720
- }, bp = (s, e) => {
2731
+ }, Sp = (s, e) => {
2721
2732
  const { sequenceParameterSets: t, pictureParameterSets: i } = _u(s), n = ju(s);
2722
2733
  return _c([
2723
2734
  {
@@ -2731,7 +2742,7 @@ const se = (s, e, t) => {
2731
2742
  trackId: 1
2732
2743
  }
2733
2744
  ]);
2734
- }, yp = (s, e, t) => _c([
2745
+ }, Ep = (s, e, t) => _c([
2735
2746
  {
2736
2747
  type: "audio",
2737
2748
  trackId: 1,
@@ -2742,7 +2753,7 @@ const se = (s, e, t) => {
2742
2753
  duration: 0,
2743
2754
  sampleRate: 48e3
2744
2755
  }
2745
- ]), vp = (s, e) => {
2756
+ ]), Tp = (s, e) => {
2746
2757
  const t = s.map((c) => F(v({}, c), {
2747
2758
  data: new Uint8Array(c.data)
2748
2759
  }));
@@ -2760,8 +2771,8 @@ const se = (s, e, t) => {
2760
2771
  });
2761
2772
  }, Wu = (s) => {
2762
2773
  const e = new yu(s);
2763
- return e.peekBit() === 1 && e.readBits(32), Tp(e), xp(e);
2764
- }, Sp = (s) => {
2774
+ return e.peekBit() === 1 && e.readBits(32), kp(e), Op(e);
2775
+ }, Ip = (s) => {
2765
2776
  let e = 0, t = 0;
2766
2777
  for (let i = 0; i < 8; i++) {
2767
2778
  const n = s.readBits(8);
@@ -2769,49 +2780,49 @@ const se = (s, e, t) => {
2769
2780
  break;
2770
2781
  }
2771
2782
  return [t, e];
2772
- }, Ep = (s) => {
2783
+ }, Cp = (s) => {
2773
2784
  let e = 0;
2774
2785
  for (; e < 100 && s.readBit() === 0; )
2775
2786
  e++;
2776
2787
  return e >= 32 ? 0 : s.readBits(e) + (1 << e) - 1;
2777
- }, Tp = (s) => {
2788
+ }, kp = (s) => {
2778
2789
  const e = s.remainingBits() / 8, t = s.readBits(8);
2779
2790
  if ((t >> 7 & 1) !== 0)
2780
2791
  return;
2781
2792
  const n = t >> 3 & 15, o = t >> 2 & 1, c = t >> 1 & 1;
2782
2793
  o == 1 && s.readBits(8);
2783
- const [h, d] = c ? Sp(s) : [0, e];
2794
+ const [h, d] = c ? Ip(s) : [0, e];
2784
2795
  return {
2785
2796
  headerLength: 1 + o + h,
2786
2797
  type: n,
2787
2798
  obuSize: d
2788
2799
  };
2789
- }, Ip = (s) => {
2800
+ }, Bp = (s) => {
2790
2801
  const e = s.readBits(32), t = s.readBits(32), i = s.readBit() !== 0;
2791
2802
  let n = 0;
2792
- return i && (n = Ep(s) + 1), {
2803
+ return i && (n = Cp(s) + 1), {
2793
2804
  timescale: t,
2794
2805
  equalPictureInterval: i,
2795
2806
  numUnitsInDisplayTick: e,
2796
2807
  numTicksPerPicture: n
2797
2808
  };
2798
- }, Md = 2, Zc = 2, Cp = 1, kp = 2, Bp = 2, Rp = 13, Up = 0, Pp = 2, Fd = 0, xp = (s) => {
2809
+ }, Md = 2, Zc = 2, Rp = 1, Up = 2, Pp = 2, xp = 13, Lp = 0, Dp = 2, Fd = 0, Op = (s) => {
2799
2810
  const e = s.readBits(3), i = s.readBit() !== 0, n = s.readBit() !== 0;
2800
2811
  let o, c = !1, h = !1, d = !1, f = 0, p = 0;
2801
2812
  const g = [];
2802
2813
  if (n)
2803
2814
  s.readBits(5);
2804
2815
  else {
2805
- if (h = s.readBit() !== 0, h && (o = Ip(s), c = s.readBit() !== 0, c))
2816
+ if (h = s.readBit() !== 0, h && (o = Bp(s), c = s.readBit() !== 0, c))
2806
2817
  throw new Error("Not implemented");
2807
2818
  d = s.readBit() !== 0;
2808
2819
  const M = s.readBits(5) + 1;
2809
2820
  for (let Z = 0; Z < M; Z++) {
2810
2821
  const Qe = s.readBits(12), q = s.readBits(5);
2811
- let re = 0;
2812
- if (q > 7 && (re = s.readBit()), c)
2822
+ let ae = 0;
2823
+ if (q > 7 && (ae = s.readBit()), c)
2813
2824
  throw new Error("decoderModelInfoPresentFlag==1");
2814
- d && s.readBit() !== 0 && s.readBits(4), g.push({ tier: re, operatingPointIdc: Qe, seqLevelIdx: q });
2825
+ d && s.readBit() !== 0 && s.readBits(4), g.push({ tier: ae, operatingPointIdc: Qe, seqLevelIdx: q });
2815
2826
  }
2816
2827
  }
2817
2828
  const w = s.readBits(4) + 1, y = s.readBits(4) + 1, S = s.readBits(w) + 1, x = s.readBits(y) + 1;
@@ -2820,7 +2831,7 @@ const se = (s, e, t) => {
2820
2831
  const D = s.readBit() !== 0, E = s.readBit() !== 0, U = s.readBit() !== 0;
2821
2832
  let k = !1, _ = !1, he = !1, Fe = !1, Q = !1, Ct = !1, kt = !1, ye = Md, ve = Zc, b = 0;
2822
2833
  n || (k = s.readBit() !== 0, _ = s.readBit() !== 0, he = s.readBit() !== 0, Fe = s.readBit() !== 0, Q = s.readBit() !== 0, Q && (Ct = s.readBit() !== 0, kt = s.readBit() !== 0), s.readBit() !== 0 ? ye = Md : ye = s.readBit(), ye > 0 ? s.readBit() > 0 ? ve = Zc : ve = s.readBit() : ve = Zc, Q ? b = s.readBits(3) : b = 0);
2823
- const I = s.readBit() !== 0, H = s.readBit() !== 0, G = s.readBit() !== 0;
2834
+ const I = s.readBit() !== 0, H = s.readBit() !== 0, j = s.readBit() !== 0;
2824
2835
  return {
2825
2836
  seqProfile: e,
2826
2837
  stillPicture: i,
@@ -2857,16 +2868,16 @@ const se = (s, e, t) => {
2857
2868
  orderHintBits: b,
2858
2869
  enableSuperres: I,
2859
2870
  enableCdef: H,
2860
- enableRestoration: G,
2861
- colorConfig: Lp(s, e),
2871
+ enableRestoration: j,
2872
+ colorConfig: Mp(s, e),
2862
2873
  filmGrainParamsPresent: s.readBit() !== 0
2863
2874
  };
2864
- }, Lp = (s, e) => {
2875
+ }, Mp = (s, e) => {
2865
2876
  const t = s.readBit() !== 0;
2866
2877
  let i = 8, n = !1;
2867
2878
  e === 2 && t ? i = s.readBit() !== 0 ? 12 : 10 : e <= 2 && (i = t ? 10 : 8), e === 1 ? n = !1 : n = s.readBit() !== 0;
2868
2879
  const o = n ? 1 : 3, c = s.readBit() !== 0;
2869
- let h = kp, d = Bp, f = Pp, p = !1, g = 0, w = 0, y = Fd, S = !1;
2880
+ let h = Up, d = Pp, f = Dp, p = !1, g = 0, w = 0, y = Fd, S = !1;
2870
2881
  return c && (h = s.readBits(8), d = s.readBits(8), f = s.readBits(8)), n ? (p = s.readBit() !== 0, g = 1, w = 1, y = Fd, S = !1, {
2871
2882
  highBitDepth: t,
2872
2883
  bitDepth: i,
@@ -2880,7 +2891,7 @@ const se = (s, e, t) => {
2880
2891
  subsamplingX: g,
2881
2892
  subsamplingY: w,
2882
2893
  transferCharacteristics: d
2883
- }) : h === Cp && d == Rp && f == Up ? (p = !0, g = 0, w = 0, {
2894
+ }) : h === Rp && d == xp && f == Lp ? (p = !0, g = 0, w = 0, {
2884
2895
  highBitDepth: t,
2885
2896
  bitDepth: i,
2886
2897
  monoChrome: n,
@@ -2907,14 +2918,14 @@ const se = (s, e, t) => {
2907
2918
  subsamplingY: w,
2908
2919
  transferCharacteristics: d
2909
2920
  });
2910
- }, Dp = (s) => {
2921
+ }, Fp = (s) => {
2911
2922
  const e = Wu(s);
2912
2923
  if (e)
2913
2924
  return {
2914
2925
  width: e.maxFrameWidth,
2915
2926
  height: e.maxFrameHeight
2916
2927
  };
2917
- }, Op = (s, e) => {
2928
+ }, _p = (s, e) => {
2918
2929
  const t = s.map((h) => F(v({}, h), {
2919
2930
  data: new Uint8Array(h.data)
2920
2931
  }));
@@ -2930,7 +2941,7 @@ const se = (s, e, t) => {
2930
2941
  defaultDuration: c,
2931
2942
  samples: t
2932
2943
  });
2933
- }, Mp = (s, e) => {
2944
+ }, Np = (s, e) => {
2934
2945
  const t = Wu(s);
2935
2946
  if (!t)
2936
2947
  throw new Error("Failed to parse sequence header");
@@ -2946,46 +2957,46 @@ const se = (s, e, t) => {
2946
2957
  trackId: 1
2947
2958
  }
2948
2959
  ]);
2949
- }, Fp = (s, e, t) => {
2960
+ }, Vp = (s, e, t) => {
2950
2961
  switch (s) {
2951
2962
  case "h264":
2952
- return Np(e, t);
2963
+ return jp(e, t);
2953
2964
  case "av1":
2954
- return Vp(e, t);
2965
+ return Wp(e, t);
2955
2966
  case "opus":
2956
- return Gp(e, t);
2967
+ return zp(e, t);
2957
2968
  case "aac":
2958
- return jp(e, t);
2969
+ return Hp(e, t);
2959
2970
  default:
2960
2971
  throw new Error(`Failed to initialize ${s} segment`);
2961
2972
  }
2962
- }, _p = (s, e) => {
2973
+ }, Gp = (s, e) => {
2963
2974
  switch (s) {
2964
2975
  case "h264":
2965
2976
  return ju(e);
2966
2977
  case "av1":
2967
- return Dp(e);
2978
+ return Fp(e);
2968
2979
  }
2969
- }, Np = (s, e) => bp(s, e), Vp = (s, e) => Mp(s, e), Gp = (s, e) => yp(new Uint8Array(s), 2, e), jp = (s, e) => Ap(new Uint8Array(s), 2, e, e), Wp = (s, e) => {
2980
+ }, jp = (s, e) => Sp(s, e), Wp = (s, e) => Np(s, e), zp = (s, e) => Ep(new Uint8Array(s), 2, e), Hp = (s, e) => yp(new Uint8Array(s), 2, e, e), Xp = (s, e) => {
2970
2981
  if (!s[0])
2971
2982
  throw new Error("At least one sample must be provided");
2972
2983
  switch (s[0].codec) {
2973
2984
  case "h264":
2974
- return wp(s, e);
2975
- case "opus":
2976
2985
  return vp(s, e);
2986
+ case "opus":
2987
+ return Tp(s, e);
2977
2988
  case "aac":
2978
- return gp(s, e);
2989
+ return bp(s, e);
2979
2990
  case "av1":
2980
- return Op(s, e);
2991
+ return _p(s, e);
2981
2992
  default:
2982
2993
  throw new Error(`Unsupported codec ${s[0].codec}`);
2983
2994
  }
2984
- }, cr = (s) => !!(s & 1), zp = (s) => !!(s & 2), Hp = (s) => !!(s & 4), Xp = (s) => !!(s & 8), Qp = (s) => !!(s & 16), Zp = (s) => {
2985
- const e = new DataView(s, 0), t = e.getUint8(0), i = e.getUint16(1), n = e.getUint8(3), o = e.getUint8(4), c = id(new Uint8Array(s), 5, 12), h = e.getUint32(13), d = Qp(n) ? e.getInt16(17) : void 0, f = s.slice(i);
2995
+ }, cr = (s) => !!(s & 1), Qp = (s) => !!(s & 2), Zp = (s) => !!(s & 4), qp = (s) => !!(s & 8), $p = (s) => !!(s & 16), Yp = (s) => {
2996
+ const e = new DataView(s, 0), t = e.getUint8(0), i = e.getUint16(1), n = e.getUint8(3), o = e.getUint8(4), c = id(new Uint8Array(s), 5, 12), h = e.getUint32(13), d = $p(n) ? e.getInt16(17) : void 0, f = s.slice(i);
2986
2997
  return { version: t, renditionId: o, flags: n, timestamp: c, timescale: h, payload: f,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AEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw", Ka = () => "wakeLock" in navigator && window.navigator.userAgent.indexOf("Samsung") === -1;
2988
- class $p {
2998
+ }, Jp = "data:video/mp4;base64,AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25z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kAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw", Ka = () => "wakeLock" in navigator && window.navigator.userAgent.indexOf("Samsung") === -1;
2999
+ class Kp {
2989
3000
  constructor() {
2990
3001
  r(this, "enabled", !1);
2991
3002
  r(this, "wakeLockVideo");
@@ -3006,7 +3017,7 @@ class $p {
3006
3017
  if (!Ka()) {
3007
3018
  if (!this.wakeLockVideo) {
3008
3019
  const t = document.createElement("video");
3009
- this.wakeLockVideo = t, this.wakeLockVideo.setAttribute("title", "Live Stream"), this.wakeLockVideo.setAttribute("playsinline", ""), this._addSourceToVideo(this.wakeLockVideo, "mp4", qp), Object.assign(this.wakeLockVideo.style, {
3020
+ this.wakeLockVideo = t, this.wakeLockVideo.setAttribute("title", "Live Stream"), this.wakeLockVideo.setAttribute("playsinline", ""), this._addSourceToVideo(this.wakeLockVideo, "mp4", Jp), Object.assign(this.wakeLockVideo.style, {
3010
3021
  position: "absolute",
3011
3022
  left: "-100%",
3012
3023
  top: "-100%"
@@ -3040,7 +3051,7 @@ class $p {
3040
3051
  document.removeEventListener("visibilitychange", this.handleVisibilityChange), document.removeEventListener("fullscreenchange", this.handleVisibilityChange), this.disable();
3041
3052
  }
3042
3053
  }
3043
- const Yp = /\r\n|\r|\n/;
3054
+ const eg = /\r\n|\r|\n/;
3044
3055
  var Kt, Lt;
3045
3056
  class _d {
3046
3057
  constructor(e) {
@@ -3078,7 +3089,7 @@ class zu {
3078
3089
  u(this, bs);
3079
3090
  }
3080
3091
  parse(e) {
3081
- const t = [], i = e.split(Yp), n = new _d(i), o = n.readLine();
3092
+ const t = [], i = e.split(eg), n = new _d(i), o = n.readLine();
3082
3093
  if (!o || !o.startsWith("WEBVTT"))
3083
3094
  throw new Error("missing 'WEBVTT' signature");
3084
3095
  for (; n.readLine() !== ""; )
@@ -3277,7 +3288,7 @@ class ph extends bi {
3277
3288
  return this._isPaused;
3278
3289
  }
3279
3290
  }
3280
- const Jp = [
3291
+ const tg = [
3281
3292
  "minBufferTime",
3282
3293
  "maxBufferTime",
3283
3294
  "burstEnabled",
@@ -3285,10 +3296,10 @@ const Jp = [
3285
3296
  "separateVideoSocketEnabled",
3286
3297
  "videoCodecs"
3287
3298
  ];
3288
- function Kp(s) {
3289
- return Jp.includes(s);
3299
+ function ig(s) {
3300
+ return tg.includes(s);
3290
3301
  }
3291
- class eg {
3302
+ class sg {
3292
3303
  constructor(e) {
3293
3304
  r(this, "options");
3294
3305
  r(this, "overrides", /* @__PURE__ */ new Map());
@@ -3326,7 +3337,7 @@ class eg {
3326
3337
  */
3327
3338
  get(e, t) {
3328
3339
  var i;
3329
- if (t && Kp(e)) {
3340
+ if (t && ig(e)) {
3330
3341
  const n = (i = this.overrides.get(t)) == null ? void 0 : i[e];
3331
3342
  if (typeof n != "undefined")
3332
3343
  return n;
@@ -3344,10 +3355,10 @@ class eg {
3344
3355
  return (i = this.overrides.get(t)) == null ? void 0 : i[e];
3345
3356
  }
3346
3357
  }
3347
- const tg = (s) => {
3358
+ const ng = (s) => {
3348
3359
  const e = window;
3349
3360
  e.vindralInstances = e.vindralInstances || {}, e.vindralInstances[s.getStatistics().clientId.substring(0, 8)] = s;
3350
- }, ig = (s) => {
3361
+ }, rg = (s) => {
3351
3362
  if (!navigator.mediaCapabilities)
3352
3363
  return Promise.resolve({ smooth: !0, supported: !0, powerEfficient: !0, failedToQuery: !0 });
3353
3364
  if (s.codec === "webvtt")
@@ -3371,7 +3382,7 @@ const tg = (s) => {
3371
3382
  framerate: s.frameRate[0] / s.frameRate[1]
3372
3383
  }
3373
3384
  }, navigator.mediaCapabilities.decodingInfo(e);
3374
- }, sg = 0.15, ng = 0.2, Nd = 0.4, rg = 0.5, ag = 0.6, qc = 15, og = {
3385
+ }, ag = 0.15, og = 0.2, Nd = 0.4, cg = 0.5, hg = 0.6, qc = 15, dg = {
3375
3386
  cooldownTime: 3e3,
3376
3387
  maxBufferingEvents: {
3377
3388
  last10Seconds: 0
@@ -3443,7 +3454,7 @@ const tg = (s) => {
3443
3454
  const { bufferFullness: t, general: i } = this.qualityOfServiceSource.getMetrics(), n = this.qualityOfServiceSource.getBufferFullnessRegression();
3444
3455
  if (!n)
3445
3456
  return;
3446
- const o = 10 * 1e3, { slope: c } = n, h = n.predict(qc), d = c < 0, f = n.predict(qc) < Nd && n.slope < 0, p = n.predict(qc) > ag, g = this.qualityOfServiceSource.timeSpentBufferingLast(30 * 1e3), w = this.qualityOfServiceSource.timeSpentActiveLast(30 * 1e3), y = g / w;
3457
+ const o = 10 * 1e3, { slope: c } = n, h = n.predict(qc), d = c < 0, f = n.predict(qc) < Nd && n.slope < 0, p = n.predict(qc) > hg, g = this.qualityOfServiceSource.timeSpentBufferingLast(30 * 1e3), w = this.qualityOfServiceSource.timeSpentActiveLast(30 * 1e3), y = g / w;
3447
3458
  if (t < 0.15 && y > 0.8) {
3448
3459
  this.adaptLevel("reconnect");
3449
3460
  return;
@@ -3452,13 +3463,13 @@ const tg = (s) => {
3452
3463
  this.adaptLevel("downgrade");
3453
3464
  return;
3454
3465
  }
3455
- f || t < sg ? d && t < Nd && h < ng && this.adaptLevel(e.playbackState === "buffering" ? "double downgrade" : "downgrade") : t > rg && p && !this.tooMuchTimeBuffering(o) && !this.tooManyBufferingEvents(o) && this.adaptLevel("upgrade");
3466
+ f || t < ag ? d && t < Nd && h < og && this.adaptLevel(e.playbackState === "buffering" ? "double downgrade" : "downgrade") : t > cg && p && !this.tooMuchTimeBuffering(o) && !this.tooManyBufferingEvents(o) && this.adaptLevel("upgrade");
3456
3467
  });
3457
3468
  r(this, "onAdaptedLevel", () => {
3458
3469
  this.reset();
3459
3470
  });
3460
3471
  r(this, "adaptLevel", (e) => this.emitter.emit("adapt level", e));
3461
- this.qualityOfServiceSource = i, this.config = v(v({}, og), n), this.emitter = e, this.logger = t;
3472
+ this.qualityOfServiceSource = i, this.config = v(v({}, dg), n), this.emitter = e, this.logger = t;
3462
3473
  }
3463
3474
  tooMuchTimeBuffering(e) {
3464
3475
  return this.qualityOfServiceSource.timeSpentBufferingLast(e) / this.qualityOfServiceSource.timeSpentActiveLast(e) > this.config.maxBufferingRatio.last10Seconds;
@@ -3469,7 +3480,7 @@ const tg = (s) => {
3469
3480
  };
3470
3481
  r(Xo, "create", (e, t, i, n = {}) => new Xo(e, t, i, n));
3471
3482
  let gh = Xo;
3472
- const cg = {
3483
+ const ug = {
3473
3484
  minBufferTime: 1500,
3474
3485
  maxBufferTime: 1500,
3475
3486
  cooldownTime: 3e4,
@@ -3522,7 +3533,7 @@ const cg = {
3522
3533
  this.targetBufferTimeTarget.targetBufferTime + f
3523
3534
  ), this.bufferTimeAdjustmentCount++, this.reset());
3524
3535
  });
3525
- this.qualityOfServiceSource = i, this.targetBufferTimeTarget = n, this.config = v(v({}, cg), o), this.emitter = e, this.logger = t;
3536
+ this.qualityOfServiceSource = i, this.targetBufferTimeTarget = n, this.config = v(v({}, ug), o), this.emitter = e, this.logger = t;
3526
3537
  }
3527
3538
  updateConfig(e) {
3528
3539
  this.config = v(v({}, this.config), e);
@@ -3550,14 +3561,14 @@ function Xu(s) {
3550
3561
  throw new Error("Unknown object status " + s);
3551
3562
  }
3552
3563
  var ft, $s, Ys, Wr, zr, Js, Hr, Xr;
3553
- class hg {
3564
+ class lg {
3554
3565
  constructor(e, t, i, n, o, c) {
3555
3566
  u(this, ft);
3556
3567
  u(this, $s);
3557
3568
  u(this, Ys);
3558
3569
  u(this, Wr);
3559
3570
  u(this, zr);
3560
- u(this, Js, new W());
3571
+ u(this, Js, new z());
3561
3572
  u(this, Hr, 0);
3562
3573
  u(this, Xr);
3563
3574
  l(this, ft, e), l(this, $s, t), l(this, Ys, i), l(this, Wr, n), l(this, zr, o), l(this, Xr, c);
@@ -3614,7 +3625,7 @@ class hg {
3614
3625
  }
3615
3626
  ft = new WeakMap(), $s = new WeakMap(), Ys = new WeakMap(), Wr = new WeakMap(), zr = new WeakMap(), Js = new WeakMap(), Hr = new WeakMap(), Xr = new WeakMap();
3616
3627
  var pt, Ks, Qr, Zr, en, ys, Qu, wh;
3617
- class dg {
3628
+ class mg {
3618
3629
  constructor(e, t, i, n, o) {
3619
3630
  u(this, ys);
3620
3631
  u(this, pt);
@@ -3654,7 +3665,7 @@ class dg {
3654
3665
  pt = new WeakMap(), Ks = new WeakMap(), Qr = new WeakMap(), Zr = new WeakMap(), en = new WeakMap(), ys = new WeakSet(), Qu = function() {
3655
3666
  return Rt(this, null, function* () {
3656
3667
  for (; !(yield new $(a(this, pt).isDone())); ) {
3657
- const e = yield new $(a(this, pt).readBigVarInt()), t = new hg(
3668
+ const e = yield new $(a(this, pt).readBigVarInt()), t = new lg(
3658
3669
  a(this, pt),
3659
3670
  e,
3660
3671
  a(this, Ks),
@@ -3671,7 +3682,7 @@ pt = new WeakMap(), Ks = new WeakMap(), Qr = new WeakMap(), Zr = new WeakMap(),
3671
3682
  });
3672
3683
  };
3673
3684
  var tt, tn, qr, sn, $r, Yr, Jr, nn, Qo, vs, Zu, bh;
3674
- class ug {
3685
+ class fg {
3675
3686
  constructor(e, t, i, n, o, c, h) {
3676
3687
  u(this, vs);
3677
3688
  u(this, tt);
@@ -3756,11 +3767,11 @@ function qu(s, e) {
3756
3767
  switch (t) {
3757
3768
  case Ro.StreamHeaderGroup: {
3758
3769
  const i = yield s.readBigVarInt(), n = yield s.readBigVarInt(), o = yield s.readBigVarInt(), c = yield s.readBigVarInt(), h = yield s.readUnsigned8();
3759
- return new ug(s, i, n, o, c, h, e);
3770
+ return new fg(s, i, n, o, c, h, e);
3760
3771
  }
3761
3772
  case Ro.StreamHeaderTrack: {
3762
3773
  const i = yield s.readBigVarInt(), n = yield s.readBigVarInt(), o = yield s.readUnsigned8();
3763
- return new dg(s, i, n, o, e);
3774
+ return new mg(s, i, n, o, e);
3764
3775
  }
3765
3776
  default:
3766
3777
  throw new Error("Unexpected message type " + t);
@@ -3768,7 +3779,7 @@ function qu(s, e) {
3768
3779
  });
3769
3780
  }
3770
3781
  var ei, Kr;
3771
- class lg {
3782
+ class pg {
3772
3783
  constructor(e, t) {
3773
3784
  u(this, ei);
3774
3785
  u(this, Kr);
@@ -3788,7 +3799,7 @@ class lg {
3788
3799
  }
3789
3800
  ei = new WeakMap(), Kr = new WeakMap();
3790
3801
  var gt, Ni, Vi, Gi;
3791
- class mg {
3802
+ class gg {
3792
3803
  constructor(e) {
3793
3804
  u(this, gt);
3794
3805
  u(this, Ni, null);
@@ -3812,10 +3823,10 @@ class mg {
3812
3823
  }
3813
3824
  }
3814
3825
  gt = new WeakMap(), Ni = new WeakMap(), Vi = new WeakMap(), Gi = new WeakMap();
3815
- var At, ea, ji, wt, Zo, j, sr, to, ki, io, Ht;
3826
+ var At, ea, ji, wt, Zo, W, sr, to, ki, io, Ht;
3816
3827
  class Uo {
3817
3828
  constructor(e, t) {
3818
- u(this, j);
3829
+ u(this, W);
3819
3830
  u(this, At);
3820
3831
  u(this, ea);
3821
3832
  u(this, ji);
@@ -3825,7 +3836,7 @@ class Uo {
3825
3836
  }
3826
3837
  readUnsigned8() {
3827
3838
  return m(this, null, function* () {
3828
- return yield A(this, j, ki).call(this, 1), A(this, j, Ht).call(this, 1)[0];
3839
+ return yield A(this, W, ki).call(this, 1), A(this, W, Ht).call(this, 1)[0];
3829
3840
  });
3830
3841
  }
3831
3842
  readString() {
@@ -3844,24 +3855,24 @@ class Uo {
3844
3855
  }
3845
3856
  readBigVarInt() {
3846
3857
  return m(this, null, function* () {
3847
- yield A(this, j, ki).call(this, 1);
3848
- const e = (A(this, j, io).call(this, 1)[0] & 192) >> 6;
3849
- switch (a(this, At)[a(this, wt)] = A(this, j, io).call(this, 1)[0] & 63, e) {
3858
+ yield A(this, W, ki).call(this, 1);
3859
+ const e = (A(this, W, io).call(this, 1)[0] & 192) >> 6;
3860
+ switch (a(this, At)[a(this, wt)] = A(this, W, io).call(this, 1)[0] & 63, e) {
3850
3861
  case 0:
3851
- return B(A(this, j, Ht).call(this, 1)[0]);
3862
+ return B(A(this, W, Ht).call(this, 1)[0]);
3852
3863
  case 1: {
3853
- yield A(this, j, ki).call(this, 2);
3854
- const t = A(this, j, Ht).call(this, 2), i = new DataView(t.buffer, t.byteOffset, t.byteLength);
3864
+ yield A(this, W, ki).call(this, 2);
3865
+ const t = A(this, W, Ht).call(this, 2), i = new DataView(t.buffer, t.byteOffset, t.byteLength);
3855
3866
  return B(i.getUint16(0));
3856
3867
  }
3857
3868
  case 2: {
3858
- yield A(this, j, ki).call(this, 4);
3859
- const t = A(this, j, Ht).call(this, 4), i = new DataView(t.buffer, t.byteOffset, t.byteLength);
3869
+ yield A(this, W, ki).call(this, 4);
3870
+ const t = A(this, W, Ht).call(this, 4), i = new DataView(t.buffer, t.byteOffset, t.byteLength);
3860
3871
  return B(i.getUint32(0));
3861
3872
  }
3862
3873
  case 3: {
3863
- yield A(this, j, ki).call(this, 8);
3864
- const t = A(this, j, Ht).call(this, 8), i = new DataView(t.buffer, t.byteOffset, t.byteLength);
3874
+ yield A(this, W, ki).call(this, 8);
3875
+ const t = A(this, W, Ht).call(this, 8), i = new DataView(t.buffer, t.byteOffset, t.byteLength);
3865
3876
  if (typeof i.getBigUint64 != "undefined")
3866
3877
  return B(i.getBigUint64(0));
3867
3878
  const n = id(t, 0, 7);
@@ -3874,19 +3885,19 @@ class Uo {
3874
3885
  }
3875
3886
  read(e) {
3876
3887
  return m(this, null, function* () {
3877
- return yield A(this, j, ki).call(this, e), A(this, j, Ht).call(this, e);
3888
+ return yield A(this, W, ki).call(this, e), A(this, W, Ht).call(this, e);
3878
3889
  });
3879
3890
  }
3880
3891
  readAll() {
3881
3892
  return m(this, null, function* () {
3882
- for (; yield A(this, j, to).call(this); )
3893
+ for (; yield A(this, W, to).call(this); )
3883
3894
  ;
3884
- return A(this, j, Ht).call(this, A(this, j, sr).call(this));
3895
+ return A(this, W, Ht).call(this, A(this, W, sr).call(this));
3885
3896
  });
3886
3897
  }
3887
3898
  isDone() {
3888
3899
  return m(this, null, function* () {
3889
- return A(this, j, sr).call(this) > 0 ? !1 : (yield A(this, j, to).call(this)) == 0;
3900
+ return A(this, W, sr).call(this) > 0 ? !1 : (yield A(this, W, to).call(this)) == 0;
3890
3901
  });
3891
3902
  }
3892
3903
  closed() {
@@ -3900,14 +3911,14 @@ class Uo {
3900
3911
  });
3901
3912
  }
3902
3913
  }
3903
- At = new WeakMap(), ea = new WeakMap(), ji = new WeakMap(), wt = new WeakMap(), Zo = new WeakMap(), j = new WeakSet(), sr = function() {
3914
+ At = new WeakMap(), ea = new WeakMap(), ji = new WeakMap(), wt = new WeakMap(), Zo = new WeakMap(), W = new WeakSet(), sr = function() {
3904
3915
  return a(this, At).length - a(this, wt);
3905
3916
  }, to = function() {
3906
3917
  return m(this, null, function* () {
3907
3918
  const { value: e, done: t } = yield a(this, ji).read();
3908
3919
  if (t)
3909
3920
  return Promise.resolve(0);
3910
- if (A(this, j, sr).call(this) === 0)
3921
+ if (A(this, W, sr).call(this) === 0)
3911
3922
  l(this, At, e);
3912
3923
  else {
3913
3924
  const n = a(this, At).subarray(a(this, wt)), o = new Uint8Array(n.length + e.length);
@@ -3917,14 +3928,14 @@ At = new WeakMap(), ea = new WeakMap(), ji = new WeakMap(), wt = new WeakMap(),
3917
3928
  });
3918
3929
  }, ki = function(e) {
3919
3930
  return m(this, null, function* () {
3920
- for (; A(this, j, sr).call(this) < e; )
3921
- if ((yield A(this, j, to).call(this)) === 0)
3931
+ for (; A(this, W, sr).call(this) < e; )
3932
+ if ((yield A(this, W, to).call(this)) === 0)
3922
3933
  throw new Error("Read failed");
3923
3934
  });
3924
3935
  }, io = function(e) {
3925
3936
  return a(this, At).subarray(a(this, wt), a(this, wt) + e);
3926
3937
  }, Ht = function(e) {
3927
- const t = A(this, j, io).call(this, e);
3938
+ const t = A(this, W, io).call(this, e);
3928
3939
  return l(this, wt, a(this, wt) + t.length), t;
3929
3940
  };
3930
3941
  var rn, an, Dt, qo;
@@ -4016,7 +4027,7 @@ const Cr = class Cr {
4016
4027
  };
4017
4028
  Pe = new WeakMap(), Le = new WeakMap(), Wi = new WeakMap(), $o = new WeakMap(), r(Cr, "DEFAULT_BUFFER_SIZE", 1024);
4018
4029
  let Pr = Cr;
4019
- const Ju = Math.pow(2, 6) - 1, Ku = Math.pow(2, 14) - 1, el = Math.pow(2, 30) - 1, fg = Number.MAX_SAFE_INTEGER, pg = typeof BigInt == "function" ? B(2) ** B(62) - B(1) : B(Number.MAX_SAFE_INTEGER);
4030
+ const Ju = Math.pow(2, 6) - 1, Ku = Math.pow(2, 14) - 1, el = Math.pow(2, 30) - 1, Ag = Number.MAX_SAFE_INTEGER, wg = typeof BigInt == "function" ? B(2) ** B(62) - B(1) : B(Number.MAX_SAFE_INTEGER);
4020
4031
  function Vc(s, e) {
4021
4032
  return e[0] = s, e.subarray(0, 1);
4022
4033
  }
@@ -4043,7 +4054,7 @@ function rl(s, e) {
4043
4054
  return tl(s | 16384, e);
4044
4055
  if (s <= el)
4045
4056
  return il(s | 2147483648, e);
4046
- if (s <= fg)
4057
+ if (s <= Ag)
4047
4058
  return typeof BigInt == "function" ? sl(BigInt(s) | BigInt(3221225472) << BigInt(32), e) : nl(Number(s), e);
4048
4059
  throw new Error(`overflow, value larger than 53-bits: ${s}`);
4049
4060
  }
@@ -4054,7 +4065,7 @@ function al(s, e) {
4054
4065
  return tl(Number(s) | 16384, e);
4055
4066
  if (s <= el)
4056
4067
  return il(Number(s) | 2147483648, e);
4057
- if (s <= pg)
4068
+ if (s <= wg)
4058
4069
  return typeof BigInt == "function" ? sl(BigInt(s) | BigInt(3221225472) << BigInt(32), e) : nl(Number(s), e);
4059
4070
  throw new Error(`overflow, value larger than 62-bits: ${s}`);
4060
4071
  }
@@ -4095,7 +4106,7 @@ function Yn(s, e) {
4095
4106
  yield s.writeBigVarInt(t), yield s.writeVarInt(i.payload.length), yield s.write(i.payload);
4096
4107
  });
4097
4108
  }
4098
- function gg(s) {
4109
+ function bg(s) {
4099
4110
  return m(this, null, function* () {
4100
4111
  return {
4101
4112
  type: T.Announce,
@@ -4104,12 +4115,12 @@ function gg(s) {
4104
4115
  };
4105
4116
  });
4106
4117
  }
4107
- function Ag(s, e) {
4118
+ function yg(s, e) {
4108
4119
  return m(this, null, function* () {
4109
4120
  yield nd(s, e.namespace), yield Yn(s, e.params);
4110
4121
  });
4111
4122
  }
4112
- function wg(s) {
4123
+ function vg(s) {
4113
4124
  return m(this, null, function* () {
4114
4125
  return {
4115
4126
  type: T.AnnounceOk,
@@ -4117,12 +4128,12 @@ function wg(s) {
4117
4128
  };
4118
4129
  });
4119
4130
  }
4120
- function bg(s, e) {
4131
+ function Sg(s, e) {
4121
4132
  return m(this, null, function* () {
4122
4133
  yield nd(s, e.namespace);
4123
4134
  });
4124
4135
  }
4125
- const yg = {
4136
+ const Eg = {
4126
4137
  Subscriber: 2
4127
4138
  }, xo = {
4128
4139
  Role: B(0)
@@ -4140,7 +4151,7 @@ function cl(s) {
4140
4151
  }
4141
4152
  });
4142
4153
  }
4143
- function vg(s, e) {
4154
+ function Tg(s, e) {
4144
4155
  return m(this, null, function* () {
4145
4156
  yield s.writeVarInt(e.supportedVersions.length);
4146
4157
  for (const t of e.supportedVersions)
@@ -4148,7 +4159,7 @@ function vg(s, e) {
4148
4159
  yield Yn(s, e.parameters);
4149
4160
  });
4150
4161
  }
4151
- function Sg(s) {
4162
+ function Ig(s) {
4152
4163
  return m(this, null, function* () {
4153
4164
  const e = [], t = yield s.readVarInt();
4154
4165
  for (let n = 0; n < t; n++)
@@ -4163,12 +4174,12 @@ function Sg(s) {
4163
4174
  };
4164
4175
  });
4165
4176
  }
4166
- function Eg(s, e) {
4177
+ function Cg(s, e) {
4167
4178
  return m(this, null, function* () {
4168
4179
  yield s.writeVarInt(e.selectedVersion.value), yield Yn(s, e.parameters);
4169
4180
  });
4170
4181
  }
4171
- function Tg(s) {
4182
+ function kg(s) {
4172
4183
  return m(this, null, function* () {
4173
4184
  const e = yield cl(s);
4174
4185
  if (e.type !== "known")
@@ -4183,13 +4194,13 @@ function Tg(s) {
4183
4194
  };
4184
4195
  });
4185
4196
  }
4186
- const Ig = {
4197
+ const Bg = {
4187
4198
  "latest-group": 1,
4188
4199
  "latest-object": 2,
4189
4200
  "absolute-start": 3,
4190
4201
  "absolute-range": 4
4191
4202
  };
4192
- function Cg(s) {
4203
+ function Rg(s) {
4193
4204
  return m(this, null, function* () {
4194
4205
  const e = yield s.readVarInt();
4195
4206
  switch (e) {
@@ -4222,9 +4233,9 @@ function Cg(s) {
4222
4233
  }
4223
4234
  });
4224
4235
  }
4225
- function kg(s, e) {
4236
+ function Ug(s, e) {
4226
4237
  return m(this, null, function* () {
4227
- const t = Ig[e.type];
4238
+ const t = Bg[e.type];
4228
4239
  switch (yield s.writeVarInt(t), e.type) {
4229
4240
  case "absolute-range":
4230
4241
  yield s.writeBigVarInt(e.start.group), yield s.writeBigVarInt(e.start.object), yield s.writeBigVarInt(e.end.group), yield s.writeBigVarInt(e.end.object);
@@ -4270,9 +4281,9 @@ function dl(s, e) {
4270
4281
  }
4271
4282
  });
4272
4283
  }
4273
- function Bg(s) {
4284
+ function Pg(s) {
4274
4285
  return m(this, null, function* () {
4275
- const e = yield s.readBigVarInt(), t = yield s.readBigVarInt(), i = yield Gc(s), n = yield s.readString(), o = yield s.readUnsigned8(), c = yield hl(s), h = yield Cg(s), d = yield $n(s);
4286
+ const e = yield s.readBigVarInt(), t = yield s.readBigVarInt(), i = yield Gc(s), n = yield s.readString(), o = yield s.readUnsigned8(), c = yield hl(s), h = yield Rg(s), d = yield $n(s);
4276
4287
  if (h.type === "absolute-range") {
4277
4288
  const f = h.start.group > h.end.group, p = h.start.group === h.end.group && h.start.object > h.end.object;
4278
4289
  if (f || p)
@@ -4291,16 +4302,16 @@ function Bg(s) {
4291
4302
  };
4292
4303
  });
4293
4304
  }
4294
- function Rg(s, e) {
4305
+ function xg(s, e) {
4295
4306
  return m(this, null, function* () {
4296
- yield s.writeBigVarInt(e.id), yield s.writeBigVarInt(e.trackAlias), yield nd(s, e.namespace), yield s.writeString(e.name), yield s.writeUnsigned8(e.subscriberPriority), yield dl(s, e.groupOrder), yield kg(s, e.filterType), yield Yn(s, e.params);
4307
+ yield s.writeBigVarInt(e.id), yield s.writeBigVarInt(e.trackAlias), yield nd(s, e.namespace), yield s.writeString(e.name), yield s.writeUnsigned8(e.subscriberPriority), yield dl(s, e.groupOrder), yield Ug(s, e.filterType), yield Yn(s, e.params);
4297
4308
  });
4298
4309
  }
4299
4310
  const yh = {
4300
4311
  TrackEnded: 3,
4301
4312
  Expired: 6
4302
4313
  };
4303
- function Ug(s) {
4314
+ function Lg(s) {
4304
4315
  return m(this, null, function* () {
4305
4316
  const e = yield s.readBigVarInt(), t = yield s.readVarInt(), i = yield s.readString(), n = (yield s.readUnsigned8()) == 1;
4306
4317
  let o;
@@ -4316,12 +4327,12 @@ function Ug(s) {
4316
4327
  };
4317
4328
  });
4318
4329
  }
4319
- function Pg(s, e) {
4330
+ function Dg(s, e) {
4320
4331
  return m(this, null, function* () {
4321
4332
  yield s.writeBigVarInt(e.id), yield s.writeVarInt(e.errorCode), yield s.writeString(e.reason), yield s.writeUnsigned8(e.finalInfo ? 1 : 0), e.finalInfo && (yield s.writeBigVarInt(e.finalInfo.group), yield s.writeBigVarInt(e.finalInfo.object));
4322
4333
  });
4323
4334
  }
4324
- function xg(s) {
4335
+ function Og(s) {
4325
4336
  return m(this, null, function* () {
4326
4337
  return {
4327
4338
  type: T.SubscribeError,
@@ -4332,12 +4343,12 @@ function xg(s) {
4332
4343
  };
4333
4344
  });
4334
4345
  }
4335
- function Lg(s, e) {
4346
+ function Mg(s, e) {
4336
4347
  return m(this, null, function* () {
4337
4348
  yield s.writeBigVarInt(e.id), yield s.writeBigVarInt(e.errorCode), yield s.writeString(e.reason), yield s.writeBigVarInt(e.trackAlias);
4338
4349
  });
4339
4350
  }
4340
- function Dg(s) {
4351
+ function Fg(s) {
4341
4352
  return m(this, null, function* () {
4342
4353
  const e = yield s.readBigVarInt(), t = yield s.readBigVarInt(), i = yield hl(s), n = (yield s.readUnsigned8()) == 1;
4343
4354
  let o;
@@ -4358,12 +4369,12 @@ function Dg(s) {
4358
4369
  };
4359
4370
  });
4360
4371
  }
4361
- function Og(s, e) {
4372
+ function _g(s, e) {
4362
4373
  return m(this, null, function* () {
4363
4374
  yield s.writeBigVarInt(e.id), yield s.writeBigVarInt(e.expires), yield dl(s, e.groupOrder), yield s.writeUnsigned8(e.largestInfo ? 1 : 0), e.largestInfo && (yield s.writeBigVarInt(e.largestInfo.group), yield s.writeBigVarInt(e.largestInfo.object)), yield Yn(s, e.params);
4364
4375
  });
4365
4376
  }
4366
- function Mg(s) {
4377
+ function Ng(s) {
4367
4378
  return m(this, null, function* () {
4368
4379
  const e = yield s.readBigVarInt(), t = yield s.readBigVarInt(), i = yield s.readBigVarInt(), n = yield s.readBigVarInt(), o = yield s.readBigVarInt(), c = yield s.readUnsigned8(), h = yield $n(s), d = t > n, f = t === n && i > o;
4369
4380
  if (d || f)
@@ -4378,12 +4389,12 @@ function Mg(s) {
4378
4389
  };
4379
4390
  });
4380
4391
  }
4381
- function Fg(s, e) {
4392
+ function Vg(s, e) {
4382
4393
  return m(this, null, function* () {
4383
4394
  yield s.writeBigVarInt(e.id), yield s.writeBigVarInt(e.start.group), yield s.writeBigVarInt(e.start.object), yield s.writeBigVarInt(e.end.group), yield s.writeBigVarInt(e.end.object), yield s.writeUnsigned8(e.subscriberPriority), yield Yn(s, e.params);
4384
4395
  });
4385
4396
  }
4386
- function _g(s) {
4397
+ function Gg(s) {
4387
4398
  return m(this, null, function* () {
4388
4399
  return {
4389
4400
  type: T.Unsubscribe,
@@ -4391,7 +4402,7 @@ function _g(s) {
4391
4402
  };
4392
4403
  });
4393
4404
  }
4394
- function Ng(s, e) {
4405
+ function jg(s, e) {
4395
4406
  return m(this, null, function* () {
4396
4407
  yield s.writeBigVarInt(e.id);
4397
4408
  });
@@ -4462,47 +4473,47 @@ class ul {
4462
4473
  }
4463
4474
  Ot = new WeakMap(), on = new WeakMap(), ee = new WeakSet(), ll = function(e, t) {
4464
4475
  return m(this, null, function* () {
4465
- yield vg(e, t);
4476
+ yield Tg(e, t);
4466
4477
  });
4467
4478
  }, ml = function(e, t) {
4468
4479
  return m(this, null, function* () {
4469
- yield Eg(e, t);
4480
+ yield Cg(e, t);
4470
4481
  });
4471
4482
  }, fl = function(e, t) {
4472
4483
  return m(this, null, function* () {
4473
- yield Rg(e, t);
4484
+ yield xg(e, t);
4474
4485
  });
4475
4486
  }, pl = function(e, t) {
4476
4487
  return m(this, null, function* () {
4477
- yield Og(e, t);
4488
+ yield _g(e, t);
4478
4489
  });
4479
4490
  }, gl = function(e, t) {
4480
4491
  return m(this, null, function* () {
4481
- yield Lg(e, t);
4492
+ yield Mg(e, t);
4482
4493
  });
4483
4494
  }, Al = function(e, t) {
4484
4495
  return m(this, null, function* () {
4485
- yield Fg(e, t);
4496
+ yield Vg(e, t);
4486
4497
  });
4487
4498
  }, wl = function(e, t) {
4488
4499
  return m(this, null, function* () {
4489
- yield Pg(e, t);
4500
+ yield Dg(e, t);
4490
4501
  });
4491
4502
  }, bl = function(e, t) {
4492
4503
  return m(this, null, function* () {
4493
- yield Ng(e, t);
4504
+ yield jg(e, t);
4494
4505
  });
4495
4506
  }, yl = function(e, t) {
4496
4507
  return m(this, null, function* () {
4497
- yield Ag(e, t);
4508
+ yield yg(e, t);
4498
4509
  });
4499
4510
  }, vl = function(e, t) {
4500
4511
  return m(this, null, function* () {
4501
- yield bg(e, t);
4512
+ yield Sg(e, t);
4502
4513
  });
4503
4514
  };
4504
4515
  var cn, ta, ia;
4505
- class Vg {
4516
+ class Wg {
4506
4517
  constructor(e, t) {
4507
4518
  u(this, cn);
4508
4519
  u(this, ta);
@@ -4519,7 +4530,7 @@ class Vg {
4519
4530
  }
4520
4531
  }
4521
4532
  cn = new WeakMap(), ta = new WeakMap(), ia = new WeakMap();
4522
- function Gg(s) {
4533
+ function zg(s) {
4523
4534
  return m(this, null, function* () {
4524
4535
  return {
4525
4536
  type: T.AnnounceError,
@@ -4529,7 +4540,7 @@ function Gg(s) {
4529
4540
  };
4530
4541
  });
4531
4542
  }
4532
- function jg(s, e, t) {
4543
+ function Hg(s, e, t) {
4533
4544
  return m(this, null, function* () {
4534
4545
  return {
4535
4546
  type: T.Unknown,
@@ -4538,55 +4549,55 @@ function jg(s, e, t) {
4538
4549
  };
4539
4550
  });
4540
4551
  }
4541
- var ae;
4552
+ var oe;
4542
4553
  class Vd {
4543
4554
  constructor(e) {
4544
- u(this, ae);
4545
- l(this, ae, e);
4555
+ u(this, oe);
4556
+ l(this, oe, e);
4546
4557
  }
4547
4558
  cancel() {
4548
- return a(this, ae).close();
4559
+ return a(this, oe).close();
4549
4560
  }
4550
4561
  read() {
4551
4562
  return m(this, null, function* () {
4552
- const e = yield a(this, ae).readVarInt(), t = yield a(this, ae).readVarInt();
4563
+ const e = yield a(this, oe).readVarInt(), t = yield a(this, oe).readVarInt();
4553
4564
  switch (e) {
4554
4565
  case T.ServerSetup:
4555
- return Tg(a(this, ae));
4566
+ return kg(a(this, oe));
4556
4567
  case T.ClientSetup:
4557
- return Sg(a(this, ae));
4568
+ return Ig(a(this, oe));
4558
4569
  case T.Subscribe:
4559
- return Bg(a(this, ae));
4570
+ return Pg(a(this, oe));
4560
4571
  case T.SubscribeOk:
4561
- return Dg(a(this, ae));
4572
+ return Fg(a(this, oe));
4562
4573
  case T.SubscribeDone:
4563
- return Ug(a(this, ae));
4574
+ return Lg(a(this, oe));
4564
4575
  case T.SubscribeError:
4565
- return xg(a(this, ae));
4576
+ return Og(a(this, oe));
4566
4577
  case T.SubscribeUpdate:
4567
- return Mg(a(this, ae));
4578
+ return Ng(a(this, oe));
4568
4579
  case T.Unsubscribe:
4569
- return _g(a(this, ae));
4580
+ return Gg(a(this, oe));
4570
4581
  case T.Announce:
4571
- return gg(a(this, ae));
4582
+ return bg(a(this, oe));
4572
4583
  case T.AnnounceOk:
4573
- return wg(a(this, ae));
4584
+ return vg(a(this, oe));
4574
4585
  case T.AnnounceError:
4575
- return Gg(a(this, ae));
4586
+ return zg(a(this, oe));
4576
4587
  }
4577
- return jg(a(this, ae), B(e), t);
4588
+ return Hg(a(this, oe), B(e), t);
4578
4589
  });
4579
4590
  }
4580
4591
  }
4581
- ae = new WeakMap();
4592
+ oe = new WeakMap();
4582
4593
  var sa, hn, dn, na, Yo, Sl, Jo;
4583
4594
  const Ms = class Ms {
4584
4595
  constructor(e, t) {
4585
4596
  u(this, Yo);
4586
4597
  u(this, sa);
4587
4598
  u(this, hn);
4588
- u(this, dn, new W());
4589
- u(this, na, new W());
4599
+ u(this, dn, new z());
4600
+ u(this, na, new z());
4590
4601
  l(this, sa, e), l(this, hn, t), a(this, dn).resolve();
4591
4602
  }
4592
4603
  write(e) {
@@ -4616,8 +4627,8 @@ const Ms = class Ms {
4616
4627
  }
4617
4628
  static wrapWebsocket(e) {
4618
4629
  const t = new ReadableStream(
4619
- new lg(e, a(Ms, Jo))
4620
- ), i = new Vd(new Uo(new Uint8Array([]), t)), n = new Vg(new Pr(e), new Uint8Array([0]));
4630
+ new pg(e, a(Ms, Jo))
4631
+ ), i = new Vd(new Uo(new Uint8Array([]), t)), n = new Wg(new Pr(e), new Uint8Array([0]));
4621
4632
  return new Ms(n, i);
4622
4633
  }
4623
4634
  static wrapWebTransport(e) {
@@ -4629,7 +4640,7 @@ const Ms = class Ms {
4629
4640
  }
4630
4641
  };
4631
4642
  sa = new WeakMap(), hn = new WeakMap(), dn = new WeakMap(), na = new WeakMap(), Yo = new WeakSet(), Sl = function() {
4632
- const e = new W(), t = a(this, dn).promise.then(() => e);
4643
+ const e = new z(), t = a(this, dn).promise.then(() => e);
4633
4644
  return l(this, dn, e), t;
4634
4645
  }, Jo = new WeakMap(), u(Ms, Jo, 0);
4635
4646
  let Lo = Ms;
@@ -4648,10 +4659,10 @@ function El(s, e) {
4648
4659
  });
4649
4660
  }
4650
4661
  var un;
4651
- class Wg {
4662
+ class Xg {
4652
4663
  constructor(e) {
4653
4664
  r(this, "announce");
4654
- u(this, un, new W());
4665
+ u(this, un, new z());
4655
4666
  this.announce = e;
4656
4667
  }
4657
4668
  onOk(e) {
@@ -4666,11 +4677,11 @@ class Wg {
4666
4677
  }
4667
4678
  }
4668
4679
  un = new WeakMap();
4669
- function zg(s) {
4670
- const e = new Wg(s);
4671
- return new Hg(e);
4680
+ function Qg(s) {
4681
+ const e = new Xg(s);
4682
+ return new Zg(e);
4672
4683
  }
4673
- class Hg {
4684
+ class Zg {
4674
4685
  constructor(e) {
4675
4686
  r(this, "state");
4676
4687
  this.state = e;
@@ -4680,11 +4691,11 @@ var ln, ti, zi, Ko, Hi, it;
4680
4691
  const Fs = class Fs {
4681
4692
  constructor(e) {
4682
4693
  r(this, "subscribe");
4683
- u(this, ln, new W());
4684
- u(this, ti, new W());
4685
- u(this, zi, new W());
4694
+ u(this, ln, new z());
4695
+ u(this, ti, new z());
4696
+ u(this, zi, new z());
4686
4697
  u(this, Ko, Date.now());
4687
- u(this, Hi, new W());
4698
+ u(this, Hi, new z());
4688
4699
  u(this, it);
4689
4700
  switch (this.subscribe = e, e.filterType.type) {
4690
4701
  case "absolute-start":
@@ -4749,7 +4760,7 @@ const Fs = class Fs {
4749
4760
  ln = new WeakMap(), ti = new WeakMap(), zi = new WeakMap(), Ko = new WeakMap(), Hi = new WeakMap(), it = new WeakMap(), r(Fs, "maxGraceTime", 15e3), r(Fs, "minGraceTime", 3e3);
4750
4761
  let Do = Fs;
4751
4762
  var we, ra;
4752
- class Xg {
4763
+ class qg {
4753
4764
  constructor(e) {
4754
4765
  u(this, we);
4755
4766
  u(this, ra, !1);
@@ -4768,7 +4779,7 @@ class Xg {
4768
4779
  }
4769
4780
  we = new WeakMap(), ra = new WeakMap();
4770
4781
  var aa, je, oa, ca, mn, ha, ec, Tl;
4771
- class Qg {
4782
+ class $g {
4772
4783
  constructor(e, t, i, n) {
4773
4784
  u(this, ec);
4774
4785
  u(this, aa);
@@ -4824,8 +4835,8 @@ aa = new WeakMap(), je = new WeakMap(), oa = new WeakMap(), ca = new WeakMap(),
4824
4835
  if (g && (g.startGroup > p.id || g.endGroup && g.endGroup < p.id))
4825
4836
  break;
4826
4837
  const w = yield a(this, oa).openSendStream();
4827
- const y = new Xg(w);
4828
- const S = _e(e, new Zg(y, p.consume(), a(this, je)), !0);
4838
+ const y = new qg(w);
4839
+ const S = _e(e, new Yg(y, p.consume(), a(this, je)), !0);
4829
4840
  yield S.run();
4830
4841
  l(this, mn, S.finalGroup());
4831
4842
  } catch (t) {
@@ -4848,7 +4859,7 @@ aa = new WeakMap(), je = new WeakMap(), oa = new WeakMap(), ca = new WeakMap(),
4848
4859
  });
4849
4860
  };
4850
4861
  var Xi, da, fn, ua, pn;
4851
- class Zg {
4862
+ class Yg {
4852
4863
  constructor(e, t, i) {
4853
4864
  u(this, Xi);
4854
4865
  u(this, da);
@@ -4899,7 +4910,7 @@ class Zg {
4899
4910
  }
4900
4911
  Xi = new WeakMap(), da = new WeakMap(), fn = new WeakMap(), ua = new WeakMap(), pn = new WeakMap();
4901
4912
  var la, Qi, ii, Rs;
4902
- class qg {
4913
+ class Jg {
4903
4914
  constructor(e, t, i) {
4904
4915
  u(this, ii);
4905
4916
  r(this, "state");
@@ -4923,7 +4934,7 @@ class qg {
4923
4934
  params: /* @__PURE__ */ new Map(),
4924
4935
  largestInfo: n ? { group: n, object: o } : void 0
4925
4936
  };
4926
- return yield a(this, Qi).push(h), new Qg(this.state, c, a(this, la), a(this, Qi));
4937
+ return yield a(this, Qi).push(h), new $g(this.state, c, a(this, la), a(this, Qi));
4927
4938
  });
4928
4939
  }
4929
4940
  invalidRange() {
@@ -4982,7 +4993,7 @@ class vh {
4982
4993
  type: T.Announce,
4983
4994
  namespace: e,
4984
4995
  params: t
4985
- }, o = zg(n);
4996
+ }, o = Qg(n);
4986
4997
  if (a(this, si).update((h) => h.set(n.namespace.join("/"), o)), yield a(this, An).push(n), !(yield Promise.race([o.state.ok(), a(this, gn).closed()])))
4987
4998
  throw new Error("Session closed");
4988
4999
  });
@@ -5004,7 +5015,7 @@ class vh {
5004
5015
  yield i == null ? void 0 : i.timeout();
5005
5016
  }
5006
5017
  yield a(this, ri).push(
5007
- new qg(t, a(this, ma), a(this, An))
5018
+ new Jg(t, a(this, ma), a(this, An))
5008
5019
  );
5009
5020
  }
5010
5021
  break;
@@ -5037,12 +5048,12 @@ class vh {
5037
5048
  }
5038
5049
  }
5039
5050
  nh = Si(null), gn = new WeakMap(), ma = new WeakMap(), An = new WeakMap(), Zi = new WeakMap(), si = new WeakMap(), ni = new WeakMap(), ri = new WeakMap(), Se(nh, 1, "announce", su, vh), zt(nh, vh);
5040
- function $g(s, e) {
5041
- const t = new Do(e), [i, n] = td(100), o = new Yg(t, i), c = new Il(s, t, n);
5051
+ function Kg(s, e) {
5052
+ const t = new Do(e), [i, n] = td(100), o = new eA(t, i), c = new Il(s, t, n);
5042
5053
  return [o, c];
5043
5054
  }
5044
5055
  var qi;
5045
- class Yg {
5056
+ class eA {
5046
5057
  constructor(e, t) {
5047
5058
  r(this, "state");
5048
5059
  u(this, qi);
@@ -5074,7 +5085,7 @@ class Il {
5074
5085
  u(this, wn);
5075
5086
  u(this, ue);
5076
5087
  u(this, bn);
5077
- u(this, yn, new W());
5088
+ u(this, yn, new z());
5078
5089
  l(this, wn, e), l(this, ue, t), l(this, bn, i);
5079
5090
  }
5080
5091
  get id() {
@@ -5241,7 +5252,7 @@ rh = Si(null), wn = new WeakMap(), ue = new WeakMap(), bn = new WeakMap(), yn =
5241
5252
  return yield this.close(), this.unsubscribe();
5242
5253
  });
5243
5254
  }, nr = Se(rh, 17, "#dispose", nu, vn, nr), zt(rh, Il);
5244
- const Jg = 2e3;
5255
+ const tA = 2e3;
5245
5256
  var ru, au, ou, cu, Mt, De, $i, Yi, ks, Tt, no, Us;
5246
5257
  cu = [xe({ context: "Session", return: "debug" })], ou = [xe({ context: "Session", enter: "info", error: "error" })], au = [xe({ context: "Session", enter: "debug" })], ru = [xe({ context: "Session", enter: "debug" })];
5247
5258
  class so {
@@ -5272,10 +5283,10 @@ class so {
5272
5283
  subscriberPriority: t.priority,
5273
5284
  filterType: t.filterType,
5274
5285
  params: n
5275
- }, [h, d] = $g(a(this, $i), c);
5286
+ }, [h, d] = Kg(a(this, $i), c);
5276
5287
  if (a(this, De).update((p) => p.set(i, h)), yield a(this, $i).push(c), !(yield Promise.race([h.state.ok(), a(this, Mt).closed()])))
5277
5288
  throw new Error("Session closed");
5278
- return d.closed().then(() => Promise.race([As(Jg), this.closed()])).then(() => A(this, Tt, Us).call(this, d.id)).catch(() => A(this, Tt, Us).call(this, d.id)), d;
5289
+ return d.closed().then(() => Promise.race([As(tA), this.closed()])).then(() => A(this, Tt, Us).call(this, d.id)).catch(() => A(this, Tt, Us).call(this, d.id)), d;
5279
5290
  });
5280
5291
  }
5281
5292
  closed() {
@@ -5467,9 +5478,9 @@ Bs = Si(null), st = new WeakMap(), fa = new WeakMap(), Ji = new WeakMap(), Sn =
5467
5478
  }, rr = function() {
5468
5479
  this.close();
5469
5480
  }, ro = Se(Bs, 17, "#runOutgoingMessages", lu, ce, ro), ao = Se(Bs, 17, "#runControl", uu, ce, ao), oo = Se(Bs, 17, "#runObjects", du, ce, oo), rr = Se(Bs, 17, "#dispose", hu, ce, rr), zt(Bs, rd);
5470
- const Kg = 128;
5481
+ const iA = 128;
5471
5482
  var We, pa, Ki, Tn, ga, be, Bi, Ri;
5472
- class eA {
5483
+ class sA {
5473
5484
  constructor(e, t, i) {
5474
5485
  u(this, be);
5475
5486
  u(this, We);
@@ -5520,10 +5531,10 @@ We = new WeakMap(), pa = new WeakMap(), Ki = new WeakMap(), Tn = new WeakMap(),
5520
5531
  throw new Error("Stream is closed");
5521
5532
  }, Ri = function(e = !0) {
5522
5533
  if (a(this, Ki))
5523
- return l(this, Ki, !1), a(this, We).writeUnsigned8(a(this, pa) | (e ? Kg : 0));
5534
+ return l(this, Ki, !1), a(this, We).writeUnsigned8(a(this, pa) | (e ? iA : 0));
5524
5535
  };
5525
5536
  var ai, Ft, In, es, _t, Cn, kn, tc, Bl;
5526
- class tA {
5537
+ class nA {
5527
5538
  constructor(e, t) {
5528
5539
  u(this, tc);
5529
5540
  u(this, ai);
@@ -5533,7 +5544,7 @@ class tA {
5533
5544
  u(this, _t, /* @__PURE__ */ new Map());
5534
5545
  u(this, Cn, ge.get().createContext("WebSocketConnection"));
5535
5546
  u(this, kn, new Set(new Array(128).fill(0).map((e, t) => t + 1)));
5536
- l(this, ai, e), l(this, Ft, t), l(this, In, new ReadableStream(new mg(e))), a(this, ai).addEventListener("close", () => {
5547
+ l(this, ai, e), l(this, Ft, t), l(this, In, new ReadableStream(new gg(e))), a(this, ai).addEventListener("close", () => {
5537
5548
  a(this, Ft).markPostHandshake(), a(this, _t).forEach((i) => i.close());
5538
5549
  });
5539
5550
  }
@@ -5542,7 +5553,7 @@ class tA {
5542
5553
  if (!e)
5543
5554
  throw new Error("No stream IDs available");
5544
5555
  return a(this, kn).delete(e), Promise.resolve(
5545
- new eA(new Pr(a(this, ai)), e, () => A(this, tc, Bl).call(this, e))
5556
+ new sA(new Pr(a(this, ai)), e, () => A(this, tc, Bl).call(this, e))
5546
5557
  );
5547
5558
  }
5548
5559
  transportType() {
@@ -5615,7 +5626,7 @@ Bl = function(e) {
5615
5626
  a(this, kn).add(e);
5616
5627
  };
5617
5628
  var oi, ci, ts, Aa, wa, ic, sc, Rl;
5618
- class iA {
5629
+ class rA {
5619
5630
  constructor(e, t, i) {
5620
5631
  u(this, sc);
5621
5632
  u(this, oi);
@@ -5691,11 +5702,11 @@ function Yc(s) {
5691
5702
  El(t, s.role).catch(() => {
5692
5703
  e.close();
5693
5704
  });
5694
- const i = new tA(e, t);
5705
+ const i = new nA(e, t);
5695
5706
  return new rd(i, s.authToken);
5696
5707
  });
5697
5708
  }
5698
- function sA(s) {
5709
+ function aA(s) {
5699
5710
  return m(this, null, function* () {
5700
5711
  const e = "60b82e8021689e163c1041b4475ef9c86e7565bc45d1a0aa43f5148769f461c7", t = new Uint8Array(e.length / 2);
5701
5712
  for (let d = 0; d < t.length; d += 1)
@@ -5709,14 +5720,14 @@ function sA(s) {
5709
5720
  El(o, s.role).catch(() => {
5710
5721
  i.close();
5711
5722
  });
5712
- const c = new iA(i, o, s.url.toString());
5723
+ const c = new rA(i, o, s.url.toString());
5713
5724
  return new rd(c, s.authToken);
5714
5725
  });
5715
5726
  }
5716
- function nA(s) {
5727
+ function oA(s) {
5717
5728
  return m(this, null, function* () {
5718
5729
  if (self.WebTransport && (s == null ? void 0 : s.preferredTransport) !== "websocket" && s.url.protocol.startsWith("https")) {
5719
- const e = sA(s).catch(() => Yc(s)), t = yield Promise.race([e, As(s.websocketFallbackTimeoutMs)]);
5730
+ const e = aA(s).catch(() => Yc(s)), t = yield Promise.race([e, As(s.websocketFallbackTimeoutMs)]);
5720
5731
  return t || Yc(s);
5721
5732
  }
5722
5733
  return Yc(s);
@@ -5781,7 +5792,7 @@ class Ul {
5781
5792
  }
5782
5793
  }
5783
5794
  Bn = new WeakMap(), ba = new WeakMap();
5784
- function rA(s, e) {
5795
+ function cA(s, e) {
5785
5796
  return ["com.vindral.moq", s];
5786
5797
  }
5787
5798
  function Ti(s) {
@@ -5790,10 +5801,10 @@ function Ti(s) {
5790
5801
  throw new Error("namespace must contain a channel ID");
5791
5802
  return e;
5792
5803
  }
5793
- function aA(s) {
5804
+ function hA(s) {
5794
5805
  return "tracks" in s;
5795
5806
  }
5796
- function oA(s) {
5807
+ function dA(s) {
5797
5808
  const e = new TextDecoder().decode(s);
5798
5809
  return JSON.parse(e);
5799
5810
  }
@@ -6071,10 +6082,10 @@ nt = new WeakMap(), ss = new WeakMap(), Vt = new WeakMap(), yt = new WeakMap(),
6071
6082
  });
6072
6083
  }, Ea = new WeakMap();
6073
6084
  let yi = dd;
6074
- const cA = "catalog";
6085
+ const uA = "catalog";
6075
6086
  function Gd(s) {
6076
- const e = oA(s.payload);
6077
- if (!aA(e))
6087
+ const e = dA(s.payload);
6088
+ if (!hA(e))
6078
6089
  throw new Error("unexpected catalog type");
6079
6090
  return e;
6080
6091
  }
@@ -6101,12 +6112,12 @@ const ac = class ac {
6101
6112
  }
6102
6113
  static start(e, t) {
6103
6114
  return m(this, null, function* () {
6104
- const i = W.fromPromise(
6115
+ const i = z.fromPromise(
6105
6116
  yi.subscribe(
6106
6117
  e,
6107
- new Wt().name(t.catalogName || cA).groupOrder("ascending").build()
6118
+ new Wt().name(t.catalogName || uA).groupOrder("ascending").build()
6108
6119
  )
6109
- ), n = W.fromPromise(i.promise.then((d) => d.objects()));
6120
+ ), n = z.fromPromise(i.promise.then((d) => d.objects()));
6110
6121
  if (t.catalog)
6111
6122
  return new ac(i, new ke(t.catalog), n);
6112
6123
  const c = yield (yield n.promise).next();
@@ -6142,7 +6153,7 @@ hi = new WeakMap(), Ta = new WeakMap(), Ia = new WeakMap(), Ca = new WeakMap(),
6142
6153
  };
6143
6154
  let Th = ac;
6144
6155
  var ka, Rn, Ba, Un, Ra, Ih;
6145
- class hA {
6156
+ class lA {
6146
6157
  constructor(e, t, i, n) {
6147
6158
  u(this, Ra);
6148
6159
  u(this, ka);
@@ -6259,7 +6270,7 @@ const _s = class _s {
6259
6270
  const e = yield a(this, vt).next();
6260
6271
  return e.done ? e : {
6261
6272
  done: !1,
6262
- value: new hA(e.value, a(this, Ua), a(this, Pa), this)
6273
+ value: new lA(e.value, a(this, Ua), a(this, Pa), this)
6263
6274
  };
6264
6275
  });
6265
6276
  }
@@ -6299,7 +6310,7 @@ Ua = new WeakMap(), vt = new WeakMap(), Pa = new WeakMap(), xa = new WeakMap(),
6299
6310
  });
6300
6311
  }, u(_s, oc);
6301
6312
  let Ch = _s;
6302
- const jd = 1e4, dA = 3e4;
6313
+ const jd = 1e4, mA = 3e4;
6303
6314
  var cc, di, ns, La, Da, Oa, Ss, Bh, Ll;
6304
6315
  const ud = class ud {
6305
6316
  constructor(e, t, i) {
@@ -6332,7 +6343,7 @@ const ud = class ud {
6332
6343
  return qn(this.timeline().map((e) => e.mediaPts - e.wallclock));
6333
6344
  }
6334
6345
  static start(e, t) {
6335
- const i = W.fromPromise(
6346
+ const i = z.fromPromise(
6336
6347
  yi.subscribe(e, new Wt().name(t).groupOrder("ascending").build())
6337
6348
  );
6338
6349
  return new ud(e, i, t);
@@ -6365,10 +6376,10 @@ cc = new WeakMap(), di = new WeakMap(), ns = new WeakMap(), La = new WeakMap(),
6365
6376
  const E = o.value;
6366
6377
  if (E.objectStatus !== Ce.Normal)
6367
6378
  continue;
6368
- const U = uA(E.payload);
6379
+ const U = fA(E.payload);
6369
6380
  a(this, di).update((k) => {
6370
6381
  var _, he;
6371
- for (k.push(...U), k.sort((Fe, Q) => Fe.wallclock - Q.wallclock); k[0] && ((he = (_ = k[k.length - 1]) == null ? void 0 : _.wallclock) != null ? he : 0) - k[0].wallclock > dA; )
6382
+ for (k.push(...U), k.sort((Fe, Q) => Fe.wallclock - Q.wallclock); k[0] && ((he = (_ = k[k.length - 1]) == null ? void 0 : _.wallclock) != null ? he : 0) - k[0].wallclock > mA; )
6372
6383
  k.shift();
6373
6384
  return k;
6374
6385
  }), t === a(this, ns).resolved && E.groupId > B(0) && E.objectId == B(0) && A(this, Ss, Ll).call(this, E.groupId).catch((k) => {
@@ -6408,7 +6419,7 @@ cc = new WeakMap(), di = new WeakMap(), ns = new WeakMap(), La = new WeakMap(),
6408
6419
  const t = e - B(1), i = this.timeline(), n = i[0], o = i[i.length - 1];
6409
6420
  if (!n || !o || o.wallclock - n.wallclock > jd)
6410
6421
  return;
6411
- const c = W.fromPromise(
6422
+ const c = z.fromPromise(
6412
6423
  yi.subscribe(
6413
6424
  a(this, La),
6414
6425
  new Wt().name(a(this, Da)).groupOrder("ascending").range(t, t).build()
@@ -6418,7 +6429,7 @@ cc = new WeakMap(), di = new WeakMap(), ns = new WeakMap(), La = new WeakMap(),
6418
6429
  });
6419
6430
  };
6420
6431
  let kh = ud;
6421
- function uA(s) {
6432
+ function fA(s) {
6422
6433
  var t;
6423
6434
  const e = new TextDecoder("utf-8").decode(s).split(`
6424
6435
  `);
@@ -6435,7 +6446,7 @@ function uA(s) {
6435
6446
  };
6436
6447
  });
6437
6448
  }
6438
- function lA(s) {
6449
+ function pA(s) {
6439
6450
  return typeof s.language == "string";
6440
6451
  }
6441
6452
  var hc, Ma, ui, Pn;
@@ -6451,7 +6462,7 @@ const ld = class ld {
6451
6462
  }
6452
6463
  static subscribe(e, t, i) {
6453
6464
  return m(this, null, function* () {
6454
- if (!lA(t))
6465
+ if (!pA(t))
6455
6466
  throw new Error("track object language is required");
6456
6467
  const n = new Wt().name(t.name).build(), o = yield yi.subscribe(e, n), c = o.objects();
6457
6468
  return new ld(o, c, t, e.namespace(), i);
@@ -6622,23 +6633,23 @@ let Uh = md;
6622
6633
  function eo(s) {
6623
6634
  return typeof s == "string" || s === null || s === void 0;
6624
6635
  }
6625
- function mA(s) {
6636
+ function gA(s) {
6626
6637
  return "provider" in s && typeof s.provider == "string" && (!("widevineLicenseUrl" in s) || eo(s.widevineLicenseUrl)) && (!("playreadyLicenseUrl" in s) || eo(s.playreadyLicenseUrl)) && (!("fairplayLicenseUrl" in s) || eo(s.fairplayLicenseUrl)) && (!("fairplayCertificate" in s) || eo(s.fairplayCertificate));
6627
6638
  }
6628
- function fA(s) {
6639
+ function AA(s) {
6629
6640
  try {
6630
6641
  return bu(s);
6631
6642
  } catch (e) {
6632
6643
  throw new Error("Failed to convert fairplayCertificate");
6633
6644
  }
6634
6645
  }
6635
- function pA(s) {
6646
+ function wA(s) {
6636
6647
  const e = new TextDecoder().decode(s), t = JSON.parse(e);
6637
- if (!mA(t))
6648
+ if (!gA(t))
6638
6649
  throw new Error("Invalid drm object");
6639
6650
  const o = t, { fairplayCertificate: i } = o, n = bd(o, ["fairplayCertificate"]);
6640
6651
  return F(v({}, n), {
6641
- fairplayCertificate: i ? fA(i) : void 0
6652
+ fairplayCertificate: i ? AA(i) : void 0
6642
6653
  });
6643
6654
  }
6644
6655
  class ad {
@@ -6655,7 +6666,7 @@ class ad {
6655
6666
  const c = yield o.next();
6656
6667
  if (c.done)
6657
6668
  throw new Error("No drm object received");
6658
- const h = pA(c.value.payload);
6669
+ const h = wA(c.value.payload);
6659
6670
  return new ad(F(v({}, h), { videoCodec: t, audioCodec: i }));
6660
6671
  } catch (f) {
6661
6672
  var p = f, g = !0;
@@ -6666,16 +6677,16 @@ class ad {
6666
6677
  });
6667
6678
  }
6668
6679
  }
6669
- function gA(s) {
6680
+ function bA(s) {
6670
6681
  return "rtt" in s && typeof s.rtt == "number" && "ntpTimestamp" in s && typeof s.ntpTimestamp == "number" && "estimatedBandwidth" in s && typeof s.estimatedBandwidth == "number";
6671
6682
  }
6672
6683
  function Wd(s) {
6673
6684
  const e = new TextDecoder().decode(s), t = JSON.parse(e);
6674
- if (!gA(t))
6685
+ if (!bA(t))
6675
6686
  throw new Error("Invalid stats object");
6676
6687
  return t;
6677
6688
  }
6678
- const AA = 1e4;
6689
+ const yA = 1e4;
6679
6690
  var _a, uc, Ol;
6680
6691
  const fd = class fd {
6681
6692
  constructor(e, t, i) {
@@ -6693,7 +6704,7 @@ const fd = class fd {
6693
6704
  for (; ; ) {
6694
6705
  const [e, t] = this.value.value();
6695
6706
  try {
6696
- yield Promise.race([sd(AA, new Error("Idle timeout")), t]);
6707
+ yield Promise.race([sd(yA, new Error("Idle timeout")), t]);
6697
6708
  } catch (i) {
6698
6709
  return i;
6699
6710
  }
@@ -6736,14 +6747,14 @@ _a = new WeakMap(), uc = new WeakSet(), Ol = function(e) {
6736
6747
  };
6737
6748
  let Ph = fd;
6738
6749
  var lc, Ln;
6739
- class wA {
6750
+ class vA {
6740
6751
  constructor(e) {
6741
6752
  u(this, lc, ge.get().createContext("UpstreamWatcher"));
6742
6753
  u(this, Ln);
6743
- l(this, Ln, new ke(W.fromPromise(e.closed())));
6754
+ l(this, Ln, new ke(z.fromPromise(e.closed())));
6744
6755
  }
6745
6756
  update(e) {
6746
- a(this, Ln).update(W.fromPromise(e.closed()));
6757
+ a(this, Ln).update(z.fromPromise(e.closed()));
6747
6758
  }
6748
6759
  closed() {
6749
6760
  return m(this, null, function* () {
@@ -6821,14 +6832,14 @@ const Vs = class Vs {
6821
6832
  r(this, "subtitles", new Jc(a(this, mi), "subtitles"));
6822
6833
  r(this, "video", new Jc(a(this, at), "video"));
6823
6834
  r(this, "audio", new Jc(a(this, rt), "audio"));
6824
- l(this, On, e), l(this, Mn, Uh.start(i)), l(this, hs, i), l(this, le, new ke(t)), l(this, Fn, new wA(t)), l(this, Ga, Promise.race([i.idleTimeout(), A(this, Be, Ml).call(this), a(this, Fn).closed()])), a(this, On).closed().then(() => this.close()).catch(L);
6835
+ l(this, On, e), l(this, Mn, Uh.start(i)), l(this, hs, i), l(this, le, new ke(t)), l(this, Fn, new vA(t)), l(this, Ga, Promise.race([i.idleTimeout(), A(this, Be, Ml).call(this), a(this, Fn).closed()])), a(this, On).closed().then(() => this.close()).catch(L);
6825
6836
  }
6826
6837
  closed() {
6827
6838
  return a(this, Ga);
6828
6839
  }
6829
6840
  static start(e, t) {
6830
6841
  return m(this, null, function* () {
6831
- const i = new Ul(e, { namespace: rA("auxiliary") }), [[n, o, c], h] = yield Promise.all([
6842
+ const i = new Ul(e, { namespace: cA("auxiliary") }), [[n, o, c], h] = yield Promise.all([
6832
6843
  Mo.start(e, t).then((f) => Promise.all([
6833
6844
  Promise.resolve(f),
6834
6845
  t.videoTrack ? f.subscribeCmafTrack(t.videoTrack) : void 0,
@@ -6996,7 +7007,7 @@ function Kc(s, e, t) {
6996
7007
  const i = new URL("/voq/subscribe", s);
6997
7008
  return i.searchParams.set("sessionId", e.sessionId), i.searchParams.set("clientId", e.clientId), i.searchParams.set("channelId", e.channelId), t && i.searchParams.set("authToken", t), i;
6998
7009
  }
6999
- const bA = 1e4;
7010
+ const SA = 1e4;
7000
7011
  var me, Te, ot, ds, Y, fi, ja, Wa, mc, _n, Re, Fl, Nn, za, Vn, _l, Nl, Vl, Gl, Oh;
7001
7012
  const pd = class pd {
7002
7013
  constructor(e, t, i, n, o, c) {
@@ -7095,12 +7106,12 @@ const pd = class pd {
7095
7106
  }
7096
7107
  const p = (D = n.connectInfo.channels.find((_) => _.channelId === c.channelId)) == null ? void 0 : D.catalog;
7097
7108
  t.debug("Resolved edge url", { edgeUrl: d, edgeWsUrl: f }), He(p, "no catalog found");
7098
- const g = (E = o.get(Ti(p.namespace))) == null ? void 0 : E.getVideoTrack(c.video), w = (U = o.get(Ti(p.namespace))) == null ? void 0 : U.getAudioTrack(c.audio), y = yield nA({
7109
+ const g = (E = o.get(Ti(p.namespace))) == null ? void 0 : E.getVideoTrack(c.video), w = (U = o.get(Ti(p.namespace))) == null ? void 0 : U.getAudioTrack(c.audio), y = yield oA({
7099
7110
  url: d,
7100
7111
  wsUrl: f,
7101
7112
  authToken: n.options.get("authenticationToken"),
7102
7113
  preferredTransport: n.options.get("webtransportEnabled") ? "webtransport" : "websocket",
7103
- role: yg.Subscriber,
7114
+ role: Eg.Subscriber,
7104
7115
  websocketFallbackTimeoutMs: 2e3
7105
7116
  }), S = yield Promise.race([
7106
7117
  xh.start(y.subscriber, {
@@ -7109,7 +7120,7 @@ const pd = class pd {
7109
7120
  videoTrack: g == null ? void 0 : g.track,
7110
7121
  audioTrack: w == null ? void 0 : w.track
7111
7122
  }),
7112
- sd(bA, new Error("Timeout waiting for player to start")),
7123
+ sd(SA, new Error("Timeout waiting for player to start")),
7113
7124
  Rm(y.closed(), "Session closed before player started")
7114
7125
  ]), x = new eh(S.catalog());
7115
7126
  o.set(Ti(p.namespace), x), e.emit("received signal", {
@@ -7278,7 +7289,7 @@ me = new WeakMap(), Te = new WeakMap(), ot = new WeakMap(), ds = new WeakMap(),
7278
7289
  codec: U,
7279
7290
  switchInfo: kt,
7280
7291
  // FIXME: We should replace this with something better than hashing the track name
7281
- renditionId: yA(R.track.trackObject.name)
7292
+ renditionId: EA(R.track.trackObject.name)
7282
7293
  });
7283
7294
  }
7284
7295
  } catch (p) {
@@ -7305,7 +7316,7 @@ me = new WeakMap(), Te = new WeakMap(), ot = new WeakMap(), ds = new WeakMap(),
7305
7316
  });
7306
7317
  };
7307
7318
  let Dh = pd;
7308
- function yA(s) {
7319
+ function EA(s) {
7309
7320
  return s.split("").reduce(
7310
7321
  (t, i) => t = i.charCodeAt(0) + (t << 6) + (t << 16) - t,
7311
7322
  0
@@ -7351,11 +7362,11 @@ Gt = new WeakMap(), us = new WeakMap(), fc = new WeakSet(), jl = function() {
7351
7362
  const [e, t] = a(this, Gt).value();
7352
7363
  return cm(e);
7353
7364
  };
7354
- const vA = (s, e) => {
7365
+ const TA = (s, e) => {
7355
7366
  const t = new URL("/subscribe", s);
7356
7367
  return t.searchParams.append("channelId", e.channelId), t.searchParams.append("sessionId", e.sessionId), t.searchParams.append("clientId", e.clientId), e.audio && e.audio.codec && (t.searchParams.append("audio.bitRate", Math.round(e.audio.bitRate).toString()), t.searchParams.append("audio.codec", e.audio.codec), e.audio.language && t.searchParams.append("audio.language", e.audio.language)), e.video && e.video.codec && (t.searchParams.append("video.width", e.video.width.toString()), t.searchParams.append("video.height", e.video.height.toString()), t.searchParams.append("video.bitRate", Math.round(e.video.bitRate).toString()), t.searchParams.append("video.codec", e.video.codec)), e.expectAdditionalConnection && t.searchParams.append("expectAdditionalConnection", e.expectAdditionalConnection.toString()), e.burstMs && t.searchParams.append("burstMs", e.burstMs.toString()), e.channelGroupId && t.searchParams.append("channelGroupId", e.channelGroupId), e.authToken && (t.searchParams.append("auth.token", e.authToken), t.searchParams.append("auth.type", "jwt")), t.toString();
7357
7368
  };
7358
- class SA extends bi {
7369
+ class IA extends bi {
7359
7370
  constructor(t, i) {
7360
7371
  super();
7361
7372
  r(this, "options");
@@ -7492,7 +7503,7 @@ class SA extends bi {
7492
7503
  return this._connectTime;
7493
7504
  }
7494
7505
  }
7495
- const EA = 65536 * 8, TA = 0.9, th = (s) => EA * TA * 1e3 / s, lt = class lt {
7506
+ const CA = 65536 * 8, kA = 0.9, th = (s) => CA * kA * 1e3 / s, lt = class lt {
7496
7507
  constructor(e, t, i) {
7497
7508
  r(this, "emitter");
7498
7509
  r(this, "transport");
@@ -7507,7 +7518,7 @@ const EA = 65536 * 8, TA = 0.9, th = (s) => EA * TA * 1e3 / s, lt = class lt {
7507
7518
  r(this, "contextSwitchesInProgress", /* @__PURE__ */ new Set());
7508
7519
  r(this, "contextSwitchesCompleted", /* @__PURE__ */ new Set());
7509
7520
  r(this, "buffer", []);
7510
- r(this, "disconnected", new W());
7521
+ r(this, "disconnected", new z());
7511
7522
  r(this, "unload", () => {
7512
7523
  this.logger.debug("Unloading module..."), this.close("Unloading"), this.emitter.off("send signal", this.sendSignal), this.emitter.off("disconnect", this.close), this.emitter.off("reconnect", this.reconnect), this.logger.debug("Unloaded module");
7513
7524
  });
@@ -7571,7 +7582,7 @@ const EA = 65536 * 8, TA = 0.9, th = (s) => EA * TA * 1e3 / s, lt = class lt {
7571
7582
  ), n = this.config.options.get("media") === "audio+video";
7572
7583
  let o = 1;
7573
7584
  n && (o = i !== !1 ? 2 : 1);
7574
- const c = vA(this.config.edgeUrl, {
7585
+ const c = TA(this.config.edgeUrl, {
7575
7586
  video: t.video,
7576
7587
  audio: t.audio,
7577
7588
  burstMs: t.burstMs,
@@ -7605,7 +7616,7 @@ const EA = 65536 * 8, TA = 0.9, th = (s) => EA * TA * 1e3 / s, lt = class lt {
7605
7616
  }
7606
7617
  });
7607
7618
  r(this, "connectWebSocketTransport", () => {
7608
- const e = new SA(
7619
+ const e = new IA(
7609
7620
  {
7610
7621
  reconnectDelay: 1e3,
7611
7622
  onMessage: this.onMessage,
@@ -7672,7 +7683,7 @@ r(lt, "PING_INTERVAL", 5e3), r(lt, "MAX_MISSED_PINGS", 4), r(lt, "TLS_ROUNDTRIPS
7672
7683
  }));
7673
7684
  let Mh = lt;
7674
7685
  var Gn, pi, jn;
7675
- class IA {
7686
+ class BA {
7676
7687
  constructor(e) {
7677
7688
  u(this, Gn);
7678
7689
  u(this, pi, []);
@@ -7812,7 +7823,7 @@ const Gs = class Gs {
7812
7823
  St = new WeakMap(), Wn = new WeakMap(), jt = new WeakMap(), zn = new WeakMap(), Hn = new WeakMap(), Xn = new WeakMap(), pc = new WeakMap(), gc = new WeakMap(), Ac = new WeakSet(), Wl = function() {
7813
7824
  return m(this, null, function* () {
7814
7825
  var t;
7815
- const e = new IA({ edgeUrl: this.config.options.get("edgeUrl") });
7826
+ const e = new BA({ edgeUrl: this.config.options.get("edgeUrl") });
7816
7827
  for (l(this, jt, 0); ; ) {
7817
7828
  qe(this, jt)._++;
7818
7829
  try {
@@ -7861,7 +7872,7 @@ const ih = () => ({
7861
7872
  audio: {
7862
7873
  bitRate: wi()
7863
7874
  }
7864
- }), CA = () => ({
7875
+ }), RA = () => ({
7865
7876
  width: window.innerWidth,
7866
7877
  height: window.innerHeight,
7867
7878
  bitRate: wi()
@@ -7919,7 +7930,7 @@ const ih = () => ({
7919
7930
  });
7920
7931
  r(this, "evaluateConstraintCap", () => {
7921
7932
  var c, h, d, f, p;
7922
- const e = this.sizeBasedResolutionCapEnabled ? F(v({}, ih()), { video: CA() }) : ih();
7933
+ const e = this.sizeBasedResolutionCapEnabled ? F(v({}, ih()), { video: RA() }) : ih();
7923
7934
  if (!this.resizeObserver) {
7924
7935
  const g = this.element.getBoundingClientRect();
7925
7936
  this.elementSize = { width: g.width, height: g.height };
@@ -7957,7 +7968,7 @@ const ih = () => ({
7957
7968
  };
7958
7969
  r(js, "CHECK_SIZE_INTERVAL", 1e3), r(js, "create", (e, t, i, n) => new js(e, t, i, n));
7959
7970
  let _h = js;
7960
- const kA = 5, BA = 100, RA = 1e3;
7971
+ const UA = 5, PA = 100, xA = 1e3;
7961
7972
  class od {
7962
7973
  constructor(e, t, i, n) {
7963
7974
  r(this, "timers", Ae.create());
@@ -7967,7 +7978,7 @@ class od {
7967
7978
  r(this, "playbackSource");
7968
7979
  r(this, "isSuspended", !1);
7969
7980
  r(this, "load", () => {
7970
- this.timers.setInterval(this.emitDecodedFrames, BA), this.timers.setInterval(this.emitDecodeRate, RA), this.emitter.on("init segment", this.onInitSegment), this.emitter.on("coded sample", this.decode);
7981
+ this.timers.setInterval(this.emitDecodedFrames, PA), this.timers.setInterval(this.emitDecodeRate, xA), this.emitter.on("init segment", this.onInitSegment), this.emitter.on("coded sample", this.decode);
7971
7982
  });
7972
7983
  r(this, "unload", () => {
7973
7984
  this.trackContexts.forEach(({ decoderContext: e }) => e.unload()), this.timers.unload(), this.emitter.off("init segment", this.onInitSegment), this.emitter.off("coded sample", this.decode);
@@ -8018,7 +8029,7 @@ class od {
8018
8029
  return;
8019
8030
  t.sampleDuration = e.duration / e.timescale * 1e3;
8020
8031
  const { decoderContext: i, buffer: n } = t, o = e.timestamp / e.timescale * 1e3, c = e.duration / e.timescale * 1e3, h = n[n.length - 1];
8021
- !h || o - kA > h.end ? n.push({ start: o, end: o + c }) : o + c * 5 < h.end ? t.buffer = [{ start: o, end: o + c }] : h.end = o + c, i.enqueue(e), this.emitDecodedFrames();
8032
+ !h || o - UA > h.end ? n.push({ start: o, end: o + c }) : o + c * 5 < h.end ? t.buffer = [{ start: o, end: o + c }] : h.end = o + c, i.enqueue(e), this.emitDecodedFrames();
8022
8033
  });
8023
8034
  r(this, "emitDecodedFrames", () => {
8024
8035
  let e;
@@ -8067,7 +8078,7 @@ class od {
8067
8078
  for (const h of i)
8068
8079
  switch (h.type) {
8069
8080
  case "audio": {
8070
- const { OpusDecoderContext: d } = yield import("./qgbxfgHO.js");
8081
+ const { OpusDecoderContext: d } = yield import("./DAUDJ8Kv.js");
8071
8082
  c.set(h.type, {
8072
8083
  buffer: [],
8073
8084
  decoderContext: yield d.create(48e3, 2),
@@ -8078,7 +8089,7 @@ class od {
8078
8089
  break;
8079
8090
  }
8080
8091
  case "video": {
8081
- const { H264DecoderWorkerContext: d } = yield import("./C2DYLJ9t.js");
8092
+ const { H264DecoderWorkerContext: d } = yield import("./m1nPZTf2.js");
8082
8093
  c.set(h.type, {
8083
8094
  buffer: [],
8084
8095
  decoderContext: yield d.create(o),
@@ -8145,12 +8156,12 @@ const wc = class wc {
8145
8156
  };
8146
8157
  r(wc, "create", (e) => new wc(e));
8147
8158
  let Nh = wc;
8148
- const UA = (s) => (e, t, i) => e.timestamp <= t || e.timestampAdded <= i - s, Zt = class Zt {
8159
+ const LA = (s) => (e, t, i) => e.timestamp <= t || e.timestampAdded <= i - s, Zt = class Zt {
8149
8160
  constructor(e, t, i) {
8150
8161
  r(this, "logger");
8151
8162
  r(this, "emitter");
8152
8163
  r(this, "waitingEvents", []);
8153
- r(this, "isTriggered", UA(Zt.EVENT_TIMEOUT));
8164
+ r(this, "isTriggered", LA(Zt.EVENT_TIMEOUT));
8154
8165
  r(this, "timeSource");
8155
8166
  r(this, "timers", new Ae());
8156
8167
  r(this, "load", () => {
@@ -8245,11 +8256,11 @@ const $e = class $e {
8245
8256
  };
8246
8257
  r($e, "NO_DATA_ERROR_TIMEOUT", 20 * 1e3), r($e, "NO_DATA_TIMEOUT", 5 * 1e3), r($e, "UPDATE_RECEIVED_BYTES_INTERVAL", 1e3), r($e, "create", (e) => new $e(e));
8247
8258
  let Gh = $e;
8248
- const PA = () => window.AudioContext || window.webkitAudioContext, bc = class bc extends bi {
8259
+ const DA = () => window.AudioContext || window.webkitAudioContext, bc = class bc extends bi {
8249
8260
  constructor() {
8250
8261
  super();
8251
8262
  // TODO: Checkout what happens when limit is reached
8252
- r(this, "context", new (PA())());
8263
+ r(this, "context", new (DA())());
8253
8264
  r(this, "timers", Ae.create());
8254
8265
  r(this, "previousCurrentTime", 0);
8255
8266
  r(this, "_isStuck", !1);
@@ -8508,7 +8519,7 @@ const Ii = (s, e) => {
8508
8519
  for (t = e; s > 1; s--) t += e;
8509
8520
  return t;
8510
8521
  };
8511
- class xA {
8522
+ class OA {
8512
8523
  constructor() {
8513
8524
  r(this, "audio");
8514
8525
  r(this, "unmute", () => this.audio.play().catch(L));
@@ -8522,7 +8533,7 @@ class xA {
8522
8533
  }
8523
8534
  }
8524
8535
  var Ha, Et, fe, ls, Xe, Hl, Ps, Xl;
8525
- class LA {
8536
+ class MA {
8526
8537
  constructor() {
8527
8538
  u(this, Xe);
8528
8539
  u(this, Ha, []);
@@ -8587,7 +8598,7 @@ Ha = new WeakMap(), Et = new WeakMap(), fe = new WeakMap(), ls = new WeakMap(),
8587
8598
  }
8588
8599
  return i;
8589
8600
  };
8590
- const DA = `
8601
+ const FA = `
8591
8602
  precision mediump float;
8592
8603
  uniform sampler2D texture;
8593
8604
 
@@ -8599,7 +8610,7 @@ void main() {
8599
8610
 
8600
8611
  gl_FragColor = vec4(y, y, y, a);
8601
8612
  }
8602
- `, OA = `
8613
+ `, _A = `
8603
8614
  attribute vec2 position;
8604
8615
  varying vec2 texture_coordinate;
8605
8616
  uniform mat4 model;
@@ -8661,7 +8672,7 @@ void main() {
8661
8672
  return i;
8662
8673
  };
8663
8674
  var vc, N, Xa, Qa, Za, Ai, Zn, Ql, Zl, Sc;
8664
- class MA {
8675
+ class NA {
8665
8676
  constructor(e) {
8666
8677
  u(this, Zn);
8667
8678
  u(this, vc, 96);
@@ -8670,7 +8681,7 @@ class MA {
8670
8681
  u(this, Qa);
8671
8682
  u(this, Za);
8672
8683
  u(this, Ai);
8673
- r(this, "subtitleRenderer", new LA());
8684
+ r(this, "subtitleRenderer", new MA());
8674
8685
  // prettier-ignore
8675
8686
  u(this, Sc, (e, t, i, n) => [
8676
8687
  e,
@@ -8690,7 +8701,7 @@ class MA {
8690
8701
  0,
8691
8702
  1
8692
8703
  ]);
8693
- l(this, N, e), l(this, Xa, Ui(e)), l(this, Qa, xs(e, e.FRAGMENT_SHADER, DA)), l(this, Za, xs(e, e.VERTEX_SHADER, OA)), l(this, Ai, Wh(e, a(this, Za), a(this, Qa))), this.subtitleRenderer.config.fontSize = "64px";
8704
+ l(this, N, e), l(this, Xa, Ui(e)), l(this, Qa, xs(e, e.FRAGMENT_SHADER, FA)), l(this, Za, xs(e, e.VERTEX_SHADER, _A)), l(this, Ai, Wh(e, a(this, Za), a(this, Qa))), this.subtitleRenderer.config.fontSize = "64px";
8694
8705
  }
8695
8706
  setActiveCues(e, t) {
8696
8707
  this.subtitleRenderer.setActiveCues(e), this.subtitleRenderer.render(t);
@@ -8887,7 +8898,7 @@ void main() {
8887
8898
  this.canvas.addEventListener("webglcontextlost", this.onContextLost), this.canvas.addEventListener("webglcontextrestored", this.onContextRestored, !1), this.canvas.style.width = "100%", this.canvas.style.position = "relative";
8888
8899
  }
8889
8900
  getTextRenderer() {
8890
- return this.textRenderer || (this.textRenderer = new MA(this.context)), this.textRenderer;
8901
+ return this.textRenderer || (this.textRenderer = new NA(this.context)), this.textRenderer;
8891
8902
  }
8892
8903
  };
8893
8904
  r(kr, "SQUARE_VERTICES", new Float32Array([0, 0, 0, 1, 1, 0, 1, 1]));
@@ -8967,7 +8978,7 @@ const Tc = class Tc {
8967
8978
  r(this, "audioPlayer");
8968
8979
  r(this, "videoPlayer");
8969
8980
  r(this, "pool");
8970
- r(this, "unmuter", new xA());
8981
+ r(this, "unmuter", new OA());
8971
8982
  r(this, "_isPaused", !1);
8972
8983
  r(this, "isDisconnected", !1);
8973
8984
  r(this, "timers", new Ae());
@@ -9220,8 +9231,8 @@ const Ic = class Ic {
9220
9231
  };
9221
9232
  r(Ic, "create", (e, t, i, n, o) => new Ic(e, t, i, n, o));
9222
9233
  let Xh = Ic;
9223
- const FA = () => (s) => ql(s.buffered.start(0), s.buffered.end(s.buffered.length - 1)), ql = (s, e) => (t) => t.remove(Math.max(0, s), Math.min(Number.POSITIVE_INFINITY, e)), $d = (s) => (e) => e.appendBuffer(s), _A = (s) => (e) => e.changeType(s), NA = (s) => (e) => s(e);
9224
- class VA {
9234
+ const VA = () => (s) => ql(s.buffered.start(0), s.buffered.end(s.buffered.length - 1)), ql = (s, e) => (t) => t.remove(Math.max(0, s), Math.min(Number.POSITIVE_INFINITY, e)), $d = (s) => (e) => e.appendBuffer(s), GA = (s) => (e) => e.changeType(s), jA = (s) => (e) => s(e);
9235
+ class WA {
9225
9236
  constructor(e) {
9226
9237
  r(this, "commandQueue", []);
9227
9238
  r(this, "sourceBuffer");
@@ -9239,7 +9250,7 @@ class VA {
9239
9250
  this.commandQueue.push(o), this.handleQueue();
9240
9251
  }));
9241
9252
  r(this, "execute", (e) => new Promise((t, i) => {
9242
- const n = new Ts(NA(e), t, i);
9253
+ const n = new Ts(jA(e), t, i);
9243
9254
  this.commandQueue.push(n), this.handleQueue();
9244
9255
  }));
9245
9256
  r(this, "buffered", () => this.sourceBuffer.buffered);
@@ -9247,7 +9258,7 @@ class VA {
9247
9258
  e.removeSourceBuffer(this.sourceBuffer);
9248
9259
  });
9249
9260
  r(this, "changeType", (e) => new Promise((t, i) => {
9250
- const n = new Ts(_A(e), t, i);
9261
+ const n = new Ts(GA(e), t, i);
9251
9262
  this.commandQueue.push(n), this.handleQueue();
9252
9263
  }));
9253
9264
  r(this, "removeBuffer", (e, t) => new Promise((i, n) => {
@@ -9255,7 +9266,7 @@ class VA {
9255
9266
  this.commandQueue.push(o), this.handleQueue();
9256
9267
  }));
9257
9268
  r(this, "flush", () => new Promise((e, t) => {
9258
- const i = new Ts(FA, e, t);
9269
+ const i = new Ts(VA, e, t);
9259
9270
  this.commandQueue.push(i), this.handleQueue();
9260
9271
  }));
9261
9272
  this.sourceBuffer = e, this.sourceBuffer.addEventListener("updateend", this.handleQueue);
@@ -9293,7 +9304,7 @@ class $l extends bi {
9293
9304
  });
9294
9305
  r(this, "addSourceBuffer", (t) => {
9295
9306
  const i = this.mediaSource.addSourceBuffer(t);
9296
- return new VA(i);
9307
+ return new WA(i);
9297
9308
  });
9298
9309
  r(this, "removeSourceBuffer", (t) => {
9299
9310
  t.removeFromMediaSource(this.mediaSource);
@@ -9337,7 +9348,7 @@ class Yl {
9337
9348
  });
9338
9349
  }
9339
9350
  }
9340
- function GA(s, { mediaSource: e, mimeType: t, codec: i }) {
9351
+ function zA(s, { mediaSource: e, mimeType: t, codec: i }) {
9341
9352
  return F(v({}, s), {
9342
9353
  state: "initialized",
9343
9354
  mimeType: t,
@@ -9438,7 +9449,7 @@ const Cc = class Cc {
9438
9449
  let n = this.trackContexts.get(i.type);
9439
9450
  n || (n = Yd({ pendingSamples: [], initSegments: new Yl() }), this.trackContexts.set(i.type, n)), n.state === "initialized" ? i.mimeType !== n.mimeType && (yield n.sourceBuffer.changeType(i.mimeType)) : this.trackContexts.set(
9440
9451
  i.type,
9441
- GA(n, {
9452
+ zA(n, {
9442
9453
  mimeType: i.mimeType,
9443
9454
  mediaSource: this.mediaSource,
9444
9455
  codec: i.codec
@@ -9470,7 +9481,7 @@ const Cc = class Cc {
9470
9481
  if (!i)
9471
9482
  throw Ya(e.type, e.renditionId);
9472
9483
  i.state === "initialized" && (i.mimeType = t);
9473
- const n = Fp(e.codec, e.data, e.timescale);
9484
+ const n = Vp(e.codec, e.data, e.timescale);
9474
9485
  n && i.initSegments.set(e.channelId, e.renditionId, new Uint8Array(n));
9475
9486
  });
9476
9487
  r(this, "append", (e, t) => m(this, null, function* () {
@@ -9506,7 +9517,7 @@ const Cc = class Cc {
9506
9517
  for (const f of e)
9507
9518
  "initData" in f && (yield n.sourceBuffer.appendBuffer(f.data, f.initData));
9508
9519
  else {
9509
- const f = Wp(e, d++);
9520
+ const f = Xp(e, d++);
9510
9521
  yield n.sourceBuffer.appendBuffer(f);
9511
9522
  }
9512
9523
  n.sequenceNumber = d, n.consecutiveQuotaExceededErrorCount = 0, n.successfulAppendCalls++;
@@ -9563,7 +9574,7 @@ const Cc = class Cc {
9563
9574
  const i = v({}, e);
9564
9575
  "fragment" in i ? (i.fragment = i.fragment.clone(), i.fragment.updateBaseMediaDecodeTime(0), i.data = i.fragment.rawBytes()) : i.timestamp = 0, t.pendingSamples.push(i);
9565
9576
  }
9566
- t.hasFirstSync = !0, t.pendingSamples.push(e), t.state !== "uninitialized" && (t.isWorkingOnPendingSamples || jA(t, this.append, this.maxChunkSize).catch((i) => {
9577
+ t.hasFirstSync = !0, t.pendingSamples.push(e), t.state !== "uninitialized" && (t.isWorkingOnPendingSamples || HA(t, this.append, this.maxChunkSize).catch((i) => {
9567
9578
  if (t.isWorkingOnPendingSamples = !1, i instanceof Error) {
9568
9579
  if (this.logger.error("append failed", { message: i.message, name: i.name }), i instanceof DOMException && i.code === DOMException.QUOTA_EXCEEDED_ERR) {
9569
9580
  if (t.consecutiveQuotaExceededErrorCount >= this.minConsecutiveErrorsBeforeEmit) {
@@ -9609,7 +9620,7 @@ const Jd = (s, e) => {
9609
9620
  const t = s.renditionId !== e.renditionId, i = s.channelId !== e.channelId, n = ((h = s.timestamp) != null ? h : 0) > e.timestamp, o = s.type === "video" && e.type === "video" && "levelIdc" in s && "levelIdc" in e && s.levelIdc !== e.levelIdc;
9610
9621
  let c = !1;
9611
9622
  return s.type === "video" && e.type === "video" && "width" in s && "width" in e && (c = e.width !== s.width || e.height !== s.height), i || t || n || c || o;
9612
- }, jA = (s, e, t) => m(void 0, null, function* () {
9623
+ }, HA = (s, e, t) => m(void 0, null, function* () {
9613
9624
  for (s.isWorkingOnPendingSamples = !0; s.pendingSamples.length > 0; ) {
9614
9625
  const i = [];
9615
9626
  let n = 0;
@@ -9722,7 +9733,7 @@ const $h = () => ({
9722
9733
  bufferingRanges: [],
9723
9734
  activeRanges: [],
9724
9735
  decodeRate: Number.MAX_SAFE_INTEGER
9725
- }), WA = () => ({
9736
+ }), XA = () => ({
9726
9737
  levels: {},
9727
9738
  levelDowngrades: [],
9728
9739
  levelUpgrades: [],
@@ -9734,7 +9745,7 @@ const $h = () => ({
9734
9745
  r(this, "logger");
9735
9746
  r(this, "emitter");
9736
9747
  r(this, "timers", Ae.create());
9737
- r(this, "metrics", WA());
9748
+ r(this, "metrics", XA());
9738
9749
  r(this, "bufferFullness", new pe(30));
9739
9750
  r(this, "bufferFullnessRegression");
9740
9751
  r(this, "currentLevel");
@@ -9997,7 +10008,7 @@ const Uc = class Uc {
9997
10008
  };
9998
10009
  r(Uc, "create", (e, t) => new Uc(e, t));
9999
10010
  let Jh = Uc;
10000
- const er = (s) => JSON.parse(JSON.stringify(s)), zA = 1e4, Pc = class Pc {
10011
+ const er = (s) => JSON.parse(JSON.stringify(s)), QA = 1e4, Pc = class Pc {
10001
10012
  constructor(e, t, i) {
10002
10013
  r(this, "logger");
10003
10014
  r(this, "timers", new Ae());
@@ -10058,7 +10069,7 @@ const er = (s) => JSON.parse(JSON.stringify(s)), zA = 1e4, Pc = class Pc {
10058
10069
  const e = this.currentSubscription.channelId, t = this.targetSubscription.channelId, i = e !== t;
10059
10070
  this._isSwitchingSubscription && (i && this.burstMs ? this.setBurst(this.burstMs) : this.setBurst(0), this.pendingSubscriptionTimeoutId && (this.timers.clearTimeout(this.pendingSubscriptionTimeoutId), this.pendingSubscriptionTimeoutId = void 0), i && this.timers.setTimeout(() => {
10060
10071
  this.currentSubscription.channelId === e && this.targetSubscription.channelId === t && (this.logger.warn("Channel switch timeout", t), this.targetSubscription = er(this.currentSubscription), this.emitter.emit("channel switch timeout", t));
10061
- }, zA), this.pendingSubscriptionTimeoutId = this.timers.setTimeout(
10072
+ }, QA), this.pendingSubscriptionTimeoutId = this.timers.setTimeout(
10062
10073
  () => this.emitter.emit("send signal", {
10063
10074
  type: "subscribe",
10064
10075
  subscription: this.getTargetSubscription()
@@ -10071,7 +10082,7 @@ const er = (s) => JSON.parse(JSON.stringify(s)), zA = 1e4, Pc = class Pc {
10071
10082
  };
10072
10083
  r(Pc, "create", (e, t, i) => new Pc(e, i, t));
10073
10084
  let Kh = Pc;
10074
- const Kd = 5e3, HA = () => vu() || Mc() || Am(), eu = () => HA() ? 100 : 0, tu = (s) => (e) => e > s, xc = class xc {
10085
+ const Kd = 5e3, ZA = () => vu() || Mc() || Am(), eu = () => ZA() ? 100 : 0, tu = (s) => (e) => e > s, xc = class xc {
10075
10086
  constructor(e, t, i, n, o) {
10076
10087
  r(this, "emitter");
10077
10088
  r(this, "logger");
@@ -10382,7 +10393,7 @@ const Kd = 5e3, HA = () => vu() || Mc() || Am(), eu = () => HA() ? 100 : 0, tu =
10382
10393
  };
10383
10394
  r(xc, "create", (e, t, i, n, o) => new xc(e, t, i, n, o));
10384
10395
  let ed = xc;
10385
- const XA = {
10396
+ const qA = {
10386
10397
  enabled: !0,
10387
10398
  interval: 3e4,
10388
10399
  includeErrors: !0,
@@ -10469,7 +10480,7 @@ const XA = {
10469
10480
  );
10470
10481
  }
10471
10482
  });
10472
- this.logger = e, this.emitter = t, this.options = v(v({}, XA), i), this.parentContext = n;
10483
+ this.logger = e, this.emitter = t, this.options = v(v({}, qA), i), this.parentContext = n;
10473
10484
  }
10474
10485
  };
10475
10486
  r(Lc, "create", (e, t, i, n) => new Lc(e, t, i, n));
@@ -10491,7 +10502,7 @@ const Dc = class Dc {
10491
10502
  };
10492
10503
  r(Dc, "create", (e, t, i) => new Dc(e, t, i));
10493
10504
  let Vo = Dc;
10494
- const QA = 6, ZA = (s) => {
10505
+ const $A = 6, YA = (s) => {
10495
10506
  let e = [s], t = 0, i = 0, n = !1;
10496
10507
  const o = (h, d) => {
10497
10508
  var R, D, E;
@@ -10506,7 +10517,7 @@ const QA = 6, ZA = (s) => {
10506
10517
  });
10507
10518
  };
10508
10519
  return (h, d = !1) => {
10509
- if (h.flags && cr(h.flags) && d && (n = !n), !(d && e.length < QA && n) && e.length > 0) {
10520
+ if (h.flags && cr(h.flags) && d && (n = !n), !(d && e.length < $A && n) && e.length > 0) {
10510
10521
  n = !1;
10511
10522
  let p = h;
10512
10523
  for (let w = e.length - 1; w > 0; w--) {
@@ -10522,7 +10533,7 @@ const QA = 6, ZA = (s) => {
10522
10533
  }
10523
10534
  return e.push(h), [];
10524
10535
  };
10525
- }, qA = (s, e, t) => {
10536
+ }, JA = (s, e, t) => {
10526
10537
  if (ps(e))
10527
10538
  return v(F(v({}, s), {
10528
10539
  type: "video",
@@ -10546,7 +10557,7 @@ const QA = 6, ZA = (s) => {
10546
10557
  duration: 0
10547
10558
  });
10548
10559
  };
10549
- class $A {
10560
+ class KA {
10550
10561
  constructor() {
10551
10562
  r(this, "highEntropyValues");
10552
10563
  var e;
@@ -10591,7 +10602,7 @@ class $A {
10591
10602
  }, n);
10592
10603
  }
10593
10604
  }
10594
- const YA = (s) => {
10605
+ const ew = (s) => {
10595
10606
  if (typeof s != "object" || s === null)
10596
10607
  throw new Error("not an object");
10597
10608
  if (!("video" in s))
@@ -10629,7 +10640,7 @@ const Ve = class Ve extends bi {
10629
10640
  r(this, "latestEmittedLanguages", []);
10630
10641
  r(this, "wakeLock");
10631
10642
  r(this, "pool", new vd(Ve.MAX_POOL_SIZE));
10632
- r(this, "userAgentInformation", new $A());
10643
+ r(this, "userAgentInformation", new KA());
10633
10644
  r(this, "encryptedMediaExtensions");
10634
10645
  u(this, ms, 0);
10635
10646
  u(this, Me, []);
@@ -10784,7 +10795,7 @@ const Ve = class Ve extends bi {
10784
10795
  const y = this.options.get("advanced"), S = (p = y.wasmDecodingConstraint.bitRate) != null ? p : Number.MAX_SAFE_INTEGER, x = (g = y.wasmDecodingConstraint.width) != null ? g : Number.MAX_SAFE_INTEGER, R = (w = y.wasmDecodingConstraint.height) != null ? w : Number.MAX_SAFE_INTEGER;
10785
10796
  return h.bitRate <= S && h.width <= x && h.height <= R;
10786
10797
  }
10787
- const d = yield ig(h);
10798
+ const d = yield rg(h);
10788
10799
  if (!d.supported || h.codec == "av1" && !d.smooth && !d.powerEfficient)
10789
10800
  return !1;
10790
10801
  const f = this.options.getOverride("maxVideoBitRate", this.channelId);
@@ -10906,7 +10917,7 @@ const Ve = class Ve extends bi {
10906
10917
  this.options.get("pauseSupportEnabled") && this.playbackState !== "paused" && (this.playbackSource.pause(), this.hasCalledConnect && this.suspend());
10907
10918
  });
10908
10919
  r(this, "registerDebugInstance", () => {
10909
- tg(this);
10920
+ ng(this);
10910
10921
  });
10911
10922
  /**
10912
10923
  *
@@ -10948,7 +10959,7 @@ const Ve = class Ve extends bi {
10948
10959
  const t = this.modules.canvasModule ? this.options.get("iosMediaElementEnabled") : void 0;
10949
10960
  return v({
10950
10961
  uptime: Date.now() - this.createdAt,
10951
- version: "4.1.1-6-g237cdbd9",
10962
+ version: "4.1.1-8-g682454b9",
10952
10963
  clientId: this.clientId,
10953
10964
  sessionId: this.sessionId,
10954
10965
  channelId: this.channelId,
@@ -10980,7 +10991,7 @@ const Ve = class Ve extends bi {
10980
10991
  if (i && t)
10981
10992
  return t - i;
10982
10993
  });
10983
- this.options = new eg(v(v({}, Um), of(t)));
10994
+ this.options = new sg(v(v({}, Um), of(t)));
10984
10995
  const i = ["localhost", "127.0.0.1"];
10985
10996
  t.telemetryEnabled === void 0 && i.includes(location.hostname) && this.options.set("telemetryEnabled", !1);
10986
10997
  const n = {
@@ -11061,7 +11072,7 @@ const Ve = class Ve extends bi {
11061
11072
  this,
11062
11073
  this.options.get("muted") || this.options.get("media") === "video"
11063
11074
  );
11064
- this.element = b.element(), this.playbackSource = b, E = b, this.options.get("iosWakeLockEnabled") && (this.wakeLock = new $p());
11075
+ this.element = b.element(), this.playbackSource = b, E = b, this.options.get("iosWakeLockEnabled") && (this.wakeLock = new Kp());
11065
11076
  }
11066
11077
  this.emitter.on("channel reset", this.resetModules), this.emitter.on("no data timeout", this.resetModules), this.emitter.on("media element state", (b) => this.onMediaElementState(b)), this.emitter.on("volume state", (b) => this.emit("volume state", b)), this.options.get("pauseSupportEnabled") || this.emitter.on("exit picture in picture", () => h.setTimeout(() => this.play(), 0)), this.emitter.on("constraint cap changed", (b) => {
11067
11078
  this.logger.info("new cap set", { cap: b }), this.alignSizeAndBitRate(this.targetSubscription);
@@ -11162,8 +11173,8 @@ const Ve = class Ve extends bi {
11162
11173
  }), this.emitter.on("recovered from media error", () => {
11163
11174
  this.modules.adaptivity.reset(this.targetBufferTime * 2);
11164
11175
  }), this.emitter.once("connect info", (b) => {
11165
- var G, O, M;
11166
- const H = ((O = (G = b.telemetry) == null ? void 0 : G.probability) != null ? O : 1) >= Math.random();
11176
+ var j, O, M;
11177
+ const H = ((O = (j = b.telemetry) == null ? void 0 : j.probability) != null ? O : 1) >= Math.random();
11167
11178
  b.telemetry && ((M = this.modules.telemetry) == null || M.unload(), this.modules.telemetry = No.create(
11168
11179
  this.logger.createContext("TelemetryModule"),
11169
11180
  this.emitter,
@@ -11173,25 +11184,25 @@ const Ve = class Ve extends bi {
11173
11184
  this
11174
11185
  ), this.modules.telemetry.load());
11175
11186
  }), this.emitter.on("adapt level", (b) => {
11176
- var Qe, q, re, ht, Ze;
11187
+ var Qe, q, ae, ht, Ze;
11177
11188
  this.logger.debug("adapt level", { direction: b });
11178
- const I = this.modules.renditions.getRenditionLevels(), H = this.modules.renditions.getRenditionLevel(), G = I.findIndex((te) => te === H), O = I.length - 1;
11179
- let M = G;
11189
+ const I = this.modules.renditions.getRenditionLevels(), H = this.modules.renditions.getRenditionLevel(), j = I.findIndex((te) => te === H), O = I.length - 1;
11190
+ let M = j;
11180
11191
  switch (b) {
11181
11192
  case "upgrade":
11182
11193
  {
11183
- const te = Math.min(G + 1, O), dt = I[te], Jl = (Qe = this.modules.connection.estimatedBandwidth) != null ? Qe : wi(), Kl = ((re = (q = dt == null ? void 0 : dt.audio) == null ? void 0 : q.bitRate) != null ? re : 0) + ((Ze = (ht = dt == null ? void 0 : dt.video) == null ? void 0 : ht.bitRate) != null ? Ze : 0), em = Jl * 2 > Kl;
11194
+ const te = Math.min(j + 1, O), dt = I[te], Jl = (Qe = this.modules.connection.estimatedBandwidth) != null ? Qe : wi(), Kl = ((ae = (q = dt == null ? void 0 : dt.audio) == null ? void 0 : q.bitRate) != null ? ae : 0) + ((Ze = (ht = dt == null ? void 0 : dt.video) == null ? void 0 : ht.bitRate) != null ? Ze : 0), em = Jl * 2 > Kl;
11184
11195
  dt && em && this.modules.adaptivity.isQoSOk(dt) && (M = te);
11185
11196
  }
11186
11197
  break;
11187
11198
  case "downgrade":
11188
- M = Math.max(G - 1, 0);
11199
+ M = Math.max(j - 1, 0);
11189
11200
  break;
11190
11201
  case "double downgrade":
11191
- M = Math.max(G - 2, 0);
11202
+ M = Math.max(j - 2, 0);
11192
11203
  break;
11193
11204
  case "reconnect":
11194
- if (G === 0 || this.modules.qualityOfService.timeSpentBufferingLast(6e3) > 5e3) {
11205
+ if (j === 0 || this.modules.qualityOfService.timeSpentBufferingLast(6e3) > 5e3) {
11195
11206
  if (!this.modules.connection.lastConnectionTime || Date.now() - this.modules.connection.lastConnectionTime < this.modules.qualityOfService.fatalQosGraceTime() || this.modules.connection.getState() !== "connected")
11196
11207
  return;
11197
11208
  this.modules.qualityOfService.incrementFatalQosCount(), this.logger.info("Reconnecting due to poor qos"), this.modules.connection.reconnect("Fatal QOS"), this.emitter.emit("adapted level");
@@ -11199,7 +11210,7 @@ const Ve = class Ve extends bi {
11199
11210
  } else
11200
11211
  M = 0;
11201
11212
  }
11202
- if (M === G)
11213
+ if (M === j)
11203
11214
  return;
11204
11215
  const Z = I[M];
11205
11216
  this.alignSizeAndBitRate(F(v({}, this.targetSubscription), {
@@ -11207,18 +11218,18 @@ const Ve = class Ve extends bi {
11207
11218
  audio: v(v({}, this.targetSubscription.audio), Z == null ? void 0 : Z.audio)
11208
11219
  })), this.emitter.emit("adapted level");
11209
11220
  }), this.emitter.on("text track data", (b) => {
11210
- const I = a(this, Me).find((M) => M.language === b.language), G = this.modules.sync.getTimeshiftOffset() / 1e3, O = G - a(this, ms);
11211
- if (l(this, ms, G), I) {
11221
+ const I = a(this, Me).find((M) => M.language === b.language), j = this.modules.sync.getTimeshiftOffset() / 1e3, O = j - a(this, ms);
11222
+ if (l(this, ms, j), I) {
11212
11223
  if (I.cues)
11213
11224
  for (const M of I.cues)
11214
11225
  M.startTime -= O, M.endTime -= O;
11215
11226
  for (const M of b.cues) {
11216
- const Z = new VTTCue(M.startTime - G, M.endTime - G, M.text);
11227
+ const Z = new VTTCue(M.startTime - j, M.endTime - j, M.text);
11217
11228
  I.addCue(Z);
11218
11229
  }
11219
11230
  }
11220
11231
  }), this.emitter.on("received signal", (b) => {
11221
- var G;
11232
+ var j;
11222
11233
  const I = b, H = this.modules.subscription.getCurrentSubscription();
11223
11234
  switch (this.logger.debug("received", v({}, I)), I.type) {
11224
11235
  case "client ip":
@@ -11236,7 +11247,7 @@ const Ve = class Ve extends bi {
11236
11247
  break;
11237
11248
  case "subscription changed":
11238
11249
  try {
11239
- YA(I.subscription);
11250
+ ew(I.subscription);
11240
11251
  } catch (O) {
11241
11252
  this.emitter.emit(
11242
11253
  "error",
@@ -11251,7 +11262,7 @@ const Ve = class Ve extends bi {
11251
11262
  reset: I.reset,
11252
11263
  to: I.subscription,
11253
11264
  from: this.modules.subscription.getCurrentSubscription()
11254
- }), I.reset && H.channelId !== I.subscription.channelId && (this.emit("error", Rd(I.subscription.channelId)), this.emit("channel switch failed", { channelId: H.channelId })), this.modules.sync.timeshiftOnAudio = !((G = I.subscription.video) != null && G.codec), this.modules.adaptivity.reset();
11265
+ }), I.reset && H.channelId !== I.subscription.channelId && (this.emit("error", Rd(I.subscription.channelId)), this.emit("channel switch failed", { channelId: H.channelId })), this.modules.sync.timeshiftOnAudio = !((j = I.subscription.video) != null && j.codec), this.modules.adaptivity.reset();
11255
11266
  break;
11256
11267
  case "timing info":
11257
11268
  this.modules.sync.updateChannelSyncInfo(I.timingInfo.channelId, I.timingInfo), this.emit("server wallclock time", I.timingInfo.wallclockTime);
@@ -11260,7 +11271,7 @@ const Ve = class Ve extends bi {
11260
11271
  }), this.emitter.on("channel switch timeout", (b) => {
11261
11272
  this.emit("error", Rd(b)), this.emit("channel switch failed", { channelId: this.currentSubscription.channelId });
11262
11273
  }), this.emitter.on("received data", (b) => {
11263
- const I = this.modules.subscription.getCurrentSubscription(), H = Zp(b);
11274
+ const I = this.modules.subscription.getCurrentSubscription(), H = Yp(b);
11264
11275
  if (!I) {
11265
11276
  this.logger.warn("Received unwanted message", v({}, H));
11266
11277
  return;
@@ -11268,7 +11279,7 @@ const Ve = class Ve extends bi {
11268
11279
  kt(F(v({}, H), { channelId: I.channelId }));
11269
11280
  }), this.emitter.on("received moq data", (b) => {
11270
11281
  var M, Z, Qe;
11271
- const I = b.payload.mediaType(), H = b.channelId, G = b.renditionId, O = this.modules.sync.processFragment(H, b.payload);
11282
+ const I = b.payload.mediaType(), H = b.channelId, j = b.renditionId, O = this.modules.sync.processFragment(H, b.payload);
11272
11283
  if (b.switchInfo.channelId && (b.switchInfo.drmTransition && this.emitter.emit("error", Bu("Switching between DRM and non-DRM channels is not supported", !0)), this.encryptedMediaExtensions.onChannelSwitch(), this.emit("rendition levels", this.modules.renditions.getRenditionLevels()), this.modules.event.addEvent({
11273
11284
  type: "channel switch",
11274
11285
  channelId: b.switchInfo.channelId,
@@ -11280,23 +11291,23 @@ const Ve = class Ve extends bi {
11280
11291
  }), this.modules.incomingData.add(I, b.payload.rawBytes().byteLength), O.fragment().emsgs.forEach((q) => {
11281
11292
  if (!q.presentationTime)
11282
11293
  return;
11283
- const re = Rf(q.data);
11284
- re && this.modules.event.addEvent({
11294
+ const ae = Rf(q.data);
11295
+ ae && this.modules.event.addEvent({
11285
11296
  id: q.id,
11286
11297
  timestamp: q.presentationTime / q.timescale * 1e3 - this.modules.sync.getTimeshiftOffset(),
11287
- content: re.txx.value,
11298
+ content: ae.txx.value,
11288
11299
  type: "metadata"
11289
11300
  });
11290
11301
  }), this.modules.decoder) {
11291
- const q = (M = O.header().init().moov.traks[0]) == null ? void 0 : M.mdia.minf.stbl.stsd, re = (Z = q == null ? void 0 : q.avc1) == null ? void 0 : Z.avcC.bytes, ht = (Qe = q == null ? void 0 : q.codec) != null ? Qe : "h264";
11292
- if (re) {
11293
- const Ze = re.buffer.slice(re.byteOffset, re.byteOffset + re.byteLength);
11302
+ const q = (M = O.header().init().moov.traks[0]) == null ? void 0 : M.mdia.minf.stbl.stsd, ae = (Z = q == null ? void 0 : q.avc1) == null ? void 0 : Z.avcC.bytes, ht = (Qe = q == null ? void 0 : q.codec) != null ? Qe : "h264";
11303
+ if (ae) {
11304
+ const Ze = ae.buffer.slice(ae.byteOffset, ae.byteOffset + ae.byteLength);
11294
11305
  if (I === "text")
11295
11306
  throw new Error("Subtitles are not supported");
11296
11307
  this.emitter.emit("init segment", {
11297
11308
  initSegment: {
11298
11309
  channelId: H,
11299
- renditionId: G,
11310
+ renditionId: j,
11300
11311
  data: Ze,
11301
11312
  timescale: 1e3,
11302
11313
  type: I,
@@ -11309,13 +11320,13 @@ const Ve = class Ve extends bi {
11309
11320
  for (let Ze = 0; Ze < O.samplesCount(); Ze++) {
11310
11321
  const te = O.sample(Ze);
11311
11322
  te && this.emitter.emit("coded sample", F(v({}, te), {
11312
- renditionId: G,
11323
+ renditionId: j,
11313
11324
  channelId: H,
11314
11325
  data: te.data.buffer.slice(te.data.byteOffset, te.data.byteOffset + te.data.byteLength)
11315
11326
  }));
11316
11327
  }
11317
11328
  } else
11318
- this.emitter.emit("fragment", { mimeType: b.mimeType, codec: b.codec, fragment: O, channelId: H, renditionId: G });
11329
+ this.emitter.emit("fragment", { mimeType: b.mimeType, codec: b.codec, fragment: O, channelId: H, renditionId: j });
11319
11330
  });
11320
11331
  const Ct = this.options.get("container");
11321
11332
  Ct && this.attach(Ct), this.logger.info("Created Vindral instance", { options: this.options });
@@ -11323,19 +11334,19 @@ const Ve = class Ve extends bi {
11323
11334
  const I = b.channelId;
11324
11335
  a(this, fs) && (yield a(this, fs));
11325
11336
  const H = this.modules.renditions.getRendition(b.renditionId, I);
11326
- if (!Hp(b.flags)) {
11327
- if (Xp(b.flags)) {
11337
+ if (!Zp(b.flags)) {
11338
+ if (qp(b.flags)) {
11328
11339
  const O = new TextDecoder().decode(b.payload), M = this.modules.sync.getTimeshiftOffset();
11329
11340
  if (b.renditionId !== 0) {
11330
11341
  const Z = um(O);
11331
11342
  if (Z && Z.language !== void 0) {
11332
- const q = new zu().parse(Z.content || ""), re = M / 1e3, ht = a(this, Me).find((te) => te.language === Z.language), Ze = re - a(this, ms);
11333
- if (l(this, ms, re), ht) {
11343
+ const q = new zu().parse(Z.content || ""), ae = M / 1e3, ht = a(this, Me).find((te) => te.language === Z.language), Ze = ae - a(this, ms);
11344
+ if (l(this, ms, ae), ht) {
11334
11345
  if (ht.cues)
11335
11346
  for (const te of ht.cues)
11336
11347
  te.startTime -= Ze, te.endTime -= Ze;
11337
11348
  for (const te of q) {
11338
- const dt = new VTTCue(te.startTime - re, te.endTime - re, te.text);
11349
+ const dt = new VTTCue(te.startTime - ae, te.endTime - ae, te.text);
11339
11350
  ht.addCue(dt);
11340
11351
  }
11341
11352
  }
@@ -11347,27 +11358,27 @@ const Ve = class Ve extends bi {
11347
11358
  type: "metadata"
11348
11359
  });
11349
11360
  } else if (H != null && H.codec) {
11350
- const G = lm(H.codec);
11351
- if (G === "text")
11361
+ const j = lm(H.codec);
11362
+ if (j === "text")
11352
11363
  throw new Error("Subtitles are not supported");
11353
- if (this.modules.incomingData.add(G, b.payload.byteLength), zp(b.flags)) {
11364
+ if (this.modules.incomingData.add(j, b.payload.byteLength), Qp(b.flags)) {
11354
11365
  const O = F(v({
11355
- type: G,
11366
+ type: j,
11356
11367
  data: b.payload,
11357
11368
  codec: H.codec
11358
11369
  }, b), {
11359
11370
  channelId: I
11360
- }), M = _p(O.codec, O.payload);
11371
+ }), M = Gp(O.codec, O.payload);
11361
11372
  M && this.sizes.set(O.renditionId, M);
11362
11373
  const Z = Pi({ codec: H.codec, codecString: H.codecString });
11363
11374
  this.emitter.emit("init segment", { initSegment: O, mimeType: Z }), this.emit("initialized media");
11364
11375
  } else {
11365
- const O = qA(b, H, this.sizes.get(b.renditionId));
11366
- let M = this.sampleProcessingSesssions.get(G);
11376
+ const O = JA(b, H, this.sizes.get(b.renditionId));
11377
+ let M = this.sampleProcessingSesssions.get(j);
11367
11378
  if (!M)
11368
- M = ZA(
11379
+ M = YA(
11369
11380
  this.modules.sync.processSample(O)
11370
- ), this.sampleProcessingSesssions.set(G, M);
11381
+ ), this.sampleProcessingSesssions.set(j, M);
11371
11382
  else {
11372
11383
  const Z = M(
11373
11384
  this.modules.sync.processSample(O),
@@ -11799,7 +11810,7 @@ export {
11799
11810
  ge as L,
11800
11811
  Mm as N,
11801
11812
  iu as V,
11802
- tw as a,
11813
+ nw as a,
11803
11814
  Dm as b,
11804
11815
  Lm as c,
11805
11816
  $m as d,