@vindral/web-sdk 4.1.8 → 4.1.9-2-ga281ba4b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/player.js CHANGED
@@ -1,20 +1,20 @@
1
- var Oo = Object.defineProperty;
2
- var Ho = Object.getPrototypeOf;
3
- var zo = Reflect.get;
4
- var vr = (c) => {
1
+ var Ho = Object.defineProperty;
2
+ var zo = Object.getPrototypeOf;
3
+ var Bo = Reflect.get;
4
+ var fr = (c) => {
5
5
  throw TypeError(c);
6
6
  };
7
- var Bo = (c, a, t) => a in c ? Oo(c, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[a] = t;
8
- var m = (c, a, t) => Bo(c, typeof a != "symbol" ? a + "" : a, t), sn = (c, a, t) => a.has(c) || vr("Cannot " + t);
9
- var e = (c, a, t) => (sn(c, a, "read from private field"), t ? t.call(c) : a.get(c)), l = (c, a, t) => a.has(c) ? vr("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(c) : a.set(c, t), d = (c, a, t, i) => (sn(c, a, "write to private field"), i ? i.call(c, t) : a.set(c, t), t), n = (c, a, t) => (sn(c, a, "access private method"), t);
10
- var fr = (c, a, t, i) => ({
7
+ var $o = (c, a, t) => a in c ? Ho(c, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[a] = t;
8
+ var m = (c, a, t) => $o(c, typeof a != "symbol" ? a + "" : a, t), nn = (c, a, t) => a.has(c) || fr("Cannot " + t);
9
+ var e = (c, a, t) => (nn(c, a, "read from private field"), t ? t.call(c) : a.get(c)), l = (c, a, t) => a.has(c) ? fr("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(c) : a.set(c, t), d = (c, a, t, i) => (nn(c, a, "write to private field"), i ? i.call(c, t) : a.set(c, t), t), n = (c, a, t) => (nn(c, a, "access private method"), t);
10
+ var gr = (c, a, t, i) => ({
11
11
  set _(s) {
12
12
  d(c, a, s, t);
13
13
  },
14
14
  get _() {
15
15
  return e(c, a, i);
16
16
  }
17
- }), J = (c, a, t) => zo(Ho(c), t, a);
17
+ }), J = (c, a, t) => Bo(zo(c), t, a);
18
18
  var B = (c, a, t) => new Promise((i, s) => {
19
19
  var o = (v) => {
20
20
  try {
@@ -31,11 +31,11 @@ var B = (c, a, t) => new Promise((i, s) => {
31
31
  }, p = (v) => v.done ? i(v.value) : Promise.resolve(v.value).then(o, u);
32
32
  p((t = t.apply(c, a)).next());
33
33
  });
34
- import { L as Tr, V as $o, i as Go, C as Ko, A as qo, a as Vo, b as Xo } from "./47j9Rb9g.js";
34
+ import { L as Lr, V as Go, i as Ko, C as qo, A as Vo, a as Xo, b as jo } from "./B9Uk2UIb.js";
35
35
  import { E as ds } from "./Bx7s5QdT.js";
36
- import { CastSender as jo } from "./cast-sender.js";
37
- import { A as Yo, d as Jo } from "./CPEMXA01.js";
38
- const on = 1e3, ln = on * 1e3, gr = ln * 1e3, nn = (c, a, t) => c % a === 0 ? c / a : (c / a).toFixed(t), Wo = (c, a = 1) => c >= gr ? `${nn(c, gr, a)} Gbit/s` : c >= ln ? `${nn(c, ln, a)} Mbit/s` : c >= on ? `${nn(c, on, a)} Kbit/s` : `${c} bit/s`, Qo = ({ width: c, height: a }) => `${c}x${a}`, Zo = ({
36
+ import { CastSender as Yo } from "./cast-sender.js";
37
+ import { A as Jo, d as Wo } from "./CPEMXA01.js";
38
+ const ln = 1e3, hn = ln * 1e3, Er = hn * 1e3, rn = (c, a, t) => c % a === 0 ? c / a : (c / a).toFixed(t), Qo = (c, a = 1) => c >= Er ? `${rn(c, Er, a)} Gbit/s` : c >= hn ? `${rn(c, hn, a)} Mbit/s` : c >= ln ? `${rn(c, ln, a)} Kbit/s` : `${c} bit/s`, Zo = ({ width: c, height: a }) => `${c}x${a}`, tl = ({
39
39
  title: c,
40
40
  subTitle: a = "Live stream",
41
41
  poster: t
@@ -87,7 +87,7 @@ const on = 1e3, ln = on * 1e3, gr = ln * 1e3, nn = (c, a, t) => c % a === 0 ? c
87
87
  TIMESHIFT_POSITION: "timeshift-position",
88
88
  POSTER_SRC: "poster-src",
89
89
  DURATION: "duration"
90
- }, Lr = Object.values(r), k = {
90
+ }, wr = Object.values(r), k = {
91
91
  PLAY: "play",
92
92
  PAUSE: "pause",
93
93
  MUTE: "mute",
@@ -109,20 +109,20 @@ const on = 1e3, ln = on * 1e3, gr = ln * 1e3, nn = (c, a, t) => c % a === 0 ? c
109
109
  SEEK: "seek",
110
110
  GO_LIVE: "go-live"
111
111
  };
112
- function wr(c) {
112
+ function Sr(c) {
113
113
  return c === "audio" || c === "video" || c === "audio+video" ? c : "audio+video";
114
114
  }
115
- function rn(c) {
115
+ function an(c) {
116
116
  return c === "trace" || c === "debug" || c === "info" || c === "warn" || c === "error" || c === "off" ? c : "off";
117
117
  }
118
- function tl(c) {
118
+ function el(c) {
119
119
  if (c === null)
120
120
  return;
121
121
  const a = c.split(",").map((t) => t.trim()).filter((t) => t === "h264" || t === "av1");
122
122
  if (a.length !== 0)
123
123
  return a;
124
124
  }
125
- function el(c) {
125
+ function il(c) {
126
126
  if (c !== null)
127
127
  try {
128
128
  const a = JSON.parse(c);
@@ -135,7 +135,7 @@ function el(c) {
135
135
  return;
136
136
  }
137
137
  }
138
- function il(c) {
138
+ function sl(c) {
139
139
  if (c !== null)
140
140
  try {
141
141
  const a = JSON.parse(c);
@@ -167,10 +167,10 @@ function D(c, a) {
167
167
  const t = c.toLowerCase();
168
168
  return t === "false" ? !1 : t === "true" || t === "" ? !0 : a != null ? a : !0;
169
169
  }
170
- function Sr(c, a) {
170
+ function Cr(c, a) {
171
171
  return c === null ? a != null ? a : void 0 : c === "" || c.toLowerCase() === "true" ? !0 : c.toLowerCase() === "false" ? !1 : c;
172
172
  }
173
- function ms(c) {
173
+ function vs(c) {
174
174
  if (c === null)
175
175
  return;
176
176
  const a = {}, t = c.split(",");
@@ -180,14 +180,14 @@ function ms(c) {
180
180
  }
181
181
  return Object.keys(a).length > 0 ? a : void 0;
182
182
  }
183
- function vs(c) {
183
+ function fs(c) {
184
184
  if (c === null)
185
185
  return;
186
186
  const a = c.split(",").map((t) => t.trim()).filter((t) => t.length > 0);
187
187
  return a.length > 0 ? a : void 0;
188
188
  }
189
- const Cr = document.createElement("template");
190
- Cr.innerHTML = /* HTML */
189
+ const xr = document.createElement("template");
190
+ xr.innerHTML = /* HTML */
191
191
  `
192
192
  <style>
193
193
  :host {
@@ -259,7 +259,7 @@ class rt extends HTMLElement {
259
259
  }
260
260
  this.addEventListener("keyup", e(this, ie), { once: !0 });
261
261
  });
262
- this.attachShadow({ mode: "open" }).appendChild(Cr.content.cloneNode(!0));
262
+ this.attachShadow({ mode: "open" }).appendChild(xr.content.cloneNode(!0));
263
263
  }
264
264
  get keysUsed() {
265
265
  return ["Enter", " "];
@@ -283,13 +283,13 @@ class rt extends HTMLElement {
283
283
  }
284
284
  }
285
285
  ge = new WeakMap(), ai = new WeakMap(), ie = new WeakMap(), oi = new WeakMap(), m(rt, "observedAttributes", ["disabled"]);
286
- const xr = document.createElement("template"), Er = (
286
+ const Nr = document.createElement("template"), Ar = (
287
287
  /* SVG */
288
288
  `
289
289
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" ><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 18a3 3 0 0 0 3 -3v-8a3 3 0 0 0 -3 -3h-12a3 3 0 0 0 -3 3v8a3 3 0 0 0 3 3" /><path d="M9 20h6l-3 -5z" /></svg>
290
290
  `
291
291
  );
292
- xr.innerHTML = /* HTML */
292
+ Nr.innerHTML = /* HTML */
293
293
  `
294
294
  <style>
295
295
  :host {
@@ -310,26 +310,26 @@ xr.innerHTML = /* HTML */
310
310
  </style>
311
311
 
312
312
  <slot name="icon">
313
- <slot name="enter">${Er}</slot>
314
- <slot name="exit">${Er}</slot>
313
+ <slot name="enter">${Ar}</slot>
314
+ <slot name="exit">${Ar}</slot>
315
315
  </slot>
316
316
  `;
317
- var li, dn;
317
+ var li, cn;
318
318
  const Ve = class Ve extends rt {
319
319
  constructor() {
320
320
  var t;
321
321
  super();
322
322
  l(this, li);
323
- (t = this.shadowRoot) == null || t.appendChild(xr.content.cloneNode(!0));
323
+ (t = this.shadowRoot) == null || t.appendChild(Nr.content.cloneNode(!0));
324
324
  }
325
325
  connectedCallback() {
326
- super.connectedCallback(), n(this, li, dn).call(this);
326
+ super.connectedCallback(), n(this, li, cn).call(this);
327
327
  }
328
328
  disconnectedCallback() {
329
329
  super.disconnectedCallback();
330
330
  }
331
331
  attributeChangedCallback(t, i, s) {
332
- super.attributeChangedCallback(t, i, s), t === r.IS_AIRPLAYING && n(this, li, dn).call(this);
332
+ super.attributeChangedCallback(t, i, s), t === r.IS_AIRPLAYING && n(this, li, cn).call(this);
333
333
  }
334
334
  set isAirPlaying(t) {
335
335
  t ? this.setAttribute(r.IS_AIRPLAYING, "") : this.removeAttribute(r.IS_AIRPLAYING);
@@ -341,15 +341,15 @@ const Ve = class Ve extends rt {
341
341
  this.dispatchEvent(new CustomEvent(k.REQUEST_AIRPLAY, { bubbles: !0, composed: !0 }));
342
342
  }
343
343
  };
344
- li = new WeakSet(), dn = function() {
344
+ li = new WeakSet(), cn = function() {
345
345
  this.setAttribute("aria-label", this.isAirPlaying ? "Exit airplay" : "Enter airplay");
346
346
  }, m(Ve, "observedAttributes", [
347
347
  ...J(Ve, Ve, "observedAttributes"),
348
348
  r.AIRPLAY_AVAILABLE,
349
349
  r.IS_AIRPLAYING
350
350
  ]);
351
- let hn = Ve;
352
- const Nr = document.createElement("template"), sl = (
351
+ let dn = Ve;
352
+ const Rr = document.createElement("template"), nl = (
353
353
  /* SVG */
354
354
  `
355
355
  <svg width="24" height="24" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
@@ -388,7 +388,7 @@ const Nr = document.createElement("template"), sl = (
388
388
  </svg>
389
389
  `
390
390
  );
391
- Nr.innerHTML = /* HTML */
391
+ Rr.innerHTML = /* HTML */
392
392
  `
393
393
  <style>
394
394
  :host {
@@ -404,14 +404,14 @@ Nr.innerHTML = /* HTML */
404
404
  }
405
405
  </style>
406
406
 
407
- <slot name="icon">${sl}</slot>
407
+ <slot name="icon">${nl}</slot>
408
408
  `;
409
409
  var Ee;
410
- class Rr extends HTMLElement {
410
+ class Ur extends HTMLElement {
411
411
  constructor() {
412
412
  super();
413
413
  l(this, Ee, null);
414
- this.attachShadow({ mode: "open" }).appendChild(Nr.content.cloneNode(!0));
414
+ this.attachShadow({ mode: "open" }).appendChild(Rr.content.cloneNode(!0));
415
415
  }
416
416
  connectedCallback() {
417
417
  var t;
@@ -422,9 +422,9 @@ class Rr extends HTMLElement {
422
422
  (t = e(this, Ee)) == null || t.disconnectListener(this);
423
423
  }
424
424
  }
425
- Ee = new WeakMap(), m(Rr, "observedAttributes", [r.BUFFERING]);
426
- const Ur = document.createElement("template");
427
- Ur.innerHTML = /* HTML */
425
+ Ee = new WeakMap(), m(Ur, "observedAttributes", [r.BUFFERING]);
426
+ const Pr = document.createElement("template");
427
+ Pr.innerHTML = /* HTML */
428
428
  `
429
429
  <style>
430
430
  :host {
@@ -483,11 +483,11 @@ Ur.innerHTML = /* HTML */
483
483
  <div id="buffering-indicator"></div>
484
484
  `;
485
485
  var Ae;
486
- class Pr extends HTMLElement {
486
+ class _r extends HTMLElement {
487
487
  constructor() {
488
488
  super();
489
489
  l(this, Ae, null);
490
- this.attachShadow({ mode: "open" }).appendChild(Ur.content.cloneNode(!0));
490
+ this.attachShadow({ mode: "open" }).appendChild(Pr.content.cloneNode(!0));
491
491
  }
492
492
  connectedCallback() {
493
493
  var t;
@@ -498,9 +498,9 @@ class Pr extends HTMLElement {
498
498
  (t = e(this, Ae)) == null || t.disconnectListener(this);
499
499
  }
500
500
  }
501
- Ae = new WeakMap(), m(Pr, "observedAttributes", [r.BUFFERING]);
502
- const _r = document.createElement("template");
503
- _r.innerHTML = /* HTML */
501
+ Ae = new WeakMap(), m(_r, "observedAttributes", [r.BUFFERING]);
502
+ const Mr = document.createElement("template");
503
+ Mr.innerHTML = /* HTML */
504
504
  `
505
505
  <style>
506
506
  :host {
@@ -525,22 +525,22 @@ _r.innerHTML = /* HTML */
525
525
  }
526
526
  </style>
527
527
  `;
528
- var ve, un, Mr;
528
+ var ve, pn, Dr;
529
529
  const Xe = class Xe extends rt {
530
530
  constructor() {
531
531
  var t;
532
532
  super();
533
533
  l(this, ve);
534
- (t = this.shadowRoot) == null || t.appendChild(_r.content.cloneNode(!0));
534
+ (t = this.shadowRoot) == null || t.appendChild(Mr.content.cloneNode(!0));
535
535
  }
536
536
  connectedCallback() {
537
- super.connectedCallback(), n(this, ve, un).call(this);
537
+ super.connectedCallback(), n(this, ve, pn).call(this);
538
538
  }
539
539
  disconnectedCallback() {
540
540
  super.disconnectedCallback();
541
541
  }
542
542
  attributeChangedCallback(t, i, s) {
543
- super.attributeChangedCallback(t, i, s), t === r.CAST_AVAILABLE && n(this, ve, Mr).call(this), t === r.IS_CASTING && n(this, ve, un).call(this);
543
+ super.attributeChangedCallback(t, i, s), t === r.CAST_AVAILABLE && n(this, ve, Dr).call(this), t === r.IS_CASTING && n(this, ve, pn).call(this);
544
544
  }
545
545
  set isCasting(t) {
546
546
  t ? this.setAttribute(r.IS_CASTING, "") : this.removeAttribute(r.IS_CASTING);
@@ -551,9 +551,9 @@ const Xe = class Xe extends rt {
551
551
  handleClick(t) {
552
552
  }
553
553
  };
554
- ve = new WeakSet(), un = function() {
554
+ ve = new WeakSet(), pn = function() {
555
555
  this.setAttribute("aria-label", this.isCasting ? "Exit cast" : "Enter cast");
556
- }, Mr = function() {
556
+ }, Dr = function() {
557
557
  var t, i;
558
558
  if (!((t = this.shadowRoot) != null && t.querySelector("google-cast-launcher"))) {
559
559
  const s = document.createElement("google-cast-launcher");
@@ -564,9 +564,9 @@ ve = new WeakSet(), un = function() {
564
564
  r.CAST_AVAILABLE,
565
565
  r.IS_CASTING
566
566
  ]);
567
- let cn = Xe;
568
- const Dr = document.createElement("template");
569
- Dr.innerHTML = /* HTML */
567
+ let un = Xe;
568
+ const Fr = document.createElement("template");
569
+ Fr.innerHTML = /* HTML */
570
570
  `
571
571
  <style>
572
572
  :host {
@@ -603,12 +603,12 @@ Dr.innerHTML = /* HTML */
603
603
  <span id="text"></span>
604
604
  `;
605
605
  var ye, ke;
606
- class Fr extends HTMLElement {
606
+ class Or extends HTMLElement {
607
607
  constructor() {
608
608
  super();
609
609
  l(this, ye, null);
610
610
  l(this, ke, null);
611
- this.attachShadow({ mode: "open" }).appendChild(Dr.content.cloneNode(!0));
611
+ this.attachShadow({ mode: "open" }).appendChild(Fr.content.cloneNode(!0));
612
612
  }
613
613
  connectedCallback() {
614
614
  var t, i;
@@ -622,18 +622,18 @@ class Fr extends HTMLElement {
622
622
  i === s || !e(this, ke) || t === "cast-receiver-name" && typeof s == "string" && (e(this, ke).innerText = `Casting to ${s || "device"}`);
623
623
  }
624
624
  }
625
- ye = new WeakMap(), ke = new WeakMap(), m(Fr, "observedAttributes", [r.IS_CASTING, r.CAST_RECEIVER_NAME]);
626
- function Or(c = document) {
625
+ ye = new WeakMap(), ke = new WeakMap(), m(Or, "observedAttributes", [r.IS_CASTING, r.CAST_RECEIVER_NAME]);
626
+ function Hr(c = document) {
627
627
  const a = c == null ? void 0 : c.activeElement;
628
628
  if (!a) return null;
629
629
  if (a.shadowRoot) {
630
- const t = Or(a.shadowRoot);
630
+ const t = Hr(a.shadowRoot);
631
631
  return t != null ? t : a;
632
632
  }
633
633
  return a;
634
634
  }
635
- const Hr = document.createElement("template");
636
- Hr.innerHTML = /* HTML */
635
+ const zr = document.createElement("template");
636
+ zr.innerHTML = /* HTML */
637
637
  `
638
638
  <style>
639
639
  :host {
@@ -701,13 +701,13 @@ Hr.innerHTML = /* HTML */
701
701
  <slot></slot>
702
702
  `;
703
703
  var se;
704
- class hr extends HTMLElement {
704
+ class dr extends HTMLElement {
705
705
  constructor() {
706
706
  super();
707
707
  l(this, se);
708
708
  m(this, "lastThumbnailUpdate");
709
709
  const t = this.attachShadow({ mode: "open" });
710
- d(this, se, document.createElement("span")), e(this, se).className = "channel-title", t.appendChild(e(this, se)), t.appendChild(Hr.content.cloneNode(!0));
710
+ d(this, se, document.createElement("span")), e(this, se).className = "channel-title", t.appendChild(e(this, se)), t.appendChild(zr.content.cloneNode(!0));
711
711
  }
712
712
  attributeChangedCallback(t, i, s) {
713
713
  if (i !== s)
@@ -727,9 +727,9 @@ class hr extends HTMLElement {
727
727
  p && o.searchParams.set("auth.token", p), o.searchParams.set("t", Date.now().toString()), u.src = o.toString(), u.onload = () => this.style.backgroundImage = `url(${o.toString()})`;
728
728
  }
729
729
  }
730
- se = new WeakMap(), m(hr, "observedAttributes", ["url", "title", "offline", "authentication-token", "visible"]);
731
- const zr = document.createElement("template");
732
- zr.innerHTML = /* HTML */
730
+ se = new WeakMap(), m(dr, "observedAttributes", ["url", "title", "offline", "authentication-token", "visible"]);
731
+ const Br = document.createElement("template");
732
+ Br.innerHTML = /* HTML */
733
733
  `
734
734
  <style>
735
735
  :host {
@@ -797,8 +797,8 @@ zr.innerHTML = /* HTML */
797
797
  <slot name="grid" id="grid"></slot>
798
798
  </div>
799
799
  `;
800
- var Rt, Ut, Ie, X, _, Te, hi, di, ci, S, $r, Gr, Kr, pn, qr, Vr, Xr, jr, Yr, Jr, Wr, $e;
801
- class Br extends HTMLElement {
800
+ var Rt, Ut, Ie, X, _, Te, hi, di, ci, S, Gr, Kr, qr, bn, Vr, Xr, jr, Yr, Jr, Wr, Qr, $e;
801
+ class $r extends HTMLElement {
802
802
  constructor() {
803
803
  super();
804
804
  l(this, S);
@@ -812,14 +812,14 @@ class Br extends HTMLElement {
812
812
  l(this, di);
813
813
  l(this, ci);
814
814
  m(this, "handleEvent", (t) => {
815
- t.type === "keydown" && n(this, S, Jr).call(this, t);
815
+ t.type === "keydown" && n(this, S, Wr).call(this, t);
816
816
  });
817
- this.attachShadow({ mode: "open" }).appendChild(zr.content.cloneNode(!0));
817
+ this.attachShadow({ mode: "open" }).appendChild(Br.content.cloneNode(!0));
818
818
  }
819
819
  connectedCallback() {
820
820
  var t, i, s;
821
- d(this, Ut, this.closest("vindral-controller")), (t = e(this, Ut)) == null || t.connectListener(this), n(this, S, $r).call(this), (s = e(this, Rt)) == null || s.observe((i = this.shadowRoot) == null ? void 0 : i.querySelector(".wrapper")), n(this, S, pn).call(this), d(this, hi, window.setInterval(() => {
822
- n(this, S, jr).call(this);
821
+ d(this, Ut, this.closest("vindral-controller")), (t = e(this, Ut)) == null || t.connectListener(this), n(this, S, Gr).call(this), (s = e(this, Rt)) == null || s.observe((i = this.shadowRoot) == null ? void 0 : i.querySelector(".wrapper")), n(this, S, bn).call(this), d(this, hi, window.setInterval(() => {
822
+ n(this, S, Yr).call(this);
823
823
  }, 1e4));
824
824
  }
825
825
  disconnectedCallback() {
@@ -830,11 +830,11 @@ class Br extends HTMLElement {
830
830
  if (i !== s)
831
831
  switch (t) {
832
832
  case r.CHANNEL_ID: {
833
- n(this, S, Xr).call(this, s);
833
+ n(this, S, jr).call(this, s);
834
834
  break;
835
835
  }
836
836
  case r.CHANNELS:
837
- d(this, Ie, JSON.parse(s)), n(this, S, pn).call(this);
837
+ d(this, Ie, JSON.parse(s)), n(this, S, bn).call(this);
838
838
  break;
839
839
  case "authentication-token":
840
840
  d(this, Te, s);
@@ -846,22 +846,22 @@ class Br extends HTMLElement {
846
846
  }
847
847
  focus() {
848
848
  var t;
849
- d(this, di, Or()), (t = e(this, _)) == null || t.focus();
849
+ d(this, di, Hr()), (t = e(this, _)) == null || t.focus();
850
850
  }
851
851
  }
852
- Rt = new WeakMap(), Ut = new WeakMap(), Ie = new WeakMap(), X = new WeakMap(), _ = new WeakMap(), Te = new WeakMap(), hi = new WeakMap(), di = new WeakMap(), ci = new WeakMap(), S = new WeakSet(), $r = function() {
852
+ Rt = new WeakMap(), Ut = new WeakMap(), Ie = new WeakMap(), X = new WeakMap(), _ = new WeakMap(), Te = new WeakMap(), hi = new WeakMap(), di = new WeakMap(), ci = new WeakMap(), S = new WeakSet(), Gr = function() {
853
853
  d(this, Rt, new IntersectionObserver(
854
854
  (t) => {
855
855
  t.forEach((i) => {
856
856
  const { target: s, isIntersecting: o } = i;
857
- s instanceof hr ? n(this, S, Kr).call(this, s, o) : n(this, S, Gr).call(this, o);
857
+ s instanceof dr ? n(this, S, qr).call(this, s, o) : n(this, S, Kr).call(this, o);
858
858
  });
859
859
  },
860
860
  {
861
861
  root: e(this, Ut)
862
862
  }
863
863
  ));
864
- }, Gr = function(t) {
864
+ }, Kr = function(t) {
865
865
  var i, s;
866
866
  if (t) {
867
867
  this.dispatchEvent(new CustomEvent(k.CHANNEL_GRID_OPENED, { bubbles: !0, composed: !0 }));
@@ -874,17 +874,17 @@ Rt = new WeakMap(), Ut = new WeakMap(), Ie = new WeakMap(), X = new WeakMap(), _
874
874
  (i = this.parentElement) == null || i.addEventListener("scroll", o), this.addEventListener("keydown", this), e(this, _) && (e(this, _).tabIndex = 0);
875
875
  } else
876
876
  e(this, _) && (e(this, _).tabIndex = -1), this.dispatchEvent(new CustomEvent(k.CHANNEL_GRID_CLOSED, { bubbles: !0, composed: !0 })), (s = e(this, di)) == null || s.focus(), this.removeEventListener("keydown", this);
877
- }, Kr = function(t, i) {
877
+ }, qr = function(t, i) {
878
878
  i ? (t.setAttribute("visible", ""), (!t.lastThumbnailUpdate || Date.now() - t.lastThumbnailUpdate >= 1e4) && (t.updateThumbnail(), t.lastThumbnailUpdate = Date.now())) : t.removeAttribute("visible");
879
- }, pn = function() {
879
+ }, bn = function() {
880
880
  var o;
881
881
  const t = (o = this.shadowRoot) == null ? void 0 : o.querySelector("slot[name=grid]"), i = new Map(e(this, X).map((u) => [u.id, u])), s = this.getAttribute("channel-id");
882
882
  d(this, X, e(this, Ie).map((u) => {
883
883
  var A;
884
884
  const p = i.get(u.channelId);
885
885
  if (p)
886
- return n(this, S, qr).call(this, p.element, u), p;
887
- const v = n(this, S, Vr).call(this, u, s);
886
+ return n(this, S, Vr).call(this, p.element, u), p;
887
+ const v = n(this, S, Xr).call(this, u, s);
888
888
  return (A = e(this, Rt)) == null || A.observe(v.element), t.contains(v.element) || t.appendChild(v.element), v;
889
889
  })), i.forEach((u, p) => {
890
890
  var v;
@@ -892,25 +892,25 @@ Rt = new WeakMap(), Ut = new WeakMap(), Ie = new WeakMap(), X = new WeakMap(), _
892
892
  }), e(this, X).sort((u, p) => u.element.hasAttribute("offline") && !p.element.hasAttribute("offline") ? 1 : -1).forEach((u) => {
893
893
  t.contains(u.element) || t.appendChild(u.element);
894
894
  });
895
- }, qr = function(t, i) {
896
- i.isLive ? t.removeAttribute("offline") : t.setAttribute("offline", ""), t.setAttribute("url", i.thumbnailUrls[0] || ""), t.setAttribute("title", i.name);
897
895
  }, Vr = function(t, i) {
896
+ i.isLive ? t.removeAttribute("offline") : t.setAttribute("offline", ""), t.setAttribute("url", i.thumbnailUrls[0] || ""), t.setAttribute("title", i.name);
897
+ }, Xr = function(t, i) {
898
898
  const s = document.createElement("vindral-channel-grid-item");
899
- return s.setAttribute("url", t.thumbnailUrls[0] || ""), s.setAttribute("title", t.name), e(this, Te) && s.setAttribute("authentication-token", e(this, Te)), t.isLive || s.setAttribute("offline", ""), t.channelId === i && (s.setAttribute("aria-selected", "true"), d(this, _, s)), s.tabIndex = -1, s.onclick = () => n(this, S, Yr).call(this, t), { element: s, thumbnail: t.thumbnailUrls[0] || "", id: t.channelId };
900
- }, Xr = function(t) {
899
+ return s.setAttribute("url", t.thumbnailUrls[0] || ""), s.setAttribute("title", t.name), e(this, Te) && s.setAttribute("authentication-token", e(this, Te)), t.isLive || s.setAttribute("offline", ""), t.channelId === i && (s.setAttribute("aria-selected", "true"), d(this, _, s)), s.tabIndex = -1, s.onclick = () => n(this, S, Jr).call(this, t), { element: s, thumbnail: t.thumbnailUrls[0] || "", id: t.channelId };
900
+ }, jr = function(t) {
901
901
  e(this, X).forEach((i) => {
902
902
  i.id === t ? (i.element.setAttribute("aria-selected", "true"), i.element.tabIndex = 0, d(this, _, i.element)) : (i.element.tabIndex = -1, i.element.setAttribute("aria-selected", "false"));
903
903
  });
904
- }, jr = function() {
904
+ }, Yr = function() {
905
905
  this.hasAttribute("hidden") || e(this, X).forEach((t) => t.element.updateThumbnail());
906
- }, Yr = function(t) {
906
+ }, Jr = function(t) {
907
907
  var i;
908
908
  (i = e(this, Ut)) == null || i.setAttribute("channel-id", t.channelId);
909
- }, Jr = function(t) {
909
+ }, Wr = function(t) {
910
910
  var p, v, A;
911
911
  const { key: i, ctrlKey: s, altKey: o, metaKey: u } = t;
912
- s || o || u || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? ((p = this.parentElement) == null || p.removeAttribute("open"), (v = e(this, Ut)) == null || v.focus()) : i === "Enter" || i === " " ? (A = e(this, _)) == null || A.click() : n(this, S, Wr).call(this, t));
913
- }, Wr = function(t) {
912
+ s || o || u || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? ((p = this.parentElement) == null || p.removeAttribute("open"), (v = e(this, Ut)) == null || v.focus()) : i === "Enter" || i === " " ? (A = e(this, _)) == null || A.click() : n(this, S, Qr).call(this, t));
913
+ }, Qr = function(t) {
914
914
  var p;
915
915
  if (!e(this, _)) return;
916
916
  const { key: i } = t;
@@ -953,14 +953,14 @@ Rt = new WeakMap(), Ut = new WeakMap(), Ie = new WeakMap(), X = new WeakMap(), _
953
953
  at < u && (u = at, o = v);
954
954
  }
955
955
  }), o;
956
- }, m(Br, "observedAttributes", [
956
+ }, m($r, "observedAttributes", [
957
957
  r.CHANNELS,
958
958
  r.CHANNEL_ID,
959
959
  r.AUTHENTICATION_TOKEN,
960
960
  "mode",
961
961
  "hidden"
962
962
  ]);
963
- const nl = (
963
+ const rl = (
964
964
  /* SVG */
965
965
  `
966
966
  <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="currentColor" stroke-linecap="round" stroke-linejoin="round">
@@ -971,8 +971,8 @@ const nl = (
971
971
  <path d="M14 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" />
972
972
  </svg>
973
973
  `
974
- ), Qr = document.createElement("template");
975
- Qr.innerHTML = /* HTML */
974
+ ), Zr = document.createElement("template");
975
+ Zr.innerHTML = /* HTML */
976
976
  `
977
977
  <style>
978
978
  :host {
@@ -986,9 +986,9 @@ Qr.innerHTML = /* HTML */
986
986
  display: none;
987
987
  }
988
988
  </style>
989
- <slot name="button">${nl}</slot>
989
+ <slot name="button">${rl}</slot>
990
990
  `;
991
- var Le, G, tt, xs, $, Zr, mn, fs, vn, fn;
991
+ var Le, G, tt, Ns, $, ta, vn, gs, fn, gn;
992
992
  const je = class je extends rt {
993
993
  constructor() {
994
994
  var t, i;
@@ -997,37 +997,37 @@ const je = class je extends rt {
997
997
  l(this, Le);
998
998
  l(this, G);
999
999
  l(this, tt);
1000
- l(this, xs, (t) => {
1001
- t.composedPath().includes(this) || n(this, $, fs).call(this);
1000
+ l(this, Ns, (t) => {
1001
+ t.composedPath().includes(this) || n(this, $, gs).call(this);
1002
1002
  });
1003
- (t = this.shadowRoot) == null || t.appendChild(Qr.content.cloneNode(!0)), d(this, Le, (i = this.shadowRoot) == null ? void 0 : i.querySelector("slot[name=button]"));
1003
+ (t = this.shadowRoot) == null || t.appendChild(Zr.content.cloneNode(!0)), d(this, Le, (i = this.shadowRoot) == null ? void 0 : i.querySelector("slot[name=button]"));
1004
1004
  }
1005
1005
  connectedCallback() {
1006
1006
  var i;
1007
- super.connectedCallback(), this.setAttribute("aria-haspopup", "listbox"), this.enable(), n(this, $, vn).call(this);
1007
+ super.connectedCallback(), this.setAttribute("aria-haspopup", "listbox"), this.enable(), n(this, $, fn).call(this);
1008
1008
  const t = this.getRootNode();
1009
- (t instanceof Document || t instanceof ShadowRoot) && (d(this, G, t.querySelector("vindral-channel-grid")), ((i = e(this, G).parentElement) == null ? void 0 : i.localName) === "vindral-scroll-overlay" && (e(this, G).hidden = !1, e(this, G).style.position = "relative", d(this, tt, e(this, G).parentElement))), n(this, $, fn).call(this);
1009
+ (t instanceof Document || t instanceof ShadowRoot) && (d(this, G, t.querySelector("vindral-channel-grid")), ((i = e(this, G).parentElement) == null ? void 0 : i.localName) === "vindral-scroll-overlay" && (e(this, G).hidden = !1, e(this, G).style.position = "relative", d(this, tt, e(this, G).parentElement))), n(this, $, gn).call(this);
1010
1010
  }
1011
1011
  disconnectedCallback() {
1012
1012
  }
1013
1013
  attributeChangedCallback(t, i, s) {
1014
- super.attributeChangedCallback(t, i, s), (t === r.CHANNEL_GROUP_ID || t === r.CHANNELS) && n(this, $, vn).call(this);
1014
+ super.attributeChangedCallback(t, i, s), (t === r.CHANNEL_GROUP_ID || t === r.CHANNELS) && n(this, $, fn).call(this);
1015
1015
  }
1016
1016
  enable() {
1017
- super.enable(), document.addEventListener("click", e(this, xs));
1017
+ super.enable(), document.addEventListener("click", e(this, Ns));
1018
1018
  }
1019
1019
  handleClick(t) {
1020
- n(this, $, Zr).call(this);
1020
+ n(this, $, ta).call(this);
1021
1021
  }
1022
1022
  get isOpen() {
1023
1023
  var t, i;
1024
1024
  return ((t = e(this, tt)) == null ? void 0 : t.hasAttribute("open")) || !((i = e(this, G)) != null && i.hidden);
1025
1025
  }
1026
1026
  };
1027
- Le = new WeakMap(), G = new WeakMap(), tt = new WeakMap(), xs = new WeakMap(), $ = new WeakSet(), Zr = function() {
1027
+ Le = new WeakMap(), G = new WeakMap(), tt = new WeakMap(), Ns = new WeakMap(), $ = new WeakSet(), ta = function() {
1028
1028
  var t;
1029
- e(this, tt) ? e(this, tt).hasAttribute("open") ? n(this, $, fs).call(this) : n(this, $, mn).call(this) : (t = e(this, G)) != null && t.hidden ? n(this, $, mn).call(this) : n(this, $, fs).call(this), n(this, $, fn).call(this);
1030
- }, mn = function() {
1029
+ e(this, tt) ? e(this, tt).hasAttribute("open") ? n(this, $, gs).call(this) : n(this, $, vn).call(this) : (t = e(this, G)) != null && t.hidden ? n(this, $, vn).call(this) : n(this, $, gs).call(this), n(this, $, gn).call(this);
1030
+ }, vn = function() {
1031
1031
  var t;
1032
1032
  if (e(this, tt))
1033
1033
  e(this, tt).setAttribute("open", "");
@@ -1036,7 +1036,7 @@ Le = new WeakMap(), G = new WeakMap(), tt = new WeakMap(), xs = new WeakMap(), $
1036
1036
  e(this, G).hidden = !1, e(this, G).focus();
1037
1037
  }
1038
1038
  e(this, Le).setAttribute("aria-expanded", "true");
1039
- }, fs = function() {
1039
+ }, gs = function() {
1040
1040
  if (e(this, tt))
1041
1041
  e(this, tt).removeAttribute("open");
1042
1042
  else {
@@ -1044,9 +1044,9 @@ Le = new WeakMap(), G = new WeakMap(), tt = new WeakMap(), xs = new WeakMap(), $
1044
1044
  e(this, G).hidden = !0;
1045
1045
  }
1046
1046
  e(this, Le).setAttribute("aria-expanded", "false");
1047
- }, vn = function() {
1048
- this.getAttribute(r.CHANNEL_GROUP_ID) ? this.removeAttribute("hidden") : this.setAttribute("hidden", ""), this.hasAttribute(r.CHANNELS) ? this.removeAttribute("disabled") : this.setAttribute("disabled", "");
1049
1047
  }, fn = function() {
1048
+ this.getAttribute(r.CHANNEL_GROUP_ID) ? this.removeAttribute("hidden") : this.setAttribute("hidden", ""), this.hasAttribute(r.CHANNELS) ? this.removeAttribute("disabled") : this.setAttribute("disabled", "");
1049
+ }, gn = function() {
1050
1050
  this.setAttribute("aria-label", this.isOpen ? "Exit grid" : "Enter grid");
1051
1051
  }, m(je, "observedAttributes", [
1052
1052
  ...J(je, je, "observedAttributes"),
@@ -1054,9 +1054,9 @@ Le = new WeakMap(), G = new WeakMap(), tt = new WeakMap(), xs = new WeakMap(), $
1054
1054
  r.CHANNELS,
1055
1055
  "hidden"
1056
1056
  ]);
1057
- let bn = je;
1058
- const ta = document.createElement("template");
1059
- ta.innerHTML = /* HTML */
1057
+ let mn = je;
1058
+ const ea = document.createElement("template");
1059
+ ea.innerHTML = /* HTML */
1060
1060
  `
1061
1061
  <style>
1062
1062
  :host {
@@ -1085,17 +1085,17 @@ ta.innerHTML = /* HTML */
1085
1085
  <slot name="right"></slot>
1086
1086
  </slot>
1087
1087
  `;
1088
- class ea extends HTMLElement {
1088
+ class ia extends HTMLElement {
1089
1089
  constructor() {
1090
- super(), this.attachShadow({ mode: "open" }).appendChild(ta.content.cloneNode(!0));
1090
+ super(), this.attachShadow({ mode: "open" }).appendChild(ea.content.cloneNode(!0));
1091
1091
  }
1092
1092
  connectedCallback() {
1093
1093
  }
1094
1094
  disconnectedCallback() {
1095
1095
  }
1096
1096
  }
1097
- m(ea, "observedAttributes", []);
1098
- class rl extends ds {
1097
+ m(ia, "observedAttributes", []);
1098
+ class al extends ds {
1099
1099
  constructor(t) {
1100
1100
  super();
1101
1101
  m(this, "config");
@@ -1219,8 +1219,8 @@ const ee = class ee extends ds {
1219
1219
  };
1220
1220
  m(ee, "isFullscreenApiSupported", (t) => (t.requestFullscreen || t.webkitRequestFullscreen || t.webkitEnterFullscreen || t.mozRequestFullScreen) !== void 0);
1221
1221
  let pt = ee;
1222
- var Ns, Rs, Us, Ps, we, _s, Ms, ui, Se;
1223
- class Ar extends ds {
1222
+ var Rs, Us, Ps, _s, we, Ms, Ds, ui, Se;
1223
+ class yr extends ds {
1224
1224
  constructor(t) {
1225
1225
  super();
1226
1226
  m(this, "unload", () => {
@@ -1228,14 +1228,14 @@ class Ar extends ds {
1228
1228
  });
1229
1229
  m(this, "request", () => B(this, null, function* () {
1230
1230
  try {
1231
- return yield e(this, Ns).call(this);
1231
+ return yield e(this, Rs).call(this);
1232
1232
  } catch (t) {
1233
1233
  throw this.onChange(), t;
1234
1234
  }
1235
1235
  }));
1236
1236
  m(this, "exit", () => B(this, null, function* () {
1237
1237
  try {
1238
- return yield e(this, Rs).call(this);
1238
+ return yield e(this, Us).call(this);
1239
1239
  } catch (t) {
1240
1240
  throw this.onChange(), t;
1241
1241
  }
@@ -1243,19 +1243,19 @@ class Ar extends ds {
1243
1243
  m(this, "onChange", () => {
1244
1244
  this.emit("on picture in picture change", this.isPictureInPictureActive());
1245
1245
  });
1246
- m(this, "isPictureInPictureActive", () => e(this, Ms).call(this) || e(this, _s).call(this));
1246
+ m(this, "isPictureInPictureActive", () => e(this, Ds).call(this) || e(this, Ms).call(this));
1247
1247
  m(this, "isSupported", () => e(this, Se).call(this) || e(this, we).call(this));
1248
- l(this, Ns, () => e(this, we).call(this) ? e(this, Us).call(this) : e(this, Se).call(this) ? e(this, ui).call(this, "picture-in-picture") : Promise.resolve());
1249
- l(this, Rs, () => this.isPictureInPictureActive() ? e(this, we).call(this) ? e(this, Ps).call(this) : e(this, Se).call(this) ? e(this, ui).call(this, "inline") : Promise.resolve() : Promise.resolve());
1250
- l(this, Us, () => B(this, null, function* () {
1248
+ l(this, Rs, () => e(this, we).call(this) ? e(this, Ps).call(this) : e(this, Se).call(this) ? e(this, ui).call(this, "picture-in-picture") : Promise.resolve());
1249
+ l(this, Us, () => this.isPictureInPictureActive() ? e(this, we).call(this) ? e(this, _s).call(this) : e(this, Se).call(this) ? e(this, ui).call(this, "inline") : Promise.resolve() : Promise.resolve());
1250
+ l(this, Ps, () => B(this, null, function* () {
1251
1251
  yield this.element.requestPictureInPicture();
1252
1252
  }));
1253
- l(this, Ps, () => B(null, null, function* () {
1253
+ l(this, _s, () => B(null, null, function* () {
1254
1254
  yield document.exitPictureInPicture();
1255
1255
  }));
1256
1256
  l(this, we, () => !!this.element.requestPictureInPicture && !!document.pictureInPictureEnabled);
1257
- l(this, _s, () => !!document.pictureInPictureElement);
1258
- l(this, Ms, () => this.element.webkitPresentationMode === "picture-in-picture");
1257
+ l(this, Ms, () => !!document.pictureInPictureElement);
1258
+ l(this, Ds, () => this.element.webkitPresentationMode === "picture-in-picture");
1259
1259
  l(this, ui, (t) => (this.element.webkitSetPresentationMode && this.element.webkitSetPresentationMode(t), Promise.resolve()));
1260
1260
  l(this, Se, () => !!this.element.webkitSetPresentationMode);
1261
1261
  this.element = t, this.element.addEventListener("enterpictureinpicture", this.onChange), this.element.addEventListener("leavepictureinpicture", this.onChange), this.element.setAttribute("autopictureinpicture", "");
@@ -1264,13 +1264,13 @@ class Ar extends ds {
1264
1264
  return this.element;
1265
1265
  }
1266
1266
  }
1267
- Ns = new WeakMap(), Rs = new WeakMap(), Us = new WeakMap(), Ps = new WeakMap(), we = new WeakMap(), _s = new WeakMap(), Ms = new WeakMap(), ui = new WeakMap(), Se = new WeakMap();
1268
- const yr = (c) => {
1267
+ Rs = new WeakMap(), Us = new WeakMap(), Ps = new WeakMap(), _s = new WeakMap(), we = new WeakMap(), Ms = new WeakMap(), Ds = new WeakMap(), ui = new WeakMap(), Se = new WeakMap();
1268
+ const kr = (c) => {
1269
1269
  var t;
1270
1270
  let a = "observedAttributes" in c.constructor ? c.constructor.observedAttributes : void 0;
1271
- return !a && ((t = c.nodeName) != null && t.includes("-")) && (globalThis.customElements.upgrade(c), a = "observedAttributes" in c.constructor ? c.constructor.observedAttributes : void 0), Array.isArray(a) ? a.filter((i) => Lr.includes(i)) : [];
1271
+ return !a && ((t = c.nodeName) != null && t.includes("-")) && (globalThis.customElements.upgrade(c), a = "observedAttributes" in c.constructor ? c.constructor.observedAttributes : void 0), Array.isArray(a) ? a.filter((i) => wr.includes(i)) : [];
1272
1272
  };
1273
- function al(c) {
1273
+ function ol(c) {
1274
1274
  if (typeof c != "string") return NaN;
1275
1275
  const a = /(\d+(?:\.\d+)?)([hms])/gi, t = [...c.matchAll(a)];
1276
1276
  return t.length === 0 ? NaN : t.reduce((i, [, s, o]) => {
@@ -1287,7 +1287,7 @@ function al(c) {
1287
1287
  }
1288
1288
  }, 0);
1289
1289
  }
1290
- class kr extends ds {
1290
+ class Ir extends ds {
1291
1291
  constructor(t) {
1292
1292
  super();
1293
1293
  m(this, "audioContext");
@@ -1350,8 +1350,8 @@ class kr extends ds {
1350
1350
  return this.source instanceof HTMLMediaElement;
1351
1351
  }
1352
1352
  }
1353
- var f, M, w, Ce, bt, mt, Pt, ne, _t, et, pi, xe, C, T, ia, gn, sa, En, An, na, ra, aa, oa, la, ha, Ds, Fs, Ge, Qt;
1354
- class ol {
1353
+ var f, M, w, Ce, bt, mt, Pt, ne, _t, et, pi, xe, C, T, sa, En, na, An, yn, ra, aa, oa, la, ha, da, Fs, Os, Ge, Qt;
1354
+ class ll {
1355
1355
  constructor(a, t) {
1356
1356
  l(this, T);
1357
1357
  l(this, f);
@@ -1367,16 +1367,16 @@ class ol {
1367
1367
  l(this, et, null);
1368
1368
  l(this, pi, 0);
1369
1369
  l(this, xe, !1);
1370
- l(this, C, Tr.get().createContext("HlsPlayer"));
1371
- l(this, Ds, () => {
1370
+ l(this, C, Lr.get().createContext("HlsPlayer"));
1371
+ l(this, Fs, () => {
1372
1372
  e(this, f).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !e(this, f).paused && n(this, T, Ge).call(this, !1);
1373
1373
  });
1374
- l(this, Fs, () => {
1374
+ l(this, Os, () => {
1375
1375
  e(this, f).readyState >= HTMLMediaElement.HAVE_FUTURE_DATA && n(this, T, Ge).call(this, !1);
1376
1376
  });
1377
1377
  d(this, M, a), d(this, Pt, t == null ? void 0 : t.maxVideoBitRate), e(this, M).style.position = "absolute", e(this, M).style.top = "0", e(this, M).style.left = "0", e(this, M).style.width = "100%", e(this, M).style.height = "100%", e(this, M).style.opacity = "0", e(this, M).style.pointerEvents = "none", e(this, M).style.transition = "opacity 0.12s linear";
1378
1378
  const i = document.createElement("video");
1379
- d(this, f, i), a.appendChild(e(this, f)), e(this, f).style.width = "100%", e(this, f).style.height = "100%", e(this, f).setAttribute("playsinline", ""), e(this, f).setAttribute("webkit-playsinline", ""), e(this, f).setAttribute("preload", "metadata"), n(this, T, ha).call(this), d(this, xe, e(this, f).muted), (t == null ? void 0 : t.volume) !== void 0 && (this.volume = t.volume), (t == null ? void 0 : t.muted) !== void 0 && (this.muted = t.muted);
1379
+ d(this, f, i), a.appendChild(e(this, f)), e(this, f).style.width = "100%", e(this, f).style.height = "100%", e(this, f).setAttribute("playsinline", ""), e(this, f).setAttribute("webkit-playsinline", ""), e(this, f).setAttribute("preload", "metadata"), n(this, T, da).call(this), d(this, xe, e(this, f).muted), (t == null ? void 0 : t.volume) !== void 0 && (this.volume = t.volume), (t == null ? void 0 : t.muted) !== void 0 && (this.muted = t.muted);
1380
1380
  }
1381
1381
  hide() {
1382
1382
  d(this, ne, !0), d(this, _t, !1), e(this, M).classList.remove("active"), e(this, M).style.opacity = "0", e(this, M).style.pointerEvents = "none", d(this, et, null);
@@ -1397,9 +1397,9 @@ class ol {
1397
1397
  return;
1398
1398
  }
1399
1399
  if (d(this, et, a.time > 0.1 ? a.time : null), this.isActive() && e(this, w))
1400
- n(this, T, An).call(this, a.time);
1400
+ n(this, T, yn).call(this, a.time);
1401
1401
  else
1402
- return n(this, T, na).call(this, a);
1402
+ return n(this, T, ra).call(this, a);
1403
1403
  });
1404
1404
  }
1405
1405
  shouldIgnoreTimeupdate() {
@@ -1420,7 +1420,7 @@ class ol {
1420
1420
  return e(this, M).style.opacity === "1" || e(this, M).classList.contains("active");
1421
1421
  }
1422
1422
  cleanup() {
1423
- n(this, T, En).call(this), e(this, mt) && (cancelAnimationFrame(e(this, mt)), d(this, mt, void 0)), d(this, et, null);
1423
+ n(this, T, An).call(this), e(this, mt) && (cancelAnimationFrame(e(this, mt)), d(this, mt, void 0)), d(this, et, null);
1424
1424
  }
1425
1425
  addEventListener(a, t) {
1426
1426
  e(this, f).addEventListener(a, t);
@@ -1471,10 +1471,10 @@ class ol {
1471
1471
  return e(this, Pt);
1472
1472
  }
1473
1473
  set maxVideoBitRate(a) {
1474
- d(this, Pt, a), a !== void 0 && e(this, w) && n(this, T, gn).call(this, a);
1474
+ d(this, Pt, a), a !== void 0 && e(this, w) && n(this, T, En).call(this, a);
1475
1475
  }
1476
1476
  }
1477
- f = new WeakMap(), M = new WeakMap(), w = new WeakMap(), Ce = new WeakMap(), bt = new WeakMap(), mt = new WeakMap(), Pt = new WeakMap(), ne = new WeakMap(), _t = new WeakMap(), et = new WeakMap(), pi = new WeakMap(), xe = new WeakMap(), C = new WeakMap(), T = new WeakSet(), ia = function() {
1477
+ f = new WeakMap(), M = new WeakMap(), w = new WeakMap(), Ce = new WeakMap(), bt = new WeakMap(), mt = new WeakMap(), Pt = new WeakMap(), ne = new WeakMap(), _t = new WeakMap(), et = new WeakMap(), pi = new WeakMap(), xe = new WeakMap(), C = new WeakMap(), T = new WeakSet(), sa = function() {
1478
1478
  return B(this, null, function* () {
1479
1479
  const { default: a } = yield import("./h5LA1Y1W.js");
1480
1480
  if (d(this, Ce, a), !a.isSupported()) {
@@ -1502,10 +1502,10 @@ f = new WeakMap(), M = new WeakMap(), w = new WeakMap(), Ce = new WeakMap(), bt
1502
1502
  testBandwidth: !1,
1503
1503
  debug: !1
1504
1504
  })), e(this, w).attachMedia(e(this, f)), e(this, w).on(a.Events.MEDIA_ATTACHED, () => e(this, C).debug("[HLS] media attached")), e(this, w).on(a.Events.MANIFEST_PARSED, () => e(this, C).debug("[HLS] manifest parsed")), e(this, w).on(a.Events.ERROR, (t, i) => {
1505
- e(this, C).error("[HLS] error:", i), i.fatal && n(this, T, sa).call(this, i);
1505
+ e(this, C).error("[HLS] error:", i), i.fatal && n(this, T, na).call(this, i);
1506
1506
  }), e(this, w).on(a.Events.MANIFEST_PARSED, () => {
1507
1507
  var t;
1508
- !e(this, Pt) || ((t = e(this, w)) == null ? void 0 : t.levels.length) === 0 || n(this, T, gn).call(this, e(this, Pt));
1508
+ !e(this, Pt) || ((t = e(this, w)) == null ? void 0 : t.levels.length) === 0 || n(this, T, En).call(this, e(this, Pt));
1509
1509
  }), e(this, w).on(a.Events.LEVEL_SWITCHED, () => {
1510
1510
  var t, i;
1511
1511
  e(this, C).debug(
@@ -1518,7 +1518,7 @@ f = new WeakMap(), M = new WeakMap(), w = new WeakMap(), Ce = new WeakMap(), bt
1518
1518
  );
1519
1519
  });
1520
1520
  });
1521
- }, gn = function(a) {
1521
+ }, En = function(a) {
1522
1522
  var s;
1523
1523
  if (!e(this, w)) {
1524
1524
  e(this, C).warn("HLS not initialized, cannot set bitrate cap");
@@ -1530,7 +1530,7 @@ f = new WeakMap(), M = new WeakMap(), w = new WeakMap(), Ce = new WeakMap(), bt
1530
1530
  ));
1531
1531
  const i = e(this, w).currentLevel;
1532
1532
  e(this, w).autoLevelCapping = t, i !== t && (e(this, C).debug(`Current level ${i} exceeds cap ${t}, forcing immediate switch`), e(this, w).currentLevel = t);
1533
- }, sa = function(a) {
1533
+ }, na = function(a) {
1534
1534
  var i, s;
1535
1535
  if (!e(this, Ce)) {
1536
1536
  e(this, C).error("Hls class not available for error handling");
@@ -1545,34 +1545,34 @@ f = new WeakMap(), M = new WeakMap(), w = new WeakMap(), Ce = new WeakMap(), bt
1545
1545
  e(this, C).warn("[HLS] media error -> recoverMediaError"), (s = e(this, w)) == null || s.recoverMediaError();
1546
1546
  break;
1547
1547
  default:
1548
- e(this, C).error("[HLS] fatal -> destroy"), n(this, T, En).call(this);
1548
+ e(this, C).error("[HLS] fatal -> destroy"), n(this, T, An).call(this);
1549
1549
  break;
1550
1550
  }
1551
- }, En = function() {
1551
+ }, An = function() {
1552
1552
  e(this, w) && (e(this, w).destroy(), d(this, w, void 0));
1553
- }, An = function(a) {
1553
+ }, yn = function(a) {
1554
1554
  if (!Number.isFinite(a)) {
1555
1555
  d(this, et, null);
1556
1556
  return;
1557
1557
  }
1558
- const t = n(this, T, la).call(this, e(this, f), a);
1558
+ const t = n(this, T, ha).call(this, e(this, f), a);
1559
1559
  d(this, et, t > 0.1 ? t : null), e(this, mt) && cancelAnimationFrame(e(this, mt)), d(this, mt, requestAnimationFrame(() => {
1560
1560
  e(this, f).currentTime = t;
1561
1561
  }));
1562
- }, na = function(a) {
1562
+ }, ra = function(a) {
1563
1563
  return B(this, null, function* () {
1564
- const { time: t, playWhenReady: i = !0 } = a || {}, s = ++fr(this, pi)._;
1564
+ const { time: t, playWhenReady: i = !0 } = a || {}, s = ++gr(this, pi)._;
1565
1565
  if (!e(this, bt)) {
1566
1566
  e(this, C).warn("No timeshift URL");
1567
1567
  return;
1568
1568
  }
1569
- if (!e(this, w) && (yield n(this, T, ia).call(this), !n(this, T, Qt).call(this, s)))
1569
+ if (!e(this, w) && (yield n(this, T, sa).call(this), !n(this, T, Qt).call(this, s)))
1570
1570
  return;
1571
1571
  d(this, ne, !1), d(this, _t, !1), e(this, w) && (!e(this, w).url || e(this, w).url !== e(this, bt)) && (e(this, C).debug("Loading timeshift URL", e(this, bt)), e(this, w).loadSource(e(this, bt)));
1572
1572
  const o = this.muted;
1573
- e(this, f).muted = !0, yield n(this, T, ra).call(this), n(this, T, Qt).call(this, s) && (n(this, T, An).call(this, t), !(i && (yield this.play(), !n(this, T, Qt).call(this, s))) && n(this, T, aa).call(this, o, s));
1573
+ e(this, f).muted = !0, yield n(this, T, aa).call(this), n(this, T, Qt).call(this, s) && (n(this, T, yn).call(this, t), !(i && (yield this.play(), !n(this, T, Qt).call(this, s))) && n(this, T, oa).call(this, o, s));
1574
1574
  });
1575
- }, ra = function() {
1575
+ }, aa = function() {
1576
1576
  return e(this, f).duration && !isNaN(e(this, f).duration) ? Promise.resolve() : new Promise((a) => {
1577
1577
  e(this, C).debug("Waiting for duration...");
1578
1578
  const t = () => {
@@ -1582,13 +1582,13 @@ f = new WeakMap(), M = new WeakMap(), w = new WeakMap(), Ce = new WeakMap(), bt
1582
1582
  }, 2e4);
1583
1583
  e(this, f).addEventListener("loadedmetadata", t);
1584
1584
  });
1585
- }, aa = function(a, t) {
1585
+ }, oa = function(a, t) {
1586
1586
  const i = HTMLMediaElement.HAVE_CURRENT_DATA, s = () => e(this, f).readyState >= i && e(this, f).videoWidth > 0 && e(this, f).videoHeight > 0, o = () => {
1587
1587
  e(this, ne) || e(this, _t) || !n(this, T, Qt).call(this, t) || (d(this, _t, !0), e(this, C).debug("Revealing timeshift video"), e(this, M).classList.add("active"), e(this, M).style.opacity = "1", e(this, M).style.pointerEvents = "auto", e(this, f).dispatchEvent(
1588
1588
  new CustomEvent("timeshiftready", {
1589
1589
  detail: { activationId: t }
1590
1590
  })
1591
- ), a || n(this, T, oa).call(this, t));
1591
+ ), a || n(this, T, la).call(this, t));
1592
1592
  }, u = () => {
1593
1593
  e(this, ne) || e(this, _t) || !n(this, T, Qt).call(this, t) || s() && (v(), o());
1594
1594
  };
@@ -1604,7 +1604,7 @@ f = new WeakMap(), M = new WeakMap(), w = new WeakMap(), Ce = new WeakMap(), bt
1604
1604
  const A = setTimeout(() => {
1605
1605
  e(this, C).debug("Timeout reached, forcing reveal"), v(), o();
1606
1606
  }, 2e3);
1607
- }, oa = function(a) {
1607
+ }, la = function(a) {
1608
1608
  const t = () => {
1609
1609
  n(this, T, Qt).call(this, a) && (e(this, f).muted = !1);
1610
1610
  };
@@ -1615,15 +1615,15 @@ f = new WeakMap(), M = new WeakMap(), w = new WeakMap(), Ce = new WeakMap(), bt
1615
1615
  }) : setTimeout(() => {
1616
1616
  t();
1617
1617
  }, 120);
1618
- }, la = function(a, t) {
1618
+ }, ha = function(a, t) {
1619
1619
  const i = a.seekable;
1620
1620
  if (!i || i.length === 0) return t;
1621
1621
  const s = i.start(0), o = i.end(i.length - 1);
1622
1622
  return e(this, C).debug("Clamped seekable:", Math.max(s, Math.min(t, o))), Math.max(s, Math.min(t, o));
1623
- }, ha = function() {
1623
+ }, da = function() {
1624
1624
  const a = ["waiting", "seeking", "stalled", "loadstart"], t = ["canplay", "canplaythrough", "seeked", "loadeddata"];
1625
- a.forEach((i) => e(this, f).addEventListener(i, () => n(this, T, Ge).call(this, !0))), t.forEach((i) => e(this, f).addEventListener(i, () => n(this, T, Ge).call(this, !1))), e(this, f).addEventListener("timeupdate", e(this, Ds)), e(this, f).addEventListener("progress", e(this, Fs));
1626
- }, Ds = new WeakMap(), Fs = new WeakMap(), Ge = function(a) {
1625
+ a.forEach((i) => e(this, f).addEventListener(i, () => n(this, T, Ge).call(this, !0))), t.forEach((i) => e(this, f).addEventListener(i, () => n(this, T, Ge).call(this, !1))), e(this, f).addEventListener("timeupdate", e(this, Fs)), e(this, f).addEventListener("progress", e(this, Os));
1626
+ }, Fs = new WeakMap(), Os = new WeakMap(), Ge = function(a) {
1627
1627
  const t = a && (e(this, f).readyState < HTMLMediaElement.HAVE_FUTURE_DATA || e(this, f).seeking || e(this, f).paused && !this.userPaused);
1628
1628
  e(this, f).dispatchEvent(
1629
1629
  new CustomEvent(t ? "hlsbuffering" : "hlsnotbuffering", {
@@ -1634,8 +1634,8 @@ f = new WeakMap(), M = new WeakMap(), w = new WeakMap(), Ce = new WeakMap(), bt
1634
1634
  }, Qt = function(a) {
1635
1635
  return e(this, pi) === a;
1636
1636
  };
1637
- const da = document.createElement("template");
1638
- da.innerHTML = /* HTML */
1637
+ const ca = document.createElement("template");
1638
+ ca.innerHTML = /* HTML */
1639
1639
  `
1640
1640
  <style>
1641
1641
  :host {
@@ -1647,8 +1647,8 @@ da.innerHTML = /* HTML */
1647
1647
  }
1648
1648
  </style>
1649
1649
  `;
1650
- var Ne, Re, W, bi, Os, Hs, Be, ca, ua;
1651
- class dr extends rt {
1650
+ var Ne, Re, W, bi, Hs, zs, Be, ua, pa;
1651
+ class cr extends rt {
1652
1652
  constructor() {
1653
1653
  var t;
1654
1654
  super();
@@ -1657,13 +1657,13 @@ class dr extends rt {
1657
1657
  l(this, Re);
1658
1658
  l(this, W);
1659
1659
  l(this, bi, null);
1660
- l(this, Os, (t) => {
1660
+ l(this, Hs, (t) => {
1661
1661
  t.composedPath().includes(this) || this.hide();
1662
1662
  });
1663
- l(this, Hs, () => {
1663
+ l(this, zs, () => {
1664
1664
  this.hide();
1665
1665
  });
1666
- (t = this.shadowRoot) == null || t.appendChild(da.content.cloneNode(!0));
1666
+ (t = this.shadowRoot) == null || t.appendChild(ca.content.cloneNode(!0));
1667
1667
  }
1668
1668
  connectedCallback() {
1669
1669
  var u, p, v, A;
@@ -1686,24 +1686,24 @@ class dr extends rt {
1686
1686
  d(this, W, t);
1687
1687
  }
1688
1688
  enable() {
1689
- super.enable(), this.addEventListener("change", e(this, Hs)), document.addEventListener("click", e(this, Os));
1689
+ super.enable(), this.addEventListener("change", e(this, zs)), document.addEventListener("click", e(this, Hs));
1690
1690
  }
1691
1691
  hide() {
1692
1692
  var t, i;
1693
1693
  !e(this, W) || (t = e(this, W)) != null && t.hidden || (e(this, W).hidden = !0, (i = e(this, Ne)) == null || i.setAttribute("aria-expanded", "false"), this.dispatchEvent(new CustomEvent(k.UNLOCK_UI, { bubbles: !0, composed: !0 })), this.focus());
1694
1694
  }
1695
1695
  handleClick(t) {
1696
- e(this, W) && !t.composedPath().includes(e(this, W)) && n(this, Be, ca).call(this);
1696
+ e(this, W) && !t.composedPath().includes(e(this, W)) && n(this, Be, ua).call(this);
1697
1697
  }
1698
1698
  }
1699
- Ne = new WeakMap(), Re = new WeakMap(), W = new WeakMap(), bi = new WeakMap(), Os = new WeakMap(), Hs = new WeakMap(), Be = new WeakSet(), ca = function() {
1699
+ Ne = new WeakMap(), Re = new WeakMap(), W = new WeakMap(), bi = new WeakMap(), Hs = new WeakMap(), zs = new WeakMap(), Be = new WeakSet(), ua = function() {
1700
1700
  var t;
1701
- (t = e(this, W)) != null && t.hidden ? n(this, Be, ua).call(this) : this.hide();
1702
- }, ua = function() {
1701
+ (t = e(this, W)) != null && t.hidden ? n(this, Be, pa).call(this) : this.hide();
1702
+ }, pa = function() {
1703
1703
  var t, i, s;
1704
1704
  (t = e(this, W)) != null && t.hidden && (e(this, W).hidden = !1, (i = e(this, Ne)) == null || i.setAttribute("aria-expanded", "true"), (s = e(this, Re)) == null || s.focus(), this.dispatchEvent(new CustomEvent(k.LOCK_UI, { bubbles: !0, composed: !0 })));
1705
1705
  };
1706
- class ll {
1706
+ class hl {
1707
1707
  constructor(a) {
1708
1708
  this.vindral = a;
1709
1709
  }
@@ -1723,8 +1723,8 @@ class ll {
1723
1723
  this.vindral.pause();
1724
1724
  }
1725
1725
  }
1726
- const pa = document.createElement("template");
1727
- pa.innerHTML = /* HTML */
1726
+ const ba = document.createElement("template");
1727
+ ba.innerHTML = /* HTML */
1728
1728
  `
1729
1729
  <style>
1730
1730
  :host {
@@ -1864,7 +1864,7 @@ class ni extends HTMLElement {
1864
1864
  l(this, Ue, null);
1865
1865
  l(this, Pe);
1866
1866
  m(this, "range");
1867
- d(this, Pe, this.attachShadow({ mode: "open" })), e(this, Pe).appendChild(pa.content.cloneNode(!0)), this.range = e(this, Pe).getElementById("range");
1867
+ d(this, Pe, this.attachShadow({ mode: "open" })), e(this, Pe).appendChild(ba.content.cloneNode(!0)), this.range = e(this, Pe).getElementById("range");
1868
1868
  }
1869
1869
  connectedCallback() {
1870
1870
  var t;
@@ -1894,8 +1894,8 @@ class ni extends HTMLElement {
1894
1894
  }
1895
1895
  }
1896
1896
  Ue = new WeakMap(), Pe = new WeakMap(), m(ni, "observedAttributes", ["disabled"]);
1897
- const ba = document.createElement("template");
1898
- ba.innerHTML = /* HTML */
1897
+ const ma = document.createElement("template");
1898
+ ma.innerHTML = /* HTML */
1899
1899
  `
1900
1900
  <style>
1901
1901
  :host {
@@ -1994,6 +1994,10 @@ ba.innerHTML = /* HTML */
1994
1994
  z-index: 0;
1995
1995
  }
1996
1996
 
1997
+ #video video::-webkit-media-text-track-display {
1998
+ transform: translateY(var(--vindral-subtitle-offset, 0px)) !important;
1999
+ }
2000
+
1997
2001
  :host([user-interacting]) #video {
1998
2002
  cursor: auto;
1999
2003
  }
@@ -2087,8 +2091,8 @@ ba.innerHTML = /* HTML */
2087
2091
  <slot id="overlay-interactive" name="overlay-interactive"></slot>
2088
2092
  </div>
2089
2093
  `;
2090
- const an = ["ArrowDown", "ArrowLeft", "ArrowRight", "Tab", "Enter", " ", "f", "m"];
2091
- var zs, vt, mi, Mt, Dt, vi, b, H, re, g, fi, ot, ft, Ft, Bs, K, gt, ae, it, j, Et, gi, Ei, F, Ot, Ht, h, yn, $s, Gs, Ai, yi, ki, Ii, Ti, Li, wi, Si, Ci, Ks, kn, In, xi, Ni, Ri, qs, Ui, Pi, _i, Mi, ma, Tn, Di, Ln, va, gs, fa, ga, Es, Ea, wn, Aa, ya, ka, Fi, Ia, Ta, La, wa, Oi, Vs, Xs, Sa, Hi, js, Ys, oe, Sn, Cn, As, xt, ys, ks, Ca, xn, Js, Ws, Nn, E, L;
2094
+ const on = ["ArrowDown", "ArrowLeft", "ArrowRight", "Tab", "Enter", " ", "f", "m"];
2095
+ var Bs, vt, mi, Mt, Dt, vi, b, H, re, g, fi, ot, ft, Ft, $s, K, gt, ae, it, j, Et, gi, Ei, F, Ot, Ht, h, kn, Gs, Ks, Ai, yi, ki, Ii, Ti, Li, wi, Si, Ci, qs, In, Tn, xi, Ni, Ri, Vs, Ui, Pi, _i, Mi, va, Ln, Di, wn, fa, Es, ga, Ea, As, Aa, Sn, ya, ka, Ia, Fi, Ta, La, wa, Sa, Oi, Xs, js, Ca, Hi, Ys, Js, oe, Cn, xn, ys, xt, xa, ks, Is, Na, Nn, Ws, Qs, Rn, E, L;
2092
2096
  const Ye = class Ye extends HTMLElement {
2093
2097
  constructor() {
2094
2098
  var s;
@@ -2103,11 +2107,11 @@ const Ye = class Ye extends HTMLElement {
2103
2107
  l(this, H);
2104
2108
  l(this, re);
2105
2109
  l(this, g);
2106
- l(this, fi, e(Ye, zs));
2110
+ l(this, fi, e(Ye, Bs));
2107
2111
  l(this, ot);
2108
2112
  l(this, ft);
2109
2113
  l(this, Ft);
2110
- l(this, Bs);
2114
+ l(this, $s);
2111
2115
  l(this, K);
2112
2116
  l(this, gt);
2113
2117
  l(this, ae);
@@ -2120,14 +2124,14 @@ const Ye = class Ye extends HTMLElement {
2120
2124
  l(this, Ot, null);
2121
2125
  l(this, Ht, !1);
2122
2126
  // Store references to listener functions for removal
2123
- l(this, $s, (t) => {
2127
+ l(this, Gs, (t) => {
2124
2128
  const i = t.filter((s) => {
2125
2129
  var o;
2126
2130
  return (o = s.video) == null ? void 0 : o.width;
2127
2131
  });
2128
2132
  n(this, h, E).call(this, r.RENDITION_LEVELS, JSON.stringify(i));
2129
2133
  });
2130
- l(this, Gs, (t) => {
2134
+ l(this, Ks, (t) => {
2131
2135
  n(this, h, E).call(this, r.RENDITION_LEVEL, JSON.stringify(t));
2132
2136
  });
2133
2137
  l(this, Ai, (t) => {
@@ -2171,7 +2175,7 @@ const Ye = class Ye extends HTMLElement {
2171
2175
  l(this, Ci, (t) => {
2172
2176
  t || n(this, h, L).call(this, r.BUFFERING);
2173
2177
  });
2174
- l(this, Ks, (t) => {
2178
+ l(this, qs, (t) => {
2175
2179
  var z;
2176
2180
  const { urls: i, duration: s } = t;
2177
2181
  if (!i[0] || !e(this, g)) return;
@@ -2179,7 +2183,7 @@ const Ye = class Ye extends HTMLElement {
2179
2183
  o.searchParams.set("channelId", (z = e(this, ot)) != null ? z : "");
2180
2184
  const u = this.getAttribute("authentication-token");
2181
2185
  u && o.searchParams.set("authToken", u);
2182
- const p = al(s);
2186
+ const p = ol(s);
2183
2187
  if (isNaN(p)) {
2184
2188
  e(this, F).error(`Invalid duration format: ${s}`);
2185
2189
  return;
@@ -2196,7 +2200,7 @@ const Ye = class Ye extends HTMLElement {
2196
2200
  l(this, Ri, () => {
2197
2201
  e(this, Hi).call(this), n(this, h, L).call(this, r.BUFFERING);
2198
2202
  });
2199
- l(this, qs, () => {
2203
+ l(this, Vs, () => {
2200
2204
  if (!e(this, g)) return;
2201
2205
  const t = e(this, g).duration;
2202
2206
  n(this, h, E).call(this, r.DURATION, isNaN(t) ? "0" : t.toString());
@@ -2223,7 +2227,7 @@ const Ye = class Ye extends HTMLElement {
2223
2227
  d(this, Ht, !1);
2224
2228
  return;
2225
2229
  }
2226
- d(this, Ht, !1), n(this, h, ys).call(this);
2230
+ d(this, Ht, !1), n(this, h, ks).call(this);
2227
2231
  }
2228
2232
  });
2229
2233
  l(this, Fi, 0);
@@ -2233,25 +2237,25 @@ const Ye = class Ye extends HTMLElement {
2233
2237
  d(this, Fi, t.timeStamp);
2234
2238
  break;
2235
2239
  case "pointermove":
2236
- n(this, h, Ia).call(this, t);
2240
+ n(this, h, Ta).call(this, t);
2237
2241
  break;
2238
2242
  case "pointerup":
2239
- n(this, h, Ta).call(this, t);
2243
+ n(this, h, La).call(this, t);
2240
2244
  break;
2241
2245
  case "mouseleave":
2242
2246
  n(this, h, xt).call(this);
2243
2247
  break;
2244
2248
  case "dblclick":
2245
- n(this, h, La).call(this, t);
2249
+ n(this, h, wa).call(this, t);
2246
2250
  break;
2247
2251
  case "mousemove":
2248
- n(this, h, wa).call(this, t);
2252
+ n(this, h, Sa).call(this, t);
2249
2253
  break;
2250
2254
  case "keydown":
2251
- e(this, Xs).call(this, t);
2255
+ e(this, js).call(this, t);
2252
2256
  break;
2253
2257
  case "keyup":
2254
- n(this, h, xt).call(this), e(this, Vs).call(this, t);
2258
+ n(this, h, xt).call(this), e(this, Xs).call(this, t);
2255
2259
  break;
2256
2260
  }
2257
2261
  });
@@ -2290,7 +2294,7 @@ const Ye = class Ye extends HTMLElement {
2290
2294
  }
2291
2295
  break;
2292
2296
  case k.CHANNEL_GRID_OPENED: {
2293
- e(this, Ot) === null && n(this, h, Sn).call(this);
2297
+ e(this, Ot) === null && n(this, h, Cn).call(this);
2294
2298
  break;
2295
2299
  }
2296
2300
  case k.CHANNEL_GRID_CLOSED: {
@@ -2329,45 +2333,45 @@ const Ye = class Ye extends HTMLElement {
2329
2333
  break;
2330
2334
  }
2331
2335
  });
2332
- l(this, Vs, (t) => {
2336
+ l(this, Xs, (t) => {
2333
2337
  const { key: i } = t;
2334
- if (!an.includes(i)) {
2338
+ if (!on.includes(i)) {
2335
2339
  this.removeEventListener("keyup", this);
2336
2340
  return;
2337
2341
  }
2338
- n(this, h, Sa).call(this, t);
2342
+ n(this, h, Ca).call(this, t);
2339
2343
  });
2340
- l(this, Xs, (t) => {
2344
+ l(this, js, (t) => {
2341
2345
  const { metaKey: i, altKey: s, key: o } = t;
2342
- i || s || !an.includes(o) || this.addEventListener("keyup", this, { once: !0 });
2346
+ i || s || !on.includes(o) || this.addEventListener("keyup", this, { once: !0 });
2343
2347
  });
2344
2348
  l(this, Hi, () => {
2345
2349
  this.removeAttribute(r.TIMESHIFT_POSITION), this.handleTimeShiftUpdate(!1);
2346
2350
  });
2347
- l(this, js, (t) => {
2351
+ l(this, Ys, (t) => {
2348
2352
  var i;
2349
- e(this, g) || n(this, h, Tn).call(this), e(this, H) !== e(this, g) && (t && n(this, h, ks).call(this), d(this, H, e(this, g)), n(this, h, In).call(this), n(this, h, ma).call(this), n(this, h, gs).call(this), (i = e(this, b)) == null || i.pause(), d(this, Ht, t));
2353
+ e(this, g) || n(this, h, Ln).call(this), e(this, H) !== e(this, g) && (t && n(this, h, Is).call(this), d(this, H, e(this, g)), n(this, h, Tn).call(this), n(this, h, va).call(this), n(this, h, Es).call(this), (i = e(this, b)) == null || i.pause(), d(this, Ht, t));
2350
2354
  });
2351
- l(this, Ys, (t) => {
2355
+ l(this, Js, (t) => {
2352
2356
  var i, s, o, u;
2353
- t && n(this, h, ks).call(this), (i = e(this, g)) == null || i.hide(), d(this, H, e(this, re)), n(this, h, gs).call(this), this.hasAttribute(r.PAUSED) ? (s = e(this, H)) == null || s.pause() : (o = e(this, H)) == null || o.play(), n(this, h, Ln).call(this), n(this, h, kn).call(this), (u = e(this, g)) == null || u.pause(), t && (d(this, Ht, !1), setTimeout(() => {
2354
- n(this, h, ys).call(this);
2357
+ t && n(this, h, Is).call(this), (i = e(this, g)) == null || i.hide(), d(this, H, e(this, re)), n(this, h, Es).call(this), this.hasAttribute(r.PAUSED) ? (s = e(this, H)) == null || s.pause() : (o = e(this, H)) == null || o.play(), n(this, h, wn).call(this), n(this, h, In).call(this), (u = e(this, g)) == null || u.pause(), t && (d(this, Ht, !1), setTimeout(() => {
2358
+ n(this, h, ks).call(this);
2355
2359
  }, 100));
2356
2360
  });
2357
2361
  m(this, "handleTimeShiftUpdate", (t) => {
2358
2362
  var s;
2359
2363
  const i = this.hasAttribute(r.IS_PIP);
2360
2364
  if (t !== !1) {
2361
- e(this, js).call(this, i), (s = e(this, g)) == null || s.seek({
2365
+ e(this, Ys).call(this, i), (s = e(this, g)) == null || s.seek({
2362
2366
  time: parseFloat(t),
2363
2367
  playWhenReady: !this.hasAttribute(r.PAUSED)
2364
2368
  });
2365
2369
  return;
2366
2370
  }
2367
- e(this, H) !== e(this, re) && e(this, Ys).call(this, i);
2371
+ e(this, H) !== e(this, re) && e(this, Js).call(this, i);
2368
2372
  });
2369
2373
  l(this, oe, null);
2370
- l(this, Js, () => {
2374
+ l(this, Ws, () => {
2371
2375
  var i, s, o;
2372
2376
  if (!("orientation" in screen) || !screen.orientation.lock)
2373
2377
  return;
@@ -2375,16 +2379,16 @@ const Ye = class Ye extends HTMLElement {
2375
2379
  t != null && t.video && screen.orientation.lock(((s = t == null ? void 0 : t.video) == null ? void 0 : s.width) > ((o = t == null ? void 0 : t.video) == null ? void 0 : o.height) ? "landscape-primary" : "portrait-primary").catch(() => {
2376
2380
  });
2377
2381
  });
2378
- l(this, Ws, () => {
2382
+ l(this, Qs, () => {
2379
2383
  !("orientation" in screen) || !screen.orientation.unlock || screen.orientation.unlock();
2380
2384
  });
2381
- this.attachShadow({ mode: "open" }).appendChild(ba.content.cloneNode(!0));
2382
- const i = rn(this.getAttribute("log-level"));
2383
- d(this, F, Tr.get().createContext("VindralController")), e(this, F).setLevel(i), d(this, vi, (s = this.shadowRoot) == null ? void 0 : s.querySelector("#time-shift-video"));
2385
+ this.attachShadow({ mode: "open" }).appendChild(ma.content.cloneNode(!0));
2386
+ const i = an(this.getAttribute("log-level"));
2387
+ d(this, F, Lr.get().createContext("VindralController")), e(this, F).setLevel(i), d(this, vi, (s = this.shadowRoot) == null ? void 0 : s.querySelector("#time-shift-video"));
2384
2388
  }
2385
2389
  connectedCallback() {
2386
2390
  return B(this, null, function* () {
2387
- D(this.getAttribute("auto-instance-enabled"), !0) && (yield n(this, h, yn).call(this));
2391
+ D(this.getAttribute("auto-instance-enabled"), !0) && (yield n(this, h, kn).call(this));
2388
2392
  for (const i of Object.values(k))
2389
2393
  this.addEventListener(i, e(this, Oi));
2390
2394
  window.PointerEvent ? (this.addEventListener("pointerdown", this), this.addEventListener("pointermove", this), this.addEventListener("pointerup", this)) : this.addEventListener("mousemove", this), this.addEventListener("mouseleave", this), this.addEventListener("keydown", this), this.addEventListener("resize", this), this.addEventListener("dblclick", this), this.connectListener(this), this.tabIndex = 0, this.focus({ preventScroll: !0 });
@@ -2395,100 +2399,106 @@ const Ye = class Ye extends HTMLElement {
2395
2399
  (t = e(this, b)) == null || t.unload(), (i = e(this, K)) == null || i.unload(), (s = e(this, gt)) == null || s.unload(), (o = e(this, ae)) == null || o.unload(), (u = e(this, j)) == null || u.unload(), (p = e(this, g)) == null || p.cleanup();
2396
2400
  for (const v of Object.values(k))
2397
2401
  this.removeEventListener(v, e(this, Oi));
2398
- n(this, h, Ln).call(this), n(this, h, In).call(this), this.disconnectListener(this);
2402
+ n(this, h, wn).call(this), n(this, h, Tn).call(this), this.disconnectListener(this);
2399
2403
  }
2400
2404
  attributeChangedCallback(t, i, s) {
2401
- var o, u, p, v, A, z, ut, at, jt, Yt, Jt, cs, us, ps, bs;
2402
- if (i != s)
2403
- switch (e(this, F).debug("Attribute changed", { name: t, oldValue: i, newValue: s }), t) {
2404
- case "channel-id":
2405
- d(this, ot, s), e(this, b) && s && (e(this, b).channelId = s, e(this, b).play(), n(this, h, E).call(this, r.BUFFERING, ""), n(this, h, E).call(this, r.CHANNEL_ID, s), n(this, h, E).call(this, r.POSTER_SRC, e(this, b).getThumbnailUrl()));
2406
- break;
2407
- case "channel-group-id":
2408
- d(this, ft, s);
2409
- break;
2410
- case "url":
2411
- s && d(this, fi, s);
2412
- break;
2413
- case "paused":
2414
- x(s) ? ((o = e(this, H)) == null || o.pause(), n(this, h, E).call(this, r.PAUSED, "")) : (n(this, h, L).call(this, r.NEEDS_USER_INPUT_VIDEO), n(this, h, L).call(this, r.PAUSED), (u = e(this, H)) == null || u.play());
2415
- break;
2416
- case "target-buffer-time":
2417
- if (e(this, b) && s) {
2418
- const V = parseInt(s, 10);
2419
- Number.isNaN(V) || (e(this, b).targetBufferTime = V);
2420
- }
2421
- break;
2422
- case "user-interacting":
2423
- x(s) ? n(this, h, E).call(this, r.USER_INTERACTING, "") : n(this, h, L).call(this, r.USER_INTERACTING);
2424
- break;
2425
- case "muted":
2426
- e(this, b) && (x(s) ? (e(this, b).muted = !0, e(this, g) && (e(this, g).muted = !0), n(this, h, E).call(this, r.MUTED, ""), (p = e(this, j)) != null && p.isMediaElementSource && ((v = e(this, j)) == null || v.stop(), n(this, h, E).call(this, r.VOLUME_LEVEL, JSON.stringify({ left: null, right: null })))) : (e(this, b).muted = !1, e(this, g) && (e(this, g).muted = !1), n(this, h, L).call(this, r.MUTED), n(this, h, L).call(this, r.NEEDS_USER_INPUT_AUDIO), e(this, b).volume === 0 && (e(this, b).volume = 0.3), (A = e(this, j)) == null || A.start()));
2427
- break;
2428
- case "ui-locked":
2429
- x(s) ? n(this, h, As).call(this) : n(this, h, xt).call(this);
2430
- break;
2431
- case "is-fullscreen":
2432
- x(s) ? n(this, h, Ca).call(this) : n(this, h, xn).call(this);
2433
- break;
2434
- case "max-video-bit-rate":
2435
- d(this, Ft, s), x(s) ? n(this, h, E).call(this, r.MAX_VIDEO_BITRATE, s) : n(this, h, L).call(this, r.MAX_VIDEO_BITRATE), e(this, g) && (e(this, g).maxVideoBitRate = s ? Wt(s) : void 0);
2436
- break;
2437
- case "max-initial-bit-rate":
2438
- d(this, Bs, s), x(s) ? n(this, h, E).call(this, r.MAX_INITIAL_BITRATE, s) : n(this, h, L).call(this, r.MAX_INITIAL_BITRATE);
2439
- break;
2440
- case "is-pip":
2441
- x(s) ? n(this, h, ys).call(this) : n(this, h, ks).call(this);
2442
- break;
2443
- case "is-airplaying":
2444
- x(s) ? ((z = e(this, b)) != null && z.mediaElement && (e(this, b).mediaElement.style.display = "hidden"), (ut = e(this, b)) == null || ut.pause()) : (at = e(this, b)) != null && at.mediaElement && (e(this, b).mediaElement.style.display = "block");
2445
- break;
2446
- case "is-casting":
2447
- x(s) ? ((jt = e(this, gt)) != null && jt.isFullscreen() && n(this, h, xn).call(this), (Yt = e(this, b)) == null || Yt.pause()) : document.hidden || (Jt = e(this, b)) == null || Jt.play();
2448
- break;
2449
- case "cast-receiver-id":
2450
- d(this, gi, s);
2451
- break;
2452
- case "cast-background":
2453
- d(this, Ei, s);
2454
- break;
2455
- case "language":
2456
- e(this, b) && (e(this, b).language = s, x(s) ? n(this, h, E).call(this, r.LANGUAGE, s) : n(this, h, L).call(this, r.LANGUAGE));
2457
- break;
2458
- case "text-track":
2459
- e(this, b) && (e(this, b).textTrack = s, x(s) ? n(this, h, E).call(this, r.TEXT_TRACK, s) : n(this, h, L).call(this, r.TEXT_TRACK));
2460
- break;
2461
- case "log-level":
2462
- x(s) && e(this, F).setLevel(rn(s));
2463
- break;
2464
- case "authentication-token":
2465
- x(s) ? ((cs = e(this, b)) == null || cs.updateAuthenticationToken(s), (us = e(this, it)) == null || us.updateAuthenticationToken(s), n(this, h, E).call(this, r.AUTHENTICATION_TOKEN, s)) : n(this, h, L).call(this, r.AUTHENTICATION_TOKEN);
2466
- break;
2467
- case "volume":
2468
- if (x(s)) {
2469
- const V = parseFloat(s);
2470
- e(this, g) && (e(this, g).volume = V), e(this, b) && (e(this, b).volume = V);
2471
- }
2472
- break;
2473
- case "timeshift-position":
2474
- x(s) ? n(this, h, E).call(this, r.TIMESHIFT_POSITION, s) : n(this, h, L).call(this, r.TIMESHIFT_POSITION);
2475
- break;
2476
- case "drm-headers":
2477
- if (x(s)) {
2478
- const V = ms(s);
2479
- V ? (ps = e(this, b)) == null || ps.drm.setHeaders(V) : e(this, F).warn("Invalid DRM headers format:", s);
2480
- }
2481
- break;
2482
- case "drm-queryparams":
2483
- if (x(s)) {
2484
- const V = ms(s);
2485
- V ? (bs = e(this, b)) == null || bs.drm.setQueryParams(V) : e(this, F).warn("Invalid DRM query parameters format:", s);
2486
- }
2487
- break;
2488
- }
2405
+ var u, p, v, A, z, ut, at, jt, Yt, Jt, cs, us, ps, bs, ms;
2406
+ if (i == s)
2407
+ return;
2408
+ switch (e(this, F).debug("Attribute changed", { name: t, oldValue: i, newValue: s }), t) {
2409
+ case "channel-id":
2410
+ d(this, ot, s), e(this, b) && s && (e(this, b).channelId = s, e(this, b).play(), n(this, h, E).call(this, r.BUFFERING, ""), n(this, h, E).call(this, r.CHANNEL_ID, s), n(this, h, E).call(this, r.POSTER_SRC, e(this, b).getThumbnailUrl()));
2411
+ break;
2412
+ case "channel-group-id":
2413
+ d(this, ft, s);
2414
+ break;
2415
+ case "url":
2416
+ s && d(this, fi, s);
2417
+ break;
2418
+ case "paused":
2419
+ x(s) ? ((u = e(this, H)) == null || u.pause(), n(this, h, E).call(this, r.PAUSED, "")) : (n(this, h, L).call(this, r.NEEDS_USER_INPUT_VIDEO), n(this, h, L).call(this, r.PAUSED), (p = e(this, H)) == null || p.play());
2420
+ break;
2421
+ case "target-buffer-time":
2422
+ if (e(this, b) && s) {
2423
+ const V = parseInt(s, 10);
2424
+ Number.isNaN(V) || (e(this, b).targetBufferTime = V);
2425
+ }
2426
+ break;
2427
+ case "user-interacting":
2428
+ x(s) ? n(this, h, E).call(this, r.USER_INTERACTING, "") : n(this, h, L).call(this, r.USER_INTERACTING);
2429
+ break;
2430
+ case "muted":
2431
+ e(this, b) && (x(s) ? (e(this, b).muted = !0, e(this, g) && (e(this, g).muted = !0), n(this, h, E).call(this, r.MUTED, ""), (v = e(this, j)) != null && v.isMediaElementSource && ((A = e(this, j)) == null || A.stop(), n(this, h, E).call(this, r.VOLUME_LEVEL, JSON.stringify({ left: null, right: null })))) : (e(this, b).muted = !1, e(this, g) && (e(this, g).muted = !1), n(this, h, L).call(this, r.MUTED), n(this, h, L).call(this, r.NEEDS_USER_INPUT_AUDIO), e(this, b).volume === 0 && (e(this, b).volume = 0.3), (z = e(this, j)) == null || z.start()));
2432
+ break;
2433
+ case "ui-locked":
2434
+ x(s) ? n(this, h, ys).call(this) : n(this, h, xt).call(this);
2435
+ break;
2436
+ case "is-fullscreen":
2437
+ x(s) ? n(this, h, Na).call(this) : n(this, h, Nn).call(this);
2438
+ break;
2439
+ case "max-video-bit-rate":
2440
+ d(this, Ft, s), x(s) ? n(this, h, E).call(this, r.MAX_VIDEO_BITRATE, s) : n(this, h, L).call(this, r.MAX_VIDEO_BITRATE), e(this, g) && (e(this, g).maxVideoBitRate = s ? Wt(s) : void 0);
2441
+ break;
2442
+ case "max-initial-bit-rate":
2443
+ d(this, $s, s), x(s) ? n(this, h, E).call(this, r.MAX_INITIAL_BITRATE, s) : n(this, h, L).call(this, r.MAX_INITIAL_BITRATE);
2444
+ break;
2445
+ case "is-pip":
2446
+ x(s) ? n(this, h, ks).call(this) : n(this, h, Is).call(this);
2447
+ break;
2448
+ case "is-airplaying":
2449
+ x(s) ? ((ut = e(this, b)) != null && ut.mediaElement && (e(this, b).mediaElement.style.display = "hidden"), (at = e(this, b)) == null || at.pause()) : (jt = e(this, b)) != null && jt.mediaElement && (e(this, b).mediaElement.style.display = "block");
2450
+ break;
2451
+ case "is-casting":
2452
+ x(s) ? ((Yt = e(this, gt)) != null && Yt.isFullscreen() && n(this, h, Nn).call(this), (Jt = e(this, b)) == null || Jt.pause()) : document.hidden || (cs = e(this, b)) == null || cs.play();
2453
+ break;
2454
+ case "cast-receiver-id":
2455
+ d(this, gi, s);
2456
+ break;
2457
+ case "cast-background":
2458
+ d(this, Ei, s);
2459
+ break;
2460
+ case "language":
2461
+ e(this, b) && (e(this, b).language = s, x(s) ? n(this, h, E).call(this, r.LANGUAGE, s) : n(this, h, L).call(this, r.LANGUAGE));
2462
+ break;
2463
+ case "text-track":
2464
+ e(this, b) && (e(this, b).textTrack = s, x(s) ? n(this, h, E).call(this, r.TEXT_TRACK, s) : n(this, h, L).call(this, r.TEXT_TRACK));
2465
+ break;
2466
+ case "log-level":
2467
+ x(s) && e(this, F).setLevel(an(s));
2468
+ break;
2469
+ case "authentication-token":
2470
+ x(s) ? ((us = e(this, b)) == null || us.updateAuthenticationToken(s), (ps = e(this, it)) == null || ps.updateAuthenticationToken(s), n(this, h, E).call(this, r.AUTHENTICATION_TOKEN, s)) : n(this, h, L).call(this, r.AUTHENTICATION_TOKEN);
2471
+ break;
2472
+ case "volume":
2473
+ if (x(s)) {
2474
+ const V = parseFloat(s);
2475
+ e(this, g) && (e(this, g).volume = V), e(this, b) && (e(this, b).volume = V);
2476
+ }
2477
+ break;
2478
+ case "timeshift-position":
2479
+ x(s) ? n(this, h, E).call(this, r.TIMESHIFT_POSITION, s) : n(this, h, L).call(this, r.TIMESHIFT_POSITION);
2480
+ break;
2481
+ case "drm-headers":
2482
+ if (x(s)) {
2483
+ const V = vs(s);
2484
+ V ? (bs = e(this, b)) == null || bs.drm.setHeaders(V) : e(this, F).warn("Invalid DRM headers format:", s);
2485
+ }
2486
+ break;
2487
+ case "drm-queryparams":
2488
+ if (x(s)) {
2489
+ const V = vs(s);
2490
+ V ? (ms = e(this, b)) == null || ms.drm.setQueryParams(V) : e(this, F).warn("Invalid DRM query parameters format:", s);
2491
+ }
2492
+ break;
2493
+ }
2494
+ [
2495
+ r.USER_INTERACTING,
2496
+ r.PAUSED,
2497
+ r.HIDE_UI_ON_PAUSE
2498
+ ].includes(t) && n(this, h, xa).call(this);
2489
2499
  }
2490
2500
  connectListener(t) {
2491
- yr(t).forEach((s) => {
2501
+ kr(t).forEach((s) => {
2492
2502
  var u, p;
2493
2503
  const o = e(this, vt).get(s);
2494
2504
  switch (o ? o.push(t) : e(this, vt).set(s, [t]), s) {
@@ -2516,7 +2526,7 @@ const Ye = class Ye extends HTMLElement {
2516
2526
  });
2517
2527
  }
2518
2528
  disconnectListener(t) {
2519
- yr(t).forEach((s) => {
2529
+ kr(t).forEach((s) => {
2520
2530
  const o = e(this, vt).get(s);
2521
2531
  o && e(this, vt).set(
2522
2532
  s,
@@ -2528,33 +2538,33 @@ const Ye = class Ye extends HTMLElement {
2528
2538
  return e(this, b);
2529
2539
  }
2530
2540
  get fullscreen() {
2531
- return n(this, h, Es).call(this);
2541
+ return n(this, h, As).call(this);
2532
2542
  }
2533
2543
  get airPlay() {
2534
2544
  return e(this, it);
2535
2545
  }
2536
2546
  connect() {
2537
- n(this, h, yn).call(this);
2547
+ n(this, h, kn).call(this);
2538
2548
  }
2539
2549
  };
2540
- zs = new WeakMap(), vt = new WeakMap(), mi = new WeakMap(), Mt = new WeakMap(), Dt = new WeakMap(), vi = new WeakMap(), b = new WeakMap(), H = new WeakMap(), re = new WeakMap(), g = new WeakMap(), fi = new WeakMap(), ot = new WeakMap(), ft = new WeakMap(), Ft = new WeakMap(), Bs = new WeakMap(), K = new WeakMap(), gt = new WeakMap(), ae = new WeakMap(), it = new WeakMap(), j = new WeakMap(), Et = new WeakMap(), gi = new WeakMap(), Ei = new WeakMap(), F = new WeakMap(), Ot = new WeakMap(), Ht = new WeakMap(), h = new WeakSet(), yn = function() {
2550
+ Bs = new WeakMap(), vt = new WeakMap(), mi = new WeakMap(), Mt = new WeakMap(), Dt = new WeakMap(), vi = new WeakMap(), b = new WeakMap(), H = new WeakMap(), re = new WeakMap(), g = new WeakMap(), fi = new WeakMap(), ot = new WeakMap(), ft = new WeakMap(), Ft = new WeakMap(), $s = new WeakMap(), K = new WeakMap(), gt = new WeakMap(), ae = new WeakMap(), it = new WeakMap(), j = new WeakMap(), Et = new WeakMap(), gi = new WeakMap(), Ei = new WeakMap(), F = new WeakMap(), Ot = new WeakMap(), Ht = new WeakMap(), h = new WeakSet(), kn = function() {
2541
2551
  return B(this, null, function* () {
2542
- var br, mr;
2552
+ var mr, vr;
2543
2553
  if (!e(this, ot)) return;
2544
- yield (br = e(this, b)) == null ? void 0 : br.unload();
2545
- const t = this.hasAttribute(r.PAUSED), i = this.hasAttribute(r.MUTED), s = Wt(this.getAttribute(r.VOLUME)), o = typeof s == "number" ? Math.max(0, Math.min(1, s)) : s, u = wr(this.getAttribute(r.MEDIA)), p = this.getAttribute(r.TEXT_TRACK) || void 0, v = this.getAttribute("edge-url") || void 0, A = this.getAttribute("authentication-token") || void 0, z = Wt(this.getAttribute("max-video-bit-rate")), ut = Wt(this.getAttribute("max-initial-bit-rate")), at = el(this.getAttribute("max-size")), jt = Wt(this.getAttribute("min-buffer-time")), Yt = Wt(this.getAttribute("max-buffer-time")), Jt = D(this.getAttribute("burst-enabled")), cs = D(this.getAttribute("mse-enabled")), us = D(this.getAttribute("mse-opus-enabled")), ps = D(this.getAttribute("ios-background-play-enabled")), bs = D(this.getAttribute("ios-wake-lock-enabled")), V = D(this.getAttribute("ios-media-element-enabled")), ko = D(this.getAttribute("abr-enabled")), Io = D(this.getAttribute("size-based-resolution-cap-enabled")), To = D(this.getAttribute("telemetry-enabled")), Lo = tl(this.getAttribute("video-codecs")), cr = Sr(this.getAttribute("poster")), wo = il(this.getAttribute("advanced")), So = rn(this.getAttribute("log-level")), Co = {
2546
- headers: ms(this.getAttribute("drm-headers")),
2547
- queryParams: ms(this.getAttribute("drm-queryparams")),
2554
+ yield (mr = e(this, b)) == null ? void 0 : mr.unload();
2555
+ const t = this.hasAttribute(r.PAUSED), i = this.hasAttribute(r.MUTED), s = Wt(this.getAttribute(r.VOLUME)), o = typeof s == "number" ? Math.max(0, Math.min(1, s)) : s, u = Sr(this.getAttribute(r.MEDIA)), p = this.getAttribute(r.TEXT_TRACK) || void 0, v = this.getAttribute("edge-url") || void 0, A = this.getAttribute("authentication-token") || void 0, z = Wt(this.getAttribute("max-video-bit-rate")), ut = Wt(this.getAttribute("max-initial-bit-rate")), at = il(this.getAttribute("max-size")), jt = Wt(this.getAttribute("min-buffer-time")), Yt = Wt(this.getAttribute("max-buffer-time")), Jt = D(this.getAttribute("burst-enabled")), cs = D(this.getAttribute("mse-enabled")), us = D(this.getAttribute("mse-opus-enabled")), ps = D(this.getAttribute("ios-background-play-enabled")), bs = D(this.getAttribute("ios-wake-lock-enabled")), ms = D(this.getAttribute("ios-media-element-enabled")), V = D(this.getAttribute("abr-enabled")), To = D(this.getAttribute("size-based-resolution-cap-enabled")), Lo = D(this.getAttribute("telemetry-enabled")), wo = el(this.getAttribute("video-codecs")), ur = Cr(this.getAttribute("poster")), So = sl(this.getAttribute("advanced")), Co = an(this.getAttribute("log-level")), xo = {
2556
+ headers: vs(this.getAttribute("drm-headers")),
2557
+ queryParams: vs(this.getAttribute("drm-queryparams")),
2548
2558
  widevine: {
2549
- videoRobustness: vs(this.getAttribute("drm-widevine-video-robustness")),
2550
- audioRobustness: vs(this.getAttribute("drm-widevine-audio-robustness"))
2559
+ videoRobustness: fs(this.getAttribute("drm-widevine-video-robustness")),
2560
+ audioRobustness: fs(this.getAttribute("drm-widevine-audio-robustness"))
2551
2561
  },
2552
2562
  playready: {
2553
- videoRobustness: vs(this.getAttribute("drm-playready-video-robustness")),
2554
- audioRobustness: vs(this.getAttribute("drm-playready-audio-robustness"))
2563
+ videoRobustness: fs(this.getAttribute("drm-playready-video-robustness")),
2564
+ audioRobustness: fs(this.getAttribute("drm-playready-audio-robustness"))
2555
2565
  }
2556
- }, xo = D(this.getAttribute("webtransport-enabled")), ur = Wt(this.getAttribute("reconnect-retries")), No = ur !== void 0 ? (Fo) => Fo.reconnectRetries < ur : void 0, Ro = this.getAttribute("language") || void 0;
2557
- d(this, b, new $o({
2566
+ }, No = D(this.getAttribute("webtransport-enabled")), pr = Wt(this.getAttribute("reconnect-retries")), Ro = pr !== void 0 ? (Oo) => Oo.reconnectRetries < pr : void 0, Uo = this.getAttribute("language") || void 0;
2567
+ d(this, b, new Go({
2558
2568
  url: e(this, fi),
2559
2569
  channelId: e(this, ot),
2560
2570
  channelGroupId: e(this, ft),
@@ -2573,86 +2583,86 @@ zs = new WeakMap(), vt = new WeakMap(), mi = new WeakMap(), Mt = new WeakMap(),
2573
2583
  mseOpusEnabled: us,
2574
2584
  iosBackgroundPlayEnabled: ps,
2575
2585
  iosWakeLockEnabled: bs,
2576
- iosMediaElementEnabled: V,
2577
- abrEnabled: ko,
2578
- sizeBasedResolutionCapEnabled: Io,
2579
- telemetryEnabled: To,
2580
- videoCodecs: Lo,
2581
- poster: cr,
2586
+ iosMediaElementEnabled: ms,
2587
+ abrEnabled: V,
2588
+ sizeBasedResolutionCapEnabled: To,
2589
+ telemetryEnabled: Lo,
2590
+ videoCodecs: wo,
2591
+ poster: ur,
2582
2592
  textTrack: p,
2583
- advanced: wo,
2584
- logLevel: So,
2585
- language: Ro,
2586
- drm: Co,
2587
- webtransportEnabled: xo,
2588
- reconnectHandler: No
2589
- })), d(this, re, new ll(e(this, b))), e(this, H) || d(this, H, e(this, re)), n(this, h, kn).call(this), d(this, Dt, (mr = this.shadowRoot) == null ? void 0 : mr.querySelector("#video")), e(this, Dt) && e(this, b).attach(e(this, Dt)), this.setAttribute(r.MEDIA, e(this, b).media), e(this, b).muted && n(this, h, E).call(this, r.MUTED, ""), n(this, h, E).call(this, r.VOLUME, e(this, b).volume.toString()), x(cr) || n(this, h, E).call(this, r.POSTER_SRC, e(this, b).getThumbnailUrl());
2590
- const Uo = D(this.getAttribute(r.AIRPLAY_ENABLED), !1), Po = D(this.getAttribute(r.CAST_ENABLED), !0), pr = D(this.getAttribute(r.FULLSCREEN_ENABLED), !0), _o = D(this.getAttribute(r.PIP_ENABLED), !0), Mo = D(this.getAttribute(r.VU_METER_ENABLED), !1), Do = D(this.getAttribute(r.TIMESHIFT_ENABLED), !1);
2591
- Uo && n(this, h, ya).call(this, e(this, b)), Po && n(this, h, Ea).call(this, e(this, b)), pr && n(this, h, fa).call(this, e(this, b)), _o && n(this, h, va).call(this, e(this, b)), t || e(this, b).play(), Mo && n(this, h, ka).call(this, e(this, b)), this.dispatchEvent(
2593
+ advanced: So,
2594
+ logLevel: Co,
2595
+ language: Uo,
2596
+ drm: xo,
2597
+ webtransportEnabled: No,
2598
+ reconnectHandler: Ro
2599
+ })), d(this, re, new hl(e(this, b))), e(this, H) || d(this, H, e(this, re)), n(this, h, In).call(this), d(this, Dt, (vr = this.shadowRoot) == null ? void 0 : vr.querySelector("#video")), e(this, Dt) && e(this, b).attach(e(this, Dt)), this.setAttribute(r.MEDIA, e(this, b).media), e(this, b).muted && n(this, h, E).call(this, r.MUTED, ""), n(this, h, E).call(this, r.VOLUME, e(this, b).volume.toString()), x(ur) || n(this, h, E).call(this, r.POSTER_SRC, e(this, b).getThumbnailUrl());
2600
+ const Po = D(this.getAttribute(r.AIRPLAY_ENABLED), !1), _o = D(this.getAttribute(r.CAST_ENABLED), !0), br = D(this.getAttribute(r.FULLSCREEN_ENABLED), !0), Mo = D(this.getAttribute(r.PIP_ENABLED), !0), Do = D(this.getAttribute(r.VU_METER_ENABLED), !1), Fo = D(this.getAttribute(r.TIMESHIFT_ENABLED), !1);
2601
+ Po && n(this, h, ka).call(this, e(this, b)), _o && n(this, h, Aa).call(this, e(this, b)), br && n(this, h, ga).call(this, e(this, b)), Mo && n(this, h, fa).call(this, e(this, b)), t || e(this, b).play(), Do && n(this, h, Ia).call(this, e(this, b)), this.dispatchEvent(
2592
2602
  new CustomEvent("vindral-instance-ready", { bubbles: !0, composed: !0, detail: e(this, b) })
2593
- ), Do && (n(this, h, Tn).call(this), pr && n(this, h, ga).call(this));
2603
+ ), Fo && (n(this, h, Ln).call(this), br && n(this, h, Ea).call(this));
2594
2604
  });
2595
- }, $s = new WeakMap(), Gs = new WeakMap(), Ai = new WeakMap(), yi = new WeakMap(), ki = new WeakMap(), Ii = new WeakMap(), Ti = new WeakMap(), Li = new WeakMap(), wi = new WeakMap(), Si = new WeakMap(), Ci = new WeakMap(), Ks = new WeakMap(), kn = function() {
2596
- e(this, b) && (e(this, b).on("rendition levels", e(this, $s)), e(this, b).on("rendition level", e(this, Gs)), e(this, b).on("playback state", e(this, Ai)), e(this, b).on("volume state", e(this, yi)), e(this, b).on("channel switch failed", e(this, ki)), e(this, b).on("channel switch", e(this, Ii)), e(this, b).on("channels", e(this, Ti)), e(this, b).on("languages", e(this, Li)), e(this, b).on("text tracks", e(this, wi)), e(this, b).on("needs user input", e(this, Si)), e(this, b).on("is live", e(this, Ci)), e(this, b).on("timeshift info", e(this, Ks)));
2597
- }, In = function() {
2605
+ }, Gs = new WeakMap(), Ks = new WeakMap(), Ai = new WeakMap(), yi = new WeakMap(), ki = new WeakMap(), Ii = new WeakMap(), Ti = new WeakMap(), Li = new WeakMap(), wi = new WeakMap(), Si = new WeakMap(), Ci = new WeakMap(), qs = new WeakMap(), In = function() {
2606
+ e(this, b) && (e(this, b).on("rendition levels", e(this, Gs)), e(this, b).on("rendition level", e(this, Ks)), e(this, b).on("playback state", e(this, Ai)), e(this, b).on("volume state", e(this, yi)), e(this, b).on("channel switch failed", e(this, ki)), e(this, b).on("channel switch", e(this, Ii)), e(this, b).on("channels", e(this, Ti)), e(this, b).on("languages", e(this, Li)), e(this, b).on("text tracks", e(this, wi)), e(this, b).on("needs user input", e(this, Si)), e(this, b).on("is live", e(this, Ci)), e(this, b).on("timeshift info", e(this, qs)));
2607
+ }, Tn = function() {
2598
2608
  e(this, b) && (e(this, b).off("playback state", e(this, Ai)), e(this, b).off("volume state", e(this, yi)), e(this, b).off("channel switch failed", e(this, ki)), e(this, b).off("channel switch", e(this, Ii)), e(this, b).off("channels", e(this, Ti)), e(this, b).off("languages", e(this, Li)), e(this, b).off("text tracks", e(this, wi)), e(this, b).off("needs user input", e(this, Si)), e(this, b).off("is live", e(this, Ci)));
2599
- }, xi = new WeakMap(), Ni = new WeakMap(), Ri = new WeakMap(), qs = new WeakMap(), Ui = new WeakMap(), Pi = new WeakMap(), _i = new WeakMap(), Mi = new WeakMap(), ma = function() {
2609
+ }, xi = new WeakMap(), Ni = new WeakMap(), Ri = new WeakMap(), Vs = new WeakMap(), Ui = new WeakMap(), Pi = new WeakMap(), _i = new WeakMap(), Mi = new WeakMap(), va = function() {
2600
2610
  e(this, g) && (e(this, g).addEventListener("playing", e(this, xi)), e(this, g).addEventListener("pause", e(this, Ni)), e(this, g).addEventListener("ended", e(this, Ri)), e(this, g).addEventListener("timeupdate", e(this, Ui)), e(this, g).addEventListener("volumechange", e(this, Pi)), e(this, g).addEventListener("hlsbuffering", e(this, _i)), e(this, g).addEventListener("hlsnotbuffering", e(this, Mi)), e(this, g).addEventListener("timeshiftready", e(this, Di)));
2601
- }, Tn = function() {
2611
+ }, Ln = function() {
2602
2612
  var t, i, s, o;
2603
- d(this, g, new ol(e(this, vi), {
2613
+ d(this, g, new ll(e(this, vi), {
2604
2614
  volume: (i = (t = e(this, H)) == null ? void 0 : t.volume) != null ? i : 1,
2605
2615
  muted: (o = (s = e(this, H)) == null ? void 0 : s.muted) != null ? o : !1,
2606
2616
  maxVideoBitRate: e(this, Ft) ? parseInt(e(this, Ft), 10) : void 0
2607
- })), e(this, g).addEventListener("durationchange", e(this, qs));
2608
- }, Di = new WeakMap(), Ln = function() {
2617
+ })), e(this, g).addEventListener("durationchange", e(this, Vs));
2618
+ }, Di = new WeakMap(), wn = function() {
2609
2619
  e(this, g) && (e(this, g).removeEventListener("playing", e(this, xi)), e(this, g).removeEventListener("pause", e(this, Ni)), e(this, g).removeEventListener("ended", e(this, Ri)), e(this, g).removeEventListener("timeupdate", e(this, Ui)), e(this, g).removeEventListener("volumechange", e(this, Pi)), e(this, g).removeEventListener("hlsbuffering", e(this, _i)), e(this, g).removeEventListener("hlsnotbuffering", e(this, Mi)), e(this, g).removeEventListener("timeshiftready", e(this, Di)));
2610
- }, va = function(t) {
2611
- t.mediaElement instanceof HTMLVideoElement && (d(this, K, new Ar(t.mediaElement)), e(this, K).isSupported() && (e(this, F).debug("PIP is supported"), n(this, h, E).call(this, r.PIP_AVAILABLE, "")), e(this, K).on("on picture in picture change", (i) => {
2620
+ }, fa = function(t) {
2621
+ t.mediaElement instanceof HTMLVideoElement && (d(this, K, new yr(t.mediaElement)), e(this, K).isSupported() && (e(this, F).debug("PIP is supported"), n(this, h, E).call(this, r.PIP_AVAILABLE, "")), e(this, K).on("on picture in picture change", (i) => {
2612
2622
  i ? n(this, h, E).call(this, r.IS_PIP, "") : n(this, h, L).call(this, r.IS_PIP);
2613
2623
  }));
2614
- }, gs = function() {
2624
+ }, Es = function() {
2615
2625
  var i;
2616
2626
  if (!e(this, K)) return;
2617
2627
  let t = null;
2618
- e(this, H) === e(this, g) && e(this, g) ? t = e(this, g).videoElement : ((i = e(this, b)) == null ? void 0 : i.mediaElement) instanceof HTMLVideoElement && (t = e(this, b).mediaElement), t && t !== e(this, K).videoElement && (e(this, F).debug("Updating PIP target to", e(this, H) === e(this, g) ? "HLS" : "Vindral"), e(this, K).unload(), d(this, K, new Ar(t)), e(this, K).on("on picture in picture change", (s) => {
2628
+ e(this, H) === e(this, g) && e(this, g) ? t = e(this, g).videoElement : ((i = e(this, b)) == null ? void 0 : i.mediaElement) instanceof HTMLVideoElement && (t = e(this, b).mediaElement), t && t !== e(this, K).videoElement && (e(this, F).debug("Updating PIP target to", e(this, H) === e(this, g) ? "HLS" : "Vindral"), e(this, K).unload(), d(this, K, new yr(t)), e(this, K).on("on picture in picture change", (s) => {
2619
2629
  s ? n(this, h, E).call(this, r.IS_PIP, "") : n(this, h, L).call(this, r.IS_PIP);
2620
2630
  }));
2621
- }, fa = function(t) {
2631
+ }, ga = function(t) {
2622
2632
  const i = !pt.isFullscreenApiSupported(this) && pt.isFullscreenApiSupported(t.mediaElement) ? t.mediaElement : this;
2623
2633
  d(this, gt, new pt(i)), e(this, gt).on("on fullscreen change", (s) => {
2624
2634
  s ? n(this, h, E).call(this, r.FULLSCREEN, "") : n(this, h, L).call(this, r.FULLSCREEN);
2625
2635
  });
2626
- }, ga = function() {
2636
+ }, Ea = function() {
2627
2637
  var t;
2628
2638
  e(this, g) && (d(this, ae, !pt.isFullscreenApiSupported(this) && pt.isFullscreenApiSupported((t = e(this, g)) == null ? void 0 : t.videoElement) ? new pt(e(this, g).videoElement) : new pt(this)), e(this, ae).on("on fullscreen change", (i) => {
2629
2639
  i ? n(this, h, E).call(this, r.FULLSCREEN, "") : n(this, h, L).call(this, r.FULLSCREEN);
2630
2640
  }));
2631
- }, Es = function() {
2641
+ }, As = function() {
2632
2642
  return this.hasAttribute(r.TIMESHIFT_POSITION) ? e(this, ae) : e(this, gt);
2633
- }, Ea = function(t) {
2634
- d(this, Et, new jo({
2643
+ }, Aa = function(t) {
2644
+ d(this, Et, new Yo({
2635
2645
  background: e(this, Ei),
2636
2646
  receiverApplicationId: e(this, gi),
2637
2647
  options: t.getCastOptions()
2638
2648
  })), e(this, Et).init().then(() => {
2639
2649
  var i, s, o;
2640
- n(this, h, E).call(this, r.CAST_AVAILABLE, ""), (i = e(this, Et)) == null || i.on("connected", n(this, h, wn).bind(this)), (s = e(this, Et)) == null || s.on("resumed", n(this, h, wn).bind(this)), (o = e(this, Et)) == null || o.on("disconnected", n(this, h, Aa).bind(this));
2650
+ n(this, h, E).call(this, r.CAST_AVAILABLE, ""), (i = e(this, Et)) == null || i.on("connected", n(this, h, Sn).bind(this)), (s = e(this, Et)) == null || s.on("resumed", n(this, h, Sn).bind(this)), (o = e(this, Et)) == null || o.on("disconnected", n(this, h, ya).bind(this));
2641
2651
  }).catch((i) => {
2642
2652
  e(this, F).warn("Failed to initialize CastSender", i);
2643
2653
  });
2644
- }, wn = function() {
2654
+ }, Sn = function() {
2645
2655
  var i, s;
2646
2656
  n(this, h, E).call(this, r.IS_CASTING, "");
2647
2657
  const t = (s = (i = e(this, Et)) == null ? void 0 : i.getReceiverName()) != null ? s : "device";
2648
2658
  n(this, h, E).call(this, r.CAST_RECEIVER_NAME, t);
2649
- }, Aa = function() {
2659
+ }, ya = function() {
2650
2660
  n(this, h, L).call(this, r.IS_CASTING), n(this, h, L).call(this, r.CAST_RECEIVER_NAME);
2651
- }, ya = function(t) {
2661
+ }, ka = function(t) {
2652
2662
  var s;
2653
2663
  (s = e(this, it)) == null || s.unload();
2654
2664
  const i = t.getCastOptions();
2655
- d(this, it, new rl({
2665
+ d(this, it, new al({
2656
2666
  url: i.url,
2657
2667
  channelId: i.channelId,
2658
2668
  authenticationToken: i.authenticationToken,
@@ -2664,32 +2674,32 @@ zs = new WeakMap(), vt = new WeakMap(), mi = new WeakMap(), Mt = new WeakMap(),
2664
2674
  }), e(this, it).on("disconnected", () => {
2665
2675
  n(this, h, L).call(this, r.IS_AIRPLAYING);
2666
2676
  });
2667
- }, ka = function(t) {
2677
+ }, Ia = function(t) {
2668
2678
  var i;
2669
- if ((i = e(this, j)) == null || i.unload(), !Go()) {
2679
+ if ((i = e(this, j)) == null || i.unload(), !Ko()) {
2670
2680
  if (t.audioNode)
2671
- d(this, j, new kr(t.audioNode));
2681
+ d(this, j, new Ir(t.audioNode));
2672
2682
  else if (t.mediaElement instanceof HTMLMediaElement)
2673
- d(this, j, new kr(t.mediaElement));
2683
+ d(this, j, new Ir(t.mediaElement));
2674
2684
  else
2675
2685
  return;
2676
2686
  e(this, j).on("on decibel change", (s) => {
2677
2687
  n(this, h, E).call(this, r.VOLUME_LEVEL, JSON.stringify(s));
2678
2688
  }), n(this, h, E).call(this, r.VOLUME_LEVEL, JSON.stringify({ left: null, right: null })), (!e(this, j).isMediaElementSource || !this.hasAttribute(r.MUTED)) && e(this, j).start();
2679
2689
  }
2680
- }, Fi = new WeakMap(), Ia = function(t) {
2681
- t.pointerType !== "mouse" && t.timeStamp - e(this, Fi) < 250 || (n(this, h, As).call(this), e(this, Mt) && clearTimeout(e(this, Mt)), t.target instanceof HTMLElement && ([this, e(this, Dt)].includes(t.target) || t.target.localName === "vindral-scroll-overlay") && n(this, h, xt).call(this));
2682
- }, Ta = function(t) {
2683
- const i = this.hasAttribute(r.USER_INTERACTING);
2684
- t.pointerType === "touch" && t.target instanceof HTMLElement ? [this, e(this, Dt)].includes(t.target) && i ? n(this, h, Cn).call(this) : n(this, h, xt).call(this) : t.composedPath().some((s) => s instanceof HTMLElement && ["vindral-play-button"].includes(s == null ? void 0 : s.localName)) && n(this, h, xt).call(this);
2690
+ }, Fi = new WeakMap(), Ta = function(t) {
2691
+ t.pointerType !== "mouse" && t.timeStamp - e(this, Fi) < 250 || (n(this, h, ys).call(this), e(this, Mt) && clearTimeout(e(this, Mt)), t.target instanceof HTMLElement && ([this, e(this, Dt)].includes(t.target) || t.target.localName === "vindral-scroll-overlay") && n(this, h, xt).call(this));
2685
2692
  }, La = function(t) {
2686
- !e(this, gt) || t.target instanceof rt || t.target instanceof dr || t.target instanceof ni || (this.hasAttribute(r.FULLSCREEN) ? this.removeAttribute(r.FULLSCREEN) : this.setAttribute(r.FULLSCREEN, ""));
2693
+ const i = this.hasAttribute(r.USER_INTERACTING);
2694
+ t.pointerType === "touch" && t.target instanceof HTMLElement ? [this, e(this, Dt)].includes(t.target) && i ? n(this, h, xn).call(this) : n(this, h, xt).call(this) : t.composedPath().some((s) => s instanceof HTMLElement && ["vindral-play-button"].includes(s == null ? void 0 : s.localName)) && n(this, h, xt).call(this);
2687
2695
  }, wa = function(t) {
2696
+ !e(this, gt) || t.target instanceof rt || t.target instanceof cr || t.target instanceof ni || (this.hasAttribute(r.FULLSCREEN) ? this.removeAttribute(r.FULLSCREEN) : this.setAttribute(r.FULLSCREEN, ""));
2697
+ }, Sa = function(t) {
2688
2698
  this.hasAttribute(r.USER_INTERACTING) || n(this, h, xt).call(this);
2689
- }, Oi = new WeakMap(), Vs = new WeakMap(), Xs = new WeakMap(), Sa = function(t) {
2699
+ }, Oi = new WeakMap(), Xs = new WeakMap(), js = new WeakMap(), Ca = function(t) {
2690
2700
  var p, v;
2691
2701
  const { metaKey: i, altKey: s, key: o } = t;
2692
- if (!(i || s || !an.includes(o) || (((p = t.target) == null ? void 0 : p.keysUsed) || []).includes(o)))
2702
+ if (!(i || s || !on.includes(o) || (((p = t.target) == null ? void 0 : p.keysUsed) || []).includes(o)))
2693
2703
  switch (o) {
2694
2704
  case "f":
2695
2705
  this.hasAttribute(r.FULLSCREEN) ? this.removeAttribute(r.FULLSCREEN) : this.setAttribute(r.FULLSCREEN, "");
@@ -2701,7 +2711,7 @@ zs = new WeakMap(), vt = new WeakMap(), mi = new WeakMap(), Mt = new WeakMap(),
2701
2711
  (v = this.querySelector("vindral-scroll-overlay")) == null || v.setAttribute("open", "");
2702
2712
  break;
2703
2713
  }
2704
- }, Hi = new WeakMap(), js = new WeakMap(), Ys = new WeakMap(), oe = new WeakMap(), Sn = function() {
2714
+ }, Hi = new WeakMap(), Ys = new WeakMap(), Js = new WeakMap(), oe = new WeakMap(), Cn = function() {
2705
2715
  return B(this, null, function* () {
2706
2716
  if (!e(this, b) || !e(this, ft))
2707
2717
  return;
@@ -2714,52 +2724,57 @@ zs = new WeakMap(), vt = new WeakMap(), mi = new WeakMap(), Mt = new WeakMap(),
2714
2724
  n(this, h, E).call(this, r.CHANNELS, JSON.stringify(i));
2715
2725
  }
2716
2726
  d(this, Ot, window.setTimeout(() => {
2717
- n(this, h, Sn).call(this);
2727
+ n(this, h, Cn).call(this);
2718
2728
  }, 1e4));
2719
2729
  });
2720
- }, Cn = function() {
2730
+ }, xn = function() {
2721
2731
  !this.hasAttribute(r.USER_INTERACTING) || this.hasAttribute(r.UI_LOCKED) || (this.dispatchEvent(
2722
2732
  new CustomEvent("user-interacting", { bubbles: !0, composed: !0, detail: { active: !1 } })
2723
2733
  ), this.removeAttribute(r.USER_INTERACTING));
2724
- }, As = function() {
2734
+ }, ys = function() {
2725
2735
  this.hasAttribute(r.USER_INTERACTING) || requestAnimationFrame(() => {
2726
2736
  this.setAttribute(r.USER_INTERACTING, ""), this.dispatchEvent(
2727
2737
  new CustomEvent("user-interacting", { bubbles: !0, composed: !0, detail: { active: !0 } })
2728
2738
  );
2729
2739
  });
2730
2740
  }, xt = function() {
2731
- n(this, h, As).call(this), e(this, Mt) && clearTimeout(e(this, Mt)), e(this, mi) && d(this, Mt, self.setTimeout(() => {
2732
- n(this, h, Cn).call(this);
2741
+ n(this, h, ys).call(this), e(this, Mt) && clearTimeout(e(this, Mt)), e(this, mi) && d(this, Mt, self.setTimeout(() => {
2742
+ n(this, h, xn).call(this);
2733
2743
  }, e(this, mi)));
2734
- }, ys = function() {
2744
+ }, /** Syncs subtitle offset from CSS to media element for canvas rendering */
2745
+ xa = function() {
2746
+ var i, s;
2747
+ const t = getComputedStyle(this).getPropertyValue("--vindral-subtitle-offset") || "0px";
2748
+ (s = (i = e(this, b)) == null ? void 0 : i.mediaElement) == null || s.style.setProperty("--vindral-subtitle-offset", t);
2749
+ }, ks = function() {
2735
2750
  var t;
2736
- n(this, h, gs).call(this), n(this, h, Nn).call(this), (t = e(this, K)) == null || t.request().catch((i) => {
2751
+ n(this, h, Es).call(this), n(this, h, Rn).call(this), (t = e(this, K)) == null || t.request().catch((i) => {
2737
2752
  e(this, F).warn("Failed to enter picture in picture:", i);
2738
2753
  });
2739
- }, ks = function() {
2754
+ }, Is = function() {
2740
2755
  var t;
2741
2756
  (t = e(this, K)) == null || t.exit().catch((i) => {
2742
2757
  e(this, F).warn("Failed to exit picture in picture:", i);
2743
2758
  });
2744
- }, Ca = function() {
2745
- const t = n(this, h, Es).call(this);
2759
+ }, Na = function() {
2760
+ const t = n(this, h, As).call(this);
2746
2761
  if (!t) {
2747
2762
  console.warn("No fullscreen target available"), this.setAttribute(r.FULLSCREEN_FALLBACK, ""), n(this, h, E).call(this, r.FULLSCREEN, "");
2748
2763
  return;
2749
2764
  }
2750
- t != null && t.isFullscreenApiSupported() ? (n(this, h, Nn).call(this), t == null || t.request().then(() => {
2751
- e(this, Js).call(this);
2765
+ t != null && t.isFullscreenApiSupported() ? (n(this, h, Rn).call(this), t == null || t.request().then(() => {
2766
+ e(this, Ws).call(this);
2752
2767
  }).catch((i) => {
2753
2768
  e(this, F).warn("Failed to enter fullscreen:", i);
2754
2769
  })) : (this.setAttribute(r.FULLSCREEN_FALLBACK, ""), n(this, h, E).call(this, r.FULLSCREEN, ""));
2755
- }, xn = function() {
2756
- const t = n(this, h, Es).call(this);
2770
+ }, Nn = function() {
2771
+ const t = n(this, h, As).call(this);
2757
2772
  t != null && t.isFullscreenApiSupported() ? t == null || t.exit().then(() => {
2758
- e(this, Ws).call(this);
2773
+ e(this, Qs).call(this);
2759
2774
  }).catch((i) => {
2760
2775
  e(this, F).warn("Failed to exit fullscreen:", i);
2761
2776
  }) : (this.removeAttribute(r.FULLSCREEN_FALLBACK), n(this, h, L).call(this, r.FULLSCREEN));
2762
- }, Js = new WeakMap(), Ws = new WeakMap(), Nn = function() {
2777
+ }, Ws = new WeakMap(), Qs = new WeakMap(), Rn = function() {
2763
2778
  if (!e(this, b)) return;
2764
2779
  e(this, b).emitter.emit("ios-hack: reset size");
2765
2780
  }, E = function(t, i) {
@@ -2769,7 +2784,7 @@ zs = new WeakMap(), vt = new WeakMap(), mi = new WeakMap(), Mt = new WeakMap(),
2769
2784
  var i;
2770
2785
  (i = e(this, vt).get(t)) == null || i.forEach((s) => s.removeAttribute(t));
2771
2786
  }, m(Ye, "observedAttributes", [
2772
- ...Lr,
2787
+ ...wr,
2773
2788
  "url",
2774
2789
  "edge-url",
2775
2790
  "target-buffer-time",
@@ -2803,20 +2818,20 @@ zs = new WeakMap(), vt = new WeakMap(), mi = new WeakMap(), Mt = new WeakMap(),
2803
2818
  "reconnect-retries",
2804
2819
  "auto-instance-enabled",
2805
2820
  "language"
2806
- ]), l(Ye, zs, "https://lb.cdn.vindral.com");
2821
+ ]), l(Ye, Bs, "https://lb.cdn.vindral.com");
2807
2822
  let ri = Ye;
2808
- const xa = document.createElement("template"), hl = (
2823
+ const Ra = document.createElement("template"), dl = (
2809
2824
  /* SVG */
2810
2825
  `
2811
2826
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-maximize"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 8v-2a2 2 0 0 1 2 -2h2" /><path d="M4 16v2a2 2 0 0 0 2 2h2" /><path d="M16 4h2a2 2 0 0 1 2 2v2" /><path d="M16 20h2a2 2 0 0 0 2 -2v-2" /></svg>
2812
2827
  `
2813
- ), dl = (
2828
+ ), cl = (
2814
2829
  /* SVG */
2815
2830
  `
2816
2831
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-minimize"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 19v-2a2 2 0 0 1 2 -2h2" /><path d="M15 5v2a2 2 0 0 0 2 2h2" /><path d="M5 15h2a2 2 0 0 1 2 2v2" /><path d="M5 9h2a2 2 0 0 0 2 -2v-2" /></svg>
2817
2832
  `
2818
2833
  );
2819
- xa.innerHTML = /* HTML */
2834
+ Ra.innerHTML = /* HTML */
2820
2835
  `
2821
2836
  <style>
2822
2837
  :host {
@@ -2833,14 +2848,14 @@ xa.innerHTML = /* HTML */
2833
2848
  </style>
2834
2849
 
2835
2850
  <slot name="icon">
2836
- <slot name="enter">${hl}</slot>
2837
- <slot name="exit">${dl}</slot>
2851
+ <slot name="enter">${dl}</slot>
2852
+ <slot name="exit">${cl}</slot>
2838
2853
  </slot>
2839
2854
  `;
2840
2855
  const Je = class Je extends rt {
2841
2856
  constructor() {
2842
2857
  var a;
2843
- super(), (a = this.shadowRoot) == null || a.appendChild(xa.content.cloneNode(!0));
2858
+ super(), (a = this.shadowRoot) == null || a.appendChild(Ra.content.cloneNode(!0));
2844
2859
  }
2845
2860
  connectedCallback() {
2846
2861
  super.connectedCallback(), this.setAttribute("aria-label", this.isFullscreen ? "Exit fullscreen" : "Enter fullscreen");
@@ -2863,14 +2878,14 @@ const Je = class Je extends rt {
2863
2878
  }
2864
2879
  };
2865
2880
  m(Je, "observedAttributes", [...J(Je, Je, "observedAttributes"), r.FULLSCREEN]);
2866
- let Rn = Je;
2867
- const cl = (
2881
+ let Un = Je;
2882
+ const ul = (
2868
2883
  /* SVG */
2869
2884
  `
2870
2885
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7" /><path d="M9 3v2c0 4.418 -2.239 8 -5 8" /><path d="M5 9c0 2.144 2.952 3.908 6.7 4" /><path d="M12 20l4 -9l4 9" /><path d="M19.1 18h-6.2" /></svg>
2871
2886
  `
2872
- ), Na = document.createElement("template");
2873
- Na.innerHTML = /* HTML */
2887
+ ), Ua = document.createElement("template");
2888
+ Ua.innerHTML = /* HTML */
2874
2889
  `
2875
2890
  <style>
2876
2891
  :host(:not([hidden])) {
@@ -2878,38 +2893,38 @@ Na.innerHTML = /* HTML */
2878
2893
  }
2879
2894
  </style>
2880
2895
 
2881
- <slot name="button">${cl}</slot>
2896
+ <slot name="button">${ul}</slot>
2882
2897
  <slot name="listbox" hidden>
2883
2898
  <vindral-language-menu-list id="listbox" part="listbox"></vindral-language-menu-list>
2884
2899
  </slot>
2885
2900
  `;
2886
- var zi, Pn;
2887
- const We = class We extends dr {
2901
+ var zi, _n;
2902
+ const We = class We extends cr {
2888
2903
  constructor() {
2889
2904
  var t, i, s, o;
2890
2905
  super();
2891
2906
  l(this, zi);
2892
- (t = this.shadowRoot) == null || t.appendChild(Na.content.cloneNode(!0)), this.button = (i = this.shadowRoot) == null ? void 0 : i.querySelector("slot[name=button]"), this.listbox = (s = this.shadowRoot) == null ? void 0 : s.querySelector("[part=listbox]"), this.listboxSlot = (o = this.shadowRoot) == null ? void 0 : o.querySelector("slot[name=listbox]");
2907
+ (t = this.shadowRoot) == null || t.appendChild(Ua.content.cloneNode(!0)), this.button = (i = this.shadowRoot) == null ? void 0 : i.querySelector("slot[name=button]"), this.listbox = (s = this.shadowRoot) == null ? void 0 : s.querySelector("[part=listbox]"), this.listboxSlot = (o = this.shadowRoot) == null ? void 0 : o.querySelector("slot[name=listbox]");
2893
2908
  }
2894
2909
  connectedCallback() {
2895
- super.connectedCallback(), n(this, zi, Pn).call(this), this.setAttribute("aria-label", "Languages");
2910
+ super.connectedCallback(), n(this, zi, _n).call(this), this.setAttribute("aria-label", "Languages");
2896
2911
  }
2897
2912
  attributeChangedCallback(t, i, s) {
2898
- super.attributeChangedCallback(t, i, s), (t === r.LANGUAGES || t === r.TEXT_TRACKS) && n(this, zi, Pn).call(this);
2913
+ super.attributeChangedCallback(t, i, s), (t === r.LANGUAGES || t === r.TEXT_TRACKS) && n(this, zi, _n).call(this);
2899
2914
  }
2900
2915
  };
2901
- zi = new WeakSet(), Pn = function() {
2916
+ zi = new WeakSet(), _n = function() {
2902
2917
  const t = (o) => (o ? JSON.parse(o) : []).length < 2, i = t(this.getAttribute(r.LANGUAGES)), s = t(this.getAttribute(r.TEXT_TRACKS));
2903
2918
  i && s ? this.setAttribute("hidden", "") : this.removeAttribute("hidden");
2904
2919
  }, m(We, "observedAttributes", [...J(We, We, "observedAttributes"), r.LANGUAGES, r.TEXT_TRACKS]);
2905
- let Un = We;
2906
- const Ra = document.createElement("template"), ul = (
2920
+ let Pn = We;
2921
+ const Pa = document.createElement("template"), pl = (
2907
2922
  /* SVG */
2908
2923
  `
2909
2924
  <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="#fff" viewBox="0 0 78.369 78.369" xml:space="preserve"><path d="M78.049 19.015 29.458 67.606a1.094 1.094 0 0 1-1.548 0L.32 40.015a1.094 1.094 0 0 1 0-1.547l6.704-6.704a1.095 1.095 0 0 1 1.548 0l20.113 20.112 41.113-41.113a1.095 1.095 0 0 1 1.548 0l6.703 6.704a1.094 1.094 0 0 1 0 1.548z"/></svg>
2910
2925
  `
2911
2926
  );
2912
- Ra.innerHTML = /* HTML */
2927
+ Pa.innerHTML = /* HTML */
2913
2928
  `
2914
2929
  <style>
2915
2930
  :host {
@@ -2985,7 +3000,7 @@ Ra.innerHTML = /* HTML */
2985
3000
  }
2986
3001
 
2987
3002
  [role="menuitem"][aria-selected="true"]::before {
2988
- content: url("data:image/svg+xml,${encodeURIComponent(ul)}");
3003
+ content: url("data:image/svg+xml,${encodeURIComponent(pl)}");
2989
3004
  position: absolute;
2990
3005
  left: var(--padding-3);
2991
3006
  top: calc(50% - 8px);
@@ -3024,8 +3039,8 @@ Ra.innerHTML = /* HTML */
3024
3039
  <div class="menu"></div>
3025
3040
  </div>
3026
3041
  `;
3027
- var Bi, $i, Gi, Ki, lt, Q, le, zt, _e, qi, At, ht, I, Pa, _a, _n, Mn, Is, Ke, qe, Ma, Da, Fa, Dn, Fn, Oa;
3028
- class Ua extends HTMLElement {
3042
+ var Bi, $i, Gi, Ki, lt, Q, le, zt, _e, qi, At, ht, I, Ma, Da, Mn, Dn, Ts, Ke, qe, Fa, Oa, Ha, Fn, On, za;
3043
+ class _a extends HTMLElement {
3029
3044
  constructor() {
3030
3045
  super();
3031
3046
  l(this, I);
@@ -3042,14 +3057,14 @@ class Ua extends HTMLElement {
3042
3057
  l(this, At, null);
3043
3058
  l(this, ht, null);
3044
3059
  m(this, "handleEvent", (t) => {
3045
- t.type === "keydown" && n(this, I, Da).call(this, t);
3060
+ t.type === "keydown" && n(this, I, Oa).call(this, t);
3046
3061
  });
3047
- this.attachShadow({ mode: "open" }).appendChild(Ra.content.cloneNode(!0));
3062
+ this.attachShadow({ mode: "open" }).appendChild(Pa.content.cloneNode(!0));
3048
3063
  }
3049
3064
  connectedCallback() {
3050
3065
  var i, s, o;
3051
3066
  const t = this.getRootNode();
3052
- t instanceof ShadowRoot && (d(this, _e, t.host.closest("vindral-controller")), (i = e(this, _e)) == null || i.connectListener(this), d(this, le, (s = this.shadowRoot) == null ? void 0 : s.querySelector("#languages .menu")), d(this, zt, (o = this.shadowRoot) == null ? void 0 : o.querySelector("#text-tracks .menu")), n(this, I, Pa).call(this), n(this, I, _a).call(this), d(this, qi, t.host), this.addEventListener("keydown", this));
3067
+ t instanceof ShadowRoot && (d(this, _e, t.host.closest("vindral-controller")), (i = e(this, _e)) == null || i.connectListener(this), d(this, le, (s = this.shadowRoot) == null ? void 0 : s.querySelector("#languages .menu")), d(this, zt, (o = this.shadowRoot) == null ? void 0 : o.querySelector("#text-tracks .menu")), n(this, I, Ma).call(this), n(this, I, Da).call(this), d(this, qi, t.host), this.addEventListener("keydown", this));
3053
3068
  }
3054
3069
  disconnectedCallback() {
3055
3070
  this.removeEventListener("keydown", this);
@@ -3058,10 +3073,10 @@ class Ua extends HTMLElement {
3058
3073
  i !== s && (t === r.LANGUAGES && s && (this.languages = JSON.parse(s)), t === r.TEXT_TRACKS && s && (this.textTracks = JSON.parse(s)), t === r.LANGUAGE && (this.language = s), t === r.TEXT_TRACK && (this.textTrack = s));
3059
3074
  }
3060
3075
  set languages(t) {
3061
- d(this, Bi, t), n(this, I, Mn).call(this), n(this, I, Ke).call(this);
3076
+ d(this, Bi, t), n(this, I, Dn).call(this), n(this, I, Ke).call(this);
3062
3077
  }
3063
3078
  set textTracks(t) {
3064
- d(this, $i, t), n(this, I, _n).call(this), n(this, I, qe).call(this);
3079
+ d(this, $i, t), n(this, I, Mn).call(this), n(this, I, qe).call(this);
3065
3080
  }
3066
3081
  set language(t) {
3067
3082
  d(this, Gi, t), n(this, I, Ke).call(this);
@@ -3076,7 +3091,7 @@ class Ua extends HTMLElement {
3076
3091
  e(this, At) ? e(this, At).focus() : e(this, ht) && e(this, ht).focus();
3077
3092
  }
3078
3093
  }
3079
- Bi = new WeakMap(), $i = new WeakMap(), Gi = new WeakMap(), Ki = new WeakMap(), lt = new WeakMap(), Q = new WeakMap(), le = new WeakMap(), zt = new WeakMap(), _e = new WeakMap(), qi = new WeakMap(), At = new WeakMap(), ht = new WeakMap(), I = new WeakSet(), Pa = function() {
3094
+ Bi = new WeakMap(), $i = new WeakMap(), Gi = new WeakMap(), Ki = new WeakMap(), lt = new WeakMap(), Q = new WeakMap(), le = new WeakMap(), zt = new WeakMap(), _e = new WeakMap(), qi = new WeakMap(), At = new WeakMap(), ht = new WeakMap(), I = new WeakSet(), Ma = function() {
3080
3095
  const t = (s) => {
3081
3096
  s.forEach((o) => {
3082
3097
  if (o.intersectionRatio !== 1)
@@ -3093,23 +3108,23 @@ Bi = new WeakMap(), $i = new WeakMap(), Gi = new WeakMap(), Ki = new WeakMap(),
3093
3108
  threshold: 0
3094
3109
  // 0 means any intersection is enough to be considered "inside"
3095
3110
  }).observe(this);
3096
- }, _a = function() {
3097
- e(this, le) && (n(this, I, Mn).call(this), n(this, I, Ke).call(this)), e(this, zt) && (n(this, I, _n).call(this), n(this, I, qe).call(this));
3098
- }, _n = function() {
3111
+ }, Da = function() {
3112
+ e(this, le) && (n(this, I, Dn).call(this), n(this, I, Ke).call(this)), e(this, zt) && (n(this, I, Mn).call(this), n(this, I, qe).call(this));
3113
+ }, Mn = function() {
3099
3114
  e(this, zt).innerHTML = "", d(this, Q, []);
3100
- const t = n(this, I, Is).call(this, "Off", "textTrack", void 0);
3115
+ const t = n(this, I, Ts).call(this, "Off", "textTrack", void 0);
3101
3116
  e(this, zt).appendChild(t), e(this, Q).push({ element: t, value: void 0 }), e(this, $i).forEach((i) => {
3102
- const s = n(this, I, Is).call(this, i, "textTrack", i);
3117
+ const s = n(this, I, Ts).call(this, i, "textTrack", i);
3103
3118
  e(this, zt).appendChild(s), e(this, Q).push({ element: s, value: i });
3104
3119
  }), n(this, I, qe).call(this);
3105
- }, Mn = function() {
3120
+ }, Dn = function() {
3106
3121
  e(this, le).innerHTML = "", d(this, lt, []), e(this, Bi).forEach((t) => {
3107
- const i = n(this, I, Is).call(this, t, "language", t);
3122
+ const i = n(this, I, Ts).call(this, t, "language", t);
3108
3123
  e(this, le).appendChild(i), e(this, lt).push({ element: i, value: t });
3109
3124
  }), n(this, I, Ke).call(this);
3110
- }, Is = function(t, i, s) {
3125
+ }, Ts = function(t, i, s) {
3111
3126
  const o = document.createElement("div");
3112
- return o.setAttribute("role", "menuitem"), o.textContent = t, o.addEventListener("click", () => n(this, I, Ma).call(this, s, i)), o;
3127
+ return o.setAttribute("role", "menuitem"), o.textContent = t, o.addEventListener("click", () => n(this, I, Fa).call(this, s, i)), o;
3113
3128
  }, Ke = function() {
3114
3129
  e(this, At) && (e(this, At).removeAttribute("aria-selected"), e(this, At).tabIndex = -1);
3115
3130
  const t = e(this, lt).find((i) => i.value === e(this, Gi));
@@ -3123,38 +3138,38 @@ Bi = new WeakMap(), $i = new WeakMap(), Gi = new WeakMap(), Ki = new WeakMap(),
3123
3138
  const i = e(this, Q).find((s) => s.value === void 0);
3124
3139
  i && (i.element.setAttribute("aria-selected", "true"), i.element.tabIndex = 0, d(this, ht, i.element));
3125
3140
  }
3126
- }, Ma = function(t, i) {
3141
+ }, Fa = function(t, i) {
3127
3142
  this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 }));
3128
3143
  const s = i === "language" ? k.SET_LANGUAGE : k.SET_TEXT_TRACK;
3129
3144
  this.dispatchEvent(new CustomEvent(s, { bubbles: !0, composed: !0, detail: t }));
3130
- }, Da = function(t) {
3145
+ }, Oa = function(t) {
3131
3146
  var p, v, A;
3132
3147
  const { key: i, ctrlKey: s, altKey: o, metaKey: u } = t;
3133
- s || o || u || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? (p = e(this, qi)) == null || p.hide() : i === "Enter" || i === " " ? (A = (v = n(this, I, Fn).call(this)) == null ? void 0 : v.element) == null || A.click() : n(this, I, Fa).call(this, t));
3134
- }, Fa = function(t) {
3148
+ s || o || u || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? (p = e(this, qi)) == null || p.hide() : i === "Enter" || i === " " ? (A = (v = n(this, I, On).call(this)) == null ? void 0 : v.element) == null || A.click() : n(this, I, Ha).call(this, t));
3149
+ }, Ha = function(t) {
3135
3150
  var A;
3136
- const { key: i } = t, s = [...e(this, lt), ...e(this, Q)], o = (A = n(this, I, Fn).call(this)) != null ? A : s[0];
3151
+ const { key: i } = t, s = [...e(this, lt), ...e(this, Q)], o = (A = n(this, I, On).call(this)) != null ? A : s[0];
3137
3152
  if (!o) return;
3138
3153
  const u = s.indexOf(o);
3139
3154
  let p = Math.max(0, u);
3140
- i === "ArrowDown" ? p++ : i === "ArrowUp" ? p-- : i === "ArrowLeft" ? p = n(this, I, Dn).call(this, u, "left") : i === "ArrowRight" ? p = n(this, I, Dn).call(this, u, "right") : t.key === "Home" ? p = 0 : t.key === "End" && (p = s.length - 1), p < 0 && (p = s.length - 1), p > s.length - 1 && (p = 0);
3155
+ i === "ArrowDown" ? p++ : i === "ArrowUp" ? p-- : i === "ArrowLeft" ? p = n(this, I, Fn).call(this, u, "left") : i === "ArrowRight" ? p = n(this, I, Fn).call(this, u, "right") : t.key === "Home" ? p = 0 : t.key === "End" && (p = s.length - 1), p < 0 && (p = s.length - 1), p > s.length - 1 && (p = 0);
3141
3156
  const v = s[p];
3142
- v && (n(this, I, Oa).call(this, v.value), v.element.focus());
3143
- }, Dn = function(t, i) {
3157
+ v && (n(this, I, za).call(this, v.value), v.element.focus());
3158
+ }, Fn = function(t, i) {
3144
3159
  const s = e(this, lt).length, o = e(this, Q).length;
3145
3160
  return i === "left" ? t < s ? s + o - 1 : t - s - 1 : t >= s ? 0 : t + s;
3146
- }, Fn = function() {
3161
+ }, On = function() {
3147
3162
  return [...e(this, lt), ...e(this, Q)].find((t) => t.element.tabIndex === 0);
3148
- }, Oa = function(t) {
3163
+ }, za = function(t) {
3149
3164
  for (const i of [...e(this, lt), ...e(this, Q)])
3150
3165
  i.element.tabIndex = i.value === t ? 0 : -1;
3151
- }, m(Ua, "observedAttributes", [
3166
+ }, m(_a, "observedAttributes", [
3152
3167
  r.LANGUAGES,
3153
3168
  r.TEXT_TRACKS,
3154
3169
  r.LANGUAGE,
3155
3170
  r.TEXT_TRACK
3156
3171
  ]);
3157
- const Ha = document.createElement("template"), pl = (
3172
+ const Ba = document.createElement("template"), bl = (
3158
3173
  /* SVG */
3159
3174
  `
3160
3175
  <svg xmlns="http://www.w3.org/2000/svg" width="5" height="5" viewBox="0 0 5 5" fill="currentColor">
@@ -3162,7 +3177,7 @@ const Ha = document.createElement("template"), pl = (
3162
3177
  </svg>
3163
3178
  `
3164
3179
  );
3165
- Ha.innerHTML = /* HTML */
3180
+ Ba.innerHTML = /* HTML */
3166
3181
  `
3167
3182
  <style>
3168
3183
  :host {
@@ -3224,13 +3239,13 @@ Ha.innerHTML = /* HTML */
3224
3239
  }
3225
3240
  </style>
3226
3241
 
3227
- <slot name="icon">${pl}</slot>
3242
+ <slot name="icon">${bl}</slot>
3228
3243
  <span class="live-text">LIVE</span>
3229
3244
  `;
3230
3245
  const Qe = class Qe extends rt {
3231
3246
  constructor() {
3232
3247
  var a;
3233
- super(), (a = this.shadowRoot) == null || a.appendChild(Ha.content.cloneNode(!0));
3248
+ super(), (a = this.shadowRoot) == null || a.appendChild(Ba.content.cloneNode(!0));
3234
3249
  }
3235
3250
  connectedCallback() {
3236
3251
  super.connectedCallback(), this.updateState();
@@ -3258,9 +3273,13 @@ const Qe = class Qe extends rt {
3258
3273
  this.isLive || this.dispatchEvent(new CustomEvent(k.GO_LIVE, { bubbles: !0, composed: !0 }));
3259
3274
  }
3260
3275
  };
3261
- m(Qe, "observedAttributes", [...J(Qe, Qe, "observedAttributes"), r.TIMESHIFT_POSITION, r.DURATION]);
3262
- let On = Qe;
3263
- const za = document.createElement("template"), bl = (
3276
+ m(Qe, "observedAttributes", [
3277
+ ...J(Qe, Qe, "observedAttributes"),
3278
+ r.TIMESHIFT_POSITION,
3279
+ r.DURATION
3280
+ ]);
3281
+ let Hn = Qe;
3282
+ const $a = document.createElement("template"), ml = (
3264
3283
  /* SVG */
3265
3284
  `
3266
3285
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" <g fill="none" stroke="currentColor">
@@ -3268,14 +3287,14 @@ const za = document.createElement("template"), bl = (
3268
3287
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2" />
3269
3288
  </g></svg>
3270
3289
  `
3271
- ), ml = (
3290
+ ), vl = (
3272
3291
  /* SVG */
3273
3292
  `
3274
3293
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" <g fill="none" stroke="currentColor">
3275
3294
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z" /></svg>
3276
3295
  `
3277
3296
  );
3278
- za.innerHTML = /* HTML */
3297
+ $a.innerHTML = /* HTML */
3279
3298
  `
3280
3299
  <style>
3281
3300
  :host {
@@ -3292,14 +3311,14 @@ za.innerHTML = /* HTML */
3292
3311
  </style>
3293
3312
 
3294
3313
  <slot name="icon">
3295
- <slot name="mute">${bl}</slot>
3296
- <slot name="unmute">${ml}</slot>
3314
+ <slot name="mute">${ml}</slot>
3315
+ <slot name="unmute">${vl}</slot>
3297
3316
  </slot>
3298
3317
  `;
3299
3318
  const Ze = class Ze extends rt {
3300
3319
  constructor() {
3301
3320
  var a;
3302
- super(), (a = this.shadowRoot) == null || a.appendChild(za.content.cloneNode(!0));
3321
+ super(), (a = this.shadowRoot) == null || a.appendChild($a.content.cloneNode(!0));
3303
3322
  }
3304
3323
  connectedCallback() {
3305
3324
  super.connectedCallback(), this.setAttribute("aria-label", this.muted ? "UnMute" : "Mute");
@@ -3322,14 +3341,14 @@ const Ze = class Ze extends rt {
3322
3341
  }
3323
3342
  };
3324
3343
  m(Ze, "observedAttributes", [...J(Ze, Ze, "observedAttributes"), r.MUTED]);
3325
- let Hn = Ze;
3326
- const Ba = document.createElement("template"), vl = (
3344
+ let zn = Ze;
3345
+ const Ga = document.createElement("template"), fl = (
3327
3346
  /* SVG */
3328
3347
  `
3329
3348
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M19 4a3 3 0 0 1 3 3v4a1 1 0 0 1 -2 0v-4a1 1 0 0 0 -1 -1h-14a1 1 0 0 0 -1 1v10a1 1 0 0 0 1 1h6a1 1 0 0 1 0 2h-6a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3z" /><path d="M20 13a2 2 0 0 1 2 2v3a2 2 0 0 1 -2 2h-5a2 2 0 0 1 -2 -2v-3a2 2 0 0 1 2 -2z" /></svg>
3330
3349
  `
3331
3350
  );
3332
- Ba.innerHTML = /* HTML */
3351
+ Ga.innerHTML = /* HTML */
3333
3352
  `
3334
3353
  <style>
3335
3354
  :host {
@@ -3340,12 +3359,12 @@ Ba.innerHTML = /* HTML */
3340
3359
  display: none !important;
3341
3360
  }
3342
3361
  </style>
3343
- <slot name="icon">${vl}</slot>
3362
+ <slot name="icon">${fl}</slot>
3344
3363
  `;
3345
3364
  const ti = class ti extends rt {
3346
3365
  constructor() {
3347
3366
  var a;
3348
- super(), (a = this.shadowRoot) == null || a.appendChild(Ba.content.cloneNode(!0));
3367
+ super(), (a = this.shadowRoot) == null || a.appendChild(Ga.content.cloneNode(!0));
3349
3368
  }
3350
3369
  connectedCallback() {
3351
3370
  super.connectedCallback(), this.setAttribute(
@@ -3374,19 +3393,19 @@ const ti = class ti extends rt {
3374
3393
  }
3375
3394
  };
3376
3395
  m(ti, "observedAttributes", [...J(ti, ti, "observedAttributes"), r.IS_PIP, r.PIP_AVAILABLE]);
3377
- let zn = ti;
3378
- const $a = document.createElement("template"), fl = (
3396
+ let Bn = ti;
3397
+ const Ka = document.createElement("template"), gl = (
3379
3398
  /* SVG */
3380
3399
  `
3381
3400
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z" /></svg>
3382
3401
  `
3383
- ), gl = (
3402
+ ), El = (
3384
3403
  /* SVG */
3385
3404
  `
3386
3405
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 4h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2z" /><path d="M17 4h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2z" /></svg>
3387
3406
  `
3388
3407
  );
3389
- $a.innerHTML = /* HTML */
3408
+ Ka.innerHTML = /* HTML */
3390
3409
  `
3391
3410
  <style>
3392
3411
  :host {
@@ -3403,14 +3422,14 @@ $a.innerHTML = /* HTML */
3403
3422
  </style>
3404
3423
 
3405
3424
  <slot name="icon">
3406
- <slot name="play">${fl}</slot>
3407
- <slot name="pause">${gl}</slot>
3425
+ <slot name="play">${gl}</slot>
3426
+ <slot name="pause">${El}</slot>
3408
3427
  </slot>
3409
3428
  `;
3410
3429
  const ei = class ei extends rt {
3411
3430
  constructor() {
3412
3431
  var a;
3413
- super(), (a = this.shadowRoot) == null || a.appendChild($a.content.cloneNode(!0));
3432
+ super(), (a = this.shadowRoot) == null || a.appendChild(Ka.content.cloneNode(!0));
3414
3433
  }
3415
3434
  connectedCallback() {
3416
3435
  super.connectedCallback(), this.setAttribute("aria-label", this.paused ? "Play" : "Pause");
@@ -3433,15 +3452,15 @@ const ei = class ei extends rt {
3433
3452
  }
3434
3453
  };
3435
3454
  m(ei, "observedAttributes", [...J(ei, ei, "observedAttributes"), r.PAUSED]);
3436
- let Bn = ei;
3455
+ let $n = ei;
3437
3456
  const Z = {
3438
3457
  TITLE: "title",
3439
3458
  OFFLINE: "offline",
3440
3459
  REFRESH_POSTER_ENABLED: "refresh-poster-enabled",
3441
3460
  STREAM_POLL_ENABLED: "stream-poll-enabled"
3442
- }, El = Object.values(Z);
3443
- var Vi, Me, Bt, he, $t, Gt, yt, Y, $n, Ga, Gn, Kn;
3444
- class Al extends ds {
3461
+ }, Al = Object.values(Z);
3462
+ var Vi, Me, Bt, he, $t, Gt, yt, Y, Gn, qa, Kn, qn;
3463
+ class yl extends ds {
3445
3464
  constructor(t) {
3446
3465
  super();
3447
3466
  l(this, Y);
@@ -3452,21 +3471,21 @@ class Al extends ds {
3452
3471
  l(this, $t, !0);
3453
3472
  l(this, Gt, null);
3454
3473
  l(this, yt, null);
3455
- d(this, Me, t), d(this, Vi, new Yo({
3474
+ d(this, Me, t), d(this, Vi, new Jo({
3456
3475
  publicEndpoint: t.url,
3457
3476
  tokenFactory: () => t.authenticationToken
3458
3477
  }));
3459
3478
  }
3460
3479
  start(t = 5e3) {
3461
- e(this, yt) && clearInterval(e(this, yt)), d(this, Bt, !1), d(this, he, !1), n(this, Y, Kn).call(this), n(this, Y, $n).call(this), d(this, yt, window.setInterval(() => {
3462
- !e(this, he) && !e(this, Me).infiniteReconnect && !e(this, Gt) && e(this, $t) && d(this, Gt, window.setTimeout(() => n(this, Y, Ga).call(this), 300 * 1e3)), !e(this, he) && e(this, $t) && n(this, Y, $n).call(this);
3480
+ e(this, yt) && clearInterval(e(this, yt)), d(this, Bt, !1), d(this, he, !1), n(this, Y, qn).call(this), n(this, Y, Gn).call(this), d(this, yt, window.setInterval(() => {
3481
+ !e(this, he) && !e(this, Me).infiniteReconnect && !e(this, Gt) && e(this, $t) && d(this, Gt, window.setTimeout(() => n(this, Y, qa).call(this), 300 * 1e3)), !e(this, he) && e(this, $t) && n(this, Y, Gn).call(this);
3463
3482
  }, t));
3464
3483
  }
3465
3484
  stop() {
3466
- n(this, Y, Gn).call(this), e(this, yt) && (window.clearInterval(e(this, yt)), d(this, yt, null));
3485
+ n(this, Y, Kn).call(this), e(this, yt) && (window.clearInterval(e(this, yt)), d(this, yt, null));
3467
3486
  }
3468
3487
  }
3469
- Vi = new WeakMap(), Me = new WeakMap(), Bt = new WeakMap(), he = new WeakMap(), $t = new WeakMap(), Gt = new WeakMap(), yt = new WeakMap(), Y = new WeakSet(), $n = function() {
3488
+ Vi = new WeakMap(), Me = new WeakMap(), Bt = new WeakMap(), he = new WeakMap(), $t = new WeakMap(), Gt = new WeakMap(), yt = new WeakMap(), Y = new WeakSet(), Gn = function() {
3470
3489
  return B(this, null, function* () {
3471
3490
  if (e(this, Bt))
3472
3491
  return;
@@ -3475,22 +3494,22 @@ Vi = new WeakMap(), Me = new WeakMap(), Bt = new WeakMap(), he = new WeakMap(),
3475
3494
  try {
3476
3495
  const s = yield e(this, Vi).getChannel(e(this, Me).channelId);
3477
3496
  if (s.isLive) {
3478
- d(this, he, !0), n(this, Y, Kn).call(this), this.emit("live", s), d(this, Bt, !1);
3497
+ d(this, he, !0), n(this, Y, qn).call(this), this.emit("live", s), d(this, Bt, !1);
3479
3498
  return;
3480
3499
  }
3481
3500
  } catch (s) {
3482
- Jo(s) && (s.status === 403 || s.status === 401) && (t = "Forbidden", i = "You do not have permission to view this stream");
3501
+ Wo(s) && (s.status === 403 || s.status === 401) && (t = "Forbidden", i = "You do not have permission to view this stream");
3483
3502
  }
3484
3503
  e(this, $t) && this.emit("error", { title: t, message: i }), d(this, Bt, !1);
3485
3504
  });
3486
- }, Ga = function() {
3505
+ }, qa = function() {
3487
3506
  this.stop(), d(this, $t, !1), this.emit("timeout");
3488
- }, Gn = function() {
3489
- e(this, Gt) && (window.clearTimeout(e(this, Gt)), d(this, Gt, null));
3490
3507
  }, Kn = function() {
3491
- n(this, Y, Gn).call(this), d(this, $t, !0);
3508
+ e(this, Gt) && (window.clearTimeout(e(this, Gt)), d(this, Gt, null));
3509
+ }, qn = function() {
3510
+ n(this, Y, Kn).call(this), d(this, $t, !0);
3492
3511
  };
3493
- const yl = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune\//i, kl = navigator.userAgent.toLowerCase(), Il = yl.test(kl), Tl = (c) => ri.observedAttributes.includes(c), Ka = (
3512
+ const kl = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune\//i, Il = navigator.userAgent.toLowerCase(), Tl = kl.test(Il), Ll = (c) => ri.observedAttributes.includes(c), Va = (
3494
3513
  /* HTML */
3495
3514
  `
3496
3515
  <style>
@@ -3502,7 +3521,7 @@ const yl = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|
3502
3521
  display: flex;
3503
3522
  justify-content: center;
3504
3523
 
3505
- --vindral-volume-range-display: ${Il ? "none" : "flex"};
3524
+ --vindral-volume-range-display: ${Tl ? "none" : "flex"};
3506
3525
  --vindral-airplay-button-display: none;
3507
3526
  --vindral-play-overlay-display: none;
3508
3527
  --vindral-grid-item-offline-display: none;
@@ -3574,12 +3593,19 @@ const yl = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|
3574
3593
  :host([${r.MEDIA}="video"]) vindral-volume-range {
3575
3594
  display: none;
3576
3595
  }
3596
+
3597
+ /* Apply subtitle offset when the UI is visible (e.g. during user interaction
3598
+ or when paused with the UI showing) so subtitles sit above the control bar. */
3599
+ vindral-controller[user-interacting],
3600
+ vindral-controller[paused]:not([hide-ui-on-pause]) {
3601
+ --vindral-subtitle-offset: -48px;
3602
+ }
3577
3603
  </style>
3578
3604
  `
3579
- ), Ll = (
3605
+ ), wl = (
3580
3606
  /* HTML */
3581
3607
  `
3582
- ${Ka}
3608
+ ${Va}
3583
3609
 
3584
3610
  <vindral-controller>
3585
3611
  <vindral-control-bar slot="top-bar">
@@ -3613,10 +3639,10 @@ const yl = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|
3613
3639
  <vindral-message id="vindral-message" slot="overlay" hidden></vindral-message>
3614
3640
  </vindral-controller>
3615
3641
  `
3616
- ), wl = (
3642
+ ), Sl = (
3617
3643
  /* HTML */
3618
3644
  `
3619
- ${Ka}
3645
+ ${Va}
3620
3646
 
3621
3647
  <style>
3622
3648
  #control-bar {
@@ -3639,9 +3665,9 @@ const yl = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|
3639
3665
  <vindral-message id="vindral-message" slot="overlay" hidden></vindral-message>
3640
3666
  </vindral-controller>
3641
3667
  `
3642
- ), Ir = document.createElement("template");
3643
- var dt, O, q, kt, It, Qs, Xi, P, Va, qn, Xa, ji, Ts, Nt;
3644
- class qa extends HTMLElement {
3668
+ ), Tr = document.createElement("template");
3669
+ var dt, O, q, kt, It, Zs, Xi, P, ja, Vn, Ya, ji, Ls, Nt;
3670
+ class Xa extends HTMLElement {
3645
3671
  constructor() {
3646
3672
  super();
3647
3673
  l(this, P);
@@ -3650,13 +3676,13 @@ class qa extends HTMLElement {
3650
3676
  l(this, q);
3651
3677
  l(this, kt);
3652
3678
  l(this, It);
3653
- l(this, Qs, () => {
3679
+ l(this, Zs, () => {
3654
3680
  Array.from(this.attributes).forEach((t) => {
3655
3681
  e(this, Xi).call(this, t.name, t.value);
3656
3682
  });
3657
3683
  });
3658
3684
  l(this, Xi, (t, i) => {
3659
- Tl(t) && (x(i) ? e(this, O).setAttribute(t, i) : e(this, O).removeAttribute(t));
3685
+ Ll(t) && (x(i) ? e(this, O).setAttribute(t, i) : e(this, O).removeAttribute(t));
3660
3686
  });
3661
3687
  l(this, ji, () => {
3662
3688
  const t = e(this, O).instance;
@@ -3664,22 +3690,22 @@ class qa extends HTMLElement {
3664
3690
  i ? (this.removeAttribute(Z.OFFLINE), e(this, q).setAttribute("hidden", "")) : (this.setAttribute(Z.OFFLINE, ""), e(this, q).removeAttribute("hidden"), n(this, P, Nt).call(this, "Stream is offline", "Please stand by"));
3665
3691
  }), t.on("channels", (i) => {
3666
3692
  const s = e(this, O).getAttribute("channel-id"), o = i.find((u) => u.channelId === s);
3667
- o && n(this, P, Ts).call(this, o);
3693
+ o && n(this, P, Ls).call(this, o);
3668
3694
  }), t.on("channel switch", ({ channelId: i }) => {
3669
3695
  const s = t.channels.find((o) => o.channelId === i);
3670
- s && n(this, P, Ts).call(this, s);
3696
+ s && n(this, P, Ls).call(this, s);
3671
3697
  }), t.on("error", (i) => {
3672
- if (i.code() === Ko) {
3698
+ if (i.code() === qo) {
3673
3699
  n(this, P, Nt).call(this, "Stream is offline", "Please stand by");
3674
3700
  return;
3675
3701
  }
3676
- i.isFatal() && (i.code() === qo ? n(this, P, Nt).call(this, "Forbidden", "You do not have permission to view this stream") : i.code() === Vo ? n(this, P, Nt).call(this, "Stream is offline", "Please stand by") : n(this, P, Nt).call(this, "An error occurred", i.message), e(this, kt).removeAttribute("hidden"), this.setAttribute(Z.OFFLINE, ""), e(this, O).dispatchEvent(new CustomEvent(k.EXIT_FULLSCREEN)), e(this, O).dispatchEvent(new CustomEvent(k.EXIT_PIP)));
3702
+ i.isFatal() && (i.code() === Vo ? n(this, P, Nt).call(this, "Forbidden", "You do not have permission to view this stream") : i.code() === Xo ? n(this, P, Nt).call(this, "Stream is offline", "Please stand by") : n(this, P, Nt).call(this, "An error occurred", i.message), e(this, kt).removeAttribute("hidden"), this.setAttribute(Z.OFFLINE, ""), e(this, O).dispatchEvent(new CustomEvent(k.EXIT_FULLSCREEN)), e(this, O).dispatchEvent(new CustomEvent(k.EXIT_PIP)));
3677
3703
  }));
3678
3704
  });
3679
- d(this, dt, this.attachShadow({ mode: "open" })), n(this, P, qn).call(this), d(this, O, e(this, dt).querySelector("vindral-controller")), d(this, q, e(this, dt).querySelector("#vindral-message")), d(this, kt, e(this, dt).querySelector("#play-overlay"));
3705
+ d(this, dt, this.attachShadow({ mode: "open" })), n(this, P, Vn).call(this), d(this, O, e(this, dt).querySelector("vindral-controller")), d(this, q, e(this, dt).querySelector("#vindral-message")), d(this, kt, e(this, dt).querySelector("#play-overlay"));
3680
3706
  }
3681
3707
  connectedCallback() {
3682
- this.setAttribute(Z.OFFLINE, ""), e(this, O).addEventListener("vindral-instance-ready", e(this, ji)), n(this, P, Xa).call(this);
3708
+ this.setAttribute(Z.OFFLINE, ""), e(this, O).addEventListener("vindral-instance-ready", e(this, ji)), n(this, P, Ya).call(this);
3683
3709
  }
3684
3710
  disconnectedCallback() {
3685
3711
  var t;
@@ -3688,7 +3714,7 @@ class qa extends HTMLElement {
3688
3714
  attributeChangedCallback(t, i, s) {
3689
3715
  if (i !== s)
3690
3716
  if (t === r.MEDIA)
3691
- n(this, P, qn).call(this);
3717
+ n(this, P, Vn).call(this);
3692
3718
  else if (t === Z.REFRESH_POSTER_ENABLED) {
3693
3719
  const o = e(this, dt).querySelector("vindral-poster-overlay");
3694
3720
  o && (o.disabled = D(this.getAttribute(Z.REFRESH_POSTER_ENABLED), !1) === !1);
@@ -3702,15 +3728,15 @@ class qa extends HTMLElement {
3702
3728
  return e(this, O).airPlay;
3703
3729
  }
3704
3730
  }
3705
- dt = new WeakMap(), O = new WeakMap(), q = new WeakMap(), kt = new WeakMap(), It = new WeakMap(), Qs = new WeakMap(), Xi = new WeakMap(), P = new WeakSet(), Va = function() {
3706
- return wr(this.getAttribute(r.MEDIA)) === "audio" ? wl : Ll;
3707
- }, qn = function() {
3708
- Ir.innerHTML = n(this, P, Va).call(this);
3709
- const t = Ir.content.cloneNode(!0);
3731
+ dt = new WeakMap(), O = new WeakMap(), q = new WeakMap(), kt = new WeakMap(), It = new WeakMap(), Zs = new WeakMap(), Xi = new WeakMap(), P = new WeakSet(), ja = function() {
3732
+ return Sr(this.getAttribute(r.MEDIA)) === "audio" ? Sl : wl;
3733
+ }, Vn = function() {
3734
+ Tr.innerHTML = n(this, P, ja).call(this);
3735
+ const t = Tr.content.cloneNode(!0);
3710
3736
  d(this, O, t.querySelector("vindral-controller")), d(this, q, t.querySelector("#vindral-message")), d(this, kt, t.querySelector("#play-overlay")), this.children.length > 0 && Array.from(this.children).forEach((i) => {
3711
3737
  e(this, O).appendChild(i);
3712
- }), e(this, Qs).call(this), e(this, dt).innerHTML = "", e(this, dt).appendChild(t);
3713
- }, Xa = function() {
3738
+ }), e(this, Zs).call(this), e(this, dt).innerHTML = "", e(this, dt).appendChild(t);
3739
+ }, Ya = function() {
3714
3740
  var u;
3715
3741
  if (D(this.getAttribute(Z.STREAM_POLL_ENABLED), !0) === !1)
3716
3742
  return;
@@ -3719,13 +3745,13 @@ dt = new WeakMap(), O = new WeakMap(), q = new WeakMap(), kt = new WeakMap(), It
3719
3745
  this.setAttribute(Z.OFFLINE, ""), n(this, P, Nt).call(this, "Invalid options", "Please enter at least a channel id and url to start the stream");
3720
3746
  return;
3721
3747
  }
3722
- d(this, It, new Al({
3748
+ d(this, It, new yl({
3723
3749
  url: t,
3724
3750
  channelId: i,
3725
3751
  authenticationToken: s,
3726
3752
  infiniteReconnect: o
3727
3753
  })), e(this, It).on("live", (p) => {
3728
- e(this, O).connect(), this.removeAttribute("offline"), e(this, q).setAttribute("hidden", ""), n(this, P, Ts).call(this, p);
3754
+ e(this, O).connect(), this.removeAttribute("offline"), e(this, q).setAttribute("hidden", ""), n(this, P, Ls).call(this, p);
3729
3755
  }), e(this, It).on("timeout", () => {
3730
3756
  e(this, q).setAttribute("hidden", ""), e(this, kt).removeAttribute("hidden");
3731
3757
  }), e(this, It).on("error", (p) => {
@@ -3733,13 +3759,13 @@ dt = new WeakMap(), O = new WeakMap(), q = new WeakMap(), kt = new WeakMap(), It
3733
3759
  }), e(this, kt).addEventListener("click", () => {
3734
3760
  e(this, O).connect(), e(this, kt).setAttribute("hidden", ""), e(this, q).setAttribute("hidden", ""), e(this, O).focus();
3735
3761
  }), this.hasAttribute("paused") && e(this, It).start();
3736
- }, ji = new WeakMap(), Ts = function(t) {
3762
+ }, ji = new WeakMap(), Ls = function(t) {
3737
3763
  var p, v;
3738
- const i = Sr(this.getAttribute("title"), !1);
3764
+ const i = Cr(this.getAttribute("title"), !1);
3739
3765
  if (!i) return;
3740
3766
  const s = this.getAttribute("poster"), o = typeof i == "string" ? i : t.name;
3741
3767
  let u;
3742
- typeof s == "string" ? u = s : u = (v = (p = this.instance) == null ? void 0 : p.getThumbnailUrl()) != null ? v : t.thumbnailUrls.length ? t.thumbnailUrls[0] : void 0, Zo({
3768
+ typeof s == "string" ? u = s : u = (v = (p = this.instance) == null ? void 0 : p.getThumbnailUrl()) != null ? v : t.thumbnailUrls.length ? t.thumbnailUrls[0] : void 0, tl({
3743
3769
  title: o,
3744
3770
  poster: u
3745
3771
  });
@@ -3747,9 +3773,9 @@ dt = new WeakMap(), O = new WeakMap(), q = new WeakMap(), kt = new WeakMap(), It
3747
3773
  e(this, q).setAttribute("title", t), e(this, q).setAttribute("description", i);
3748
3774
  const s = this.getAttribute("poster");
3749
3775
  s && e(this, q).setAttribute("background-image", s), e(this, q).removeAttribute("hidden");
3750
- }, m(qa, "observedAttributes", [...ri.observedAttributes, ...El]);
3751
- const ja = document.createElement("template");
3752
- ja.innerHTML = /* HTML */
3776
+ }, m(Xa, "observedAttributes", [...ri.observedAttributes, ...Al]);
3777
+ const Ja = document.createElement("template");
3778
+ Ja.innerHTML = /* HTML */
3753
3779
  `
3754
3780
  <style>
3755
3781
  :host {
@@ -3785,9 +3811,9 @@ ja.innerHTML = /* HTML */
3785
3811
  }
3786
3812
  </style>
3787
3813
  `;
3788
- const Sl = 6e3;
3789
- var De, Kt, de, Fe, nt, Ja, Ls, Vn, Zs;
3790
- class Ya extends HTMLElement {
3814
+ const Cl = 6e3;
3815
+ var De, Kt, de, Fe, nt, Qa, ws, Xn, tn;
3816
+ class Wa extends HTMLElement {
3791
3817
  constructor() {
3792
3818
  super();
3793
3819
  l(this, nt);
@@ -3795,25 +3821,25 @@ class Ya extends HTMLElement {
3795
3821
  l(this, Kt, null);
3796
3822
  l(this, de, null);
3797
3823
  l(this, Fe, () => {
3798
- !document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? n(this, nt, Ja).call(this) : n(this, nt, Ls).call(this);
3824
+ !document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? n(this, nt, Qa).call(this) : n(this, nt, ws).call(this);
3799
3825
  });
3800
- l(this, Zs, (t) => {
3826
+ l(this, tn, (t) => {
3801
3827
  t.forEach((i) => {
3802
3828
  i.isIntersecting ? this.setAttribute("intersecting", "") : this.removeAttribute("intersecting");
3803
3829
  });
3804
3830
  });
3805
- this.attachShadow({ mode: "open" }).appendChild(ja.content.cloneNode(!0));
3831
+ this.attachShadow({ mode: "open" }).appendChild(Ja.content.cloneNode(!0));
3806
3832
  }
3807
3833
  connectedCallback() {
3808
3834
  var t;
3809
- d(this, De, this.closest("vindral-controller")), (t = e(this, De)) == null || t.connectListener(this), document.addEventListener("visibilitychange", e(this, Fe)), d(this, de, new IntersectionObserver(e(this, Zs))), e(this, de).observe(this);
3835
+ d(this, De, this.closest("vindral-controller")), (t = e(this, De)) == null || t.connectListener(this), document.addEventListener("visibilitychange", e(this, Fe)), d(this, de, new IntersectionObserver(e(this, tn))), e(this, de).observe(this);
3810
3836
  }
3811
3837
  disconnectedCallback() {
3812
3838
  var t, i;
3813
- (t = e(this, De)) == null || t.disconnectListener(this), document.removeEventListener("visibilitychange", e(this, Fe)), (i = e(this, de)) == null || i.disconnect(), d(this, de, null), n(this, nt, Ls).call(this);
3839
+ (t = e(this, De)) == null || t.disconnectListener(this), document.removeEventListener("visibilitychange", e(this, Fe)), (i = e(this, de)) == null || i.disconnect(), d(this, de, null), n(this, nt, ws).call(this);
3814
3840
  }
3815
3841
  attributeChangedCallback(t, i, s) {
3816
- i !== s && (t === r.POSTER_SRC && this.paused && !this.disabled && n(this, nt, Vn).call(this), (t === r.PAUSED || t === "disabled" || t === "intersecting") && e(this, Fe).call(this));
3842
+ i !== s && (t === r.POSTER_SRC && this.paused && !this.disabled && n(this, nt, Xn).call(this), (t === r.PAUSED || t === "disabled" || t === "intersecting") && e(this, Fe).call(this));
3817
3843
  }
3818
3844
  get disabled() {
3819
3845
  return this.hasAttribute("disabled");
@@ -3828,21 +3854,21 @@ class Ya extends HTMLElement {
3828
3854
  return this.hasAttribute(r.PAUSED);
3829
3855
  }
3830
3856
  }
3831
- De = new WeakMap(), Kt = new WeakMap(), de = new WeakMap(), Fe = new WeakMap(), nt = new WeakSet(), Ja = function() {
3832
- e(this, Kt) === null && (n(this, nt, Ls).call(this), d(this, Kt, window.setInterval(() => n(this, nt, Vn).call(this), Sl)));
3833
- }, Ls = function() {
3857
+ De = new WeakMap(), Kt = new WeakMap(), de = new WeakMap(), Fe = new WeakMap(), nt = new WeakSet(), Qa = function() {
3858
+ e(this, Kt) === null && (n(this, nt, ws).call(this), d(this, Kt, window.setInterval(() => n(this, nt, Xn).call(this), Cl)));
3859
+ }, ws = function() {
3834
3860
  e(this, Kt) !== null && (clearInterval(e(this, Kt)), d(this, Kt, null)), this.style.backgroundImage = "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAQAAACRI2S5AAAAEElEQVR42mNkIAAYRxWAAQAG9gAKqv6+AwAAAABJRU5ErkJggg==')";
3835
- }, Vn = function() {
3861
+ }, Xn = function() {
3836
3862
  if (!this.posterSrc) return;
3837
3863
  const t = new URL(this.posterSrc), i = new Image();
3838
3864
  t.searchParams.set("t", Date.now().toString()), i.src = t.toString(), i.onload = () => this.style.backgroundImage = `url(${t.toString()})`;
3839
- }, Zs = new WeakMap(), m(Ya, "observedAttributes", [
3865
+ }, tn = new WeakMap(), m(Wa, "observedAttributes", [
3840
3866
  r.POSTER_SRC,
3841
3867
  r.PAUSED,
3842
3868
  "disabled",
3843
3869
  "intersecting"
3844
3870
  ]);
3845
- const Cl = (
3871
+ const xl = (
3846
3872
  /* SVG */
3847
3873
  `
3848
3874
  <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-settings-filled" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2c3e50" fill="none" stroke-linecap="round" stroke-linejoin="round">
@@ -3850,8 +3876,8 @@ const Cl = (
3850
3876
  <path d="M14.647 4.081a.724 .724 0 0 0 1.08 .448c2.439 -1.485 5.23 1.305 3.745 3.744a.724 .724 0 0 0 .447 1.08c2.775 .673 2.775 4.62 0 5.294a.724 .724 0 0 0 -.448 1.08c1.485 2.439 -1.305 5.23 -3.744 3.745a.724 .724 0 0 0 -1.08 .447c-.673 2.775 -4.62 2.775 -5.294 0a.724 .724 0 0 0 -1.08 -.448c-2.439 1.485 -5.23 -1.305 -3.745 -3.744a.724 .724 0 0 0 -.447 -1.08c-2.775 -.673 -2.775 -4.62 0 -5.294a.724 .724 0 0 0 .448 -1.08c-1.485 -2.439 1.305 -5.23 3.744 -3.745a.722 .722 0 0 0 1.08 -.447c.673 -2.775 4.62 -2.775 5.294 0zm-2.647 4.919a3 3 0 1 0 0 6a3 3 0 0 0 0 -6z" stroke-width="0" fill="currentColor" />
3851
3877
  </svg>
3852
3878
  `
3853
- ), Wa = document.createElement("template");
3854
- Wa.innerHTML = /* HTML */
3879
+ ), Za = document.createElement("template");
3880
+ Za.innerHTML = /* HTML */
3855
3881
  `
3856
3882
  <style>
3857
3883
  :host {
@@ -3859,38 +3885,38 @@ Wa.innerHTML = /* HTML */
3859
3885
  }
3860
3886
  </style>
3861
3887
 
3862
- <slot name="button">${Cl}</slot>
3888
+ <slot name="button">${xl}</slot>
3863
3889
  <slot name="listbox" hidden>
3864
3890
  <vindral-rendition-levels-menu-list id="listbox" part="listbox"></vindral-rendition-levels-menu-list>
3865
3891
  </slot>
3866
3892
  `;
3867
- var Yi, jn;
3868
- const ii = class ii extends dr {
3893
+ var Yi, Yn;
3894
+ const ii = class ii extends cr {
3869
3895
  constructor() {
3870
3896
  var t, i, s, o;
3871
3897
  super();
3872
3898
  l(this, Yi);
3873
- (t = this.shadowRoot) == null || t.appendChild(Wa.content.cloneNode(!0)), this.button = (i = this.shadowRoot) == null ? void 0 : i.querySelector("slot[name=button]"), this.listbox = (s = this.shadowRoot) == null ? void 0 : s.querySelector("[part=listbox]"), this.listboxSlot = (o = this.shadowRoot) == null ? void 0 : o.querySelector("slot[name=listbox]");
3899
+ (t = this.shadowRoot) == null || t.appendChild(Za.content.cloneNode(!0)), this.button = (i = this.shadowRoot) == null ? void 0 : i.querySelector("slot[name=button]"), this.listbox = (s = this.shadowRoot) == null ? void 0 : s.querySelector("[part=listbox]"), this.listboxSlot = (o = this.shadowRoot) == null ? void 0 : o.querySelector("slot[name=listbox]");
3874
3900
  }
3875
3901
  connectedCallback() {
3876
- super.connectedCallback(), n(this, Yi, jn).call(this), this.setAttribute("aria-label", "Rendition levels");
3902
+ super.connectedCallback(), n(this, Yi, Yn).call(this), this.setAttribute("aria-label", "Rendition levels");
3877
3903
  }
3878
3904
  attributeChangedCallback(t, i, s) {
3879
- super.attributeChangedCallback(t, i, s), t === r.RENDITION_LEVELS && n(this, Yi, jn).call(this);
3905
+ super.attributeChangedCallback(t, i, s), t === r.RENDITION_LEVELS && n(this, Yi, Yn).call(this);
3880
3906
  }
3881
3907
  };
3882
- Yi = new WeakSet(), jn = function() {
3908
+ Yi = new WeakSet(), Yn = function() {
3883
3909
  const t = this.getAttribute(r.RENDITION_LEVELS);
3884
3910
  !t || t === "[]" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
3885
3911
  }, m(ii, "observedAttributes", [...J(ii, ii, "observedAttributes"), r.RENDITION_LEVELS]);
3886
- let Xn = ii;
3887
- const Qa = document.createElement("template"), xl = (
3912
+ let jn = ii;
3913
+ const to = document.createElement("template"), Nl = (
3888
3914
  /* SVG */
3889
3915
  `
3890
3916
  <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="#fff" viewBox="0 0 78.369 78.369" xml:space="preserve"><path d="M78.049 19.015 29.458 67.606a1.094 1.094 0 0 1-1.548 0L.32 40.015a1.094 1.094 0 0 1 0-1.547l6.704-6.704a1.095 1.095 0 0 1 1.548 0l20.113 20.112 41.113-41.113a1.095 1.095 0 0 1 1.548 0l6.703 6.704a1.094 1.094 0 0 1 0 1.548z"/></svg>
3891
3917
  `
3892
3918
  );
3893
- Qa.innerHTML = /* HTML */
3919
+ to.innerHTML = /* HTML */
3894
3920
  `
3895
3921
  <style>
3896
3922
  :host {
@@ -3963,7 +3989,7 @@ Qa.innerHTML = /* HTML */
3963
3989
  }
3964
3990
 
3965
3991
  [role="menuitem"][aria-selected="true"]::before {
3966
- content: url("data:image/svg+xml,${encodeURIComponent(xl)}");
3992
+ content: url("data:image/svg+xml,${encodeURIComponent(Nl)}");
3967
3993
  position: absolute;
3968
3994
  left: calc(var(--padding-3) - var(--padding-1));
3969
3995
  top: calc(50% - 8px);
@@ -3993,8 +4019,8 @@ Qa.innerHTML = /* HTML */
3993
4019
  <div class="menu"></div>
3994
4020
  </slot>
3995
4021
  `;
3996
- var ce, Ji, qt, Tt, ue, Wi, U, to, Yn, eo, Jn, io, so, no, Wn, ro;
3997
- class Za extends HTMLElement {
4022
+ var ce, Ji, qt, Tt, ue, Wi, U, io, Jn, so, Wn, no, ro, ao, Qn, oo;
4023
+ class eo extends HTMLElement {
3998
4024
  constructor() {
3999
4025
  super();
4000
4026
  l(this, U);
@@ -4005,14 +4031,14 @@ class Za extends HTMLElement {
4005
4031
  l(this, ue, null);
4006
4032
  l(this, Wi, null);
4007
4033
  m(this, "handleEvent", (t) => {
4008
- t.type === "keydown" && n(this, U, so).call(this, t);
4034
+ t.type === "keydown" && n(this, U, ro).call(this, t);
4009
4035
  });
4010
- this.attachShadow({ mode: "open" }).appendChild(Qa.content.cloneNode(!0));
4036
+ this.attachShadow({ mode: "open" }).appendChild(to.content.cloneNode(!0));
4011
4037
  }
4012
4038
  connectedCallback() {
4013
4039
  var i;
4014
4040
  const t = this.getRootNode();
4015
- t instanceof ShadowRoot && (d(this, ue, t.host.closest("vindral-controller")), (i = e(this, ue)) == null || i.connectListener(this), n(this, U, to).call(this), n(this, U, Yn).call(this), d(this, Wi, t.host), this.addEventListener("keydown", this));
4041
+ t instanceof ShadowRoot && (d(this, ue, t.host.closest("vindral-controller")), (i = e(this, ue)) == null || i.connectListener(this), n(this, U, io).call(this), n(this, U, Jn).call(this), d(this, Wi, t.host), this.addEventListener("keydown", this));
4016
4042
  }
4017
4043
  disconnectedCallback() {
4018
4044
  var t;
@@ -4022,10 +4048,10 @@ class Za extends HTMLElement {
4022
4048
  i !== s && (t === r.RENDITION_LEVELS && s && (this.list = JSON.parse(s)), t === r.MAX_VIDEO_BITRATE && s && (this.maxVideoBitrate = s ? parseInt(s) : Number.MAX_SAFE_INTEGER));
4023
4049
  }
4024
4050
  set list(t) {
4025
- d(this, ce, t), n(this, U, Yn).call(this);
4051
+ d(this, ce, t), n(this, U, Jn).call(this);
4026
4052
  }
4027
4053
  set maxVideoBitrate(t) {
4028
- d(this, Ji, t), n(this, U, Jn).call(this);
4054
+ d(this, Ji, t), n(this, U, Wn).call(this);
4029
4055
  }
4030
4056
  get keysUsed() {
4031
4057
  return ["Enter", "Escape", "Tab", " ", "ArrowDown", "ArrowUp", "Home", "End"];
@@ -4035,7 +4061,7 @@ class Za extends HTMLElement {
4035
4061
  (t = e(this, qt)) == null || t.focus();
4036
4062
  }
4037
4063
  }
4038
- ce = new WeakMap(), Ji = new WeakMap(), qt = new WeakMap(), Tt = new WeakMap(), ue = new WeakMap(), Wi = new WeakMap(), U = new WeakSet(), to = function() {
4064
+ ce = new WeakMap(), Ji = new WeakMap(), qt = new WeakMap(), Tt = new WeakMap(), ue = new WeakMap(), Wi = new WeakMap(), U = new WeakSet(), io = function() {
4039
4065
  const t = (s) => {
4040
4066
  s.forEach((o) => {
4041
4067
  if (o.intersectionRatio !== 1)
@@ -4052,7 +4078,7 @@ ce = new WeakMap(), Ji = new WeakMap(), qt = new WeakMap(), Tt = new WeakMap(),
4052
4078
  threshold: 0
4053
4079
  // 0 means any intersection is enough to be considered "inside"
4054
4080
  }).observe(this);
4055
- }, Yn = function() {
4081
+ }, Jn = function() {
4056
4082
  var i;
4057
4083
  const t = (i = this.shadowRoot) == null ? void 0 : i.querySelector(".menu");
4058
4084
  t && (d(this, Tt, []), t.innerHTML = "", e(this, ce).sort((s, o) => {
@@ -4062,14 +4088,14 @@ ce = new WeakMap(), Ji = new WeakMap(), qt = new WeakMap(), Tt = new WeakMap(),
4062
4088
  var v, A, z, ut, at, jt, Yt, Jt;
4063
4089
  const o = document.createElement("div");
4064
4090
  o.setAttribute("role", "menuitem"), o.setAttribute("value", String((v = s.video) == null ? void 0 : v.height)), o.classList.add("menu-item"), o.tabIndex = -1;
4065
- const u = n(this, U, eo).call(this, (A = s.video) == null ? void 0 : A.frameRate);
4066
- o.textContent = s.video ? Qo(s.video) : "";
4091
+ const u = n(this, U, so).call(this, (A = s.video) == null ? void 0 : A.frameRate);
4092
+ o.textContent = s.video ? Zo(s.video) : "";
4067
4093
  const p = document.createElement("span");
4068
- p.classList.add("menu-item-subtitle"), p.textContent = `${Wo(((ut = (z = s.video) == null ? void 0 : z.bitRate) != null ? ut : 0) + ((jt = (at = s.audio) == null ? void 0 : at.bitRate) != null ? jt : 0))}, ${u}p`, o.appendChild(p), o.addEventListener("click", () => n(this, U, io).call(this, s)), e(this, Tt).push({ el: o, id: (Jt = (Yt = s.video) == null ? void 0 : Yt.id) != null ? Jt : -1 }), t.appendChild(o);
4069
- }), n(this, U, Jn).call(this));
4070
- }, eo = function(t) {
4094
+ p.classList.add("menu-item-subtitle"), p.textContent = `${Qo(((ut = (z = s.video) == null ? void 0 : z.bitRate) != null ? ut : 0) + ((jt = (at = s.audio) == null ? void 0 : at.bitRate) != null ? jt : 0))}, ${u}p`, o.appendChild(p), o.addEventListener("click", () => n(this, U, no).call(this, s)), e(this, Tt).push({ el: o, id: (Jt = (Yt = s.video) == null ? void 0 : Yt.id) != null ? Jt : -1 }), t.appendChild(o);
4095
+ }), n(this, U, Wn).call(this));
4096
+ }, so = function(t) {
4071
4097
  return t ? t[0] % t[1] === 0 ? (t[0] / t[1]).toString() : (t[0] / t[1]).toFixed(2) : "";
4072
- }, Jn = function() {
4098
+ }, Wn = function() {
4073
4099
  e(this, qt) && (e(this, qt).removeAttribute("aria-selected"), e(this, qt).tabIndex = -1);
4074
4100
  const t = e(this, ce).sort(
4075
4101
  (s, o) => {
@@ -4089,31 +4115,31 @@ ce = new WeakMap(), Ji = new WeakMap(), qt = new WeakMap(), Tt = new WeakMap(),
4089
4115
  });
4090
4116
  s && (s.el.tabIndex = 0, s.el.setAttribute("aria-selected", "true"), d(this, qt, s.el));
4091
4117
  }
4092
- }, io = function(t) {
4118
+ }, no = function(t) {
4093
4119
  this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })), this.dispatchEvent(
4094
4120
  new CustomEvent(k.SET_RENDITION, { bubbles: !0, composed: !0, detail: t })
4095
4121
  );
4096
- }, so = function(t) {
4122
+ }, ro = function(t) {
4097
4123
  var p, v, A;
4098
4124
  const { key: i, ctrlKey: s, altKey: o, metaKey: u } = t;
4099
- s || o || u || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? (p = e(this, Wi)) == null || p.hide() : i === "Enter" || i === " " ? (A = (v = n(this, U, Wn).call(this)) == null ? void 0 : v.el) == null || A.click() : n(this, U, no).call(this, t));
4100
- }, no = function(t) {
4125
+ s || o || u || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? (p = e(this, Wi)) == null || p.hide() : i === "Enter" || i === " " ? (A = (v = n(this, U, Qn).call(this)) == null ? void 0 : v.el) == null || A.click() : n(this, U, ao).call(this, t));
4126
+ }, ao = function(t) {
4101
4127
  var A;
4102
- const { key: i } = t, s = e(this, Tt), o = (A = n(this, U, Wn).call(this)) != null ? A : s[0];
4128
+ const { key: i } = t, s = e(this, Tt), o = (A = n(this, U, Qn).call(this)) != null ? A : s[0];
4103
4129
  if (!o) return;
4104
4130
  const u = s.indexOf(o);
4105
4131
  let p = Math.max(0, u);
4106
4132
  i === "ArrowDown" ? p++ : i === "ArrowUp" ? p-- : t.key === "Home" ? p = 0 : t.key === "End" && (p = s.length - 1), p < 0 && (p = s.length - 1), p > s.length - 1 && (p = 0);
4107
4133
  const v = s[p];
4108
- v && (n(this, U, ro).call(this, v.id), v.el.focus());
4109
- }, Wn = function() {
4134
+ v && (n(this, U, oo).call(this, v.id), v.el.focus());
4135
+ }, Qn = function() {
4110
4136
  return e(this, Tt).find((t) => t.el.tabIndex === 0);
4111
- }, ro = function(t) {
4137
+ }, oo = function(t) {
4112
4138
  for (const i of e(this, Tt))
4113
4139
  i.el.tabIndex = i.id === t ? 0 : -1;
4114
- }, m(Za, "observedAttributes", [r.RENDITION_LEVELS, r.MAX_VIDEO_BITRATE]);
4115
- const ao = document.createElement("template");
4116
- ao.innerHTML = /* HTML */
4140
+ }, m(eo, "observedAttributes", [r.RENDITION_LEVELS, r.MAX_VIDEO_BITRATE]);
4141
+ const lo = document.createElement("template");
4142
+ lo.innerHTML = /* HTML */
4117
4143
  `
4118
4144
  <style>
4119
4145
  :host {
@@ -4182,8 +4208,8 @@ ao.innerHTML = /* HTML */
4182
4208
  <div id="scroll-area"></div>
4183
4209
  <slot id="content"></slot>
4184
4210
  `;
4185
- var Lt, pe, Oe, Qi, R, lo, ho, co, tn, en, ws, Qn, Zn, tr, er;
4186
- class oo extends HTMLElement {
4211
+ var Lt, pe, Oe, Qi, R, co, uo, po, en, sn, Ss, Zn, tr, er, ir;
4212
+ class ho extends HTMLElement {
4187
4213
  constructor() {
4188
4214
  super();
4189
4215
  l(this, R);
@@ -4194,31 +4220,31 @@ class oo extends HTMLElement {
4194
4220
  m(this, "handleEvent", (t) => {
4195
4221
  switch (t.type) {
4196
4222
  case "touchstart":
4197
- n(this, R, lo).call(this, t);
4223
+ n(this, R, co).call(this, t);
4198
4224
  break;
4199
4225
  case "touchmove":
4200
- n(this, R, ho).call(this, t);
4226
+ n(this, R, uo).call(this, t);
4201
4227
  break;
4202
4228
  case "touchend":
4203
- n(this, R, co).call(this, t);
4229
+ n(this, R, po).call(this, t);
4204
4230
  break;
4205
4231
  }
4206
4232
  });
4207
- l(this, tn, () => {
4208
- this.scrollTop === 0 ? (this.open = !1, this.removeAttribute("snap-touch"), n(this, R, er).call(this)) : !this.visible && this.scrollTop > 0 ? n(this, R, tr).call(this) : (
4233
+ l(this, en, () => {
4234
+ this.scrollTop === 0 ? (this.open = !1, this.removeAttribute("snap-touch"), n(this, R, ir).call(this)) : !this.visible && this.scrollTop > 0 ? n(this, R, er).call(this) : (
4209
4235
  // fully open
4210
- !this.hasAttribute("snap-touch") && n(this, R, Zn).call(this) && (this.open = !0, this.setAttribute("snap-touch", ""))
4236
+ !this.hasAttribute("snap-touch") && n(this, R, tr).call(this) && (this.open = !0, this.setAttribute("snap-touch", ""))
4211
4237
  );
4212
4238
  });
4213
- l(this, en, () => {
4239
+ l(this, sn, () => {
4214
4240
  const t = e(this, Qi);
4215
- if (d(this, Qi, this.scrollTop), !n(this, R, ws).call(this)) {
4241
+ if (d(this, Qi, this.scrollTop), !n(this, R, Ss).call(this)) {
4216
4242
  this.scrollTop = 0;
4217
4243
  return;
4218
4244
  }
4219
- this.scrollTop === 0 ? (this.open = !1, n(this, R, er).call(this)) : !this.visible && this.scrollTop > 0 ? n(this, R, tr).call(this) : n(this, R, Zn).call(this) && t <= this.scrollTop && (this.open = !0);
4245
+ this.scrollTop === 0 ? (this.open = !1, n(this, R, ir).call(this)) : !this.visible && this.scrollTop > 0 ? n(this, R, er).call(this) : n(this, R, tr).call(this) && t <= this.scrollTop && (this.open = !0);
4220
4246
  });
4221
- this.attachShadow({ mode: "open" }).appendChild(ao.content.cloneNode(!0));
4247
+ this.attachShadow({ mode: "open" }).appendChild(lo.content.cloneNode(!0));
4222
4248
  }
4223
4249
  connectedCallback() {
4224
4250
  var i, s, o, u, p, v;
@@ -4228,11 +4254,11 @@ class oo extends HTMLElement {
4228
4254
  this.open && (this.open = !1);
4229
4255
  });
4230
4256
  const A = this.hasAttribute("touch-enabled");
4231
- if (!Xo() || !A) {
4232
- this.setAttribute("snap", ""), this.addEventListener("scroll", e(this, en));
4257
+ if (!jo() || !A) {
4258
+ this.setAttribute("snap", ""), this.addEventListener("scroll", e(this, sn));
4233
4259
  return;
4234
4260
  }
4235
- this.addEventListener("scroll", e(this, tn)), (u = e(this, Lt)) == null || u.addEventListener("touchstart", this, { passive: !0 }), (p = e(this, Lt)) == null || p.addEventListener("touchmove", this, { passive: !1 }), (v = e(this, Lt)) == null || v.addEventListener("touchend", this, { passive: !0 });
4261
+ this.addEventListener("scroll", e(this, en)), (u = e(this, Lt)) == null || u.addEventListener("touchstart", this, { passive: !0 }), (p = e(this, Lt)) == null || p.addEventListener("touchmove", this, { passive: !1 }), (v = e(this, Lt)) == null || v.addEventListener("touchend", this, { passive: !0 });
4236
4262
  }
4237
4263
  }
4238
4264
  disconnectedCallback() {
@@ -4241,7 +4267,7 @@ class oo extends HTMLElement {
4241
4267
  }
4242
4268
  attributeChangedCallback(t, i, s) {
4243
4269
  var o;
4244
- i !== s && (t === r.USER_INTERACTING && s === null && n(this, R, Qn).call(this) && setTimeout(() => {
4270
+ i !== s && (t === r.USER_INTERACTING && s === null && n(this, R, Zn).call(this) && setTimeout(() => {
4245
4271
  this.open = !1;
4246
4272
  }, 300), t === "open" && this.scrollTo({ top: s === null ? 0 : (o = e(this, pe)) == null ? void 0 : o.clientHeight, behavior: "smooth" }));
4247
4273
  }
@@ -4258,29 +4284,29 @@ class oo extends HTMLElement {
4258
4284
  return this.hasAttribute("visible");
4259
4285
  }
4260
4286
  }
4261
- Lt = new WeakMap(), pe = new WeakMap(), Oe = new WeakMap(), Qi = new WeakMap(), R = new WeakSet(), lo = function(t) {
4262
- n(this, R, ws).call(this) && t.touches[0] && d(this, Oe, t.touches[0].clientY);
4263
- }, ho = function(t) {
4264
- if (!(!n(this, R, ws).call(this) || !e(this, Oe) || this.hasAttribute("snap-touch")) && (t.preventDefault(), t.touches[0])) {
4287
+ Lt = new WeakMap(), pe = new WeakMap(), Oe = new WeakMap(), Qi = new WeakMap(), R = new WeakSet(), co = function(t) {
4288
+ n(this, R, Ss).call(this) && t.touches[0] && d(this, Oe, t.touches[0].clientY);
4289
+ }, uo = function(t) {
4290
+ if (!(!n(this, R, Ss).call(this) || !e(this, Oe) || this.hasAttribute("snap-touch")) && (t.preventDefault(), t.touches[0])) {
4265
4291
  const i = t.touches[0].clientY, s = e(this, Oe) - i;
4266
4292
  this.scrollTop = s;
4267
4293
  }
4268
- }, co = function(t) {
4269
- n(this, R, Qn).call(this) && !this.hasAttribute("snap-touch") && (this.open = !0);
4270
- }, tn = new WeakMap(), en = new WeakMap(), ws = function() {
4294
+ }, po = function(t) {
4295
+ n(this, R, Zn).call(this) && !this.hasAttribute("snap-touch") && (this.open = !0);
4296
+ }, en = new WeakMap(), sn = new WeakMap(), Ss = function() {
4271
4297
  return this.hasAttribute(r.USER_INTERACTING);
4272
- }, Qn = function() {
4273
- return this.scrollTop > 0;
4274
4298
  }, Zn = function() {
4299
+ return this.scrollTop > 0;
4300
+ }, tr = function() {
4275
4301
  var t;
4276
4302
  return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((t = e(this, pe)) == null ? void 0 : t.clientHeight);
4277
- }, tr = function() {
4278
- this.visible = !0, this.dispatchEvent(new CustomEvent(k.LOCK_UI, { bubbles: !0, composed: !0 }));
4279
4303
  }, er = function() {
4304
+ this.visible = !0, this.dispatchEvent(new CustomEvent(k.LOCK_UI, { bubbles: !0, composed: !0 }));
4305
+ }, ir = function() {
4280
4306
  this.visible = !1, this.dispatchEvent(new CustomEvent(k.UNLOCK_UI, { bubbles: !0, composed: !0 }));
4281
- }, m(oo, "observedAttributes", [r.USER_INTERACTING, "open", "touch-enabled"]);
4282
- const uo = document.createElement("template");
4283
- uo.innerHTML = /* HTML */
4307
+ }, m(ho, "observedAttributes", [r.USER_INTERACTING, "open", "touch-enabled"]);
4308
+ const bo = document.createElement("template");
4309
+ bo.innerHTML = /* HTML */
4284
4310
  `
4285
4311
  <style>
4286
4312
  :host {
@@ -4340,8 +4366,8 @@ uo.innerHTML = /* HTML */
4340
4366
  <div id="hover-preview"></div>
4341
4367
  <div id="time-tooltip"></div>
4342
4368
  `;
4343
- var N, ct, wt, st, St, Vt, Xt, Ct, y, Ss, ir, Zt, fe, Zi, ts, be, es, is, sr, nr, rr, ar, bo, or, te, Cs, ss;
4344
- class po extends ni {
4369
+ var N, ct, wt, st, St, Vt, Xt, Ct, y, Cs, sr, Zt, fe, Zi, ts, be, es, is, nr, rr, ar, or, vo, lr, te, xs, ss;
4370
+ class mo extends ni {
4345
4371
  constructor() {
4346
4372
  var t, i, s;
4347
4373
  super();
@@ -4355,7 +4381,7 @@ class po extends ni {
4355
4381
  l(this, Xt, !1);
4356
4382
  l(this, Ct, !1);
4357
4383
  l(this, Zi, (t) => {
4358
- if (!n(this, y, ir).call(this) || n(this, y, Zt).call(this)) {
4384
+ if (!n(this, y, sr).call(this) || n(this, y, Zt).call(this)) {
4359
4385
  t.preventDefault();
4360
4386
  return;
4361
4387
  }
@@ -4364,12 +4390,12 @@ class po extends ni {
4364
4390
  this.setPointerCapture(t.pointerId);
4365
4391
  } catch (i) {
4366
4392
  }
4367
- n(this, y, nr).call(this, t);
4393
+ n(this, y, rr).call(this, t);
4368
4394
  });
4369
4395
  l(this, ts, (t) => {
4370
- if (!(!n(this, y, ir).call(this) || n(this, y, Zt).call(this))) {
4396
+ if (!(!n(this, y, sr).call(this) || n(this, y, Zt).call(this))) {
4371
4397
  if (e(this, St) && (cancelAnimationFrame(e(this, St)), d(this, St, null)), e(this, st) && t.pointerId === e(this, Vt)) {
4372
- t.preventDefault(), n(this, y, nr).call(this, t);
4398
+ t.preventDefault(), n(this, y, rr).call(this, t);
4373
4399
  return;
4374
4400
  }
4375
4401
  d(this, St, requestAnimationFrame(() => {
@@ -4377,8 +4403,8 @@ class po extends ni {
4377
4403
  e(this, wt).style.opacity = "0", d(this, St, null);
4378
4404
  return;
4379
4405
  }
4380
- const i = n(this, y, sr).call(this, t.clientX);
4381
- if (n(this, y, ar).call(this, i, t.clientX), i > this.range.valueAsNumber) {
4406
+ const i = n(this, y, nr).call(this, t.clientX);
4407
+ if (n(this, y, or).call(this, i, t.clientX), i > this.range.valueAsNumber) {
4382
4408
  const s = this.range.valueAsNumber * 100, o = (i - this.range.valueAsNumber) * 100;
4383
4409
  e(this, wt).style.transform = `translateX(${s}%) scaleX(${o / 100})`, e(this, wt).style.opacity = "1";
4384
4410
  } else
@@ -4405,7 +4431,7 @@ class po extends ni {
4405
4431
  l(this, ss, (t) => {
4406
4432
  if (n(this, y, Zt).call(this) || !e(this, N) || e(this, N) <= 0 || !isFinite(e(this, N)))
4407
4433
  return;
4408
- const i = n(this, y, Ss).call(this);
4434
+ const i = n(this, y, Cs).call(this);
4409
4435
  if (i <= 0) return;
4410
4436
  const s = this.range.valueAsNumber * i;
4411
4437
  let o = s;
@@ -4431,9 +4457,9 @@ class po extends ni {
4431
4457
  return;
4432
4458
  }
4433
4459
  const p = Math.min(o / i, 1);
4434
- n(this, y, rr).call(this, p);
4460
+ n(this, y, ar).call(this, p);
4435
4461
  });
4436
- (t = this.shadowRoot) == null || t.appendChild(uo.content.cloneNode(!0)), d(this, ct, (i = this.shadowRoot) == null ? void 0 : i.getElementById("time-tooltip")), d(this, wt, (s = this.shadowRoot) == null ? void 0 : s.getElementById("hover-preview")), this.addEventListener("pointerdown", e(this, Zi)), this.addEventListener("pointermove", e(this, ts)), this.addEventListener("pointerup", e(this, be)), this.addEventListener("pointercancel", e(this, be)), this.addEventListener("mouseenter", e(this, es)), this.addEventListener("mouseleave", e(this, is));
4462
+ (t = this.shadowRoot) == null || t.appendChild(bo.content.cloneNode(!0)), d(this, ct, (i = this.shadowRoot) == null ? void 0 : i.getElementById("time-tooltip")), d(this, wt, (s = this.shadowRoot) == null ? void 0 : s.getElementById("hover-preview")), this.addEventListener("pointerdown", e(this, Zi)), this.addEventListener("pointermove", e(this, ts)), this.addEventListener("pointerup", e(this, be)), this.addEventListener("pointercancel", e(this, be)), this.addEventListener("mouseenter", e(this, es)), this.addEventListener("mouseleave", e(this, is));
4437
4463
  }
4438
4464
  connectedCallback() {
4439
4465
  super.connectedCallback(), this.setAttribute("aria-label", "Seek video position"), this.setAttribute("role", "slider"), n(this, y, fe).call(this), this.addEventListener("keydown", e(this, ss)), n(this, y, te).call(this) && (this.range.value = "1", n(this, y, fe).call(this));
@@ -4472,37 +4498,37 @@ class po extends ni {
4472
4498
  this.setAttribute(r.DURATION, t.toString());
4473
4499
  }
4474
4500
  }
4475
- N = new WeakMap(), ct = new WeakMap(), wt = new WeakMap(), st = new WeakMap(), St = new WeakMap(), Vt = new WeakMap(), Xt = new WeakMap(), Ct = new WeakMap(), y = new WeakSet(), Ss = function() {
4501
+ N = new WeakMap(), ct = new WeakMap(), wt = new WeakMap(), st = new WeakMap(), St = new WeakMap(), Vt = new WeakMap(), Xt = new WeakMap(), Ct = new WeakMap(), y = new WeakSet(), Cs = function() {
4476
4502
  return e(this, N) ? e(this, N) : 1;
4477
- }, ir = function() {
4503
+ }, sr = function() {
4478
4504
  return !!e(this, N) && e(this, N) > 0 && isFinite(e(this, N));
4479
4505
  }, Zt = function() {
4480
4506
  return e(this, Xt);
4481
4507
  }, fe = function() {
4482
- const t = n(this, y, Ss).call(this);
4508
+ const t = n(this, y, Cs).call(this);
4483
4509
  !e(this, N) || e(this, N) <= 0 || !isFinite(e(this, N)) ? this.setAttribute("data-no-duration", "") : this.removeAttribute("data-no-duration"), e(this, st) || (this.updateBar(), this.setAttribute(
4484
4510
  "aria-valuetext",
4485
- `${n(this, y, Cs).call(this, this.range.valueAsNumber * t)} of ${n(this, y, Cs).call(this, t)}`
4486
- ), !e(this, st) && !n(this, y, Zt).call(this) && n(this, y, or).call(this, this.range.valueAsNumber));
4487
- }, Zi = new WeakMap(), ts = new WeakMap(), be = new WeakMap(), es = new WeakMap(), is = new WeakMap(), sr = function(t) {
4511
+ `${n(this, y, xs).call(this, this.range.valueAsNumber * t)} of ${n(this, y, xs).call(this, t)}`
4512
+ ), !e(this, st) && !n(this, y, Zt).call(this) && n(this, y, lr).call(this, this.range.valueAsNumber));
4513
+ }, Zi = new WeakMap(), ts = new WeakMap(), be = new WeakMap(), es = new WeakMap(), is = new WeakMap(), nr = function(t) {
4488
4514
  const i = this.getBoundingClientRect(), s = (t - i.left) / i.width;
4489
4515
  return Math.max(0, Math.min(1, s));
4490
- }, nr = function(t) {
4491
- const i = n(this, y, sr).call(this, t.clientX);
4492
- n(this, y, ar).call(this, i, t.clientX), e(this, st) || (e(this, ct).style.opacity = "1"), n(this, y, rr).call(this, i);
4493
4516
  }, rr = function(t) {
4494
- if (n(this, y, Zt).call(this) || n(this, y, or).call(this, t))
4517
+ const i = n(this, y, nr).call(this, t.clientX);
4518
+ n(this, y, or).call(this, i, t.clientX), e(this, st) || (e(this, ct).style.opacity = "1"), n(this, y, ar).call(this, i);
4519
+ }, ar = function(t) {
4520
+ if (n(this, y, Zt).call(this) || n(this, y, lr).call(this, t))
4495
4521
  return;
4496
- const i = n(this, y, Ss).call(this), s = t * i;
4497
- this.range.value = t.toString(), this.updateBar(), n(this, y, bo).call(this, s);
4498
- }, ar = function(t, i) {
4522
+ const i = n(this, y, Cs).call(this), s = t * i;
4523
+ this.range.value = t.toString(), this.updateBar(), n(this, y, vo).call(this, s);
4524
+ }, or = function(t, i) {
4499
4525
  if (!e(this, N) || !isFinite(e(this, N)))
4500
4526
  return;
4501
4527
  const s = t * e(this, N), o = e(this, N) - s;
4502
- e(this, ct).textContent = `-${n(this, y, Cs).call(this, o)}`;
4528
+ e(this, ct).textContent = `-${n(this, y, xs).call(this, o)}`;
4503
4529
  const u = this.getBoundingClientRect(), p = (i - u.left) / u.width * 100;
4504
4530
  e(this, ct).style.left = `${Math.min(Math.max(p, 2), 98)}%`;
4505
- }, bo = function(t) {
4531
+ }, vo = function(t) {
4506
4532
  this.dispatchEvent(
4507
4533
  new CustomEvent("seek", {
4508
4534
  bubbles: !0,
@@ -4510,30 +4536,30 @@ N = new WeakMap(), ct = new WeakMap(), wt = new WeakMap(), st = new WeakMap(), S
4510
4536
  detail: t
4511
4537
  })
4512
4538
  );
4513
- }, or = function(t) {
4539
+ }, lr = function(t) {
4514
4540
  return e(this, Xt) || n(this, y, te).call(this) || t < 0.999 ? !1 : (d(this, Xt, !0), d(this, Ct, !1), this.dispatchEvent(new CustomEvent(k.GO_LIVE, { bubbles: !0, composed: !0 })), !0);
4515
4541
  }, te = function() {
4516
4542
  return !this.hasAttribute(r.TIMESHIFT_POSITION);
4517
- }, Cs = function(t) {
4543
+ }, xs = function(t) {
4518
4544
  const i = Math.floor(t / 3600), s = Math.floor(t % 3600 / 60), o = Math.floor(t % 60);
4519
4545
  return e(this, N) && e(this, N) >= 3600 ? `${i}:${s.toString().padStart(2, "0")}:${o.toString().padStart(2, "0")}` : `${s}:${o.toString().padStart(2, "0")}`;
4520
- }, ss = new WeakMap(), m(po, "observedAttributes", [
4546
+ }, ss = new WeakMap(), m(mo, "observedAttributes", [
4521
4547
  ...ni.observedAttributes,
4522
4548
  r.TIMESHIFT_POSITION,
4523
4549
  r.DURATION
4524
4550
  ]);
4525
- const mo = document.createElement("template"), Nl = (
4551
+ const fo = document.createElement("template"), Rl = (
4526
4552
  /* SVG */
4527
4553
  `
4528
4554
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z" /></svg>
4529
4555
  `
4530
- ), Rl = (
4556
+ ), Ul = (
4531
4557
  /* SVG */
4532
4558
  `
4533
4559
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g fill="none" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z" clip-rule="evenodd" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2" /></g></svg>
4534
4560
  `
4535
4561
  );
4536
- mo.innerHTML = /* HTML */
4562
+ fo.innerHTML = /* HTML */
4537
4563
  `
4538
4564
  <style>
4539
4565
  :host {
@@ -4586,12 +4612,12 @@ mo.innerHTML = /* HTML */
4586
4612
  </style>
4587
4613
 
4588
4614
  <slot name="icon">
4589
- <slot name="play">${Nl}</slot>
4590
- <slot name="unmute">${Rl}</slot>
4615
+ <slot name="play">${Rl}</slot>
4616
+ <slot name="unmute">${Ul}</slot>
4591
4617
  </slot>
4592
4618
  `;
4593
4619
  var He, ns, me, rs;
4594
- class vo extends HTMLElement {
4620
+ class go extends HTMLElement {
4595
4621
  constructor() {
4596
4622
  super();
4597
4623
  l(this, He, null);
@@ -4614,7 +4640,7 @@ class vo extends HTMLElement {
4614
4640
  }
4615
4641
  this.addEventListener("keyup", e(this, me), { once: !0 });
4616
4642
  });
4617
- this.attachShadow({ mode: "open" }).appendChild(mo.content.cloneNode(!0));
4643
+ this.attachShadow({ mode: "open" }).appendChild(fo.content.cloneNode(!0));
4618
4644
  }
4619
4645
  get keysUsed() {
4620
4646
  return ["Enter", " "];
@@ -4634,14 +4660,14 @@ class vo extends HTMLElement {
4634
4660
  (t = e(this, He)) == null || t.disconnectListener(this), this.disable();
4635
4661
  }
4636
4662
  }
4637
- He = new WeakMap(), ns = new WeakMap(), me = new WeakMap(), rs = new WeakMap(), m(vo, "observedAttributes", [
4663
+ He = new WeakMap(), ns = new WeakMap(), me = new WeakMap(), rs = new WeakMap(), m(go, "observedAttributes", [
4638
4664
  "hidden",
4639
4665
  r.NEEDS_USER_INPUT_VIDEO,
4640
4666
  r.NEEDS_USER_INPUT_AUDIO,
4641
4667
  r.PAUSED
4642
4668
  ]);
4643
- const fo = document.createElement("template");
4644
- fo.innerHTML = /* HTML */
4669
+ const Eo = document.createElement("template");
4670
+ Eo.innerHTML = /* HTML */
4645
4671
  `
4646
4672
  <style>
4647
4673
  :host,
@@ -4730,14 +4756,14 @@ fo.innerHTML = /* HTML */
4730
4756
  </div>
4731
4757
  `;
4732
4758
  var as, os, ls;
4733
- class go extends HTMLElement {
4759
+ class Ao extends HTMLElement {
4734
4760
  constructor() {
4735
4761
  super();
4736
4762
  l(this, as);
4737
4763
  l(this, os);
4738
4764
  l(this, ls);
4739
4765
  const t = this.attachShadow({ mode: "open" });
4740
- t.appendChild(fo.content.cloneNode(!0)), d(this, as, t.querySelector("#title")), d(this, os, t.querySelector("#description")), d(this, ls, t.querySelector("#background"));
4766
+ t.appendChild(Eo.content.cloneNode(!0)), d(this, as, t.querySelector("#title")), d(this, os, t.querySelector("#description")), d(this, ls, t.querySelector("#background"));
4741
4767
  }
4742
4768
  connectedCallback() {
4743
4769
  }
@@ -4747,14 +4773,14 @@ class go extends HTMLElement {
4747
4773
  i !== s && (t === "title" ? e(this, as).textContent = s : t === "description" ? e(this, os).textContent = s : t === "background-image" && (e(this, ls).style.backgroundImage = `url(${s})`));
4748
4774
  }
4749
4775
  }
4750
- as = new WeakMap(), os = new WeakMap(), ls = new WeakMap(), m(go, "observedAttributes", ["title", "description", "background-image", "hidden"]);
4751
- const Eo = document.createElement("template"), Ul = (
4776
+ as = new WeakMap(), os = new WeakMap(), ls = new WeakMap(), m(Ao, "observedAttributes", ["title", "description", "background-image", "hidden"]);
4777
+ const yo = document.createElement("template"), Pl = (
4752
4778
  /* SVG */
4753
4779
  `
4754
4780
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z" /></svg>
4755
4781
  `
4756
4782
  );
4757
- Eo.innerHTML = /* HTML */
4783
+ yo.innerHTML = /* HTML */
4758
4784
  `
4759
4785
  <style>
4760
4786
  :host {
@@ -4804,14 +4830,14 @@ Eo.innerHTML = /* HTML */
4804
4830
  }
4805
4831
  </style>
4806
4832
 
4807
- <slot id="play" name="icon">${Ul}</slot>
4833
+ <slot id="play" name="icon">${Pl}</slot>
4808
4834
  `;
4809
4835
  var ze;
4810
- class Ao extends HTMLElement {
4836
+ class ko extends HTMLElement {
4811
4837
  constructor() {
4812
4838
  super();
4813
4839
  l(this, ze, null);
4814
- this.attachShadow({ mode: "open" }).appendChild(Eo.content.cloneNode(!0));
4840
+ this.attachShadow({ mode: "open" }).appendChild(yo.content.cloneNode(!0));
4815
4841
  }
4816
4842
  connectedCallback() {
4817
4843
  var t;
@@ -4825,9 +4851,9 @@ class Ao extends HTMLElement {
4825
4851
  i !== s && t === "hidden" && !x(s) && this.focus();
4826
4852
  }
4827
4853
  }
4828
- ze = new WeakMap(), m(Ao, "observedAttributes", ["hidden"]);
4829
- const yo = document.createElement("template");
4830
- yo.innerHTML = /* HTML */
4854
+ ze = new WeakMap(), m(ko, "observedAttributes", ["hidden"]);
4855
+ const Io = document.createElement("template");
4856
+ Io.innerHTML = /* HTML */
4831
4857
  `
4832
4858
  <style>
4833
4859
  :host {
@@ -4846,7 +4872,7 @@ yo.innerHTML = /* HTML */
4846
4872
  }
4847
4873
  </style>
4848
4874
  `;
4849
- const Pl = (c) => `${Math.round(c * 100)}%`;
4875
+ const _l = (c) => `${Math.round(c * 100)}%`;
4850
4876
  var hs;
4851
4877
  const si = class si extends ni {
4852
4878
  constructor() {
@@ -4856,7 +4882,7 @@ const si = class si extends ni {
4856
4882
  const t = this.range.valueAsNumber;
4857
4883
  this.dispatchEvent(new CustomEvent(k.SET_VOLUME, { bubbles: !0, composed: !0, detail: t }));
4858
4884
  });
4859
- (t = this.shadowRoot) == null || t.appendChild(yo.content.cloneNode(!0));
4885
+ (t = this.shadowRoot) == null || t.appendChild(Io.content.cloneNode(!0));
4860
4886
  }
4861
4887
  connectedCallback() {
4862
4888
  super.connectedCallback(), this.range.addEventListener("input", e(this, hs)), this.range.setAttribute("aria-label", "volume");
@@ -4865,7 +4891,7 @@ const si = class si extends ni {
4865
4891
  super.disconnectedCallback(), this.range.removeEventListener("input", e(this, hs));
4866
4892
  }
4867
4893
  attributeChangedCallback(t, i, s) {
4868
- super.attributeChangedCallback(t, i, s), (t === r.MUTED || t === r.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext", Pl(this.range.valueAsNumber)), this.updateBar());
4894
+ super.attributeChangedCallback(t, i, s), (t === r.MUTED || t === r.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext", _l(this.range.valueAsNumber)), this.updateBar());
4869
4895
  }
4870
4896
  get volume() {
4871
4897
  var t;
@@ -4876,10 +4902,10 @@ const si = class si extends ni {
4876
4902
  }
4877
4903
  };
4878
4904
  hs = new WeakMap(), m(si, "observedAttributes", [...J(si, si, "observedAttributes"), r.MUTED, r.VOLUME]);
4879
- let lr = si;
4880
- function Hl() {
4881
- customElements.define("vindral-controller", ri), customElements.define("vindral-control-bar", ea), customElements.define("vindral-play-button", Bn), customElements.define("vindral-mute-button", Hn), customElements.define("vindral-buffering-overlay", Pr), customElements.define("vindral-scroll-overlay", oo), customElements.define("vindral-play-overlay", Ao), customElements.define("vindral-user-input-play-overlay", vo), customElements.define("vindral-fullscreen-button", Rn), customElements.define("vindral-rendition-levels-menu", Xn), customElements.define("vindral-rendition-levels-menu-list", Za), customElements.define("vindral-channel-grid-button", bn), customElements.define("vindral-channel-grid", Br), customElements.define("vindral-channel-grid-item", hr), customElements.define("vindral-pip-button", zn), customElements.define("vindral-airplay-button", hn), customElements.define("vindral-cast-button", cn), customElements.define("vindral-cast-overlay", Fr), customElements.define("vindral-buffering-icon", Rr), customElements.define("vindral-language-menu", Un), customElements.define("vindral-language-menu-list", Ua), customElements.define("vindral-message", go), customElements.define("vindral-volume-range", lr), customElements.define("vindral-poster-overlay", Ya), customElements.define("vindral-player", qa), customElements.define("vindral-seek-bar", po), customElements.define("vindral-live-button", On);
4905
+ let hr = si;
4906
+ function zl() {
4907
+ customElements.define("vindral-controller", ri), customElements.define("vindral-control-bar", ia), customElements.define("vindral-play-button", $n), customElements.define("vindral-mute-button", zn), customElements.define("vindral-buffering-overlay", _r), customElements.define("vindral-scroll-overlay", ho), customElements.define("vindral-play-overlay", ko), customElements.define("vindral-user-input-play-overlay", go), customElements.define("vindral-fullscreen-button", Un), customElements.define("vindral-rendition-levels-menu", jn), customElements.define("vindral-rendition-levels-menu-list", eo), customElements.define("vindral-channel-grid-button", mn), customElements.define("vindral-channel-grid", $r), customElements.define("vindral-channel-grid-item", dr), customElements.define("vindral-pip-button", Bn), customElements.define("vindral-airplay-button", dn), customElements.define("vindral-cast-button", un), customElements.define("vindral-cast-overlay", Or), customElements.define("vindral-buffering-icon", Ur), customElements.define("vindral-language-menu", Pn), customElements.define("vindral-language-menu-list", _a), customElements.define("vindral-message", Ao), customElements.define("vindral-volume-range", hr), customElements.define("vindral-poster-overlay", Wa), customElements.define("vindral-player", Xa), customElements.define("vindral-seek-bar", mo), customElements.define("vindral-live-button", Hn);
4882
4908
  }
4883
4909
  export {
4884
- Hl as registerComponents
4910
+ zl as registerComponents
4885
4911
  };