@vindral/web-sdk 4.7.2-5-g4c14d0e4 → 4.7.2-6-gceea26ed

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/legacy.es.js CHANGED
@@ -12266,9 +12266,9 @@ var FC = class {
12266
12266
  s > 0 && performance.now() - i.lastBufferCleanupTime > 1e4 && (i.lastBufferCleanupTime = performance.now(), yield i.sourceBuffer.removeBuffer(0, s + 10));
12267
12267
  try {
12268
12268
  let t = i.sequenceNumber;
12269
- if ("fragmented" in n) for (let t of BC(e)) {
12269
+ if ("fragmented" in n) for (let t of VC(e)) {
12270
12270
  var c;
12271
- yield i.sourceBuffer.appendBuffer(VC(t.map((e) => e.data)), (c = t[0]) == null ? void 0 : c.initData);
12271
+ yield i.sourceBuffer.appendBuffer(HC(t.map((e) => e.data)), (c = t[0]) == null ? void 0 : c.initData);
12272
12272
  }
12273
12273
  else {
12274
12274
  let n = Cl(e, t++);
@@ -12315,18 +12315,19 @@ var FC = class {
12315
12315
  if (e.duration === 0) return;
12316
12316
  let t = this.trackContexts.get(e.type);
12317
12317
  if (!t) throw Li(e.type, e.renditionId);
12318
- if (!(!t.hasFirstSync && !e.isSync)) {
12318
+ let n = t.pendingSamples.length - t.pendingSamplesOffset;
12319
+ if (t.state === "uninitialized" && n >= RC && (e.isSync || n >= 2 * RC) && (t.pendingSamples = [], t.pendingSamplesOffset = 0, t.hasFirstSync = !1), !(!t.hasFirstSync && !e.isSync)) {
12319
12320
  if (this.hasAddedInitialPosterFrame && e.isSync && e.type === "video") {
12320
12321
  this.hasAddedInitialPosterFrame = !1;
12321
12322
  let n = L({}, e);
12322
12323
  "fragment" in n ? (n.fragment = n.fragment.clone(), n.fragment.updateBaseMediaDecodeTime(0), n.data = n.fragment.rawBytes()) : n.timestamp = 0, t.pendingSamples.push(n);
12323
12324
  }
12324
12325
  if (t.hasFirstSync = !0, t.pendingSamples.push(e), e.type === "video" && e.isSync) {
12325
- var n;
12326
- let t = (e.timestamp + ((n = e.compositionTimeOffset) == null ? 0 : n)) / e.timescale * 1e3, r = this.videoKeyframeTimestamps[this.videoKeyframeTimestamps.length - 1];
12327
- r !== void 0 && t < r && (this.videoKeyframeTimestamps = []), this.videoKeyframeTimestamps.push(t), this.videoKeyframeTimestamps.length > 20 && (this.videoKeyframeTimestamps = this.videoKeyframeTimestamps.slice(-20));
12326
+ var r;
12327
+ let t = (e.timestamp + ((r = e.compositionTimeOffset) == null ? 0 : r)) / e.timescale * 1e3, n = this.videoKeyframeTimestamps[this.videoKeyframeTimestamps.length - 1];
12328
+ n !== void 0 && t < n && (this.videoKeyframeTimestamps = []), this.videoKeyframeTimestamps.push(t), this.videoKeyframeTimestamps.length > 20 && (this.videoKeyframeTimestamps = this.videoKeyframeTimestamps.slice(-20));
12328
12329
  }
12329
- t.state !== "uninitialized" && (t.isWorkingOnPendingSamples || UC(t, this.append, this.maxChunkSize).catch((n) => {
12330
+ t.state !== "uninitialized" && (t.isWorkingOnPendingSamples || WC(t, this.append, this.maxChunkSize).catch((n) => {
12330
12331
  if (t.isWorkingOnPendingSamples = !1, !this.isReopening) {
12331
12332
  if (!this.isCurrentTrackContext(e.type, t)) {
12332
12333
  this.logger.debug("Suppressing append error from stale track context", { type: e.type });
@@ -12445,7 +12446,7 @@ var FC = class {
12445
12446
  if (this.mediaSource.isClosed()) return;
12446
12447
  let e = this.getInitializedTrackBuffers();
12447
12448
  if (e.length !== 0) return this.getCommonBufferedRanges(e);
12448
- }), p(this, "getCommonBufferedRanges", (e) => e.slice(1).reduce((e, t) => zC(e, t), e[0] ? Array.from(e[0]) : [])), p(this, "getPlaybackStateForBufferedRanges", (e, t) => gr(t, e) ? "playing" : "buffering"), this.logger = e, this.mediaElement = n, this.emitter = t;
12449
+ }), p(this, "getCommonBufferedRanges", (e) => e.slice(1).reduce((e, t) => BC(e, t), e[0] ? Array.from(e[0]) : [])), p(this, "getPlaybackStateForBufferedRanges", (e, t) => gr(t, e) ? "playing" : "buffering"), this.logger = e, this.mediaElement = n, this.emitter = t;
12449
12450
  }
12450
12451
  };
12451
12452
  jC = FC, p(FC, "create", (e, t, n) => {
@@ -12467,7 +12468,7 @@ var IC = (e, t) => {
12467
12468
  var n;
12468
12469
  let r = e.renditionId !== t.renditionId, i = e.channelId !== t.channelId, a = ((n = e.timestamp) == null ? 0 : n) > t.timestamp, o = e.type === "video" && t.type === "video" && "levelIdc" in e && "levelIdc" in t && e.levelIdc !== t.levelIdc, s = !1;
12469
12470
  return e.type === "video" && t.type === "video" && "width" in e && "width" in t && (s = t.width !== e.width || t.height !== e.height), i || r || a || s || o;
12470
- }, RC = 32, zC = (e, t) => {
12471
+ }, RC = 1e3, zC = 32, BC = (e, t) => {
12471
12472
  let n = [], r = 0, i = 0;
12472
12473
  for (; r < e.length && i < t.length;) {
12473
12474
  let a = e[r], o = t[i];
@@ -12479,7 +12480,7 @@ var IC = (e, t) => {
12479
12480
  }), a.end <= o.end ? r++ : i++;
12480
12481
  }
12481
12482
  return n;
12482
- }, BC = (e) => {
12483
+ }, VC = (e) => {
12483
12484
  let t = [];
12484
12485
  for (let r of e) {
12485
12486
  var n;
@@ -12488,21 +12489,21 @@ var IC = (e, t) => {
12488
12489
  (e == null || (n = e[0]) == null ? void 0 : n.initData) === r.initData ? e.push(r) : t.push([r]);
12489
12490
  }
12490
12491
  return t;
12491
- }, VC = (e) => {
12492
+ }, HC = (e) => {
12492
12493
  if (e.length === 1 && e[0]) return e[0];
12493
12494
  let t = new Uint8Array(e.reduce((e, t) => e + t.byteLength, 0)), n = 0;
12494
12495
  for (let r of e) t.set(r, n), n += r.byteLength;
12495
12496
  return t;
12496
- }, HC = (e) => {
12497
+ }, UC = (e) => {
12497
12498
  let t = e.pendingSamplesOffset;
12498
12499
  if (t !== 0) {
12499
12500
  if (t >= e.pendingSamples.length) {
12500
12501
  e.pendingSamples = [], e.pendingSamplesOffset = 0;
12501
12502
  return;
12502
12503
  }
12503
- t < RC || t * 2 < e.pendingSamples.length || (e.pendingSamples = e.pendingSamples.slice(t), e.pendingSamplesOffset = 0);
12504
+ t < zC || t * 2 < e.pendingSamples.length || (e.pendingSamples = e.pendingSamples.slice(t), e.pendingSamplesOffset = 0);
12504
12505
  }
12505
- }, UC = function() {
12506
+ }, WC = function() {
12506
12507
  var e = N(function* (e, t, n) {
12507
12508
  for (e.isWorkingOnPendingSamples = !0; e.pendingSamplesOffset < e.pendingSamples.length;) {
12508
12509
  let r = [], i = e.pendingSamplesOffset;
@@ -12518,7 +12519,7 @@ var IC = (e, t) => {
12518
12519
  }
12519
12520
  let a = r[0];
12520
12521
  if (!a) break;
12521
- yield t(r, e.previousSample ? LC(e.previousSample, a) : !0), e.pendingSamplesOffset = i + 1, e.previousSample = r[r.length - 1], HC(e);
12522
+ yield t(r, e.previousSample ? LC(e.previousSample, a) : !0), e.pendingSamplesOffset = i + 1, e.previousSample = r[r.length - 1], UC(e);
12522
12523
  }
12523
12524
  e.isWorkingOnPendingSamples = !1;
12524
12525
  });
@@ -12527,7 +12528,7 @@ var IC = (e, t) => {
12527
12528
  };
12528
12529
  }();
12529
12530
  H(), m(), P();
12530
- var WC, GC = class {
12531
+ var GC, KC = class {
12531
12532
  constructor(e, t) {
12532
12533
  var n = this;
12533
12534
  p(this, "logger", void 0), p(this, "emitter", void 0), p(this, "element", void 0), p(this, "pictureInPictureWindow", void 0), p(this, "unload", () => {
@@ -12559,8 +12560,8 @@ var WC, GC = class {
12559
12560
  }()), p(this, "isWebkitPresentationModeSupported", () => !!this.element && Mt(this.element)), this.emitter = e, this.logger = t, this.emitter.on("add picture in picture listener", this.onEnablePictureInPicture);
12560
12561
  }
12561
12562
  };
12562
- WC = GC, p(GC, "create", (e, t) => new WC(e, t)), H(), m();
12563
- var KC, qC = class {
12563
+ GC = KC, p(KC, "create", (e, t) => new GC(e, t)), H(), m();
12564
+ var qC, JC = class {
12564
12565
  constructor(e, t, n, r) {
12565
12566
  p(this, "emitter", void 0), p(this, "logger", void 0), p(this, "clockSource", void 0), p(this, "state", "buffering"), p(this, "bufferFullness", 0), p(this, "targetBufferTime", void 0), p(this, "lastBufferStateEvent", "drained"), p(this, "firstFrameTime", void 0), p(this, "currentTimeIsInRange", !1), p(this, "needsInputForAudioCount", 0), p(this, "needsInputForVideoCount", 0), p(this, "unload", () => {
12566
12567
  this.emitter.off("buffer state", this.onBufferedStateChanged), this.emitter.off("needs user input", this.onNeedsUserInput);
@@ -12578,22 +12579,22 @@ var KC, qC = class {
12578
12579
  }), this.emitter = e, this.logger = t, this.clockSource = n, this.targetBufferTime = r, this.emitter.on("buffer state", this.onBufferedStateChanged), this.emitter.on("needs user input", this.onNeedsUserInput), this.emitter.emit("target buffer time", r);
12579
12580
  }
12580
12581
  };
12581
- KC = qC, p(qC, "create", (e, t, n, r) => new KC(e, t, n, r)), H(), m();
12582
- var JC, YC = () => ({
12582
+ qC = JC, p(JC, "create", (e, t, n, r) => new qC(e, t, n, r)), H(), m();
12583
+ var YC, XC = () => ({
12583
12584
  upgradesFromLevel: [],
12584
12585
  downgradesFromLevel: [],
12585
12586
  bufferingRanges: [],
12586
12587
  activeRanges: [],
12587
12588
  decodeRate: 2 ** 53 - 1
12588
- }), XC = () => ({
12589
+ }), ZC = () => ({
12589
12590
  levels: {},
12590
12591
  levelDowngrades: [],
12591
12592
  levelUpgrades: [],
12592
12593
  bufferFullness: 0,
12593
- general: YC()
12594
- }), ZC = 100, QC = 3600, $C = 1e3, ew = class {
12594
+ general: XC()
12595
+ }), QC = 100, $C = 3600, ew = 1e3, tw = class {
12595
12596
  constructor(e, t, n, r) {
12596
- p(this, "minBufferFullnessLengthForRegression", 6), p(this, "logger", void 0), p(this, "emitter", void 0), p(this, "timers", lr.create()), p(this, "metrics", XC()), p(this, "bufferFullness", new w(Infinity)), p(this, "bufferFullnessRegression", void 0), p(this, "lastDeliveryResumeTime", -Infinity), p(this, "currentLevel", void 0), p(this, "isSuspended", !1), p(this, "_fatalQosCount", 0), p(this, "renditionLevelSource", void 0), p(this, "targetBufferTimeSource", void 0), p(this, "qualityIndexOrder", []), p(this, "hasPlayedInSession", !1), p(this, "hasAsserted", !1), p(this, "load", () => {
12597
+ p(this, "minBufferFullnessLengthForRegression", 6), p(this, "logger", void 0), p(this, "emitter", void 0), p(this, "timers", lr.create()), p(this, "metrics", ZC()), p(this, "bufferFullness", new w(Infinity)), p(this, "bufferFullnessRegression", void 0), p(this, "lastDeliveryResumeTime", -Infinity), p(this, "currentLevel", void 0), p(this, "isSuspended", !1), p(this, "_fatalQosCount", 0), p(this, "renditionLevelSource", void 0), p(this, "targetBufferTimeSource", void 0), p(this, "qualityIndexOrder", []), p(this, "hasPlayedInSession", !1), p(this, "hasAsserted", !1), p(this, "load", () => {
12597
12598
  this.emitter.on("playback state", this.onPlaybackState), this.emitter.on("buffer fullness", this.onBufferFullness), this.emitter.on("media delivery resumed", this.onMediaDeliveryResumed), this.emitter.on("rendition level changed", this.onRenditionLevelChanged), this.emitter.on("video decode rate", this.onVideoDecodeRate), this.emitter.on("connection state", this.onConnectionState);
12598
12599
  }), p(this, "unload", () => {
12599
12600
  this.emitter.off("playback state", this.onPlaybackState), this.emitter.off("buffer fullness", this.onBufferFullness), this.emitter.off("media delivery resumed", this.onMediaDeliveryResumed), this.emitter.off("rendition level changed", this.onRenditionLevelChanged), this.emitter.off("video decode rate", this.onVideoDecodeRate), this.emitter.off("connection state", this.onConnectionState), this.suspend();
@@ -12609,7 +12610,7 @@ var JC, YC = () => ({
12609
12610
  return this.metrics.levels[a];
12610
12611
  }), p(this, "getBufferFullnessRegression", (e = !1) => {
12611
12612
  if (!e) return this.bufferFullnessRegression;
12612
- if (performance.now() - this.lastDeliveryResumeTime < $C) return;
12613
+ if (performance.now() - this.lastDeliveryResumeTime < ew) return;
12613
12614
  let t = this.bufferFullness.items().filter(({ time: e }) => e >= this.lastDeliveryResumeTime);
12614
12615
  return t.length >= this.minBufferFullnessLengthForRegression ? this.calculateLinearRegression(t) : void 0;
12615
12616
  }), p(this, "getTargetBufferTime", () => {
@@ -12669,21 +12670,21 @@ var JC, YC = () => ({
12669
12670
  let d = !1;
12670
12671
  if (e.from) {
12671
12672
  var f;
12672
- let e = (f = this.metrics.levels[l]) == null ? YC() : f;
12673
+ let e = (f = this.metrics.levels[l]) == null ? XC() : f;
12673
12674
  l < u ? e.upgradesFromLevel.push(performance.now()) : e.downgradesFromLevel.push(performance.now()), dr(e.activeRanges);
12674
12675
  let t = e.bufferingRanges[e.bufferingRanges.length - 1];
12675
12676
  d = !!t && !t.end, dr(e.bufferingRanges), this.metrics.levels[l] = e;
12676
12677
  }
12677
12678
  if (e.to) {
12678
12679
  var p;
12679
- let e = (p = this.metrics.levels[u]) == null ? YC() : p;
12680
+ let e = (p = this.metrics.levels[u]) == null ? XC() : p;
12680
12681
  fr(e.activeRanges), d && fr(e.bufferingRanges), this.metrics.levels[u] = e, this.currentLevel = u;
12681
12682
  }
12682
12683
  }), p(this, "onMediaDeliveryResumed", () => {
12683
12684
  this.lastDeliveryResumeTime = performance.now();
12684
12685
  }), p(this, "onBufferFullness", (e) => {
12685
12686
  if (this.metrics.bufferFullness = e, this.isSuspended) return;
12686
- let t = performance.now(), n = this.bufferFullness.peekLast(), r = (e) => Math.floor(e / ZC);
12687
+ let t = performance.now(), n = this.bufferFullness.peekLast(), r = (e) => Math.floor(e / QC);
12687
12688
  if (n && r(n.time) === r(t)) n.time = t, n.value = e;
12688
12689
  else {
12689
12690
  var i, a;
@@ -12691,7 +12692,7 @@ var JC, YC = () => ({
12691
12692
  time: t,
12692
12693
  value: e
12693
12694
  });
12694
- let n = this.bufferFullness.items(), r = (i = (a = n[n.length - this.minBufferFullnessLengthForRegression]) == null ? void 0 : a.time) == null ? -Infinity : i, o = Math.min(t - QC, r);
12695
+ let n = this.bufferFullness.items(), r = (i = (a = n[n.length - this.minBufferFullnessLengthForRegression]) == null ? void 0 : a.time) == null ? -Infinity : i, o = Math.min(t - $C, r);
12695
12696
  this.bufferFullness.filterPop(({ time: e }) => e >= o);
12696
12697
  }
12697
12698
  this.bufferFullnessRegression = this.bufferFullness.items().length >= this.minBufferFullnessLengthForRegression ? this.calculateLinearRegression() : void 0;
@@ -12763,8 +12764,8 @@ var JC, YC = () => ({
12763
12764
  fr(this.metrics.general.activeRanges);
12764
12765
  }
12765
12766
  };
12766
- JC = ew, p(ew, "create", (e, t, n, r) => new JC(e, t, n, r)), H(), m();
12767
- var tw, nw = class {
12767
+ YC = tw, p(tw, "create", (e, t, n, r) => new YC(e, t, n, r)), H(), m();
12768
+ var nw, rw = class {
12768
12769
  constructor(e, t) {
12769
12770
  p(this, "renditions", /* @__PURE__ */ new Map()), p(this, "renditionLevels", []), p(this, "languages", []), p(this, "emitter", void 0), p(this, "subscriptionSource", void 0), p(this, "renditionLevelChangeCount", 0), p(this, "unload", () => {
12770
12771
  this.emitter.off("renditions", this.onRenditions), this.emitter.off("subscription changed", this.onSubscriptionChanged);
@@ -12839,8 +12840,8 @@ var tw, nw = class {
12839
12840
  }), p(this, "getCurrentSubscription", () => this.subscriptionSource.getCurrentSubscription()), this.subscriptionSource = t, this.emitter = e, this.emitter.on("renditions", this.onRenditions), this.emitter.on("subscription changed", this.onSubscriptionChanged);
12840
12841
  }
12841
12842
  };
12842
- tw = nw, p(nw, "create", (e, t) => new tw(e, t)), H(), m();
12843
- var rw, iw = (e) => JSON.parse(JSON.stringify(e)), aw = 1e4, ow = class {
12843
+ nw = rw, p(rw, "create", (e, t) => new nw(e, t)), H(), m();
12844
+ var iw, aw = (e) => JSON.parse(JSON.stringify(e)), ow = 1e4, sw = class {
12844
12845
  constructor(e, t, n) {
12845
12846
  p(this, "logger", void 0), p(this, "timers", new lr()), p(this, "emitter", void 0), p(this, "targetSubscription", void 0), p(this, "currentSubscription", void 0), p(this, "_isSwitchingSubscription", !1), p(this, "pendingSubscriptionTimeoutId", void 0), p(this, "burstMs", 0), p(this, "unload", () => {
12846
12847
  this.logger.debug("Unloading module..."), this.timers.unload(), this.emitter.off("subscription changed", this.onSubscriptionChanged), this.logger.debug("Unloaded module");
@@ -12878,21 +12879,21 @@ var rw, iw = (e) => JSON.parse(JSON.stringify(e)), aw = 1e4, ow = class {
12878
12879
  this.logger.debug("onSubscriptionChanged", {
12879
12880
  to: e,
12880
12881
  reset: t
12881
- }), t ? this.targetSubscription = iw(this.currentSubscription) : this.currentSubscription = iw(e), this._isSwitchingSubscription = this.isNewSubscription();
12882
+ }), t ? this.targetSubscription = aw(this.currentSubscription) : this.currentSubscription = aw(e), this._isSwitchingSubscription = this.isNewSubscription();
12882
12883
  }), p(this, "scheduleSubscriptionChange", () => {
12883
- this.targetSubscription = iw(this.targetSubscription), this._isSwitchingSubscription = this.isNewSubscription();
12884
+ this.targetSubscription = aw(this.targetSubscription), this._isSwitchingSubscription = this.isNewSubscription();
12884
12885
  let e = this.currentSubscription.channelId, t = this.targetSubscription.channelId, n = e !== t;
12885
12886
  this._isSwitchingSubscription && (n && this.burstMs ? this.setBurst(this.burstMs) : this.setBurst(0), this.pendingSubscriptionTimeoutId && (this.timers.clearTimeout(this.pendingSubscriptionTimeoutId), this.pendingSubscriptionTimeoutId = void 0), n && this.timers.setTimeout(() => {
12886
- this.currentSubscription.channelId === e && this.targetSubscription.channelId === t && (this.logger.warn("Channel switch timeout", t), this.targetSubscription = iw(this.currentSubscription), this.emitter.emit("channel switch timeout", t));
12887
- }, aw), this.pendingSubscriptionTimeoutId = this.timers.setTimeout(() => this.emitter.emit("send signal", {
12887
+ this.currentSubscription.channelId === e && this.targetSubscription.channelId === t && (this.logger.warn("Channel switch timeout", t), this.targetSubscription = aw(this.currentSubscription), this.emitter.emit("channel switch timeout", t));
12888
+ }, ow), this.pendingSubscriptionTimeoutId = this.timers.setTimeout(() => this.emitter.emit("send signal", {
12888
12889
  type: "subscribe",
12889
12890
  subscription: this.getTargetSubscription()
12890
12891
  }), 0));
12891
- }), this.logger = e, this.targetSubscription = t, this.currentSubscription = iw(t), this.emitter = n, this.emitter.on("subscription changed", this.onSubscriptionChanged);
12892
+ }), this.logger = e, this.targetSubscription = t, this.currentSubscription = aw(t), this.emitter = n, this.emitter.on("subscription changed", this.onSubscriptionChanged);
12892
12893
  }
12893
12894
  };
12894
- rw = ow, p(ow, "create", (e, t, n) => new rw(e, n, t)), H(), m();
12895
- var sw = class e {
12895
+ iw = sw, p(sw, "create", (e, t, n) => new iw(e, n, t)), H(), m();
12896
+ var cw = class e {
12896
12897
  constructor() {
12897
12898
  p(this, "channelId", void 0), p(this, "renditionId", void 0), p(this, "anchorCts", void 0), p(this, "hasBFramesValue", !1), p(this, "isAwaitingAssessment", !1), p(this, "zeroOffsetSamples", 0), p(this, "omittedBoundaryCrossings", 0), p(this, "hasSeenKeyframe", !1), p(this, "hasObservedReordering", !1), p(this, "rememberedRenditions", new an(e.MAX_REMEMBERED_RENDITIONS));
12898
12899
  }
@@ -12948,8 +12949,8 @@ var sw = class e {
12948
12949
  }
12949
12950
  }
12950
12951
  };
12951
- p(sw, "MAX_REMEMBERED_RENDITIONS", 32), H(), m(), R();
12952
- var cw, lw = 5e3, uw = () => it() || tt(), dw = (e) => e && uw() ? 100 : 0, fw = (e) => (t) => t > e, pw = 100, mw = 1e3, hw = 1e3, gw = 1e3, _w = 100, vw = 50, yw = {
12952
+ p(cw, "MAX_REMEMBERED_RENDITIONS", 32), H(), m(), R();
12953
+ var lw, uw = 5e3, dw = () => it() || tt(), fw = (e) => e && dw() ? 100 : 0, pw = (e) => (t) => t > e, mw = 100, hw = 1e3, gw = 1e3, _w = 1e3, vw = 100, yw = 50, bw = {
12953
12954
  seek: {
12954
12955
  toleranceMs: 200,
12955
12956
  toleranceMaxMs: 2500,
@@ -12981,7 +12982,7 @@ var cw, lw = 5e3, uw = () => it() || tt(), dw = (e) => e && uw() ? 100 : 0, fw =
12981
12982
  decayCooldownMultiplier: 3,
12982
12983
  decayCheckInterval: 15e3
12983
12984
  }
12984
- }, bw = class {
12985
+ }, xw = class {
12985
12986
  get driftSamplesToCollect() {
12986
12987
  return this._driftSamplesToCollect;
12987
12988
  }
@@ -12989,8 +12990,8 @@ var cw, lw = 5e3, uw = () => it() || tt(), dw = (e) => e && uw() ? 100 : 0, fw =
12989
12990
  this._driftSamplesToCollect = e, this.driftSamples = new w(e);
12990
12991
  }
12991
12992
  constructor(e, t, n, r, i, a = !0) {
12992
- p(this, "emitter", void 0), p(this, "logger", void 0), p(this, "playbackSource", void 0), p(this, "bufferSource", void 0), p(this, "keyframeTimestamps", new w(10)), p(this, "lastSeekTime", void 0), p(this, "needsMediaSourceRecovery", !1), p(this, "lastAdjustmentTime", performance.now()), p(this, "lastDecayCheckTime", performance.now()), p(this, "syncInterval", void 0), p(this, "currentSyncIntervalMs", pw), p(this, "config", void 0), p(this, "state", void 0), p(this, "allowTimeshiftOnAudio", !1), p(this, "syncInfoToleranceMaxMs", 150), p(this, "syncInfoToleranceStep", 20), p(this, "seekOvershoot", void 0), p(this, "timers", lr.create()), p(this, "rtt", 0), p(this, "channelSyncInfo", /* @__PURE__ */ new Map()), p(this, "seekAdjustmentCount", 0), p(this, "timeshiftAdjustmentCount", 0), p(this, "syncInfoCorrectionCount", 0), p(this, "playbackRateAdjustmentCount", 0), p(this, "lastPlaybackRateChangeTime", 0), p(this, "seekAdjustmentTimestamps", []), p(this, "timeshiftAdjustmentTimestamps", []), p(this, "_driftSamplesToCollect", 5), p(this, "driftSamples", new w(this._driftSamplesToCollect)), p(this, "timestampOffset", void 0), p(this, "hasObservedBFrames", !1), p(this, "bFrameDetector", new sw()), p(this, "currentChannelId", void 0), p(this, "highestSeenTimestamps", /* @__PURE__ */ new Map()), p(this, "isSuspended", !1), p(this, "isSyncAdjustmentActivated", !1), p(this, "queuedTimeshift", !1), p(this, "playbackState", void 0), p(this, "hasPerformedRecoverySeekInCurrentRecoveryState", !1), p(this, "shouldSeekAfterBuffering", !1), p(this, "shouldSeekWhileStuck", !1), p(this, "hasPerformedStuckSeekInCurrentStillness", !1), p(this, "positionSetBySeek", void 0), p(this, "lastPlayheadPosition", void 0), p(this, "lastPlayheadProgressAt", performance.now()), p(this, "usesMse", void 0), p(this, "load", () => {
12993
- this.emitter.on("page active", this.onPageActive), this.emitter.on("pageshow", this.onPageShow), this.setSyncInterval(document.visibilityState === "hidden" ? mw : pw);
12993
+ p(this, "emitter", void 0), p(this, "logger", void 0), p(this, "playbackSource", void 0), p(this, "bufferSource", void 0), p(this, "keyframeTimestamps", new w(10)), p(this, "lastSeekTime", void 0), p(this, "needsMediaSourceRecovery", !1), p(this, "lastAdjustmentTime", performance.now()), p(this, "lastDecayCheckTime", performance.now()), p(this, "syncInterval", void 0), p(this, "currentSyncIntervalMs", mw), p(this, "config", void 0), p(this, "state", void 0), p(this, "allowTimeshiftOnAudio", !1), p(this, "syncInfoToleranceMaxMs", 150), p(this, "syncInfoToleranceStep", 20), p(this, "seekOvershoot", void 0), p(this, "timers", lr.create()), p(this, "rtt", 0), p(this, "channelSyncInfo", /* @__PURE__ */ new Map()), p(this, "seekAdjustmentCount", 0), p(this, "timeshiftAdjustmentCount", 0), p(this, "syncInfoCorrectionCount", 0), p(this, "playbackRateAdjustmentCount", 0), p(this, "lastPlaybackRateChangeTime", 0), p(this, "seekAdjustmentTimestamps", []), p(this, "timeshiftAdjustmentTimestamps", []), p(this, "_driftSamplesToCollect", 5), p(this, "driftSamples", new w(this._driftSamplesToCollect)), p(this, "timestampOffset", void 0), p(this, "hasObservedBFrames", !1), p(this, "bFrameDetector", new cw()), p(this, "currentChannelId", void 0), p(this, "highestSeenTimestamps", /* @__PURE__ */ new Map()), p(this, "isSuspended", !1), p(this, "isSyncAdjustmentActivated", !1), p(this, "queuedTimeshift", !1), p(this, "playbackState", void 0), p(this, "hasPerformedRecoverySeekInCurrentRecoveryState", !1), p(this, "shouldSeekAfterBuffering", !1), p(this, "shouldSeekWhileStuck", !1), p(this, "hasPerformedStuckSeekInCurrentStillness", !1), p(this, "positionSetBySeek", void 0), p(this, "lastPlayheadPosition", void 0), p(this, "lastPlayheadProgressAt", performance.now()), p(this, "usesMse", void 0), p(this, "load", () => {
12994
+ this.emitter.on("page active", this.onPageActive), this.emitter.on("pageshow", this.onPageShow), this.setSyncInterval(document.visibilityState === "hidden" ? hw : mw);
12994
12995
  }), p(this, "unload", () => {
12995
12996
  this.logger.debug("Unloading module..."), this.emitter.off("rtt", this.updateRtt), this.emitter.off("playback state", this.onPlaybackState), this.emitter.off("page active", this.onPageActive), this.emitter.off("pageshow", this.onPageShow), this.emitter.off("buffers flushed", this.clearBFrameLatch), this.emitter.off("recovered from media error", this.onMediaSourceRecovered), this.clearSyncInterval(), this.timers.unload(), this.logger.debug("Unloaded module");
12996
12997
  }), p(this, "suspend", () => {
@@ -13032,7 +13033,7 @@ var cw, lw = 5e3, uw = () => it() || tt(), dw = (e) => e && uw() ? 100 : 0, fw =
13032
13033
  }), p(this, "processSample", (e) => {
13033
13034
  var t;
13034
13035
  if (!e.channelId) throw Error("Sample must be assigned to a channel");
13035
- this.currentChannelId || (this.currentChannelId = e.channelId), this.timestampOffset || (this.timestampOffset = e.timestamp / e.timescale * 1e3 - lw);
13036
+ this.currentChannelId || (this.currentChannelId = e.channelId), this.timestampOffset || (this.timestampOffset = e.timestamp / e.timescale * 1e3 - uw);
13036
13037
  let n = e.type === "video" && e.isSync;
13037
13038
  if (this.bFrameDetector.update(e), this.latchBFramesIfDetected(), this.currentChannelId !== e.channelId) {
13038
13039
  let t = 2 ** 53 - 1;
@@ -13049,7 +13050,7 @@ var cw, lw = 5e3, uw = () => it() || tt(), dw = (e) => e && uw() ? 100 : 0, fw =
13049
13050
  this.currentChannelId || (this.currentChannelId = e);
13050
13051
  let i = t.mediaType();
13051
13052
  if (!i) throw Error("Fragment must have a media type");
13052
- this.timestampOffset || (this.timestampOffset = t.baseMediaDecodeTime() / t.timescale() * 1e3 - lw);
13053
+ this.timestampOffset || (this.timestampOffset = t.baseMediaDecodeTime() / t.timescale() * 1e3 - uw);
13053
13054
  let a = i === "video" && t.startsWithKeyframe();
13054
13055
  if (i === "video" && (this.bFrameDetector.updateFromFragment({
13055
13056
  type: i,
@@ -13170,7 +13171,7 @@ var cw, lw = 5e3, uw = () => it() || tt(), dw = (e) => e && uw() ? 100 : 0, fw =
13170
13171
  return;
13171
13172
  }
13172
13173
  if (n >= this.getEffectiveSeekToleranceMs() || n < this.currentTimeshiftToleranceMs()) return;
13173
- let r = performance.now() - this.config.seek.timeoutMs * this.state.timeshiftToleranceMultiplier, i = this.timeshiftAdjustmentTimestamps.filter(fw(r)).length;
13174
+ let r = performance.now() - this.config.seek.timeoutMs * this.state.timeshiftToleranceMultiplier, i = this.timeshiftAdjustmentTimestamps.filter(pw(r)).length;
13174
13175
  if (i && this.state.timeshiftToleranceMultiplier > 2) {
13175
13176
  this.logger.debug("Too many timeshifts within sliding window", {
13176
13177
  timeshiftCooldownThreshold: r,
@@ -13194,20 +13195,20 @@ var cw, lw = 5e3, uw = () => it() || tt(), dw = (e) => e && uw() ? 100 : 0, fw =
13194
13195
  let n = (e = (t = this.bufferSource).getNextBufferedRangeStart) == null ? void 0 : e.call(t, this.playbackSource.currentTime);
13195
13196
  return this.shouldSeekAfterBuffering = n !== void 0, n;
13196
13197
  }), p(this, "observePlayheadProgress", () => {
13197
- let e = this.playbackSource.currentTime, t = e !== this.lastPlayheadPosition, n = t && (this.positionSetBySeek === void 0 || e - this.positionSetBySeek > vw);
13198
+ let e = this.playbackSource.currentTime, t = e !== this.lastPlayheadPosition, n = t && (this.positionSetBySeek === void 0 || e - this.positionSetBySeek > yw);
13198
13199
  this.positionSetBySeek = void 0, (n || this.playbackSource.isPaused) && (this.hasPerformedStuckSeekInCurrentStillness = !1), (t || this.playbackSource.isPaused || this.isSeeking()) && (this.lastPlayheadPosition = e, this.lastPlayheadProgressAt = performance.now());
13199
13200
  }), p(this, "isPlayheadStuckInBuffer", () => {
13200
13201
  var e, t;
13201
- if (performance.now() - this.lastPlayheadProgressAt < hw) return !1;
13202
+ if (performance.now() - this.lastPlayheadProgressAt < gw) return !1;
13202
13203
  let n = this.playbackSource.currentTime, r = (e = (t = this.bufferSource).getBufferedEndAt) == null ? void 0 : e.call(t, n);
13203
- return r !== void 0 && r - n >= gw;
13204
+ return r !== void 0 && r - n >= _w;
13204
13205
  }), p(this, "getRecoverySeekReason", () => {
13205
13206
  if (this.needsMediaSourceRecovery) return "media source reopen";
13206
13207
  if (this.shouldSeekWhileStuck) return "stuck in buffer";
13207
13208
  if (this.shouldSeekAfterBuffering) return "buffering";
13208
13209
  }), p(this, "shouldSkipNormalSeek", (e) => e < 0 && -e < this.currentAheadToleranceMs() || e > 0 && e < this.currentSeekToleranceMs() || Math.abs(e) < 1 ? !0 : !this.isAllowedToSync()), p(this, "shouldDeferRecoverySeek", (e, t) => t !== void 0 && t > e), p(this, "buildStuckInBufferSeekPlan", () => {
13209
13210
  var e, t;
13210
- let n = this.playbackSource.currentTime, r = (e = (t = this.bufferSource).getBufferedEndAt) == null ? void 0 : e.call(t, n), i = n + Math.max(this.seekOvershoot, _w);
13211
+ let n = this.playbackSource.currentTime, r = (e = (t = this.bufferSource).getBufferedEndAt) == null ? void 0 : e.call(t, n), i = n + Math.max(this.seekOvershoot, vw);
13211
13212
  if (r === void 0 || i >= r) return;
13212
13213
  let a = this.findKeyframeCloseToTimestamp(i);
13213
13214
  return {
@@ -13284,7 +13285,7 @@ var cw, lw = 5e3, uw = () => it() || tt(), dw = (e) => e && uw() ? 100 : 0, fw =
13284
13285
  if (!r && !this.isAllowedToSyncIgnoringCooldown() || r && (this.isSeeking() || !this.currentChannelId || this.isSuspended || this.playbackSource.isPaused) || (this.driftSamples.push(t), !this.isSeekCooldownExpired()) || !r && this.driftSamples.items().length < this.driftSamplesToCollect && Math.abs(t) < 2e3) return;
13285
13286
  let i = r ? t : Ut(this.driftSamples.items());
13286
13287
  if (!r && this.tryPlaybackRateSync(i) || !r && this.shouldSkipNormalSeek(i)) return;
13287
- let a = performance.now() - this.config.seek.timeoutMs * this.state.seekToleranceMultiplier, o = this.seekAdjustmentTimestamps.filter(fw(a)).length, s = this.currentEmergencySeekToleranceMs(), c = i > 0 && i >= s;
13288
+ let a = performance.now() - this.config.seek.timeoutMs * this.state.seekToleranceMultiplier, o = this.seekAdjustmentTimestamps.filter(pw(a)).length, s = this.currentEmergencySeekToleranceMs(), c = i > 0 && i >= s;
13288
13289
  if (o && this.state.seekToleranceMultiplier > 2 && !r && !c) {
13289
13290
  this.logger.debug("Too many seek adjustments within sliding window", {
13290
13291
  seekCooldownThreshold: a,
@@ -13313,9 +13314,9 @@ var cw, lw = 5e3, uw = () => it() || tt(), dw = (e) => e && uw() ? 100 : 0, fw =
13313
13314
  return;
13314
13315
  }
13315
13316
  }), p(this, "onPageActive", (e) => {
13316
- this.setSyncInterval(e ? pw : mw), e && this.onSync();
13317
+ this.setSyncInterval(e ? mw : hw), e && this.onSync();
13317
13318
  }), p(this, "onPageShow", (e) => {
13318
- e.persisted && (this.setSyncInterval(document.visibilityState === "hidden" ? mw : pw), this.onSync());
13319
+ e.persisted && (this.setSyncInterval(document.visibilityState === "hidden" ? hw : mw), this.onSync());
13319
13320
  }), p(this, "setSyncInterval", (e) => {
13320
13321
  this.syncInterval !== void 0 && this.currentSyncIntervalMs === e || (this.clearSyncInterval(), this.currentSyncIntervalMs = e, this.syncInterval = this.timers.setInterval(this.onSync, e));
13321
13322
  }), p(this, "clearSyncInterval", () => {
@@ -13326,11 +13327,11 @@ var cw, lw = 5e3, uw = () => it() || tt(), dw = (e) => e && uw() ? 100 : 0, fw =
13326
13327
  let t = n >= e - this.config.seek.keyframeSearchBeforeMs, r = n <= e + this.config.seek.keyframeSearchAfterMs;
13327
13328
  if (t && r) return n;
13328
13329
  }
13329
- }), this.logger = t, this.emitter = e, this.playbackSource = n, this.bufferSource = r, this.usesMse = a, this.seekOvershoot = dw(a), this.config = {
13330
- seek: L({}, yw.seek),
13331
- timeshift: L({}, yw.timeshift),
13332
- playbackRate: L({}, yw.playbackRate),
13333
- backoff: L({}, yw.backoff)
13330
+ }), this.logger = t, this.emitter = e, this.playbackSource = n, this.bufferSource = r, this.usesMse = a, this.seekOvershoot = fw(a), this.config = {
13331
+ seek: L({}, bw.seek),
13332
+ timeshift: L({}, bw.timeshift),
13333
+ playbackRate: L({}, bw.playbackRate),
13334
+ backoff: L({}, bw.backoff)
13334
13335
  }, this.config.timeshift.enabled = i, a || (this.config.seek.toleranceMs = 50, this.config.timeshift.toleranceMs = 20, this.config.seek.aheadToleranceMs = 40), this.state = {
13335
13336
  seekToleranceMultiplier: 1,
13336
13337
  timeshiftToleranceMultiplier: 1
@@ -13392,8 +13393,8 @@ var cw, lw = 5e3, uw = () => it() || tt(), dw = (e) => e && uw() ? 100 : 0, fw =
13392
13393
  return this.serverCurrentTime - this.playbackSource.currentTime;
13393
13394
  }
13394
13395
  };
13395
- cw = bw, p(bw, "create", (e, t, n, r, i, a = !0) => new cw(e, t, n, r, i, a)), H(), R(), m(), P();
13396
- var xw, Sw = {
13396
+ lw = xw, p(xw, "create", (e, t, n, r, i, a = !0) => new lw(e, t, n, r, i, a)), H(), R(), m(), P();
13397
+ var Sw, Cw = {
13397
13398
  enabled: !0,
13398
13399
  interval: 3e4,
13399
13400
  includeErrors: !0,
@@ -13402,11 +13403,11 @@ var xw, Sw = {
13402
13403
  maxRetries: 10,
13403
13404
  maxErrorReports: 50,
13404
13405
  maxEvents: 50
13405
- }, Cw = (e, t) => L(L({}, t), {}, {
13406
+ }, ww = (e, t) => L(L({}, t), {}, {
13406
13407
  type: e,
13407
13408
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
13408
13409
  discriminator: "web"
13409
- }), ww = class {
13410
+ }), Tw = class {
13410
13411
  constructor(e, t, n, r) {
13411
13412
  var i = this;
13412
13413
  p(this, "logger", void 0), p(this, "timers", new lr()), p(this, "emitter", void 0), p(this, "options", void 0), p(this, "parentContext", void 0), p(this, "unsentLines", new w(100)), p(this, "retries", 0), p(this, "errorCount", 0), p(this, "eventCount", 0), p(this, "statsCount", 0), p(this, "unload", () => {
@@ -13423,7 +13424,7 @@ var xw, Sw = {
13423
13424
  initiator: "interval"
13424
13425
  }, n = {}) => {
13425
13426
  if (!this.options.includeStats) return;
13426
- let r = this.parentContext.getStatistics(), i = Cw("stats", L(L(L({}, n), r), {}, {
13427
+ let r = this.parentContext.getStatistics(), i = ww("stats", L(L(L({}, n), r), {}, {
13427
13428
  isFinal: e,
13428
13429
  initiator: t,
13429
13430
  count: this.statsCount++
@@ -13431,7 +13432,7 @@ var xw, Sw = {
13431
13432
  this.unsentLines.push(i);
13432
13433
  }), p(this, "addEvent", (e) => {
13433
13434
  if (!this.options.includeEvents || this.eventCount > this.options.maxEvents) return;
13434
- let t = Cw("event", L(L({}, this.parentContext.getStatistics()), e));
13435
+ let t = ww("event", L(L({}, this.parentContext.getStatistics()), e));
13435
13436
  this.eventCount++, this.unsentLines.push(t);
13436
13437
  }), p(this, "getStatistics", () => ({ errorCount: this.errorCount })), p(this, "send", function() {
13437
13438
  var e = N(function* (e) {
@@ -13476,12 +13477,12 @@ var xw, Sw = {
13476
13477
  let { includeErrors: t, maxErrorReports: n } = this.options;
13477
13478
  if (!(e instanceof U) || e.code() === "channel_not_live" || !t || (this.errorCount++, this.errorCount > n)) return;
13478
13479
  let r = this.parentContext.getStatistics();
13479
- this.unsentLines.push(Cw("error", L(L({}, r), e.toStringifiable())));
13480
- }), this.logger = e, this.emitter = t, this.options = L(L({}, Sw), n), this.parentContext = r;
13480
+ this.unsentLines.push(ww("error", L(L({}, r), e.toStringifiable())));
13481
+ }), this.logger = e, this.emitter = t, this.options = L(L({}, Cw), n), this.parentContext = r;
13481
13482
  }
13482
13483
  };
13483
- xw = ww, p(ww, "create", (e, t, n, r) => new xw(e, t, n, r)), H(), m();
13484
- var Tw, Ew = class {
13484
+ Sw = Tw, p(Tw, "create", (e, t, n, r) => new Sw(e, t, n, r)), H(), m();
13485
+ var Ew, Dw = class {
13485
13486
  constructor(e, t, n) {
13486
13487
  p(this, "logger", void 0), p(this, "elements", void 0), p(this, "documentState", void 0), p(this, "timers", new lr()), p(this, "unload", () => {
13487
13488
  this.timers.unload();
@@ -13492,8 +13493,8 @@ var Tw, Ew = class {
13492
13493
  };
13493
13494
  //#endregion
13494
13495
  //#region ../../libs/web-sdk/src/OptionsProvider.ts
13495
- Tw = Ew, p(Ew, "create", (e, t, n) => new Tw(e, t, n)), m();
13496
- var Dw = [
13496
+ Ew = Dw, p(Dw, "create", (e, t, n) => new Ew(e, t, n)), m();
13497
+ var Ow = [
13497
13498
  "minBufferTime",
13498
13499
  "maxBufferTime",
13499
13500
  "burstEnabled",
@@ -13502,10 +13503,10 @@ var Dw = [
13502
13503
  "offscreenCanvasEnabled",
13503
13504
  "videoCodecs"
13504
13505
  ];
13505
- function Ow(e) {
13506
- return Dw.includes(e);
13506
+ function kw(e) {
13507
+ return Ow.includes(e);
13507
13508
  }
13508
- var kw = class {
13509
+ var Aw = class {
13509
13510
  constructor(e) {
13510
13511
  p(this, "options", void 0), p(this, "overrides", /* @__PURE__ */ new Map()), this.options = e;
13511
13512
  }
@@ -13519,7 +13520,7 @@ var kw = class {
13519
13520
  this.options[e] = t;
13520
13521
  }
13521
13522
  get(e, t) {
13522
- if (t && Ow(e)) {
13523
+ if (t && kw(e)) {
13523
13524
  var n;
13524
13525
  let r = (n = this.overrides.get(t)) == null ? void 0 : n[e];
13525
13526
  if (r !== void 0) return r;
@@ -13534,7 +13535,7 @@ var kw = class {
13534
13535
  //#endregion
13535
13536
  //#region ../../libs/web-sdk/src/processSampleTimestamps.ts
13536
13537
  R();
13537
- var Aw = 6, jw = (e) => {
13538
+ var jw = 6, Mw = (e) => {
13538
13539
  let t = [e], n = 0, r = 0, i = !1, a = (e, t) => {
13539
13540
  var i, a;
13540
13541
  if (e.flags && kl(e.flags)) {
@@ -13546,7 +13547,7 @@ var Aw = 6, jw = (e) => {
13546
13547
  return u > 0 && (r = u), L(L({}, e), {}, { duration: u > 0 ? u : r });
13547
13548
  };
13548
13549
  return (e, n = !1) => {
13549
- if (e.flags && kl(e.flags) && n && (i = !i), !(n && t.length < Aw && i) && t.length > 0) {
13550
+ if (e.flags && kl(e.flags) && n && (i = !i), !(n && t.length < jw && i) && t.length > 0) {
13550
13551
  i = !1;
13551
13552
  let n = e;
13552
13553
  for (let e = t.length - 1; e > 0; e--) {
@@ -13559,13 +13560,13 @@ var Aw = 6, jw = (e) => {
13559
13560
  }
13560
13561
  return t.push(e), [];
13561
13562
  };
13562
- }, Mw = ["mse", "wasm"], Nw = (e) => e == null ? Mw : e, Pw = (e) => {
13563
+ }, Nw = ["mse", "wasm"], Pw = (e) => e == null ? Nw : e, Fw = (e) => {
13563
13564
  if (!e) return !1;
13564
13565
  let t = e.headers && Object.keys(e.headers).length > 0, n = e.queryParams && Object.keys(e.queryParams).length > 0;
13565
13566
  return !!(t || n);
13566
- }, Fw = (e, t, n) => {
13567
- if (Pw(n)) return "mse";
13568
- let r = Nw(e);
13567
+ }, Iw = (e, t, n) => {
13568
+ if (Fw(n)) return "mse";
13569
+ let r = Pw(e);
13569
13570
  for (let e of r) switch (e) {
13570
13571
  case "mse":
13571
13572
  if (t) return "mse";
@@ -13580,7 +13581,7 @@ var Aw = 6, jw = (e) => {
13580
13581
  //#endregion
13581
13582
  //#region ../../libs/web-sdk/src/sampleFromMessage.ts
13582
13583
  R();
13583
- var Iw = (e, t, n) => {
13584
+ var Lw = (e, t, n) => {
13584
13585
  if (zr(t)) return L(L({}, e), {}, {
13585
13586
  type: "video",
13586
13587
  codec: t.codec,
@@ -13605,12 +13606,12 @@ var Iw = (e, t, n) => {
13605
13606
  //#endregion
13606
13607
  //#region ../../libs/web-sdk/src/statisticsRounding.ts
13607
13608
  R();
13608
- var Lw = ({ average: e, last: t, max: n, min: r }) => ({
13609
+ var Rw = ({ average: e, last: t, max: n, min: r }) => ({
13609
13610
  average: Math.round(e),
13610
13611
  last: Math.round(t),
13611
13612
  max: Math.round(n),
13612
13613
  min: Math.round(r)
13613
- }), Rw = [
13614
+ }), zw = [
13614
13615
  "timeSpentBuffering",
13615
13616
  "timePerBufferingEvent",
13616
13617
  "drift",
@@ -13622,28 +13623,28 @@ var Lw = ({ average: e, last: t, max: n, min: r }) => ({
13622
13623
  "videoKeyframeIntervalMs",
13623
13624
  "timeToConnected",
13624
13625
  "mediaSourceOpenTime"
13625
- ], zw = [
13626
+ ], Bw = [
13626
13627
  "videoDecodeTime",
13627
13628
  "audioDecodeTime",
13628
13629
  "videoTransportTime",
13629
13630
  "rtt"
13630
- ], Bw = (e) => typeof e == "object" && !!e && "min" in e && "max" in e && "average" in e && "last" in e, Vw = (e) => {
13631
+ ], Vw = (e) => typeof e == "object" && !!e && "min" in e && "max" in e && "average" in e && "last" in e, Hw = (e) => {
13631
13632
  let t = L({}, e);
13632
- for (let e of Rw) {
13633
+ for (let e of zw) {
13633
13634
  let n = t[e];
13634
13635
  typeof n == "number" && (t[e] = Math.round(n));
13635
13636
  }
13636
- for (let e of zw) {
13637
+ for (let e of Bw) {
13637
13638
  let n = t[e];
13638
- Bw(n) && (t[e] = Lw(n));
13639
+ Vw(n) && (t[e] = Rw(n));
13639
13640
  }
13640
13641
  return t;
13641
13642
  };
13642
13643
  //#endregion
13643
13644
  //#region ../../libs/web-sdk/src/validateOptions.ts
13644
13645
  R();
13645
- var Hw = (e, t) => e && typeof e == "object" && t in e, Uw = (e) => !(typeof e != "object" || !Hw(e, "channelId") || typeof e.channelId != "string" || !Hw(e, "url") || typeof e.url != "string" || e.channelId.length === 0 || e.url.length === 0), Ww = (e) => {
13646
- if (!Uw(e)) throw new U("Invalid options", {
13646
+ var Uw = (e, t) => e && typeof e == "object" && t in e, Ww = (e) => !(typeof e != "object" || !Uw(e, "channelId") || typeof e.channelId != "string" || !Uw(e, "url") || typeof e.url != "string" || e.channelId.length === 0 || e.url.length === 0), Gw = (e) => {
13647
+ if (!Ww(e)) throw new U("Invalid options", {
13647
13648
  isFatal: !0,
13648
13649
  code: "invalid_options"
13649
13650
  });
@@ -13652,7 +13653,7 @@ var Hw = (e, t) => e && typeof e == "object" && t in e, Uw = (e) => !(typeof e !
13652
13653
  let n = t;
13653
13654
  n[e] === void 0 && delete n[e];
13654
13655
  }), t;
13655
- }, Gw = (e) => {
13656
+ }, Kw = (e) => {
13656
13657
  if (typeof e != "object" || !e) throw Error("not an object");
13657
13658
  if (!("video" in e)) throw Error("missing video in subscription");
13658
13659
  if (!("audio" in e)) throw Error("missing audio in subscription");
@@ -13660,7 +13661,7 @@ var Hw = (e, t) => e && typeof e == "object" && t in e, Uw = (e) => !(typeof e !
13660
13661
  return !0;
13661
13662
  };
13662
13663
  vo(), Dl(), vS(), m(), P();
13663
- var Kw = class {
13664
+ var qw = class {
13664
13665
  constructor(e) {
13665
13666
  var t = this;
13666
13667
  p(this, "cache", /* @__PURE__ */ new Map()), p(this, "inFlight", /* @__PURE__ */ new Map()), p(this, "checkVideoSupport", function() {
@@ -13723,10 +13724,10 @@ var Kw = class {
13723
13724
  }
13724
13725
  };
13725
13726
  H(), m(), E(), R(), P(), M(), A();
13726
- var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PURE__ */ new WeakMap(), Zw = /* @__PURE__ */ new WeakMap(), Qw = class e extends nn {
13727
+ var Jw = 1e4, Yw = 1280 * 720, Xw = /* @__PURE__ */ new WeakMap(), Zw = /* @__PURE__ */ new WeakMap(), Qw = /* @__PURE__ */ new WeakMap(), $w = class e extends nn {
13727
13728
  constructor(t) {
13728
13729
  var n, r, i;
13729
- super(), n = this, p(this, "pictureInPicture", void 0), p(this, "drm", void 0), p(this, "browser", pt()), p(this, "options", void 0), p(this, "element", void 0), p(this, "playbackSource", void 0), p(this, "emitter", new nn()), p(this, "logger", void 0), p(this, "modules", void 0), p(this, "clientIp", void 0), p(this, "sessionId", void 0), p(this, "clientId", Er()), p(this, "_channels", []), p(this, "createdAt", performance.now()), p(this, "offscreenCanvasElement", void 0), p(this, "webCodecsRenditionSupport", void 0), p(this, "hasCalledConnect", !1), p(this, "hasRequestedAudioSession", !1), p(this, "isUserPaused", !1), p(this, "isMediaElementPaused", !1), p(this, "latestEmittedLanguages", []), p(this, "wakeLock", void 0), p(this, "pool", new re(e.MAX_POOL_SIZE)), p(this, "userAgentInformation", new wr()), p(this, "encryptedMediaExtensions", void 0), T(this, Yw, 0), T(this, Xw, []), p(this, "sampleProcessingSesssions", /* @__PURE__ */ new Map()), p(this, "unbackedSamplesWarned", new gS()), p(this, "unextractableSamplesWarned", new gS()), p(this, "sizes", /* @__PURE__ */ new Map()), p(this, "isSuspended", !0), p(this, "inactivityDisconnectInterval", void 0), p(this, "visiblePauseTimeout", void 0), p(this, "offscreenSubtitleInterval", void 0), T(this, Zw, void 0), p(this, "attach", (e) => {
13730
+ super(), n = this, p(this, "pictureInPicture", void 0), p(this, "drm", void 0), p(this, "browser", pt()), p(this, "options", void 0), p(this, "element", void 0), p(this, "playbackSource", void 0), p(this, "emitter", new nn()), p(this, "logger", void 0), p(this, "modules", void 0), p(this, "clientIp", void 0), p(this, "sessionId", void 0), p(this, "clientId", Er()), p(this, "_channels", []), p(this, "createdAt", performance.now()), p(this, "offscreenCanvasElement", void 0), p(this, "webCodecsRenditionSupport", void 0), p(this, "hasCalledConnect", !1), p(this, "hasRequestedAudioSession", !1), p(this, "isUserPaused", !1), p(this, "isMediaElementPaused", !1), p(this, "latestEmittedLanguages", []), p(this, "wakeLock", void 0), p(this, "pool", new re(e.MAX_POOL_SIZE)), p(this, "userAgentInformation", new wr()), p(this, "encryptedMediaExtensions", void 0), T(this, Xw, 0), T(this, Zw, []), p(this, "sampleProcessingSesssions", /* @__PURE__ */ new Map()), p(this, "unbackedSamplesWarned", new gS()), p(this, "unextractableSamplesWarned", new gS()), p(this, "sizes", /* @__PURE__ */ new Map()), p(this, "isSuspended", !0), p(this, "inactivityDisconnectInterval", void 0), p(this, "visiblePauseTimeout", void 0), p(this, "offscreenSubtitleInterval", void 0), T(this, Qw, void 0), p(this, "attach", (e) => {
13730
13731
  var t;
13731
13732
  (t = this.wakeLock) == null || t.attach(e), e.appendChild(this.element);
13732
13733
  }), p(this, "setElement", (e) => {
@@ -13813,20 +13814,20 @@ var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PU
13813
13814
  }), p(this, "updateTextTracks", (e) => {
13814
13815
  let t = e.filter((e) => e.codec === "webvtt");
13815
13816
  t.forEach((e) => {
13816
- if (!j(Xw, this).find((t) => t.language === e.language)) {
13817
+ if (!j(Zw, this).find((t) => t.language === e.language)) {
13817
13818
  if (this.modules.canvasModule) {
13818
13819
  let t = this.modules.canvasModule.textTracks.addTextTrack(e.kind, e.label || e.language || "", e.language || "");
13819
- j(Xw, this).push(t);
13820
+ j(Zw, this).push(t);
13820
13821
  } else if (this.mediaElement instanceof HTMLVideoElement) {
13821
13822
  let t = this.mediaElement.addTextTrack(e.kind, e.label || e.language, e.language);
13822
- j(Xw, this).push(t);
13823
+ j(Zw, this).push(t);
13823
13824
  }
13824
13825
  }
13825
13826
  });
13826
- for (let e of j(Xw, this)) t.find((t) => t.language === e.language) ? e.mode === "disabled" && (e.mode = "hidden") : e.mode = "disabled";
13827
+ for (let e of j(Zw, this)) t.find((t) => t.language === e.language) ? e.mode === "disabled" && (e.mode = "hidden") : e.mode = "disabled";
13827
13828
  this.emit("text tracks", this.textTracks);
13828
13829
  }), p(this, "cleanupTextTracks", (e = this.currentTime - 2e4) => {
13829
- j(Xw, this).forEach((t) => {
13830
+ j(Zw, this).forEach((t) => {
13830
13831
  if (t.cues) for (let n of Array.from(t.cues)) n.endTime * 1e3 < e - 2e3 && t.removeCue(n);
13831
13832
  });
13832
13833
  }), p(this, "filterRenditions", function() {
@@ -14002,7 +14003,7 @@ var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PU
14002
14003
  (e = n.modules.decoder) == null || e.unload(), n.modules.decoder = p, n.isHiddenWithBackgroundPlayback() && n.modules.decoder.enableBackgroundTimers(), n.modules.decoder.setVideoRenderingEnabled(n.isVideoOnScreen()), n.modules.decoder.load(), n.setupOffscreenSubtitleRouting();
14003
14004
  })), p(this, "capturesCanvasOnWebKit", (e) => !!e && this.browser.platform.isWebKit && this.modules.canvasModule instanceof AC), p(this, "connectWebKitVideoOutput", (e, t) => {
14004
14005
  let n = () => {
14005
- t.setVideoTrack(void 0), this.browser.platform.isIOS && e.setMaxVideoCanvasPixels(Jw);
14006
+ t.setVideoTrack(void 0), this.browser.platform.isIOS && e.setMaxVideoCanvasPixels(Yw);
14006
14007
  };
14007
14008
  e.onVideoTrackLost((e) => {
14008
14009
  this.logger.warn("Worker video track lost, falling back to canvas capture", { error: e }), n();
@@ -14052,7 +14053,7 @@ var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PU
14052
14053
  this.clearVisiblePauseDisconnect(), this.isUserPaused = !1, this.requestAudioSessionOnce(), this.hasCalledConnect ? this.unsuspend() : this.playbackState !== "playing" && (this._connect(), self.addEventListener("__vindral_register_debug__", this.registerDebugInstance), this.modules.timer.setInterval(() => this.cleanupTextTracks(), e.REMOVE_CUE_THRESHOLD)), (t = this.wakeLock) == null || t.enable(), this.playbackState === "paused" && this.playbackSource.isActivated && (this.resetModules(), this.emitter.emit("flush buffers"), this.cleanupTextTracks(2 ** 53 - 1)), this.playbackSource.play(), this.isHiddenWithBackgroundPlayback() && this.scheduleInactivityDisconnect();
14053
14054
  }), p(this, "getStatistics", () => {
14054
14055
  let e = Object.values(this.modules).reduce((e, t) => t && "getStatistics" in t ? L(L({}, e), t.getStatistics()) : e, this.getRuntimeInfo()), t = Math.round(this.timeActive > 0 ? (e.bytesReceived || 0) * 8 / (this.timeActive / 1e3) : 0), n = this.uptime / 36e5, r = Math.max(0, (e.connectCount || 0) - 1), i = n > 0 ? r / n : 0, a = this.timeActive / 6e4, o = Math.max(a, 1), s = a > 0 ? (e.seekAdjustmentCount || 0) / o : 0, c = a > 0 ? (e.timeshiftAdjustmentCount || 0) / o : 0;
14055
- return Vw(L(L({}, e), {}, {
14056
+ return Hw(L(L({}, e), {}, {
14056
14057
  averageBitRate: t,
14057
14058
  reconnectsPerHour: i,
14058
14059
  seekAdjustmentsPerMinute: s,
@@ -14061,7 +14062,7 @@ var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PU
14061
14062
  }), p(this, "resetModules", () => {
14062
14063
  Object.values(this.modules).forEach((e) => {
14063
14064
  e && "reset" in e && e.reset();
14064
- }), this.playbackSource instanceof ru && this.modules.adaptivity.reset(qw), this.sampleProcessingSesssions.clear(), this.cleanupTextTracks(Infinity), this.playbackSource.currentTime = 0, this.playbackSource.isActivated = !1;
14065
+ }), this.playbackSource instanceof ru && this.modules.adaptivity.reset(Jw), this.sampleProcessingSesssions.clear(), this.cleanupTextTracks(Infinity), this.playbackSource.currentTime = 0, this.playbackSource.isActivated = !1;
14065
14066
  }), p(this, "disconnectForInactivePage", (e) => {
14066
14067
  if (this.clearInactivityDisconnect(), this.emitter.emit("flush buffers"), !this.isBackgroundPlayEnabled(this.channelId)) {
14067
14068
  var t;
@@ -14095,7 +14096,7 @@ var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PU
14095
14096
  let e = this.modules.canvasModule instanceof AC ? !0 : void 0;
14096
14097
  return L({
14097
14098
  uptime: this.uptime,
14098
- version: "4.7.2-5-g4c14d0e4",
14099
+ version: "4.7.2-6-gceea26ed",
14099
14100
  clientId: this.clientId,
14100
14101
  sessionId: this.sessionId,
14101
14102
  channelId: this.channelId,
@@ -14140,7 +14141,7 @@ var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PU
14140
14141
  if (this.browser.platform.isWebKit || !this.browser.isMobile) return !1;
14141
14142
  let t = (e = this.modules) == null ? void 0 : e.decoder;
14142
14143
  return t ? t.audioWebCodecsInUse : this.isWebCodecsAudioAvailable(this.channelId);
14143
- }), this.options = new kw(L(L({}, Gr), Ww(t))), t.telemetryEnabled === void 0 && ["localhost", "127.0.0.1"].includes(location.hostname) && this.options.set("telemetryEnabled", !1);
14144
+ }), this.options = new Aw(L(L({}, Gr), Gw(t))), t.telemetryEnabled === void 0 && ["localhost", "127.0.0.1"].includes(location.hostname) && this.options.set("telemetryEnabled", !1);
14144
14145
  let a = {
14145
14146
  channelId: this.options.get("channelId"),
14146
14147
  audio: {
@@ -14153,14 +14154,14 @@ var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PU
14153
14154
  height: this.options.get("maxSize").height
14154
14155
  }
14155
14156
  }, o = Sn.get();
14156
- o.setLevel(this.options.get("logLevel")), o.setDebug(!1), this.logger = o, this.webCodecsRenditionSupport = new Kw(o), t.iosMediaElementEnabled !== void 0 && this.logger.warn("Option iosMediaElementEnabled is deprecated and will be removed in a future release. Use streamToMediaElementEnabled instead.");
14157
+ o.setLevel(this.options.get("logLevel")), o.setDebug(!1), this.logger = o, this.webCodecsRenditionSupport = new qw(o), t.iosMediaElementEnabled !== void 0 && this.logger.warn("Option iosMediaElementEnabled is deprecated and will be removed in a future release. Use streamToMediaElementEnabled instead.");
14157
14158
  let s = (r = t.streamToMediaElementEnabled) == null ? t.iosMediaElementEnabled : r;
14158
14159
  s !== void 0 && (this.options.set("streamToMediaElementEnabled", s), this.options.set("iosMediaElementEnabled", s)), t.iosBackgroundPlayEnabled !== void 0 && this.logger.warn("Option iosBackgroundPlayEnabled is deprecated and will be removed in a future release. Use backgroundPlayEnabled instead.");
14159
14160
  let c = (i = t.backgroundPlayEnabled) == null ? t.iosBackgroundPlayEnabled : i;
14160
14161
  c !== void 0 && (this.options.set("backgroundPlayEnabled", c), this.options.set("iosBackgroundPlayEnabled", c));
14161
14162
  let l = t.mseEnabled !== void 0, u = t.decoders !== void 0;
14162
14163
  l && this.logger.warn("Option mseEnabled is deprecated and will be removed in a future release. Use decoders instead (e.g. decoders: [\"wasm\"])."), l && !u && t.mseEnabled === !1 && this.options.set("decoders", ["wasm"]);
14163
- let d = GC.create(this.emitter, this.logger.createContext("PictureInPictureModule")), f = this.options.get("mediaSessionEnabled") ? OC.create(this.emitter, this.logger.createContext("MediaSessionModule"), {
14164
+ let d = KC.create(this.emitter, this.logger.createContext("PictureInPictureModule")), f = this.options.get("mediaSessionEnabled") ? OC.create(this.emitter, this.logger.createContext("MediaSessionModule"), {
14164
14165
  metadata: this.options.get("mediaSessionMetadata"),
14165
14166
  decoy: this.willUseMediaSource() || this.usesSplitCanvasAudio() ? void 0 : Su.create(this.logger.createContext("AudioFocusDecoy"), this.yieldToInterruption),
14166
14167
  isMuted: () => this.playbackSource.userMuted,
@@ -14175,7 +14176,7 @@ var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PU
14175
14176
  reconnectHandler: this.options.get("reconnectHandler"),
14176
14177
  options: this.options,
14177
14178
  onConnectInfo: this.onConnectInfo
14178
- }), g = ow.create(this.logger.createContext("SubscriptionModule"), this.emitter, a), _ = nw.create(this.emitter, g), v = qC.create(this.emitter, this.logger.createContext("PlaybackModule"), this, this.options.get("minBufferTime")), y = ew.create(this.emitter, this.logger.createContext("QualityOfServiceModule"), _, v);
14179
+ }), g = sw.create(this.logger.createContext("SubscriptionModule"), this.emitter, a), _ = rw.create(this.emitter, g), v = JC.create(this.emitter, this.logger.createContext("PlaybackModule"), this, this.options.get("minBufferTime")), y = tw.create(this.emitter, this.logger.createContext("QualityOfServiceModule"), _, v);
14179
14180
  this.encryptedMediaExtensions = new $a(this.emitter, this.logger.createContext("EncryptedMediaExtensions"), t.drm), this.drm = {
14180
14181
  setHeaders: (e) => {
14181
14182
  this.encryptedMediaExtensions.headers = e;
@@ -14194,7 +14195,7 @@ var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PU
14194
14195
  logger: this.logger.createContext("MediaElement"),
14195
14196
  poster: x
14196
14197
  });
14197
- e.on("buffer state", (e) => this.onMediaElementBufferState(e, te)), e.on("needs user input", (e) => this.emitter.emit("needs user input", e)), e.on("volume state", (e) => this.emitter.emit("volume state", e)), e.on("media element state", (e) => this.onMediaElementState(e)), this.element = e.element, this.playbackSource = e, $a.isSupported() && this.encryptedMediaExtensions.attach(e.element), te = FC.create(this.logger.createContext("MseModule"), this.emitter, this.element), this.options.get("pauseSupportEnabled") || (ne = Ew.create(this.logger.createContext("UnpauseModule"), [e], b)), this.options.get("pictureInPictureEnabled") && this.emitter.emit("add picture in picture listener", { element: e.element });
14198
+ e.on("buffer state", (e) => this.onMediaElementBufferState(e, te)), e.on("needs user input", (e) => this.emitter.emit("needs user input", e)), e.on("volume state", (e) => this.emitter.emit("volume state", e)), e.on("media element state", (e) => this.onMediaElementState(e)), this.element = e.element, this.playbackSource = e, $a.isSupported() && this.encryptedMediaExtensions.attach(e.element), te = FC.create(this.logger.createContext("MseModule"), this.emitter, this.element), this.options.get("pauseSupportEnabled") || (ne = Dw.create(this.logger.createContext("UnpauseModule"), [e], b)), this.options.get("pictureInPictureEnabled") && this.emitter.emit("add picture in picture listener", { element: e.element });
14198
14199
  } else if (this.streamsToMediaElement()) {
14199
14200
  let e = AC.create(this.emitter, this.logger.createContext("ModernCanvasModule"), this.pool, this, {
14200
14201
  type: this.options.get("media") === "audio" ? "audio" : "video",
@@ -14208,7 +14209,7 @@ var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PU
14208
14209
  });
14209
14210
  this.element = e.element().element, this.playbackSource = e, ie = e;
14210
14211
  let t = this.browser.platform.isIOS && this.browser.platform.iosVersion <= 15;
14211
- this.options.get("pictureInPictureEnabled") && !t && this.emitter.emit("add picture in picture listener", { element: this.element }), this.options.get("pauseSupportEnabled") || (ne = Ew.create(this.logger.createContext("UnpauseModule"), e.elements(), b));
14212
+ this.options.get("pictureInPictureEnabled") && !t && this.emitter.emit("add picture in picture listener", { element: this.element }), this.options.get("pauseSupportEnabled") || (ne = Dw.create(this.logger.createContext("UnpauseModule"), e.elements(), b));
14212
14213
  } else {
14213
14214
  let e;
14214
14215
  e = CC.create(this.emitter, this.logger.createContext("LegacyCanvasModule"), this.pool, this, this.options.get("muted") || this.options.get("media") === "video", this.options.get("volume"), () => {
@@ -14229,9 +14230,9 @@ var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PU
14229
14230
  getTargetBufferTime: () => v.getTargetBufferTime(),
14230
14231
  getNextBufferedRangeStart: te ? (e) => te.getNextBufferedRangeStart(e) : void 0,
14231
14232
  getBufferedEndAt: te ? (e) => te.getBufferedEndAt(e) : void 0
14232
- }, oe = bw.create(this.emitter, this.logger.createContext("SyncModule"), this.playbackSource, C, ae, S), w = cC.create(this.logger.createContext("JitterModule")), se = ou.create(this.emitter), ce = (this.options.get("edgeUrl") || this.options.get("url")).replace("wss://", "https://").replace("ws://", "http://").replace("//lb.", "//errors."), le = new URL("/telemetry", ce).toString();
14233
+ }, oe = xw.create(this.emitter, this.logger.createContext("SyncModule"), this.playbackSource, C, ae, S), w = cC.create(this.logger.createContext("JitterModule")), se = ou.create(this.emitter), ce = (this.options.get("edgeUrl") || this.options.get("url")).replace("wss://", "https://").replace("ws://", "http://").replace("//lb.", "//errors."), le = new URL("/telemetry", ce).toString();
14233
14234
  this.modules = {
14234
- telemetry: ww.create(this.logger.createContext("TelemetryModule"), this.emitter, {
14235
+ telemetry: Tw.create(this.logger.createContext("TelemetryModule"), this.emitter, {
14235
14236
  url: le,
14236
14237
  enabled: this.options.get("telemetryEnabled"),
14237
14238
  includeStats: !1,
@@ -14316,7 +14317,7 @@ var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PU
14316
14317
  let r = ((t = (n = e.telemetry) == null ? void 0 : n.probability) == null ? 1 : t) >= Math.random();
14317
14318
  if (e.telemetry) {
14318
14319
  var i;
14319
- (i = this.modules.telemetry) == null || i.unload(), this.modules.telemetry = ww.create(this.logger.createContext("TelemetryModule"), this.emitter, L(L({}, e.telemetry), {}, { enabled: this.options.get("telemetryEnabled") && r }), this), this.modules.telemetry.load();
14320
+ (i = this.modules.telemetry) == null || i.unload(), this.modules.telemetry = Tw.create(this.logger.createContext("TelemetryModule"), this.emitter, L(L({}, e.telemetry), {}, { enabled: this.options.get("telemetryEnabled") && r }), this), this.modules.telemetry.load();
14320
14321
  }
14321
14322
  }), this.emitter.on("adapt level", (e) => {
14322
14323
  let t = this.modules.renditions.getRenditionLevels(), n = this.modules.renditions.getRenditionLevel(), r = t.findIndex((e) => e === n), i = t.length - 1, a = r;
@@ -14347,8 +14348,8 @@ var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PU
14347
14348
  audio: L(L({}, this.targetSubscription.audio), d == null ? void 0 : d.audio)
14348
14349
  })), this.emitter.emit("adapted level");
14349
14350
  }), this.emitter.on("text track data", (e) => {
14350
- let t = j(Xw, this).find((t) => t.language === e.language), n = this.modules.sync.getTimeshiftOffset() / 1e3, r = n - j(Yw, this);
14351
- if (k(Yw, this, n), t) {
14351
+ let t = j(Zw, this).find((t) => t.language === e.language), n = this.modules.sync.getTimeshiftOffset() / 1e3, r = n - j(Xw, this);
14352
+ if (k(Xw, this, n), t) {
14352
14353
  if (t.cues) for (let e of t.cues) e.startTime -= r, e.endTime -= r;
14353
14354
  for (let r of e.cues) {
14354
14355
  let e = new VTTCue(r.startTime - n, r.endTime - n, r.text);
@@ -14364,19 +14365,19 @@ var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PU
14364
14365
  this.clientIp = t.ip;
14365
14366
  break;
14366
14367
  case "renditions":
14367
- this.updateTextTracks(t.renditions), k(Zw, this, this.filterRenditions(t.renditions).then((e) => {
14368
+ this.updateTextTracks(t.renditions), k(Qw, this, this.filterRenditions(t.renditions).then((e) => {
14368
14369
  this.emitter.emit("renditions", {
14369
14370
  renditions: e,
14370
14371
  channelId: this.currentSubscription.channelId
14371
14372
  }), this.emit("rendition levels", this.modules.renditions.getRenditionLevels()), this.emitLanguagesIfChanged();
14372
14373
  }).finally(() => {
14373
- k(Zw, this, void 0);
14374
+ k(Qw, this, void 0);
14374
14375
  }));
14375
14376
  break;
14376
14377
  case "subscription changed":
14377
14378
  var r;
14378
14379
  try {
14379
- Gw(t.subscription);
14380
+ Kw(t.subscription);
14380
14381
  } catch (e) {
14381
14382
  this.emitter.emit("error", new U("Subscription failed validation", {
14382
14383
  source: e instanceof Error ? e : void 0,
@@ -14507,7 +14508,7 @@ var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PU
14507
14508
  let O = function() {
14508
14509
  var e = N(function* (e) {
14509
14510
  let t = e.channelId;
14510
- j(Zw, n) && (yield j(Zw, n));
14511
+ j(Qw, n) && (yield j(Qw, n));
14511
14512
  let r = n.modules.renditions.getRendition(e.renditionId, t);
14512
14513
  if (!jl(e.flags)) {
14513
14514
  if (Ml(e.flags)) {
@@ -14521,8 +14522,8 @@ var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PU
14521
14522
  } catch (e) {
14522
14523
  n.logger.warn("failed to parse WebVTT segment, dropping it", e);
14523
14524
  }
14524
- let a = r / 1e3, o = j(Xw, n).find((t) => t.language === e.language), s = a - j(Yw, n);
14525
- if (k(Yw, n, a), o) {
14525
+ let a = r / 1e3, o = j(Zw, n).find((t) => t.language === e.language), s = a - j(Xw, n);
14526
+ if (k(Xw, n, a), o) {
14526
14527
  if (o.cues) for (let e of o.cues) e.startTime -= s, e.endTime -= s;
14527
14528
  for (let e of i) {
14528
14529
  let t = new VTTCue(e.startTime - a, e.endTime - a, e.text);
@@ -14558,10 +14559,10 @@ var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PU
14558
14559
  mimeType: s
14559
14560
  }), n.emit("initialized media");
14560
14561
  } else {
14561
- let t = Iw(e, r, n.sizes.get(e.renditionId));
14562
+ let t = Lw(e, r, n.sizes.get(e.renditionId));
14562
14563
  n.modules.jitter.recordSample(t);
14563
14564
  let a = n.sampleProcessingSesssions.get(i);
14564
- if (!a) a = jw(n.modules.sync.processSample(t)), n.sampleProcessingSesssions.set(i, a);
14565
+ if (!a) a = Mw(n.modules.sync.processSample(t)), n.sampleProcessingSesssions.set(i, a);
14565
14566
  else {
14566
14567
  let e = n.willUseMediaSource() && n.isSwitchingRenditionLevel && t.type === "video", r = a(n.modules.sync.processSample(t), e), i = t;
14567
14568
  r.forEach((e) => {
@@ -14668,7 +14669,7 @@ var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PU
14668
14669
  this.modules.subscription.setLanguage(e), this.alignSizeAndBitRate(this.targetSubscription);
14669
14670
  }
14670
14671
  set textTrack(e) {
14671
- e !== this.textTrack && (j(Xw, this).forEach((t) => {
14672
+ e !== this.textTrack && (j(Zw, this).forEach((t) => {
14672
14673
  if (t.label === e) t.mode = "showing";
14673
14674
  else {
14674
14675
  if (t.mode === "showing" && t.cues) for (let e of [...t.cues]) t.removeCue(e);
@@ -14677,11 +14678,11 @@ var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PU
14677
14678
  }), this.emitter.emit("text track", e));
14678
14679
  }
14679
14680
  get textTracks() {
14680
- return j(Xw, this).filter((e) => e.mode !== "disabled").map((e) => e.label);
14681
+ return j(Zw, this).filter((e) => e.mode !== "disabled").map((e) => e.label);
14681
14682
  }
14682
14683
  get textTrack() {
14683
14684
  var e;
14684
- return (e = j(Xw, this).find((e) => e.mode === "showing")) == null ? void 0 : e.label;
14685
+ return (e = j(Zw, this).find((e) => e.mode === "showing")) == null ? void 0 : e.label;
14685
14686
  }
14686
14687
  get channelId() {
14687
14688
  var e, t;
@@ -14819,7 +14820,7 @@ var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PU
14819
14820
  return this.modules.subscription.getTargetSubscription();
14820
14821
  }
14821
14822
  resolvedDecoder(e) {
14822
- return Fw(this.options.get("decoders", e), this.browser.supportsMediaSource, this.options.get("drm"));
14823
+ return Iw(this.options.get("decoders", e), this.browser.supportsMediaSource, this.options.get("drm"));
14823
14824
  }
14824
14825
  usesSplitCanvasAudio() {
14825
14826
  return !this.willUseMediaSource() && this.options.get("streamToMediaElementEnabled") && Lt(this.browser) && this.options.get("media") !== "audio" && this.options.get("media") !== "video" && this.browser.platform.isIOS;
@@ -14859,89 +14860,89 @@ var qw = 1e4, Jw = 1280 * 720, Yw = /* @__PURE__ */ new WeakMap(), Xw = /* @__PU
14859
14860
  return this.hasCalledConnect && this.isBackgroundPlayEnabled(e) && !this.isUserPaused;
14860
14861
  }
14861
14862
  };
14862
- p(Qw, "MAX_POOL_SIZE", 10), p(Qw, "REMOVE_CUE_THRESHOLD", 1e3 * 10), p(Qw, "BACKGROUND_INACTIVITY_DISCONNECT_TIMEOUT", 1e3 * 15), p(Qw, "VISIBLE_PAUSE_DISCONNECT_DELAY", 1e3);
14863
- var $w = {
14863
+ p($w, "MAX_POOL_SIZE", 10), p($w, "REMOVE_CUE_THRESHOLD", 1e3 * 10), p($w, "BACKGROUND_INACTIVITY_DISCONNECT_TIMEOUT", 1e3 * 15), p($w, "VISIBLE_PAUSE_DISCONNECT_DELAY", 1e3);
14864
+ var eT = {
14864
14865
  bar: "_bar_qm7bl_1",
14865
14866
  hidden: "_hidden_qm7bl_47"
14866
- }, eT = "_withThumbnails_suenn_19", tT = {
14867
+ }, tT = "_withThumbnails_suenn_19", nT = {
14867
14868
  "channel-selection-item": "_channel-selection-item_suenn_1",
14868
14869
  "channel-selection-item-selected": "_channel-selection-item-selected_suenn_8",
14869
14870
  "channel-selection-item-image": "_channel-selection-item-image_suenn_13",
14870
- withThumbnails: eT,
14871
+ withThumbnails: tT,
14871
14872
  "hide-on-small": "_hide-on-small_suenn_27"
14872
- }, nT = { "icon-button": "_icon-button_5fg7v_1" }, rT = {
14873
+ }, rT = { "icon-button": "_icon-button_5fg7v_1" }, iT = {
14873
14874
  viewBox: "-10 -10 44 44",
14874
14875
  content: "<g fill=\"none\" stroke=\"white\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z\" clip-rule=\"evenodd\" />\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M17 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2\" />\n </g>"
14875
- }, iT = {
14876
+ }, aT = {
14876
14877
  viewBox: "-160 -160 832 832",
14877
14878
  content: "<path fill=\"white\" d=\"M208,432H160a16,16,0,0,1-16-16V96a16,16,0,0,1,16-16h48a16,16,0,0,1,16,16V416A16,16,0,0,1,208,432Z\"/><path fill=\"white\" d=\"M352,432H304a16,16,0,0,1-16-16V96a16,16,0,0,1,16-16h48a16,16,0,0,1,16,16V416A16,16,0,0,1,352,432Z\"/>"
14878
- }, aT = {
14879
+ }, oT = {
14879
14880
  viewBox: "-6 -6 36 36",
14880
14881
  content: "<path d=\"M7 17.259V6.74104C7 5.96925 7.83721 5.48837 8.50387 5.87726L18.2596 11.5681C18.5904 11.761 18.5904 12.2389 18.2596 12.4319L8.50387 18.1227C7.83721 18.5116 7 18.0308 7 17.259Z\" fill=\"none\" stroke=\"white\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>"
14881
- }, oT = {
14882
+ }, sT = {
14882
14883
  viewBox: "-10 -10 44 44",
14883
14884
  content: "<g fill=\"none\" stroke=\"white\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z\" />\n </svg>"
14884
- }, sT = {
14885
+ }, cT = {
14885
14886
  viewBox: "-10 -10 44 44",
14886
14887
  content: "\n <path stroke=\"white\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z\" />"
14887
- }, cT = {
14888
+ }, lT = {
14888
14889
  viewBox: "-12 -12 38 38",
14889
14890
  content: "<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-5.000000, -5.000000)\">\n <path d=\"M6,14 C5.45,14 5,14.45 5,15 L5,18 C5,18.55 5.45,19 6,19 L9,19 C9.55,19 10,18.55 10,18 C10,17.45 9.55,17 9,17 L7,17 L7,15 C7,14.45 6.55,14 6,14 Z M6,10 C6.55,10 7,9.55 7,9 L7,7 L9,7 C9.55,7 10,6.55 10,6 C10,5.45 9.55,5 9,5 L6,5 C5.45,5 5,5.45 5,6 L5,9 C5,9.55 5.45,10 6,10 Z M17,17 L15,17 C14.45,17 14,17.45 14,18 C14,18.55 14.45,19 15,19 L18,19 C18.55,19 19,18.55 19,18 L19,15 C19,14.45 18.55,14 18,14 C17.45,14 17,14.45 17,15 L17,17 Z M14,6 C14,6.55 14.45,7 15,7 L17,7 L17,9 C17,9.55 17.45,10 18,10 C18.55,10 19,9.55 19,9 L19,6 C19,5.45 18.55,5 18,5 L15,5 C14.45,5 14,5.45 14,6 Z\" fill=\"white\"></path>\n</g>"
14890
- }, lT = {
14891
+ }, uT = {
14891
14892
  viewBox: "-12 -12 38 38",
14892
14893
  content: "<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-5.000000, -5.000000)\">\n <path d=\"M6,16 L8,16 L8,18 C8,18.55 8.45,19 9,19 C9.55,19 10,18.55 10,18 L10,15 C10,14.45 9.55,14 9,14 L6,14 C5.45,14 5,14.45 5,15 C5,15.55 5.45,16 6,16 Z M8,8 L6,8 C5.45,8 5,8.45 5,9 C5,9.55 5.45,10 6,10 L9,10 C9.55,10 10,9.55 10,9 L10,6 C10,5.45 9.55,5 9,5 C8.45,5 8,5.45 8,6 L8,8 Z M15,19 C15.55,19 16,18.55 16,18 L16,16 L18,16 C18.55,16 19,15.55 19,15 C19,14.45 18.55,14 18,14 L15,14 C14.45,14 14,14.45 14,15 L14,18 C14,18.55 14.45,19 15,19 Z M16,8 L16,6 C16,5.45 15.55,5 15,5 C14.45,5 14,5.45 14,6 L14,9 C14,9.55 14.45,10 15,10 L18,10 C18.55,10 19,9.55 19,9 C19,8.45 18.55,8 18,8 L16,8 Z\" fill=\"white\"></path>\n</g>"
14893
- }, uT = {
14894
+ }, dT = {
14894
14895
  viewBox: "-10 -10 44 44",
14895
14896
  content: "<path fill=\"white\" d=\"M19 7h-8v6h8V7zm2-4H3c-1.1 0-2 .9-2 2v14c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98V5c0-1.1-.9-2-2-2zm0 16.01H3V4.98h18v14.03z\"/>"
14896
- }, dT = {
14897
+ }, fT = {
14897
14898
  viewBox: "-10 -10 45 45",
14898
14899
  content: "<path fill=\"white\" d=\"M20 8H4V6h16v2zm-2-6H6v2h12V2zm4 10v8c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2v-8c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2zm-6 4l-6-3.27v6.53L16 16z\"/>"
14899
- }, fT = {
14900
+ }, pT = {
14900
14901
  viewBox: "-8 -8 40 40",
14901
14902
  content: "<path fill=\"white\" d=\"M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 11H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm7-1c0 .55-.45 1-1 1h-.75v1.5h-1.5V15H14c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v4zm-3.5-.5h2v-3h-2v3z\"/>"
14902
- }, pT = {
14903
+ }, mT = {
14903
14904
  viewBox: "-8 -8 40 40",
14904
14905
  content: "<path fill=\"white\" d=\"M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z\"/>"
14905
- }, mT = {
14906
+ }, hT = {
14906
14907
  viewBox: "-8 -8 40 40",
14907
14908
  content: "<path fill=\"white\" d=\"M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM4 12h4v2H4v-2zm10 6H4v-2h10v2zm6 0h-4v-2h4v2zm0-4H10v-2h10v2z\"></path>"
14908
- }, hT = {
14909
+ }, gT = {
14909
14910
  viewBox: "-8 -8 40 40",
14910
14911
  content: "<path fill=\"white\" d=\"M12.8 13.4c-.1-.1-.1-.2-.2-.2c-.5-.3-1.1-.2-1.5.2l-4 6c0 .2-.1.4-.1.6c0 .6.4 1 1 1h8c.2 0 .4-.1.6-.2c.5-.3.6-.9.3-1.4zM19 3H5C3.3 3 2 4.3 2 6v9c0 1.7 1.3 3 3 3h.8c.6 0 1-.4 1-1s-.4-1-1-1H5c-.6 0-1-.4-1-1V6c0-.6.4-1 1-1h14c.6 0 1 .4 1 1v9c0 .6-.4 1-1 1h-.8c-.6 0-1 .4-1 1s.4 1 1 1h.8c1.7 0 3-1.3 3-3V6c0-1.7-1.3-3-3-3\"/>"
14911
14912
  };
14912
14913
  //#endregion
14913
14914
  //#region ../../libs/player/src/IconButton.ts
14914
14915
  m();
14915
- var gT, _T = {
14916
- enter: cT,
14917
- exit: lT,
14918
- pip: uT,
14919
- channels: dT,
14920
- languages: pT,
14921
- textTracks: mT,
14922
- levels: fT,
14923
- oneToOne: sT,
14924
- mute: rT,
14925
- unmute: oT,
14926
- pause: iT,
14927
- play: aT,
14928
- airPlay: hT
14929
- }, vT = (gT = nT["icon-button"]) == null ? "" : gT, yT = class extends h {
14916
+ var _T, vT = {
14917
+ enter: lT,
14918
+ exit: uT,
14919
+ pip: dT,
14920
+ channels: fT,
14921
+ languages: mT,
14922
+ textTracks: hT,
14923
+ levels: pT,
14924
+ oneToOne: cT,
14925
+ mute: iT,
14926
+ unmute: sT,
14927
+ pause: aT,
14928
+ play: oT,
14929
+ airPlay: gT
14930
+ }, yT = (_T = rT["icon-button"]) == null ? "" : _T, bT = class extends h {
14930
14931
  constructor(e, t, n) {
14931
14932
  super(document.createElement("div")), p(this, "iconElement", void 0), p(this, "setIcon", (e) => {
14932
- this.iconElement.setAttribute("viewBox", _T[e].viewBox), this.iconElement.innerHTML = _T[e].content;
14933
- }), p(this, "isHidden", () => this.element.style.display === "none"), p(this, "setHidden", (e) => e ? this.hide() : this.show()), p(this, "show", () => void (this.element.style.display = "block")), p(this, "hide", () => void (this.element.style.display = "none")), this.element.style.cursor = "pointer", this.element.setAttribute("role", "button"), this.element.setAttribute("aria-label", e), this.iconElement = document.createElementNS("http://www.w3.org/2000/svg", "svg"), this.iconElement.setAttribute("width", "40px"), this.iconElement.setAttribute("height", "40px"), this.iconElement.setAttribute("class", vT), this.setIcon(t), this.element.addEventListener("click", n), this.element.appendChild(this.iconElement);
14933
+ this.iconElement.setAttribute("viewBox", vT[e].viewBox), this.iconElement.innerHTML = vT[e].content;
14934
+ }), p(this, "isHidden", () => this.element.style.display === "none"), p(this, "setHidden", (e) => e ? this.hide() : this.show()), p(this, "show", () => void (this.element.style.display = "block")), p(this, "hide", () => void (this.element.style.display = "none")), this.element.style.cursor = "pointer", this.element.setAttribute("role", "button"), this.element.setAttribute("aria-label", e), this.iconElement = document.createElementNS("http://www.w3.org/2000/svg", "svg"), this.iconElement.setAttribute("width", "40px"), this.iconElement.setAttribute("height", "40px"), this.iconElement.setAttribute("class", yT), this.setIcon(t), this.element.addEventListener("click", n), this.element.appendChild(this.iconElement);
14934
14935
  }
14935
- }, bT = "_list_1vkum_1", xT = "_hidden_1vkum_20", ST = {
14936
- list: bT,
14936
+ }, xT = "_list_1vkum_1", ST = "_hidden_1vkum_20", CT = {
14937
+ list: xT,
14937
14938
  "list-item": "_list-item_1vkum_12",
14938
14939
  "list-item-disabled": "_list-item-disabled_1vkum_16",
14939
- hidden: xT
14940
+ hidden: ST
14940
14941
  };
14941
14942
  //#endregion
14942
14943
  //#region ../../libs/player/src/List.ts
14943
14944
  m();
14944
- var CT, wT, TT, ET, DT = (CT = ST.hidden) == null ? "" : CT, OT = (wT = ST.list) == null ? "" : wT, kT = (TT = ST["list-item"]) == null ? "" : TT, AT = (ET = ST["list-item-disabled"]) == null ? "" : ET, jT = class extends h {
14945
+ var wT, TT, ET, DT, OT = (wT = CT.hidden) == null ? "" : wT, kT = (TT = CT.list) == null ? "" : TT, AT = (ET = CT["list-item"]) == null ? "" : ET, jT = (DT = CT["list-item-disabled"]) == null ? "" : DT, MT = class extends h {
14945
14946
  constructor({ items: e, onItemClick: t, classNames: n = [], maxHeight: r }) {
14946
14947
  super(document.createElement("div")), p(this, "onItemClick", void 0), p(this, "updateItems", (e) => {
14947
14948
  for (; this.element.firstChild;) {
@@ -14950,11 +14951,11 @@ var CT, wT, TT, ET, DT = (CT = ST.hidden) == null ? "" : CT, OT = (wT = ST.list)
14950
14951
  }
14951
14952
  e.forEach((e) => {
14952
14953
  let t = document.createElement("div");
14953
- e.disabled || t.addEventListener("click", () => this.onItemClick(e)), t.className = [kT, e.disabled ? AT : ""].join(" "), t.appendChild(e.element()), this.element.appendChild(t);
14954
+ e.disabled || t.addEventListener("click", () => this.onItemClick(e)), t.className = [AT, e.disabled ? jT : ""].join(" "), t.appendChild(e.element()), this.element.appendChild(t);
14954
14955
  });
14955
- }), p(this, "hide", () => this.element.classList.add(DT)), p(this, "show", () => this.element.classList.remove(DT)), this.element.className = [OT, ...n].join(" "), this.onItemClick = t, this.updateItems(e), r && (this.element.style.maxHeight = r);
14956
+ }), p(this, "hide", () => this.element.classList.add(OT)), p(this, "show", () => this.element.classList.remove(OT)), this.element.className = [kT, ...n].join(" "), this.onItemClick = t, this.updateItems(e), r && (this.element.style.maxHeight = r);
14956
14957
  }
14957
- }, MT = {
14958
+ }, NT = {
14958
14959
  container: "_container_13xnz_1",
14959
14960
  hidden: "_hidden_13xnz_6",
14960
14961
  list: "_list_13xnz_10"
@@ -14962,7 +14963,7 @@ var CT, wT, TT, ET, DT = (CT = ST.hidden) == null ? "" : CT, OT = (wT = ST.list)
14962
14963
  //#endregion
14963
14964
  //#region ../../libs/player/src/ToggleListButton.ts
14964
14965
  m();
14965
- var NT, PT, FT, IT = (NT = MT.list) == null ? "" : NT, LT = (PT = MT.hidden) == null ? "" : PT, RT = (FT = MT.container) == null ? "" : FT, zT = class extends h {
14966
+ var PT, FT, IT, LT = (PT = NT.list) == null ? "" : PT, RT = (FT = NT.hidden) == null ? "" : FT, zT = (IT = NT.container) == null ? "" : IT, BT = class extends h {
14966
14967
  constructor({ label: e, items: t, onItemClick: n, iconButtonType: r, onToggle: i }) {
14967
14968
  super(document.createElement("div")), p(this, "iconButton", void 0), p(this, "onItemClick", void 0), p(this, "onToggle", void 0), p(this, "maxHeight", void 0), p(this, "items", void 0), p(this, "list", void 0), p(this, "onButtonClick", () => {
14968
14969
  this.toggleShowChannels(), this.onToggle(this);
@@ -14971,10 +14972,10 @@ var NT, PT, FT, IT = (NT = MT.list) == null ? "" : NT, LT = (PT = MT.hidden) ==
14971
14972
  }), p(this, "handleItemClick", (e) => {
14972
14973
  this.toggleShowChannels(), this.onItemClick(e);
14973
14974
  }), p(this, "showList", () => {
14974
- this.list = new jT({
14975
+ this.list = new MT({
14975
14976
  items: this.items,
14976
14977
  onItemClick: this.handleItemClick,
14977
- classNames: [IT],
14978
+ classNames: [LT],
14978
14979
  maxHeight: this.maxHeight
14979
14980
  }), this.list.attach(this.element);
14980
14981
  }), p(this, "hideList", () => {
@@ -14984,16 +14985,16 @@ var NT, PT, FT, IT = (NT = MT.list) == null ? "" : NT, LT = (PT = MT.hidden) ==
14984
14985
  var t;
14985
14986
  this.items = e, (t = this.list) == null || t.updateItems(e);
14986
14987
  }), p(this, "isListVisible", () => this.list !== void 0), p(this, "hide", () => {
14987
- LT && this.element.classList.add(LT);
14988
+ RT && this.element.classList.add(RT);
14988
14989
  }), p(this, "show", () => {
14989
- LT && this.element.classList.remove(LT);
14990
- }), this.element.className = RT, this.onItemClick = n, this.onToggle = i, this.items = t, this.iconButton = new yT(e, r, this.onButtonClick), this.iconButton.attach(this.element);
14990
+ RT && this.element.classList.remove(RT);
14991
+ }), this.element.className = zT, this.onItemClick = n, this.onToggle = i, this.items = t, this.iconButton = new bT(e, r, this.onButtonClick), this.iconButton.attach(this.element);
14991
14992
  }
14992
14993
  };
14993
14994
  //#endregion
14994
14995
  //#region ../../libs/player/src/ChannelSelectionButton.ts
14995
14996
  H();
14996
- var BT, VT, HT, UT, WT, GT = (BT = tT["hide-on-small"]) == null ? "" : BT, KT = (VT = tT["channel-selection-item"]) == null ? "" : VT, qT = (HT = tT["channel-selection-item-selected"]) == null ? "" : HT, JT = (UT = tT["channel-selection-item-image"]) == null ? "" : UT, YT = (WT = tT.withThumbnails) == null ? "" : WT, XT = class extends zT {
14997
+ var VT, HT, UT, WT, GT, KT = (VT = nT["hide-on-small"]) == null ? "" : VT, qT = (HT = nT["channel-selection-item"]) == null ? "" : HT, JT = (UT = nT["channel-selection-item-selected"]) == null ? "" : UT, YT = (WT = nT["channel-selection-item-image"]) == null ? "" : WT, XT = (GT = nT.withThumbnails) == null ? "" : GT, ZT = class extends BT {
14997
14998
  constructor({ vindral: e, enabled: t, thumbnailsEnabled: n, thumbnailModule: r }) {
14998
14999
  e.on("channels", () => {
14999
15000
  let i = e.channels.map((t) => ({
@@ -15001,12 +15002,12 @@ var BT, VT, HT, UT, WT, GT = (BT = tT["hide-on-small"]) == null ? "" : BT, KT =
15001
15002
  disabled: !t.isLive,
15002
15003
  element: () => {
15003
15004
  let i = document.createElement("div");
15004
- if (i.className = [KT, t.channelId === e.channelId ? qT : ""].join(" "), r && n) {
15005
- i.classList.add(YT);
15005
+ if (i.className = [qT, t.channelId === e.channelId ? JT : ""].join(" "), r && n) {
15006
+ i.classList.add(XT);
15006
15007
  let e = document.createElement("p");
15007
15008
  e.innerHTML = t.name, i.appendChild(e);
15008
15009
  let n = r.getImageUrl(t), a = document.createElement("img");
15009
- n && (a.className = JT, a.src = n, i.style.backgroundImage = `url(${n})`);
15010
+ n && (a.className = YT, a.src = n, i.style.backgroundImage = `url(${n})`);
15010
15011
  } else i.innerHTML = t.name;
15011
15012
  return i;
15012
15013
  }
@@ -15018,16 +15019,16 @@ var BT, VT, HT, UT, WT, GT = (BT = tT["hide-on-small"]) == null ? "" : BT, KT =
15018
15019
  onItemClick: (t) => e.channelId = t.channel.channelId,
15019
15020
  onToggle: S,
15020
15021
  iconButtonType: "channels"
15021
- }), this.element.classList.add(GT), this.hide();
15022
+ }), this.element.classList.add(KT), this.hide();
15022
15023
  }
15023
- }, ZT = {
15024
+ }, QT = {
15024
15025
  "language-button-item": "_language-button-item_1dov5_1",
15025
15026
  "language-button-item-selected": "_language-button-item-selected_1dov5_6"
15026
15027
  };
15027
15028
  //#endregion
15028
15029
  //#region ../../libs/player/src/LanguageButton.ts
15029
15030
  H();
15030
- var QT, $T, eE = (QT = ZT["language-button-item"]) == null ? "" : QT, tE = ($T = ZT["language-button-item-selected"]) == null ? "" : $T, nE = class extends zT {
15031
+ var $T, eE, tE = ($T = QT["language-button-item"]) == null ? "" : $T, nE = (eE = QT["language-button-item-selected"]) == null ? "" : eE, rE = class extends BT {
15031
15032
  constructor({ vindral: e }) {
15032
15033
  e.on("languages", () => {
15033
15034
  let t = e.languages.map((t) => ({
@@ -15035,7 +15036,7 @@ var QT, $T, eE = (QT = ZT["language-button-item"]) == null ? "" : QT, tE = ($T =
15035
15036
  disabled: !1,
15036
15037
  element: () => {
15037
15038
  let n = document.createElement("div");
15038
- return n.className = [eE, t === e.language ? tE : ""].join(" "), n.innerHTML = t, n;
15039
+ return n.className = [tE, t === e.language ? nE : ""].join(" "), n.innerHTML = t, n;
15039
15040
  }
15040
15041
  }));
15041
15042
  this.maxHeight = `calc(${Math.max(110, e.mediaElement.clientHeight)}px - 46px)`, this.updateItems(t), t.length > 0 ? this.show() : this.hide();
@@ -15051,25 +15052,25 @@ var QT, $T, eE = (QT = ZT["language-button-item"]) == null ? "" : QT, tE = ($T =
15051
15052
  //#endregion
15052
15053
  //#region ../../libs/player/src/PlayControls.ts
15053
15054
  m();
15054
- var rE = class extends h {
15055
+ var iE = class extends h {
15055
15056
  constructor({ vindral: e }) {
15056
15057
  super(document.createElement("div")), p(this, "vindral", void 0), p(this, "playButton", void 0), p(this, "updateState", () => {
15057
15058
  this.playButton.setIcon(this.playIcon());
15058
15059
  }), p(this, "onPlayClick", () => {
15059
15060
  this.vindral.playbackState === "paused" ? this.vindral.play() : this.vindral.pause(), this.playButton.setIcon(this.playIcon());
15060
- }), p(this, "playIcon", () => this.vindral.playbackState === "paused" ? "play" : "pause"), this.element.style.cursor = "pointer", this.vindral = e, this.playButton = new yT("Play", this.playIcon(), this.onPlayClick), this.playButton.attach(this.element);
15061
+ }), p(this, "playIcon", () => this.vindral.playbackState === "paused" ? "play" : "pause"), this.element.style.cursor = "pointer", this.vindral = e, this.playButton = new bT("Play", this.playIcon(), this.onPlayClick), this.playButton.attach(this.element);
15061
15062
  }
15062
- }, iE = "_item_5vhyo_1", aE = "_title_5vhyo_10", oE = {
15063
- item: iE,
15063
+ }, aE = "_item_5vhyo_1", oE = "_title_5vhyo_10", sE = {
15064
+ item: aE,
15064
15065
  "item-selected": "_item-selected_5vhyo_6",
15065
- title: aE,
15066
+ title: oE,
15066
15067
  "sub-title": "_sub-title_5vhyo_14",
15067
15068
  "hide-on-small": "_hide-on-small_5vhyo_21"
15068
15069
  };
15069
15070
  //#endregion
15070
15071
  //#region ../../libs/player/src/RenditionLevelButton.ts
15071
15072
  H();
15072
- var sE, cE, lE, uE, dE, fE = (sE = oE["hide-on-small"]) == null ? "" : sE, pE = (cE = oE.item) == null ? "" : cE, mE = (lE = oE["item-selected"]) == null ? "" : lE, hE = (uE = oE.title) == null ? "" : uE, gE = (dE = oE["sub-title"]) == null ? "" : dE, _E = class extends zT {
15073
+ var cE, lE, uE, dE, fE, pE = (cE = sE["hide-on-small"]) == null ? "" : cE, mE = (lE = sE.item) == null ? "" : lE, hE = (uE = sE["item-selected"]) == null ? "" : uE, gE = (dE = sE.title) == null ? "" : dE, _E = (fE = sE["sub-title"]) == null ? "" : fE, vE = class extends BT {
15073
15074
  constructor({ vindral: e }) {
15074
15075
  let t = () => {
15075
15076
  let t = e.renditionLevels.map((t) => ({
@@ -15078,13 +15079,13 @@ var sE, cE, lE, uE, dE, fE = (sE = oE["hide-on-small"]) == null ? "" : sE, pE =
15078
15079
  element: () => {
15079
15080
  var n, r, i;
15080
15081
  let a = document.createElement("div");
15081
- a.className = [pE, t === e.currentRenditionLevel ? mE : ""].join(" ");
15082
+ a.className = [mE, t === e.currentRenditionLevel ? hE : ""].join(" ");
15082
15083
  let o = document.createElement("span"), s = document.createElement("span"), { audio: c, video: l } = t, u = l ? fn(l) : void 0, d = c ? pn(c.sampleRate) : void 0, f = dn(((n = l == null ? void 0 : l.bitRate) == null ? 0 : n) + ((r = c == null ? void 0 : c.bitRate) == null ? 0 : r));
15083
15084
  if (l) {
15084
15085
  let e = l.frameRate[0] / l.frameRate[1], t = l.frameRate[0] % l.frameRate[1] === 0 ? `${e}p` : `${e.toFixed(2)}p`;
15085
15086
  f += `, ${t}`;
15086
15087
  }
15087
- return o.innerHTML = (i = u == null ? d : u) == null ? "" : i, o.className = hE, s.innerHTML = f, s.className = gE, a.appendChild(o), a.appendChild(s), a;
15088
+ return o.innerHTML = (i = u == null ? d : u) == null ? "" : i, o.className = gE, s.innerHTML = f, s.className = _E, a.appendChild(o), a.appendChild(s), a;
15088
15089
  }
15089
15090
  }));
15090
15091
  this.maxHeight = `calc(${Math.max(110, e.mediaElement.clientHeight)}px - 46px)`, this.updateItems(t);
@@ -15097,20 +15098,20 @@ var sE, cE, lE, uE, dE, fE = (sE = oE["hide-on-small"]) == null ? "" : sE, pE =
15097
15098
  },
15098
15099
  onToggle: S,
15099
15100
  iconButtonType: "levels"
15100
- }), this.element.classList.add(fE);
15101
+ }), this.element.classList.add(pE);
15101
15102
  }
15102
- }, vE = class extends h {
15103
+ }, yE = class extends h {
15103
15104
  constructor() {
15104
15105
  super(document.createElement("div")), this.element.style.flexGrow = "1";
15105
15106
  }
15106
- }, yE = {
15107
+ }, bE = {
15107
15108
  "text-track-button-item": "_text-track-button-item_1ry10_1",
15108
15109
  "text-track-button-item-selected": "_text-track-button-item-selected_1ry10_6"
15109
15110
  };
15110
15111
  //#endregion
15111
15112
  //#region ../../libs/player/src/TextTrackButton.ts
15112
15113
  H();
15113
- var bE, xE, SE = (bE = yE["text-track-button-item"]) == null ? "" : bE, CE = (xE = yE["text-track-button-item-selected"]) == null ? "" : xE, wE = class extends zT {
15114
+ var xE, SE, CE = (xE = bE["text-track-button-item"]) == null ? "" : xE, wE = (SE = bE["text-track-button-item-selected"]) == null ? "" : SE, TE = class extends BT {
15114
15115
  constructor({ vindral: e }) {
15115
15116
  e.on("text tracks", () => {
15116
15117
  let t = e.textTracks.map((t) => ({
@@ -15118,7 +15119,7 @@ var bE, xE, SE = (bE = yE["text-track-button-item"]) == null ? "" : bE, CE = (xE
15118
15119
  disabled: !1,
15119
15120
  element: () => {
15120
15121
  let n = document.createElement("div");
15121
- return n.className = [SE, t === e.textTrack ? CE : ""].join(" "), n.innerHTML = t, n;
15122
+ return n.className = [CE, t === e.textTrack ? wE : ""].join(" "), n.innerHTML = t, n;
15122
15123
  }
15123
15124
  }));
15124
15125
  t.length > 0 ? (t.push({
@@ -15126,7 +15127,7 @@ var bE, xE, SE = (bE = yE["text-track-button-item"]) == null ? "" : bE, CE = (xE
15126
15127
  disabled: !1,
15127
15128
  element: () => {
15128
15129
  let t = document.createElement("div");
15129
- return t.className = [SE, e.textTrack === void 0 ? CE : ""].join(" "), t.innerHTML = "Off", t;
15130
+ return t.className = [CE, e.textTrack === void 0 ? wE : ""].join(" "), t.innerHTML = "Off", t;
15130
15131
  }
15131
15132
  }), this.show()) : this.hide(), this.maxHeight = `calc(${Math.max(110, e.mediaElement.clientHeight)}px - 46px)`, this.updateItems(t);
15132
15133
  }), super({
@@ -15141,26 +15142,26 @@ var bE, xE, SE = (bE = yE["text-track-button-item"]) == null ? "" : bE, CE = (xE
15141
15142
  //#endregion
15142
15143
  //#region ../../libs/player/src/VolumeControls.ts
15143
15144
  m();
15144
- var TE = class extends h {
15145
+ var EE = class extends h {
15145
15146
  constructor({ vindral: e }) {
15146
15147
  super(document.createElement("div")), p(this, "vindral", void 0), p(this, "muteButton", void 0), p(this, "updateState", () => {
15147
15148
  this.muteButton.setIcon(this.muteIcon());
15148
15149
  }), p(this, "onMuteClick", () => {
15149
15150
  this.vindral.muted = !this.vindral.muted, this.muteButton.setIcon(this.muteIcon());
15150
- }), p(this, "muteIcon", () => this.vindral.muted ? "mute" : "unmute"), this.element.style.cursor = "pointer", this.vindral = e, this.muteButton = new yT("Mute", this.muteIcon(), this.onMuteClick), this.muteButton.attach(this.element);
15151
+ }), p(this, "muteIcon", () => this.vindral.muted ? "mute" : "unmute"), this.element.style.cursor = "pointer", this.vindral = e, this.muteButton = new bT("Mute", this.muteIcon(), this.onMuteClick), this.muteButton.attach(this.element);
15151
15152
  }
15152
15153
  };
15153
15154
  //#endregion
15154
15155
  //#region ../../libs/player/src/Bar.ts
15155
15156
  m();
15156
- var EE, DE, OE = (EE = $w.hidden) == null ? "" : EE, kE = (DE = $w.bar) == null ? "" : DE, AE = class extends h {
15157
+ var DE, OE, kE = (DE = eT.hidden) == null ? "" : DE, AE = (OE = eT.bar) == null ? "" : OE, jE = class extends h {
15157
15158
  constructor({ vindral: e, onFullscreenClicked: t, onOneToOneClicked: n, onPipClicked: r, onAirPlayClicked: i, pauseButtonEnabled: a, fullscreenButtonEnabled: o, pipButtonEnabled: s, channelSelectionEnabled: c, channelSelectionThumbnails: l, renditionLevelsEnabled: u, languagesButtonEnabled: d, textTracksButtonEnabled: f, oneToOneButtonEnabled: m, thumbnailModule: h }) {
15158
15159
  super(document.createElement("div")), p(this, "items", []), p(this, "isMouseInElement", !1), p(this, "volumeControls", void 0), p(this, "playControls", void 0), p(this, "oneToOneButton", void 0), p(this, "fullscreenButton", void 0), p(this, "airPlayButton", void 0), p(this, "containerElement", void 0), p(this, "hideLists", () => {
15159
15160
  this.items.forEach((e) => "hideList" in e && e.hideList());
15160
- }), p(this, "listButtons", () => this.items), p(this, "isAnyListOpen", () => this.items.filter((e) => "isListVisible" in e && e.isListVisible()).length > 0), p(this, "hasFocus", () => this.isMouseInElement || this.isAnyListOpen()), p(this, "isHidden", () => this.element.classList.contains(OE)), p(this, "hide", () => {
15161
- this.containerElement.style.setProperty("--vindral-control-bar-offset", "0px"), this.element.classList.add(OE);
15161
+ }), p(this, "listButtons", () => this.items), p(this, "isAnyListOpen", () => this.items.filter((e) => "isListVisible" in e && e.isListVisible()).length > 0), p(this, "hasFocus", () => this.isMouseInElement || this.isAnyListOpen()), p(this, "isHidden", () => this.element.classList.contains(kE)), p(this, "hide", () => {
15162
+ this.containerElement.style.setProperty("--vindral-control-bar-offset", "0px"), this.element.classList.add(kE);
15162
15163
  }), p(this, "show", () => {
15163
- this.containerElement.style.setProperty("--vindral-control-bar-offset", "-96px"), this.element.classList.remove(OE);
15164
+ this.containerElement.style.setProperty("--vindral-control-bar-offset", "-96px"), this.element.classList.remove(kE);
15164
15165
  }), p(this, "addCastButton", () => {
15165
15166
  let e = document.createElement("google-cast-launcher");
15166
15167
  this.element.insertBefore(e, this.element.lastChild);
@@ -15170,65 +15171,65 @@ var EE, DE, OE = (EE = $w.hidden) == null ? "" : EE, kE = (DE = $w.bar) == null
15170
15171
  this.playControls.updateState(), this.volumeControls.updateState();
15171
15172
  }), p(this, "onToggle", (e) => {
15172
15173
  this.listButtons().filter((t) => e !== t).forEach((e) => "hideList" in e && e.hideList());
15173
- }), this.element.className = [kE, OE].join(" ");
15174
- let g = new vE();
15175
- this.oneToOneButton = new yT("One to One", "oneToOne", n), this.fullscreenButton = new yT("Fullscreen", "enter", t), this.airPlayButton = new yT("AirPlay", "airPlay", i);
15176
- let _ = new yT("Picture in Picture", "pip", r), v = new XT({
15174
+ }), this.element.className = [AE, kE].join(" ");
15175
+ let g = new yE();
15176
+ this.oneToOneButton = new bT("One to One", "oneToOne", n), this.fullscreenButton = new bT("Fullscreen", "enter", t), this.airPlayButton = new bT("AirPlay", "airPlay", i);
15177
+ let _ = new bT("Picture in Picture", "pip", r), v = new ZT({
15177
15178
  vindral: e,
15178
15179
  enabled: c,
15179
15180
  thumbnailsEnabled: l,
15180
15181
  thumbnailModule: l ? h : void 0
15181
- }), y = new _E({ vindral: e });
15182
- this.volumeControls = new TE({ vindral: e }), this.playControls = new rE({ vindral: e }), this.containerElement = e.mediaElement, a && e.getOptions().pauseSupportEnabled && this.playControls.attach(this.element), e.getOptions().media !== "video" && this.volumeControls.attach(this.element), g.attach(this.element);
15182
+ }), y = new vE({ vindral: e });
15183
+ this.volumeControls = new EE({ vindral: e }), this.playControls = new iE({ vindral: e }), this.containerElement = e.mediaElement, a && e.getOptions().pauseSupportEnabled && this.playControls.attach(this.element), e.getOptions().media !== "video" && this.volumeControls.attach(this.element), g.attach(this.element);
15183
15184
  let b = [];
15184
15185
  if (d) {
15185
- let t = new nE({ vindral: e });
15186
+ let t = new rE({ vindral: e });
15186
15187
  t.attach(this.element), b.push(t);
15187
15188
  }
15188
15189
  if (f) {
15189
- let t = new wE({ vindral: e });
15190
+ let t = new TE({ vindral: e });
15190
15191
  t.attach(this.element), b.push(t);
15191
15192
  }
15192
15193
  y.attach(this.element), v.attach(this.element), _.attach(this.element), this.oneToOneButton.attach(this.element), this.fullscreenButton.attach(this.element), this.items.push(g, ...b, y, v, _, this.fullscreenButton), this.items.forEach((e) => "onToggle" in e && (e.onToggle = this.onToggle)), m || this.oneToOneButton.hide(), o || this.fullscreenButton.hide(), s || _.hide(), c || v.hide(), u || y.hide(), navigator.maxTouchPoints < 1 && (this.element.addEventListener("mouseenter", () => this.isMouseInElement = !0), this.element.addEventListener("mouseleave", () => this.isMouseInElement = !1));
15193
15194
  }
15194
- }, jE = {
15195
+ }, ME = {
15195
15196
  castoverlay: "_castoverlay_1n91l_1",
15196
15197
  hidden: "_hidden_1n91l_20"
15197
15198
  };
15198
15199
  //#endregion
15199
15200
  //#region ../../libs/player/src/CastOverlay.ts
15200
15201
  m();
15201
- var ME, NE, PE = (ME = jE.hidden) == null ? "" : ME, FE = (NE = jE.castoverlay) == null ? "" : NE, IE = class extends h {
15202
+ var NE, PE, FE = (NE = ME.hidden) == null ? "" : NE, IE = (PE = ME.castoverlay) == null ? "" : PE, LE = class extends h {
15202
15203
  constructor() {
15203
15204
  super(document.createElement("div")), p(this, "onClick", void 0), p(this, "setText", (e) => {
15204
15205
  this.element.innerText = e;
15205
- }), p(this, "hide", () => this.element.classList.add(PE)), p(this, "show", () => this.element.classList.remove(PE)), this.element.classList.add(FE), this.element.classList.add(PE), this.element.innerText = "device";
15206
+ }), p(this, "hide", () => this.element.classList.add(FE)), p(this, "show", () => this.element.classList.remove(FE)), this.element.classList.add(IE), this.element.classList.add(FE), this.element.innerText = "device";
15206
15207
  }
15207
- }, LE = "_button_4ybkq_21", RE = "_image_4ybkq_98", zE = "_overlay_4ybkq_118", BE = "_selected_4ybkq_136", VE = "_hidden_4ybkq_141", HE = "_disabled_4ybkq_145", UE = {
15208
- button: LE,
15208
+ }, RE = "_button_4ybkq_21", zE = "_image_4ybkq_98", BE = "_overlay_4ybkq_118", VE = "_selected_4ybkq_136", HE = "_hidden_4ybkq_141", UE = "_disabled_4ybkq_145", WE = {
15209
+ button: RE,
15209
15210
  "show-and-scaleup": "_show-and-scaleup_4ybkq_1",
15210
- image: RE,
15211
- overlay: zE,
15212
- selected: BE,
15213
- hidden: VE,
15214
- disabled: HE
15211
+ image: zE,
15212
+ overlay: BE,
15213
+ selected: VE,
15214
+ hidden: HE,
15215
+ disabled: UE
15215
15216
  };
15216
15217
  //#endregion
15217
15218
  //#region ../../libs/player/src/ChannelSelectionImageButton.ts
15218
15219
  m();
15219
- var WE, GE, KE, qE, JE, YE = (WE = UE.button) == null ? "" : WE, XE = (GE = UE.hidden) == null ? "" : GE, ZE = (KE = UE.overlay) == null ? "" : KE, QE = (qE = UE.image) == null ? "" : qE, $E = (JE = UE.selected) == null ? "" : JE, eD = class extends h {
15220
+ var GE, KE, qE, JE, YE, XE = (GE = WE.button) == null ? "" : GE, ZE = (KE = WE.hidden) == null ? "" : KE, QE = (qE = WE.overlay) == null ? "" : qE, $E = (JE = WE.image) == null ? "" : JE, eD = (YE = WE.selected) == null ? "" : YE, tD = class extends h {
15220
15221
  constructor({ title: e, onClick: t, imageUrl: n, selected: r }) {
15221
15222
  super(document.createElement("button")), p(this, "overlay", void 0), p(this, "imageHolder1", void 0), p(this, "imageHolder2", void 0), p(this, "isImageHolder1Active", !1), p(this, "loadingOverlay", void 0), p(this, "transition", (e, t, n) => {
15222
15223
  t.style.backgroundImage = `url(${n})`, t.style.opacity = "1", e.style.opacity = "0";
15223
15224
  }), p(this, "setSelected", (e) => {
15224
- e ? this.element.classList.add($E) : this.element.classList.remove($E);
15225
+ e ? this.element.classList.add(eD) : this.element.classList.remove(eD);
15225
15226
  }), p(this, "setAnimationDelay", (e) => {
15226
15227
  this.element.style.animationDelay = e;
15227
15228
  }), p(this, "hideLoading", () => {
15228
15229
  this.loadingOverlay.hide();
15229
- }), p(this, "isHidden", () => this.element.classList.contains(XE)), p(this, "setHidden", (e) => e ? this.hide() : this.show()), p(this, "hide", () => this.element.classList.add(XE)), p(this, "show", () => this.element.classList.remove(XE)), this.element.className = YE, r && this.setSelected(r), this.element.onclick = () => {
15230
+ }), p(this, "isHidden", () => this.element.classList.contains(ZE)), p(this, "setHidden", (e) => e ? this.hide() : this.show()), p(this, "hide", () => this.element.classList.add(ZE)), p(this, "show", () => this.element.classList.remove(ZE)), this.element.className = XE, r && this.setSelected(r), this.element.onclick = () => {
15230
15231
  this.loadingOverlay.show(), t();
15231
- }, this.imageHolder1 = document.createElement("div"), this.imageHolder1.className = QE, this.imageHolder1.style.animationFillMode = "forwards", this.imageHolder2 = document.createElement("div"), this.imageHolder2.className = QE, this.imageHolder2.style.animationFillMode = "forwards", n && (this.imageHolder1.style.backgroundImage = `url(${n})`, this.isImageHolder1Active = !0), this.loadingOverlay = new ne(), this.loadingOverlay.attach(this.element), this.loadingOverlay.hide(), this.element.appendChild(this.imageHolder1), this.element.appendChild(this.imageHolder2), this.overlay = document.createElement("div"), this.overlay.className = ZE, this.element.appendChild(this.overlay);
15232
+ }, this.imageHolder1 = document.createElement("div"), this.imageHolder1.className = $E, this.imageHolder1.style.animationFillMode = "forwards", this.imageHolder2 = document.createElement("div"), this.imageHolder2.className = $E, this.imageHolder2.style.animationFillMode = "forwards", n && (this.imageHolder1.style.backgroundImage = `url(${n})`, this.isImageHolder1Active = !0), this.loadingOverlay = new ne(), this.loadingOverlay.attach(this.element), this.loadingOverlay.hide(), this.element.appendChild(this.imageHolder1), this.element.appendChild(this.imageHolder2), this.overlay = document.createElement("div"), this.overlay.className = QE, this.element.appendChild(this.overlay);
15232
15233
  let i = document.createElement("span");
15233
15234
  i.innerHTML = e, this.element.appendChild(i), this.show();
15234
15235
  }
@@ -15241,23 +15242,23 @@ var WE, GE, KE, qE, JE, YE = (WE = UE.button) == null ? "" : WE, XE = (GE = UE.h
15241
15242
  this.isImageHolder1Active ? this.transition(this.imageHolder1, this.imageHolder2, e) : this.transition(this.imageHolder2, this.imageHolder1, e), this.isImageHolder1Active = !this.isImageHolder1Active;
15242
15243
  }
15243
15244
  }
15244
- }, tD = "_container_btpgd_13", nD = "_hidden_btpgd_37", rD = "_disabled_btpgd_41", iD = {
15245
+ }, nD = "_container_btpgd_13", rD = "_hidden_btpgd_37", iD = "_disabled_btpgd_41", aD = {
15245
15246
  "channel-selection-overlay": "_channel-selection-overlay_btpgd_1",
15246
- container: tD,
15247
- hidden: nD,
15248
- disabled: rD
15247
+ container: nD,
15248
+ hidden: rD,
15249
+ disabled: iD
15249
15250
  };
15250
15251
  //#endregion
15251
15252
  //#region ../../libs/player/src/ChannelSelectionList.ts
15252
15253
  m();
15253
- var aD, oD, sD = (aD = iD.hidden) == null ? "" : aD, cD = (oD = iD.container) == null ? "" : oD, lD = class extends h {
15254
+ var oD, sD, cD = (oD = aD.hidden) == null ? "" : oD, lD = (sD = aD.container) == null ? "" : sD, uD = class extends h {
15254
15255
  constructor({ vindral: e, thumbnailModule: t }) {
15255
15256
  var n;
15256
15257
  super(document.createElement("div")), p(this, "thumbnailModule", void 0), p(this, "list", void 0), p(this, "vindral", void 0), p(this, "setSelected", (e) => {
15257
15258
  this.list.forEach((t, n) => {
15258
15259
  t.setSelected(n.channelId === e.channelId);
15259
15260
  }), e.channelId !== this.vindral.channelId && (this.vindral.channelId = e.channelId);
15260
- }), p(this, "isHidden", () => this.element.classList.contains(sD)), p(this, "setHidden", (e) => e ? this.hide() : this.show()), p(this, "hide", () => this.element.classList.add(sD)), p(this, "show", () => this.element.classList.remove(sD)), this.thumbnailModule = t, this.list = /* @__PURE__ */ new Map(), this.vindral = e, this.vindral.on("context switch", (e) => {
15261
+ }), p(this, "isHidden", () => this.element.classList.contains(cD)), p(this, "setHidden", (e) => e ? this.hide() : this.show()), p(this, "hide", () => this.element.classList.add(cD)), p(this, "show", () => this.element.classList.remove(cD)), this.thumbnailModule = t, this.list = /* @__PURE__ */ new Map(), this.vindral = e, this.vindral.on("context switch", (e) => {
15261
15262
  if (e === "completed") {
15262
15263
  this.list.forEach((e) => e.hideLoading());
15263
15264
  let e = this.vindral.channelId;
@@ -15272,7 +15273,7 @@ var aD, oD, sD = (aD = iD.hidden) == null ? "" : aD, cD = (oD = iD.container) ==
15272
15273
  this.vindral.channels.forEach((t, n) => {
15273
15274
  var r;
15274
15275
  if (!t.isLive) return;
15275
- let i = new eD({
15276
+ let i = new tD({
15276
15277
  title: t.name,
15277
15278
  onClick: () => {
15278
15279
  this.setSelected(t);
@@ -15287,35 +15288,35 @@ var aD, oD, sD = (aD = iD.hidden) == null ? "" : aD, cD = (oD = iD.container) ==
15287
15288
  var n;
15288
15289
  e.setImageUrl((n = this.thumbnailModule) == null ? void 0 : n.getImageUrl(t));
15289
15290
  });
15290
- }), this.element.className = cD, this.show();
15291
+ }), this.element.className = lD, this.show();
15291
15292
  }
15292
- }, uD = { fullscreen: "_fullscreen_1v9d8_1" };
15293
+ }, dD = { fullscreen: "_fullscreen_1v9d8_1" };
15293
15294
  H(), B(), m(), O();
15294
- var dD, fD = (dD = uD.fullscreen) == null ? "" : dD, pD = /* @__PURE__ */ new WeakSet(), mD = class e extends nn {
15295
+ var fD, pD = (fD = dD.fullscreen) == null ? "" : fD, mD = /* @__PURE__ */ new WeakSet(), hD = class e extends nn {
15295
15296
  constructor(t) {
15296
- super(), z(this, pD), p(this, "container", void 0), p(this, "unload", () => {
15297
+ super(), z(this, mD), p(this, "container", void 0), p(this, "unload", () => {
15297
15298
  document.removeEventListener("webkitfullscreenchange", this.onChange), document.removeEventListener("mozfullscreenchange", this.onChange), document.removeEventListener("fullscreenchange", this.onChange), this.container.removeEventListener("webkitendfullscreen", this.onChange);
15298
- }), p(this, "request", () => D(pD, this, hD).call(this).catch((e) => {
15299
+ }), p(this, "request", () => D(mD, this, gD).call(this).catch((e) => {
15299
15300
  throw this.onChange(), e;
15300
- })), p(this, "exit", () => D(pD, this, gD).call(this).catch((e) => {
15301
+ })), p(this, "exit", () => D(mD, this, _D).call(this).catch((e) => {
15301
15302
  throw this.onChange(), e;
15302
- })), p(this, "onChange", () => this.emit("on fullscreen change", this.isFullscreen())), p(this, "isFullscreen", () => !!(bt() || this.container.classList.contains(fD))), p(this, "isSupported", () => e.isFullscreenApiSupported(this.container) || !this.isInIframe()), p(this, "isInIframe", () => window.location !== window.parent.location), this.container = t, document.addEventListener("webkitfullscreenchange", this.onChange), document.addEventListener("mozfullscreenchange", this.onChange), document.addEventListener("fullscreenchange", this.onChange), this.container.addEventListener("webkitendfullscreen", this.onChange);
15303
+ })), p(this, "onChange", () => this.emit("on fullscreen change", this.isFullscreen())), p(this, "isFullscreen", () => !!(bt() || this.container.classList.contains(pD))), p(this, "isSupported", () => e.isFullscreenApiSupported(this.container) || !this.isInIframe()), p(this, "isInIframe", () => window.location !== window.parent.location), this.container = t, document.addEventListener("webkitfullscreenchange", this.onChange), document.addEventListener("mozfullscreenchange", this.onChange), document.addEventListener("fullscreenchange", this.onChange), this.container.addEventListener("webkitendfullscreen", this.onChange);
15303
15304
  }
15304
15305
  };
15305
- function hD() {
15306
+ function gD() {
15306
15307
  let e = xt(this.container);
15307
- return e ? e() : (this.container.classList.add(fD), Promise.resolve());
15308
+ return e ? e() : (this.container.classList.add(pD), Promise.resolve());
15308
15309
  }
15309
- function gD() {
15310
+ function _D() {
15310
15311
  let e = St(this.container);
15311
- return e ? e() : (this.container.classList.remove(fD), Promise.resolve());
15312
+ return e ? e() : (this.container.classList.remove(pD), Promise.resolve());
15312
15313
  }
15313
- p(mD, "isFullscreenApiSupported", (e) => Ct(e));
15314
- var _D = {
15314
+ p(hD, "isFullscreenApiSupported", (e) => Ct(e));
15315
+ var vD = {
15315
15316
  player: "_player_1vdos_1",
15316
15317
  "one-to-one": "_one-to-one_1vdos_19",
15317
15318
  "audio-only": "_audio-only_1vdos_28"
15318
- }, vD = {
15319
+ }, yD = {
15319
15320
  playoverlay: "_playoverlay_1niji_1",
15320
15321
  hidden: "_hidden_1niji_17",
15321
15322
  "playoverlay-indicator": "_playoverlay-indicator_1niji_23"
@@ -15323,15 +15324,15 @@ var _D = {
15323
15324
  //#endregion
15324
15325
  //#region ../../libs/player/src/PlayOverlay.ts
15325
15326
  m();
15326
- var yD, bD, xD, SD = (yD = vD.hidden) == null ? "" : yD, CD = (bD = vD.playoverlay) == null ? "" : bD, wD = (xD = vD["playoverlay-indicator"]) == null ? "" : xD, TD = class extends h {
15327
+ var bD, xD, SD, CD = (bD = yD.hidden) == null ? "" : bD, wD = (xD = yD.playoverlay) == null ? "" : xD, TD = (SD = yD["playoverlay-indicator"]) == null ? "" : SD, ED = class extends h {
15327
15328
  constructor() {
15328
- super(document.createElement("div")), p(this, "onClick", void 0), p(this, "indicator", document.createElement("div")), p(this, "isHidden", () => this.element.classList.contains(SD)), p(this, "setHidden", (e) => e ? this.hide() : this.show()), p(this, "hide", () => this.element.classList.add(SD)), p(this, "show", () => this.element.classList.remove(SD)), this.element.classList.add(CD), this.element.classList.add(SD), this.indicator.className = wD, this.element.appendChild(this.indicator), this.element.onclick = () => {
15329
+ super(document.createElement("div")), p(this, "onClick", void 0), p(this, "indicator", document.createElement("div")), p(this, "isHidden", () => this.element.classList.contains(CD)), p(this, "setHidden", (e) => e ? this.hide() : this.show()), p(this, "hide", () => this.element.classList.add(CD)), p(this, "show", () => this.element.classList.remove(CD)), this.element.classList.add(wD), this.element.classList.add(CD), this.indicator.className = TD, this.element.appendChild(this.indicator), this.element.onclick = () => {
15329
15330
  this.onClick && this.onClick();
15330
15331
  };
15331
15332
  }
15332
15333
  };
15333
15334
  H(), m(), P();
15334
- var ED = class extends nn {
15335
+ var DD = class extends nn {
15335
15336
  constructor({ vindral: e, refreshEveryMs: t }) {
15336
15337
  super(), p(this, "thumbnails", /* @__PURE__ */ new Map()), p(this, "interval", void 0), p(this, "channels", void 0), p(this, "refreshEveryMs", void 0), p(this, "isFetching", !1), p(this, "hasFetched", !1), this.channels = [...e.channels], this.refreshEveryMs = t || 6e4, e.on("channels", () => {
15337
15338
  this.channels = [...e.channels], this.hasFetched || this.refreshThumbnails();
@@ -15379,7 +15380,7 @@ var ED = class extends nn {
15379
15380
  }
15380
15381
  };
15381
15382
  H(), m(), P(), R();
15382
- var DD, OD, kD, AD = (DD = _D.player) == null ? "" : DD, jD = (OD = _D["one-to-one"]) == null ? "" : OD, MD = (kD = _D["audio-only"]) == null ? "" : kD, ND = {
15383
+ var OD, kD, AD, jD = (OD = vD.player) == null ? "" : OD, MD = (kD = vD["one-to-one"]) == null ? "" : kD, ND = (AD = vD["audio-only"]) == null ? "" : AD, PD = {
15383
15384
  controlsEnabled: !0,
15384
15385
  castEnabled: !0,
15385
15386
  channelSelectionEnabled: !0,
@@ -15393,10 +15394,10 @@ var DD, OD, kD, AD = (DD = _D.player) == null ? "" : DD, jD = (OD = _D["one-to-o
15393
15394
  airPlayButtonEnabled: !1,
15394
15395
  playOverlayEnabled: !0,
15395
15396
  bufferingOverlayEnabled: !0
15396
- }, PD = (e) => !Uw(e), FD = class {
15397
+ }, FD = (e) => !Ww(e), ID = class {
15397
15398
  constructor(e, t) {
15398
15399
  var n = this, r, i, a, o;
15399
- p(this, "core", void 0), p(this, "castSender", void 0), p(this, "airPlaySender", void 0), p(this, "options", void 0), p(this, "state", void 0), p(this, "playerElement", document.createElement("div")), p(this, "bufferingOverlay", void 0), p(this, "playOverlay", void 0), p(this, "castOverlay", new IE()), p(this, "channelSelectionList", void 0), p(this, "bar", void 0), p(this, "stateInterval", void 0), p(this, "thumbnailModule", void 0), p(this, "browser", pt()), p(this, "unload", () => {
15400
+ p(this, "core", void 0), p(this, "castSender", void 0), p(this, "airPlaySender", void 0), p(this, "options", void 0), p(this, "state", void 0), p(this, "playerElement", document.createElement("div")), p(this, "bufferingOverlay", void 0), p(this, "playOverlay", void 0), p(this, "castOverlay", new LE()), p(this, "channelSelectionList", void 0), p(this, "bar", void 0), p(this, "stateInterval", void 0), p(this, "thumbnailModule", void 0), p(this, "browser", pt()), p(this, "unload", () => {
15400
15401
  var e, t;
15401
15402
  this.stateInterval && window.clearInterval(this.stateInterval), this.core.unload(), this.playerElement.remove(), (e = this.thumbnailModule) == null || e.stop(), (t = this.airPlaySender) == null || t.unload();
15402
15403
  }), p(this, "attach", (e) => {
@@ -15437,7 +15438,7 @@ var DD, OD, kD, AD = (DD = _D.player) == null ? "" : DD, jD = (OD = _D["one-to-o
15437
15438
  this.core.muted = !e, this.core.muted = e;
15438
15439
  }
15439
15440
  }), p(this, "toggleOneToOne", () => {
15440
- this.playerElement.classList.contains(jD) ? this.playerElement.classList.remove(jD) : this.playerElement.classList.add(jD);
15441
+ this.playerElement.classList.contains(MD) ? this.playerElement.classList.remove(MD) : this.playerElement.classList.add(MD);
15441
15442
  }), p(this, "isInFullscreen", () => this.state.fullscreen.isFullscreen()), p(this, "enterFullscreen", N(function* () {
15442
15443
  n.triggerUserInput(), n.iosHackResetSize(), n.bar.fullscreenButton.setIcon("exit"), yield n.state.fullscreen.request(), n.lockOrientation();
15443
15444
  })), p(this, "exitFullscreen", () => (this.bar.fullscreenButton.setIcon("enter"), this.unlockOrientation(), this.state.fullscreen.exit())), p(this, "showAirPlayPicker", () => {
@@ -15456,20 +15457,20 @@ var DD, OD, kD, AD = (DD = _D.player) == null ? "" : DD, jD = (OD = _D["one-to-o
15456
15457
  var e, t, n;
15457
15458
  return !((e = this.options.channelSelectionOptions) == null || (e = e.barButton) == null) && e.enabled && !((t = this.options.channelSelectionOptions) == null || (t = t.barButton) == null) && t.thumbnails ? !0 : !!(!((n = this.options.channelSelectionOptions) == null || (n = n.list) == null) && n.enabled);
15458
15459
  }), p(this, "bumpInteractTime", () => void (this.state.lastInteractionTime = Date.now()));
15459
- let s = L(L({}, ND), t);
15460
- this.options = s, this.playerElement.className = AD, PD(e) ? this.core = e : this.core = new Qw(e), this.state = {
15460
+ let s = L(L({}, PD), t);
15461
+ this.options = s, this.playerElement.className = jD, FD(e) ? this.core = e : this.core = new $w(e), this.state = {
15461
15462
  isBuffering: !1,
15462
- fullscreen: new mD(!mD.isFullscreenApiSupported(this.playerElement) && mD.isFullscreenApiSupported(this.core.mediaElement) ? this.core.mediaElement : this.playerElement),
15463
+ fullscreen: new hD(!hD.isFullscreenApiSupported(this.playerElement) && hD.isFullscreenApiSupported(this.core.mediaElement) ? this.core.mediaElement : this.playerElement),
15463
15464
  lastInteractionTime: 0
15464
- }, this.needsThumbnails() && (this.thumbnailModule = new ED({
15465
+ }, this.needsThumbnails() && (this.thumbnailModule = new DD({
15465
15466
  vindral: this.core,
15466
15467
  refreshEveryMs: t == null ? void 0 : t.thumbnailUpdateInterval
15467
- }), this.thumbnailModule.start()), !((r = this.options.channelSelectionOptions) == null || (r = r.list) == null) && r.enabled && (this.channelSelectionList = new lD({
15468
+ }), this.thumbnailModule.start()), !((r = this.options.channelSelectionOptions) == null || (r = r.list) == null) && r.enabled && (this.channelSelectionList = new uD({
15468
15469
  vindral: this.core,
15469
15470
  thumbnailModule: this.thumbnailModule
15470
15471
  }));
15471
15472
  let c = (t == null ? void 0 : t.channelSelectionEnabled) || (t == null || (i = t.channelSelectionOptions) == null || (i = i.barButton) == null ? void 0 : i.enabled), l = t == null || (a = t.channelSelectionOptions) == null || (a = a.barButton) == null ? void 0 : a.thumbnails;
15472
- this.bar = new AE(L(L({
15473
+ this.bar = new jE(L(L({
15473
15474
  vindral: this.core,
15474
15475
  thumbnailModule: this.thumbnailModule
15475
15476
  }, s), {}, {
@@ -15482,7 +15483,7 @@ var DD, OD, kD, AD = (DD = _D.player) == null ? "" : DD, jD = (OD = _D["one-to-o
15482
15483
  onOneToOneClicked: () => this.toggleOneToOne(),
15483
15484
  onPipClicked: () => void this.togglePip().catch((e) => console.error("error", e)),
15484
15485
  onAirPlayClicked: () => this.showAirPlayPicker()
15485
- })), this.core.media === "audio" && (this.playerElement.classList.add(MD), this.options.controlsEnabled && this.bar.show());
15486
+ })), this.core.media === "audio" && (this.playerElement.classList.add(ND), this.options.controlsEnabled && this.bar.show());
15486
15487
  let u = this.core.getCastOptions();
15487
15488
  this.castSender = new Pr({
15488
15489
  background: this.options.castBackground,
@@ -15527,7 +15528,7 @@ var DD, OD, kD, AD = (DD = _D.player) == null ? "" : DD, jD = (OD = _D["one-to-o
15527
15528
  break;
15528
15529
  }
15529
15530
  }
15530
- }), this.core.attach(this.playerElement), this.castOverlay.attach(this.playerElement), this.options.bufferingOverlayEnabled && (this.bufferingOverlay = new ne(), this.bufferingOverlay.attach(this.playerElement)), this.options.playOverlayEnabled && (this.playOverlay = new TD(), this.playOverlay.attach(this.playerElement), this.playOverlay.onClick = () => {
15531
+ }), this.core.attach(this.playerElement), this.castOverlay.attach(this.playerElement), this.options.bufferingOverlayEnabled && (this.bufferingOverlay = new ne(), this.bufferingOverlay.attach(this.playerElement)), this.options.playOverlayEnabled && (this.playOverlay = new ED(), this.playOverlay.attach(this.playerElement), this.playOverlay.onClick = () => {
15531
15532
  var e;
15532
15533
  this.core.userInput(), (e = this.playOverlay) == null || e.hide();
15533
15534
  }), this.channelSelectionList && this.channelSelectionList.attach(this.playerElement), this.bar.attach(this.playerElement), this.playerElement.addEventListener("click", this.onClick), this.playerElement.addEventListener("mousemove", this.onMouseMove), this.state.fullscreen.on("on fullscreen change", (e) => {
@@ -15539,4 +15540,4 @@ var DD, OD, kD, AD = (DD = _D.player) == null ? "" : DD, jD = (OD = _D["one-to-o
15539
15540
  }
15540
15541
  };
15541
15542
  //#endregion
15542
- export { mi as AUTHENTICATION_EXPIRED_CODE, pi as AUTHENTICATION_FAILED_CODE, zu as ApiClient, hi as CHANNEL_NOT_FOUND_CODE, gi as CHANNEL_NOT_LIVE_CODE, fi as CONNECTION_FAILED_AFTER_RETRIES_CODE, di as CONNECTION_FAILED_CODE, Pr as CastSender, Si as DISCONNECTED_BY_EDGE, vi as INACTIVITY_CODE, _i as NO_INCOMING_DATA, FD as Player, Qw as Vindral, U as VindralError };
15543
+ export { mi as AUTHENTICATION_EXPIRED_CODE, pi as AUTHENTICATION_FAILED_CODE, zu as ApiClient, hi as CHANNEL_NOT_FOUND_CODE, gi as CHANNEL_NOT_LIVE_CODE, fi as CONNECTION_FAILED_AFTER_RETRIES_CODE, di as CONNECTION_FAILED_CODE, Pr as CastSender, Si as DISCONNECTED_BY_EDGE, vi as INACTIVITY_CODE, _i as NO_INCOMING_DATA, ID as Player, $w as Vindral, U as VindralError };