@vindral/web-sdk 4.5.0 → 4.5.1-10-g5556eb794

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.
@@ -1,17 +1,18 @@
1
1
  import { n as e, t } from "./BsfwXDui.js";
2
- import { a as n, i as r, n as i, r as a, t as o } from "./B7hT-BKr.js";
3
- import { g as s, h as c, n as l, r as ee, t as u, v as te, y as ne } from "./D7vM_Gpt.js";
4
- import { t as d } from "./RxoWWyzp.js";
2
+ import { i as n, n as r, r as i, t as a } from "./DSw1XhvD.js";
3
+ import { _ as o, b as s, g as c, i as l, r as ee, t as u, y as te } from "./DTs-C-0Z.js";
4
+ import { t as d } from "./94-sTJd8.js";
5
+ import { t as f } from "./BKeRxR4O.js";
5
6
  //#region \0rolldown/runtime.js
6
- var f = Object.defineProperty, p = (e, t) => {
7
+ var p = Object.defineProperty, m = (e, t) => {
7
8
  let n = {};
8
- for (var r in e) f(n, r, {
9
+ for (var r in e) p(n, r, {
9
10
  get: e[r],
10
11
  enumerable: !0
11
12
  });
12
- return t || f(n, Symbol.toStringTag, { value: "Module" }), n;
13
- }, m, re = "\n<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\">\n <path d=\"m8 2 1.88 1.88\"/>\n <path d=\"M14.12 3.88 16 2\"/>\n <path d=\"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1\"/>\n <path d=\"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6\"/>\n <path d=\"M12 20v-9\"/>\n <path d=\"M6.53 9C4.6 8.8 3 7.1 3 5\"/>\n <path d=\"M6 13H2\"/>\n <path d=\"M3 21c0-2.1 1.7-3.9 3.8-4\"/>\n <path d=\"M20.97 5c0 2.1-1.6 3.8-3.5 4\"/>\n <path d=\"M22 13h-4\"/>\n <path d=\"M17.2 17c2.1.1 3.8 1.9 3.8 4\"/>\n</svg>\n", h = document.createElement("template");
14
- h.innerHTML = `
13
+ return t || p(n, Symbol.toStringTag, { value: "Module" }), n;
14
+ }, h, ne = "\n<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\">\n <path d=\"m8 2 1.88 1.88\"/>\n <path d=\"M14.12 3.88 16 2\"/>\n <path d=\"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1\"/>\n <path d=\"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6\"/>\n <path d=\"M12 20v-9\"/>\n <path d=\"M6.53 9C4.6 8.8 3 7.1 3 5\"/>\n <path d=\"M6 13H2\"/>\n <path d=\"M3 21c0-2.1 1.7-3.9 3.8-4\"/>\n <path d=\"M20.97 5c0 2.1-1.6 3.8-3.5 4\"/>\n <path d=\"M22 13h-4\"/>\n <path d=\"M17.2 17c2.1.1 3.8 1.9 3.8 4\"/>\n</svg>\n", g = document.createElement("template");
15
+ g.innerHTML = `
15
16
  <style>
16
17
  :host {
17
18
  display: var(--debug-button-display);
@@ -19,19 +20,19 @@ h.innerHTML = `
19
20
  justify-content: center;
20
21
  }
21
22
 
22
- :host([${s.DEBUG_PANEL_OPEN}]) {
23
+ :host([${o.DEBUG_PANEL_OPEN}]) {
23
24
  background: rgba(255, 255, 255, 0.15);
24
25
  }
25
26
  </style>
26
27
 
27
28
  <span id="icon">
28
- <slot name="icon">${re}</slot>
29
+ <slot name="icon">${ne}</slot>
29
30
  </span>
30
31
  `;
31
- var ie = class extends ee {
32
+ var re = class extends l {
32
33
  constructor() {
33
34
  var e;
34
- super(), (e = this.shadowRoot) == null || e.appendChild(h.content.cloneNode(!0));
35
+ super(), (e = this.shadowRoot) == null || e.appendChild(g.content.cloneNode(!0));
35
36
  }
36
37
  connectedCallback() {
37
38
  super.connectedCallback(), this.setAttribute("aria-label", "Toggle debug panel");
@@ -46,10 +47,10 @@ var ie = class extends ee {
46
47
  }));
47
48
  }
48
49
  };
49
- m = ie, e(ie, "observedAttributes", [...l(m, "observedAttributes", m), s.DEBUG_PANEL_OPEN]);
50
+ h = re, e(re, "observedAttributes", [...ee(h, "observedAttributes", h), o.DEBUG_PANEL_OPEN]);
50
51
  //#endregion
51
52
  //#region ../../libs/player-next/src/components/DebugPanel.constants.ts
52
- var ae = "Adaptive around current target", g = [
53
+ var ie = "Adaptive around current target", _ = [
53
54
  {
54
55
  label: "Ultra-Low",
55
56
  value: 200,
@@ -70,7 +71,7 @@ var ae = "Adaptive around current target", g = [
70
71
  value: 3e3,
71
72
  description: "Maximum stability"
72
73
  }
73
- ], oe = (e) => e <= 350 ? g[0] : e <= 800 ? g[1] : e <= 2e3 ? g[2] : g[3], se = "vindral:debug-panel-layout:v1", _ = [
74
+ ], ae = (e) => e <= 350 ? _[0] : e <= 800 ? _[1] : e <= 2e3 ? _[2] : _[3], oe = "vindral:debug-panel-layout:v1", se = [
74
75
  "latency-section",
75
76
  "quality-section",
76
77
  "playback-section",
@@ -105,7 +106,7 @@ de.innerHTML = `
105
106
  padding-bottom: env(safe-area-inset-bottom);
106
107
  }
107
108
 
108
- :host([${s.DEBUG_PANEL_OPEN}]) {
109
+ :host([${o.DEBUG_PANEL_OPEN}]) {
109
110
  display: block;
110
111
  }
111
112
 
@@ -1019,27 +1020,27 @@ de.innerHTML = `
1019
1020
  </div>
1020
1021
  </div>
1021
1022
  `;
1022
- var fe = de, v = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakSet(), pe = /* @__PURE__ */ new WeakMap(), me = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), _e = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), be = class extends HTMLElement {
1023
+ var fe = de, v = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(), pe = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakSet(), me = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), _e = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakMap(), xe = class extends HTMLElement {
1023
1024
  constructor() {
1024
- super(), o(this, K), n(this, v, null), n(this, y, []), n(this, b, 2 ** 53 - 1), n(this, x, !0), n(this, S, !0), n(this, C, null), n(this, w, 1500), n(this, T, 0), n(this, E, null), n(this, D, !1), n(this, O, []), n(this, k, 0), n(this, A, !1), n(this, j, null), n(this, M, /* @__PURE__ */ new Map()), n(this, N, []), n(this, P, []), n(this, F, []), n(this, I, []), n(this, L, null), n(this, R, null), n(this, z, null), n(this, B, null), n(this, V, null), n(this, H, !1), n(this, U, null), n(this, W, null), n(this, G, null), n(this, pe, (e) => {
1025
+ super(), d(this, G), n(this, v, null), n(this, y, []), n(this, b, 2 ** 53 - 1), n(this, x, !0), n(this, S, !0), n(this, C, null), n(this, w, 1500), n(this, T, 0), n(this, E, null), n(this, D, !1), n(this, O, []), n(this, k, 0), n(this, A, !1), n(this, j, null), n(this, M, /* @__PURE__ */ new Map()), n(this, N, []), n(this, pe, []), n(this, P, []), n(this, F, []), n(this, I, null), n(this, L, null), n(this, R, null), n(this, z, null), n(this, B, null), n(this, V, !1), n(this, H, null), n(this, U, null), n(this, W, null), n(this, me, (e) => {
1025
1026
  let t = e === "disconnected" ? "warn" : "info";
1026
- r(K, this, $).call(this, "Connection", `State: ${e}`, t);
1027
- }), n(this, me, (e) => {
1028
- r(K, this, $).call(this, "Playback", `State: ${e}`);
1027
+ i(G, this, $).call(this, "Connection", `State: ${e}`, t);
1029
1028
  }), n(this, he, (e) => {
1030
- r(K, this, $).call(this, "Buffer", `${e}`, "warn");
1029
+ i(G, this, $).call(this, "Playback", `State: ${e}`);
1031
1030
  }), n(this, ge, (e) => {
1032
- let t = e.isFatal() ? "Fatal" : "Non-fatal";
1033
- r(K, this, $).call(this, "Error", `${t}: ${e.message} (${e.code()})`, e.isFatal() ? "error" : "warn");
1031
+ i(G, this, $).call(this, "Buffer", `${e}`, "warn");
1034
1032
  }), n(this, _e, (e) => {
1033
+ let t = e.isFatal() ? "Fatal" : "Non-fatal";
1034
+ i(G, this, $).call(this, "Error", `${t}: ${e.message} (${e.code()})`, e.isFatal() ? "error" : "warn");
1035
+ }), n(this, ve, (e) => {
1035
1036
  let t = e.video;
1036
1037
  if (t != null && t.width && t.height) {
1037
- let e = r(K, this, et).call(this, t.frameRate), n = e ? ` @ ${e}fps` : "";
1038
- r(K, this, $).call(this, "Quality", `Rendition: ${t.width}x${t.height}${n}`);
1038
+ let e = i(G, this, et).call(this, t.frameRate), n = e ? ` @ ${e}fps` : "";
1039
+ i(G, this, $).call(this, "Quality", `Rendition: ${t.width}x${t.height}${n}`);
1039
1040
  }
1040
- }), n(this, ve, (e) => {
1041
- r(K, this, $).call(this, "Connection", `Channel ${e ? "live" : "offline"}`);
1042
1041
  }), n(this, ye, (e) => {
1042
+ i(G, this, $).call(this, "Connection", `Channel ${e ? "live" : "offline"}`);
1043
+ }), n(this, be, (e) => {
1043
1044
  let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
1044
1045
  n || r || i || t === "Escape" && (e.preventDefault(), e.stopPropagation(), this.dispatchEvent(new CustomEvent(c.TOGGLE_DEBUG_PANEL, {
1045
1046
  bubbles: !0,
@@ -1049,81 +1050,81 @@ var fe = de, v = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap(
1049
1050
  }
1050
1051
  connectedCallback() {
1051
1052
  var e;
1052
- a(v, this, this.closest("vindral-controller")), (e = i(v, this)) == null || e.connectListener(this), this.tabIndex = -1, r(K, this, we).call(this), r(K, this, Te).call(this), r(K, this, Ee).call(this), r(K, this, Re).call(this), r(K, this, Ye).call(this), r(K, this, Ot).call(this), r(K, this, St).call(this), r(K, this, qe).call(this), this.setAttribute("data-density", "compact"), r(K, this, je).call(this), r(K, this, Ie).call(this), r(K, this, Le).call(this), r(K, this, Et).call(this), r(K, this, ot).call(this), this.addEventListener("keydown", i(ye, this)), this.addEventListener("dblclick", (e) => e.stopPropagation());
1053
+ r(v, this, this.closest("vindral-controller")), (e = a(v, this)) == null || e.connectListener(this), this.tabIndex = -1, i(G, this, Te).call(this), i(G, this, Ee).call(this), i(G, this, De).call(this), i(G, this, ze).call(this), i(G, this, Ye).call(this), i(G, this, Ot).call(this), i(G, this, St).call(this), i(G, this, qe).call(this), this.setAttribute("data-density", "compact"), i(G, this, Me).call(this), i(G, this, Le).call(this), i(G, this, Re).call(this), i(G, this, Et).call(this), i(G, this, ot).call(this), this.addEventListener("keydown", a(be, this)), this.addEventListener("dblclick", (e) => e.stopPropagation());
1053
1054
  }
1054
1055
  disconnectedCallback() {
1055
1056
  var e;
1056
- (e = i(v, this)) == null || e.disconnectListener(this), this.removeEventListener("keydown", i(ye, this)), r(K, this, it).call(this), r(K, this, st).call(this), r(K, this, Fe).call(this), i(M, this).clear();
1057
+ (e = a(v, this)) == null || e.disconnectListener(this), this.removeEventListener("keydown", a(be, this)), i(G, this, it).call(this), i(G, this, st).call(this), i(G, this, Ie).call(this), a(M, this).clear();
1057
1058
  }
1058
1059
  attributeChangedCallback(e, t, n) {
1059
1060
  if (t !== n) switch (e) {
1060
- case s.DEBUG_PANEL_OPEN:
1061
- n === null ? r(K, this, it).call(this) : (r(K, this, rt).call(this), this.focus({ preventScroll: !0 }));
1061
+ case o.DEBUG_PANEL_OPEN:
1062
+ n === null ? i(G, this, it).call(this) : (i(G, this, rt).call(this), this.focus({ preventScroll: !0 }));
1062
1063
  break;
1063
- case s.TARGET_BUFFER_TIME:
1064
+ case o.TARGET_BUFFER_TIME:
1064
1065
  if (n) {
1065
1066
  let e = parseInt(n, 10);
1066
- Number.isNaN(e) || (e !== i(w, this) && r(K, this, $).call(this, "Latency", `Target buffer set to ${e}ms`), a(w, this, e), r(K, this, Z).call(this));
1067
+ Number.isNaN(e) || (e !== a(w, this) && i(G, this, $).call(this, "Latency", `Target buffer set to ${e}ms`), r(w, this, e), i(G, this, Z).call(this));
1067
1068
  }
1068
1069
  break;
1069
- case s.DRIFT:
1070
+ case o.DRIFT:
1070
1071
  if (n) {
1071
1072
  let e = parseFloat(n);
1072
- Number.isNaN(e) || (a(T, this, e), r(K, this, Je).call(this));
1073
+ Number.isNaN(e) || (r(T, this, e), i(G, this, Je).call(this));
1073
1074
  }
1074
1075
  break;
1075
- case s.RENDITION_LEVELS:
1076
+ case o.RENDITION_LEVELS:
1076
1077
  if (n) try {
1077
1078
  let e = JSON.parse(n);
1078
- Array.isArray(e) && (a(y, this, e), r(K, this, $e).call(this));
1079
+ Array.isArray(e) && (r(y, this, e), i(G, this, $e).call(this));
1079
1080
  } catch (e) {}
1080
1081
  break;
1081
- case s.MAX_VIDEO_BITRATE:
1082
- a(b, this, n ? parseInt(n, 10) : 2 ** 53 - 1), Number.isNaN(i(b, this)) && a(b, this, 2 ** 53 - 1), r(K, this, tt).call(this);
1082
+ case o.MAX_VIDEO_BITRATE:
1083
+ r(b, this, n ? parseInt(n, 10) : 2 ** 53 - 1), Number.isNaN(a(b, this)) && r(b, this, 2 ** 53 - 1), i(G, this, tt).call(this);
1083
1084
  break;
1084
- case s.ABR_ENABLED:
1085
- a(x, this, n !== null && n !== "false"), r(K, this, Ze).call(this), r(K, this, Qe).call(this);
1085
+ case o.ABR_ENABLED:
1086
+ r(x, this, n !== null && n !== "false"), i(G, this, Ze).call(this), i(G, this, Qe).call(this);
1086
1087
  break;
1087
- case s.SIZE_BASED_RESOLUTION_CAP_ENABLED:
1088
- a(S, this, n !== null && n !== "false"), r(K, this, Qe).call(this);
1088
+ case o.SIZE_BASED_RESOLUTION_CAP_ENABLED:
1089
+ r(S, this, n !== null && n !== "false"), i(G, this, Qe).call(this);
1089
1090
  break;
1090
- case s.RENDITION_LEVEL:
1091
+ case o.RENDITION_LEVEL:
1091
1092
  if (n) try {
1092
- var o;
1093
- let e = JSON.parse(n), t = i(C, this);
1094
- if (a(C, this, e), r(K, this, tt).call(this), t && (o = e.video) != null && o.width && e.video.height) {
1095
- let n = t.video ? `${t.video.width}x${t.video.height}` : "?", i = `${e.video.width}x${e.video.height}`;
1096
- n !== i && r(K, this, $).call(this, "Quality", `Switched: ${n} → ${i}`);
1093
+ var s;
1094
+ let e = JSON.parse(n), t = a(C, this);
1095
+ if (r(C, this, e), i(G, this, tt).call(this), t && (s = e.video) != null && s.width && e.video.height) {
1096
+ let n = t.video ? `${t.video.width}x${t.video.height}` : "?", r = `${e.video.width}x${e.video.height}`;
1097
+ n !== r && i(G, this, $).call(this, "Quality", `Switched: ${n} → ${r}`);
1097
1098
  }
1098
1099
  } catch (e) {}
1099
1100
  break;
1100
1101
  }
1101
1102
  }
1102
1103
  };
1103
- function q(e) {
1104
+ function K(e) {
1104
1105
  if (!this.shadowRoot) return null;
1105
- if (i(M, this).has(e)) return i(M, this).get(e);
1106
+ if (a(M, this).has(e)) return a(M, this).get(e);
1106
1107
  let t = this.shadowRoot.querySelector(e);
1107
- return i(M, this).set(e, t), t;
1108
+ return a(M, this).set(e, t), t;
1108
1109
  }
1109
- function J(e, t) {
1110
+ function q(e, t) {
1110
1111
  !e || e.textContent === t || (e.textContent = t);
1111
1112
  }
1112
- function xe() {
1113
- var e, t, n, r, o, s, c;
1114
- a(N, this, Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll("#latency-strip-target")) || [])), a(P, this, Array.from(((t = this.shadowRoot) == null ? void 0 : t.querySelectorAll("#latency-strip-decrease")) || [])), a(F, this, Array.from(((n = this.shadowRoot) == null ? void 0 : n.querySelectorAll("#latency-strip-increase")) || [])), a(I, this, Array.from(((r = this.shadowRoot) == null ? void 0 : r.querySelectorAll(".preset-btn[data-value]")) || [])), a(L, this, ((o = this.shadowRoot) == null ? void 0 : o.querySelector(".preset-btn[data-mode=\"dynamic\"]")) || null), a(R, this, ((s = i(L, this)) == null ? void 0 : s.querySelector(".dynamic-subtitle")) || null), a(z, this, ((c = i(L, this)) == null ? void 0 : c.querySelector(".dynamic-value")) || null);
1113
+ function Se() {
1114
+ var e, t, n, i, o, s, c;
1115
+ r(N, this, Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll("#latency-strip-target")) || [])), r(pe, this, Array.from(((t = this.shadowRoot) == null ? void 0 : t.querySelectorAll("#latency-strip-decrease")) || [])), r(P, this, Array.from(((n = this.shadowRoot) == null ? void 0 : n.querySelectorAll("#latency-strip-increase")) || [])), r(F, this, Array.from(((i = this.shadowRoot) == null ? void 0 : i.querySelectorAll(".preset-btn[data-value]")) || [])), r(I, this, ((o = this.shadowRoot) == null ? void 0 : o.querySelector(".preset-btn[data-mode=\"dynamic\"]")) || null), r(L, this, ((s = a(I, this)) == null ? void 0 : s.querySelector(".dynamic-subtitle")) || null), r(R, this, ((c = a(I, this)) == null ? void 0 : c.querySelector(".dynamic-value")) || null);
1115
1116
  }
1116
- function Se(e) {
1117
+ function Ce(e) {
1117
1118
  var t;
1118
1119
  let n = (t = this.shadowRoot) == null ? void 0 : t.querySelector(`.section#${e}`);
1119
1120
  return !!n && !n.hidden;
1120
1121
  }
1121
- function Ce() {
1122
- let e = `${i(O, this).length} event${i(O, this).length === 1 ? "" : "s"}`;
1123
- r(K, this, J).call(this, i(V, this), e), r(K, this, Y).call(this, "events-section", String(i(O, this).length));
1124
- }
1125
1122
  function we() {
1126
- let e = r(K, this, q).call(this, ".close-btn");
1123
+ let e = `${a(O, this).length} event${a(O, this).length === 1 ? "" : "s"}`;
1124
+ i(G, this, q).call(this, a(B, this), e), i(G, this, J).call(this, "events-section", String(a(O, this).length));
1125
+ }
1126
+ function Te() {
1127
+ let e = i(G, this, K).call(this, ".close-btn");
1127
1128
  e == null || e.addEventListener("click", (e) => {
1128
1129
  e.stopPropagation(), this.dispatchEvent(new CustomEvent(c.TOGGLE_DEBUG_PANEL, {
1129
1130
  bubbles: !0,
@@ -1131,89 +1132,89 @@ function we() {
1131
1132
  }));
1132
1133
  });
1133
1134
  }
1134
- function Te() {
1135
+ function Ee() {
1135
1136
  var e;
1136
1137
  let t = Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section-tab[data-target]")) || []);
1137
1138
  t.length !== 0 && t.forEach((e) => {
1138
1139
  e.addEventListener("click", (t) => {
1139
1140
  t.stopPropagation();
1140
1141
  let n = e.getAttribute("data-target");
1141
- n && r(K, this, X).call(this, n) && r(K, this, Oe).call(this, n);
1142
+ n && i(G, this, Y).call(this, n) && i(G, this, ke).call(this, n);
1142
1143
  });
1143
1144
  });
1144
1145
  }
1145
- function Ee() {
1146
- a(U, this, r(K, this, q).call(this, ".scroll-tabs-btn")), a(W, this, r(K, this, q).call(this, ".section-tabs-wrap")), a(G, this, r(K, this, q).call(this, ".section-tabs")), !(!i(U, this) || !i(G, this) || !i(W, this)) && (i(G, this).addEventListener("scroll", () => r(K, this, De).call(this), { passive: !0 }), i(U, this).addEventListener("click", (e) => {
1147
- if (e.stopPropagation(), !i(G, this)) return;
1148
- let { scrollLeft: t, scrollWidth: n, clientWidth: r } = i(G, this), a = t + r >= n - 4;
1149
- i(G, this).scrollTo({
1150
- left: a ? 0 : n,
1146
+ function De() {
1147
+ r(H, this, i(G, this, K).call(this, ".scroll-tabs-btn")), r(U, this, i(G, this, K).call(this, ".section-tabs-wrap")), r(W, this, i(G, this, K).call(this, ".section-tabs")), !(!a(H, this) || !a(W, this) || !a(U, this)) && (a(W, this).addEventListener("scroll", () => i(G, this, Oe).call(this), { passive: !0 }), a(H, this).addEventListener("click", (e) => {
1148
+ if (e.stopPropagation(), !a(W, this)) return;
1149
+ let { scrollLeft: t, scrollWidth: n, clientWidth: r } = a(W, this), i = t + r >= n - 4;
1150
+ a(W, this).scrollTo({
1151
+ left: i ? 0 : n,
1151
1152
  behavior: "smooth"
1152
1153
  });
1153
- }), r(K, this, De).call(this));
1154
+ }), i(G, this, Oe).call(this));
1154
1155
  }
1155
- function De() {
1156
- if (!i(U, this) || !i(G, this) || !i(W, this)) return;
1157
- let { scrollLeft: e, scrollWidth: t, clientWidth: n } = i(G, this), r = t > n + 4, a = e + n >= t - 4;
1158
- i(U, this).setAttribute("data-visible", String(r)), i(U, this).innerHTML = a ? ue : le, i(W, this).toggleAttribute("data-can-scroll-right", r && !a);
1156
+ function Oe() {
1157
+ if (!a(H, this) || !a(W, this) || !a(U, this)) return;
1158
+ let { scrollLeft: e, scrollWidth: t, clientWidth: n } = a(W, this), r = t > n + 4, i = e + n >= t - 4;
1159
+ a(H, this).setAttribute("data-visible", String(r)), a(H, this).innerHTML = i ? ue : le, a(U, this).toggleAttribute("data-can-scroll-right", r && !i);
1159
1160
  }
1160
- function Oe(e) {
1161
- let t = r(K, this, q).call(this, `.section#${e}`);
1162
- t && r(K, this, ke).call(this, e, t.hidden);
1161
+ function ke(e) {
1162
+ let t = i(G, this, K).call(this, `.section#${e}`);
1163
+ t && i(G, this, Ae).call(this, e, t.hidden);
1163
1164
  }
1164
- function ke(e, t) {
1165
- let n = r(K, this, q).call(this, `.section#${e}`);
1165
+ function Ae(e, t) {
1166
+ let n = i(G, this, K).call(this, `.section#${e}`);
1166
1167
  if (!n) return;
1167
- let a = !n.hidden;
1168
+ let r = !n.hidden;
1168
1169
  n.hidden = !t;
1169
- let o = r(K, this, q).call(this, `.section-tab[data-target="${e}"]`);
1170
- o && (o.setAttribute("data-active", String(t)), o.setAttribute("aria-pressed", String(t)), !i(D, this) && a !== t && r(K, this, Fe).call(this), e === "events-section" && t && i(H, this) && r(K, this, Et).call(this, !0), r(K, this, Ae).call(this));
1171
- }
1172
- function Ae() {
1173
- this.toggleAttribute("data-collapsed", r(K, this, Me).call(this).length === 0);
1170
+ let o = i(G, this, K).call(this, `.section-tab[data-target="${e}"]`);
1171
+ o && (o.setAttribute("data-active", String(t)), o.setAttribute("aria-pressed", String(t)), !a(D, this) && r !== t && i(G, this, Ie).call(this), e === "events-section" && t && a(V, this) && i(G, this, Et).call(this, !0), i(G, this, je).call(this));
1174
1172
  }
1175
1173
  function je() {
1174
+ this.toggleAttribute("data-collapsed", i(G, this, Ne).call(this).length === 0);
1175
+ }
1176
+ function Me() {
1176
1177
  var e;
1177
1178
  Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section[id]")) || []).forEach((e) => {
1178
- r(K, this, X).call(this, e.id) && r(K, this, ke).call(this, e.id, !e.hidden);
1179
+ i(G, this, Y).call(this, e.id) && i(G, this, Ae).call(this, e.id, !e.hidden);
1179
1180
  });
1180
1181
  }
1181
- function Y(e, t) {
1182
- let n = r(K, this, q).call(this, `.section-badge[data-badge-for="${e}"]`);
1182
+ function J(e, t) {
1183
+ let n = i(G, this, K).call(this, `.section-badge[data-badge-for="${e}"]`);
1183
1184
  if (!n) return;
1184
- r(K, this, J).call(this, n, t);
1185
- let i = r(K, this, q).call(this, `.section-tab[data-target="${e}"]`);
1186
- if (!i) return;
1187
- let a = `${i.getAttribute("title") || e} section (${t})`;
1188
- i.getAttribute("aria-label") !== a && i.setAttribute("aria-label", a);
1185
+ i(G, this, q).call(this, n, t);
1186
+ let r = i(G, this, K).call(this, `.section-tab[data-target="${e}"]`);
1187
+ if (!r) return;
1188
+ let a = `${r.getAttribute("title") || e} section (${t})`;
1189
+ r.getAttribute("aria-label") !== a && r.setAttribute("aria-label", a);
1189
1190
  }
1190
- function X(e) {
1191
- return _.includes(e);
1191
+ function Y(e) {
1192
+ return se.includes(e);
1192
1193
  }
1193
- function Me() {
1194
+ function Ne() {
1194
1195
  var e;
1195
- return Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section[id]")) || []).filter((e) => r(K, this, X).call(this, e.id) && !e.hidden).map((e) => e.id);
1196
+ return Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section[id]")) || []).filter((e) => i(G, this, Y).call(this, e.id) && !e.hidden).map((e) => e.id);
1196
1197
  }
1197
- function Ne() {
1198
+ function Pe() {
1198
1199
  var e;
1199
- return Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section-tab[data-target]")) || []).map((e) => e.getAttribute("data-target")).filter((e) => typeof e == "string" && r(K, this, X).call(this, e));
1200
+ return Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section-tab[data-target]")) || []).map((e) => e.getAttribute("data-target")).filter((e) => typeof e == "string" && i(G, this, Y).call(this, e));
1200
1201
  }
1201
- function Pe(e) {
1202
+ function Fe(e) {
1202
1203
  var t;
1203
1204
  let n = (t = this.shadowRoot) == null ? void 0 : t.querySelector(".section-tabs");
1204
1205
  if (!n || !this.shadowRoot) return;
1205
- let i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
1206
+ let r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
1206
1207
  Array.from(n.querySelectorAll(".section-tab[data-target]")).forEach((e) => {
1207
1208
  let t = e.getAttribute("data-target");
1208
- t && r(K, this, X).call(this, t) && i.set(t, e);
1209
- }), _.forEach((e) => {
1209
+ t && i(G, this, Y).call(this, t) && r.set(t, e);
1210
+ }), se.forEach((e) => {
1210
1211
  var t;
1211
1212
  let n = (t = this.shadowRoot) == null ? void 0 : t.querySelector(`.section#${e}`);
1212
1213
  n && a.set(e, n);
1213
1214
  });
1214
- let o = [...e, ..._.filter((t) => !e.includes(t))];
1215
+ let o = [...e, ...se.filter((t) => !e.includes(t))];
1215
1216
  o.forEach((e) => {
1216
- let t = i.get(e);
1217
+ let t = r.get(e);
1217
1218
  t && n.appendChild(t);
1218
1219
  }), o.forEach((e) => {
1219
1220
  let t = a.get(e);
@@ -1223,21 +1224,21 @@ function Pe(e) {
1223
1224
  }
1224
1225
  });
1225
1226
  }
1226
- function Fe() {
1227
+ function Ie() {
1227
1228
  if (!this.shadowRoot) return;
1228
1229
  let e = {
1229
1230
  version: 1,
1230
- openSections: r(K, this, Me).call(this),
1231
- sectionOrder: r(K, this, Ne).call(this)
1231
+ openSections: i(G, this, Ne).call(this),
1232
+ sectionOrder: i(G, this, Pe).call(this)
1232
1233
  };
1233
1234
  try {
1234
- sessionStorage.setItem(se, JSON.stringify(e));
1235
+ sessionStorage.setItem(oe, JSON.stringify(e));
1235
1236
  } catch (e) {}
1236
1237
  }
1237
- function Ie() {
1238
+ function Le() {
1238
1239
  let e = null;
1239
1240
  try {
1240
- e = sessionStorage.getItem(se);
1241
+ e = sessionStorage.getItem(oe);
1241
1242
  } catch (e) {
1242
1243
  return;
1243
1244
  }
@@ -1249,249 +1250,249 @@ function Ie() {
1249
1250
  return;
1250
1251
  }
1251
1252
  if (!t || typeof t != "object") return;
1252
- let n = Array.isArray(t.openSections) ? t.openSections.filter((e) => typeof e == "string" && r(K, this, X).call(this, e)) : [], i = Array.isArray(t.sectionOrder) ? t.sectionOrder.filter((e) => typeof e == "string" && r(K, this, X).call(this, e)) : [];
1253
- a(D, this, !0);
1253
+ let n = Array.isArray(t.openSections) ? t.openSections.filter((e) => typeof e == "string" && i(G, this, Y).call(this, e)) : [], a = Array.isArray(t.sectionOrder) ? t.sectionOrder.filter((e) => typeof e == "string" && i(G, this, Y).call(this, e)) : [];
1254
+ r(D, this, !0);
1254
1255
  try {
1255
- if (i.length > 0 && r(K, this, Pe).call(this, i), Array.isArray(t.openSections)) {
1256
+ if (a.length > 0 && i(G, this, Fe).call(this, a), Array.isArray(t.openSections)) {
1256
1257
  let e = new Set(n);
1257
- _.forEach((t) => {
1258
- r(K, this, ke).call(this, t, e.has(t));
1258
+ se.forEach((t) => {
1259
+ i(G, this, Ae).call(this, t, e.has(t));
1259
1260
  });
1260
1261
  }
1261
- r(K, this, je).call(this);
1262
+ i(G, this, Me).call(this);
1262
1263
  } finally {
1263
- a(D, this, !1);
1264
+ r(D, this, !1);
1264
1265
  }
1265
- r(K, this, Fe).call(this);
1266
- }
1267
- function Le() {
1268
- r(K, this, Y).call(this, "latency-section", "Drift -"), r(K, this, Y).call(this, "quality-section", "Auto"), r(K, this, Y).call(this, "playback-section", "Buffer -"), r(K, this, Y).call(this, "network-section", "RTT -"), r(K, this, Y).call(this, "stats-section", "Up -"), r(K, this, Y).call(this, "events-section", `${i(O, this).length}`);
1266
+ i(G, this, Ie).call(this);
1269
1267
  }
1270
1268
  function Re() {
1271
- r(K, this, xe).call(this), i(P, this).forEach((e) => {
1269
+ i(G, this, J).call(this, "latency-section", "Drift -"), i(G, this, J).call(this, "quality-section", "Auto"), i(G, this, J).call(this, "playback-section", "Buffer -"), i(G, this, J).call(this, "network-section", "RTT -"), i(G, this, J).call(this, "stats-section", "Up -"), i(G, this, J).call(this, "events-section", `${a(O, this).length}`);
1270
+ }
1271
+ function ze() {
1272
+ i(G, this, Se).call(this), a(pe, this).forEach((e) => {
1272
1273
  e.addEventListener("click", (e) => {
1273
- e.stopPropagation(), r(K, this, Be).call(this, -r(K, this, ze).call(this, !1));
1274
+ e.stopPropagation(), i(G, this, Ve).call(this, -i(G, this, Be).call(this, !1));
1274
1275
  });
1275
- }), i(F, this).forEach((e) => {
1276
+ }), a(P, this).forEach((e) => {
1276
1277
  e.addEventListener("click", (e) => {
1277
- e.stopPropagation(), r(K, this, Be).call(this, r(K, this, ze).call(this, !0));
1278
+ e.stopPropagation(), i(G, this, Ve).call(this, i(G, this, Be).call(this, !0));
1278
1279
  });
1279
1280
  });
1280
1281
  }
1281
- function ze(e) {
1282
- let t = i(w, this);
1283
- return e ? t >= 1e3 ? 250 : t >= 500 ? 100 : 50 : t > 1e3 ? 250 : t > 500 ? 100 : 50;
1284
- }
1285
1282
  function Be(e) {
1286
- let t = Math.max(50, Math.min(u, i(w, this) + e));
1287
- t !== i(w, this) && (a(w, this, t), r(K, this, Ve).call(this, t), r(K, this, Ue).call(this), r(K, this, Z).call(this));
1283
+ let t = a(w, this);
1284
+ return e ? t >= 1e3 ? 250 : t >= 500 ? 100 : 50 : t > 1e3 ? 250 : t > 500 ? 100 : 50;
1288
1285
  }
1289
1286
  function Ve(e) {
1290
- if (!i(v, this)) return;
1291
- let { isDynamic: t, minBuffer: n, maxBuffer: a } = r(K, this, He).call(this);
1292
- t && (e < n ? i(v, this).setAttribute("min-buffer-time", String(e)) : e > a && i(v, this).setAttribute("max-buffer-time", String(e)));
1287
+ let t = Math.max(50, Math.min(u, a(w, this) + e));
1288
+ t !== a(w, this) && (r(w, this, t), i(G, this, He).call(this, t), i(G, this, X).call(this), i(G, this, Z).call(this));
1289
+ }
1290
+ function He(e) {
1291
+ if (!a(v, this)) return;
1292
+ let { isDynamic: t, minBuffer: n, maxBuffer: r } = i(G, this, Ue).call(this);
1293
+ t && (e < n ? a(v, this).setAttribute("min-buffer-time", String(e)) : e > r && a(v, this).setAttribute("max-buffer-time", String(e)));
1293
1294
  }
1294
- function He() {
1295
+ function Ue() {
1295
1296
  var e, t;
1296
- let n = (e = i(v, this)) == null ? void 0 : e.getAttribute("min-buffer-time"), r = (t = i(v, this)) == null ? void 0 : t.getAttribute("max-buffer-time");
1297
+ let n = (e = a(v, this)) == null ? void 0 : e.getAttribute("min-buffer-time"), r = (t = a(v, this)) == null ? void 0 : t.getAttribute("max-buffer-time");
1297
1298
  if (!n || !r) return {
1298
1299
  isDynamic: !1,
1299
1300
  minBuffer: 0,
1300
1301
  maxBuffer: 0
1301
1302
  };
1302
- let a = Number(n), o = Number(r);
1303
- return Number.isNaN(a) || Number.isNaN(o) ? {
1303
+ let i = Number(n), o = Number(r);
1304
+ return Number.isNaN(i) || Number.isNaN(o) ? {
1304
1305
  isDynamic: !1,
1305
1306
  minBuffer: 0,
1306
1307
  maxBuffer: 0
1307
1308
  } : {
1308
- isDynamic: a !== o,
1309
- minBuffer: a,
1309
+ isDynamic: i !== o,
1310
+ minBuffer: i,
1310
1311
  maxBuffer: o
1311
1312
  };
1312
1313
  }
1313
- function Ue() {
1314
+ function X() {
1314
1315
  this.dispatchEvent(new CustomEvent(c.SET_TARGET_BUFFER_TIME, {
1315
1316
  bubbles: !0,
1316
1317
  composed: !0,
1317
- detail: i(w, this)
1318
+ detail: a(w, this)
1318
1319
  }));
1319
1320
  }
1320
1321
  function We(e) {
1321
- if (r(K, this, He).call(this).isDynamic) {
1322
- r(K, this, Ke).call(this, e), r(K, this, Z).call(this);
1322
+ if (i(G, this, Ue).call(this).isDynamic) {
1323
+ i(G, this, Ke).call(this, e), i(G, this, Z).call(this);
1323
1324
  return;
1324
1325
  }
1325
- a(w, this, e), r(K, this, Ue).call(this), r(K, this, Z).call(this);
1326
+ r(w, this, e), i(G, this, X).call(this), i(G, this, Z).call(this);
1326
1327
  }
1327
1328
  function Ge() {
1328
- if (r(K, this, He).call(this).isDynamic || !i(v, this)) return;
1329
- let e = Math.max(50, Math.min(u, i(w, this))), t = Math.max(50, e - 100), n = Math.min(u, e + 100);
1330
- t === n && n < 5e3 ? n = Math.min(u, n + 100) : t === n && t > 50 && (t = Math.max(50, t - 100)), i(v, this).setAttribute("min-buffer-time", String(t)), i(v, this).setAttribute("max-buffer-time", String(n)), r(K, this, Ue).call(this), r(K, this, Z).call(this);
1329
+ if (i(G, this, Ue).call(this).isDynamic || !a(v, this)) return;
1330
+ let e = Math.max(50, Math.min(u, a(w, this))), t = Math.max(50, e - 100), n = Math.min(u, e + 100);
1331
+ t === n && n < 5e3 ? n = Math.min(u, n + 100) : t === n && t > 50 && (t = Math.max(50, t - 100)), a(v, this).setAttribute("min-buffer-time", String(t)), a(v, this).setAttribute("max-buffer-time", String(n)), i(G, this, X).call(this), i(G, this, Z).call(this);
1331
1332
  }
1332
1333
  function Ke(e) {
1333
- if (!i(v, this)) return;
1334
+ if (!a(v, this)) return;
1334
1335
  let t = Math.max(50, Math.min(u, e));
1335
- a(w, this, t);
1336
+ r(w, this, t);
1336
1337
  let n = String(t);
1337
- i(v, this).setAttribute("min-buffer-time", n), i(v, this).setAttribute("max-buffer-time", n), r(K, this, Ue).call(this);
1338
+ a(v, this).setAttribute("min-buffer-time", n), a(v, this).setAttribute("max-buffer-time", n), i(G, this, X).call(this);
1338
1339
  }
1339
1340
  function qe() {
1340
- let e = r(K, this, q).call(this, "#latency-presets");
1341
+ let e = i(G, this, K).call(this, "#latency-presets");
1341
1342
  if (!e) return;
1342
- e.innerHTML = "", g.forEach((t) => {
1343
+ e.innerHTML = "", _.forEach((t) => {
1343
1344
  let n = document.createElement("button");
1344
1345
  n.className = "preset-btn", n.type = "button", n.setAttribute("data-value", String(t.value)), n.setAttribute("aria-label", `${t.label} preset (${t.value}ms)`);
1345
- let i = document.createElement("span");
1346
- i.className = "preset-title", i.textContent = t.label, n.appendChild(i);
1346
+ let r = document.createElement("span");
1347
+ r.className = "preset-title", r.textContent = t.label, n.appendChild(r);
1347
1348
  let a = document.createElement("span");
1348
1349
  a.className = "preset-subtitle", a.textContent = t.description, n.appendChild(a);
1349
1350
  let o = document.createElement("span");
1350
1351
  o.className = "preset-value", o.textContent = `${t.value}ms`, n.appendChild(o), n.addEventListener("click", (e) => {
1351
- e.stopPropagation(), r(K, this, We).call(this, t.value);
1352
+ e.stopPropagation(), i(G, this, We).call(this, t.value);
1352
1353
  }), e.appendChild(n);
1353
1354
  });
1354
1355
  let t = document.createElement("button");
1355
1356
  t.type = "button", t.className = "preset-btn dynamic-btn", t.setAttribute("data-mode", "dynamic"), t.setAttribute("aria-label", "Enable dynamic buffer mode");
1356
1357
  let n = document.createElement("span");
1357
1358
  n.className = "preset-title", n.textContent = "Dynamic", t.appendChild(n);
1358
- let i = document.createElement("span");
1359
- i.className = "preset-subtitle dynamic-subtitle", t.appendChild(i);
1359
+ let r = document.createElement("span");
1360
+ r.className = "preset-subtitle dynamic-subtitle", t.appendChild(r);
1360
1361
  let a = document.createElement("span");
1361
1362
  a.className = "preset-value dynamic-value", t.appendChild(a), t.addEventListener("click", (e) => {
1362
- e.stopPropagation(), r(K, this, Ge).call(this);
1363
- }), e.appendChild(t), r(K, this, xe).call(this), r(K, this, Z).call(this);
1363
+ e.stopPropagation(), i(G, this, Ge).call(this);
1364
+ }), e.appendChild(t), i(G, this, Se).call(this), i(G, this, Z).call(this);
1364
1365
  }
1365
1366
  function Z() {
1366
- i(N, this).length === 0 && r(K, this, xe).call(this);
1367
- let { isDynamic: e, minBuffer: t, maxBuffer: n } = r(K, this, He).call(this);
1368
- if (i(N, this).forEach((e) => {
1369
- r(K, this, J).call(this, e, `${i(w, this)}ms`);
1370
- }), i(P, this).forEach((e) => {
1371
- e.disabled = i(w, this) <= 50;
1372
- }), i(F, this).forEach((e) => {
1373
- e.disabled = i(w, this) >= u;
1374
- }), i(L, this) && i(L, this).setAttribute("data-active", String(e)), i(R, this) && r(K, this, J).call(this, i(R, this), e ? `${t}ms - ${n}ms` : ae), i(z, this) && r(K, this, J).call(this, i(z, this), e ? "range" : ""), i(I, this).length === 0) return;
1375
- let a = null;
1367
+ a(N, this).length === 0 && i(G, this, Se).call(this);
1368
+ let { isDynamic: e, minBuffer: t, maxBuffer: n } = i(G, this, Ue).call(this);
1369
+ if (a(N, this).forEach((e) => {
1370
+ i(G, this, q).call(this, e, `${a(w, this)}ms`);
1371
+ }), a(pe, this).forEach((e) => {
1372
+ e.disabled = a(w, this) <= 50;
1373
+ }), a(P, this).forEach((e) => {
1374
+ e.disabled = a(w, this) >= u;
1375
+ }), a(I, this) && a(I, this).setAttribute("data-active", String(e)), a(L, this) && i(G, this, q).call(this, a(L, this), e ? `${t}ms - ${n}ms` : ie), a(R, this) && i(G, this, q).call(this, a(R, this), e ? "range" : ""), a(F, this).length === 0) return;
1376
+ let r = null;
1376
1377
  if (!e) {
1377
- let e = g.find((e) => e.value === i(w, this)), t = oe(i(w, this)), n = g.reduce((e, t) => Math.abs(t.value - i(w, this)) < Math.abs(e.value - i(w, this)) ? t : e);
1378
- a = e || t || n;
1378
+ let e = _.find((e) => e.value === a(w, this)), t = ae(a(w, this)), n = _.reduce((e, t) => Math.abs(t.value - a(w, this)) < Math.abs(e.value - a(w, this)) ? t : e);
1379
+ r = e || t || n;
1379
1380
  }
1380
- i(I, this).forEach((t) => {
1381
- let n = parseInt(t.getAttribute("data-value") || "0", 10), r = !e && (a == null ? void 0 : a.value) === n;
1382
- t.setAttribute("data-active", String(r));
1381
+ a(F, this).forEach((t) => {
1382
+ let n = parseInt(t.getAttribute("data-value") || "0", 10), i = !e && (r == null ? void 0 : r.value) === n;
1383
+ t.setAttribute("data-active", String(i));
1383
1384
  });
1384
1385
  }
1385
1386
  function Je() {
1386
- let e = r(K, this, q).call(this, "#current-drift"), t = `${i(T, this).toFixed(1)}ms`;
1387
+ let e = i(G, this, K).call(this, "#current-drift"), t = `${a(T, this).toFixed(1)}ms`;
1387
1388
  if (e) {
1388
- r(K, this, J).call(this, e, t);
1389
- let n = Math.abs(i(T, this));
1389
+ i(G, this, q).call(this, e, t);
1390
+ let n = Math.abs(a(T, this));
1390
1391
  n > 200 ? e.setAttribute("data-status", "error") : n > 100 ? e.setAttribute("data-status", "warning") : e.setAttribute("data-status", "good");
1391
1392
  }
1392
- let n = i(T, this) > 0 ? `+${t}` : t;
1393
- r(K, this, Y).call(this, "latency-section", `Drift ${n}`);
1393
+ let n = a(T, this) > 0 ? `+${t}` : t;
1394
+ i(G, this, J).call(this, "latency-section", `Drift ${n}`);
1394
1395
  }
1395
1396
  function Ye() {
1396
- let e = r(K, this, q).call(this, "#abr-auto-btn"), t = r(K, this, q).call(this, "#abr-fixed-btn");
1397
+ let e = i(G, this, K).call(this, "#abr-auto-btn"), t = i(G, this, K).call(this, "#abr-fixed-btn");
1397
1398
  e == null || e.addEventListener("click", (e) => {
1398
- e.stopPropagation(), a(x, this, !0), r(K, this, Ze).call(this), this.dispatchEvent(new CustomEvent(c.SET_ABR_MODE, {
1399
+ e.stopPropagation(), r(x, this, !0), i(G, this, Ze).call(this), this.dispatchEvent(new CustomEvent(c.SET_ABR_MODE, {
1399
1400
  bubbles: !0,
1400
1401
  composed: !0,
1401
1402
  detail: !0
1402
- })), r(K, this, $).call(this, "Quality", "ABR mode: Auto");
1403
+ })), i(G, this, $).call(this, "Quality", "ABR mode: Auto");
1403
1404
  }), t == null || t.addEventListener("click", (e) => {
1404
1405
  e.stopPropagation();
1405
- let t = r(K, this, Xe).call(this);
1406
+ let t = i(G, this, Xe).call(this);
1406
1407
  t && this.dispatchEvent(new CustomEvent(c.SET_RENDITION, {
1407
1408
  bubbles: !0,
1408
1409
  composed: !0,
1409
1410
  detail: t
1410
- })), a(x, this, !1), r(K, this, Ze).call(this), this.dispatchEvent(new CustomEvent(c.SET_ABR_MODE, {
1411
+ })), r(x, this, !1), i(G, this, Ze).call(this), this.dispatchEvent(new CustomEvent(c.SET_ABR_MODE, {
1411
1412
  bubbles: !0,
1412
1413
  composed: !0,
1413
1414
  detail: !1
1414
- })), r(K, this, $).call(this, "Quality", "ABR mode: Fixed");
1415
+ })), i(G, this, $).call(this, "Quality", "ABR mode: Fixed");
1415
1416
  });
1416
- let n = r(K, this, q).call(this, "#size-cap-toggle");
1417
+ let n = i(G, this, K).call(this, "#size-cap-toggle");
1417
1418
  n == null || n.addEventListener("click", (e) => {
1418
- e.stopPropagation(), a(S, this, !i(S, this)), r(K, this, Qe).call(this), this.dispatchEvent(new CustomEvent(c.SET_SIZE_BASED_RESOLUTION_CAP_MODE, {
1419
+ e.stopPropagation(), r(S, this, !a(S, this)), i(G, this, Qe).call(this), this.dispatchEvent(new CustomEvent(c.SET_SIZE_BASED_RESOLUTION_CAP_MODE, {
1419
1420
  bubbles: !0,
1420
1421
  composed: !0,
1421
- detail: i(S, this)
1422
- })), r(K, this, $).call(this, "Quality", `Size cap: ${i(S, this) ? "On" : "Off"}`);
1422
+ detail: a(S, this)
1423
+ })), i(G, this, $).call(this, "Quality", `Size cap: ${a(S, this) ? "On" : "Off"}`);
1423
1424
  });
1424
1425
  }
1425
1426
  function Xe() {
1426
- let e = [...i(y, this)].sort((e, t) => {
1427
+ let e = [...a(y, this)].sort((e, t) => {
1427
1428
  var n, r;
1428
1429
  return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
1429
1430
  });
1430
1431
  return e.find((e) => {
1431
1432
  var t;
1432
- return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= i(b, this);
1433
+ return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= a(b, this);
1433
1434
  }) || e[e.length - 1] || null;
1434
1435
  }
1435
1436
  function Ze() {
1436
- let e = r(K, this, q).call(this, "#abr-auto-btn"), t = r(K, this, q).call(this, "#abr-fixed-btn"), n = r(K, this, q).call(this, "#quality-status-text");
1437
- e == null || e.setAttribute("data-active", String(i(x, this))), t == null || t.setAttribute("data-active", String(!i(x, this))), n && r(K, this, J).call(this, n, i(x, this) ? "Select maximum allowed quality" : "Select specific quality (may cause buffering)"), r(K, this, tt).call(this);
1437
+ let e = i(G, this, K).call(this, "#abr-auto-btn"), t = i(G, this, K).call(this, "#abr-fixed-btn"), n = i(G, this, K).call(this, "#quality-status-text");
1438
+ e == null || e.setAttribute("data-active", String(a(x, this))), t == null || t.setAttribute("data-active", String(!a(x, this))), n && i(G, this, q).call(this, n, a(x, this) ? "Select maximum allowed quality" : "Select specific quality (may cause buffering)"), i(G, this, tt).call(this);
1438
1439
  }
1439
1440
  function Qe() {
1440
- let e = r(K, this, q).call(this, "#size-cap-toggle");
1441
- e && (e.textContent = i(S, this) ? "On" : "Off", e.setAttribute("data-active", String(i(S, this))), e.disabled = !i(x, this));
1441
+ let e = i(G, this, K).call(this, "#size-cap-toggle");
1442
+ e && (e.textContent = a(S, this) ? "On" : "Off", e.setAttribute("data-active", String(a(S, this))), e.disabled = !a(x, this));
1442
1443
  }
1443
1444
  function $e() {
1444
1445
  var e;
1445
1446
  let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("#quality-menu");
1446
- t && (t.innerHTML = "", i(y, this).sort((e, t) => {
1447
+ t && (t.innerHTML = "", a(y, this).sort((e, t) => {
1447
1448
  var n, r;
1448
1449
  return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
1449
1450
  }).forEach((e) => {
1450
- var n, i, a, o, s, l, ee;
1451
- let u = document.createElement("button");
1452
- u.className = "quality-item", u.type = "button", u.setAttribute("data-id", String(((n = e.video) == null ? void 0 : n.id) || 0)), u.setAttribute("data-bitrate", String(((i = e.video) == null ? void 0 : i.bitRate) || 0)), u.setAttribute("aria-label", e.video ? `Set quality to ${ne(e.video)}` : "Set quality");
1453
- let d = document.createElement("div");
1454
- d.className = "quality-item-info";
1455
- let f = document.createElement("span");
1456
- f.className = "quality-item-title", f.textContent = e.video ? ne(e.video) : "";
1451
+ var n, r, a, o, l, ee, u;
1452
+ let d = document.createElement("button");
1453
+ d.className = "quality-item", d.type = "button", d.setAttribute("data-id", String(((n = e.video) == null ? void 0 : n.id) || 0)), d.setAttribute("data-bitrate", String(((r = e.video) == null ? void 0 : r.bitRate) || 0)), d.setAttribute("aria-label", e.video ? `Set quality to ${s(e.video)}` : "Set quality");
1454
+ let f = document.createElement("div");
1455
+ f.className = "quality-item-info";
1457
1456
  let p = document.createElement("span");
1458
- p.className = "quality-item-subtitle";
1459
- let m = r(K, this, et).call(this, (a = e.video) == null ? void 0 : a.frameRate), re = m ? `, ${m}fps` : "";
1460
- p.textContent = `${te(((o = (s = e.video) == null ? void 0 : s.bitRate) == null ? 0 : o) + ((l = (ee = e.audio) == null ? void 0 : ee.bitRate) == null ? 0 : l))}${re}`, d.appendChild(f), d.appendChild(p), u.appendChild(d);
1461
- let h = document.createElement("span");
1462
- h.className = "quality-current-label", h.textContent = "Current", u.appendChild(h), u.addEventListener("click", (t) => {
1457
+ p.className = "quality-item-title", p.textContent = e.video ? s(e.video) : "";
1458
+ let m = document.createElement("span");
1459
+ m.className = "quality-item-subtitle";
1460
+ let h = i(G, this, et).call(this, (a = e.video) == null ? void 0 : a.frameRate), ne = h ? `, ${h}fps` : "";
1461
+ m.textContent = `${te(((o = (l = e.video) == null ? void 0 : l.bitRate) == null ? 0 : o) + ((ee = (u = e.audio) == null ? void 0 : u.bitRate) == null ? 0 : ee))}${ne}`, f.appendChild(p), f.appendChild(m), d.appendChild(f);
1462
+ let g = document.createElement("span");
1463
+ g.className = "quality-current-label", g.textContent = "Current", d.appendChild(g), d.addEventListener("click", (t) => {
1463
1464
  t.stopPropagation(), this.dispatchEvent(new CustomEvent(c.SET_RENDITION, {
1464
1465
  bubbles: !0,
1465
1466
  composed: !0,
1466
1467
  detail: e
1467
1468
  }));
1468
- let n = e.video ? ne(e.video) : "unknown";
1469
- r(K, this, $).call(this, "Quality", `Selected: ${n}`);
1470
- }), t.appendChild(u);
1471
- }), r(K, this, tt).call(this));
1469
+ let n = e.video ? s(e.video) : "unknown";
1470
+ i(G, this, $).call(this, "Quality", `Selected: ${n}`);
1471
+ }), t.appendChild(d);
1472
+ }), i(G, this, tt).call(this));
1472
1473
  }
1473
1474
  function et(e) {
1474
1475
  return e ? e[0] % e[1] === 0 ? (e[0] / e[1]).toString() : (e[0] / e[1]).toFixed(2) : "";
1475
1476
  }
1476
1477
  function tt() {
1477
1478
  var e, t, n;
1478
- let a = (e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".quality-item"), o = (t = i(C, this)) == null || (t = t.video) == null ? void 0 : t.id, s = i(b, this), c = r(K, this, nt).call(this, a, s);
1479
- a == null || a.forEach((e) => {
1479
+ let r = (e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".quality-item"), o = (t = a(C, this)) == null || (t = t.video) == null ? void 0 : t.id, s = a(b, this), c = i(G, this, nt).call(this, r, s);
1480
+ r == null || r.forEach((e) => {
1480
1481
  let t = parseInt(e.getAttribute("data-id") || "0", 10), n = parseInt(e.getAttribute("data-bitrate") || "0", 10);
1481
1482
  e.setAttribute("data-playing", String(t === o));
1482
1483
  let r = c !== null && n === c;
1483
- e.setAttribute("data-selected", String(r)), e.setAttribute("aria-pressed", String(r)), i(x, this) ? e.setAttribute("data-capped", String(n > s)) : e.removeAttribute("data-capped");
1484
+ e.setAttribute("data-selected", String(r)), e.setAttribute("aria-pressed", String(r)), a(x, this) ? e.setAttribute("data-capped", String(n > s)) : e.removeAttribute("data-capped");
1484
1485
  });
1485
- let l = (n = i(C, this)) == null ? void 0 : n.video;
1486
+ let l = (n = a(C, this)) == null ? void 0 : n.video;
1486
1487
  if (l != null && l.width && l.height) {
1487
- r(K, this, Y).call(this, "quality-section", `${l.width}x${l.height}`);
1488
+ i(G, this, J).call(this, "quality-section", `${l.width}x${l.height}`);
1488
1489
  return;
1489
1490
  }
1490
1491
  if (typeof c == "number" && c > 0) {
1491
- r(K, this, Y).call(this, "quality-section", te(c, 1));
1492
+ i(G, this, J).call(this, "quality-section", te(c, 1));
1492
1493
  return;
1493
1494
  }
1494
- r(K, this, Y).call(this, "quality-section", i(x, this) ? "Auto" : "Fixed");
1495
+ i(G, this, J).call(this, "quality-section", a(x, this) ? "Auto" : "Fixed");
1495
1496
  }
1496
1497
  function nt(e, t) {
1497
1498
  var n;
@@ -1503,46 +1504,46 @@ function nt(e, t) {
1503
1504
  }), (n = r) == null ? i : n;
1504
1505
  }
1505
1506
  function rt() {
1506
- r(K, this, it).call(this), r(K, this, ot).call(this), r(K, this, at).call(this), a(E, this, window.setInterval(() => r(K, this, at).call(this), 1e3));
1507
+ i(G, this, it).call(this), i(G, this, ot).call(this), i(G, this, at).call(this), r(E, this, window.setInterval(() => i(G, this, at).call(this), 1e3));
1507
1508
  }
1508
1509
  function it() {
1509
- i(E, this) !== null && (clearInterval(i(E, this)), a(E, this, null));
1510
+ a(E, this) !== null && (clearInterval(a(E, this)), r(E, this, null));
1510
1511
  }
1511
1512
  function at() {
1512
1513
  var e;
1513
- let t = (e = i(v, this)) == null ? void 0 : e.instance;
1514
+ let t = (e = a(v, this)) == null ? void 0 : e.instance;
1514
1515
  if (t) try {
1515
1516
  let e = t.getStatistics();
1516
- r(K, this, Z).call(this), r(K, this, Q).call(this, "#sdk-version", e.version || "-"), r(K, this, Q).call(this, "#session-id", e.sessionId || "-"), r(K, this, Q).call(this, "#client-id", e.clientId || "-"), r(K, this, Q).call(this, "#channel-id", e.channelId || "-"), r(K, this, Q).call(this, "#channel-group-id", e.channelGroupId || "-"), r(K, this, Q).call(this, "#uptime", r(K, this, ct).call(this, e.uptime)), r(K, this, Q).call(this, "#ttff", e.timeToFirstFrame ? `${e.timeToFirstFrame}ms` : "-"), r(K, this, Q).call(this, "#connection-state", t.connectionState || "-"), r(K, this, Q).call(this, "#playback-state", t.playbackState || "-");
1517
+ i(G, this, Z).call(this), i(G, this, Q).call(this, "#sdk-version", e.version || "-"), i(G, this, Q).call(this, "#session-id", e.sessionId || "-"), i(G, this, Q).call(this, "#client-id", e.clientId || "-"), i(G, this, Q).call(this, "#channel-id", e.channelId || "-"), i(G, this, Q).call(this, "#channel-group-id", e.channelGroupId || "-"), i(G, this, Q).call(this, "#uptime", i(G, this, ct).call(this, e.uptime)), i(G, this, Q).call(this, "#ttff", e.timeToFirstFrame ? `${e.timeToFirstFrame}ms` : "-"), i(G, this, Q).call(this, "#connection-state", t.connectionState || "-"), i(G, this, Q).call(this, "#playback-state", t.playbackState || "-");
1517
1518
  let n = typeof t.playbackLatency == "number" ? `${Math.round(t.playbackLatency)}ms` : "-";
1518
- r(K, this, Q).call(this, "#playback-latency", n), r(K, this, Q).call(this, "#average-drift", r(K, this, lt).call(this, e.averageDrift, 1));
1519
+ i(G, this, Q).call(this, "#playback-latency", n), i(G, this, Q).call(this, "#average-drift", i(G, this, lt).call(this, e.averageDrift, 1));
1519
1520
  let o = `${Math.max(0, t.bufferFullness * 100).toFixed(0)}%`;
1520
- if (r(K, this, Q).call(this, "#playback-buffer-fullness", o), r(K, this, Y).call(this, "playback-section", `Buffer ${o}`), r(K, this, Q).call(this, "#playback-last-buffer-event", t.lastBufferEvent || "-"), r(K, this, Q).call(this, "#playback-buffering-events", typeof e.bufferingEventsCount == "number" ? e.bufferingEventsCount.toString() : "-"), r(K, this, Q).call(this, "#playback-buffering-ratio", r(K, this, ut).call(this, e.bufferingRatio)), r(K, this, Q).call(this, "#playback-time-spent-buffering", r(K, this, ct).call(this, t.timeSpentBuffering)), r(K, this, Q).call(this, "#playback-rendition-changes", r(K, this, pt).call(this, e.renditionLevelChangeCount, e.renditionChangesPerMinute)), r(K, this, Q).call(this, "#playback-seek-adjustments-rate", r(K, this, ft).call(this, e.seekAdjustmentsPerMinute, "min")), r(K, this, Q).call(this, "#playback-timeshift-adjustments-rate", r(K, this, ft).call(this, e.timeshiftAdjustmentsPerMinute, "min")), r(K, this, Q).call(this, "#playback-current-rendition", r(K, this, yt).call(this, e)), r(K, this, Q).call(this, "#playback-codecs", r(K, this, bt).call(this, e)), r(K, this, Q).call(this, "#playback-frame-drops", r(K, this, xt).call(this, e)), e.edgeUrl) try {
1521
- r(K, this, Q).call(this, "#network-edge-url", new URL(e.edgeUrl).hostname);
1521
+ if (i(G, this, Q).call(this, "#playback-buffer-fullness", o), i(G, this, J).call(this, "playback-section", `Buffer ${o}`), i(G, this, Q).call(this, "#playback-last-buffer-event", t.lastBufferEvent || "-"), i(G, this, Q).call(this, "#playback-buffering-events", typeof e.bufferingEventsCount == "number" ? e.bufferingEventsCount.toString() : "-"), i(G, this, Q).call(this, "#playback-buffering-ratio", i(G, this, ut).call(this, e.bufferingRatio)), i(G, this, Q).call(this, "#playback-time-spent-buffering", i(G, this, ct).call(this, t.timeSpentBuffering)), i(G, this, Q).call(this, "#playback-rendition-changes", i(G, this, pt).call(this, e.renditionLevelChangeCount, e.renditionChangesPerMinute)), i(G, this, Q).call(this, "#playback-seek-adjustments-rate", i(G, this, ft).call(this, e.seekAdjustmentsPerMinute, "min")), i(G, this, Q).call(this, "#playback-timeshift-adjustments-rate", i(G, this, ft).call(this, e.timeshiftAdjustmentsPerMinute, "min")), i(G, this, Q).call(this, "#playback-current-rendition", i(G, this, yt).call(this, e)), i(G, this, Q).call(this, "#playback-codecs", i(G, this, bt).call(this, e)), i(G, this, Q).call(this, "#playback-frame-drops", i(G, this, xt).call(this, e)), e.edgeUrl) try {
1522
+ i(G, this, Q).call(this, "#network-edge-url", new URL(e.edgeUrl).hostname);
1522
1523
  } catch (t) {
1523
- r(K, this, Q).call(this, "#network-edge-url", e.edgeUrl);
1524
+ i(G, this, Q).call(this, "#network-edge-url", e.edgeUrl);
1524
1525
  }
1525
- else r(K, this, Q).call(this, "#network-edge-url", "-");
1526
- r(K, this, Q).call(this, "#network-protocol", r(K, this, mt).call(this, e.connectionProtocol));
1527
- let s = r(K, this, ht).call(this, e.rtt);
1528
- r(K, this, Q).call(this, "#network-rtt", s), r(K, this, Q).call(this, "#network-estimated-bandwidth", r(K, this, dt).call(this, e.estimatedBandwidth)), r(K, this, Q).call(this, "#network-video-bitrate", r(K, this, dt).call(this, e.videoBitRate)), r(K, this, Q).call(this, "#network-audio-bitrate", r(K, this, dt).call(this, e.audioBitRate)), r(K, this, Q).call(this, "#network-bitrate", r(K, this, dt).call(this, e.averageBitRate)), r(K, this, Q).call(this, "#network-audio-jitter", r(K, this, _t).call(this, e.audioJitter)), r(K, this, Q).call(this, "#network-video-jitter", r(K, this, _t).call(this, e.videoJitter)), r(K, this, Q).call(this, "#network-connect-success", r(K, this, vt).call(this, e.connectCount, e.connectionAttemptCount, e.connectionSuccessRatio)), r(K, this, Q).call(this, "#network-reconnects-per-hour", r(K, this, ft).call(this, e.reconnectsPerHour, "h")), r(K, this, Y).call(this, "network-section", r(K, this, gt).call(this, e.rtt));
1529
- let c = r(K, this, ct).call(this, e.uptime);
1530
- r(K, this, Y).call(this, "stats-section", c === "-" ? "Up -" : `Up ${c}`), i(A, this) && (a(A, this, !1), r(K, this, $).call(this, "System", "Statistics stream recovered"));
1526
+ else i(G, this, Q).call(this, "#network-edge-url", "-");
1527
+ i(G, this, Q).call(this, "#network-protocol", i(G, this, mt).call(this, e.connectionProtocol));
1528
+ let s = i(G, this, ht).call(this, e.rtt);
1529
+ i(G, this, Q).call(this, "#network-rtt", s), i(G, this, Q).call(this, "#network-estimated-bandwidth", i(G, this, dt).call(this, e.estimatedBandwidth)), i(G, this, Q).call(this, "#network-video-bitrate", i(G, this, dt).call(this, e.videoBitRate)), i(G, this, Q).call(this, "#network-audio-bitrate", i(G, this, dt).call(this, e.audioBitRate)), i(G, this, Q).call(this, "#network-bitrate", i(G, this, dt).call(this, e.averageBitRate)), i(G, this, Q).call(this, "#network-audio-jitter", i(G, this, _t).call(this, e.audioJitter)), i(G, this, Q).call(this, "#network-video-jitter", i(G, this, _t).call(this, e.videoJitter)), i(G, this, Q).call(this, "#network-connect-success", i(G, this, vt).call(this, e.connectCount, e.connectionAttemptCount, e.connectionSuccessRatio)), i(G, this, Q).call(this, "#network-reconnects-per-hour", i(G, this, ft).call(this, e.reconnectsPerHour, "h")), i(G, this, J).call(this, "network-section", i(G, this, gt).call(this, e.rtt));
1530
+ let c = i(G, this, ct).call(this, e.uptime);
1531
+ i(G, this, J).call(this, "stats-section", c === "-" ? "Up -" : `Up ${c}`), a(A, this) && (r(A, this, !1), i(G, this, $).call(this, "System", "Statistics stream recovered"));
1531
1532
  } catch (e) {
1532
- i(A, this) || (a(A, this, !0), r(K, this, $).call(this, "System", "Failed to read statistics", "error"));
1533
+ a(A, this) || (r(A, this, !0), i(G, this, $).call(this, "System", "Failed to read statistics", "error"));
1533
1534
  }
1534
1535
  }
1535
1536
  function ot() {
1536
1537
  var e;
1537
- let t = (e = i(v, this)) == null ? void 0 : e.instance;
1538
- !t || i(j, this) === t || (r(K, this, st).call(this), a(j, this, t), t.on("connection state", i(pe, this)), t.on("playback state", i(me, this)), t.on("buffer state event", i(he, this)), t.on("error", i(ge, this)), t.on("rendition level", i(_e, this)), t.on("is live", i(ve, this)));
1538
+ let t = (e = a(v, this)) == null ? void 0 : e.instance;
1539
+ !t || a(j, this) === t || (i(G, this, st).call(this), r(j, this, t), t.on("connection state", a(me, this)), t.on("playback state", a(he, this)), t.on("buffer state event", a(ge, this)), t.on("error", a(_e, this)), t.on("rendition level", a(ve, this)), t.on("is live", a(ye, this)));
1539
1540
  }
1540
1541
  function st() {
1541
- let e = i(j, this);
1542
- e && (e.off("connection state", i(pe, this)), e.off("playback state", i(me, this)), e.off("buffer state event", i(he, this)), e.off("error", i(ge, this)), e.off("rendition level", i(_e, this)), e.off("is live", i(ve, this)), a(j, this, null));
1542
+ let e = a(j, this);
1543
+ e && (e.off("connection state", a(me, this)), e.off("playback state", a(he, this)), e.off("buffer state event", a(ge, this)), e.off("error", a(_e, this)), e.off("rendition level", a(ve, this)), e.off("is live", a(ye, this)), r(j, this, null));
1543
1544
  }
1544
1545
  function Q(e, t) {
1545
- r(K, this, J).call(this, r(K, this, q).call(this, e), t);
1546
+ i(G, this, q).call(this, i(G, this, K).call(this, e), t);
1546
1547
  }
1547
1548
  function ct(e) {
1548
1549
  if (!e) return "-";
@@ -1586,7 +1587,7 @@ function vt(e, t, n) {
1586
1587
  }
1587
1588
  function yt(e) {
1588
1589
  if (!(typeof e.videoWidth == "number" && typeof e.videoHeight == "number")) return e.audioCodec ? "Audio only" : "-";
1589
- let t = r(K, this, et).call(this, e.frameRate), n = t ? ` @ ${t}fps` : "";
1590
+ let t = i(G, this, et).call(this, e.frameRate), n = t ? ` @ ${t}fps` : "";
1590
1591
  return `${e.videoWidth}x${e.videoHeight}${n}`;
1591
1592
  }
1592
1593
  function bt(e) {
@@ -1598,13 +1599,13 @@ function xt(e) {
1598
1599
  }
1599
1600
  function St() {
1600
1601
  var e = this;
1601
- let n = r(K, this, q).call(this, "#events-clear"), o = r(K, this, q).call(this, "#copy-events");
1602
- a(B, this, r(K, this, q).call(this, "#events-list")), a(V, this, r(K, this, q).call(this, "#events-count")), n == null || n.addEventListener("click", (e) => {
1603
- e.stopPropagation(), a(O, this, []), r(K, this, Et).call(this, !0);
1602
+ let n = i(G, this, K).call(this, "#events-clear"), o = i(G, this, K).call(this, "#copy-events");
1603
+ r(z, this, i(G, this, K).call(this, "#events-list")), r(B, this, i(G, this, K).call(this, "#events-count")), n == null || n.addEventListener("click", (e) => {
1604
+ e.stopPropagation(), r(O, this, []), i(G, this, Et).call(this, !0);
1604
1605
  }), o == null || o.addEventListener("click", function() {
1605
1606
  var n = t(function* (t) {
1606
1607
  t.stopPropagation();
1607
- let n = JSON.stringify(i(O, e).map((e) => d(d({}, e), {}, { isoTimestamp: new Date(e.timestamp).toISOString() })), null, 2);
1608
+ let n = JSON.stringify(a(O, e).map((e) => f(f({}, e), {}, { isoTimestamp: new Date(e.timestamp).toISOString() })), null, 2);
1608
1609
  try {
1609
1610
  yield navigator.clipboard.writeText(n), o.textContent = "Copied", setTimeout(() => {
1610
1611
  o.textContent = "Copy";
@@ -1621,62 +1622,62 @@ function St() {
1621
1622
  }());
1622
1623
  }
1623
1624
  function $(e, t, n = "info") {
1624
- a(k, this, i(k, this) + 1);
1625
+ r(k, this, a(k, this) + 1);
1625
1626
  let o = {
1626
- id: i(k, this),
1627
+ id: a(k, this),
1627
1628
  timestamp: Date.now(),
1628
1629
  category: e,
1629
1630
  message: t,
1630
1631
  level: n
1631
1632
  };
1632
- if (i(O, this).push(o), i(O, this).length > 250 && i(O, this).splice(0, i(O, this).length - 250), r(K, this, Ce).call(this), r(K, this, Se).call(this, "events-section")) {
1633
- r(K, this, wt).call(this, o), r(K, this, Tt).call(this);
1633
+ if (a(O, this).push(o), a(O, this).length > 250 && a(O, this).splice(0, a(O, this).length - 250), i(G, this, we).call(this), i(G, this, Ce).call(this, "events-section")) {
1634
+ i(G, this, wt).call(this, o), i(G, this, Tt).call(this);
1634
1635
  return;
1635
1636
  }
1636
- a(H, this, !0);
1637
+ r(V, this, !0);
1637
1638
  }
1638
1639
  function Ct(e) {
1639
1640
  let t = document.createElement("div");
1640
1641
  t.className = "event-row", t.setAttribute("data-level", e.level);
1641
1642
  let n = document.createElement("span");
1642
- n.className = "event-time", n.textContent = r(K, this, Dt).call(this, e.timestamp);
1643
- let i = document.createElement("span");
1644
- i.className = "event-category", i.textContent = e.category;
1643
+ n.className = "event-time", n.textContent = i(G, this, Dt).call(this, e.timestamp);
1644
+ let r = document.createElement("span");
1645
+ r.className = "event-category", r.textContent = e.category;
1645
1646
  let a = document.createElement("span");
1646
- return a.className = "event-message", a.textContent = e.message, t.appendChild(n), t.appendChild(i), t.appendChild(a), t;
1647
+ return a.className = "event-message", a.textContent = e.message, t.appendChild(n), t.appendChild(r), t.appendChild(a), t;
1647
1648
  }
1648
1649
  function wt(e) {
1649
- if (!i(B, this)) return;
1650
- let t = i(B, this).querySelector(".events-empty");
1650
+ if (!a(z, this)) return;
1651
+ let t = a(z, this).querySelector(".events-empty");
1651
1652
  t && t.remove();
1652
- let n = r(K, this, Ct).call(this, e);
1653
- i(B, this).prepend(n);
1653
+ let n = i(G, this, Ct).call(this, e);
1654
+ a(z, this).prepend(n);
1654
1655
  }
1655
1656
  function Tt() {
1656
- if (!i(B, this)) return;
1657
- let e = i(B, this).querySelectorAll(".event-row");
1657
+ if (!a(z, this)) return;
1658
+ let e = a(z, this).querySelectorAll(".event-row");
1658
1659
  for (let n = e.length - 1; n >= 250; n--) {
1659
1660
  var t;
1660
1661
  (t = e[n]) == null || t.remove();
1661
1662
  }
1662
1663
  }
1663
1664
  function Et(e = !1) {
1664
- if (!i(B, this) || !i(V, this)) return;
1665
- if (r(K, this, Ce).call(this), !e && !r(K, this, Se).call(this, "events-section")) {
1666
- a(H, this, !0);
1665
+ if (!a(z, this) || !a(B, this)) return;
1666
+ if (i(G, this, we).call(this), !e && !i(G, this, Ce).call(this, "events-section")) {
1667
+ r(V, this, !0);
1667
1668
  return;
1668
1669
  }
1669
- if (a(H, this, !1), i(O, this).length === 0) {
1670
- i(B, this).innerHTML = "<div class=\"events-empty\">No events yet</div>";
1670
+ if (r(V, this, !1), a(O, this).length === 0) {
1671
+ a(z, this).innerHTML = "<div class=\"events-empty\">No events yet</div>";
1671
1672
  return;
1672
1673
  }
1673
- i(B, this).innerHTML = "";
1674
+ a(z, this).innerHTML = "";
1674
1675
  let t = document.createDocumentFragment();
1675
- for (let e = i(O, this).length - 1; e >= 0; e--) {
1676
- let n = i(O, this)[e];
1677
- n && t.appendChild(r(K, this, Ct).call(this, n));
1676
+ for (let e = a(O, this).length - 1; e >= 0; e--) {
1677
+ let n = a(O, this)[e];
1678
+ n && t.appendChild(i(G, this, Ct).call(this, n));
1678
1679
  }
1679
- i(B, this).appendChild(t);
1680
+ a(z, this).appendChild(t);
1680
1681
  }
1681
1682
  function Dt(e) {
1682
1683
  return new Date(e).toLocaleTimeString([], {
@@ -1688,13 +1689,13 @@ function Dt(e) {
1688
1689
  }
1689
1690
  function Ot() {
1690
1691
  var e = this;
1691
- let n = r(K, this, q).call(this, "#copy-stats");
1692
+ let n = i(G, this, K).call(this, "#copy-stats");
1692
1693
  n == null || n.addEventListener("click", function() {
1693
- var i = t(function* (t) {
1694
+ var r = t(function* (t) {
1694
1695
  t.stopPropagation();
1695
- let i = r(K, e, kt).call(e);
1696
+ let r = i(G, e, kt).call(e);
1696
1697
  try {
1697
- yield navigator.clipboard.writeText(JSON.stringify(i, null, 2)), n.setAttribute("data-copied", "true"), n.textContent = "Copied!", setTimeout(() => {
1698
+ yield navigator.clipboard.writeText(JSON.stringify(r, null, 2)), n.setAttribute("data-copied", "true"), n.textContent = "Copied!", setTimeout(() => {
1698
1699
  n.setAttribute("data-copied", "false"), n.textContent = "Copy Stats to Clipboard";
1699
1700
  }, 2e3);
1700
1701
  } catch (e) {
@@ -1704,34 +1705,34 @@ function Ot() {
1704
1705
  }
1705
1706
  });
1706
1707
  return function(e) {
1707
- return i.apply(this, arguments);
1708
+ return r.apply(this, arguments);
1708
1709
  };
1709
1710
  }());
1710
1711
  }
1711
1712
  function kt() {
1712
1713
  var e;
1713
- let t = (e = i(v, this)) == null ? void 0 : e.instance;
1714
+ let t = (e = a(v, this)) == null ? void 0 : e.instance;
1714
1715
  if (!t) return {
1715
1716
  error: "Vindral instance not available",
1716
1717
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
1717
1718
  };
1718
1719
  try {
1719
- return d(d({}, t.getStatistics()), {}, {
1720
+ return f(f({}, t.getStatistics()), {}, {
1720
1721
  connectionState: t.connectionState,
1721
1722
  playbackState: t.playbackState,
1722
1723
  playbackLatency: t.playbackLatency,
1723
1724
  bufferFullness: t.bufferFullness,
1724
1725
  lastBufferEvent: t.lastBufferEvent,
1725
1726
  timeSpentBuffering: t.timeSpentBuffering,
1726
- currentRendition: i(C, this),
1727
- targetBufferTime: i(w, this),
1728
- drift: i(T, this),
1729
- abrEnabled: i(x, this),
1727
+ currentRendition: a(C, this),
1728
+ targetBufferTime: a(w, this),
1729
+ drift: a(T, this),
1730
+ abrEnabled: a(x, this),
1730
1731
  debugLayout: {
1731
- openSections: r(K, this, Me).call(this),
1732
- sectionOrder: r(K, this, Ne).call(this)
1732
+ openSections: i(G, this, Ne).call(this),
1733
+ sectionOrder: i(G, this, Pe).call(this)
1733
1734
  },
1734
- debugEvents: i(O, this).map((e) => d(d({}, e), {}, { isoTimestamp: new Date(e.timestamp).toISOString() })),
1735
+ debugEvents: a(O, this).map((e) => f(f({}, e), {}, { isoTimestamp: new Date(e.timestamp).toISOString() })),
1735
1736
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
1736
1737
  });
1737
1738
  } catch (e) {
@@ -1741,21 +1742,21 @@ function kt() {
1741
1742
  };
1742
1743
  }
1743
1744
  }
1744
- e(be, "observedAttributes", [
1745
- s.DEBUG_PANEL_OPEN,
1746
- s.TARGET_BUFFER_TIME,
1747
- s.DRIFT,
1748
- s.RENDITION_LEVELS,
1749
- s.MAX_VIDEO_BITRATE,
1750
- s.ABR_ENABLED,
1751
- s.SIZE_BASED_RESOLUTION_CAP_ENABLED,
1752
- s.RENDITION_LEVEL
1745
+ e(xe, "observedAttributes", [
1746
+ o.DEBUG_PANEL_OPEN,
1747
+ o.TARGET_BUFFER_TIME,
1748
+ o.DRIFT,
1749
+ o.RENDITION_LEVELS,
1750
+ o.MAX_VIDEO_BITRATE,
1751
+ o.ABR_ENABLED,
1752
+ o.SIZE_BASED_RESOLUTION_CAP_ENABLED,
1753
+ o.RENDITION_LEVEL
1753
1754
  ]);
1754
1755
  //#endregion
1755
1756
  //#region ../../libs/player-next/src/registerDebugComponents.ts
1756
- var At = /* @__PURE__ */ p({ registerDebugComponents: () => jt });
1757
+ var At = /* @__PURE__ */ m({ registerDebugComponents: () => jt });
1757
1758
  function jt() {
1758
- customElements.get("vindral-debug-button") || customElements.define("vindral-debug-button", ie), customElements.get("vindral-debug-panel") || customElements.define("vindral-debug-panel", be);
1759
+ customElements.get("vindral-debug-button") || customElements.define("vindral-debug-button", re), customElements.get("vindral-debug-panel") || customElements.define("vindral-debug-panel", xe);
1759
1760
  }
1760
1761
  //#endregion
1761
1762
  export { At as n, jt as t };