@vouchfor/embeds 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. package/dist/es/{browser-4d54600e.js → browser-97265c29.js} +2 -2
  2. package/dist/es/{browser-4d54600e.js.map → browser-97265c29.js.map} +1 -1
  3. package/dist/es/embeds.js +1 -1
  4. package/dist/es/{index-14868944.js → index-d15aeb56.js} +632 -640
  5. package/dist/es/index-d15aeb56.js.map +1 -0
  6. package/dist/es/src/components/PlayerEmbed/index.d.ts +73 -0
  7. package/dist/iife/dialog-embed/{browser-d8ab928d.js → browser-c8adca59.js} +2 -2
  8. package/dist/iife/dialog-embed/{browser-d8ab928d.js.map → browser-c8adca59.js.map} +1 -1
  9. package/dist/iife/dialog-embed/embed.iife.js +38 -38
  10. package/dist/iife/dialog-embed/embed.iife.js.map +1 -1
  11. package/dist/iife/dialog-embed/embed.js +1 -1
  12. package/dist/iife/dialog-embed/{index-568f189c.js → index-eb3ec3b3.js} +667 -675
  13. package/dist/iife/dialog-embed/index-eb3ec3b3.js.map +1 -0
  14. package/dist/iife/dialog-embed/src/components/PlayerEmbed/index.d.ts +73 -0
  15. package/dist/iife/embeds.iife.js +38 -38
  16. package/dist/iife/embeds.iife.js.map +1 -1
  17. package/dist/iife/player-embed/{browser-951710ee.js → browser-7e2003a9.js} +2 -2
  18. package/dist/iife/player-embed/{browser-951710ee.js.map → browser-7e2003a9.js.map} +1 -1
  19. package/dist/iife/player-embed/embed.iife.js +34 -34
  20. package/dist/iife/player-embed/embed.iife.js.map +1 -1
  21. package/dist/iife/player-embed/embed.js +1 -1
  22. package/dist/iife/player-embed/{index-86dfade0.js → index-4541048e.js} +3343 -3351
  23. package/dist/iife/player-embed/index-4541048e.js.map +1 -0
  24. package/dist/iife/player-embed/src/components/PlayerEmbed/index.d.ts +73 -0
  25. package/package.json +2 -2
  26. package/src/components/PlayerEmbed/index.ts +106 -5
  27. package/dist/es/index-14868944.js.map +0 -1
  28. package/dist/iife/dialog-embed/index-568f189c.js.map +0 -1
  29. package/dist/iife/player-embed/index-86dfade0.js.map +0 -1
  30. package/src/mixins/media-player-proxy.ts +0 -116
@@ -11275,7 +11275,7 @@ const h4 = {
11275
11275
  };
11276
11276
  async function u4() {
11277
11277
  if (typeof window > "u") {
11278
- const i = await import("./browser-d8ab928d.js").then((t) => t.b);
11278
+ const i = await import("./browser-c8adca59.js").then((t) => t.b);
11279
11279
  return new i.Image();
11280
11280
  }
11281
11281
  return new Image();
@@ -11336,7 +11336,7 @@ async function Xc({ element: i, meta: t }, e, r) {
11336
11336
  }
11337
11337
  async function po() {
11338
11338
  if (typeof window > "u") {
11339
- const i = await import("./browser-d8ab928d.js").then((e) => e.b), t = new i.Canvas();
11339
+ const i = await import("./browser-c8adca59.js").then((e) => e.b), t = new i.Canvas();
11340
11340
  return t.gpu = !1, t;
11341
11341
  }
11342
11342
  return document.createElement("canvas");
@@ -11538,7 +11538,7 @@ async function On({ data: i, template: t, burnCaptions: e = !1, debug: r = !1 },
11538
11538
  duration: M
11539
11539
  };
11540
11540
  }
11541
- const Zc = "2", y4 = "@vouchfor/embeds", b4 = "1.2.2", E4 = "MIT", A4 = "Aaron Williams", T4 = "dist/es/embeds.js", k4 = "dist/es/embeds.js", w4 = "module", S4 = "dist/es/src/index.d.ts", R4 = {
11541
+ const Zc = "2", y4 = "@vouchfor/embeds", b4 = "1.2.3", E4 = "MIT", A4 = "Aaron Williams", T4 = "dist/es/embeds.js", k4 = "dist/es/embeds.js", w4 = "module", S4 = "dist/es/src/index.d.ts", R4 = {
11542
11542
  ".": "./dist/es/embeds.js"
11543
11543
  }, _4 = [
11544
11544
  "dist",
@@ -11565,7 +11565,7 @@ const Zc = "2", y4 = "@vouchfor/embeds", b4 = "1.2.2", E4 = "MIT", A4 = "Aaron W
11565
11565
  }, I4 = {
11566
11566
  "@a11y/focus-trap": "^1.0.5",
11567
11567
  "@lit/task": "^1.0.0",
11568
- "@vouchfor/media-player": "^2.1.0",
11568
+ "@vouchfor/media-player": "^2.1.2",
11569
11569
  uuid: "^9.0.1"
11570
11570
  }, x4 = {
11571
11571
  lit: "^3.1.0"
@@ -11752,105 +11752,6 @@ class F4 {
11752
11752
  this._pageUnloading(), "onvisibilitychange" in document ? document.removeEventListener("visibilitychange", this._handleVisibilityChange) : window.removeEventListener("pagehide", this._handlePageHide), this.host.removeEventListener("vouch:loaded", this._handleVouchLoaded), (t = this.host.mediaPlayer) == null || t.removeEventListener("play", this._handlePlay), (e = this.host.mediaPlayer) == null || e.removeEventListener("video:play", this._handleVideoPlay), (r = this.host.mediaPlayer) == null || r.removeEventListener("video:pause", this._handleVideoPause), (n = this.host.mediaPlayer) == null || n.removeEventListener("video:timeupdate", this._handleVideoTimeUpdate);
11753
11753
  }
11754
11754
  }
11755
- const U4 = (i) => {
11756
- class t extends i {
11757
- constructor() {
11758
- super(...arguments), this._mediaPlayerRef = Rr();
11759
- }
11760
- get waiting() {
11761
- var r;
11762
- return (r = this._mediaPlayerRef.value) == null ? void 0 : r.waiting;
11763
- }
11764
- get initialised() {
11765
- var r;
11766
- return (r = this._mediaPlayerRef.value) == null ? void 0 : r.initialised;
11767
- }
11768
- get seeking() {
11769
- var r;
11770
- return (r = this._mediaPlayerRef.value) == null ? void 0 : r.seeking;
11771
- }
11772
- get paused() {
11773
- var r;
11774
- return (r = this._mediaPlayerRef.value) == null ? void 0 : r.paused;
11775
- }
11776
- get captions() {
11777
- var r;
11778
- return (r = this._mediaPlayerRef.value) == null ? void 0 : r.captions;
11779
- }
11780
- get fullscreen() {
11781
- var r;
11782
- return (r = this._mediaPlayerRef.value) == null ? void 0 : r.fullscreen;
11783
- }
11784
- get duration() {
11785
- var r;
11786
- return (r = this._mediaPlayerRef.value) == null ? void 0 : r.duration;
11787
- }
11788
- set currentTime(r) {
11789
- this._mediaPlayerRef.value && (this._mediaPlayerRef.value.currentTime = r);
11790
- }
11791
- get currentTime() {
11792
- var r;
11793
- return ((r = this._mediaPlayerRef.value) == null ? void 0 : r.currentTime) ?? 0;
11794
- }
11795
- set playbackRate(r) {
11796
- this._mediaPlayerRef.value && (this._mediaPlayerRef.value.playbackRate = r);
11797
- }
11798
- get playbackRate() {
11799
- var r;
11800
- return ((r = this._mediaPlayerRef.value) == null ? void 0 : r.playbackRate) ?? 1;
11801
- }
11802
- set volume(r) {
11803
- this._mediaPlayerRef.value && (this._mediaPlayerRef.value.volume = r);
11804
- }
11805
- get volume() {
11806
- var r;
11807
- return ((r = this._mediaPlayerRef.value) == null ? void 0 : r.volume) ?? 1;
11808
- }
11809
- set muted(r) {
11810
- this._mediaPlayerRef.value && (this._mediaPlayerRef.value.muted = r);
11811
- }
11812
- get muted() {
11813
- var r;
11814
- return ((r = this._mediaPlayerRef.value) == null ? void 0 : r.muted) ?? !1;
11815
- }
11816
- get scene() {
11817
- var r;
11818
- return ((r = this._mediaPlayerRef.value) == null ? void 0 : r.scene) ?? null;
11819
- }
11820
- get scenes() {
11821
- var r;
11822
- return ((r = this._mediaPlayerRef.value) == null ? void 0 : r.scenes) ?? [];
11823
- }
11824
- get sceneConfig() {
11825
- var r;
11826
- return ((r = this._mediaPlayerRef.value) == null ? void 0 : r.sceneConfig) ?? null;
11827
- }
11828
- get videoState() {
11829
- var r;
11830
- return (r = this._mediaPlayerRef.value) == null ? void 0 : r.videoState;
11831
- }
11832
- get mediaPlayer() {
11833
- return this._mediaPlayerRef.value;
11834
- }
11835
- play() {
11836
- var r;
11837
- (r = this._mediaPlayerRef.value) == null || r.play();
11838
- }
11839
- pause() {
11840
- var r;
11841
- (r = this._mediaPlayerRef.value) == null || r.pause();
11842
- }
11843
- reset(r = 0, n = !1) {
11844
- var o;
11845
- (o = this._mediaPlayerRef.value) == null || o.reset(r, n);
11846
- }
11847
- setScene(r) {
11848
- var n;
11849
- (n = this._mediaPlayerRef.value) == null || n.setScene(r);
11850
- }
11851
- }
11852
- return t;
11853
- };
11854
11755
  /**
11855
11756
  * @license
11856
11757
  * Copyright 2018 Google LLC
@@ -11888,7 +11789,7 @@ const je = Wn(class extends Wa {
11888
11789
  * Copyright 2018 Google LLC
11889
11790
  * SPDX-License-Identifier: BSD-3-Clause
11890
11791
  */
11891
- const Dp = "important", B4 = " !" + Dp, Ka = Wn(class extends Wa {
11792
+ const Dp = "important", U4 = " !" + Dp, Ka = Wn(class extends Wa {
11892
11793
  constructor(i) {
11893
11794
  var t;
11894
11795
  if (super(i), i.type !== Vn.ATTRIBUTE || i.name !== "style" || ((t = i.strings) == null ? void 0 : t.length) > 2)
@@ -11910,14 +11811,14 @@ const Dp = "important", B4 = " !" + Dp, Ka = Wn(class extends Wa {
11910
11811
  const n = t[r];
11911
11812
  if (n != null) {
11912
11813
  this.ut.add(r);
11913
- const o = typeof n == "string" && n.endsWith(B4);
11814
+ const o = typeof n == "string" && n.endsWith(U4);
11914
11815
  r.includes("-") || o ? e.setProperty(r, o ? n.slice(0, -11) : n, o ? Dp : "") : e[r] = n;
11915
11816
  }
11916
11817
  }
11917
11818
  return Gs;
11918
11819
  }
11919
11820
  });
11920
- var G4 = Pa;
11821
+ var B4 = Pa;
11921
11822
  Pa.flatten = Pa;
11922
11823
  Pa.unflatten = $p;
11923
11824
  function Pp(i) {
@@ -11984,7 +11885,7 @@ function $p(i, t) {
11984
11885
  T[E] = $p(i[g], t);
11985
11886
  }), o;
11986
11887
  }
11987
- const H4 = /* @__PURE__ */ tp(G4);
11888
+ const G4 = /* @__PURE__ */ tp(B4);
11988
11889
  /**
11989
11890
  * @license
11990
11891
  * Copyright 2017 Google LLC
@@ -12055,11 +11956,11 @@ const h0 = (i, t, e) => {
12055
11956
  return this.dt = c, vy(i, f), Gs;
12056
11957
  }
12057
11958
  });
12058
- var Jr = "top", Ai = "bottom", Ti = "right", ti = "left", Ph = "auto", za = [Jr, Ai, Ti, ti], Fn = "start", Oa = "end", V4 = "clippingParents", Np = "viewport", ca = "popper", W4 = "reference", d0 = /* @__PURE__ */ za.reduce(function(i, t) {
11959
+ var Jr = "top", Ai = "bottom", Ti = "right", ti = "left", Ph = "auto", za = [Jr, Ai, Ti, ti], Fn = "start", Oa = "end", H4 = "clippingParents", Np = "viewport", ca = "popper", V4 = "reference", d0 = /* @__PURE__ */ za.reduce(function(i, t) {
12059
11960
  return i.concat([t + "-" + Fn, t + "-" + Oa]);
12060
11961
  }, []), Fp = /* @__PURE__ */ [].concat(za, [Ph]).reduce(function(i, t) {
12061
11962
  return i.concat([t, t + "-" + Fn, t + "-" + Oa]);
12062
- }, []), j4 = "beforeRead", K4 = "read", z4 = "afterRead", Y4 = "beforeMain", X4 = "main", Z4 = "afterMain", q4 = "beforeWrite", Q4 = "write", J4 = "afterWrite", tE = [j4, K4, z4, Y4, X4, Z4, q4, Q4, J4];
11963
+ }, []), W4 = "beforeRead", j4 = "read", K4 = "afterRead", z4 = "beforeMain", Y4 = "main", X4 = "afterMain", Z4 = "beforeWrite", q4 = "write", Q4 = "afterWrite", J4 = [W4, j4, K4, z4, Y4, X4, Z4, q4, Q4];
12063
11964
  function Zi(i) {
12064
11965
  return i ? (i.nodeName || "").toLowerCase() : null;
12065
11966
  }
@@ -12086,7 +11987,7 @@ function Oh(i) {
12086
11987
  var t = ci(i).ShadowRoot;
12087
11988
  return i instanceof t || i instanceof ShadowRoot;
12088
11989
  }
12089
- function eE(i) {
11990
+ function tE(i) {
12090
11991
  var t = i.state;
12091
11992
  Object.keys(t.elements).forEach(function(e) {
12092
11993
  var r = t.styles[e] || {}, n = t.attributes[e] || {}, o = t.elements[e];
@@ -12096,7 +11997,7 @@ function eE(i) {
12096
11997
  }));
12097
11998
  });
12098
11999
  }
12099
- function rE(i) {
12000
+ function eE(i) {
12100
12001
  var t = i.state, e = {
12101
12002
  popper: {
12102
12003
  position: t.options.strategy,
@@ -12124,8 +12025,8 @@ const Up = {
12124
12025
  name: "applyStyles",
12125
12026
  enabled: !0,
12126
12027
  phase: "write",
12127
- fn: eE,
12128
- effect: rE,
12028
+ fn: tE,
12029
+ effect: eE,
12129
12030
  requires: ["computeStyles"]
12130
12031
  };
12131
12032
  function Yi(i) {
@@ -12183,7 +12084,7 @@ function Gp(i, t) {
12183
12084
  function fs(i) {
12184
12085
  return ci(i).getComputedStyle(i);
12185
12086
  }
12186
- function iE(i) {
12087
+ function rE(i) {
12187
12088
  return ["table", "td", "th"].indexOf(Zi(i)) >= 0;
12188
12089
  }
12189
12090
  function Ks(i) {
@@ -12208,7 +12109,7 @@ function u0(i) {
12208
12109
  return !Ei(i) || // https://github.com/popperjs/popper-core/issues/837
12209
12110
  fs(i).position === "fixed" ? null : i.offsetParent;
12210
12111
  }
12211
- function sE(i) {
12112
+ function iE(i) {
12212
12113
  var t = /firefox/i.test(qc()), e = /Trident/i.test(qc());
12213
12114
  if (e && Ei(i)) {
12214
12115
  var r = fs(i);
@@ -12225,9 +12126,9 @@ function sE(i) {
12225
12126
  return null;
12226
12127
  }
12227
12128
  function Ya(i) {
12228
- for (var t = ci(i), e = u0(i); e && iE(e) && fs(e).position === "static"; )
12129
+ for (var t = ci(i), e = u0(i); e && rE(e) && fs(e).position === "static"; )
12229
12130
  e = u0(e);
12230
- return e && (Zi(e) === "html" || Zi(e) === "body" && fs(e).position === "static") ? t : e || sE(i) || t;
12131
+ return e && (Zi(e) === "html" || Zi(e) === "body" && fs(e).position === "static") ? t : e || iE(i) || t;
12231
12132
  }
12232
12133
  function Mh(i) {
12233
12134
  return ["top", "bottom"].indexOf(i) >= 0 ? "x" : "y";
@@ -12235,7 +12136,7 @@ function Mh(i) {
12235
12136
  function wa(i, t, e) {
12236
12137
  return cn(i, rl(t, e));
12237
12138
  }
12238
- function nE(i, t, e) {
12139
+ function sE(i, t, e) {
12239
12140
  var r = wa(i, t, e);
12240
12141
  return r > e ? e : r;
12241
12142
  }
@@ -12255,41 +12156,41 @@ function Wp(i, t) {
12255
12156
  return e[r] = i, e;
12256
12157
  }, {});
12257
12158
  }
12258
- var aE = function(t, e) {
12159
+ var nE = function(t, e) {
12259
12160
  return t = typeof t == "function" ? t(Object.assign({}, e.rects, {
12260
12161
  placement: e.placement
12261
12162
  })) : t, Vp(typeof t != "number" ? t : Wp(t, za));
12262
12163
  };
12263
- function oE(i) {
12164
+ function aE(i) {
12264
12165
  var t, e = i.state, r = i.name, n = i.options, o = e.elements.arrow, c = e.modifiersData.popperOffsets, d = Yi(e.placement), f = Mh(d), p = [ti, Ti].indexOf(d) >= 0, g = p ? "height" : "width";
12265
12166
  if (!(!o || !c)) {
12266
- var y = aE(n.padding, e), E = $h(o), A = f === "y" ? Jr : ti, T = f === "y" ? Ai : Ti, w = e.rects.reference[g] + e.rects.reference[f] - c[f] - e.rects.popper[g], C = c[f] - e.rects.reference[f], P = Ya(o), M = P ? f === "y" ? P.clientHeight || 0 : P.clientWidth || 0 : 0, B = w / 2 - C / 2, x = y[A], O = M - E[g] - y[T], z = M / 2 - E[g] / 2 + B, G = wa(x, z, O), at = f;
12167
+ var y = nE(n.padding, e), E = $h(o), A = f === "y" ? Jr : ti, T = f === "y" ? Ai : Ti, w = e.rects.reference[g] + e.rects.reference[f] - c[f] - e.rects.popper[g], C = c[f] - e.rects.reference[f], P = Ya(o), M = P ? f === "y" ? P.clientHeight || 0 : P.clientWidth || 0 : 0, B = w / 2 - C / 2, x = y[A], O = M - E[g] - y[T], z = M / 2 - E[g] / 2 + B, G = wa(x, z, O), at = f;
12267
12168
  e.modifiersData[r] = (t = {}, t[at] = G, t.centerOffset = G - z, t);
12268
12169
  }
12269
12170
  }
12270
- function lE(i) {
12171
+ function oE(i) {
12271
12172
  var t = i.state, e = i.options, r = e.element, n = r === void 0 ? "[data-popper-arrow]" : r;
12272
12173
  n != null && (typeof n == "string" && (n = t.elements.popper.querySelector(n), !n) || Gp(t.elements.popper, n) && (t.elements.arrow = n));
12273
12174
  }
12274
- const cE = {
12175
+ const lE = {
12275
12176
  name: "arrow",
12276
12177
  enabled: !0,
12277
12178
  phase: "main",
12278
- fn: oE,
12279
- effect: lE,
12179
+ fn: aE,
12180
+ effect: oE,
12280
12181
  requires: ["popperOffsets"],
12281
12182
  requiresIfExists: ["preventOverflow"]
12282
12183
  };
12283
12184
  function Gn(i) {
12284
12185
  return i.split("-")[1];
12285
12186
  }
12286
- var hE = {
12187
+ var cE = {
12287
12188
  top: "auto",
12288
12189
  right: "auto",
12289
12190
  bottom: "auto",
12290
12191
  left: "auto"
12291
12192
  };
12292
- function dE(i, t) {
12193
+ function hE(i, t) {
12293
12194
  var e = i.x, r = i.y, n = t.devicePixelRatio || 1;
12294
12195
  return {
12295
12196
  x: Un(e * n) / n || 0,
@@ -12327,7 +12228,7 @@ function f0(i) {
12327
12228
  }
12328
12229
  var kt = Object.assign({
12329
12230
  position: d
12330
- }, p && hE), ft = g === !0 ? dE({
12231
+ }, p && cE), ft = g === !0 ? hE({
12331
12232
  x: A,
12332
12233
  y: w
12333
12234
  }, ci(e)) : {
@@ -12340,7 +12241,7 @@ function f0(i) {
12340
12241
  }
12341
12242
  return Object.assign({}, kt, (t = {}, t[x] = M ? w + "px" : "", t[B] = P ? A + "px" : "", t.transform = "", t));
12342
12243
  }
12343
- function uE(i) {
12244
+ function dE(i) {
12344
12245
  var t = i.state, e = i.options, r = e.gpuAcceleration, n = r === void 0 ? !0 : r, o = e.adaptive, c = o === void 0 ? !0 : o, d = e.roundOffsets, f = d === void 0 ? !0 : d, p = {
12345
12246
  placement: Yi(t.placement),
12346
12247
  variation: Gn(t.placement),
@@ -12363,17 +12264,17 @@ function uE(i) {
12363
12264
  "data-popper-placement": t.placement
12364
12265
  });
12365
12266
  }
12366
- const fE = {
12267
+ const uE = {
12367
12268
  name: "computeStyles",
12368
12269
  enabled: !0,
12369
12270
  phase: "beforeWrite",
12370
- fn: uE,
12271
+ fn: dE,
12371
12272
  data: {}
12372
12273
  };
12373
12274
  var mo = {
12374
12275
  passive: !0
12375
12276
  };
12376
- function pE(i) {
12277
+ function fE(i) {
12377
12278
  var t = i.state, e = i.instance, r = i.options, n = r.scroll, o = n === void 0 ? !0 : n, c = r.resize, d = c === void 0 ? !0 : c, f = ci(t.elements.popper), p = [].concat(t.scrollParents.reference, t.scrollParents.popper);
12378
12279
  return o && p.forEach(function(g) {
12379
12280
  g.addEventListener("scroll", e.update, mo);
@@ -12383,16 +12284,16 @@ function pE(i) {
12383
12284
  }), d && f.removeEventListener("resize", e.update, mo);
12384
12285
  };
12385
12286
  }
12386
- const gE = {
12287
+ const pE = {
12387
12288
  name: "eventListeners",
12388
12289
  enabled: !0,
12389
12290
  phase: "write",
12390
12291
  fn: function() {
12391
12292
  },
12392
- effect: pE,
12293
+ effect: fE,
12393
12294
  data: {}
12394
12295
  };
12395
- var mE = {
12296
+ var gE = {
12396
12297
  left: "right",
12397
12298
  right: "left",
12398
12299
  bottom: "top",
@@ -12400,16 +12301,16 @@ var mE = {
12400
12301
  };
12401
12302
  function Uo(i) {
12402
12303
  return i.replace(/left|right|bottom|top/g, function(t) {
12403
- return mE[t];
12304
+ return gE[t];
12404
12305
  });
12405
12306
  }
12406
- var vE = {
12307
+ var mE = {
12407
12308
  start: "end",
12408
12309
  end: "start"
12409
12310
  };
12410
12311
  function p0(i) {
12411
12312
  return i.replace(/start|end/g, function(t) {
12412
- return vE[t];
12313
+ return mE[t];
12413
12314
  });
12414
12315
  }
12415
12316
  function Nh(i) {
@@ -12422,7 +12323,7 @@ function Nh(i) {
12422
12323
  function Fh(i) {
12423
12324
  return Bn(Ks(i)).left + Nh(i).scrollLeft;
12424
12325
  }
12425
- function yE(i, t) {
12326
+ function vE(i, t) {
12426
12327
  var e = ci(i), r = Ks(i), n = e.visualViewport, o = r.clientWidth, c = r.clientHeight, d = 0, f = 0;
12427
12328
  if (n) {
12428
12329
  o = n.width, c = n.height;
@@ -12436,7 +12337,7 @@ function yE(i, t) {
12436
12337
  y: f
12437
12338
  };
12438
12339
  }
12439
- function bE(i) {
12340
+ function yE(i) {
12440
12341
  var t, e = Ks(i), r = Nh(i), n = (t = i.ownerDocument) == null ? void 0 : t.body, o = cn(e.scrollWidth, e.clientWidth, n ? n.scrollWidth : 0, n ? n.clientWidth : 0), c = cn(e.scrollHeight, e.clientHeight, n ? n.scrollHeight : 0, n ? n.clientHeight : 0), d = -r.scrollLeft + Fh(i), f = -r.scrollTop;
12441
12342
  return fs(n || e).direction === "rtl" && (d += cn(e.clientWidth, n ? n.clientWidth : 0) - o), {
12442
12343
  width: o,
@@ -12469,21 +12370,21 @@ function Qc(i) {
12469
12370
  bottom: i.y + i.height
12470
12371
  });
12471
12372
  }
12472
- function EE(i, t) {
12373
+ function bE(i, t) {
12473
12374
  var e = Bn(i, !1, t === "fixed");
12474
12375
  return e.top = e.top + i.clientTop, e.left = e.left + i.clientLeft, e.bottom = e.top + i.clientHeight, e.right = e.left + i.clientWidth, e.width = i.clientWidth, e.height = i.clientHeight, e.x = e.left, e.y = e.top, e;
12475
12376
  }
12476
12377
  function g0(i, t, e) {
12477
- return t === Np ? Qc(yE(i, e)) : pn(t) ? EE(t, e) : Qc(bE(Ks(i)));
12378
+ return t === Np ? Qc(vE(i, e)) : pn(t) ? bE(t, e) : Qc(yE(Ks(i)));
12478
12379
  }
12479
- function AE(i) {
12380
+ function EE(i) {
12480
12381
  var t = Sa(vl(i)), e = ["absolute", "fixed"].indexOf(fs(i).position) >= 0, r = e && Ei(i) ? Ya(i) : i;
12481
12382
  return pn(r) ? t.filter(function(n) {
12482
12383
  return pn(n) && Gp(n, r) && Zi(n) !== "body";
12483
12384
  }) : [];
12484
12385
  }
12485
- function TE(i, t, e, r) {
12486
- var n = t === "clippingParents" ? AE(i) : [].concat(t), o = [].concat(n, [e]), c = o[0], d = o.reduce(function(f, p) {
12386
+ function AE(i, t, e, r) {
12387
+ var n = t === "clippingParents" ? EE(i) : [].concat(t), o = [].concat(n, [e]), c = o[0], d = o.reduce(function(f, p) {
12487
12388
  var g = g0(i, p, r);
12488
12389
  return f.top = cn(g.top, f.top), f.right = rl(g.right, f.right), f.bottom = rl(g.bottom, f.bottom), f.left = cn(g.left, f.left), f;
12489
12390
  }, g0(i, c, r));
@@ -12538,7 +12439,7 @@ function Kp(i) {
12538
12439
  }
12539
12440
  function $a(i, t) {
12540
12441
  t === void 0 && (t = {});
12541
- var e = t, r = e.placement, n = r === void 0 ? i.placement : r, o = e.strategy, c = o === void 0 ? i.strategy : o, d = e.boundary, f = d === void 0 ? V4 : d, p = e.rootBoundary, g = p === void 0 ? Np : p, y = e.elementContext, E = y === void 0 ? ca : y, A = e.altBoundary, T = A === void 0 ? !1 : A, w = e.padding, C = w === void 0 ? 0 : w, P = Vp(typeof C != "number" ? C : Wp(C, za)), M = E === ca ? W4 : ca, B = i.rects.popper, x = i.elements[T ? M : E], O = TE(pn(x) ? x : x.contextElement || Ks(i.elements.popper), f, g, c), z = Bn(i.elements.reference), G = Kp({
12442
+ var e = t, r = e.placement, n = r === void 0 ? i.placement : r, o = e.strategy, c = o === void 0 ? i.strategy : o, d = e.boundary, f = d === void 0 ? H4 : d, p = e.rootBoundary, g = p === void 0 ? Np : p, y = e.elementContext, E = y === void 0 ? ca : y, A = e.altBoundary, T = A === void 0 ? !1 : A, w = e.padding, C = w === void 0 ? 0 : w, P = Vp(typeof C != "number" ? C : Wp(C, za)), M = E === ca ? V4 : ca, B = i.rects.popper, x = i.elements[T ? M : E], O = AE(pn(x) ? x : x.contextElement || Ks(i.elements.popper), f, g, c), z = Bn(i.elements.reference), G = Kp({
12542
12443
  reference: z,
12543
12444
  element: B,
12544
12445
  strategy: "absolute",
@@ -12558,7 +12459,7 @@ function $a(i, t) {
12558
12459
  }
12559
12460
  return J;
12560
12461
  }
12561
- function kE(i, t) {
12462
+ function TE(i, t) {
12562
12463
  t === void 0 && (t = {});
12563
12464
  var e = t, r = e.placement, n = e.boundary, o = e.rootBoundary, c = e.padding, d = e.flipVariations, f = e.allowedAutoPlacements, p = f === void 0 ? Fp : f, g = Gn(r), y = g ? d ? d0 : d0.filter(function(T) {
12564
12465
  return Gn(T) === g;
@@ -12578,17 +12479,17 @@ function kE(i, t) {
12578
12479
  return A[T] - A[w];
12579
12480
  });
12580
12481
  }
12581
- function wE(i) {
12482
+ function kE(i) {
12582
12483
  if (Yi(i) === Ph)
12583
12484
  return [];
12584
12485
  var t = Uo(i);
12585
12486
  return [p0(i), t, p0(t)];
12586
12487
  }
12587
- function SE(i) {
12488
+ function wE(i) {
12588
12489
  var t = i.state, e = i.options, r = i.name;
12589
12490
  if (!t.modifiersData[r]._skip) {
12590
- for (var n = e.mainAxis, o = n === void 0 ? !0 : n, c = e.altAxis, d = c === void 0 ? !0 : c, f = e.fallbackPlacements, p = e.padding, g = e.boundary, y = e.rootBoundary, E = e.altBoundary, A = e.flipVariations, T = A === void 0 ? !0 : A, w = e.allowedAutoPlacements, C = t.options.placement, P = Yi(C), M = P === C, B = f || (M || !T ? [Uo(C)] : wE(C)), x = [C].concat(B).reduce(function(Bt, Yt) {
12591
- return Bt.concat(Yi(Yt) === Ph ? kE(t, {
12491
+ for (var n = e.mainAxis, o = n === void 0 ? !0 : n, c = e.altAxis, d = c === void 0 ? !0 : c, f = e.fallbackPlacements, p = e.padding, g = e.boundary, y = e.rootBoundary, E = e.altBoundary, A = e.flipVariations, T = A === void 0 ? !0 : A, w = e.allowedAutoPlacements, C = t.options.placement, P = Yi(C), M = P === C, B = f || (M || !T ? [Uo(C)] : kE(C)), x = [C].concat(B).reduce(function(Bt, Yt) {
12492
+ return Bt.concat(Yi(Yt) === Ph ? TE(t, {
12592
12493
  placement: Yt,
12593
12494
  boundary: g,
12594
12495
  rootBoundary: y,
@@ -12633,11 +12534,11 @@ function SE(i) {
12633
12534
  t.placement !== st && (t.modifiersData[r]._skip = !0, t.placement = st, t.reset = !0);
12634
12535
  }
12635
12536
  }
12636
- const RE = {
12537
+ const SE = {
12637
12538
  name: "flip",
12638
12539
  enabled: !0,
12639
12540
  phase: "main",
12640
- fn: SE,
12541
+ fn: wE,
12641
12542
  requiresIfExists: ["offset"],
12642
12543
  data: {
12643
12544
  _skip: !1
@@ -12659,7 +12560,7 @@ function v0(i) {
12659
12560
  return i[t] >= 0;
12660
12561
  });
12661
12562
  }
12662
- function _E(i) {
12563
+ function RE(i) {
12663
12564
  var t = i.state, e = i.name, r = t.rects.reference, n = t.rects.popper, o = t.modifiersData.preventOverflow, c = $a(t, {
12664
12565
  elementContext: "reference"
12665
12566
  }), d = $a(t, {
@@ -12675,14 +12576,14 @@ function _E(i) {
12675
12576
  "data-popper-escaped": y
12676
12577
  });
12677
12578
  }
12678
- const LE = {
12579
+ const _E = {
12679
12580
  name: "hide",
12680
12581
  enabled: !0,
12681
12582
  phase: "main",
12682
12583
  requiresIfExists: ["preventOverflow"],
12683
- fn: _E
12584
+ fn: RE
12684
12585
  };
12685
- function CE(i, t, e) {
12586
+ function LE(i, t, e) {
12686
12587
  var r = Yi(i), n = [ti, Jr].indexOf(r) >= 0 ? -1 : 1, o = typeof e == "function" ? e(Object.assign({}, t, {
12687
12588
  placement: i
12688
12589
  })) : e, c = o[0], d = o[1];
@@ -12694,20 +12595,20 @@ function CE(i, t, e) {
12694
12595
  y: d
12695
12596
  };
12696
12597
  }
12697
- function IE(i) {
12598
+ function CE(i) {
12698
12599
  var t = i.state, e = i.options, r = i.name, n = e.offset, o = n === void 0 ? [0, 0] : n, c = Fp.reduce(function(g, y) {
12699
- return g[y] = CE(y, t.rects, o), g;
12600
+ return g[y] = LE(y, t.rects, o), g;
12700
12601
  }, {}), d = c[t.placement], f = d.x, p = d.y;
12701
12602
  t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += f, t.modifiersData.popperOffsets.y += p), t.modifiersData[r] = c;
12702
12603
  }
12703
- const xE = {
12604
+ const IE = {
12704
12605
  name: "offset",
12705
12606
  enabled: !0,
12706
12607
  phase: "main",
12707
12608
  requires: ["popperOffsets"],
12708
- fn: IE
12609
+ fn: CE
12709
12610
  };
12710
- function DE(i) {
12611
+ function xE(i) {
12711
12612
  var t = i.state, e = i.name;
12712
12613
  t.modifiersData[e] = Kp({
12713
12614
  reference: t.rects.reference,
@@ -12716,23 +12617,23 @@ function DE(i) {
12716
12617
  placement: t.placement
12717
12618
  });
12718
12619
  }
12719
- const PE = {
12620
+ const DE = {
12720
12621
  name: "popperOffsets",
12721
12622
  enabled: !0,
12722
12623
  phase: "read",
12723
- fn: DE,
12624
+ fn: xE,
12724
12625
  data: {}
12725
12626
  };
12726
- function OE(i) {
12627
+ function PE(i) {
12727
12628
  return i === "x" ? "y" : "x";
12728
12629
  }
12729
- function $E(i) {
12630
+ function OE(i) {
12730
12631
  var t = i.state, e = i.options, r = i.name, n = e.mainAxis, o = n === void 0 ? !0 : n, c = e.altAxis, d = c === void 0 ? !1 : c, f = e.boundary, p = e.rootBoundary, g = e.altBoundary, y = e.padding, E = e.tether, A = E === void 0 ? !0 : E, T = e.tetherOffset, w = T === void 0 ? 0 : T, C = $a(t, {
12731
12632
  boundary: f,
12732
12633
  rootBoundary: p,
12733
12634
  padding: y,
12734
12635
  altBoundary: g
12735
- }), P = Yi(t.placement), M = Gn(t.placement), B = !M, x = Mh(P), O = OE(x), z = t.modifiersData.popperOffsets, G = t.rects.reference, at = t.rects.popper, st = typeof w == "function" ? w(Object.assign({}, t.rects, {
12636
+ }), P = Yi(t.placement), M = Gn(t.placement), B = !M, x = Mh(P), O = PE(x), z = t.modifiersData.popperOffsets, G = t.rects.reference, at = t.rects.popper, st = typeof w == "function" ? w(Object.assign({}, t.rects, {
12736
12637
  placement: t.placement
12737
12638
  })) : w, J = typeof st == "number" ? {
12738
12639
  mainAxis: st,
@@ -12753,35 +12654,35 @@ function $E(i) {
12753
12654
  z[x] = ne, ft[x] = ne - bt;
12754
12655
  }
12755
12656
  if (d) {
12756
- var ee, Pe = x === "x" ? Jr : ti, Oe = x === "x" ? Ai : Ti, oe = z[O], Le = O === "y" ? "height" : "width", ie = oe + C[Pe], Ce = oe - C[Oe], Ge = [Jr, ti].indexOf(P) !== -1, Ir = (ee = kt == null ? void 0 : kt[O]) != null ? ee : 0, Ue = Ge ? ie : oe - G[Le] - at[Le] - Ir + J.altAxis, pr = Ge ? oe + G[Le] + at[Le] - Ir - J.altAxis : Ce, qi = A && Ge ? nE(Ue, oe, pr) : wa(A ? Ue : ie, oe, A ? pr : Ce);
12657
+ var ee, Pe = x === "x" ? Jr : ti, Oe = x === "x" ? Ai : Ti, oe = z[O], Le = O === "y" ? "height" : "width", ie = oe + C[Pe], Ce = oe - C[Oe], Ge = [Jr, ti].indexOf(P) !== -1, Ir = (ee = kt == null ? void 0 : kt[O]) != null ? ee : 0, Ue = Ge ? ie : oe - G[Le] - at[Le] - Ir + J.altAxis, pr = Ge ? oe + G[Le] + at[Le] - Ir - J.altAxis : Ce, qi = A && Ge ? sE(Ue, oe, pr) : wa(A ? Ue : ie, oe, A ? pr : Ce);
12757
12658
  z[O] = qi, ft[O] = qi - oe;
12758
12659
  }
12759
12660
  t.modifiersData[r] = ft;
12760
12661
  }
12761
12662
  }
12762
- const ME = {
12663
+ const $E = {
12763
12664
  name: "preventOverflow",
12764
12665
  enabled: !0,
12765
12666
  phase: "main",
12766
- fn: $E,
12667
+ fn: OE,
12767
12668
  requiresIfExists: ["offset"]
12768
12669
  };
12769
- function NE(i) {
12670
+ function ME(i) {
12770
12671
  return {
12771
12672
  scrollLeft: i.scrollLeft,
12772
12673
  scrollTop: i.scrollTop
12773
12674
  };
12774
12675
  }
12775
- function FE(i) {
12776
- return i === ci(i) || !Ei(i) ? Nh(i) : NE(i);
12676
+ function NE(i) {
12677
+ return i === ci(i) || !Ei(i) ? Nh(i) : ME(i);
12777
12678
  }
12778
- function UE(i) {
12679
+ function FE(i) {
12779
12680
  var t = i.getBoundingClientRect(), e = Un(t.width) / i.offsetWidth || 1, r = Un(t.height) / i.offsetHeight || 1;
12780
12681
  return e !== 1 || r !== 1;
12781
12682
  }
12782
- function BE(i, t, e) {
12683
+ function UE(i, t, e) {
12783
12684
  e === void 0 && (e = !1);
12784
- var r = Ei(t), n = Ei(t) && UE(t), o = Ks(t), c = Bn(i, n, e), d = {
12685
+ var r = Ei(t), n = Ei(t) && FE(t), o = Ks(t), c = Bn(i, n, e), d = {
12785
12686
  scrollLeft: 0,
12786
12687
  scrollTop: 0
12787
12688
  }, f = {
@@ -12789,14 +12690,14 @@ function BE(i, t, e) {
12789
12690
  y: 0
12790
12691
  };
12791
12692
  return (r || !r && !e) && ((Zi(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
12792
- Uh(o)) && (d = FE(t)), Ei(t) ? (f = Bn(t, !0), f.x += t.clientLeft, f.y += t.clientTop) : o && (f.x = Fh(o))), {
12693
+ Uh(o)) && (d = NE(t)), Ei(t) ? (f = Bn(t, !0), f.x += t.clientLeft, f.y += t.clientTop) : o && (f.x = Fh(o))), {
12793
12694
  x: c.left + d.scrollLeft - f.x,
12794
12695
  y: c.top + d.scrollTop - f.y,
12795
12696
  width: c.width,
12796
12697
  height: c.height
12797
12698
  };
12798
12699
  }
12799
- function GE(i) {
12700
+ function BE(i) {
12800
12701
  var t = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Set(), r = [];
12801
12702
  i.forEach(function(o) {
12802
12703
  t.set(o.name, o);
@@ -12815,15 +12716,15 @@ function GE(i) {
12815
12716
  e.has(o.name) || n(o);
12816
12717
  }), r;
12817
12718
  }
12818
- function HE(i) {
12819
- var t = GE(i);
12820
- return tE.reduce(function(e, r) {
12719
+ function GE(i) {
12720
+ var t = BE(i);
12721
+ return J4.reduce(function(e, r) {
12821
12722
  return e.concat(t.filter(function(n) {
12822
12723
  return n.phase === r;
12823
12724
  }));
12824
12725
  }, []);
12825
12726
  }
12826
- function VE(i) {
12727
+ function HE(i) {
12827
12728
  var t;
12828
12729
  return function() {
12829
12730
  return t || (t = new Promise(function(e) {
@@ -12833,7 +12734,7 @@ function VE(i) {
12833
12734
  })), t;
12834
12735
  };
12835
12736
  }
12836
- function WE(i) {
12737
+ function VE(i) {
12837
12738
  var t = i.reduce(function(e, r) {
12838
12739
  var n = e[r.name];
12839
12740
  return e[r.name] = n ? Object.assign({}, n, r, {
@@ -12857,7 +12758,7 @@ function b0() {
12857
12758
  return !(r && typeof r.getBoundingClientRect == "function");
12858
12759
  });
12859
12760
  }
12860
- function jE(i) {
12761
+ function WE(i) {
12861
12762
  i === void 0 && (i = {});
12862
12763
  var t = i, e = t.defaultModifiers, r = e === void 0 ? [] : e, n = t.defaultOptions, o = n === void 0 ? y0 : n;
12863
12764
  return function(d, f, p) {
@@ -12881,7 +12782,7 @@ function jE(i) {
12881
12782
  reference: pn(d) ? Sa(d) : d.contextElement ? Sa(d.contextElement) : [],
12882
12783
  popper: Sa(f)
12883
12784
  };
12884
- var B = HE(WE([].concat(r, g.options.modifiers)));
12785
+ var B = GE(VE([].concat(r, g.options.modifiers)));
12885
12786
  return g.orderedModifiers = B.filter(function(x) {
12886
12787
  return x.enabled;
12887
12788
  }), T(), A.update();
@@ -12896,7 +12797,7 @@ function jE(i) {
12896
12797
  var P = g.elements, M = P.reference, B = P.popper;
12897
12798
  if (b0(M, B)) {
12898
12799
  g.rects = {
12899
- reference: BE(M, Ya(B), g.options.strategy === "fixed"),
12800
+ reference: UE(M, Ya(B), g.options.strategy === "fixed"),
12900
12801
  popper: $h(B)
12901
12802
  }, g.reset = !1, g.placement = g.options.placement, g.orderedModifiers.forEach(function(J) {
12902
12803
  return g.modifiersData[J.name] = Object.assign({}, J.data);
@@ -12919,7 +12820,7 @@ function jE(i) {
12919
12820
  },
12920
12821
  // Async and optimistically optimized update – it will not be executed if
12921
12822
  // not necessary (debounced to run at most once-per-tick)
12922
- update: VE(function() {
12823
+ update: HE(function() {
12923
12824
  return new Promise(function(C) {
12924
12825
  A.forceUpdate(), C(g);
12925
12826
  });
@@ -12956,9 +12857,9 @@ function jE(i) {
12956
12857
  return A;
12957
12858
  };
12958
12859
  }
12959
- var KE = [gE, PE, fE, Up, xE, RE, ME, cE, LE], zE = /* @__PURE__ */ jE({
12960
- defaultModifiers: KE
12961
- }), YE = "tippy-box", zp = "tippy-content", XE = "tippy-backdrop", Yp = "tippy-arrow", Xp = "tippy-svg-arrow", sn = {
12860
+ var jE = [pE, DE, uE, Up, IE, SE, $E, lE, _E], KE = /* @__PURE__ */ WE({
12861
+ defaultModifiers: jE
12862
+ }), zE = "tippy-box", zp = "tippy-content", YE = "tippy-backdrop", Yp = "tippy-arrow", Xp = "tippy-svg-arrow", sn = {
12962
12863
  passive: !0,
12963
12864
  capture: !0
12964
12865
  }, Zp = function() {
@@ -12988,7 +12889,7 @@ function E0(i, t) {
12988
12889
  }, t);
12989
12890
  };
12990
12891
  }
12991
- function ZE(i) {
12892
+ function XE(i) {
12992
12893
  return i.split(/\s+/).filter(Boolean);
12993
12894
  }
12994
12895
  function Pn(i) {
@@ -12997,12 +12898,12 @@ function Pn(i) {
12997
12898
  function A0(i, t) {
12998
12899
  i.indexOf(t) === -1 && i.push(t);
12999
12900
  }
13000
- function qE(i) {
12901
+ function ZE(i) {
13001
12902
  return i.filter(function(t, e) {
13002
12903
  return i.indexOf(t) === e;
13003
12904
  });
13004
12905
  }
13005
- function QE(i) {
12906
+ function qE(i) {
13006
12907
  return i.split("-")[0];
13007
12908
  }
13008
12909
  function il(i) {
@@ -13021,17 +12922,17 @@ function yl(i) {
13021
12922
  return Bh(i, t);
13022
12923
  });
13023
12924
  }
13024
- function JE(i) {
12925
+ function QE(i) {
13025
12926
  return Bh(i, "NodeList");
13026
12927
  }
13027
- function tA(i) {
12928
+ function JE(i) {
13028
12929
  return Bh(i, "MouseEvent");
13029
12930
  }
13030
- function eA(i) {
12931
+ function tA(i) {
13031
12932
  return !!(i && i._tippy && i._tippy.reference === i);
13032
12933
  }
13033
- function rA(i) {
13034
- return yl(i) ? [i] : JE(i) ? il(i) : Array.isArray(i) ? i : il(document.querySelectorAll(i));
12934
+ function eA(i) {
12935
+ return yl(i) ? [i] : QE(i) ? il(i) : Array.isArray(i) ? i : il(document.querySelectorAll(i));
13035
12936
  }
13036
12937
  function hc(i, t) {
13037
12938
  i.forEach(function(e) {
@@ -13043,14 +12944,14 @@ function k0(i, t) {
13043
12944
  e && e.setAttribute("data-state", t);
13044
12945
  });
13045
12946
  }
13046
- function iA(i) {
12947
+ function rA(i) {
13047
12948
  var t, e = Pn(i), r = e[0];
13048
12949
  return r != null && (t = r.ownerDocument) != null && t.body ? r.ownerDocument : document;
13049
12950
  }
13050
- function sA(i, t) {
12951
+ function iA(i, t) {
13051
12952
  var e = t.clientX, r = t.clientY;
13052
12953
  return i.every(function(n) {
13053
- var o = n.popperRect, c = n.popperState, d = n.props, f = d.interactiveBorder, p = QE(c.placement), g = c.modifiersData.offset;
12954
+ var o = n.popperRect, c = n.popperState, d = n.props, f = d.interactiveBorder, p = qE(c.placement), g = c.modifiersData.offset;
13054
12955
  if (!g)
13055
12956
  return !0;
13056
12957
  var y = p === "bottom" ? g.top.y : 0, E = p === "top" ? g.bottom.y : 0, A = p === "right" ? g.left.x : 0, T = p === "left" ? g.right.x : 0, w = o.top - r + y > f, C = r - o.bottom - E > f, P = o.left - e + A > f, M = e - o.right - T > f;
@@ -13075,32 +12976,32 @@ function w0(i, t) {
13075
12976
  var ji = {
13076
12977
  isTouch: !1
13077
12978
  }, S0 = 0;
13078
- function nA() {
12979
+ function sA() {
13079
12980
  ji.isTouch || (ji.isTouch = !0, window.performance && document.addEventListener("mousemove", Qp));
13080
12981
  }
13081
12982
  function Qp() {
13082
12983
  var i = performance.now();
13083
12984
  i - S0 < 20 && (ji.isTouch = !1, document.removeEventListener("mousemove", Qp)), S0 = i;
13084
12985
  }
13085
- function aA() {
12986
+ function nA() {
13086
12987
  var i = document.activeElement;
13087
- if (eA(i)) {
12988
+ if (tA(i)) {
13088
12989
  var t = i._tippy;
13089
12990
  i.blur && !t.state.isVisible && i.blur();
13090
12991
  }
13091
12992
  }
13092
- function oA() {
13093
- document.addEventListener("touchstart", nA, sn), window.addEventListener("blur", aA);
12993
+ function aA() {
12994
+ document.addEventListener("touchstart", sA, sn), window.addEventListener("blur", nA);
13094
12995
  }
13095
- var lA = typeof window < "u" && typeof document < "u", cA = lA ? (
12996
+ var oA = typeof window < "u" && typeof document < "u", lA = oA ? (
13096
12997
  // @ts-ignore
13097
12998
  !!window.msCrypto
13098
- ) : !1, hA = {
12999
+ ) : !1, cA = {
13099
13000
  animateFill: !1,
13100
13001
  followCursor: !1,
13101
13002
  inlinePositioning: !1,
13102
13003
  sticky: !1
13103
- }, dA = {
13004
+ }, hA = {
13104
13005
  allowHTML: !1,
13105
13006
  animation: "fade",
13106
13007
  arrow: !0,
@@ -13158,7 +13059,7 @@ var lA = typeof window < "u" && typeof document < "u", cA = lA ? (
13158
13059
  touch: !0,
13159
13060
  trigger: "mouseenter focus",
13160
13061
  triggerTarget: null
13161
- }, hA, dA), uA = Object.keys(Di), fA = function(t) {
13062
+ }, cA, hA), dA = Object.keys(Di), uA = function(t) {
13162
13063
  var e = Object.keys(t);
13163
13064
  e.forEach(function(r) {
13164
13065
  Di[r] = t[r];
@@ -13175,10 +13076,10 @@ function Jp(i) {
13175
13076
  }, {});
13176
13077
  return Object.assign({}, i, e);
13177
13078
  }
13178
- function pA(i, t) {
13079
+ function fA(i, t) {
13179
13080
  var e = t ? Object.keys(Jp(Object.assign({}, Di, {
13180
13081
  plugins: t
13181
- }))) : uA, r = e.reduce(function(n, o) {
13082
+ }))) : dA, r = e.reduce(function(n, o) {
13182
13083
  var c = (i.getAttribute("data-tippy-" + o) || "").trim();
13183
13084
  if (!c)
13184
13085
  return n;
@@ -13197,17 +13098,17 @@ function pA(i, t) {
13197
13098
  function R0(i, t) {
13198
13099
  var e = Object.assign({}, t, {
13199
13100
  content: qp(t.content, [i])
13200
- }, t.ignoreAttributes ? {} : pA(i, t.plugins));
13101
+ }, t.ignoreAttributes ? {} : fA(i, t.plugins));
13201
13102
  return e.aria = Object.assign({}, Di.aria, e.aria), e.aria = {
13202
13103
  expanded: e.aria.expanded === "auto" ? t.interactive : e.aria.expanded,
13203
13104
  content: e.aria.content === "auto" ? t.interactive ? null : "describedby" : e.aria.content
13204
13105
  }, e;
13205
13106
  }
13206
- var gA = function() {
13107
+ var pA = function() {
13207
13108
  return "innerHTML";
13208
13109
  };
13209
13110
  function Jc(i, t) {
13210
- i[gA()] = t;
13111
+ i[pA()] = t;
13211
13112
  }
13212
13113
  function _0(i) {
13213
13114
  var t = Ra();
@@ -13227,13 +13128,13 @@ function th(i) {
13227
13128
  return r.classList.contains(Yp) || r.classList.contains(Xp);
13228
13129
  }),
13229
13130
  backdrop: e.find(function(r) {
13230
- return r.classList.contains(XE);
13131
+ return r.classList.contains(YE);
13231
13132
  })
13232
13133
  };
13233
13134
  }
13234
13135
  function t2(i) {
13235
13136
  var t = Ra(), e = Ra();
13236
- e.className = YE, e.setAttribute("data-state", "hidden"), e.setAttribute("tabindex", "-1");
13137
+ e.className = zE, e.setAttribute("data-state", "hidden"), e.setAttribute("tabindex", "-1");
13237
13138
  var r = Ra();
13238
13139
  r.className = zp, r.setAttribute("data-state", "hidden"), L0(r, i.props), t.appendChild(e), e.appendChild(r), n(i.props, i.props);
13239
13140
  function n(o, c) {
@@ -13246,9 +13147,9 @@ function t2(i) {
13246
13147
  };
13247
13148
  }
13248
13149
  t2.$$tippy = !0;
13249
- var mA = 1, vo = [], uc = [];
13250
- function vA(i, t) {
13251
- var e = R0(i, Object.assign({}, Di, Jp(T0(t)))), r, n, o, c = !1, d = !1, f = !1, p = !1, g, y, E, A = [], T = E0(Ie, e.interactiveDebounce), w, C = mA++, P = null, M = qE(e.plugins), B = {
13150
+ var gA = 1, vo = [], uc = [];
13151
+ function mA(i, t) {
13152
+ var e = R0(i, Object.assign({}, Di, Jp(T0(t)))), r, n, o, c = !1, d = !1, f = !1, p = !1, g, y, E, A = [], T = E0(Ie, e.interactiveDebounce), w, C = gA++, P = null, M = ZE(e.plugins), B = {
13252
13153
  // Is the instance currently enabled?
13253
13154
  isEnabled: !0,
13254
13155
  // Is the tippy currently showing and not transitioning out?
@@ -13308,7 +13209,7 @@ function vA(i, t) {
13308
13209
  }
13309
13210
  function Pt() {
13310
13211
  var ct = wt().parentNode;
13311
- return ct ? iA(ct) : document;
13212
+ return ct ? rA(ct) : document;
13312
13213
  }
13313
13214
  function F() {
13314
13215
  return th(z);
@@ -13420,14 +13321,14 @@ function vA(i, t) {
13420
13321
  passive: !0
13421
13322
  }), _e("touchend", Nt, {
13422
13323
  passive: !0
13423
- })), ZE(x.props.trigger).forEach(function(ct) {
13324
+ })), XE(x.props.trigger).forEach(function(ct) {
13424
13325
  if (ct !== "manual")
13425
13326
  switch (_e(ct, ae), ct) {
13426
13327
  case "mouseenter":
13427
13328
  _e("mouseleave", Nt);
13428
13329
  break;
13429
13330
  case "focus":
13430
- _e(cA ? "focusout" : "blur", ne);
13331
+ _e(lA ? "focusout" : "blur", ne);
13431
13332
  break;
13432
13333
  case "focusin":
13433
13334
  _e("focusout", ne);
@@ -13445,7 +13346,7 @@ function vA(i, t) {
13445
13346
  var Ht, Xt = !1;
13446
13347
  if (!(!x.state.isEnabled || ee(ct) || d)) {
13447
13348
  var Ee = ((Ht = g) == null ? void 0 : Ht.type) === "focus";
13448
- g = ct, w = ct.currentTarget, Z(), !x.state.isVisible && tA(ct) && vo.forEach(function(he) {
13349
+ g = ct, w = ct.currentTarget, Z(), !x.state.isVisible && JE(ct) && vo.forEach(function(he) {
13449
13350
  return he(ct);
13450
13351
  }), ct.type === "click" && (x.props.trigger.indexOf("mouseenter") < 0 || c) && x.props.hideOnClick !== !1 && x.state.isVisible ? Xt = !0 : ie(ct), ct.type === "click" && (c = !Xt), Xt && !Ee && Ce(ct);
13451
13352
  }
@@ -13461,7 +13362,7 @@ function vA(i, t) {
13461
13362
  props: e
13462
13363
  } : null;
13463
13364
  }).filter(Boolean);
13464
- sA(Ee, ct) && (gt(), Ce(ct));
13365
+ iA(Ee, ct) && (gt(), Ce(ct));
13465
13366
  }
13466
13367
  }
13467
13368
  function Nt(ct) {
@@ -13531,7 +13432,7 @@ function vA(i, t) {
13531
13432
  element: xr,
13532
13433
  padding: 3
13533
13434
  }
13534
- }), ui.push.apply(ui, (Ht == null ? void 0 : Ht.modifiers) || []), x.popperInstance = zE(di, z, Object.assign({}, Ht, {
13435
+ }), ui.push.apply(ui, (Ht == null ? void 0 : Ht.modifiers) || []), x.popperInstance = KE(di, z, Object.assign({}, Ht, {
13535
13436
  placement: Xt,
13536
13437
  onFirstUpdate: E,
13537
13438
  modifiers: ui
@@ -13643,17 +13544,17 @@ function vA(i, t) {
13643
13544
  function yn(i, t) {
13644
13545
  t === void 0 && (t = {});
13645
13546
  var e = Di.plugins.concat(t.plugins || []);
13646
- oA();
13547
+ aA();
13647
13548
  var r = Object.assign({}, t, {
13648
13549
  plugins: e
13649
- }), n = rA(i), o = n.reduce(function(c, d) {
13650
- var f = d && vA(d, r);
13550
+ }), n = eA(i), o = n.reduce(function(c, d) {
13551
+ var f = d && mA(d, r);
13651
13552
  return f && c.push(f), c;
13652
13553
  }, []);
13653
13554
  return yl(i) ? o[0] : o;
13654
13555
  }
13655
13556
  yn.defaultProps = Di;
13656
- yn.setDefaultProps = fA;
13557
+ yn.setDefaultProps = uA;
13657
13558
  yn.currentInput = ji;
13658
13559
  Object.assign({}, Up, {
13659
13560
  effect: function(t) {
@@ -13680,8 +13581,8 @@ class Ki extends Error {
13680
13581
  super(), this.fatal = !1, this.fatal = r, this.stack = e.stack, this.message = [t, e.message].filter(Boolean).join(" - ");
13681
13582
  }
13682
13583
  }
13683
- const yA = 5;
13684
- class bA {
13584
+ const vA = 5;
13585
+ class yA {
13685
13586
  constructor(t) {
13686
13587
  this._caption = "", this._currentTime = 0, this._activeScenes = [], this._upcomingScenes = [], this._canvas = Rr(), this._controls = Rr(), this.host = t;
13687
13588
  }
@@ -13697,7 +13598,7 @@ class bA {
13697
13598
  set currentTime(t) {
13698
13599
  var e, r, n, o, c;
13699
13600
  const d = Math.min(this.host.duration, Math.max(0, t));
13700
- this._currentTime = d, this.activeScenes = ((e = this.host.scenes) == null ? void 0 : e.filter(({ start: g, duration: y }) => d >= g && d < g + y)) ?? [], this._upcomingScenes = ((r = this.host.scenes) == null ? void 0 : r.filter(({ start: g }) => d >= g - yA && d < g)) ?? [], this.loadScenes(), this.syncVideoState(), (n = this._controls.value) == null || n.setAttribute("currentTime", d.toString());
13601
+ this._currentTime = d, this.activeScenes = ((e = this.host.scenes) == null ? void 0 : e.filter(({ start: g, duration: y }) => d >= g && d < g + y)) ?? [], this._upcomingScenes = ((r = this.host.scenes) == null ? void 0 : r.filter(({ start: g }) => d >= g - vA && d < g)) ?? [], this.loadScenes(), this.syncVideoState(), (n = this._controls.value) == null || n.setAttribute("currentTime", d.toString());
13701
13602
  const f = this.activeScenes[0], p = xp((o = f == null ? void 0 : f.videoMeta) == null ? void 0 : o.captions);
13702
13603
  this.caption = ((c = p.find(({ start: g, end: y }) => {
13703
13604
  var E;
@@ -13776,7 +13677,7 @@ class bA {
13776
13677
  (t = e == null ? void 0 : e.getContext("2d")) == null || t.clearRect(0, 0, e.width, e.height);
13777
13678
  }
13778
13679
  }
13779
- function EA(i) {
13680
+ function bA(i) {
13780
13681
  return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
13781
13682
  }
13782
13683
  var e2 = { exports: {} };
@@ -13870,15 +13771,15 @@ function ei(i) {
13870
13771
  for (var t = 1; t < arguments.length; t++) {
13871
13772
  var e = arguments[t] != null ? arguments[t] : {};
13872
13773
  t % 2 ? C0(Object(e), !0).forEach(function(r) {
13873
- AA(i, r, e[r]);
13774
+ EA(i, r, e[r]);
13874
13775
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(e)) : C0(Object(e)).forEach(function(r) {
13875
13776
  Object.defineProperty(i, r, Object.getOwnPropertyDescriptor(e, r));
13876
13777
  });
13877
13778
  }
13878
13779
  return i;
13879
13780
  }
13880
- function AA(i, t, e) {
13881
- return t = kA(t), t in i ? Object.defineProperty(i, t, {
13781
+ function EA(i, t, e) {
13782
+ return t = TA(t), t in i ? Object.defineProperty(i, t, {
13882
13783
  value: e,
13883
13784
  enumerable: !0,
13884
13785
  configurable: !0,
@@ -13895,7 +13796,7 @@ function ur() {
13895
13796
  return i;
13896
13797
  }, ur.apply(this, arguments);
13897
13798
  }
13898
- function TA(i, t) {
13799
+ function AA(i, t) {
13899
13800
  if (typeof i != "object" || i === null)
13900
13801
  return i;
13901
13802
  var e = i[Symbol.toPrimitive];
@@ -13907,8 +13808,8 @@ function TA(i, t) {
13907
13808
  }
13908
13809
  return (t === "string" ? String : Number)(i);
13909
13810
  }
13910
- function kA(i) {
13911
- var t = TA(i, "string");
13811
+ function TA(i) {
13812
+ var t = AA(i, "string");
13912
13813
  return typeof t == "symbol" ? t : String(t);
13913
13814
  }
13914
13815
  const jt = Number.isFinite || function(i) {
@@ -13931,18 +13832,18 @@ const nn = function() {
13931
13832
  error: nn
13932
13833
  };
13933
13834
  let _a = eh;
13934
- function wA(i) {
13835
+ function kA(i) {
13935
13836
  const t = self.console[i];
13936
13837
  return t ? t.bind(self.console, `[${i}] >`) : nn;
13937
13838
  }
13938
- function SA(i, ...t) {
13839
+ function wA(i, ...t) {
13939
13840
  t.forEach(function(e) {
13940
- _a[e] = i[e] ? i[e].bind(i) : wA(e);
13841
+ _a[e] = i[e] ? i[e].bind(i) : kA(e);
13941
13842
  });
13942
13843
  }
13943
- function RA(i, t) {
13844
+ function SA(i, t) {
13944
13845
  if (self.console && i === !0 || typeof i == "object") {
13945
- SA(
13846
+ wA(
13946
13847
  i,
13947
13848
  // Remove out from list here to hard-disable a log-level
13948
13849
  // 'trace',
@@ -13960,7 +13861,7 @@ function RA(i, t) {
13960
13861
  } else
13961
13862
  _a = eh;
13962
13863
  }
13963
- const X = _a, _A = /^(\d+)x(\d+)$/, I0 = /(.+?)=(".*?"|.*?)(?:,|$)/g;
13864
+ const X = _a, RA = /^(\d+)x(\d+)$/, I0 = /(.+?)=(".*?"|.*?)(?:,|$)/g;
13964
13865
  class Je {
13965
13866
  constructor(t) {
13966
13867
  typeof t == "string" && (t = Je.parseAttrList(t));
@@ -14000,7 +13901,7 @@ class Je {
14000
13901
  return this[t] === "YES";
14001
13902
  }
14002
13903
  decimalResolution(t) {
14003
- const e = _A.exec(this[t]);
13904
+ const e = RA.exec(this[t]);
14004
13905
  if (e !== null)
14005
13906
  return {
14006
13907
  width: parseInt(e[1], 10),
@@ -14019,10 +13920,10 @@ class Je {
14019
13920
  return r;
14020
13921
  }
14021
13922
  }
14022
- function LA(i) {
13923
+ function _A(i) {
14023
13924
  return i !== "ID" && i !== "CLASS" && i !== "START-DATE" && i !== "DURATION" && i !== "END-DATE" && i !== "END-ON-NEXT";
14024
13925
  }
14025
- function CA(i) {
13926
+ function LA(i) {
14026
13927
  return i === "SCTE35-OUT" || i === "SCTE35-IN";
14027
13928
  }
14028
13929
  class r2 {
@@ -14229,7 +14130,7 @@ class fc extends i2 {
14229
14130
  t[Fe.AUDIO] = null, t[Fe.VIDEO] = null, t[Fe.AUDIOVIDEO] = null;
14230
14131
  }
14231
14132
  }
14232
- class IA extends i2 {
14133
+ class CA extends i2 {
14233
14134
  constructor(t, e, r, n, o) {
14234
14135
  super(r), this.fragOffset = 0, this.duration = 0, this.gap = !1, this.independent = !1, this.relurl = void 0, this.fragment = void 0, this.index = void 0, this.stats = new bl(), this.duration = t.decimalFloatingPoint("DURATION"), this.gap = t.bool("GAP"), this.independent = t.bool("INDEPENDENT"), this.relurl = t.enumeratedString("URI"), this.fragment = e, this.index = n;
14235
14136
  const c = t.enumeratedString("BYTERANGE");
@@ -14248,8 +14149,8 @@ class IA extends i2 {
14248
14149
  return !!(t.audio || t.video || t.audiovideo);
14249
14150
  }
14250
14151
  }
14251
- const xA = 10;
14252
- class DA {
14152
+ const IA = 10;
14153
+ class xA {
14253
14154
  // Manifest reload synchronization
14254
14155
  constructor(t) {
14255
14156
  this.PTSKnown = !1, this.alignedSliding = !1, this.averagetargetduration = void 0, this.endCC = 0, this.endSN = 0, this.fragments = void 0, this.fragmentHint = void 0, this.partList = null, this.dateRanges = void 0, this.live = !0, this.ageHeader = 0, this.advancedDateTime = void 0, this.updated = !0, this.advanced = !0, this.availabilityDelay = void 0, this.misses = 0, this.startCC = 0, this.startSN = 0, this.startTimeOffset = null, this.targetduration = 0, this.totalduration = 0, this.type = null, this.url = void 0, this.m3u8 = "", this.version = null, this.canBlockReload = !1, this.canSkipUntil = 0, this.canSkipDateRanges = !1, this.skippedSegments = 0, this.recentlyRemovedDateranges = void 0, this.partHoldBack = 0, this.holdBack = 0, this.partTarget = 0, this.preloadHint = void 0, this.renditionReports = void 0, this.tuneInGoal = 0, this.deltaUpdateFailed = void 0, this.driftStartTime = 0, this.driftEndTime = 0, this.driftStart = 0, this.driftEnd = 0, this.encryptedFragments = void 0, this.playlistParsingError = null, this.variableList = null, this.hasVariableRefs = !1, this.fragments = [], this.encryptedFragments = [], this.dateRanges = {}, this.url = t;
@@ -14266,7 +14167,7 @@ class DA {
14266
14167
  return this.fragments.length ? jt(this.fragments[this.fragments.length - 1].programDateTime) : !1;
14267
14168
  }
14268
14169
  get levelTargetDuration() {
14269
- return this.averagetargetduration || this.targetduration || xA;
14170
+ return this.averagetargetduration || this.targetduration || IA;
14270
14171
  }
14271
14172
  get drift() {
14272
14173
  const t = this.driftEndTime - this.driftStartTime;
@@ -14298,25 +14199,25 @@ class DA {
14298
14199
  function Hh(i) {
14299
14200
  return Uint8Array.from(atob(i), (t) => t.charCodeAt(0));
14300
14201
  }
14301
- function PA(i) {
14202
+ function DA(i) {
14302
14203
  const t = s2(i).subarray(0, 16), e = new Uint8Array(16);
14303
14204
  return e.set(t, 16 - t.length), e;
14304
14205
  }
14305
- function OA(i) {
14206
+ function PA(i) {
14306
14207
  const t = function(e, r, n) {
14307
14208
  const o = e[r];
14308
14209
  e[r] = e[n], e[n] = o;
14309
14210
  };
14310
14211
  t(i, 0, 3), t(i, 1, 2), t(i, 4, 5), t(i, 6, 7);
14311
14212
  }
14312
- function $A(i) {
14213
+ function OA(i) {
14313
14214
  const t = i.split(":");
14314
14215
  let e = null;
14315
14216
  if (t[0] === "data" && t.length === 2) {
14316
14217
  const r = t[1].split(";"), n = r[r.length - 1].split(",");
14317
14218
  if (n.length === 2) {
14318
14219
  const o = n[0] === "base64", c = n[1];
14319
- o ? (r.splice(-1, 1), e = Hh(c)) : e = PA(c);
14220
+ o ? (r.splice(-1, 1), e = Hh(c)) : e = DA(c);
14320
14221
  }
14321
14222
  }
14322
14223
  return e;
@@ -14350,7 +14251,7 @@ function x0(i) {
14350
14251
  var n2 = {
14351
14252
  WIDEVINE: "edef8ba979d64acea3c827dcd51d21ed"
14352
14253
  };
14353
- function MA(i) {
14254
+ function $A(i) {
14354
14255
  if (i === n2.WIDEVINE)
14355
14256
  return tr.WIDEVINE;
14356
14257
  }
@@ -14376,7 +14277,7 @@ function pc(i) {
14376
14277
  const a2 = function() {
14377
14278
  return typeof self < "u" && self.navigator && self.navigator.requestMediaKeySystemAccess ? self.navigator.requestMediaKeySystemAccess.bind(self.navigator) : null;
14378
14279
  }();
14379
- function NA(i, t, e, r) {
14280
+ function MA(i, t, e, r) {
14380
14281
  let n;
14381
14282
  switch (i) {
14382
14283
  case tr.FAIRPLAY:
@@ -14392,9 +14293,9 @@ function NA(i, t, e, r) {
14392
14293
  default:
14393
14294
  throw new Error(`Unknown key-system: ${i}`);
14394
14295
  }
14395
- return FA(n, t, e, r);
14296
+ return NA(n, t, e, r);
14396
14297
  }
14397
- function FA(i, t, e, r) {
14298
+ function NA(i, t, e, r) {
14398
14299
  return [{
14399
14300
  initDataTypes: i,
14400
14301
  persistentState: r.persistentState || "not-allowed",
@@ -14428,14 +14329,14 @@ const Vh = (i, t) => t + 10 <= i.length && i[t] === 73 && i[t + 1] === 68 && i[t
14428
14329
  }, El = (i, t) => {
14429
14330
  let e = 0;
14430
14331
  return e = (i[t] & 127) << 21, e |= (i[t + 1] & 127) << 14, e |= (i[t + 2] & 127) << 7, e |= i[t + 3] & 127, e;
14431
- }, UA = (i, t) => Vh(i, t) && El(i, t + 6) + 10 <= i.length - t, BA = (i) => {
14332
+ }, FA = (i, t) => Vh(i, t) && El(i, t + 6) + 10 <= i.length - t, UA = (i) => {
14432
14333
  const t = c2(i);
14433
14334
  for (let e = 0; e < t.length; e++) {
14434
14335
  const r = t[e];
14435
14336
  if (l2(r))
14436
- return KA(r);
14337
+ return jA(r);
14437
14338
  }
14438
- }, l2 = (i) => i && i.key === "PRIV" && i.info === "com.apple.streaming.transportStreamTimestamp", GA = (i) => {
14339
+ }, l2 = (i) => i && i.key === "PRIV" && i.info === "com.apple.streaming.transportStreamTimestamp", BA = (i) => {
14439
14340
  const t = String.fromCharCode(i[0], i[1], i[2], i[3]), e = El(i, 4), r = 10;
14440
14341
  return {
14441
14342
  type: t,
@@ -14450,13 +14351,13 @@ const Vh = (i, t) => t + 10 <= i.length && i[t] === 73 && i[t + 1] === 68 && i[t
14450
14351
  t += 10;
14451
14352
  const n = t + r;
14452
14353
  for (; t + 8 < n; ) {
14453
- const o = GA(i.subarray(t)), c = HA(o);
14354
+ const o = BA(i.subarray(t)), c = GA(o);
14454
14355
  c && e.push(c), t += o.size + 10;
14455
14356
  }
14456
14357
  o2(i, t) && (t += 10);
14457
14358
  }
14458
14359
  return e;
14459
- }, HA = (i) => i.type === "PRIV" ? VA(i) : i.type[0] === "W" ? jA(i) : WA(i), VA = (i) => {
14360
+ }, GA = (i) => i.type === "PRIV" ? HA(i) : i.type[0] === "W" ? WA(i) : VA(i), HA = (i) => {
14460
14361
  if (i.size < 2)
14461
14362
  return;
14462
14363
  const t = Xi(i.data, !0), e = new Uint8Array(i.data.subarray(t.length + 1));
@@ -14465,7 +14366,7 @@ const Vh = (i, t) => t + 10 <= i.length && i[t] === 73 && i[t + 1] === 68 && i[t
14465
14366
  info: t,
14466
14367
  data: e.buffer
14467
14368
  };
14468
- }, WA = (i) => {
14369
+ }, VA = (i) => {
14469
14370
  if (i.size < 2)
14470
14371
  return;
14471
14372
  if (i.type === "TXXX") {
@@ -14484,7 +14385,7 @@ const Vh = (i, t) => t + 10 <= i.length && i[t] === 73 && i[t + 1] === 68 && i[t
14484
14385
  key: i.type,
14485
14386
  data: t
14486
14387
  };
14487
- }, jA = (i) => {
14388
+ }, WA = (i) => {
14488
14389
  if (i.type === "WXXX") {
14489
14390
  if (i.size < 2)
14490
14391
  return;
@@ -14503,14 +14404,14 @@ const Vh = (i, t) => t + 10 <= i.length && i[t] === 73 && i[t + 1] === 68 && i[t
14503
14404
  key: i.type,
14504
14405
  data: t
14505
14406
  };
14506
- }, KA = (i) => {
14407
+ }, jA = (i) => {
14507
14408
  if (i.data.byteLength === 8) {
14508
14409
  const t = new Uint8Array(i.data), e = t[3] & 1;
14509
14410
  let r = (t[4] << 23) + (t[5] << 15) + (t[6] << 7) + t[7];
14510
14411
  return r /= 45, e && (r += 4772185884e-2), Math.round(r);
14511
14412
  }
14512
14413
  }, Xi = (i, t = !1) => {
14513
- const e = zA();
14414
+ const e = KA();
14514
14415
  if (e) {
14515
14416
  const p = e.decode(i);
14516
14417
  if (t) {
@@ -14548,7 +14449,7 @@ const Vh = (i, t) => t + 10 <= i.length && i[t] === 73 && i[t + 1] === 68 && i[t
14548
14449
  return d;
14549
14450
  };
14550
14451
  let gc;
14551
- function zA() {
14452
+ function KA() {
14552
14453
  return !gc && typeof self.TextDecoder < "u" && (gc = new self.TextDecoder("utf-8")), gc;
14553
14454
  }
14554
14455
  const Wi = {
@@ -14560,7 +14461,7 @@ const Wi = {
14560
14461
  }
14561
14462
  return t;
14562
14463
  }
14563
- }, nl = Math.pow(2, 32) - 1, YA = [].push, h2 = {
14464
+ }, nl = Math.pow(2, 32) - 1, zA = [].push, h2 = {
14564
14465
  video: 1,
14565
14466
  audio: 2,
14566
14467
  id3: 3,
@@ -14595,13 +14496,13 @@ function Te(i, t) {
14595
14496
  e.push(i.subarray(n + 8, d));
14596
14497
  else {
14597
14498
  const f = Te(i.subarray(n + 8, d), t.slice(1));
14598
- f.length && YA.apply(e, f);
14499
+ f.length && zA.apply(e, f);
14599
14500
  }
14600
14501
  n = d;
14601
14502
  }
14602
14503
  return e;
14603
14504
  }
14604
- function XA(i) {
14505
+ function YA(i) {
14605
14506
  const t = [], e = i[0];
14606
14507
  let r = 8;
14607
14508
  const n = re(i, r);
@@ -14677,7 +14578,7 @@ function f2(i) {
14677
14578
  });
14678
14579
  }), t;
14679
14580
  }
14680
- function ZA(i, t) {
14581
+ function XA(i, t) {
14681
14582
  if (!i || !t)
14682
14583
  return i;
14683
14584
  const e = t.keyId;
@@ -14706,7 +14607,7 @@ function p2(i) {
14706
14607
  }
14707
14608
  return X.error("[eme] missing 'schm' box"), null;
14708
14609
  }
14709
- function qA(i, t) {
14610
+ function ZA(i, t) {
14710
14611
  return Te(t, ["moof", "traf"]).reduce((e, r) => {
14711
14612
  const n = Te(r, ["tfdt"])[0], o = n[0], c = Te(r, ["tfhd"]).reduce((d, f) => {
14712
14613
  const p = re(f, 4), g = i[p];
@@ -14726,7 +14627,7 @@ function qA(i, t) {
14726
14627
  return c !== null && isFinite(c) && (e === null || c < e) ? c : e;
14727
14628
  }, null);
14728
14629
  }
14729
- function QA(i, t) {
14630
+ function qA(i, t) {
14730
14631
  let e = 0, r = 0, n = 0;
14731
14632
  const o = Te(i, ["moof", "traf"]);
14732
14633
  for (let c = 0; c < o.length; c++) {
@@ -14738,7 +14639,7 @@ function QA(i, t) {
14738
14639
  E & 8 && (E & 2 ? A = re(f, 12) : A = re(f, 8));
14739
14640
  const T = g.timescale || 9e4, w = Te(d, ["trun"]);
14740
14641
  for (let C = 0; C < w.length; C++) {
14741
- if (e = JA(w[C]), !e && A) {
14642
+ if (e = QA(w[C]), !e && A) {
14742
14643
  const P = re(w[C], 4);
14743
14644
  e = A * P;
14744
14645
  }
@@ -14749,14 +14650,14 @@ function QA(i, t) {
14749
14650
  let c = 0;
14750
14651
  const d = Te(i, ["sidx"]);
14751
14652
  for (let f = 0; f < d.length; f++) {
14752
- const p = XA(d[f]);
14653
+ const p = YA(d[f]);
14753
14654
  p != null && p.references && (c += p.references.reduce((g, y) => g + y.info.duration || 0, 0));
14754
14655
  }
14755
14656
  return c;
14756
14657
  }
14757
14658
  return r || n;
14758
14659
  }
14759
- function JA(i) {
14660
+ function QA(i) {
14760
14661
  const t = re(i, 0);
14761
14662
  let e = 8;
14762
14663
  t & 1 && (e += 4), t & 4 && (e += 4);
@@ -14771,7 +14672,7 @@ function JA(i) {
14771
14672
  }
14772
14673
  return r;
14773
14674
  }
14774
- function tT(i, t, e) {
14675
+ function JA(i, t, e) {
14775
14676
  Te(t, ["moof", "traf"]).forEach((r) => {
14776
14677
  Te(r, ["tfhd"]).forEach((n) => {
14777
14678
  const o = re(n, 4), c = i[o];
@@ -14792,7 +14693,7 @@ function tT(i, t, e) {
14792
14693
  });
14793
14694
  });
14794
14695
  }
14795
- function eT(i) {
14696
+ function tT(i) {
14796
14697
  const t = {
14797
14698
  valid: null,
14798
14699
  remainder: null
@@ -14827,7 +14728,7 @@ function P0(i, t) {
14827
14728
  let B = 0;
14828
14729
  const x = (A & 32) !== 0;
14829
14730
  let O = 8;
14830
- E === o && (T && (O += 8), w && (O += 4), C && (P = re(y, O), O += 4), M && (B = re(y, O), O += 4), x && (O += 4), t.type === "video" && (c = rT(t.codec)), Te(p, ["trun"]).map((z) => {
14731
+ E === o && (T && (O += 8), w && (O += 4), C && (P = re(y, O), O += 4), M && (B = re(y, O), O += 4), x && (O += 4), t.type === "video" && (c = eT(t.codec)), Te(p, ["trun"]).map((z) => {
14831
14732
  const G = z[0], at = re(z, 0) & 16777215, st = (at & 1) !== 0;
14832
14733
  let J = 0;
14833
14734
  const kt = (at & 4) !== 0, ft = (at & 256) !== 0;
@@ -14845,7 +14746,7 @@ function P0(i, t) {
14845
14746
  let It = 0;
14846
14747
  for (; It < F; ) {
14847
14748
  const Bt = re(r, gt);
14848
- if (gt += 4, iT(c, r[gt])) {
14749
+ if (gt += 4, rT(c, r[gt])) {
14849
14750
  const Yt = r.subarray(gt, gt + Bt);
14850
14751
  g2(Yt, c ? 2 : 1, i + N / n, e);
14851
14752
  }
@@ -14859,14 +14760,14 @@ function P0(i, t) {
14859
14760
  });
14860
14761
  }), e;
14861
14762
  }
14862
- function rT(i) {
14763
+ function eT(i) {
14863
14764
  if (!i)
14864
14765
  return !1;
14865
14766
  const t = i.indexOf("."), e = t < 0 ? i : i.substring(0, t);
14866
14767
  return e === "hvc1" || e === "hev1" || // Dolby Vision
14867
14768
  e === "dvh1" || e === "dvhe";
14868
14769
  }
14869
- function iT(i, t) {
14770
+ function rT(i, t) {
14870
14771
  if (i) {
14871
14772
  const e = t >> 1 & 63;
14872
14773
  return e === 39 || e === 40;
@@ -14953,7 +14854,7 @@ function m2(i) {
14953
14854
  c === e[0] && (c++, e.shift()), o[r] = i[c];
14954
14855
  return o;
14955
14856
  }
14956
- function sT(i) {
14857
+ function iT(i) {
14957
14858
  const t = i[0];
14958
14859
  let e = "", r = "", n = 0, o = 0, c = 0, d = 0, f = 0, p = 0;
14959
14860
  if (t === 0) {
@@ -14985,7 +14886,7 @@ function sT(i) {
14985
14886
  payload: g
14986
14887
  };
14987
14888
  }
14988
- function nT(i, ...t) {
14889
+ function sT(i, ...t) {
14989
14890
  const e = t.length;
14990
14891
  let r = 8, n = e;
14991
14892
  for (; n--; )
@@ -14995,7 +14896,7 @@ function nT(i, ...t) {
14995
14896
  o.set(t[n], r), r += t[n].byteLength;
14996
14897
  return o;
14997
14898
  }
14998
- function aT(i, t, e) {
14899
+ function nT(i, t, e) {
14999
14900
  if (i.byteLength !== 16)
15000
14901
  throw new RangeError("Invalid system id");
15001
14902
  let r, n;
@@ -15012,7 +14913,7 @@ function aT(i, t, e) {
15012
14913
  let o;
15013
14914
  r > 0 ? (o = new Uint8Array(4), t.length > 0 && new DataView(o.buffer).setUint32(0, t.length, !1)) : o = new Uint8Array();
15014
14915
  const c = new Uint8Array(4);
15015
- return e && e.byteLength > 0 && new DataView(c.buffer).setUint32(0, e.byteLength, !1), nT(
14916
+ return e && e.byteLength > 0 && new DataView(c.buffer).setUint32(0, e.byteLength, !1), sT(
15016
14917
  [112, 115, 115, 104],
15017
14918
  new Uint8Array([
15018
14919
  r,
@@ -15029,7 +14930,7 @@ function aT(i, t, e) {
15029
14930
  e || new Uint8Array()
15030
14931
  );
15031
14932
  }
15032
- function oT(i) {
14933
+ function aT(i) {
15033
14934
  if (!(i instanceof ArrayBuffer) || i.byteLength < 32)
15034
14935
  return null;
15035
14936
  const t = {
@@ -15082,10 +14983,10 @@ class Ma {
15082
14983
  return null;
15083
14984
  if (this.method === "AES-128" && this.uri && !this.iv) {
15084
14985
  typeof t != "number" && (this.method === "AES-128" && !this.iv && X.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`), t = 0);
15085
- const r = lT(t);
14986
+ const r = oT(t);
15086
14987
  return new Ma(this.method, this.uri, "identity", this.keyFormatVersions, r);
15087
14988
  }
15088
- const e = $A(this.uri);
14989
+ const e = OA(this.uri);
15089
14990
  if (e)
15090
14991
  switch (this.keyFormat) {
15091
14992
  case Qr.WIDEVINE:
@@ -15093,13 +14994,13 @@ class Ma {
15093
14994
  break;
15094
14995
  case Qr.PLAYREADY: {
15095
14996
  const r = new Uint8Array([154, 4, 240, 121, 152, 64, 66, 134, 171, 146, 230, 91, 224, 136, 95, 149]);
15096
- this.pssh = aT(r, null, e);
14997
+ this.pssh = nT(r, null, e);
15097
14998
  const n = new Uint16Array(e.buffer, e.byteOffset, e.byteLength / 2), o = String.fromCharCode.apply(null, Array.from(n)), c = o.substring(o.indexOf("<"), o.length), d = new DOMParser().parseFromString(c, "text/xml").getElementsByTagName("KID")[0];
15098
14999
  if (d) {
15099
15000
  const f = d.childNodes[0] ? d.childNodes[0].nodeValue : d.getAttribute("VALUE");
15100
15001
  if (f) {
15101
15002
  const p = Hh(f).subarray(0, 16);
15102
- OA(p), this.keyId = p;
15003
+ PA(p), this.keyId = p;
15103
15004
  }
15104
15005
  }
15105
15006
  break;
@@ -15125,7 +15026,7 @@ class Ma {
15125
15026
  return this;
15126
15027
  }
15127
15028
  }
15128
- function lT(i) {
15029
+ function oT(i) {
15129
15030
  const t = new Uint8Array(16);
15130
15031
  for (let e = 12; e < 16; e++)
15131
15032
  t[e] = i >> 8 * (15 - e) & 255;
@@ -15171,7 +15072,7 @@ function $0(i, t, e) {
15171
15072
  n = t.NAME, o = t.VALUE;
15172
15073
  n in r ? i.playlistParsingError || (i.playlistParsingError = new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${n}"`)) : r[n] = o || "";
15173
15074
  }
15174
- function cT(i, t, e) {
15075
+ function lT(i, t, e) {
15175
15076
  const r = t.IMPORT;
15176
15077
  if (e && r in e) {
15177
15078
  let n = i.variableList;
@@ -15183,7 +15084,7 @@ function Al() {
15183
15084
  if (!(typeof self > "u"))
15184
15085
  return self.MediaSource || self.WebKitMediaSource;
15185
15086
  }
15186
- const hT = {
15087
+ const cT = {
15187
15088
  audio: {
15188
15089
  a3ds: !0,
15189
15090
  "ac-3": !0,
@@ -15255,15 +15156,15 @@ const hT = {
15255
15156
  wvtt: !0
15256
15157
  }
15257
15158
  }, M0 = Al();
15258
- function dT(i, t) {
15259
- const e = hT[t];
15159
+ function hT(i, t) {
15160
+ const e = cT[t];
15260
15161
  return !!e && e[i.slice(0, 4)] === !0;
15261
15162
  }
15262
15163
  function vc(i, t) {
15263
15164
  var e;
15264
15165
  return (e = M0 == null ? void 0 : M0.isTypeSupported(`${t || "video"}/mp4;codecs="${i}"`)) != null ? e : !1;
15265
15166
  }
15266
- const N0 = /#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g, F0 = /#EXT-X-MEDIA:(.*)/g, uT = /^#EXT(?:INF|-X-TARGETDURATION):/m, U0 = new RegExp([
15167
+ const N0 = /#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g, F0 = /#EXT-X-MEDIA:(.*)/g, dT = /^#EXT(?:INF|-X-TARGETDURATION):/m, U0 = new RegExp([
15267
15168
  /#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,
15268
15169
  // duration (#EXTINF:<duration>,<title>), group 1 => duration, group 2 => title
15269
15170
  /(?!#) *(\S[\S ]*)/.source,
@@ -15274,7 +15175,7 @@ const N0 = /#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT
15274
15175
  // next segment's program date/time group 5 => the datetime spec
15275
15176
  /#.*/.source
15276
15177
  // All other non-segment oriented tags will match with all groups empty
15277
- ].join("|"), "g"), fT = new RegExp([/#(EXTM3U)/.source, /#EXT-X-(DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source, /#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source, /#EXT-X-(DISCONTINUITY|ENDLIST|GAP)/.source, /(#)([^:]*):(.*)/.source, /(#)(.*)(?:.*)\r?\n?/.source].join("|"));
15178
+ ].join("|"), "g"), uT = new RegExp([/#(EXTM3U)/.source, /#EXT-X-(DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source, /#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source, /#EXT-X-(DISCONTINUITY|ENDLIST|GAP)/.source, /(#)([^:]*):(.*)/.source, /(#)(.*)(?:.*)\r?\n?/.source].join("|"));
15278
15179
  class xi {
15279
15180
  static findGroup(t, e) {
15280
15181
  for (let r = 0; r < t.length; r++) {
@@ -15297,7 +15198,7 @@ class xi {
15297
15198
  });
15298
15199
  }
15299
15200
  static isMediaPlaylist(t) {
15300
- return uT.test(t);
15201
+ return dT.test(t);
15301
15202
  }
15302
15203
  static parseMasterPlaylist(t, e) {
15303
15204
  const r = O0(t), n = {
@@ -15323,7 +15224,7 @@ class xi {
15323
15224
  name: p.NAME,
15324
15225
  url: xi.resolve(g, e)
15325
15226
  }, E = p.decimalResolution("RESOLUTION");
15326
- E && (y.width = E.width, y.height = E.height), pT((p.CODECS || "").split(/[ ,]+/).filter((A) => A), y), y.videoCodec && y.videoCodec.indexOf("avc1") !== -1 && (y.videoCodec = xi.convertAVC1ToAVCOTI(y.videoCodec)), (d = y.unknownCodecs) != null && d.length || o.push(y), n.levels.push(y);
15227
+ E && (y.width = E.width, y.height = E.height), fT((p.CODECS || "").split(/[ ,]+/).filter((A) => A), y), y.videoCodec && y.videoCodec.indexOf("avc1") !== -1 && (y.videoCodec = xi.convertAVC1ToAVCOTI(y.videoCodec)), (d = y.unknownCodecs) != null && d.length || o.push(y), n.levels.push(y);
15327
15228
  } else if (c[3]) {
15328
15229
  const p = c[3], g = c[4];
15329
15230
  switch (p) {
@@ -15406,7 +15307,7 @@ class xi {
15406
15307
  return o;
15407
15308
  }
15408
15309
  static parseLevelPlaylist(t, e, r, n, o, c) {
15409
- const d = new DA(e), f = d.fragments;
15310
+ const d = new xA(e), f = d.fragments;
15410
15311
  let p = null, g = 0, y = 0, E = 0, A = 0, T = null, w = new fc(n, e), C, P, M, B = -1, x = !1;
15411
15312
  for (U0.lastIndex = 0, d.m3u8 = t, d.hasVariableRefs = O0(t); (C = U0.exec(t)) !== null; ) {
15412
15313
  x && (x = !1, w = new fc(n, e), w.start = E, w.sn = g, w.cc = A, w.level = r, p && (w.initSegment = p, w.rawProgramDateTime = p.rawProgramDateTime, p.rawProgramDateTime = null));
@@ -15427,7 +15328,7 @@ class xi {
15427
15328
  } else if (C[5])
15428
15329
  w.rawProgramDateTime = (" " + C[5]).slice(1), w.tagList.push(["PROGRAM-DATE-TIME", w.rawProgramDateTime]), B === -1 && (B = f.length);
15429
15330
  else {
15430
- if (C = C[0].match(fT), !C) {
15331
+ if (C = C[0].match(uT), !C) {
15431
15332
  X.warn("No matches on slow regex match for level playlist!");
15432
15333
  continue;
15433
15334
  }
@@ -15488,7 +15389,7 @@ class xi {
15488
15389
  case "DEFINE": {
15489
15390
  {
15490
15391
  const ft = new Je(J);
15491
- qr(d, ft, ["NAME", "VALUE", "IMPORT", "QUERYPARAM"]), "IMPORT" in ft ? cT(d, ft, c) : $0(d, ft, e);
15392
+ qr(d, ft, ["NAME", "VALUE", "IMPORT", "QUERYPARAM"]), "IMPORT" in ft ? lT(d, ft, c) : $0(d, ft, e);
15492
15393
  }
15493
15394
  break;
15494
15395
  }
@@ -15534,7 +15435,7 @@ class xi {
15534
15435
  ft || (ft = d.partList = []);
15535
15436
  const wt = y > 0 ? ft[ft.length - 1] : void 0, Pt = y++, F = new Je(J);
15536
15437
  qr(d, F, ["BYTERANGE", "URI"]);
15537
- const j = new IA(F, w, e, Pt, wt);
15438
+ const j = new CA(F, w, e, Pt, wt);
15538
15439
  ft.push(j), w.duration += j.duration;
15539
15440
  break;
15540
15441
  }
@@ -15562,7 +15463,7 @@ class xi {
15562
15463
  d.endSN = at !== "initSegment" ? at : 0, d.live || (G.endList = !0), z && (d.startCC = z.cc);
15563
15464
  } else
15564
15465
  d.endSN = 0, d.startCC = 0;
15565
- return d.fragmentHint && (E += d.fragmentHint.duration), d.totalduration = E, d.endCC = A, B > 0 && gT(f, B), d;
15466
+ return d.fragmentHint && (E += d.fragmentHint.duration), d.totalduration = E, d.endCC = A, B > 0 && pT(f, B), d;
15566
15467
  }
15567
15468
  }
15568
15469
  function B0(i, t, e) {
@@ -15578,9 +15479,9 @@ function G0(i) {
15578
15479
  const t = new Je(i).decimalFloatingPoint("TIME-OFFSET");
15579
15480
  return jt(t) ? t : null;
15580
15481
  }
15581
- function pT(i, t) {
15482
+ function fT(i, t) {
15582
15483
  ["video", "audio", "text"].forEach((e) => {
15583
- const r = i.filter((n) => dT(n, e));
15484
+ const r = i.filter((n) => hT(n, e));
15584
15485
  if (r.length) {
15585
15486
  const n = r.filter((o) => o.lastIndexOf("avc1", 0) === 0 || o.lastIndexOf("mp4a", 0) === 0);
15586
15487
  t[`${e}Codec`] = n.length > 0 ? n[0] : r[0], i = i.filter((o) => r.indexOf(o) === -1);
@@ -15591,7 +15492,7 @@ function H0(i, t, e) {
15591
15492
  const r = t[e];
15592
15493
  r && (i[e] = r);
15593
15494
  }
15594
- function gT(i, t) {
15495
+ function pT(i, t) {
15595
15496
  let e = i[t];
15596
15497
  for (let r = t; r--; ) {
15597
15498
  const n = i[r];
@@ -15640,7 +15541,7 @@ function yc(i, t) {
15640
15541
  let e = i.url;
15641
15542
  return (e === void 0 || e.indexOf("data:") === 0) && (e = t.url), e;
15642
15543
  }
15643
- class mT {
15544
+ class gT {
15644
15545
  constructor(t) {
15645
15546
  this.hls = void 0, this.loaders = /* @__PURE__ */ Object.create(null), this.variableList = null, this.hls = t, this.registerListeners();
15646
15547
  }
@@ -16052,13 +15953,13 @@ function $n(i) {
16052
15953
  function ih(i, t, e, r) {
16053
15954
  const n = i.mode;
16054
15955
  if (n === "disabled" && (i.mode = "hidden"), i.cues && i.cues.length > 0) {
16055
- const o = yT(i.cues, t, e);
15956
+ const o = vT(i.cues, t, e);
16056
15957
  for (let c = 0; c < o.length; c++)
16057
15958
  (!r || r(o[c])) && i.removeCue(o[c]);
16058
15959
  }
16059
15960
  n === "disabled" && (i.mode = n);
16060
15961
  }
16061
- function vT(i, t) {
15962
+ function mT(i, t) {
16062
15963
  if (t < i[0].startTime)
16063
15964
  return 0;
16064
15965
  const e = i.length - 1;
@@ -16076,8 +15977,8 @@ function vT(i, t) {
16076
15977
  }
16077
15978
  return i[r].startTime - t < t - i[n].startTime ? r : n;
16078
15979
  }
16079
- function yT(i, t, e) {
16080
- const r = [], n = vT(i, t);
15980
+ function vT(i, t, e) {
15981
+ const r = [], n = mT(i, t);
16081
15982
  if (n > -1)
16082
15983
  for (let o = n, c = i.length; o < c; o++) {
16083
15984
  const d = i[o];
@@ -16093,7 +15994,7 @@ var Ii = {
16093
15994
  dateRange: "com.apple.quicktime.HLS",
16094
15995
  emsg: "https://aomedia.org/emsg/ID3"
16095
15996
  };
16096
- const bT = 0.25;
15997
+ const yT = 0.25;
16097
15998
  function sh() {
16098
15999
  if (!(typeof self > "u"))
16099
16000
  return self.WebKitDataCue || self.VTTCue || self.TextTrackCue;
@@ -16110,10 +16011,10 @@ const bo = (() => {
16110
16011
  function bc(i, t) {
16111
16012
  return i.getTime() / 1e3 - t;
16112
16013
  }
16113
- function ET(i) {
16014
+ function bT(i) {
16114
16015
  return Uint8Array.from(i.replace(/^0x/, "").replace(/([\da-fA-F]{2}) ?/g, "0x$1 ").replace(/ +$/, "").split(" ")).buffer;
16115
16016
  }
16116
- class AT {
16017
+ class ET {
16117
16018
  constructor(t) {
16118
16019
  this.hls = void 0, this.id3Track = null, this.media = null, this.dateRangeCuesAppended = {}, this.hls = t, this._registerListeners();
16119
16020
  }
@@ -16182,7 +16083,7 @@ class AT {
16182
16083
  if (p) {
16183
16084
  const g = o[d].pts;
16184
16085
  let y = g + o[d].duration;
16185
- y > bo && (y = bo), y - g <= 0 && (y = g + bT);
16086
+ y > bo && (y = bo), y - g <= 0 && (y = g + yT);
16186
16087
  for (let E = 0; E < p.length; E++) {
16187
16088
  const A = p[E];
16188
16089
  if (!l2(A)) {
@@ -16268,14 +16169,14 @@ class AT {
16268
16169
  const B = Object.keys(E.attr);
16269
16170
  for (let x = 0; x < B.length; x++) {
16270
16171
  const O = B[x];
16271
- if (!LA(O))
16172
+ if (!_A(O))
16272
16173
  continue;
16273
16174
  let z = T[O];
16274
16175
  if (z)
16275
16176
  w && !A.durationKnown && (z.endTime = P);
16276
16177
  else {
16277
16178
  let G = E.attr[O];
16278
- z = new p(C, P, ""), CA(O) && (G = ET(G)), z.value = {
16179
+ z = new p(C, P, ""), LA(O) && (G = bT(G)), z.value = {
16279
16180
  key: O,
16280
16181
  data: G
16281
16182
  }, z.type = Ii.dateRange, z.id = y, this.id3Track.addCue(z), T[O] = z;
@@ -16289,7 +16190,7 @@ class AT {
16289
16190
  }
16290
16191
  }
16291
16192
  }
16292
- class TT {
16193
+ class AT {
16293
16194
  constructor(t) {
16294
16195
  this.hls = void 0, this.config = void 0, this.media = null, this.levelDetails = null, this.currentTime = 0, this.stallCount = 0, this._latency = null, this.timeupdateHandler = () => this.timeupdate(), this.hls = t, this.config = t.config, this.registerListeners();
16295
16196
  }
@@ -16427,7 +16328,7 @@ var La = {
16427
16328
  Yes: "YES",
16428
16329
  v2: "v2"
16429
16330
  };
16430
- function kT(i, t) {
16331
+ function TT(i, t) {
16431
16332
  const {
16432
16333
  canSkipUntil: e,
16433
16334
  canSkipDateRanges: r,
@@ -16508,7 +16409,7 @@ function E2(i, t, e, r, n, o) {
16508
16409
  Ec(T[E], T[E + 1]);
16509
16410
  return i.fragmentHint && Ec(T[T.length - 1], i.fragmentHint), i.PTSKnown = i.alignedSliding = !0, g;
16510
16411
  }
16511
- function wT(i, t) {
16412
+ function kT(i, t) {
16512
16413
  let e = null;
16513
16414
  const r = i.fragments;
16514
16415
  for (let f = r.length - 1; f >= 0; f--) {
@@ -16520,7 +16421,7 @@ function wT(i, t) {
16520
16421
  }
16521
16422
  i.fragmentHint && delete i.fragmentHint.endPTS;
16522
16423
  let n = 0, o;
16523
- if (_T(i, t, (f, p) => {
16424
+ if (RT(i, t, (f, p) => {
16524
16425
  f.relurl && (n = f.cc - p.cc), jt(f.startPTS) && jt(f.endPTS) && (p.start = p.startPTS = f.startPTS, p.startDTS = f.startDTS, p.maxStartPTS = f.maxStartPTS, p.endPTS = f.endPTS, p.endDTS = f.endDTS, p.minEndPTS = f.minEndPTS, p.duration = f.endPTS - f.startPTS, p.duration && (o = p), t.PTSKnown = t.alignedSliding = !0), p.elementaryStreams = f.elementaryStreams, p.loader = f.loader, p.stats = f.stats, p.urlId = f.urlId, f.initSegment && (p.initSegment = f.initSegment, e = f.initSegment);
16525
16426
  }), e && (t.fragmentHint ? t.fragments.concat(t.fragmentHint) : t.fragments).forEach((f) => {
16526
16427
  var p;
@@ -16532,14 +16433,14 @@ function wT(i, t) {
16532
16433
  t.fragments.shift();
16533
16434
  t.startSN = t.fragments[0].sn, t.startCC = t.fragments[0].cc;
16534
16435
  } else
16535
- t.canSkipDateRanges && (t.dateRanges = ST(i.dateRanges, t.dateRanges, t.recentlyRemovedDateranges));
16436
+ t.canSkipDateRanges && (t.dateRanges = wT(i.dateRanges, t.dateRanges, t.recentlyRemovedDateranges));
16536
16437
  const c = t.fragments;
16537
16438
  if (n) {
16538
16439
  X.warn("discontinuity sliding from playlist, take drift into account");
16539
16440
  for (let f = 0; f < c.length; f++)
16540
16441
  c[f].cc += n;
16541
16442
  }
16542
- t.skippedSegments && (t.startCC = t.fragments[0].cc), RT(i.partList, t.partList, (f, p) => {
16443
+ t.skippedSegments && (t.startCC = t.fragments[0].cc), ST(i.partList, t.partList, (f, p) => {
16543
16444
  p.elementaryStreams = f.elementaryStreams, p.stats = f.stats;
16544
16445
  }), o ? E2(t, o, o.startPTS, o.endPTS, o.startDTS, o.endDTS) : A2(i, t), c.length && (t.totalduration = t.edge - c[0].start), t.driftStartTime = i.driftStartTime, t.driftStart = i.driftStart;
16545
16446
  const d = t.advancedDateTime;
@@ -16549,7 +16450,7 @@ function wT(i, t) {
16549
16450
  } else
16550
16451
  t.driftEndTime = i.driftEndTime, t.driftEnd = i.driftEnd, t.advancedDateTime = i.advancedDateTime;
16551
16452
  }
16552
- function ST(i, t, e) {
16453
+ function wT(i, t, e) {
16553
16454
  const r = ur({}, i);
16554
16455
  return e && e.forEach((n) => {
16555
16456
  delete r[n];
@@ -16558,7 +16459,7 @@ function ST(i, t, e) {
16558
16459
  o.isValid ? r[n] = o : X.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(t[n].attr)}"`);
16559
16460
  }), r;
16560
16461
  }
16561
- function RT(i, t, e) {
16462
+ function ST(i, t, e) {
16562
16463
  if (i && t) {
16563
16464
  let r = 0;
16564
16465
  for (let n = 0, o = i.length; n <= o; n++) {
@@ -16567,7 +16468,7 @@ function RT(i, t, e) {
16567
16468
  }
16568
16469
  }
16569
16470
  }
16570
- function _T(i, t, e) {
16471
+ function RT(i, t, e) {
16571
16472
  const r = t.skippedSegments, n = Math.max(i.startSN, t.startSN) - t.startSN, o = (i.fragmentHint ? 1 : 0) + (r ? t.endSN : Math.min(i.endSN, t.endSN)) - t.startSN, c = t.startSN - i.startSN, d = t.fragmentHint ? t.fragments.concat(t.fragmentHint) : t.fragments, f = i.fragmentHint ? i.fragments.concat(i.fragmentHint) : i.fragments;
16572
16473
  for (let p = n; p <= o; p++) {
16573
16474
  const g = f[c + p];
@@ -16587,7 +16488,7 @@ function ah(i, t) {
16587
16488
  i.fragmentHint && (i.fragmentHint.start += t);
16588
16489
  }
16589
16490
  }
16590
- function LT(i, t = 1 / 0) {
16491
+ function _T(i, t = 1 / 0) {
16591
16492
  let e = 1e3 * i.targetduration;
16592
16493
  if (i.updated) {
16593
16494
  const r = i.fragments, n = 4;
@@ -16599,7 +16500,7 @@ function LT(i, t = 1 / 0) {
16599
16500
  e /= 2;
16600
16501
  return Math.round(e);
16601
16502
  }
16602
- function CT(i, t, e) {
16503
+ function LT(i, t, e) {
16603
16504
  if (!(i != null && i.details))
16604
16505
  return null;
16605
16506
  const r = i.details;
@@ -16644,9 +16545,9 @@ function Z0(i) {
16644
16545
  });
16645
16546
  }
16646
16547
  function ol(i, t, e, r) {
16647
- return !!i && t < i.maxNumRetry && (IT(r) || !!e);
16548
+ return !!i && t < i.maxNumRetry && (CT(r) || !!e);
16648
16549
  }
16649
- function IT(i) {
16550
+ function CT(i) {
16650
16551
  return i === 0 && navigator.onLine === !1 || !!i && (i < 400 || i > 499);
16651
16552
  }
16652
16553
  const k2 = {
@@ -16680,7 +16581,7 @@ const k2 = {
16680
16581
  return null;
16681
16582
  }
16682
16583
  };
16683
- function xT(i, t, e) {
16584
+ function IT(i, t, e) {
16684
16585
  if (t === null || !Array.isArray(i) || !i.length || !jt(t))
16685
16586
  return null;
16686
16587
  const r = i[0].programDateTime;
@@ -16692,7 +16593,7 @@ function xT(i, t, e) {
16692
16593
  e = e || 0;
16693
16594
  for (let o = 0; o < i.length; ++o) {
16694
16595
  const c = i[o];
16695
- if (DT(t, e, c))
16596
+ if (xT(t, e, c))
16696
16597
  return c;
16697
16598
  }
16698
16599
  return null;
@@ -16710,14 +16611,14 @@ function oh(i = 0, t = 0, e) {
16710
16611
  const r = Math.min(t, e.duration + (e.deltaPTS ? e.deltaPTS : 0));
16711
16612
  return e.start + e.duration - r <= i ? 1 : e.start - r > i && e.start ? -1 : 0;
16712
16613
  }
16713
- function DT(i, t, e) {
16614
+ function xT(i, t, e) {
16714
16615
  const r = Math.min(t, e.duration + (e.deltaPTS ? e.deltaPTS : 0)) * 1e3;
16715
16616
  return (e.endProgramDateTime || 0) - r > i;
16716
16617
  }
16717
- function PT(i, t) {
16618
+ function DT(i, t) {
16718
16619
  return k2.search(i, (e) => e.cc < t ? 1 : e.cc > t ? -1 : 0);
16719
16620
  }
16720
- const OT = 3e5;
16621
+ const PT = 3e5;
16721
16622
  var Mr = {
16722
16623
  DoNothing: 0,
16723
16624
  SendEndCallback: 1,
@@ -16731,7 +16632,7 @@ var Mr = {
16731
16632
  MoveAllAlternatesMatchingHDCP: 2,
16732
16633
  SwitchToSDR: 4
16733
16634
  };
16734
- class $T {
16635
+ class OT {
16735
16636
  constructor(t) {
16736
16637
  this.hls = void 0, this.playlistError = 0, this.penalizedRenditions = {}, this.log = void 0, this.warn = void 0, this.error = void 0, this.hls = t, this.log = X.log.bind(X, "[info]:"), this.warn = X.warn.bind(X, "[warning]:"), this.error = X.error.bind(X, "[error]:"), this.registerListeners();
16737
16638
  }
@@ -16968,7 +16869,7 @@ class $T {
16968
16869
  o.urlId === d && (!t.frag || o.details) && this.penalizeRendition(o, t);
16969
16870
  for (let f = 1; f < c; f++) {
16970
16871
  const p = (d + f) % c, g = r[p];
16971
- if (!g || MT(g, t, r[d]))
16872
+ if (!g || $T(g, t, r[d]))
16972
16873
  return this.warn(`Switching to Redundant Stream ${p + 1}/${c}: "${o.url[p]}" after ${t.details}`), this.playlistError = 0, e.levels.forEach((y) => {
16973
16874
  y.urlId = p;
16974
16875
  }), e.nextLoadLevel = n, !0;
@@ -16986,8 +16887,8 @@ class $T {
16986
16887
  n.lastErrorPerfMs = performance.now(), n.errors.push(e), n.details = t.details, r[t.urlId] = n;
16987
16888
  }
16988
16889
  }
16989
- function MT(i, t, e) {
16990
- if (performance.now() - i.lastErrorPerfMs > OT)
16890
+ function $T(i, t, e) {
16891
+ if (performance.now() - i.lastErrorPerfMs > PT)
16991
16892
  return !0;
16992
16893
  const r = i.details;
16993
16894
  if (t.details === ut.FRAG_GAP && r && t.frag) {
@@ -17062,7 +16963,7 @@ class jh {
17062
16963
  stats: o
17063
16964
  } = e, c = self.performance.now(), d = o.loading.first ? Math.max(0, c - o.loading.first) : 0;
17064
16965
  if (n.advancedDateTime = Date.now() - d, n.live || r != null && r.live) {
17065
- if (n.reloaded(r), r && this.log(`live playlist ${t} ${n.advanced ? "REFRESHED " + n.lastPartSn + "-" + n.lastPartIndex : n.updated ? "UPDATED" : "MISSED"}`), r && n.fragments.length > 0 && wT(r, n), !this.canLoad || !n.live)
16966
+ if (n.reloaded(r), r && this.log(`live playlist ${t} ${n.advanced ? "REFRESHED " + n.lastPartSn + "-" + n.lastPartIndex : n.updated ? "UPDATED" : "MISSED"}`), r && n.fragments.length > 0 && kT(r, n), !this.canLoad || !n.live)
17066
16967
  return;
17067
16968
  let f, p, g;
17068
16969
  if (n.canBlockReload && n.endSN && n.advanced) {
@@ -17089,7 +16990,7 @@ class jh {
17089
16990
  }
17090
16991
  } else
17091
16992
  (n.canBlockReload || n.canSkipUntil) && (f = this.getDeliveryDirectives(n, e.deliveryDirectives, p, g));
17092
- const y = this.hls.mainForwardBufferInfo, E = y ? y.end - y.len : 0, A = (n.edge - E) * 1e3, T = LT(n, A);
16993
+ const y = this.hls.mainForwardBufferInfo, E = y ? y.end - y.len : 0, A = (n.edge - E) * 1e3, T = _T(n, A);
17093
16994
  n.updated && c > this.requestScheduled + T && (this.requestScheduled = o.loading.start), p !== void 0 && n.canBlockReload ? this.requestScheduled = o.loading.first + T - (n.partTarget * 1e3 || 1e3) : this.requestScheduled === -1 || this.requestScheduled + T < c ? this.requestScheduled = c : this.requestScheduled - c <= 0 && (this.requestScheduled += T);
17094
16995
  let w = this.requestScheduled - c;
17095
16996
  w = Math.max(0, w), this.log(`reload live playlist ${t} in ${Math.round(w)} ms`), this.timer = self.setTimeout(() => this.loadPlaylist(f), w);
@@ -17097,7 +16998,7 @@ class jh {
17097
16998
  this.clearTimer();
17098
16999
  }
17099
17000
  getDeliveryDirectives(t, e, r, n) {
17100
- let o = kT(t, r);
17001
+ let o = TT(t, r);
17101
17002
  return e != null && e.skip && t.deltaUpdateFailed && (r = e.msn, n = e.part, o = La.No), new z0(r, n, o);
17102
17003
  }
17103
17004
  checkRetry(t) {
@@ -17122,7 +17023,7 @@ class jh {
17122
17023
  }
17123
17024
  }
17124
17025
  let Ac;
17125
- class NT extends jh {
17026
+ class MT extends jh {
17126
17027
  constructor(t, e) {
17127
17028
  super(t, "[level-controller]"), this._levels = [], this._firstLevel = -1, this._startLevel = void 0, this.currentLevel = null, this.currentLevelIndex = -1, this.manualLevelIndex = -1, this.steering = void 0, this.onParsedComplete = void 0, this.steering = e, this._registerListeners();
17128
17029
  }
@@ -17394,7 +17295,7 @@ var br = {
17394
17295
  PARTIAL: "PARTIAL",
17395
17296
  OK: "OK"
17396
17297
  };
17397
- class FT {
17298
+ class NT {
17398
17299
  constructor(t) {
17399
17300
  this.activePartLists = /* @__PURE__ */ Object.create(null), this.endListFragments = /* @__PURE__ */ Object.create(null), this.fragments = /* @__PURE__ */ Object.create(null), this.timeRanges = /* @__PURE__ */ Object.create(null), this.bufferPadding = 0.2, this.hls = void 0, this.hasGaps = !1, this.hls = t, this._registerListeners();
17400
17301
  }
@@ -17643,7 +17544,7 @@ function Ln(i) {
17643
17544
  return `${i.type}_${i.level}_${i.urlId}_${i.sn}`;
17644
17545
  }
17645
17546
  const Q0 = Math.pow(2, 17);
17646
- class UT {
17547
+ class FT {
17647
17548
  constructor(t) {
17648
17549
  this.config = void 0, this.loader = null, this.partLoadTimeout = -1, this.config = t;
17649
17550
  }
@@ -17861,7 +17762,7 @@ class ls extends Error {
17861
17762
  super(t.error.message), this.data = void 0, this.data = t;
17862
17763
  }
17863
17764
  }
17864
- class BT {
17765
+ class UT {
17865
17766
  constructor(t) {
17866
17767
  this.config = void 0, this.keyUriToKeyInfo = {}, this.emeController = null, this.config = t;
17867
17768
  }
@@ -18034,7 +17935,7 @@ class BT {
18034
17935
  e.keyLoader === o && (e.keyLoader = null, r.loader = null), delete this.keyUriToKeyInfo[n], o && o.destroy();
18035
17936
  }
18036
17937
  }
18037
- class GT {
17938
+ class BT {
18038
17939
  constructor() {
18039
17940
  this._boundTick = void 0, this._tickTimer = null, this._tickInterval = null, this._tickCallCount = 0, this._boundTick = this.tick.bind(this);
18040
17941
  }
@@ -18089,7 +17990,7 @@ class GT {
18089
17990
  doTick() {
18090
17991
  }
18091
17992
  }
18092
- const HT = {
17993
+ const GT = {
18093
17994
  length: 0,
18094
17995
  start: () => 0,
18095
17996
  end: () => 0
@@ -18172,7 +18073,7 @@ class Ke {
18172
18073
  try {
18173
18074
  return t.buffered;
18174
18075
  } catch (e) {
18175
- return X.log("failed to get media.buffered", e), HT;
18076
+ return X.log("failed to get media.buffered", e), GT;
18176
18077
  }
18177
18078
  }
18178
18079
  }
@@ -18204,10 +18105,10 @@ function w2(i, t) {
18204
18105
  }
18205
18106
  return e;
18206
18107
  }
18207
- function VT(i, t, e) {
18108
+ function HT(i, t, e) {
18208
18109
  return !!(t.details && (e.endCC > e.startCC || i && i.cc < e.startCC));
18209
18110
  }
18210
- function WT(i, t, e = 0) {
18111
+ function VT(i, t, e = 0) {
18211
18112
  const r = i.fragments, n = t.fragments;
18212
18113
  if (!n.length || !r.length) {
18213
18114
  X.log("No fragments to align");
@@ -18232,16 +18133,16 @@ function zh(i, t) {
18232
18133
  ef(e[r], i);
18233
18134
  t.fragmentHint && ef(t.fragmentHint, i), t.alignedSliding = !0;
18234
18135
  }
18235
- function jT(i, t, e) {
18236
- t && (KT(i, e, t), !e.alignedSliding && t.details && zT(e, t.details), !e.alignedSliding && t.details && !e.skippedSegments && A2(t.details, e));
18136
+ function WT(i, t, e) {
18137
+ t && (jT(i, e, t), !e.alignedSliding && t.details && KT(e, t.details), !e.alignedSliding && t.details && !e.skippedSegments && A2(t.details, e));
18237
18138
  }
18238
- function KT(i, t, e) {
18239
- if (VT(i, e, t)) {
18240
- const r = WT(e.details, t);
18139
+ function jT(i, t, e) {
18140
+ if (HT(i, e, t)) {
18141
+ const r = VT(e.details, t);
18241
18142
  r && jt(r.start) && (X.log(`Adjusting PTS using last level due to CC increase within current level ${t.url}`), zh(r.start, t));
18242
18143
  }
18243
18144
  }
18244
- function zT(i, t) {
18145
+ function KT(i, t) {
18245
18146
  if (!t.fragments.length || !i.hasProgramDateTime || !t.hasProgramDateTime)
18246
18147
  return;
18247
18148
  const e = t.fragments[0].programDateTime, r = i.fragments[0].programDateTime, n = (r - e) / 1e3 + t.fragments[0].start;
@@ -18259,7 +18160,7 @@ function S2(i, t) {
18259
18160
  const p = (f - d) / 1e3 - (c.start - o.start);
18260
18161
  zh(p, i);
18261
18162
  }
18262
- class YT {
18163
+ class zT {
18263
18164
  constructor(t, e) {
18264
18165
  this.subtle = void 0, this.aesIV = void 0, this.subtle = t, this.aesIV = e;
18265
18166
  }
@@ -18270,7 +18171,7 @@ class YT {
18270
18171
  }, e, t);
18271
18172
  }
18272
18173
  }
18273
- class XT {
18174
+ class YT {
18274
18175
  constructor(t, e) {
18275
18176
  this.subtle = void 0, this.key = void 0, this.subtle = t, this.key = e;
18276
18177
  }
@@ -18280,11 +18181,11 @@ class XT {
18280
18181
  }, !1, ["encrypt", "decrypt"]);
18281
18182
  }
18282
18183
  }
18283
- function ZT(i) {
18184
+ function XT(i) {
18284
18185
  const t = i.byteLength, e = t && new DataView(i.buffer).getUint8(t - 1);
18285
18186
  return e ? hn(i, 0, t - e) : i;
18286
18187
  }
18287
- class qT {
18188
+ class ZT {
18288
18189
  constructor() {
18289
18190
  this.rcon = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], this.subMix = [new Uint32Array(256), new Uint32Array(256), new Uint32Array(256), new Uint32Array(256)], this.invSubMix = [new Uint32Array(256), new Uint32Array(256), new Uint32Array(256), new Uint32Array(256)], this.sBox = new Uint32Array(256), this.invSBox = new Uint32Array(256), this.key = new Uint32Array(0), this.ksRows = 0, this.keySize = 0, this.keySchedule = void 0, this.invKeySchedule = void 0, this.initTable();
18290
18191
  }
@@ -18351,7 +18252,7 @@ class qT {
18351
18252
  return M.buffer;
18352
18253
  }
18353
18254
  }
18354
- const QT = 16;
18255
+ const qT = 16;
18355
18256
  class Yh {
18356
18257
  constructor(t, {
18357
18258
  removePKCS7Padding: e = !0
@@ -18378,7 +18279,7 @@ class Yh {
18378
18279
  if (!t || e)
18379
18280
  return this.reset(), null;
18380
18281
  const r = new Uint8Array(t);
18381
- return this.reset(), this.removePKCS7Padding ? ZT(r) : r;
18282
+ return this.reset(), this.removePKCS7Padding ? XT(r) : r;
18382
18283
  }
18383
18284
  reset() {
18384
18285
  this.currentResult = null, this.currentIV = null, this.remainderData = null, this.softwareDecrypter && (this.softwareDecrypter = null);
@@ -18404,13 +18305,13 @@ class Yh {
18404
18305
  return null;
18405
18306
  n && (r = n);
18406
18307
  let f = this.softwareDecrypter;
18407
- f || (f = this.softwareDecrypter = new qT()), f.expandKey(e);
18308
+ f || (f = this.softwareDecrypter = new ZT()), f.expandKey(e);
18408
18309
  const p = o;
18409
18310
  return this.currentResult = f.decrypt(d.buffer, 0, r), this.currentIV = hn(d, -16).buffer, p || null;
18410
18311
  }
18411
18312
  webCryptoDecrypt(t, e, r) {
18412
18313
  const n = this.subtle;
18413
- return (this.key !== e || !this.fastAesKey) && (this.key = e, this.fastAesKey = new XT(n, e)), this.fastAesKey.expandKey().then((o) => n ? (this.logOnce("WebCrypto AES decrypt"), new YT(n, new Uint8Array(r)).decrypt(t.buffer, o)) : Promise.reject(new Error("web crypto not initialized"))).catch((o) => (X.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${o.name}: ${o.message}`), this.onWebCryptoError(t, e, r)));
18314
+ return (this.key !== e || !this.fastAesKey) && (this.key = e, this.fastAesKey = new YT(n, e)), this.fastAesKey.expandKey().then((o) => n ? (this.logOnce("WebCrypto AES decrypt"), new zT(n, new Uint8Array(r)).decrypt(t.buffer, o)) : Promise.reject(new Error("web crypto not initialized"))).catch((o) => (X.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${o.name}: ${o.message}`), this.onWebCryptoError(t, e, r)));
18414
18315
  }
18415
18316
  onWebCryptoError(t, e, r) {
18416
18317
  this.useSoftware = !0, this.logEnabled = !0, this.softwareDecrypt(t, e, r);
@@ -18421,14 +18322,14 @@ class Yh {
18421
18322
  }
18422
18323
  getValidChunk(t) {
18423
18324
  let e = t;
18424
- const r = t.length - t.length % QT;
18325
+ const r = t.length - t.length % qT;
18425
18326
  return r !== t.length && (e = hn(t, 0, r), this.remainderData = hn(t, r)), e;
18426
18327
  }
18427
18328
  logOnce(t) {
18428
18329
  this.logEnabled && (X.log(`[decrypter]: ${t}`), this.logEnabled = !1);
18429
18330
  }
18430
18331
  }
18431
- const JT = {
18332
+ const QT = {
18432
18333
  toString: function(i) {
18433
18334
  let t = "";
18434
18335
  const e = i.length;
@@ -18450,9 +18351,9 @@ const JT = {
18450
18351
  WAITING_INIT_PTS: "WAITING_INIT_PTS",
18451
18352
  WAITING_LEVEL: "WAITING_LEVEL"
18452
18353
  };
18453
- class Xh extends GT {
18354
+ class Xh extends BT {
18454
18355
  constructor(t, e, r, n, o) {
18455
- super(), this.hls = void 0, this.fragPrevious = null, this.fragCurrent = null, this.fragmentTracker = void 0, this.transmuxer = null, this._state = Rt.STOPPED, this.playlistType = void 0, this.media = null, this.mediaBuffer = null, this.config = void 0, this.bitrateTest = !1, this.lastCurrentTime = 0, this.nextLoadPosition = 0, this.startPosition = 0, this.startTimeOffset = null, this.loadedmetadata = !1, this.retryDate = 0, this.levels = null, this.fragmentLoader = void 0, this.keyLoader = void 0, this.levelLastLoaded = null, this.startFragRequested = !1, this.decrypter = void 0, this.initPTS = [], this.onvseeking = null, this.onvended = null, this.logPrefix = "", this.log = void 0, this.warn = void 0, this.playlistType = o, this.logPrefix = n, this.log = X.log.bind(X, `${n}:`), this.warn = X.warn.bind(X, `${n}:`), this.hls = t, this.fragmentLoader = new UT(t.config), this.keyLoader = r, this.fragmentTracker = e, this.config = t.config, this.decrypter = new Yh(t.config), t.on(R.MANIFEST_LOADED, this.onManifestLoaded, this);
18356
+ super(), this.hls = void 0, this.fragPrevious = null, this.fragCurrent = null, this.fragmentTracker = void 0, this.transmuxer = null, this._state = Rt.STOPPED, this.playlistType = void 0, this.media = null, this.mediaBuffer = null, this.config = void 0, this.bitrateTest = !1, this.lastCurrentTime = 0, this.nextLoadPosition = 0, this.startPosition = 0, this.startTimeOffset = null, this.loadedmetadata = !1, this.retryDate = 0, this.levels = null, this.fragmentLoader = void 0, this.keyLoader = void 0, this.levelLastLoaded = null, this.startFragRequested = !1, this.decrypter = void 0, this.initPTS = [], this.onvseeking = null, this.onvended = null, this.logPrefix = "", this.log = void 0, this.warn = void 0, this.playlistType = o, this.logPrefix = n, this.log = X.log.bind(X, `${n}:`), this.warn = X.warn.bind(X, `${n}:`), this.hls = t, this.fragmentLoader = new FT(t.config), this.keyLoader = r, this.fragmentTracker = e, this.config = t.config, this.decrypter = new Yh(t.config), t.on(R.MANIFEST_LOADED, this.onManifestLoaded, this);
18456
18357
  }
18457
18358
  doTick() {
18458
18359
  this.onTickEnd();
@@ -18650,7 +18551,7 @@ class Xh extends GT {
18650
18551
  fragBufferedComplete(t, e) {
18651
18552
  var r, n, o, c;
18652
18553
  const d = this.mediaBuffer ? this.mediaBuffer : this.media;
18653
- this.log(`Buffered ${t.type} sn: ${t.sn}${e ? " part: " + e.index : ""} of ${this.playlistType === te.MAIN ? "level" : "track"} ${t.level} (frag:[${((r = t.startPTS) != null ? r : NaN).toFixed(3)}-${((n = t.endPTS) != null ? n : NaN).toFixed(3)}] > buffer:${d ? JT.toString(Ke.getBuffered(d)) : "(detached)"})`), this.state = Rt.IDLE, d && (!this.loadedmetadata && t.type == te.MAIN && d.buffered.length && ((o = this.fragCurrent) == null ? void 0 : o.sn) === ((c = this.fragPrevious) == null ? void 0 : c.sn) && (this.loadedmetadata = !0, this.seekToStartPos()), this.tick());
18554
+ this.log(`Buffered ${t.type} sn: ${t.sn}${e ? " part: " + e.index : ""} of ${this.playlistType === te.MAIN ? "level" : "track"} ${t.level} (frag:[${((r = t.startPTS) != null ? r : NaN).toFixed(3)}-${((n = t.endPTS) != null ? n : NaN).toFixed(3)}] > buffer:${d ? QT.toString(Ke.getBuffered(d)) : "(detached)"})`), this.state = Rt.IDLE, d && (!this.loadedmetadata && t.type == te.MAIN && d.buffered.length && ((o = this.fragCurrent) == null ? void 0 : o.sn) === ((c = this.fragPrevious) == null ? void 0 : c.sn) && (this.loadedmetadata = !0, this.seekToStartPos()), this.tick());
18654
18555
  }
18655
18556
  seekToStartPos() {
18656
18557
  }
@@ -18767,7 +18668,7 @@ class Xh extends GT {
18767
18668
  } = t;
18768
18669
  if (!(e != null && e[n]))
18769
18670
  return this.warn(`Levels object was unset while buffering fragment ${o} of level ${n}. The current chunk will not be buffered.`), null;
18770
- const d = e[n], f = c > -1 ? Y0(d, o, c) : null, p = f ? f.fragment : CT(d, o, r);
18671
+ const d = e[n], f = c > -1 ? Y0(d, o, c) : null, p = f ? f.fragment : LT(d, o, r);
18771
18672
  return p ? (r && r !== p && (p.stats = r.stats), {
18772
18673
  frag: p,
18773
18674
  part: f,
@@ -18905,13 +18806,13 @@ class Xh extends GT {
18905
18806
  const r = this.fragPrevious;
18906
18807
  let n = null;
18907
18808
  if (r) {
18908
- if (t.hasProgramDateTime && (this.log(`Live playlist, switching playlist, load frag with same PDT: ${r.programDateTime}`), n = xT(e, r.endProgramDateTime, this.config.maxFragLookUpTolerance)), !n) {
18809
+ if (t.hasProgramDateTime && (this.log(`Live playlist, switching playlist, load frag with same PDT: ${r.programDateTime}`), n = IT(e, r.endProgramDateTime, this.config.maxFragLookUpTolerance)), !n) {
18909
18810
  const o = r.sn + 1;
18910
18811
  if (o >= t.startSN && o <= t.endSN) {
18911
18812
  const c = e[o - t.startSN];
18912
18813
  r.cc === c.cc && (n = c, this.log(`Live playlist, switching playlist, load frag with next SN: ${n.sn}`));
18913
18814
  }
18914
- n || (n = PT(e, r.cc), n && this.log(`Live playlist, switching playlist, load frag with same CC: ${n.sn}`));
18815
+ n || (n = DT(e, r.cc), n && this.log(`Live playlist, switching playlist, load frag with same CC: ${n.sn}`));
18915
18816
  }
18916
18817
  } else {
18917
18818
  const o = this.hls.liveSyncPosition;
@@ -18974,7 +18875,7 @@ class Xh extends GT {
18974
18875
  return this.warn("No fragments in live playlist"), 0;
18975
18876
  const f = t.fragments[0].start, p = !e, g = t.alignedSliding && jt(f);
18976
18877
  if (p || !g && !f) {
18977
- jT(o, c, t);
18878
+ WT(o, c, t);
18978
18879
  const y = t.fragments[0].start;
18979
18880
  return this.log(`Live playlist sliding: ${y.toFixed(2)} start-sn: ${e ? e.startSN : "na"}->${t.startSN} prev-sn: ${o ? o.sn : "na"} fragments: ${d}`), y;
18980
18881
  }
@@ -19133,22 +19034,22 @@ class Xh extends GT {
19133
19034
  function R2() {
19134
19035
  return self.SourceBuffer || self.WebKitSourceBuffer;
19135
19036
  }
19136
- function tk() {
19037
+ function JT() {
19137
19038
  const i = Al();
19138
19039
  if (!i)
19139
19040
  return !1;
19140
19041
  const t = R2(), e = i && typeof i.isTypeSupported == "function" && i.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'), r = !t || t.prototype && typeof t.prototype.appendBuffer == "function" && typeof t.prototype.remove == "function";
19141
19042
  return !!e && !!r;
19142
19043
  }
19143
- function ek() {
19044
+ function tk() {
19144
19045
  var i;
19145
19046
  const t = R2();
19146
19047
  return typeof (t == null || (i = t.prototype) == null ? void 0 : i.changeType) == "function";
19147
19048
  }
19148
- function rk() {
19049
+ function ek() {
19149
19050
  return typeof __HLS_WORKER_BUNDLE__ == "function";
19150
19051
  }
19151
- function ik() {
19052
+ function rk() {
19152
19053
  const i = new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`], {
19153
19054
  type: "text/javascript"
19154
19055
  }), t = self.URL.createObjectURL(i);
@@ -19157,7 +19058,7 @@ function ik() {
19157
19058
  objectURL: t
19158
19059
  };
19159
19060
  }
19160
- function sk(i) {
19061
+ function ik(i) {
19161
19062
  const t = new self.URL(i, self.location.href).href;
19162
19063
  return {
19163
19064
  worker: new self.Worker(t),
@@ -19205,8 +19106,8 @@ class _2 {
19205
19106
  demux(t, e) {
19206
19107
  this.cachedData && (t = gn(this.cachedData, t), this.cachedData = null);
19207
19108
  let r = sl(t, 0), n = r ? r.length : 0, o;
19208
- const c = this._audioTrack, d = this._id3Track, f = r ? BA(r) : void 0, p = t.length;
19209
- for ((this.basePTS === null || this.frameIndex === 0 && jt(f)) && (this.basePTS = nk(f, e, this.initPTS), this.lastPTS = this.basePTS), this.lastPTS === null && (this.lastPTS = this.basePTS), r && r.length > 0 && d.samples.push({
19109
+ const c = this._audioTrack, d = this._id3Track, f = r ? UA(r) : void 0, p = t.length;
19110
+ for ((this.basePTS === null || this.frameIndex === 0 && jt(f)) && (this.basePTS = sk(f, e, this.initPTS), this.lastPTS = this.basePTS), this.lastPTS === null && (this.lastPTS = this.basePTS), r && r.length > 0 && d.samples.push({
19210
19111
  pts: this.lastPTS,
19211
19112
  dts: this.lastPTS,
19212
19113
  data: r,
@@ -19217,7 +19118,7 @@ class _2 {
19217
19118
  const g = this.appendFrame(c, t, n);
19218
19119
  g ? (this.frameIndex++, this.lastPTS = g.sample.pts, n += g.length, o = n) : n = p;
19219
19120
  } else
19220
- UA(t, n) ? (r = sl(t, n), d.samples.push({
19121
+ FA(t, n) ? (r = sl(t, n), d.samples.push({
19221
19122
  pts: this.lastPTS,
19222
19123
  dts: this.lastPTS,
19223
19124
  data: r,
@@ -19251,13 +19152,13 @@ class _2 {
19251
19152
  destroy() {
19252
19153
  }
19253
19154
  }
19254
- const nk = (i, t, e) => {
19155
+ const sk = (i, t, e) => {
19255
19156
  if (jt(i))
19256
19157
  return i * 90;
19257
19158
  const r = e ? e.baseTime * 9e4 / e.timescale : 0;
19258
19159
  return t * 9e4 + r;
19259
19160
  };
19260
- function ak(i, t, e, r) {
19161
+ function nk(i, t, e, r) {
19261
19162
  let n, o, c, d;
19262
19163
  const f = navigator.userAgent.toLowerCase(), p = r, g = [96e3, 88200, 64e3, 48e3, 44100, 32e3, 24e3, 22050, 16e3, 12e3, 11025, 8e3, 7350];
19263
19164
  n = ((t[e + 2] & 192) >>> 6) + 1;
@@ -19288,16 +19189,16 @@ function C2(i, t) {
19288
19189
  function Zh(i, t) {
19289
19190
  return (i[t + 3] & 3) << 11 | i[t + 4] << 3 | (i[t + 5] & 224) >>> 5;
19290
19191
  }
19291
- function ok(i, t) {
19192
+ function ak(i, t) {
19292
19193
  return t + 5 < i.length;
19293
19194
  }
19294
19195
  function cl(i, t) {
19295
19196
  return t + 1 < i.length && L2(i, t);
19296
19197
  }
19297
- function lk(i, t) {
19298
- return ok(i, t) && L2(i, t) && Zh(i, t) <= i.length - t;
19198
+ function ok(i, t) {
19199
+ return ak(i, t) && L2(i, t) && Zh(i, t) <= i.length - t;
19299
19200
  }
19300
- function ck(i, t) {
19201
+ function lk(i, t) {
19301
19202
  if (cl(i, t)) {
19302
19203
  const e = C2(i, t);
19303
19204
  if (t + e >= i.length)
@@ -19312,7 +19213,7 @@ function ck(i, t) {
19312
19213
  }
19313
19214
  function I2(i, t, e, r, n) {
19314
19215
  if (!i.samplerate) {
19315
- const o = ak(t, e, r, n);
19216
+ const o = nk(t, e, r, n);
19316
19217
  if (!o)
19317
19218
  return;
19318
19219
  i.config = o.config, i.samplerate = o.samplerate, i.channelCount = o.channelCount, i.codec = o.codec, i.manifestCodec = o.manifestCodec, X.log(`parsed codec:${i.codec}, rate:${o.samplerate}, channels:${o.channelCount}`);
@@ -19321,7 +19222,7 @@ function I2(i, t, e, r, n) {
19321
19222
  function x2(i) {
19322
19223
  return 1024 * 9e4 / i;
19323
19224
  }
19324
- function hk(i, t) {
19225
+ function ck(i, t) {
19325
19226
  const e = C2(i, t);
19326
19227
  if (t + e <= i.length) {
19327
19228
  const r = Zh(i, t) - e;
@@ -19333,7 +19234,7 @@ function hk(i, t) {
19333
19234
  }
19334
19235
  }
19335
19236
  function D2(i, t, e, r, n) {
19336
- const o = x2(i.samplerate), c = r + n * o, d = hk(t, e);
19237
+ const o = x2(i.samplerate), c = r + n * o, d = ck(t, e);
19337
19238
  let f;
19338
19239
  if (d) {
19339
19240
  const {
@@ -19361,7 +19262,7 @@ function D2(i, t, e, r, n) {
19361
19262
  missing: -1
19362
19263
  };
19363
19264
  }
19364
- class dk extends _2 {
19265
+ class hk extends _2 {
19365
19266
  constructor(t, e) {
19366
19267
  super(), this.observer = void 0, this.config = void 0, this.observer = t, this.config = e;
19367
19268
  }
@@ -19386,12 +19287,12 @@ class dk extends _2 {
19386
19287
  return !1;
19387
19288
  let e = (sl(t, 0) || []).length;
19388
19289
  for (let r = t.length; e < r; e++)
19389
- if (ck(t, e))
19290
+ if (lk(t, e))
19390
19291
  return X.log("ADTS sync word found !"), !0;
19391
19292
  return !1;
19392
19293
  }
19393
19294
  canParse(t, e) {
19394
- return lk(t, e);
19295
+ return ok(t, e);
19395
19296
  }
19396
19297
  appendFrame(t, e, r) {
19397
19298
  I2(t, this.observer, e, r, t.manifestCodec);
@@ -19400,8 +19301,8 @@ class dk extends _2 {
19400
19301
  return n;
19401
19302
  }
19402
19303
  }
19403
- const uk = /\/emsg[-/]ID3/i;
19404
- class fk {
19304
+ const dk = /\/emsg[-/]ID3/i;
19305
+ class uk {
19405
19306
  constructor(t, e) {
19406
19307
  this.remainderData = null, this.timeOffset = 0, this.config = void 0, this.videoTrack = void 0, this.audioTrack = void 0, this.id3Track = void 0, this.txtTrack = void 0, this.config = e;
19407
19308
  }
@@ -19442,7 +19343,7 @@ class fk {
19442
19343
  const n = this.videoTrack, o = this.txtTrack;
19443
19344
  if (this.config.progressive) {
19444
19345
  this.remainderData && (r = gn(this.remainderData, t));
19445
- const d = eT(r);
19346
+ const d = tT(r);
19446
19347
  this.remainderData = d.remainder, n.samples = d.valid || new Uint8Array();
19447
19348
  } else
19448
19349
  n.samples = r;
@@ -19470,8 +19371,8 @@ class fk {
19470
19371
  if (t.samples.length) {
19471
19372
  const n = Te(t.samples, ["emsg"]);
19472
19373
  n && n.forEach((o) => {
19473
- const c = sT(o);
19474
- if (uk.test(c.schemeIdUri)) {
19374
+ const c = iT(o);
19375
+ if (dk.test(c.schemeIdUri)) {
19475
19376
  const d = jt(c.presentationTime) ? c.presentationTime / c.timeScale : e + c.presentationTimeDelta / c.timeScale;
19476
19377
  let f = c.eventDuration === 4294967295 ? Number.POSITIVE_INFINITY : c.eventDuration / c.timeScale;
19477
19378
  f <= 1e-3 && (f = Number.POSITIVE_INFINITY);
@@ -19496,7 +19397,7 @@ class fk {
19496
19397
  }
19497
19398
  }
19498
19399
  let To = null;
19499
- const pk = [32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160], gk = [44100, 48e3, 32e3, 22050, 24e3, 16e3, 11025, 12e3, 8e3], mk = [
19400
+ const fk = [32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160], pk = [44100, 48e3, 32e3, 22050, 24e3, 16e3, 11025, 12e3, 8e3], gk = [
19500
19401
  // MPEG 2.5
19501
19402
  [
19502
19403
  0,
@@ -19541,7 +19442,7 @@ const pk = [32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, 3
19541
19442
  12
19542
19443
  // Layer1
19543
19444
  ]
19544
- ], vk = [
19445
+ ], mk = [
19545
19446
  0,
19546
19447
  // Reserved
19547
19448
  1,
@@ -19571,7 +19472,7 @@ function P2(i, t, e, r, n) {
19571
19472
  function O2(i, t) {
19572
19473
  const e = i[t + 1] >> 3 & 3, r = i[t + 1] >> 1 & 3, n = i[t + 2] >> 4 & 15, o = i[t + 2] >> 2 & 3;
19573
19474
  if (e !== 1 && n !== 0 && n !== 15 && o !== 3) {
19574
- const c = i[t + 2] >> 1 & 1, d = i[t + 3] >> 6, f = e === 3 ? 3 - r : r === 3 ? 3 : 4, p = pk[f * 14 + n - 1] * 1e3, g = gk[(e === 3 ? 0 : e === 2 ? 1 : 2) * 3 + o], y = d === 3 ? 1 : 2, E = mk[e][r], A = vk[r], T = E * 8 * A, w = Math.floor(E * p / g + c) * A;
19475
+ const c = i[t + 2] >> 1 & 1, d = i[t + 3] >> 6, f = e === 3 ? 3 - r : r === 3 ? 3 : 4, p = fk[f * 14 + n - 1] * 1e3, g = pk[(e === 3 ? 0 : e === 2 ? 1 : 2) * 3 + o], y = d === 3 ? 1 : 2, E = gk[e][r], A = mk[r], T = E * 8 * A, w = Math.floor(E * p / g + c) * A;
19575
19476
  if (To === null) {
19576
19477
  const C = (navigator.userAgent || "").match(/Chrome\/(\d+)/i);
19577
19478
  To = C ? parseInt(C[1]) : 0;
@@ -19590,10 +19491,10 @@ function qh(i, t) {
19590
19491
  function $2(i, t) {
19591
19492
  return t + 1 < i.length && qh(i, t);
19592
19493
  }
19593
- function yk(i, t) {
19494
+ function vk(i, t) {
19594
19495
  return qh(i, t) && 4 <= i.length - t;
19595
19496
  }
19596
- function bk(i, t) {
19497
+ function yk(i, t) {
19597
19498
  if (t + 1 < i.length && qh(i, t)) {
19598
19499
  const e = O2(i, t);
19599
19500
  let r = 4;
@@ -19781,7 +19682,7 @@ class rf {
19781
19682
  return this.readUByte(), this.readUEG(), this.readUEG();
19782
19683
  }
19783
19684
  }
19784
- class Ek {
19685
+ class bk {
19785
19686
  constructor(t, e, r) {
19786
19687
  this.keyData = void 0, this.decrypter = void 0, this.keyData = r, this.decrypter = new Yh(e, {
19787
19688
  removePKCS7Padding: !1
@@ -19965,11 +19866,11 @@ class Ds {
19965
19866
  }), w && (w.data.push(t.subarray(kt, G + $r)), w.size += G + $r - kt);
19966
19867
  break;
19967
19868
  case 0:
19968
- at && (kt += t[kt] + 1), M = this._pmtId = Ak(t, kt);
19869
+ at && (kt += t[kt] + 1), M = this._pmtId = Ek(t, kt);
19969
19870
  break;
19970
19871
  case M: {
19971
19872
  at && (kt += t[kt] + 1);
19972
- const ft = Tk(t, kt, this.typeSupported, r);
19873
+ const ft = Ak(t, kt, this.typeSupported, r);
19973
19874
  g = ft.avc, g > 0 && (c.pid = g), E = ft.audio, E > 0 && (d.pid = E, d.segmentCodec = ft.segmentCodec), A = ft.id3, A > 0 && (f.pid = A), C !== null && !P && (X.warn(`MPEG-TS PMT found at ${G} after unknown PID '${C}'. Backtracking to sync byte @${x} to parse all TS packets.`), C = null, G = x - 188), P = this.pmtParsed = !0;
19974
19875
  break;
19975
19876
  }
@@ -20037,7 +19938,7 @@ class Ds {
20037
19938
  f && (p = Cn(f)) ? (this.parseID3PES(n, p), n.pesData = null) : n.pesData = f;
20038
19939
  }
20039
19940
  demuxSampleAes(t, e, r) {
20040
- const n = this.demux(t, r, !0, !this.config.progressive), o = this.sampleAes = new Ek(this.observer, this.config, e);
19941
+ const n = this.demux(t, r, !0, !this.config.progressive), o = this.sampleAes = new bk(this.observer, this.config, e);
20041
19942
  return this.decrypt(n, o);
20042
19943
  }
20043
19944
  decrypt(t, e) {
@@ -20272,10 +20173,10 @@ function ko(i, t, e, r) {
20272
20173
  function lh(i, t) {
20273
20174
  return ((i[t + 1] & 31) << 8) + i[t + 2];
20274
20175
  }
20275
- function Ak(i, t) {
20176
+ function Ek(i, t) {
20276
20177
  return (i[t + 10] & 31) << 8 | i[t + 11];
20277
20178
  }
20278
- function Tk(i, t, e, r) {
20179
+ function Ak(i, t, e, r) {
20279
20180
  const n = {
20280
20181
  audio: -1,
20281
20182
  avc: -1,
@@ -20379,7 +20280,7 @@ function ha(i, t) {
20379
20280
  }
20380
20281
  i.debug.length && X.log(i.pts + "/" + i.dts + ":" + i.debug);
20381
20282
  }
20382
- class kk extends _2 {
20283
+ class Tk extends _2 {
20383
20284
  resetInitSegment(t, e, r, n) {
20384
20285
  super.resetInitSegment(t, e, r, n), this._audioTrack = {
20385
20286
  container: "audio/mpeg",
@@ -20400,12 +20301,12 @@ class kk extends _2 {
20400
20301
  return !1;
20401
20302
  let e = (sl(t, 0) || []).length;
20402
20303
  for (let r = t.length; e < r; e++)
20403
- if (bk(t, e))
20304
+ if (yk(t, e))
20404
20305
  return X.log("MPEG Audio sync word found !"), !0;
20405
20306
  return !1;
20406
20307
  }
20407
20308
  canParse(t, e) {
20408
- return yk(t, e);
20309
+ return vk(t, e);
20409
20310
  }
20410
20311
  appendFrame(t, e, r) {
20411
20312
  if (this.basePTS !== null)
@@ -21477,16 +21378,16 @@ function Qh(i, t, e = 1, r = !1) {
21477
21378
  const n = i * t * e;
21478
21379
  return r ? Math.round(n) : n;
21479
21380
  }
21480
- function wk(i, t, e = 1, r = !1) {
21381
+ function kk(i, t, e = 1, r = !1) {
21481
21382
  return Qh(i, t, 1 / e, r);
21482
21383
  }
21483
21384
  function da(i, t = !1) {
21484
21385
  return Qh(i, 1e3, 1 / M2, t);
21485
21386
  }
21486
- function Sk(i, t = 1) {
21387
+ function wk(i, t = 1) {
21487
21388
  return Qh(i, M2, 1 / t);
21488
21389
  }
21489
- const Rk = 10 * 1e3, nf = 1024, _k = 1152;
21390
+ const Sk = 10 * 1e3, nf = 1024, Rk = 1152;
21490
21391
  let wo = null, Tc = null;
21491
21392
  class kc {
21492
21393
  constructor(t, e, r, n = "") {
@@ -21525,7 +21426,7 @@ class kc {
21525
21426
  this.ISGenerated || (y = this.generateIS(t, e, o, c));
21526
21427
  const z = this.isVideoContiguous;
21527
21428
  let G = -1, at;
21528
- if (O && (G = Lk(e.samples), !z && this.config.forceKeyFrameOnDiscontinuity))
21429
+ if (O && (G = _k(e.samples), !z && this.config.forceKeyFrameOnDiscontinuity))
21529
21430
  if (T = !0, G > 0) {
21530
21431
  X.warn(`[mp4-remuxer]: Dropped ${G} out of ${B} video samples due to a missing keyframe`);
21531
21432
  const st = this.getVideoStartPts(e.samples);
@@ -21716,7 +21617,7 @@ class kc {
21716
21617
  return t.samples = [], t.dropped = 0, bt;
21717
21618
  }
21718
21619
  remuxAudio(t, e, r, n, o) {
21719
- const c = t.inputTimeScale, d = t.samplerate ? t.samplerate : c, f = c / d, p = t.segmentCodec === "aac" ? nf : _k, g = p * f, y = this._initPTS, E = t.segmentCodec === "mp3" && this.typeSupported.mpeg, A = [], T = o !== void 0;
21620
+ const c = t.inputTimeScale, d = t.samplerate ? t.samplerate : c, f = c / d, p = t.segmentCodec === "aac" ? nf : Rk, g = p * f, y = this._initPTS, E = t.segmentCodec === "mp3" && this.typeSupported.mpeg, A = [], T = o !== void 0;
21720
21621
  let w = t.samples, C = E ? 0 : 8, P = this.nextAudioPts || -1;
21721
21622
  const M = e * c, B = y.baseTime * c / y.timescale;
21722
21623
  if (this.isAudioContiguous = r = r || w.length && P > 0 && (n && Math.abs(M - P) < 9e3 || Math.abs(bi(w[0].pts - B, M) - P) < 20 * g), w.forEach(function(F) {
@@ -21732,7 +21633,7 @@ class kc {
21732
21633
  const N = w[j], U = N.pts, Z = U - bt, gt = Math.abs(1e3 * Z / c);
21733
21634
  if (Z <= -F * g && T)
21734
21635
  j === 0 && (X.warn(`Audio frame @ ${(U / c).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3 * Z / c)} ms.`), this.nextAudioPts = P = bt = U);
21735
- else if (Z >= F * g && gt < Rk && T) {
21636
+ else if (Z >= F * g && gt < Sk && T) {
21736
21637
  let vt = Math.round(Z / g);
21737
21638
  bt = U - vt * g, bt < 0 && (vt--, bt += g), j === 0 && (this.nextAudioPts = P = bt), X.warn(`[mp4-remuxer]: Injecting ${vt} audio frame @ ${(bt / c).toFixed(3)}s due to ${Math.round(1e3 * Z / c)} ms gap.`);
21738
21639
  for (let It = 0; It < vt; It++) {
@@ -21827,7 +21728,7 @@ function bi(i, t) {
21827
21728
  i += e;
21828
21729
  return i;
21829
21730
  }
21830
- function Lk(i) {
21731
+ function _k(i) {
21831
21732
  for (let t = 0; t < i.length; t++)
21832
21733
  if (i[t].key)
21833
21734
  return t;
@@ -21864,15 +21765,15 @@ function F2(i, t, e) {
21864
21765
  }
21865
21766
  class af {
21866
21767
  constructor(t, e, r, n) {
21867
- this.size = void 0, this.duration = void 0, this.cts = void 0, this.flags = void 0, this.duration = e, this.size = r, this.cts = n, this.flags = new Ck(t);
21768
+ this.size = void 0, this.duration = void 0, this.cts = void 0, this.flags = void 0, this.duration = e, this.size = r, this.cts = n, this.flags = new Lk(t);
21868
21769
  }
21869
21770
  }
21870
- class Ck {
21771
+ class Lk {
21871
21772
  constructor(t) {
21872
21773
  this.isLeading = 0, this.isDependedOn = 0, this.hasRedundancy = 0, this.degradPrio = 0, this.dependsOn = 1, this.isNonSync = 1, this.dependsOn = t ? 2 : 1, this.isNonSync = t ? 0 : 1;
21873
21774
  }
21874
21775
  }
21875
- class Ik {
21776
+ class Ck {
21876
21777
  constructor() {
21877
21778
  this.emitInitSegment = !1, this.audioCodec = void 0, this.videoCodec = void 0, this.initData = void 0, this.initPTS = null, this.initTracks = void 0, this.lastEndTime = null;
21878
21779
  }
@@ -21885,7 +21786,7 @@ class Ik {
21885
21786
  this.lastEndTime = null;
21886
21787
  }
21887
21788
  resetInitSegment(t, e, r, n) {
21888
- this.audioCodec = e, this.videoCodec = r, this.generateInitSegment(ZA(t, n)), this.emitInitSegment = !0;
21789
+ this.audioCodec = e, this.videoCodec = r, this.generateInitSegment(XA(t, n)), this.emitInitSegment = !0;
21889
21790
  }
21890
21791
  generateInitSegment(t) {
21891
21792
  let {
@@ -21941,13 +21842,13 @@ class Ik {
21941
21842
  if ((d = T) != null && d.length || (this.generateInitSegment(E), T = this.initData), !((f = T) != null && f.length))
21942
21843
  return X.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."), y;
21943
21844
  this.emitInitSegment && (A.tracks = this.initTracks, this.emitInitSegment = !1);
21944
- const w = QA(E, T), C = qA(T, E), P = C === null ? o : C;
21945
- (xk(p, P, o, w) || A.timescale !== p.timescale && c) && (A.initPTS = P - o, p && p.timescale === 1 && X.warn(`Adjusting initPTS by ${A.initPTS - p.baseTime}`), this.initPTS = p = {
21845
+ const w = qA(E, T), C = ZA(T, E), P = C === null ? o : C;
21846
+ (Ik(p, P, o, w) || A.timescale !== p.timescale && c) && (A.initPTS = P - o, p && p.timescale === 1 && X.warn(`Adjusting initPTS by ${A.initPTS - p.baseTime}`), this.initPTS = p = {
21946
21847
  baseTime: A.initPTS,
21947
21848
  timescale: 1
21948
21849
  });
21949
21850
  const M = t ? P - p.baseTime / p.timescale : g, B = M + w;
21950
- tT(T, E, p.baseTime / p.timescale), w > 0 ? this.lastEndTime = B : (X.warn("Duration parsed from mp4 should be greater than zero"), this.resetNextTimestamp());
21851
+ JA(T, E, p.baseTime / p.timescale), w > 0 ? this.lastEndTime = B : (X.warn("Duration parsed from mp4 should be greater than zero"), this.resetNextTimestamp());
21951
21852
  const x = !!T.audio, O = !!T.video;
21952
21853
  let z = "";
21953
21854
  x && (z += "audio"), O && (z += "video");
@@ -21966,7 +21867,7 @@ class Ik {
21966
21867
  return y.audio = G.type === "audio" ? G : void 0, y.video = G.type !== "audio" ? G : void 0, y.initSegment = A, y.id3 = N2(r, o, p, p), n.samples.length && (y.text = F2(n, o, p)), y;
21967
21868
  }
21968
21869
  }
21969
- function xk(i, t, e, r) {
21870
+ function Ik(i, t, e, r) {
21970
21871
  if (i === null)
21971
21872
  return !0;
21972
21873
  const n = Math.max(r, 1), o = t - i.baseTime / i.timescale;
@@ -21983,16 +21884,16 @@ try {
21983
21884
  X.debug("Unable to use Performance API on this environment"), cs = typeof self < "u" && self.Date.now;
21984
21885
  }
21985
21886
  const wc = [{
21986
- demux: fk,
21987
- remux: Ik
21887
+ demux: uk,
21888
+ remux: Ck
21988
21889
  }, {
21989
21890
  demux: Ds,
21990
21891
  remux: kc
21991
21892
  }, {
21992
- demux: dk,
21893
+ demux: hk,
21993
21894
  remux: kc
21994
21895
  }, {
21995
- demux: kk,
21896
+ demux: Tk,
21996
21897
  remux: kc
21997
21898
  }];
21998
21899
  class lf {
@@ -22024,7 +21925,7 @@ class lf {
22024
21925
  defaultInitPts: P,
22025
21926
  duration: M,
22026
21927
  initSegmentData: B
22027
- } = f, x = Dk(c, e);
21928
+ } = f, x = xk(c, e);
22028
21929
  if (x && x.method === "AES-128") {
22029
21930
  const at = this.getDecrypter();
22030
21931
  if (at.isSync()) {
@@ -22170,7 +22071,7 @@ class lf {
22170
22071
  return t || (t = this.decrypter = new Yh(this.config)), t;
22171
22072
  }
22172
22073
  }
22173
- function Dk(i, t) {
22074
+ function xk(i, t) {
22174
22075
  let e = null;
22175
22076
  return i.byteLength > 0 && t != null && t.key != null && t.iv !== null && t.method != null && (e = t), e;
22176
22077
  }
@@ -22181,12 +22082,12 @@ const Sc = (i) => ({
22181
22082
  function Bo(i) {
22182
22083
  return "then" in i && i.then instanceof Function;
22183
22084
  }
22184
- class Pk {
22085
+ class Dk {
22185
22086
  constructor(t, e, r, n, o) {
22186
22087
  this.audioCodec = void 0, this.videoCodec = void 0, this.initSegmentData = void 0, this.duration = void 0, this.defaultInitPts = void 0, this.audioCodec = t, this.videoCodec = e, this.initSegmentData = r, this.duration = n, this.defaultInitPts = o || null;
22187
22088
  }
22188
22089
  }
22189
- class Ok {
22090
+ class Pk {
22190
22091
  constructor(t, e, r, n, o, c) {
22191
22092
  this.discontinuity = void 0, this.contiguous = void 0, this.accurateTimeOffset = void 0, this.trackSwitch = void 0, this.timeOffset = void 0, this.initSegmentChange = void 0, this.discontinuity = t, this.contiguous = e, this.accurateTimeOffset = r, this.trackSwitch = n, this.timeOffset = o, this.initSegmentChange = c;
22192
22093
  }
@@ -22302,7 +22203,7 @@ var U2 = { exports: {} };
22302
22203
  return f ? (p = e ? e + f : f, this._events[p] && c(this, p)) : (this._events = new r(), this._eventsCount = 0), this;
22303
22204
  }, d.prototype.off = d.prototype.removeListener, d.prototype.addListener = d.prototype.on, d.prefixed = e, d.EventEmitter = d, i.exports = d;
22304
22205
  })(U2);
22305
- var $k = U2.exports, Jh = /* @__PURE__ */ EA($k);
22206
+ var Ok = U2.exports, Jh = /* @__PURE__ */ bA(Ok);
22306
22207
  const Rc = Al() || {
22307
22208
  isTypeSupported: () => !1
22308
22209
  };
@@ -22320,9 +22221,9 @@ class B2 {
22320
22221
  mpeg: Rc.isTypeSupported("audio/mpeg"),
22321
22222
  mp3: Rc.isTypeSupported('audio/mp4; codecs="mp3"')
22322
22223
  }, f = navigator.vendor;
22323
- if (this.useWorker && typeof Worker < "u" && (o.workerPath || rk())) {
22224
+ if (this.useWorker && typeof Worker < "u" && (o.workerPath || ek())) {
22324
22225
  try {
22325
- o.workerPath ? (X.log(`loading Web Worker ${o.workerPath} for "${e}"`), this.workerContext = sk(o.workerPath)) : (X.log(`injecting Web Worker for "${e}"`), this.workerContext = ik()), this.onwmsg = (g) => this.onWorkerMessage(g);
22226
+ o.workerPath ? (X.log(`loading Web Worker ${o.workerPath} for "${e}"`), this.workerContext = ik(o.workerPath)) : (X.log(`injecting Web Worker for "${e}"`), this.workerContext = rk()), this.onwmsg = (g) => this.onWorkerMessage(g);
22326
22227
  const {
22327
22228
  worker: p
22328
22229
  } = this.workerContext;
@@ -22375,7 +22276,7 @@ class B2 {
22375
22276
  transmuxer: A
22376
22277
  } = this, T = c ? c.start : o.start, w = o.decryptdata, C = this.frag, P = !(C && o.cc === C.cc), M = !(C && p.level === C.level), B = C ? p.sn - C.sn : -1, x = this.part ? p.part - this.part.index : -1, O = B === 0 && p.id > 1 && p.id === (C == null ? void 0 : C.stats.chunkCount), z = !M && (B === 1 || B === 0 && (x === 1 || O && x <= 0)), G = self.performance.now();
22377
22278
  (M || B || o.stats.parsing.start === 0) && (o.stats.parsing.start = G), c && (x || !z) && (c.stats.parsing.start = G);
22378
- const at = !(C && ((y = o.initSegment) == null ? void 0 : y.url) === ((E = C.initSegment) == null ? void 0 : E.url)), st = new Ok(P, z, f, M, T, at);
22279
+ const at = !(C && ((y = o.initSegment) == null ? void 0 : y.url) === ((E = C.initSegment) == null ? void 0 : E.url)), st = new Pk(P, z, f, M, T, at);
22379
22280
  if (!z || P || at) {
22380
22281
  X.log(`[transmuxer-interface, ${o.type}]: Starting new transmux session for sn: ${p.sn} p: ${p.part} level: ${p.level} id: ${p.id}
22381
22282
  discontinuity: ${P}
@@ -22384,7 +22285,7 @@ class B2 {
22384
22285
  accurateTimeOffset: ${f}
22385
22286
  timeOffset: ${T}
22386
22287
  initSegmentChange: ${at}`);
22387
- const J = new Pk(r, n, e, d, g);
22288
+ const J = new Dk(r, n, e, d, g);
22388
22289
  this.configureTransmuxer(J);
22389
22290
  }
22390
22291
  if (this.frag = o, this.part = c, this.workerContext)
@@ -22478,8 +22379,8 @@ class B2 {
22478
22379
  t.chunkMeta.transmuxing.end = self.performance.now(), this.onTransmuxComplete(t);
22479
22380
  }
22480
22381
  }
22481
- const Mk = 250, _c = 2, Nk = 0.1, Fk = 0.05;
22482
- class Uk {
22382
+ const $k = 250, _c = 2, Mk = 0.1, Nk = 0.05;
22383
+ class Fk {
22483
22384
  constructor(t, e, r, n) {
22484
22385
  this.config = void 0, this.media = null, this.fragmentTracker = void 0, this.hls = void 0, this.nudgeRetry = 0, this.stallReported = !1, this.stalled = null, this.moved = !1, this.seeking = !1, this.config = t, this.media = e, this.fragmentTracker = r, this.hls = n;
22485
22386
  }
@@ -22543,7 +22444,7 @@ class Uk {
22543
22444
  return;
22544
22445
  }
22545
22446
  const w = T - o;
22546
- if (!d && w >= Mk && (this._reportStall(g), !this.media))
22447
+ if (!d && w >= $k && (this._reportStall(g), !this.media))
22547
22448
  return;
22548
22449
  const C = Ke.bufferInfo(n, c, r.maxBufferHole);
22549
22450
  this._tryFixBufferStall(C, w);
@@ -22632,7 +22533,7 @@ class Uk {
22632
22533
  }
22633
22534
  }
22634
22535
  }
22635
- const y = Math.max(d + Fk, o + Nk);
22536
+ const y = Math.max(d + Nk, o + Mk);
22636
22537
  if (X.warn(`skipping hole, adjusting currentTime from ${o} to ${y}`), this.moved = !0, this.stalled = null, n.currentTime = y, t && !t.gap) {
22637
22538
  const E = new Error(`fragment loaded with buffer holes, seeking from ${o} to ${y}`);
22638
22539
  r.trigger(R.ERROR, {
@@ -22682,8 +22583,8 @@ class Uk {
22682
22583
  }
22683
22584
  }
22684
22585
  }
22685
- const Bk = 100;
22686
- class Gk extends Xh {
22586
+ const Uk = 100;
22587
+ class Bk extends Xh {
22687
22588
  constructor(t, e, r) {
22688
22589
  super(t, e, r, "[stream-controller]", te.MAIN), this.audioCodecSwap = !1, this.gapController = null, this.level = -1, this._forceStartLoad = !1, this.altAudio = !1, this.audioOnly = !1, this.fragPlaying = null, this.onvplaying = null, this.onvseeked = null, this.fragLastKbps = 0, this.couldBacktrack = !1, this.backtrackFragment = null, this.audioCodecSwitch = !1, this.videoBuffer = null, this._registerListeners();
22689
22590
  }
@@ -22708,7 +22609,7 @@ class Gk extends Xh {
22708
22609
  lastCurrentTime: e,
22709
22610
  hls: r
22710
22611
  } = this;
22711
- if (this.stopLoad(), this.setInterval(Bk), this.level = -1, !this.startFragRequested) {
22612
+ if (this.stopLoad(), this.setInterval(Uk), this.level = -1, !this.startFragRequested) {
22712
22613
  let n = r.startLevel;
22713
22614
  n === -1 && (r.config.testBandwidth && this.levels.length > 1 ? (n = 0, this.bitrateTest = !0) : n = r.nextAutoLevel), this.level = r.nextLoadLevel = n, this.loadedmetadata = !1;
22714
22615
  }
@@ -22874,7 +22775,7 @@ class Gk extends Xh {
22874
22775
  onMediaAttached(t, e) {
22875
22776
  super.onMediaAttached(t, e);
22876
22777
  const r = e.media;
22877
- this.onvplaying = this.onMediaPlaying.bind(this), this.onvseeked = this.onMediaSeeked.bind(this), r.addEventListener("playing", this.onvplaying), r.addEventListener("seeked", this.onvseeked), this.gapController = new Uk(this.config, r, this.fragmentTracker, this.hls);
22778
+ this.onvplaying = this.onMediaPlaying.bind(this), this.onvseeked = this.onMediaSeeked.bind(this), r.addEventListener("playing", this.onvplaying), r.addEventListener("seeked", this.onvseeked), this.gapController = new Fk(this.config, r, this.fragmentTracker, this.hls);
22878
22779
  }
22879
22780
  onMediaDetaching() {
22880
22781
  const {
@@ -22902,7 +22803,7 @@ class Gk extends Xh {
22902
22803
  let r = !1, n = !1, o;
22903
22804
  e.levels.forEach((c) => {
22904
22805
  o = c.audioCodec, o && (o.indexOf("mp4a.40.2") !== -1 && (r = !0), o.indexOf("mp4a.40.5") !== -1 && (n = !0));
22905
- }), this.audioCodecSwitch = r && n && !ek(), this.audioCodecSwitch && this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"), this.levels = e.levels, this.startFragRequested = !1;
22806
+ }), this.audioCodecSwitch = r && n && !tk(), this.audioCodecSwitch && this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"), this.levels = e.levels, this.startFragRequested = !1;
22906
22807
  }
22907
22808
  onLevelLoading(t, e) {
22908
22809
  const {
@@ -23328,7 +23229,7 @@ class In {
23328
23229
  return this.estimate_;
23329
23230
  }
23330
23231
  }
23331
- class Hk {
23232
+ class Gk {
23332
23233
  constructor(t, e, r, n = 100) {
23333
23234
  this.defaultEstimate_ = void 0, this.minWeight_ = void 0, this.minDelayMs_ = void 0, this.slow_ = void 0, this.fast_ = void 0, this.defaultTTFB_ = void 0, this.ttfb_ = void 0, this.defaultEstimate_ = r, this.minWeight_ = 1e-3, this.minDelayMs_ = 50, this.slow_ = new In(t), this.fast_ = new In(e), this.defaultTTFB_ = n, this.ttfb_ = new In(t);
23334
23235
  }
@@ -23361,11 +23262,11 @@ class Hk {
23361
23262
  destroy() {
23362
23263
  }
23363
23264
  }
23364
- class Vk {
23265
+ class Hk {
23365
23266
  constructor(t) {
23366
23267
  this.hls = void 0, this.lastLevelLoadSec = 0, this.lastLoadedFragLevel = 0, this._nextAutoLevel = -1, this.timer = -1, this.onCheck = this._abandonRulesCheck.bind(this), this.fragCurrent = null, this.partCurrent = null, this.bitrateTestDelay = 0, this.bwEstimator = void 0, this.hls = t;
23367
23268
  const e = t.config;
23368
- this.bwEstimator = new Hk(e.abrEwmaSlowVoD, e.abrEwmaFastVoD, e.abrEwmaDefaultEstimate), this.registerListeners();
23269
+ this.bwEstimator = new Gk(e.abrEwmaSlowVoD, e.abrEwmaFastVoD, e.abrEwmaDefaultEstimate), this.registerListeners();
23369
23270
  }
23370
23271
  registerListeners() {
23371
23272
  const {
@@ -23583,7 +23484,7 @@ class G2 {
23583
23484
  } = this;
23584
23485
  let r;
23585
23486
  if (t.length)
23586
- t.length === 1 ? r = t[0] : r = Wk(t, e);
23487
+ t.length === 1 ? r = t[0] : r = Vk(t, e);
23587
23488
  else
23588
23489
  return new Uint8Array(0);
23589
23490
  return this.reset(), r;
@@ -23592,7 +23493,7 @@ class G2 {
23592
23493
  this.chunks.length = 0, this.dataLength = 0;
23593
23494
  }
23594
23495
  }
23595
- function Wk(i, t) {
23496
+ function Vk(i, t) {
23596
23497
  const e = new Uint8Array(t);
23597
23498
  let r = 0;
23598
23499
  for (let n = 0; n < i.length; n++) {
@@ -23602,7 +23503,7 @@ function Wk(i, t) {
23602
23503
  return e;
23603
23504
  }
23604
23505
  const cf = 100;
23605
- class jk extends Xh {
23506
+ class Wk extends Xh {
23606
23507
  constructor(t, e, r) {
23607
23508
  super(t, e, r, "[audio-stream-controller]", te.AUDIO), this.videoBuffer = null, this.videoTrackCC = -1, this.waitingVideoCC = -1, this.bufferedTrack = null, this.switchingTrack = null, this.trackId = -1, this.waitingData = null, this.mainDetails = null, this.bufferFlushed = !1, this.cachedTrackLoadedData = null, this._registerListeners();
23608
23509
  }
@@ -24041,7 +23942,7 @@ class jk extends Xh {
24041
23942
  r && o && (o.CHANNELS !== c.CHANNELS || o.NAME !== c.NAME || o.LANGUAGE !== c.LANGUAGE) && (this.log("Switching audio track : flushing all audio"), super.flushMainBuffer(0, Number.POSITIVE_INFINITY, "audio")), this.bufferedTrack = t, this.switchingTrack = null, e.trigger(R.AUDIO_TRACK_SWITCHED, ei({}, t));
24042
23943
  }
24043
23944
  }
24044
- class Kk extends jh {
23945
+ class jk extends jh {
24045
23946
  constructor(t) {
24046
23947
  super(t, "[audio-track-controller]"), this.tracks = [], this.groupId = null, this.tracksInGroup = [], this.trackId = -1, this.currentTrack = null, this.selectDefaultTrack = !0, this.registerListeners();
24047
23948
  }
@@ -24179,16 +24080,16 @@ function H2(i, t) {
24179
24080
  if (i.length !== t.length)
24180
24081
  return !1;
24181
24082
  for (let e = 0; e < i.length; e++)
24182
- if (!zk(i[e].attrs, t[e].attrs))
24083
+ if (!Kk(i[e].attrs, t[e].attrs))
24183
24084
  return !1;
24184
24085
  return !0;
24185
24086
  }
24186
- function zk(i, t) {
24087
+ function Kk(i, t) {
24187
24088
  const e = i["STABLE-RENDITION-ID"];
24188
24089
  return e ? e === t["STABLE-RENDITION-ID"] : !["LANGUAGE", "NAME", "CHARACTERISTICS", "AUTOSELECT", "DEFAULT", "FORCED"].some((r) => i[r] !== t[r]);
24189
24090
  }
24190
24091
  const hf = 500;
24191
- class Yk extends Xh {
24092
+ class zk extends Xh {
24192
24093
  constructor(t, e, r) {
24193
24094
  super(t, e, r, "[subtitle-stream-controller]", te.SUBTITLE), this.levels = [], this.currentTrackId = -1, this.tracksBuffered = [], this.mainDetails = null, this._registerListeners();
24194
24095
  }
@@ -24399,10 +24300,10 @@ class Yk extends Xh {
24399
24300
  this.fragCurrent = t, t.sn === "initSegment" ? this._loadInitSegment(t, e) : (this.startFragRequested = !0, super.loadFragment(t, e, r));
24400
24301
  }
24401
24302
  get mediaBufferTimeRanges() {
24402
- return new Xk(this.tracksBuffered[this.currentTrackId] || []);
24303
+ return new Yk(this.tracksBuffered[this.currentTrackId] || []);
24403
24304
  }
24404
24305
  }
24405
- class Xk {
24306
+ class Yk {
24406
24307
  constructor(t) {
24407
24308
  this.buffered = void 0;
24408
24309
  const e = (r, n, o) => {
@@ -24423,7 +24324,7 @@ class Xk {
24423
24324
  };
24424
24325
  }
24425
24326
  }
24426
- class Zk extends jh {
24327
+ class Xk extends jh {
24427
24328
  constructor(t) {
24428
24329
  super(t, "[subtitle-track-controller]"), this.media = null, this.tracks = [], this.groupId = null, this.tracksInGroup = [], this.trackId = -1, this.selectDefaultTrack = !0, this.queuedDefaultTrack = -1, this.trackChangeListener = () => this.onTextTracksChanged(), this.asyncPollTrackChange = () => this.pollTrackChange(0), this.useTextTrackPolling = !1, this.subtitlePollingInterval = -1, this._subtitleDisplay = !0, this.registerListeners();
24429
24330
  }
@@ -24633,7 +24534,7 @@ function Lc(i) {
24633
24534
  }
24634
24535
  return t;
24635
24536
  }
24636
- class qk {
24537
+ class Zk {
24637
24538
  constructor(t) {
24638
24539
  this.buffers = void 0, this.queues = {
24639
24540
  video: [],
@@ -24685,7 +24586,7 @@ class qk {
24685
24586
  }
24686
24587
  }
24687
24588
  const df = Al(), uf = /([ha]vc.)(?:\.[^.,]+)+/;
24688
- class Qk {
24589
+ class qk {
24689
24590
  // The level details used to determine duration, target-duration and live
24690
24591
  // cache the self generated object url to detect hijack of video tag
24691
24592
  // A queue of buffer operations which require the SourceBuffer to not be updating upon execution
@@ -24736,7 +24637,7 @@ class Qk {
24736
24637
  t.off(R.MEDIA_ATTACHING, this.onMediaAttaching, this), t.off(R.MEDIA_DETACHING, this.onMediaDetaching, this), t.off(R.MANIFEST_LOADING, this.onManifestLoading, this), t.off(R.MANIFEST_PARSED, this.onManifestParsed, this), t.off(R.BUFFER_RESET, this.onBufferReset, this), t.off(R.BUFFER_APPENDING, this.onBufferAppending, this), t.off(R.BUFFER_CODECS, this.onBufferCodecs, this), t.off(R.BUFFER_EOS, this.onBufferEos, this), t.off(R.BUFFER_FLUSHING, this.onBufferFlushing, this), t.off(R.LEVEL_UPDATED, this.onLevelUpdated, this), t.off(R.FRAG_PARSED, this.onFragParsed, this), t.off(R.FRAG_CHANGED, this.onFragChanged, this);
24737
24638
  }
24738
24639
  _initSourceBuffer() {
24739
- this.sourceBuffer = {}, this.operationQueue = new qk(this.sourceBuffer), this.listeners = {
24640
+ this.sourceBuffer = {}, this.operationQueue = new Zk(this.sourceBuffer), this.listeners = {
24740
24641
  audio: [],
24741
24642
  video: [],
24742
24643
  audiovideo: []
@@ -25368,7 +25269,7 @@ const ff = {
25368
25269
  }, V2 = function(i) {
25369
25270
  let t = i;
25370
25271
  return ff.hasOwnProperty(i) && (t = ff[i]), String.fromCharCode(t);
25371
- }, Ci = 15, as = 100, Jk = {
25272
+ }, Ci = 15, as = 100, Qk = {
25372
25273
  17: 1,
25373
25274
  18: 3,
25374
25275
  21: 5,
@@ -25377,7 +25278,7 @@ const ff = {
25377
25278
  16: 11,
25378
25279
  19: 12,
25379
25280
  20: 14
25380
- }, t3 = {
25281
+ }, Jk = {
25381
25282
  17: 2,
25382
25283
  18: 4,
25383
25284
  21: 6,
@@ -25385,7 +25286,7 @@ const ff = {
25385
25286
  23: 10,
25386
25287
  19: 13,
25387
25288
  20: 15
25388
- }, e3 = {
25289
+ }, t3 = {
25389
25290
  25: 1,
25390
25291
  26: 3,
25391
25292
  29: 5,
@@ -25394,7 +25295,7 @@ const ff = {
25394
25295
  24: 11,
25395
25296
  27: 12,
25396
25297
  28: 14
25397
- }, r3 = {
25298
+ }, e3 = {
25398
25299
  25: 2,
25399
25300
  26: 4,
25400
25301
  29: 6,
@@ -25402,8 +25303,8 @@ const ff = {
25402
25303
  31: 10,
25403
25304
  27: 13,
25404
25305
  28: 15
25405
- }, i3 = ["white", "green", "blue", "cyan", "red", "yellow", "magenta", "black", "transparent"];
25406
- class s3 {
25306
+ }, r3 = ["white", "green", "blue", "cyan", "red", "yellow", "magenta", "black", "transparent"];
25307
+ class i3 {
25407
25308
  constructor() {
25408
25309
  this.time = null, this.verboseLevel = 0;
25409
25310
  }
@@ -25447,7 +25348,7 @@ class W2 {
25447
25348
  return "color=" + this.foreground + ", underline=" + this.underline + ", italics=" + this.italics + ", background=" + this.background + ", flash=" + this.flash;
25448
25349
  }
25449
25350
  }
25450
- class n3 {
25351
+ class s3 {
25451
25352
  constructor(t, e, r, n, o, c) {
25452
25353
  this.uchar = void 0, this.penState = void 0, this.uchar = t || " ", this.penState = new W2(e, r, n, o, c);
25453
25354
  }
@@ -25470,11 +25371,11 @@ class n3 {
25470
25371
  return this.uchar === " " && this.penState.isDefault();
25471
25372
  }
25472
25373
  }
25473
- class a3 {
25374
+ class n3 {
25474
25375
  constructor(t) {
25475
25376
  this.chars = void 0, this.pos = void 0, this.currPenState = void 0, this.cueStartTime = void 0, this.logger = void 0, this.chars = [];
25476
25377
  for (let e = 0; e < as; e++)
25477
- this.chars.push(new n3());
25378
+ this.chars.push(new s3());
25478
25379
  this.logger = t, this.pos = 0, this.currPenState = new W2();
25479
25380
  }
25480
25381
  equals(t) {
@@ -25558,7 +25459,7 @@ class Cc {
25558
25459
  constructor(t) {
25559
25460
  this.rows = void 0, this.currRow = void 0, this.nrRollUpRows = void 0, this.lastOutputScreen = void 0, this.logger = void 0, this.rows = [];
25560
25461
  for (let e = 0; e < Ci; e++)
25561
- this.rows.push(new a3(t));
25462
+ this.rows.push(new n3(t));
25562
25463
  this.logger = t, this.currRow = Ci - 1, this.nrRollUpRows = null, this.lastOutputScreen = null, this.reset();
25563
25464
  }
25564
25465
  reset() {
@@ -25774,7 +25675,7 @@ class pf {
25774
25675
  class gf {
25775
25676
  constructor(t, e, r) {
25776
25677
  this.channels = void 0, this.currentChannel = 0, this.cmdHistory = void 0, this.logger = void 0;
25777
- const n = new s3();
25678
+ const n = new i3();
25778
25679
  this.channels = [null, new pf(t, e, n), new pf(t + 1, r, n)], this.cmdHistory = vf(), this.logger = n;
25779
25680
  }
25780
25681
  getHandler(t) {
@@ -25838,7 +25739,7 @@ class gf {
25838
25739
  if (mf(t, e, n))
25839
25740
  return xn(null, null, n), !0;
25840
25741
  const d = t <= 23 ? 1 : 2;
25841
- e >= 64 && e <= 95 ? r = d === 1 ? Jk[t] : e3[t] : r = d === 1 ? t3[t] : r3[t];
25742
+ e >= 64 && e <= 95 ? r = d === 1 ? Qk[t] : t3[t] : r = d === 1 ? Jk[t] : e3[t];
25842
25743
  const f = this.channels[d];
25843
25744
  return f ? (f.setPAC(this.interpretPAC(r, e)), xn(t, e, n), this.currentChannel = d, !0) : !1;
25844
25745
  }
@@ -25884,7 +25785,7 @@ class gf {
25884
25785
  return !1;
25885
25786
  let o;
25886
25787
  const c = {};
25887
- t === 16 || t === 24 ? (o = Math.floor((e - 32) / 2), c.background = i3[o], e % 2 === 1 && (c.background = c.background + "_semi")) : e === 45 ? c.background = "transparent" : (c.foreground = "black", e === 47 && (c.underline = !0));
25788
+ t === 16 || t === 24 ? (o = Math.floor((e - 32) / 2), c.background = r3[o], e % 2 === 1 && (c.background = c.background + "_semi")) : e === 45 ? c.background = "transparent" : (c.foreground = "black", e === 47 && (c.underline = !0));
25888
25789
  const d = t <= 23 ? 1 : 2;
25889
25790
  return this.channels[d].setBkgData(c), xn(t, e, this.cmdHistory), !0;
25890
25791
  }
@@ -26091,7 +25992,7 @@ var td = function() {
26091
25992
  return self.WebVTT.convertCueToDOMTree(self, this.text);
26092
25993
  }, c;
26093
25994
  }();
26094
- class o3 {
25995
+ class a3 {
26095
25996
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
26096
25997
  decode(t, e) {
26097
25998
  if (!t)
@@ -26108,7 +26009,7 @@ function j2(i) {
26108
26009
  const e = i.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);
26109
26010
  return e ? parseFloat(e[2]) > 59 ? t(e[2], e[3], 0, e[4]) : t(e[1], e[2], e[3], e[4]) : null;
26110
26011
  }
26111
- class l3 {
26012
+ class o3 {
26112
26013
  constructor() {
26113
26014
  this.values = /* @__PURE__ */ Object.create(null);
26114
26015
  }
@@ -26163,7 +26064,7 @@ function K2(i, t, e, r) {
26163
26064
  }
26164
26065
  }
26165
26066
  const ch = new td(0, 0, ""), Ro = ch.align === "middle" ? "middle" : "center";
26166
- function c3(i, t, e) {
26067
+ function l3(i, t, e) {
26167
26068
  const r = i;
26168
26069
  function n() {
26169
26070
  const d = j2(i);
@@ -26172,7 +26073,7 @@ function c3(i, t, e) {
26172
26073
  return i = i.replace(/^[^\sa-zA-Z-]+/, ""), d;
26173
26074
  }
26174
26075
  function o(d, f) {
26175
- const p = new l3();
26076
+ const p = new o3();
26176
26077
  K2(d, function(E, A) {
26177
26078
  let T;
26178
26079
  switch (E) {
@@ -26216,9 +26117,9 @@ function z2(i) {
26216
26117
  return i.replace(/<br(?: \/)?>/gi, `
26217
26118
  `);
26218
26119
  }
26219
- class h3 {
26120
+ class c3 {
26220
26121
  constructor() {
26221
- this.state = "INITIAL", this.buffer = "", this.decoder = new o3(), this.regionList = [], this.cue = null, this.oncue = void 0, this.onparsingerror = void 0, this.onflush = void 0;
26122
+ this.state = "INITIAL", this.buffer = "", this.decoder = new a3(), this.regionList = [], this.cue = null, this.oncue = void 0, this.onparsingerror = void 0, this.onflush = void 0;
26222
26123
  }
26223
26124
  parse(t) {
26224
26125
  const e = this;
@@ -26277,7 +26178,7 @@ class h3 {
26277
26178
  continue;
26278
26179
  }
26279
26180
  try {
26280
- c3(o, e.cue, e.regionList);
26181
+ l3(o, e.cue, e.regionList);
26281
26182
  } catch {
26282
26183
  e.cue = null, e.state = "BADCUE";
26283
26184
  continue;
@@ -26319,9 +26220,9 @@ class h3 {
26319
26220
  return t.onflush && t.onflush(), this;
26320
26221
  }
26321
26222
  }
26322
- const d3 = /\r\n|\n\r|\n|\r/g, Ic = function(i, t, e = 0) {
26223
+ const h3 = /\r\n|\n\r|\n|\r/g, Ic = function(i, t, e = 0) {
26323
26224
  return i.slice(e, e + t.length) === t;
26324
- }, u3 = function(i) {
26225
+ }, d3 = function(i) {
26325
26226
  let t = parseInt(i.slice(-3));
26326
26227
  const e = parseInt(i.slice(-6, -4)), r = parseInt(i.slice(-9, -7)), n = i.length > 9 ? parseInt(i.substring(0, i.indexOf(":"))) : 0;
26327
26228
  if (!jt(t) || !jt(e) || !jt(r) || !jt(n))
@@ -26336,7 +26237,7 @@ const d3 = /\r\n|\n\r|\n|\r/g, Ic = function(i, t, e = 0) {
26336
26237
  function ed(i, t, e) {
26337
26238
  return xc(i.toString()) + xc(t.toString()) + xc(e);
26338
26239
  }
26339
- const f3 = function(i, t, e) {
26240
+ const u3 = function(i, t, e) {
26340
26241
  let r = i[t], n = i[r.prevCC];
26341
26242
  if (!n || !n.new && r.new) {
26342
26243
  i.ccOffset = i.presentationOffset = r.start, r.new = !1;
@@ -26348,16 +26249,16 @@ const f3 = function(i, t, e) {
26348
26249
  }
26349
26250
  i.presentationOffset = e;
26350
26251
  };
26351
- function p3(i, t, e, r, n, o, c) {
26352
- const d = new h3(), f = Xi(new Uint8Array(i)).trim().replace(d3, `
26252
+ function f3(i, t, e, r, n, o, c) {
26253
+ const d = new c3(), f = Xi(new Uint8Array(i)).trim().replace(h3, `
26353
26254
  `).split(`
26354
- `), p = [], g = t ? Sk(t.baseTime, t.timescale) : 0;
26255
+ `), p = [], g = t ? wk(t.baseTime, t.timescale) : 0;
26355
26256
  let y = "00:00.000", E = 0, A = 0, T, w = !0;
26356
26257
  d.oncue = function(C) {
26357
26258
  const P = e[r];
26358
26259
  let M = e.ccOffset;
26359
26260
  const B = (E - g) / 9e4;
26360
- if (P != null && P.new && (A !== void 0 ? M = e.ccOffset = P.start : f3(e, r, B)), B) {
26261
+ if (P != null && P.new && (A !== void 0 ? M = e.ccOffset = P.start : u3(e, r, B)), B) {
26361
26262
  if (!t) {
26362
26263
  T = new Error("Missing initPTS for VTT MPEGTS");
26363
26264
  return;
@@ -26383,7 +26284,7 @@ function p3(i, t, e, r, n, o, c) {
26383
26284
  Ic(P, "LOCAL:") ? y = P.slice(6) : Ic(P, "MPEGTS:") && (E = parseInt(P.slice(7)));
26384
26285
  });
26385
26286
  try {
26386
- A = u3(y) / 1e3;
26287
+ A = d3(y) / 1e3;
26387
26288
  } catch (P) {
26388
26289
  T = P;
26389
26290
  }
@@ -26394,7 +26295,7 @@ function p3(i, t, e, r, n, o, c) {
26394
26295
  `);
26395
26296
  }), d.flush();
26396
26297
  }
26397
- const Dc = "stpp.ttml.im1t", Y2 = /^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/, X2 = /^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/, g3 = {
26298
+ const Dc = "stpp.ttml.im1t", Y2 = /^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/, X2 = /^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/, p3 = {
26398
26299
  left: "start",
26399
26300
  center: "center",
26400
26301
  right: "end",
@@ -26407,14 +26308,14 @@ function yf(i, t, e, r) {
26407
26308
  r(new Error("Could not parse IMSC1 mdat"));
26408
26309
  return;
26409
26310
  }
26410
- const o = n.map((d) => Xi(d)), c = wk(t.baseTime, 1, t.timescale);
26311
+ const o = n.map((d) => Xi(d)), c = kk(t.baseTime, 1, t.timescale);
26411
26312
  try {
26412
- o.forEach((d) => e(m3(d, c)));
26313
+ o.forEach((d) => e(g3(d, c)));
26413
26314
  } catch (d) {
26414
26315
  r(d);
26415
26316
  }
26416
26317
  }
26417
- function m3(i, t) {
26318
+ function g3(i, t) {
26418
26319
  const e = new DOMParser().parseFromString(i, "text/xml").getElementsByTagName("tt")[0];
26419
26320
  if (!e)
26420
26321
  throw new Error("Invalid ttml");
@@ -26439,11 +26340,11 @@ function m3(i, t) {
26439
26340
  }
26440
26341
  const T = new td(y - t, A - t, g);
26441
26342
  T.id = ed(T.startTime, T.endTime, T.text);
26442
- const w = d[p.getAttribute("region")], C = c[p.getAttribute("style")], P = v3(w, C, c), {
26343
+ const w = d[p.getAttribute("region")], C = c[p.getAttribute("style")], P = m3(w, C, c), {
26443
26344
  textAlign: M
26444
26345
  } = P;
26445
26346
  if (M) {
26446
- const B = g3[M];
26347
+ const B = p3[M];
26447
26348
  B && (T.lineAlign = B), T.align = M;
26448
26349
  }
26449
26350
  return ur(T, P), T;
@@ -26466,7 +26367,7 @@ function Z2(i, t) {
26466
26367
  ` : (o = r.childNodes) != null && o.length ? Z2(r, t) : t ? e + r.textContent.trim().replace(/\s+/g, " ") : e + r.textContent;
26467
26368
  }, "");
26468
26369
  }
26469
- function v3(i, t, e) {
26370
+ function m3(i, t, e) {
26470
26371
  const r = "http://www.w3.org/ns/ttml#styling";
26471
26372
  let n = null;
26472
26373
  const o = [
@@ -26498,13 +26399,13 @@ function $c(i, t) {
26498
26399
  if (!i)
26499
26400
  return null;
26500
26401
  let e = j2(i);
26501
- return e === null && (Y2.test(i) ? e = y3(i, t) : X2.test(i) && (e = b3(i, t))), e;
26402
+ return e === null && (Y2.test(i) ? e = v3(i, t) : X2.test(i) && (e = y3(i, t))), e;
26502
26403
  }
26503
- function y3(i, t) {
26404
+ function v3(i, t) {
26504
26405
  const e = Y2.exec(i), r = (e[4] | 0) + (e[5] | 0) / t.subFrameRate;
26505
26406
  return (e[1] | 0) * 3600 + (e[2] | 0) * 60 + (e[3] | 0) + r / t.frameRate;
26506
26407
  }
26507
- function b3(i, t) {
26408
+ function y3(i, t) {
26508
26409
  const e = X2.exec(i), r = Number(e[1]);
26509
26410
  switch (e[2]) {
26510
26411
  case "h":
@@ -26520,7 +26421,7 @@ function b3(i, t) {
26520
26421
  }
26521
26422
  return r;
26522
26423
  }
26523
- class E3 {
26424
+ class b3 {
26524
26425
  constructor(t) {
26525
26426
  if (this.hls = void 0, this.media = null, this.config = void 0, this.enabled = !0, this.Cues = void 0, this.textTracks = [], this.tracks = [], this.initPTS = [], this.unparsedVttFrags = [], this.captionsTracks = {}, this.nonNativeCaptionsTracks = {}, this.cea608Parser1 = void 0, this.cea608Parser2 = void 0, this.lastSn = -1, this.lastPartIndex = -1, this.prevCC = -1, this.vttCCs = Af(), this.captionsProperties = void 0, this.hls = t, this.config = t.config, this.Cues = t.config.cueHandler, this.captionsProperties = {
26526
26427
  textTrack1: {
@@ -26554,7 +26455,7 @@ class E3 {
26554
26455
  addCues(t, e, r, n, o) {
26555
26456
  let c = !1;
26556
26457
  for (let d = o.length; d--; ) {
26557
- const f = o[d], p = T3(f[0], f[1], e, r);
26458
+ const f = o[d], p = A3(f[0], f[1], e, r);
26558
26459
  if (p >= 0 && (f[0] = Math.min(f[0], e), f[1] = Math.max(f[1], r), c = !0, p / (r - e) > 0.5))
26559
26460
  return;
26560
26461
  }
@@ -26681,7 +26582,7 @@ class E3 {
26681
26582
  if (o && d < o.length) {
26682
26583
  let p = null;
26683
26584
  for (let g = 0; g < o.length; g++)
26684
- if (A3(o[g], c)) {
26585
+ if (E3(o[g], c)) {
26685
26586
  p = o[g];
26686
26587
  break;
26687
26588
  }
@@ -26794,7 +26695,7 @@ class E3 {
26794
26695
  return;
26795
26696
  }
26796
26697
  const f = this.hls, p = (e = r.initSegment) != null && e.data ? gn(r.initSegment.data, new Uint8Array(n)) : n;
26797
- p3(p, this.initPTS[r.cc], this.vttCCs, r.cc, r.start, (g) => {
26698
+ f3(p, this.initPTS[r.cc], this.vttCCs, r.cc, r.start, (g) => {
26798
26699
  this._appendCues(g, r.level), f.trigger(R.SUBTITLE_FRAG_PROCESSED, {
26799
26700
  success: !0,
26800
26701
  frag: r
@@ -26901,10 +26802,10 @@ class E3 {
26901
26802
  return e;
26902
26803
  }
26903
26804
  }
26904
- function A3(i, t) {
26805
+ function E3(i, t) {
26905
26806
  return !!i && i.label === t.name && !(i.textTrack1 || i.textTrack2);
26906
26807
  }
26907
- function T3(i, t, e, r) {
26808
+ function A3(i, t, e, r) {
26908
26809
  return Math.min(t, r) - Math.max(i, e);
26909
26810
  }
26910
26811
  function Af() {
@@ -27034,7 +26935,7 @@ class rd {
27034
26935
  return o;
27035
26936
  }
27036
26937
  }
27037
- class k3 {
26938
+ class T3 {
27038
26939
  // stream controller must be provided as a dependency!
27039
26940
  constructor(t) {
27040
26941
  this.hls = void 0, this.isVideoPlaybackQualityAvailable = !1, this.timer = void 0, this.media = null, this.lastTime = void 0, this.lastDroppedFrames = 0, this.lastDecodedFrames = 0, this.streamController = void 0, this.hls = t, this.registerListeners();
@@ -27154,7 +27055,7 @@ class Mn {
27154
27055
  return r(t, e);
27155
27056
  }
27156
27057
  getMediaKeysPromise(t, e, r) {
27157
- const n = NA(t, e, r, this.config.drmSystemOptions), o = this.keySystemAccessPromises[t];
27058
+ const n = MA(t, e, r, this.config.drmSystemOptions), o = this.keySystemAccessPromises[t];
27158
27059
  let c = o == null ? void 0 : o.keySystemAccess;
27159
27060
  if (!c) {
27160
27061
  this.log(`Requesting encrypted media "${t}" key-system access with config: ${JSON.stringify(n)}`), c = this.requestMediaKeySystemAccess(t, n);
@@ -27293,10 +27194,10 @@ class Mn {
27293
27194
  return;
27294
27195
  }
27295
27196
  } else {
27296
- const g = oT(r);
27197
+ const g = aT(r);
27297
27198
  if (g === null)
27298
27199
  return;
27299
- g.version === 0 && g.systemId === n2.WIDEVINE && g.data && (n = g.data.subarray(8, 24)), o = MA(g.systemId);
27200
+ g.version === 0 && g.systemId === n2.WIDEVINE && g.data && (n = g.data.subarray(8, 24)), o = $A(g.systemId);
27300
27201
  }
27301
27202
  if (!o || !n)
27302
27203
  return;
@@ -27611,7 +27512,7 @@ class vi extends Error {
27611
27512
  super(e), this.data = void 0, t.error || (t.error = new Error(e)), this.data = t, t.err = t.error;
27612
27513
  }
27613
27514
  }
27614
- const w3 = 1;
27515
+ const k3 = 1;
27615
27516
  var Zr = {
27616
27517
  MANIFEST: "m",
27617
27518
  AUDIO: "a",
@@ -27623,7 +27524,7 @@ var Zr = {
27623
27524
  KEY: "k",
27624
27525
  OTHER: "o"
27625
27526
  };
27626
- const S3 = "h";
27527
+ const w3 = "h";
27627
27528
  class Ps {
27628
27529
  // eslint-disable-line no-restricted-globals
27629
27530
  // eslint-disable-line no-restricted-globals
@@ -27684,8 +27585,8 @@ class Ps {
27684
27585
  createData() {
27685
27586
  var t;
27686
27587
  return {
27687
- v: w3,
27688
- sf: S3,
27588
+ v: k3,
27589
+ sf: w3,
27689
27590
  sid: this.sid,
27690
27591
  cid: this.cid,
27691
27592
  pr: (t = this.media) == null ? void 0 : t.playbackRate,
@@ -27896,8 +27797,8 @@ class Ps {
27896
27797
  return `${t}${r}${e}`;
27897
27798
  }
27898
27799
  }
27899
- const R3 = 3e5;
27900
- class _3 {
27800
+ const S3 = 3e5;
27801
+ class R3 {
27901
27802
  constructor(t) {
27902
27803
  this.hls = void 0, this.log = void 0, this.loader = null, this.uri = null, this.pathwayId = ".", this.pathwayPriority = null, this.timeToLoad = 300, this.reloadTimer = -1, this.updated = 0, this.started = !1, this.enabled = !0, this.levels = null, this.audioTracks = null, this.subtitleTracks = null, this.penalizedPathways = {}, this.hls = t, this.log = X.log.bind(X, "[content-steering]:"), this.registerListeners();
27903
27804
  }
@@ -27966,7 +27867,7 @@ class _3 {
27966
27867
  let e;
27967
27868
  const r = this.penalizedPathways, n = performance.now();
27968
27869
  Object.keys(r).forEach((o) => {
27969
- n - r[o] > R3 && delete r[o];
27870
+ n - r[o] > S3 && delete r[o];
27970
27871
  });
27971
27872
  for (let o = 0; o < t.length; o++) {
27972
27873
  const c = t[o];
@@ -28108,7 +28009,7 @@ function q2(i, t, e, r) {
28108
28009
  p && f.searchParams.set(p, o[p]);
28109
28010
  }), f.href;
28110
28011
  }
28111
- const L3 = /^age:\s*[\d.]+\s*$/im;
28012
+ const _3 = /^age:\s*[\d.]+\s*$/im;
28112
28013
  class Q2 {
28113
28014
  constructor(t) {
28114
28015
  this.xhrSetup = void 0, this.requestTimeout = void 0, this.retryTimeout = void 0, this.retryDelay = void 0, this.config = null, this.callbacks = null, this.context = void 0, this.loader = null, this.stats = void 0, this.xhrSetup = t && t.xhrSetup || null, this.stats = new bl(), this.retryDelay = 0;
@@ -28221,7 +28122,7 @@ class Q2 {
28221
28122
  }
28222
28123
  getCacheAge() {
28223
28124
  let t = null;
28224
- if (this.loader && L3.test(this.loader.getAllResponseHeaders())) {
28125
+ if (this.loader && _3.test(this.loader.getAllResponseHeaders())) {
28225
28126
  const e = this.loader.getResponseHeader("age");
28226
28127
  t = e ? parseFloat(e) : null;
28227
28128
  }
@@ -28231,7 +28132,7 @@ class Q2 {
28231
28132
  return this.loader && new RegExp(`^${t}:\\s*[\\d.]+\\s*$`, "im").test(this.loader.getAllResponseHeaders()) ? this.loader.getResponseHeader(t) : null;
28232
28133
  }
28233
28134
  }
28234
- function C3() {
28135
+ function L3() {
28235
28136
  if (
28236
28137
  // @ts-ignore
28237
28138
  self.fetch && self.AbortController && self.ReadableStream && self.Request
@@ -28242,10 +28143,10 @@ function C3() {
28242
28143
  }
28243
28144
  return !1;
28244
28145
  }
28245
- const I3 = /(\d+)-(\d+)\/(\d+)/;
28146
+ const C3 = /(\d+)-(\d+)\/(\d+)/;
28246
28147
  class kf {
28247
28148
  constructor(t) {
28248
- this.fetchSetup = void 0, this.requestTimeout = void 0, this.request = void 0, this.response = void 0, this.controller = void 0, this.context = void 0, this.config = null, this.callbacks = null, this.stats = void 0, this.loader = null, this.fetchSetup = t.fetchSetup || O3, this.controller = new self.AbortController(), this.stats = new bl();
28149
+ this.fetchSetup = void 0, this.requestTimeout = void 0, this.request = void 0, this.response = void 0, this.controller = void 0, this.context = void 0, this.config = null, this.callbacks = null, this.stats = void 0, this.loader = null, this.fetchSetup = t.fetchSetup || P3, this.controller = new self.AbortController(), this.stats = new bl();
28249
28150
  }
28250
28151
  destroy() {
28251
28152
  this.loader = this.callbacks = null, this.abortInternal();
@@ -28263,7 +28164,7 @@ class kf {
28263
28164
  if (n.loading.start)
28264
28165
  throw new Error("Loader can only be used once.");
28265
28166
  n.loading.start = self.performance.now();
28266
- const o = x3(t, this.controller.signal), c = r.onProgress, d = t.responseType === "arraybuffer", f = d ? "byteLength" : "length", {
28167
+ const o = I3(t, this.controller.signal), c = r.onProgress, d = t.responseType === "arraybuffer", f = d ? "byteLength" : "length", {
28267
28168
  maxTimeToFirstByteMs: p,
28268
28169
  maxLoadTimeMs: g
28269
28170
  } = e.loadPolicy;
@@ -28279,9 +28180,9 @@ class kf {
28279
28180
  status: A,
28280
28181
  statusText: T
28281
28182
  } = y;
28282
- throw new $3(T || "fetch, bad network response", A, y);
28183
+ throw new O3(T || "fetch, bad network response", A, y);
28283
28184
  }
28284
- return n.loading.first = E, n.total = P3(y.headers) || n.total, c && jt(e.highWaterMark) ? this.loadProgressively(y, n, t, e.highWaterMark, c) : d ? y.arrayBuffer() : t.responseType === "json" ? y.json() : y.text();
28185
+ return n.loading.first = E, n.total = D3(y.headers) || n.total, c && jt(e.highWaterMark) ? this.loadProgressively(y, n, t, e.highWaterMark, c) : d ? y.arrayBuffer() : t.responseType === "json" ? y.json() : y.text();
28285
28186
  }).then((y) => {
28286
28187
  const {
28287
28188
  response: E
@@ -28326,7 +28227,7 @@ class kf {
28326
28227
  return f();
28327
28228
  }
28328
28229
  }
28329
- function x3(i, t) {
28230
+ function I3(i, t) {
28330
28231
  const e = {
28331
28232
  method: "GET",
28332
28233
  mode: "cors",
@@ -28336,15 +28237,15 @@ function x3(i, t) {
28336
28237
  };
28337
28238
  return i.rangeEnd && e.headers.set("Range", "bytes=" + i.rangeStart + "-" + String(i.rangeEnd - 1)), e;
28338
28239
  }
28339
- function D3(i) {
28340
- const t = I3.exec(i);
28240
+ function x3(i) {
28241
+ const t = C3.exec(i);
28341
28242
  if (t)
28342
28243
  return parseInt(t[2]) - parseInt(t[1]) + 1;
28343
28244
  }
28344
- function P3(i) {
28245
+ function D3(i) {
28345
28246
  const t = i.get("Content-Range");
28346
28247
  if (t) {
28347
- const r = D3(t);
28248
+ const r = x3(t);
28348
28249
  if (jt(r))
28349
28250
  return r;
28350
28251
  }
@@ -28352,15 +28253,15 @@ function P3(i) {
28352
28253
  if (e)
28353
28254
  return parseInt(e);
28354
28255
  }
28355
- function O3(i, t) {
28256
+ function P3(i, t) {
28356
28257
  return new self.Request(i.url, t);
28357
28258
  }
28358
- class $3 extends Error {
28259
+ class O3 extends Error {
28359
28260
  constructor(t, e, r) {
28360
28261
  super(t), this.code = void 0, this.details = void 0, this.code = e, this.details = r;
28361
28262
  }
28362
28263
  }
28363
- const M3 = /\s/, N3 = {
28264
+ const $3 = /\s/, M3 = {
28364
28265
  newCue(i, t, e, r) {
28365
28266
  const n = [];
28366
28267
  let o, c, d, f, p;
@@ -28369,19 +28270,19 @@ const M3 = /\s/, N3 = {
28369
28270
  if (o = r.rows[E], d = !0, f = 0, p = "", !o.isEmpty()) {
28370
28271
  var y;
28371
28272
  for (let w = 0; w < o.chars.length; w++)
28372
- M3.test(o.chars[w].uchar) && d ? f++ : (p += o.chars[w].uchar, d = !1);
28273
+ $3.test(o.chars[w].uchar) && d ? f++ : (p += o.chars[w].uchar, d = !1);
28373
28274
  o.cueStartTime = t, t === e && (e += 1e-4), f >= 16 ? f-- : f++;
28374
28275
  const A = z2(p.trim()), T = ed(t, e, A);
28375
28276
  i != null && (y = i.cues) != null && y.getCueById(T) || (c = new g(t, e, A), c.id = T, c.line = E + 1, c.align = "left", c.position = 10 + Math.min(80, Math.floor(f * 8 / 32) * 10), n.push(c));
28376
28277
  }
28377
28278
  return i && n.length && (n.sort((E, A) => E.line === "auto" || A.line === "auto" ? 0 : E.line > 8 && A.line > 8 ? A.line - E.line : E.line - A.line), n.forEach((E) => b2(i, E))), n;
28378
28279
  }
28379
- }, F3 = {
28280
+ }, N3 = {
28380
28281
  maxTimeToFirstByteMs: 8e3,
28381
28282
  maxLoadTimeMs: 2e4,
28382
28283
  timeoutRetry: null,
28383
28284
  errorRetry: null
28384
- }, U3 = ei(ei({
28285
+ }, F3 = ei(ei({
28385
28286
  autoStartLoad: !0,
28386
28287
  // used by stream-controller
28387
28288
  startPosition: -1,
@@ -28461,11 +28362,11 @@ const M3 = /\s/, N3 = {
28461
28362
  // used by eme-controller
28462
28363
  licenseResponseCallback: void 0,
28463
28364
  // used by eme-controller
28464
- abrController: Vk,
28465
- bufferController: Qk,
28365
+ abrController: Hk,
28366
+ bufferController: qk,
28466
28367
  capLevelController: rd,
28467
- errorController: $T,
28468
- fpsController: k3,
28368
+ errorController: OT,
28369
+ fpsController: T3,
28469
28370
  stretchShortVideoTrack: !1,
28470
28371
  // used by mp4-remuxer
28471
28372
  maxAudioFramesDrift: 1,
@@ -28512,7 +28413,7 @@ const M3 = /\s/, N3 = {
28512
28413
  enableEmsgMetadataCues: !0,
28513
28414
  enableID3MetadataCues: !0,
28514
28415
  certLoadPolicy: {
28515
- default: F3
28416
+ default: N3
28516
28417
  },
28517
28418
  keyLoadPolicy: {
28518
28419
  default: {
@@ -28610,19 +28511,19 @@ const M3 = /\s/, N3 = {
28610
28511
  fragLoadingMaxRetry: 6,
28611
28512
  fragLoadingRetryDelay: 1e3,
28612
28513
  fragLoadingMaxRetryTimeout: 64e3
28613
- }, B3()), {}, {
28614
- subtitleStreamController: Yk,
28615
- subtitleTrackController: Zk,
28616
- timelineController: E3,
28617
- audioStreamController: jk,
28618
- audioTrackController: Kk,
28514
+ }, U3()), {}, {
28515
+ subtitleStreamController: zk,
28516
+ subtitleTrackController: Xk,
28517
+ timelineController: b3,
28518
+ audioStreamController: Wk,
28519
+ audioTrackController: jk,
28619
28520
  emeController: Mn,
28620
28521
  cmcdController: Ps,
28621
- contentSteeringController: _3
28522
+ contentSteeringController: R3
28622
28523
  });
28623
- function B3() {
28524
+ function U3() {
28624
28525
  return {
28625
- cueHandler: N3,
28526
+ cueHandler: M3,
28626
28527
  // used by timeline-controller
28627
28528
  enableWebVTT: !0,
28628
28529
  // used by timeline-controller
@@ -28649,7 +28550,7 @@ function B3() {
28649
28550
  renderTextTracksNatively: !0
28650
28551
  };
28651
28552
  }
28652
- function G3(i, t) {
28553
+ function B3(i, t) {
28653
28554
  if ((t.liveSyncDurationCount || t.liveMaxLatencyDurationCount) && (t.liveSyncDuration || t.liveMaxLatencyDuration))
28654
28555
  throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");
28655
28556
  if (t.liveMaxLatencyDurationCount !== void 0 && (t.liveSyncDurationCount === void 0 || t.liveMaxLatencyDurationCount <= t.liveSyncDurationCount))
@@ -28687,9 +28588,9 @@ function G3(i, t) {
28687
28588
  function hh(i) {
28688
28589
  return i && typeof i == "object" ? Array.isArray(i) ? i.map(hh) : Object.keys(i).reduce((t, e) => (t[e] = hh(i[e]), t), {}) : i;
28689
28590
  }
28690
- function H3(i) {
28591
+ function G3(i) {
28691
28592
  const t = i.loader;
28692
- t !== kf && t !== Q2 ? (X.log("[config]: Custom loader detected, cannot enable progressive streaming"), i.progressive = !1) : C3() && (i.loader = kf, i.progressive = !0, i.enableSoftwareAES = !0, X.log("[config]: Progressive streaming enabled, using FetchLoader"));
28593
+ t !== kf && t !== Q2 ? (X.log("[config]: Custom loader detected, cannot enable progressive streaming"), i.progressive = !1) : L3() && (i.loader = kf, i.progressive = !0, i.enableSoftwareAES = !0, X.log("[config]: Progressive streaming enabled, using FetchLoader"));
28693
28594
  }
28694
28595
  class ds {
28695
28596
  /**
@@ -28708,7 +28609,7 @@ class ds {
28708
28609
  * Check if the required MediaSource Extensions are available.
28709
28610
  */
28710
28611
  static isSupported() {
28711
- return tk();
28612
+ return JT();
28712
28613
  }
28713
28614
  static get Events() {
28714
28615
  return R;
@@ -28723,7 +28624,7 @@ class ds {
28723
28624
  * Get the default configuration applied to new instances.
28724
28625
  */
28725
28626
  static get DefaultConfig() {
28726
- return ds.defaultConfig ? ds.defaultConfig : U3;
28627
+ return ds.defaultConfig ? ds.defaultConfig : F3;
28727
28628
  }
28728
28629
  /**
28729
28630
  * Replace the default configuration applied to new instances.
@@ -28736,16 +28637,16 @@ class ds {
28736
28637
  * @param userConfig - Configuration options applied over `Hls.DefaultConfig`
28737
28638
  */
28738
28639
  constructor(t = {}) {
28739
- this.config = void 0, this.userConfig = void 0, this.coreComponents = void 0, this.networkControllers = void 0, this._emitter = new Jh(), this._autoLevelCapping = void 0, this._maxHdcpLevel = null, this.abrController = void 0, this.bufferController = void 0, this.capLevelController = void 0, this.latencyController = void 0, this.levelController = void 0, this.streamController = void 0, this.audioTrackController = void 0, this.subtitleTrackController = void 0, this.emeController = void 0, this.cmcdController = void 0, this._media = null, this.url = null, RA(t.debug || !1, "Hls instance");
28740
- const e = this.config = G3(ds.DefaultConfig, t);
28741
- this.userConfig = t, this._autoLevelCapping = -1, e.progressive && H3(e);
28640
+ this.config = void 0, this.userConfig = void 0, this.coreComponents = void 0, this.networkControllers = void 0, this._emitter = new Jh(), this._autoLevelCapping = void 0, this._maxHdcpLevel = null, this.abrController = void 0, this.bufferController = void 0, this.capLevelController = void 0, this.latencyController = void 0, this.levelController = void 0, this.streamController = void 0, this.audioTrackController = void 0, this.subtitleTrackController = void 0, this.emeController = void 0, this.cmcdController = void 0, this._media = null, this.url = null, SA(t.debug || !1, "Hls instance");
28641
+ const e = this.config = B3(ds.DefaultConfig, t);
28642
+ this.userConfig = t, this._autoLevelCapping = -1, e.progressive && G3(e);
28742
28643
  const {
28743
28644
  abrController: r,
28744
28645
  bufferController: n,
28745
28646
  capLevelController: o,
28746
28647
  errorController: c,
28747
28648
  fpsController: d
28748
- } = e, f = new c(this), p = this.abrController = new r(this), g = this.bufferController = new n(this), y = this.capLevelController = new o(this), E = new d(this), A = new mT(this), T = new AT(this), w = e.contentSteeringController, C = w ? new w(this) : null, P = this.levelController = new NT(this, C), M = new FT(this), B = new BT(this.config), x = this.streamController = new Gk(this, M, B);
28649
+ } = e, f = new c(this), p = this.abrController = new r(this), g = this.bufferController = new n(this), y = this.capLevelController = new o(this), E = new d(this), A = new gT(this), T = new ET(this), w = e.contentSteeringController, C = w ? new w(this) : null, P = this.levelController = new MT(this, C), M = new NT(this), B = new UT(this.config), x = this.streamController = new Bk(this, M, B);
28749
28650
  y.setStreamController(x), E.setStreamController(x);
28750
28651
  const O = [A, P, x];
28751
28652
  C && O.splice(1, 0, C), this.networkControllers = O;
@@ -28754,7 +28655,7 @@ class ds {
28754
28655
  const G = e.audioStreamController;
28755
28656
  G && O.push(new G(this, M, B)), this.subtitleTrackController = this.createController(e.subtitleTrackController, O);
28756
28657
  const at = e.subtitleStreamController;
28757
- at && O.push(new at(this, M, B)), this.createController(e.timelineController, z), B.emeController = this.emeController = this.createController(e.emeController, z), this.cmcdController = this.createController(e.cmcdController, z), this.latencyController = this.createController(TT, z), this.coreComponents = z, O.push(f);
28658
+ at && O.push(new at(this, M, B)), this.createController(e.timelineController, z), B.emeController = this.emeController = this.createController(e.emeController, z), this.cmcdController = this.createController(e.cmcdController, z), this.latencyController = this.createController(AT, z), this.coreComponents = z, O.push(f);
28758
28659
  const st = f.onErrorOut;
28759
28660
  typeof st == "function" && this.on(R.ERROR, st, f);
28760
28661
  }
@@ -29206,10 +29107,10 @@ class ds {
29206
29107
  }
29207
29108
  }
29208
29109
  ds.defaultConfig = void 0;
29209
- function V3() {
29110
+ function H3() {
29210
29111
  return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
29211
29112
  }
29212
- function W3() {
29113
+ function V3() {
29213
29114
  return ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(navigator.platform) || // iPad on iOS 13 detection
29214
29115
  navigator.userAgent.includes("Mac") && "ontouchend" in document;
29215
29116
  }
@@ -29218,7 +29119,7 @@ function dh(i) {
29218
29119
  return new Promise((c) => {
29219
29120
  let d = null;
29220
29121
  const f = document.createElement("video");
29221
- if (f.playsInline = !0, f.muted = !0, f.loop = !1, n && !V3() && ds.isSupported()) {
29122
+ if (f.playsInline = !0, f.muted = !0, f.loop = !1, n && !H3() && ds.isSupported()) {
29222
29123
  let p = !1;
29223
29124
  d = new ds({
29224
29125
  autoStartLoad: !0,
@@ -29278,7 +29179,7 @@ async function J2(i) {
29278
29179
  };
29279
29180
  }) : i.duration;
29280
29181
  }
29281
- const j3 = Bs(
29182
+ const W3 = Bs(
29282
29183
  async function(i) {
29283
29184
  return new FontFace(i.name, `url(${i.woff2 ?? i.url})`, {
29284
29185
  style: i.style,
@@ -29289,7 +29190,7 @@ const j3 = Bs(
29289
29190
  cacheKey: ([i]) => JSON.stringify(i)
29290
29191
  }
29291
29192
  );
29292
- let K3 = class {
29193
+ let j3 = class {
29293
29194
  constructor(i) {
29294
29195
  this._hasPlayed = !1, this._memoKey = null, this._lastDeps = null, this._duration = 0, this._scenes = null, this._videos = {}, this._videoMeta = {}, this._videoState = {}, this._resolveVideo = Bs(
29295
29196
  async (t) => {
@@ -29579,7 +29480,7 @@ let K3 = class {
29579
29480
  buffered: p ? T : (E = this.videoState[A]) == null ? void 0 : E.buffered
29580
29481
  }, f;
29581
29482
  }, {})
29582
- }, this.videoMeta = this.scenes.scenes.reduce((f, { video: p, videoMeta: g }) => (p && g && (f[p.key] = g), f), {}), (await Promise.all(this.scenes.fonts.map((f) => j3(f)))).forEach((f) => {
29483
+ }, this.videoMeta = this.scenes.scenes.reduce((f, { video: p, videoMeta: g }) => (p && g && (f[p.key] = g), f), {}), (await Promise.all(this.scenes.fonts.map((f) => W3(f)))).forEach((f) => {
29583
29484
  document.fonts.add(f);
29584
29485
  }), this.duration = this.scenes.duration, this.host.paused && this.host.reset(this.host.currentTime, !this.host.paused);
29585
29486
  }
@@ -29653,10 +29554,10 @@ let K3 = class {
29653
29554
  }), this.videos = {};
29654
29555
  }
29655
29556
  };
29656
- function z3(i) {
29557
+ function K3(i) {
29657
29558
  i.requestFullscreen ? i.requestFullscreen() : i.mozRequestFullScreen ? i.mozRequestFullScreen() : i.webkitRequestFullscreen ? i.webkitRequestFullscreen() : i.msRequestFullscreen && i.msRequestFullscreen();
29658
29559
  }
29659
- function Y3() {
29560
+ function z3() {
29660
29561
  document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen && document.webkitExitFullscreen();
29661
29562
  }
29662
29563
  const id = [
@@ -29671,11 +29572,11 @@ const id = [
29671
29572
  "captions",
29672
29573
  "fullscreen",
29673
29574
  "preview"
29674
- ], X3 = {
29575
+ ], Y3 = {
29675
29576
  id: "captions",
29676
29577
  event: "captions:click",
29677
29578
  label: "Closed Captions"
29678
- }, Z3 = {
29579
+ }, X3 = {
29679
29580
  id: "fullscreen",
29680
29581
  event: "fullscreen:click",
29681
29582
  label: "Full Screen"
@@ -29707,12 +29608,12 @@ const id = [
29707
29608
  value: 2
29708
29609
  }
29709
29610
  ]
29710
- }, q3 = {
29611
+ }, Z3 = {
29711
29612
  id: "playbackRate",
29712
29613
  label: "Playback playbackRate",
29713
29614
  subItems: tg
29714
29615
  };
29715
- class Q3 extends Qf {
29616
+ class q3 extends Qf {
29716
29617
  constructor(t) {
29717
29618
  if (super(t), this.element = null, this.observer = void 0, t.type !== Vn.ELEMENT)
29718
29619
  throw new Error("Resize directive must be used in an Element expression");
@@ -29729,23 +29630,23 @@ class Q3 extends Qf {
29729
29630
  return this.isConnected && !this.observer && (this.observer = new ResizeObserver(e), this.element = t.element, this.observer.observe(this.element)), Hs;
29730
29631
  }
29731
29632
  }
29732
- const sd = Wn(Q3);
29633
+ const sd = Wn(q3);
29733
29634
  var wf = Number.isNaN || function(i) {
29734
29635
  return typeof i == "number" && i !== i;
29735
29636
  };
29736
- function J3(i, t) {
29637
+ function Q3(i, t) {
29737
29638
  return !!(i === t || wf(i) && wf(t));
29738
29639
  }
29739
- function tw(i, t) {
29640
+ function J3(i, t) {
29740
29641
  if (i.length !== t.length)
29741
29642
  return !1;
29742
29643
  for (var e = 0; e < i.length; e++)
29743
- if (!J3(i[e], t[e]))
29644
+ if (!Q3(i[e], t[e]))
29744
29645
  return !1;
29745
29646
  return !0;
29746
29647
  }
29747
- function ew(i, t) {
29748
- t === void 0 && (t = tw);
29648
+ function tw(i, t) {
29649
+ t === void 0 && (t = J3);
29749
29650
  var e = null;
29750
29651
  function r() {
29751
29652
  for (var n = [], o = 0; o < arguments.length; o++)
@@ -29763,7 +29664,7 @@ function ew(i, t) {
29763
29664
  e = null;
29764
29665
  }, r;
29765
29666
  }
29766
- const rw = ew(() => {
29667
+ const ew = tw(() => {
29767
29668
  const i = new FontFace(
29768
29669
  "Roobert",
29769
29670
  "url(https://media-player-fonts.s3.ap-southeast-2.amazonaws.com/Roobert-Regular.woff2)",
@@ -29841,7 +29742,7 @@ const rw = ew(() => {
29841
29742
  "dark-800": "rgba(0, 0, 0, .8)",
29842
29743
  "dark-900": "rgba(0, 0, 0, .9)",
29843
29744
  "dark-1000": "#000"
29844
- }, iw = {
29745
+ }, rw = {
29845
29746
  colors: Hi,
29846
29747
  space: {
29847
29748
  xxs: ".25rem",
@@ -29924,18 +29825,18 @@ const rw = ew(() => {
29924
29825
  medium: "1rem",
29925
29826
  large: "1.5rem"
29926
29827
  }
29927
- }, Sf = H4.flatten(iw, { delimiter: "-" }), sw = Object.keys(Sf).map((i) => Va(`:host { --${i}: ${Sf[i]}; }`)), nw = (i) => {
29828
+ }, Sf = G4.flatten(rw, { delimiter: "-" }), iw = Object.keys(Sf).map((i) => Va(`:host { --${i}: ${Sf[i]}; }`)), sw = (i) => {
29928
29829
  class t extends i {
29929
29830
  // Add fonts to parent document as long as they don't exist already
29930
29831
  firstUpdated() {
29931
- rw().forEach(({ load: r, font: n }) => {
29832
+ ew().forEach(({ load: r, font: n }) => {
29932
29833
  document.fonts.add(n), r && n.load();
29933
29834
  });
29934
29835
  }
29935
29836
  }
29936
29837
  return t.styles = [
29937
29838
  (i == null ? void 0 : i.styles) ?? [],
29938
- sw,
29839
+ iw,
29939
29840
  dr`
29940
29841
  :host {
29941
29842
  font-family: var(--fontFamilies-sans);
@@ -30021,7 +29922,7 @@ const rw = ew(() => {
30021
29922
  }
30022
29923
  `
30023
29924
  ], t;
30024
- }, De = nw(us), aw = (i, t) => (typeof window < "u" && (window.customElements.get(i) ?? window.customElements.define(i, t)), t), ow = (i, t) => {
29925
+ }, De = sw(us), nw = (i, t) => (typeof window < "u" && (window.customElements.get(i) ?? window.customElements.define(i, t)), t), aw = (i, t) => {
30025
29926
  const { kind: e, elements: r } = t;
30026
29927
  return {
30027
29928
  kind: e,
@@ -30031,8 +29932,8 @@ const rw = ew(() => {
30031
29932
  typeof window < "u" && (window.customElements.get(i) ?? window.customElements.define(i, n));
30032
29933
  }
30033
29934
  };
30034
- }, Vr = (i) => (t) => typeof t == "function" ? aw(i, t) : ow(i, t);
30035
- class lw {
29935
+ }, Vr = (i) => (t) => typeof t == "function" ? nw(i, t) : aw(i, t);
29936
+ class ow {
30036
29937
  constructor(t) {
30037
29938
  this._memoKey = null, this._lastDeps = null, this._scenes = null, this._video = null, this._handleSeeked = () => {
30038
29939
  this.host._draw();
@@ -30159,10 +30060,10 @@ function uh(i, t = {}) {
30159
30060
  let d = r ? `${r}:${`${n}`.padStart(2, "0")}:${`${o}`.padStart(2, "0")}` : `${n}:${`${o}`.padStart(2, "0")}`;
30160
30061
  return t.includeMs && (d += `:${`${c}`.padStart(3, "0")}`), d;
30161
30062
  }
30162
- var cw = Object.defineProperty, hw = Object.getOwnPropertyDescriptor, jn = (i, t, e, r) => {
30163
- for (var n = r > 1 ? void 0 : r ? hw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
30063
+ var lw = Object.defineProperty, cw = Object.getOwnPropertyDescriptor, jn = (i, t, e, r) => {
30064
+ for (var n = r > 1 ? void 0 : r ? cw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
30164
30065
  (c = i[o]) && (n = (r ? c(t, e, n) : c(n)) || n);
30165
- return r && n && cw(t, e, n), n;
30066
+ return r && n && lw(t, e, n), n;
30166
30067
  };
30167
30068
  let Vs = class extends De {
30168
30069
  constructor() {
@@ -30467,10 +30368,10 @@ const _f = {
30467
30368
  />
30468
30369
  </svg>`
30469
30370
  };
30470
- var dw = Object.defineProperty, uw = Object.getOwnPropertyDescriptor, eg = (i, t, e, r) => {
30471
- for (var n = r > 1 ? void 0 : r ? uw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
30371
+ var hw = Object.defineProperty, dw = Object.getOwnPropertyDescriptor, eg = (i, t, e, r) => {
30372
+ for (var n = r > 1 ? void 0 : r ? dw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
30472
30373
  (c = i[o]) && (n = (r ? c(t, e, n) : c(n)) || n);
30473
- return r && n && dw(t, e, n), n;
30374
+ return r && n && hw(t, e, n), n;
30474
30375
  };
30475
30376
  let hl = class extends De {
30476
30377
  render() {
@@ -30494,10 +30395,10 @@ eg([
30494
30395
  hl = eg([
30495
30396
  Vr("vmp-icon")
30496
30397
  ], hl);
30497
- var fw = Object.defineProperty, pw = Object.getOwnPropertyDescriptor, Kn = (i, t, e, r) => {
30498
- for (var n = r > 1 ? void 0 : r ? pw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
30398
+ var uw = Object.defineProperty, fw = Object.getOwnPropertyDescriptor, Kn = (i, t, e, r) => {
30399
+ for (var n = r > 1 ? void 0 : r ? fw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
30499
30400
  (c = i[o]) && (n = (r ? c(t, e, n) : c(n)) || n);
30500
- return r && n && fw(t, e, n), n;
30401
+ return r && n && uw(t, e, n), n;
30501
30402
  };
30502
30403
  let Ws = class extends De {
30503
30404
  constructor() {
@@ -30560,14 +30461,14 @@ Kn([
30560
30461
  Ws = Kn([
30561
30462
  Vr("vmp-icon-button")
30562
30463
  ], Ws);
30563
- var gw = Object.defineProperty, mw = Object.getOwnPropertyDescriptor, si = (i, t, e, r) => {
30564
- for (var n = r > 1 ? void 0 : r ? mw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
30464
+ var pw = Object.defineProperty, gw = Object.getOwnPropertyDescriptor, si = (i, t, e, r) => {
30465
+ for (var n = r > 1 ? void 0 : r ? gw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
30565
30466
  (c = i[o]) && (n = (r ? c(t, e, n) : c(n)) || n);
30566
- return r && n && gw(t, e, n), n;
30467
+ return r && n && pw(t, e, n), n;
30567
30468
  };
30568
30469
  let ps = class extends De {
30569
30470
  constructor() {
30570
- super(...arguments), this.disabled = !1, this.aspectRatio = 1, this.compilation = wh, this._currentTime = 0, this._sceneController = new lw(this), this._canvasRef = Rr(), this._previewRef = Rr(), this._previewTimeRef = Rr(), this._handleScrubberMouseEnter = ({ detail: { x: i, y: t, elementLeft: e, elementRight: r } }) => {
30471
+ super(...arguments), this.disabled = !1, this.aspectRatio = 1, this.compilation = wh, this._currentTime = 0, this._sceneController = new ow(this), this._canvasRef = Rr(), this._previewRef = Rr(), this._previewTimeRef = Rr(), this._handleScrubberMouseEnter = ({ detail: { x: i, y: t, elementLeft: e, elementRight: r } }) => {
30571
30472
  var n, o;
30572
30473
  if ((n = this._previewRef) != null && n.value) {
30573
30474
  const c = this._previewRef.value.getBoundingClientRect(), d = (o = this._previewRef.value.getRootNode().host) == null ? void 0 : o.getBoundingClientRect();
@@ -30741,7 +30642,7 @@ si([
30741
30642
  js = si([
30742
30643
  Vr("vmp-video-preview")
30743
30644
  ], js);
30744
- class vw extends Wa {
30645
+ class mw extends Wa {
30745
30646
  constructor(t) {
30746
30647
  if (super(t), t.type !== Vn.ELEMENT)
30747
30648
  throw new Error("Resize directive must be used in an Element expression");
@@ -30750,8 +30651,8 @@ class vw extends Wa {
30750
30651
  return e == null || e(t.element), Hs;
30751
30652
  }
30752
30653
  }
30753
- const Lf = Wn(vw);
30754
- class yw {
30654
+ const Lf = Wn(mw);
30655
+ class vw {
30755
30656
  constructor(t) {
30756
30657
  this.hiddenControls = [], this._measureRef = Rr(), this._prevControlsWidth = 0, this._hideables = {}, this._showables = {}, this._onResize = (e) => {
30757
30658
  var r, n, o;
@@ -30797,10 +30698,10 @@ class yw {
30797
30698
  }
30798
30699
  const nd = `.tippy-box[data-animation=shift-away-subtle][data-state=hidden]{opacity:0}.tippy-box[data-animation=shift-away-subtle][data-state=hidden][data-placement^=top]{transform:translateY(5px)}.tippy-box[data-animation=shift-away-subtle][data-state=hidden][data-placement^=bottom]{transform:translateY(-5px)}.tippy-box[data-animation=shift-away-subtle][data-state=hidden][data-placement^=left]{transform:translate(5px)}.tippy-box[data-animation=shift-away-subtle][data-state=hidden][data-placement^=right]{transform:translate(-5px)}
30799
30700
  `;
30800
- var bw = Object.defineProperty, Ew = Object.getOwnPropertyDescriptor, Xa = (i, t, e, r) => {
30801
- for (var n = r > 1 ? void 0 : r ? Ew(t, e) : t, o = i.length - 1, c; o >= 0; o--)
30701
+ var yw = Object.defineProperty, bw = Object.getOwnPropertyDescriptor, Xa = (i, t, e, r) => {
30702
+ for (var n = r > 1 ? void 0 : r ? bw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
30802
30703
  (c = i[o]) && (n = (r ? c(t, e, n) : c(n)) || n);
30803
- return r && n && bw(t, e, n), n;
30704
+ return r && n && yw(t, e, n), n;
30804
30705
  };
30805
30706
  let mn = class extends De {
30806
30707
  constructor() {
@@ -30880,10 +30781,10 @@ Xa([
30880
30781
  mn = Xa([
30881
30782
  Vr("vmp-text")
30882
30783
  ], mn);
30883
- var Aw = Object.defineProperty, Tw = Object.getOwnPropertyDescriptor, Za = (i, t, e, r) => {
30884
- for (var n = r > 1 ? void 0 : r ? Tw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
30784
+ var Ew = Object.defineProperty, Aw = Object.getOwnPropertyDescriptor, Za = (i, t, e, r) => {
30785
+ for (var n = r > 1 ? void 0 : r ? Aw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
30885
30786
  (c = i[o]) && (n = (r ? c(t, e, n) : c(n)) || n);
30886
- return r && n && Aw(t, e, n), n;
30787
+ return r && n && Ew(t, e, n), n;
30887
30788
  };
30888
30789
  let vn = class extends De {
30889
30790
  constructor() {
@@ -31045,10 +30946,10 @@ Za([
31045
30946
  vn = Za([
31046
30947
  Vr("vmp-menu")
31047
30948
  ], vn);
31048
- var kw = Object.defineProperty, ww = Object.getOwnPropertyDescriptor, ad = (i, t, e, r) => {
31049
- for (var n = r > 1 ? void 0 : r ? ww(t, e) : t, o = i.length - 1, c; o >= 0; o--)
30949
+ var Tw = Object.defineProperty, kw = Object.getOwnPropertyDescriptor, ad = (i, t, e, r) => {
30950
+ for (var n = r > 1 ? void 0 : r ? kw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
31050
30951
  (c = i[o]) && (n = (r ? c(t, e, n) : c(n)) || n);
31051
- return r && n && kw(t, e, n), n;
30952
+ return r && n && Tw(t, e, n), n;
31052
30953
  };
31053
30954
  let Ua = class extends De {
31054
30955
  constructor() {
@@ -31116,10 +31017,10 @@ ad([
31116
31017
  Ua = ad([
31117
31018
  Vr("vmp-tooltip")
31118
31019
  ], Ua);
31119
- var Sw = Object.defineProperty, Rw = Object.getOwnPropertyDescriptor, od = (i, t, e, r) => {
31120
- for (var n = r > 1 ? void 0 : r ? Rw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
31020
+ var ww = Object.defineProperty, Sw = Object.getOwnPropertyDescriptor, od = (i, t, e, r) => {
31021
+ for (var n = r > 1 ? void 0 : r ? Sw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
31121
31022
  (c = i[o]) && (n = (r ? c(t, e, n) : c(n)) || n);
31122
- return r && n && Sw(t, e, n), n;
31023
+ return r && n && ww(t, e, n), n;
31123
31024
  };
31124
31025
  let Ba = class extends De {
31125
31026
  constructor() {
@@ -31322,10 +31223,10 @@ od([
31322
31223
  Ba = od([
31323
31224
  Vr("vmp-volume-button")
31324
31225
  ], Ba);
31325
- var _w = Object.defineProperty, Lw = Object.getOwnPropertyDescriptor, Tl = (i, t, e, r) => {
31326
- for (var n = r > 1 ? void 0 : r ? Lw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
31226
+ var Rw = Object.defineProperty, _w = Object.getOwnPropertyDescriptor, Tl = (i, t, e, r) => {
31227
+ for (var n = r > 1 ? void 0 : r ? _w(t, e) : t, o = i.length - 1, c; o >= 0; o--)
31327
31228
  (c = i[o]) && (n = (r ? c(t, e, n) : c(n)) || n);
31328
- return r && n && _w(t, e, n), n;
31229
+ return r && n && Rw(t, e, n), n;
31329
31230
  };
31330
31231
  let Hn = class extends De {
31331
31232
  constructor() {
@@ -31568,14 +31469,14 @@ Tl([
31568
31469
  Hn = Tl([
31569
31470
  Vr("vmp-progress-scrubber")
31570
31471
  ], Hn);
31571
- var Cw = Object.defineProperty, Iw = Object.getOwnPropertyDescriptor, Cr = (i, t, e, r) => {
31572
- for (var n = r > 1 ? void 0 : r ? Iw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
31472
+ var Lw = Object.defineProperty, Cw = Object.getOwnPropertyDescriptor, Cr = (i, t, e, r) => {
31473
+ for (var n = r > 1 ? void 0 : r ? Cw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
31573
31474
  (c = i[o]) && (n = (r ? c(t, e, n) : c(n)) || n);
31574
- return r && n && Cw(t, e, n), n;
31475
+ return r && n && Lw(t, e, n), n;
31575
31476
  };
31576
31477
  let fr = class extends De {
31577
31478
  constructor() {
31578
- super(...arguments), this.resizeHider = new yw(this), this.playing = !1, this.volume = 1, this.muted = !1, this.currentTime = 0, this.duration = 0, this.level = -1, this.playbackRate = 1, this.buffer = [], this.levels = [], this.captions = !1, this.fullscreen = !1, this.controls = id, this.volumeMenuOpen = !1, this.levelsMenuOpen = !1, this.playbackRateMenuOpen = !1, this.settingsMenuOpen = !1;
31479
+ super(...arguments), this.resizeHider = new vw(this), this.playing = !1, this.volume = 1, this.muted = !1, this.currentTime = 0, this.duration = 0, this.level = -1, this.playbackRate = 1, this.buffer = [], this.levels = [], this.captions = !1, this.fullscreen = !1, this.controls = id, this.volumeMenuOpen = !1, this.levelsMenuOpen = !1, this.playbackRateMenuOpen = !1, this.settingsMenuOpen = !1;
31579
31480
  }
31580
31481
  _handleNavigateBackClick() {
31581
31482
  this.dispatchEvent(new CustomEvent("navigate:back", { bubbles: !0, composed: !0 }));
@@ -31651,7 +31552,7 @@ let fr = class extends De {
31651
31552
  }
31652
31553
  ), M = {
31653
31554
  title: "Settings",
31654
- items: [X3, Z3, w, q3].filter(
31555
+ items: [Y3, X3, w, Z3].filter(
31655
31556
  ({ id: F }) => P.includes(F) && this.resizeHider.hiddenControls.includes(F)
31656
31557
  )
31657
31558
  }, B = (e = this.controls) == null ? void 0 : e.includes("progress"), x = (r = this.controls) == null ? void 0 : r.includes("navigation"), O = (n = this.controls) == null ? void 0 : n.includes("play"), z = (o = this.controls) == null ? void 0 : o.includes("volume"), G = (c = this.controls) == null ? void 0 : c.includes("current-time"), at = (d = this.controls) == null ? void 0 : d.includes("duration"), st = (f = this.controls) == null ? void 0 : f.includes("levels"), J = (p = this.controls) == null ? void 0 : p.includes("speed"), kt = (g = this.controls) == null ? void 0 : g.includes("captions"), ft = (y = this.controls) == null ? void 0 : y.includes("fullscreen"), wt = O || z || G || at || st || J || kt || ft, Pt = [
@@ -31950,10 +31851,10 @@ Cr([
31950
31851
  fr = Cr([
31951
31852
  Vr("vmp-player-controls")
31952
31853
  ], fr);
31953
- var xw = Object.defineProperty, Dw = Object.getOwnPropertyDescriptor, Pw = (i, t, e, r) => {
31954
- for (var n = r > 1 ? void 0 : r ? Dw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
31854
+ var Iw = Object.defineProperty, xw = Object.getOwnPropertyDescriptor, Dw = (i, t, e, r) => {
31855
+ for (var n = r > 1 ? void 0 : r ? xw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
31955
31856
  (c = i[o]) && (n = (r ? c(t, e, n) : c(n)) || n);
31956
- return r && n && xw(t, e, n), n;
31857
+ return r && n && Iw(t, e, n), n;
31957
31858
  };
31958
31859
  let fh = class extends De {
31959
31860
  render() {
@@ -31970,13 +31871,13 @@ fh.styles = [
31970
31871
  }
31971
31872
  `
31972
31873
  ];
31973
- fh = Pw([
31874
+ fh = Dw([
31974
31875
  Vr("vmp-loading-spinner")
31975
31876
  ], fh);
31976
- var Ow = Object.defineProperty, $w = Object.getOwnPropertyDescriptor, rg = (i, t, e, r) => {
31977
- for (var n = r > 1 ? void 0 : r ? $w(t, e) : t, o = i.length - 1, c; o >= 0; o--)
31877
+ var Pw = Object.defineProperty, Ow = Object.getOwnPropertyDescriptor, rg = (i, t, e, r) => {
31878
+ for (var n = r > 1 ? void 0 : r ? Ow(t, e) : t, o = i.length - 1, c; o >= 0; o--)
31978
31879
  (c = i[o]) && (n = (r ? c(t, e, n) : c(n)) || n);
31979
- return r && n && Ow(t, e, n), n;
31880
+ return r && n && Pw(t, e, n), n;
31980
31881
  };
31981
31882
  let dl = class extends De {
31982
31883
  constructor() {
@@ -32019,12 +31920,12 @@ rg([
32019
31920
  dl = rg([
32020
31921
  Vr("vmp-captions")
32021
31922
  ], dl);
32022
- var Mw = Object.defineProperty, Nw = Object.getOwnPropertyDescriptor, Nr = (i, t, e, r) => {
32023
- for (var n = r > 1 ? void 0 : r ? Nw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
31923
+ var $w = Object.defineProperty, Mw = Object.getOwnPropertyDescriptor, Nr = (i, t, e, r) => {
31924
+ for (var n = r > 1 ? void 0 : r ? Mw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
32024
31925
  (c = i[o]) && (n = (r ? c(t, e, n) : c(n)) || n);
32025
- return r && n && Mw(t, e, n), n;
31926
+ return r && n && $w(t, e, n), n;
32026
31927
  };
32027
- const Fw = 3e3;
31928
+ const Nw = 3e3;
32028
31929
  let Ar = class extends De {
32029
31930
  constructor() {
32030
31931
  super(...arguments), this.loading = !1, this.playing = !1, this.volume = 1, this.muted = !1, this.currentTime = 0, this.duration = 0, this.levels = [], this.level = -1, this.playbackRate = 1, this.caption = "", this.buffer = [], this.captions = !1, this.fullscreen = !1, this.controls = id, this.showControls = !0, this._hasTouched = !1, this._playerControlsRef = Rr();
@@ -32032,7 +31933,7 @@ let Ar = class extends De {
32032
31933
  _startHideControls() {
32033
31934
  clearTimeout(this._controlHideTimeout), this._controlHideTimeout = setTimeout(() => {
32034
31935
  this.showControls = !1, this._hasTouched = !1;
32035
- }, Fw);
31936
+ }, Nw);
32036
31937
  }
32037
31938
  _immediateShowControls() {
32038
31939
  this.showControls = !0, clearTimeout(this._controlHideTimeout);
@@ -32246,21 +32147,21 @@ Nr([
32246
32147
  Ar = Nr([
32247
32148
  Vr("vmp-player-overlay")
32248
32149
  ], Ar);
32249
- var Uw = Object.defineProperty, Bw = Object.getOwnPropertyDescriptor, ar = (i, t, e, r) => {
32250
- for (var n = r > 1 ? void 0 : r ? Bw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
32150
+ var Fw = Object.defineProperty, Uw = Object.getOwnPropertyDescriptor, ar = (i, t, e, r) => {
32151
+ for (var n = r > 1 ? void 0 : r ? Uw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
32251
32152
  (c = i[o]) && (n = (r ? c(t, e, n) : c(n)) || n);
32252
- return r && n && Uw(t, e, n), n;
32153
+ return r && n && Fw(t, e, n), n;
32253
32154
  };
32254
- const Gw = 1e3 / 60;
32155
+ const Bw = 1e3 / 60;
32255
32156
  let er = class extends De {
32256
32157
  constructor() {
32257
- super(...arguments), this.burnCaptions = !1, this.debug = !1, this.propAspectRatio = 0, this.preload = "auto", this.autoplay = !1, this.loading = !1, this.compilation = wh, this._sceneController = new K3(this), this._drawController = new bA(this), this._observer = null, this._wasPlaying = !1, this._manualMute = this.muted, this._seekerRAF = null, this._seekerTimeout = null, this._lastWaiting = !1, this._lastTimestamp = null, this._playerRef = Rr(), this._canvasRef = Rr(), this._pageHidden = document.visibilityState === "hidden", this._aspectRatio = this.propAspectRatio, this._processing = !1, this._waiting = !1, this._errors = [], this._seeking = !1, this._captions = !1, this._fullscreen = !1, this._initialised = null, this._paused = !0, this._playbackRate = 1, this._volume = null, this._muted = null, this._videoResolution = -1, this._handleContainerResize = () => {
32158
+ super(...arguments), this.burnCaptions = !1, this.debug = !1, this.propAspectRatio = 0, this.preload = "auto", this.autoplay = !1, this.loading = !1, this.compilation = wh, this._sceneController = new j3(this), this._drawController = new yA(this), this._observer = null, this._wasPlaying = !1, this._manualMute = this.muted, this._seekerRAF = null, this._seekerTimeout = null, this._lastWaiting = !1, this._lastTimestamp = null, this._playerRef = Rr(), this._canvasRef = Rr(), this._pageHidden = document.visibilityState === "hidden", this._aspectRatio = this.propAspectRatio, this._processing = !1, this._waiting = !1, this._errors = [], this._seeking = !1, this._captions = !1, this._fullscreen = !1, this._initialised = null, this._paused = !0, this._playbackRate = 1, this._volume = null, this._muted = null, this._videoResolution = -1, this._handleContainerResize = () => {
32258
32159
  var i;
32259
32160
  (i = this.shadowRoot) != null && i.host && !this.propAspectRatio && (this._aspectRatio = this.shadowRoot.host.clientWidth / this.shadowRoot.host.clientHeight);
32260
32161
  }, this._handleCanvasResize = () => {
32261
32162
  this.draw();
32262
32163
  }, this._loop = () => {
32263
- this._endLoop(), this._pageHidden ? this._seekerTimeout = setTimeout(this._seeker, Gw) : this._seekerRAF = requestAnimationFrame(this._seeker);
32164
+ this._endLoop(), this._pageHidden ? this._seekerTimeout = setTimeout(this._seeker, Bw) : this._seekerRAF = requestAnimationFrame(this._seeker);
32264
32165
  }, this._endLoop = () => {
32265
32166
  this._seekerRAF && cancelAnimationFrame(this._seekerRAF), this._seekerTimeout && clearTimeout(this._seekerTimeout), this._seekerRAF = null, this._seekerTimeout = null;
32266
32167
  }, this._seeker = (i = performance.now()) => {
@@ -32415,7 +32316,7 @@ let er = class extends De {
32415
32316
  }
32416
32317
  // This must be called in an event handler that occurs as a result of user action as the browser does not allow programmatic fullscreen
32417
32318
  toggleFullscreen(i) {
32418
- i ?? this.fullscreen ? Y3() : this._playerRef.value && z3(this._playerRef.value);
32319
+ i ?? this.fullscreen ? z3() : this._playerRef.value && K3(this._playerRef.value);
32419
32320
  }
32420
32321
  connectedCallback() {
32421
32322
  var i;
@@ -32469,7 +32370,7 @@ let er = class extends De {
32469
32370
  // Don't show any controls when disabled because we haven't created the `videos` yet
32470
32371
  // This means that if the user was to play the video then it would have to start muted because we can only unmute videos
32471
32372
  // within user events for autoplay reasons
32472
- c ? [] : (t = this.controls ?? id) == null ? void 0 : t.filter((M) => !(M === "fullscreen" && W3() || M === "navigation" && (!this.scenes || this.scenes.length <= 1)))
32373
+ c ? [] : (t = this.controls ?? id) == null ? void 0 : t.filter((M) => !(M === "fullscreen" && V3() || M === "navigation" && (!this.scenes || this.scenes.length <= 1)))
32473
32374
  ), y = !(g != null && g.includes("preview")), E = (((e = this.scenes) == null ? void 0 : e.length) ?? 0) - 1, A = ((r = this.scenes) == null ? void 0 : r.findIndex((M) => M === this._drawController.activeScenes[0])) ?? 0, T = (o = (n = this._drawController.activeScenes[0]) == null ? void 0 : n.video) == null ? void 0 : o.hls, w = this.loading || this.waiting || this.processing, C = !this.src && !this.data, P = !!this.errors.find((M) => M.fatal);
32474
32375
  return qt`
32475
32376
  ${this._renderStyles()}
@@ -32687,12 +32588,12 @@ ar([
32687
32588
  er = ar([
32688
32589
  Vr("vmp-media-player")
32689
32590
  ], er);
32690
- var Hw = Object.defineProperty, Vw = Object.getOwnPropertyDescriptor, Wr = (i, t, e, r) => {
32691
- for (var n = r > 1 ? void 0 : r ? Vw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
32591
+ var Gw = Object.defineProperty, Hw = Object.getOwnPropertyDescriptor, Wr = (i, t, e, r) => {
32592
+ for (var n = r > 1 ? void 0 : r ? Hw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
32692
32593
  (c = i[o]) && (n = (r ? c(t, e, n) : c(n)) || n);
32693
- return r && n && Hw(t, e, n), n;
32594
+ return r && n && Gw(t, e, n), n;
32694
32595
  };
32695
- let Lr = class extends U4(us) {
32596
+ let Lr = class extends us {
32696
32597
  constructor() {
32697
32598
  super(...arguments), this.env = "prod", this.apiKey = "", this.disableTracking = !1, this.trackingSource = "embedded_player", this.preload = "auto", this.autoplay = !1, this.aspectRatio = 0, this.eventController = new wy(this, [
32698
32599
  "durationchange",
@@ -32720,11 +32621,102 @@ let Lr = class extends U4(us) {
32720
32621
  "video:timeupdate",
32721
32622
  "video:ended",
32722
32623
  "video:error"
32723
- ]), this._fetcherController = new jy(this), this._trackingController = new F4(this);
32624
+ ]), this._fetcherController = new jy(this), this._trackingController = new F4(this), this._mediaPlayerRef = Rr();
32724
32625
  }
32725
32626
  get fetching() {
32726
32627
  return this._fetcherController.fetching;
32727
32628
  }
32629
+ get waiting() {
32630
+ var i;
32631
+ return (i = this._mediaPlayerRef.value) == null ? void 0 : i.waiting;
32632
+ }
32633
+ get initialised() {
32634
+ var i;
32635
+ return (i = this._mediaPlayerRef.value) == null ? void 0 : i.initialised;
32636
+ }
32637
+ get seeking() {
32638
+ var i;
32639
+ return (i = this._mediaPlayerRef.value) == null ? void 0 : i.seeking;
32640
+ }
32641
+ get paused() {
32642
+ var i;
32643
+ return (i = this._mediaPlayerRef.value) == null ? void 0 : i.paused;
32644
+ }
32645
+ get captions() {
32646
+ var i;
32647
+ return (i = this._mediaPlayerRef.value) == null ? void 0 : i.captions;
32648
+ }
32649
+ get fullscreen() {
32650
+ var i;
32651
+ return (i = this._mediaPlayerRef.value) == null ? void 0 : i.fullscreen;
32652
+ }
32653
+ get duration() {
32654
+ var i;
32655
+ return (i = this._mediaPlayerRef.value) == null ? void 0 : i.duration;
32656
+ }
32657
+ set currentTime(i) {
32658
+ this._mediaPlayerRef.value && (this._mediaPlayerRef.value.currentTime = i);
32659
+ }
32660
+ get currentTime() {
32661
+ var i;
32662
+ return ((i = this._mediaPlayerRef.value) == null ? void 0 : i.currentTime) ?? 0;
32663
+ }
32664
+ set playbackRate(i) {
32665
+ this._mediaPlayerRef.value && (this._mediaPlayerRef.value.playbackRate = i);
32666
+ }
32667
+ get playbackRate() {
32668
+ var i;
32669
+ return ((i = this._mediaPlayerRef.value) == null ? void 0 : i.playbackRate) ?? 1;
32670
+ }
32671
+ set volume(i) {
32672
+ this._mediaPlayerRef.value && (this._mediaPlayerRef.value.volume = i);
32673
+ }
32674
+ get volume() {
32675
+ var i;
32676
+ return ((i = this._mediaPlayerRef.value) == null ? void 0 : i.volume) ?? 1;
32677
+ }
32678
+ set muted(i) {
32679
+ this._mediaPlayerRef.value && (this._mediaPlayerRef.value.muted = i);
32680
+ }
32681
+ get muted() {
32682
+ var i;
32683
+ return ((i = this._mediaPlayerRef.value) == null ? void 0 : i.muted) ?? !1;
32684
+ }
32685
+ get scene() {
32686
+ var i;
32687
+ return ((i = this._mediaPlayerRef.value) == null ? void 0 : i.scene) ?? null;
32688
+ }
32689
+ get scenes() {
32690
+ var i;
32691
+ return ((i = this._mediaPlayerRef.value) == null ? void 0 : i.scenes) ?? [];
32692
+ }
32693
+ get sceneConfig() {
32694
+ var i;
32695
+ return ((i = this._mediaPlayerRef.value) == null ? void 0 : i.sceneConfig) ?? null;
32696
+ }
32697
+ get videoState() {
32698
+ var i;
32699
+ return (i = this._mediaPlayerRef.value) == null ? void 0 : i.videoState;
32700
+ }
32701
+ get mediaPlayer() {
32702
+ return this._mediaPlayerRef.value;
32703
+ }
32704
+ play() {
32705
+ var i;
32706
+ (i = this._mediaPlayerRef.value) == null || i.play();
32707
+ }
32708
+ pause() {
32709
+ var i;
32710
+ (i = this._mediaPlayerRef.value) == null || i.pause();
32711
+ }
32712
+ reset(i = 0, t = !1) {
32713
+ var e;
32714
+ (e = this._mediaPlayerRef.value) == null || e.reset(i, t);
32715
+ }
32716
+ setScene(i) {
32717
+ var t;
32718
+ (t = this._mediaPlayerRef.value) == null || t.setScene(i);
32719
+ }
32728
32720
  _renderStyles() {
32729
32721
  return this.aspectRatio ? typeof this.aspectRatio == "number" ? qt`
32730
32722
  <style>
@@ -32825,17 +32817,17 @@ function Go(i, t, e, r = 20, n = 0) {
32825
32817
  function ig(i) {
32826
32818
  return i.hasAttribute("hidden") || i.hasAttribute("aria-hidden") && i.getAttribute("aria-hidden") !== "false" || i.style.display === "none" || i.style.opacity === "0" || i.style.visibility === "hidden" || i.style.visibility === "collapse";
32827
32819
  }
32828
- function Ww(i) {
32820
+ function Vw(i) {
32829
32821
  return i.hasAttribute("disabled") || i.hasAttribute("aria-disabled") && i.getAttribute("aria-disabled") !== "false";
32830
32822
  }
32831
- function jw(i) {
32832
- return i.getAttribute("tabindex") === "-1" || ig(i) || Ww(i) ? !1 : (
32823
+ function Ww(i) {
32824
+ return i.getAttribute("tabindex") === "-1" || ig(i) || Vw(i) ? !1 : (
32833
32825
  // At this point we know that the element can have focus (eg. won't be -1) if the tabindex attribute exists
32834
32826
  i.hasAttribute("tabindex") || (i instanceof HTMLAnchorElement || i instanceof HTMLAreaElement) && i.hasAttribute("href") || i instanceof HTMLButtonElement || i instanceof HTMLInputElement || i instanceof HTMLTextAreaElement || i instanceof HTMLSelectElement || i instanceof HTMLIFrameElement
32835
32827
  );
32836
32828
  }
32837
32829
  const Mc = /* @__PURE__ */ new Map();
32838
- function Kw(i, t, e) {
32830
+ function jw(i, t, e) {
32839
32831
  const r = Mc.get(e);
32840
32832
  r != null && window.clearTimeout(r), Mc.set(e, window.setTimeout(() => {
32841
32833
  i(), Mc.delete(e);
@@ -32848,7 +32840,7 @@ sg.innerHTML = `
32848
32840
  <slot></slot>
32849
32841
  <div id="end"></div>
32850
32842
  `;
32851
- class zw extends HTMLElement {
32843
+ class Kw extends HTMLElement {
32852
32844
  /**
32853
32845
  * Attaches the shadow root.
32854
32846
  */
@@ -32913,7 +32905,7 @@ class zw extends HTMLElement {
32913
32905
  * Returns a list of the focusable children found within the element.
32914
32906
  */
32915
32907
  getFocusableElements() {
32916
- return Go(this, ig, jw);
32908
+ return Go(this, ig, Ww);
32917
32909
  }
32918
32910
  /**
32919
32911
  * Focuses on either the last or first focusable element.
@@ -32945,7 +32937,7 @@ class zw extends HTMLElement {
32945
32937
  * @param value
32946
32938
  */
32947
32939
  updateFocused(t) {
32948
- Kw(() => {
32940
+ jw(() => {
32949
32941
  this.focused !== t && (this._focused = t, this.render());
32950
32942
  }, 0, this.debounceId);
32951
32943
  }
@@ -32956,11 +32948,11 @@ class zw extends HTMLElement {
32956
32948
  this.$start.setAttribute("tabindex", !this.focused || this.inactive ? "-1" : "0"), this.$end.setAttribute("tabindex", !this.focused || this.inactive ? "-1" : "0"), this.focused ? this.setAttribute("focused", "") : this.removeAttribute("focused");
32957
32949
  }
32958
32950
  }
32959
- window.customElements.define("focus-trap", zw);
32960
- var Yw = Object.defineProperty, Xw = Object.getOwnPropertyDescriptor, ld = (i, t, e, r) => {
32961
- for (var n = r > 1 ? void 0 : r ? Xw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
32951
+ window.customElements.define("focus-trap", Kw);
32952
+ var zw = Object.defineProperty, Yw = Object.getOwnPropertyDescriptor, ld = (i, t, e, r) => {
32953
+ for (var n = r > 1 ? void 0 : r ? Yw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
32962
32954
  (c = i[o]) && (n = (r ? c(t, e, n) : c(n)) || n);
32963
- return r && n && Yw(t, e, n), n;
32955
+ return r && n && zw(t, e, n), n;
32964
32956
  };
32965
32957
  let Ga = class extends us {
32966
32958
  constructor() {
@@ -33077,10 +33069,10 @@ ld([
33077
33069
  Ga = ld([
33078
33070
  fl("vouch-embed-dialog-overlay")
33079
33071
  ], Ga);
33080
- var Zw = Object.defineProperty, qw = Object.getOwnPropertyDescriptor, hi = (i, t, e, r) => {
33081
- for (var n = r > 1 ? void 0 : r ? qw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
33072
+ var Xw = Object.defineProperty, Zw = Object.getOwnPropertyDescriptor, hi = (i, t, e, r) => {
33073
+ for (var n = r > 1 ? void 0 : r ? Zw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
33082
33074
  (c = i[o]) && (n = (r ? c(t, e, n) : c(n)) || n);
33083
- return r && n && Zw(t, e, n), n;
33075
+ return r && n && Xw(t, e, n), n;
33084
33076
  };
33085
33077
  let ri = class extends us {
33086
33078
  constructor() {
@@ -33168,10 +33160,10 @@ hi([
33168
33160
  ri = hi([
33169
33161
  fl("vouch-embed-dialog-portal")
33170
33162
  ], ri);
33171
- var Qw = Object.defineProperty, Jw = Object.getOwnPropertyDescriptor, ki = (i, t, e, r) => {
33172
- for (var n = r > 1 ? void 0 : r ? Jw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
33163
+ var qw = Object.defineProperty, Qw = Object.getOwnPropertyDescriptor, ki = (i, t, e, r) => {
33164
+ for (var n = r > 1 ? void 0 : r ? Qw(t, e) : t, o = i.length - 1, c; o >= 0; o--)
33173
33165
  (c = i[o]) && (n = (r ? c(t, e, n) : c(n)) || n);
33174
- return r && n && Qw(t, e, n), n;
33166
+ return r && n && qw(t, e, n), n;
33175
33167
  };
33176
33168
  let ii = class extends us {
33177
33169
  constructor() {
@@ -33261,4 +33253,4 @@ export {
33261
33253
  Bc as c,
33262
33254
  tp as g
33263
33255
  };
33264
- //# sourceMappingURL=index-568f189c.js.map
33256
+ //# sourceMappingURL=index-eb3ec3b3.js.map